Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions example_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"application": {
"name": "Rocket OSS",
"logLevel": "debug",
"dangerouslyOverrideDefaultVariant": "test",
"rateLimit": {
"enabled": true,
"max": 1000,
Expand Down Expand Up @@ -203,8 +204,13 @@
}
}
},
"apiVariants": {
"aggregate.test.users.id.getAggregation": {
"variants": ["admin"]
}
},
"apis": {
"aggregate.users.id.getAggregation": {
"aggregate.admin.users.id.getAggregation": {
"webhooks": [
{
"url": "https://example.com",
Expand All @@ -218,7 +224,7 @@
{
"type": "query",
"name": "operations",
"value": "[userEmail]"
"value": "min"
}
]
}
Expand Down
6 changes: 6 additions & 0 deletions src/interfaces/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export interface ApplicationConfig {
name: string;
logLevel: LogLevel;
rateLimit?: RateLimitConfig;
dangerouslyOverrideDefaultVariant?: string;
}

export interface WebhookConfig {
Expand Down Expand Up @@ -257,6 +258,10 @@ export interface InfrastructureConfig {
cache?: CacheDbConfig;
}

export interface ApiVariantEntry {
variants: string[];
}

export interface AppConfig {
application: ApplicationConfig;
docs: DocsConfig;
Expand All @@ -266,4 +271,5 @@ export interface AppConfig {
customEndpoints?: Record<string, CustomEndpointConfig>;
authentication?: AuthenticationConfig;
integrations?: IntegrationsConfig;
apiVariants?: Record<string, ApiVariantEntry>;
}
Loading
Loading