stellate 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1886 @@
1
+ import * as z from 'zod';
2
+ import z__default from 'zod';
3
+
4
+ type TimeWindow = `${number}${'s' | 'm' | 'h'}` | {
5
+ value: number;
6
+ unit: 'seconds' | 'minutes' | 'hours';
7
+ };
8
+ interface RateLimitConfig {
9
+ getConsumerIdentifiers?: ConfigFunction<(req: EdgeRequest) => Record<string, unknown>>;
10
+ rateLimit?: DeprecatedRateLimitRule;
11
+ rateLimits?: (RateLimitRule | null | undefined)[] | ConfigFunction<(req: EdgeRequest) => RateLimitRules>;
12
+ complexity?: ComplexityConfig;
13
+ }
14
+ interface EdgeRequest {
15
+ method: string;
16
+ path: string;
17
+ queryString: string;
18
+ queryParams: Record<string, string | string[]>;
19
+ headers: Record<string, string | string[]>;
20
+ ip: string;
21
+ jwt: Record<string, unknown> | null;
22
+ operation: 'query' | 'mutation' | 'subscription';
23
+ rootFields: {
24
+ name: string;
25
+ alias: string | null;
26
+ args: Record<string, unknown>;
27
+ }[];
28
+ }
29
+ interface ComplexityLimit {
30
+ type: 'QueryComplexity';
31
+ budget: number;
32
+ warning?: number;
33
+ window: TimeWindow;
34
+ }
35
+ interface RequestLimit {
36
+ type: 'RequestCount';
37
+ budget: number;
38
+ warning?: number;
39
+ window: TimeWindow;
40
+ }
41
+ type RateLimitGroupBy = 'ip' | {
42
+ header: string;
43
+ } | {
44
+ cookie: string;
45
+ } | {
46
+ jwt: string;
47
+ } | {
48
+ consumerIdentifier: string;
49
+ };
50
+ interface BaseRateLimitRule {
51
+ name: string;
52
+ description?: string;
53
+ state?: 'enabled' | 'disabled' | 'dryRun';
54
+ allowList?: readonly string[];
55
+ limit: ComplexityLimit | RequestLimit;
56
+ }
57
+ interface RateLimitRule extends BaseRateLimitRule {
58
+ groupBy: RateLimitGroupBy;
59
+ }
60
+ type DynamicRateLimitRule = BaseRateLimitRule & ({
61
+ groupBy: RateLimitGroupBy;
62
+ } | {
63
+ group: string | number;
64
+ });
65
+ type RateLimitRules = (DynamicRateLimitRule | null | undefined)[];
66
+ interface DeprecatedRateLimitRule {
67
+ name: string;
68
+ description?: string;
69
+ state?: 'enabled' | 'disabled' | 'dryRun';
70
+ consumerIdentifier: string;
71
+ allowList?: readonly string[];
72
+ limit: ComplexityLimit | RequestLimit;
73
+ }
74
+ type ConfigFunction<T> = T | string;
75
+ interface ComplexityConfig {
76
+ listSizeArguments?: string[];
77
+ maxComplexity?: number;
78
+ }
79
+
80
+ /** This is the configuration format is kept internally in our application.
81
+ * It's slightly different from what's in `./input.ts`, which is the exact
82
+ * format of user-provided configuration inputs, which are converted to
83
+ * the format as defined here.
84
+ */
85
+
86
+ interface ScopeContext {
87
+ headers: Record<string, string | string[]>;
88
+ cookies: Record<string, string>;
89
+ }
90
+ type ScopeFunctionDefinition = ConfigFunction<(ctx: ScopeContext) => string | null | undefined>;
91
+
92
+ declare const inputSchema: z.ZodObject<{
93
+ app: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
94
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
95
+ originUrl: z.ZodOptional<z.ZodString>;
96
+ /**
97
+ * The version of the HTTP protocol to use when contacting the originUrl.
98
+ */
99
+ httpVersion: z.ZodNullable<z.ZodOptional<z.ZodEnum<["1.1", "2", "3"]>>>;
100
+ schema: z.ZodNullable<z.ZodOptional<z.ZodString>>;
101
+ schemaPolling: z.ZodNullable<z.ZodOptional<z.ZodObject<{
102
+ enabled: z.ZodBoolean;
103
+ }, "strip", z.ZodTypeAny, {
104
+ enabled: boolean;
105
+ }, {
106
+ enabled: boolean;
107
+ }>>>;
108
+ cacheIntrospection: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
109
+ blockIntrospection: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
110
+ injectHeaders: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
111
+ devPortal: z.ZodNullable<z.ZodOptional<z.ZodObject<{
112
+ enabled: z.ZodBoolean;
113
+ title: z.ZodOptional<z.ZodString>;
114
+ readme: z.ZodOptional<z.ZodString>;
115
+ description: z.ZodOptional<z.ZodString>;
116
+ urls: z.ZodOptional<z.ZodObject<{
117
+ privacy: z.ZodOptional<z.ZodString>;
118
+ terms: z.ZodOptional<z.ZodString>;
119
+ website: z.ZodOptional<z.ZodString>;
120
+ logo: z.ZodOptional<z.ZodString>;
121
+ favicon: z.ZodOptional<z.ZodString>;
122
+ support: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ privacy?: string | undefined;
125
+ terms?: string | undefined;
126
+ website?: string | undefined;
127
+ logo?: string | undefined;
128
+ favicon?: string | undefined;
129
+ support?: string | undefined;
130
+ }, {
131
+ privacy?: string | undefined;
132
+ terms?: string | undefined;
133
+ website?: string | undefined;
134
+ logo?: string | undefined;
135
+ favicon?: string | undefined;
136
+ support?: string | undefined;
137
+ }>>;
138
+ brandColor: z.ZodOptional<z.ZodString>;
139
+ auth: z.ZodOptional<z.ZodBoolean>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ enabled: boolean;
142
+ title?: string | undefined;
143
+ readme?: string | undefined;
144
+ description?: string | undefined;
145
+ urls?: {
146
+ privacy?: string | undefined;
147
+ terms?: string | undefined;
148
+ website?: string | undefined;
149
+ logo?: string | undefined;
150
+ favicon?: string | undefined;
151
+ support?: string | undefined;
152
+ } | undefined;
153
+ brandColor?: string | undefined;
154
+ auth?: boolean | undefined;
155
+ }, {
156
+ enabled: boolean;
157
+ title?: string | undefined;
158
+ readme?: string | undefined;
159
+ description?: string | undefined;
160
+ urls?: {
161
+ privacy?: string | undefined;
162
+ terms?: string | undefined;
163
+ website?: string | undefined;
164
+ logo?: string | undefined;
165
+ favicon?: string | undefined;
166
+ support?: string | undefined;
167
+ } | undefined;
168
+ brandColor?: string | undefined;
169
+ auth?: boolean | undefined;
170
+ }>>>;
171
+ partialQueryCaching: z.ZodNullable<z.ZodOptional<z.ZodObject<{
172
+ enabled: z.ZodBoolean;
173
+ experimentalDeferSupport: z.ZodOptional<z.ZodBoolean>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ enabled: boolean;
176
+ experimentalDeferSupport?: boolean | undefined;
177
+ }, {
178
+ enabled: boolean;
179
+ experimentalDeferSupport?: boolean | undefined;
180
+ }>>>;
181
+ ignoreOriginCacheControl: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
182
+ queryDepthLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
183
+ passThroughOnly: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
184
+ mutationPolicy: z.ZodNullable<z.ZodOptional<z.ZodEnum<["Type", "List", "Entity", "None"]>>>;
185
+ bypassCacheHeaders: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
186
+ name: z.ZodString;
187
+ }, "strip", z.ZodTypeAny, {
188
+ name: string;
189
+ }, {
190
+ name: string;
191
+ }>, "many">>>;
192
+ /**
193
+ * @deprecated Use the `graphiql` option instead.
194
+ */
195
+ enablePlayground: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
196
+ headers: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
197
+ scopes: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
198
+ headers: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
199
+ cookies: z.ZodRecord<z.ZodString, z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ headers: Record<string, string | string[]>;
202
+ cookies: Record<string, string>;
203
+ }, {
204
+ headers: Record<string, string | string[]>;
205
+ cookies: Record<string, string>;
206
+ }>], z.ZodUnknown>, z.ZodNullable<z.ZodString>>]>, z.ZodObject<{
207
+ definition: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
208
+ headers: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
209
+ cookies: z.ZodRecord<z.ZodString, z.ZodString>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ headers: Record<string, string | string[]>;
212
+ cookies: Record<string, string>;
213
+ }, {
214
+ headers: Record<string, string | string[]>;
215
+ cookies: Record<string, string>;
216
+ }>], z.ZodUnknown>, z.ZodNullable<z.ZodString>>]>>>;
217
+ jwt: z.ZodNullable<z.ZodOptional<z.ZodObject<{
218
+ claim: z.ZodNullable<z.ZodOptional<z.ZodString>>;
219
+ algorithm: z.ZodNullable<z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES256k", "EdDSA", "PS256", "PS384", "PS512"]>>>;
220
+ secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ claim?: string | null | undefined;
223
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
224
+ secret?: string | null | undefined;
225
+ }, {
226
+ claim?: string | null | undefined;
227
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
228
+ secret?: string | null | undefined;
229
+ }>>>;
230
+ }, "strip", z.ZodTypeAny, {
231
+ definition?: string | ((args_0: {
232
+ headers: Record<string, string | string[]>;
233
+ cookies: Record<string, string>;
234
+ }, ...args: unknown[]) => string | null) | null | undefined;
235
+ jwt?: {
236
+ claim?: string | null | undefined;
237
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
238
+ secret?: string | null | undefined;
239
+ } | null | undefined;
240
+ }, {
241
+ definition?: string | ((args_0: {
242
+ headers: Record<string, string | string[]>;
243
+ cookies: Record<string, string>;
244
+ }, ...args: unknown[]) => string | null) | null | undefined;
245
+ jwt?: {
246
+ claim?: string | null | undefined;
247
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
248
+ secret?: string | null | undefined;
249
+ } | null | undefined;
250
+ }>]>>>>;
251
+ rootTypeNames: z.ZodNullable<z.ZodOptional<z.ZodObject<{
252
+ query: z.ZodNullable<z.ZodOptional<z.ZodString>>;
253
+ mutation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
254
+ subscription: z.ZodNullable<z.ZodOptional<z.ZodString>>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ query?: string | null | undefined;
257
+ mutation?: string | null | undefined;
258
+ subscription?: string | null | undefined;
259
+ }, {
260
+ query?: string | null | undefined;
261
+ mutation?: string | null | undefined;
262
+ subscription?: string | null | undefined;
263
+ }>>>;
264
+ keyFields: z.ZodNullable<z.ZodOptional<z.ZodObject<{
265
+ autoAdd: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
266
+ defaults: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
267
+ types: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ types: Record<string, string[]> | null;
270
+ autoAdd?: boolean | null | undefined;
271
+ defaults?: string[] | null | undefined;
272
+ }, {
273
+ types: Record<string, string[]> | null;
274
+ autoAdd?: boolean | null | undefined;
275
+ defaults?: string[] | null | undefined;
276
+ }>>>;
277
+ rules: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
278
+ /** Array of types, or dictionary to enable types, fields of types, or list of fields per type. */
279
+ types: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodBoolean>]>, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">]>>>;
280
+ /** Array of hashes of operation strings. */
281
+ operationHashes: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
282
+ maxAge: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
283
+ swr: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
284
+ scope: z.ZodNullable<z.ZodOptional<z.ZodString>>;
285
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ description?: string | null | undefined;
288
+ types?: string[] | Record<string, boolean | string[] | Record<string, boolean>> | null | undefined;
289
+ operationHashes?: string[] | null | undefined;
290
+ maxAge?: number | null | undefined;
291
+ swr?: number | null | undefined;
292
+ scope?: string | null | undefined;
293
+ }, {
294
+ description?: string | null | undefined;
295
+ types?: string[] | Record<string, boolean | string[] | Record<string, boolean>> | null | undefined;
296
+ operationHashes?: string[] | null | undefined;
297
+ maxAge?: number | null | undefined;
298
+ swr?: number | null | undefined;
299
+ scope?: string | null | undefined;
300
+ }>, "many">>>;
301
+ nonCacheable: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
302
+ retries: z.ZodNullable<z.ZodOptional<z.ZodObject<{
303
+ networkErrors: z.ZodNullable<z.ZodOptional<z.ZodObject<{
304
+ isEnabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
305
+ whenGraphQLResponse: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ isEnabled?: boolean | null | undefined;
308
+ whenGraphQLResponse?: boolean | null | undefined;
309
+ }, {
310
+ isEnabled?: boolean | null | undefined;
311
+ whenGraphQLResponse?: boolean | null | undefined;
312
+ }>>>;
313
+ serverErrors: z.ZodNullable<z.ZodOptional<z.ZodObject<{
314
+ isEnabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
315
+ whenGraphQLResponse: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ isEnabled?: boolean | null | undefined;
318
+ whenGraphQLResponse?: boolean | null | undefined;
319
+ }, {
320
+ isEnabled?: boolean | null | undefined;
321
+ whenGraphQLResponse?: boolean | null | undefined;
322
+ }>>>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ networkErrors?: {
325
+ isEnabled?: boolean | null | undefined;
326
+ whenGraphQLResponse?: boolean | null | undefined;
327
+ } | null | undefined;
328
+ serverErrors?: {
329
+ isEnabled?: boolean | null | undefined;
330
+ whenGraphQLResponse?: boolean | null | undefined;
331
+ } | null | undefined;
332
+ }, {
333
+ networkErrors?: {
334
+ isEnabled?: boolean | null | undefined;
335
+ whenGraphQLResponse?: boolean | null | undefined;
336
+ } | null | undefined;
337
+ serverErrors?: {
338
+ isEnabled?: boolean | null | undefined;
339
+ whenGraphQLResponse?: boolean | null | undefined;
340
+ } | null | undefined;
341
+ }>>>;
342
+ customAttributes: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
343
+ header: z.ZodString;
344
+ jwt: z.ZodNullable<z.ZodOptional<z.ZodObject<{
345
+ claim: z.ZodNullable<z.ZodOptional<z.ZodString>>;
346
+ algorithm: z.ZodNullable<z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES256k", "EdDSA", "PS256", "PS384", "PS512"]>>>;
347
+ secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ claim?: string | null | undefined;
350
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
351
+ secret?: string | null | undefined;
352
+ }, {
353
+ claim?: string | null | undefined;
354
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
355
+ secret?: string | null | undefined;
356
+ }>>>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ header: string;
359
+ jwt?: {
360
+ claim?: string | null | undefined;
361
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
362
+ secret?: string | null | undefined;
363
+ } | null | undefined;
364
+ }, {
365
+ header: string;
366
+ jwt?: {
367
+ claim?: string | null | undefined;
368
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
369
+ secret?: string | null | undefined;
370
+ } | null | undefined;
371
+ }>, z.ZodObject<{
372
+ cookie: z.ZodString;
373
+ jwt: z.ZodNullable<z.ZodOptional<z.ZodObject<{
374
+ claim: z.ZodNullable<z.ZodOptional<z.ZodString>>;
375
+ algorithm: z.ZodNullable<z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES256k", "EdDSA", "PS256", "PS384", "PS512"]>>>;
376
+ secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ claim?: string | null | undefined;
379
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
380
+ secret?: string | null | undefined;
381
+ }, {
382
+ claim?: string | null | undefined;
383
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
384
+ secret?: string | null | undefined;
385
+ }>>>;
386
+ }, "strip", z.ZodTypeAny, {
387
+ cookie: string;
388
+ jwt?: {
389
+ claim?: string | null | undefined;
390
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
391
+ secret?: string | null | undefined;
392
+ } | null | undefined;
393
+ }, {
394
+ cookie: string;
395
+ jwt?: {
396
+ claim?: string | null | undefined;
397
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
398
+ secret?: string | null | undefined;
399
+ } | null | undefined;
400
+ }>]>>, Record<string, {
401
+ header: string;
402
+ jwt?: {
403
+ claim?: string | null | undefined;
404
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
405
+ secret?: string | null | undefined;
406
+ } | null | undefined;
407
+ } | {
408
+ cookie: string;
409
+ jwt?: {
410
+ claim?: string | null | undefined;
411
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
412
+ secret?: string | null | undefined;
413
+ } | null | undefined;
414
+ }>, Record<string, {
415
+ header: string;
416
+ jwt?: {
417
+ claim?: string | null | undefined;
418
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
419
+ secret?: string | null | undefined;
420
+ } | null | undefined;
421
+ } | {
422
+ cookie: string;
423
+ jwt?: {
424
+ claim?: string | null | undefined;
425
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
426
+ secret?: string | null | undefined;
427
+ } | null | undefined;
428
+ }>>>>;
429
+ userId: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
430
+ header: z.ZodString;
431
+ jwt: z.ZodNullable<z.ZodOptional<z.ZodObject<{
432
+ claim: z.ZodNullable<z.ZodOptional<z.ZodString>>;
433
+ algorithm: z.ZodNullable<z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES256k", "EdDSA", "PS256", "PS384", "PS512"]>>>;
434
+ secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ claim?: string | null | undefined;
437
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
438
+ secret?: string | null | undefined;
439
+ }, {
440
+ claim?: string | null | undefined;
441
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
442
+ secret?: string | null | undefined;
443
+ }>>>;
444
+ }, "strip", z.ZodTypeAny, {
445
+ header: string;
446
+ jwt?: {
447
+ claim?: string | null | undefined;
448
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
449
+ secret?: string | null | undefined;
450
+ } | null | undefined;
451
+ }, {
452
+ header: string;
453
+ jwt?: {
454
+ claim?: string | null | undefined;
455
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
456
+ secret?: string | null | undefined;
457
+ } | null | undefined;
458
+ }>, z.ZodObject<{
459
+ cookie: z.ZodString;
460
+ jwt: z.ZodNullable<z.ZodOptional<z.ZodObject<{
461
+ claim: z.ZodNullable<z.ZodOptional<z.ZodString>>;
462
+ algorithm: z.ZodNullable<z.ZodOptional<z.ZodEnum<["HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "ES256", "ES384", "ES256k", "EdDSA", "PS256", "PS384", "PS512"]>>>;
463
+ secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ claim?: string | null | undefined;
466
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
467
+ secret?: string | null | undefined;
468
+ }, {
469
+ claim?: string | null | undefined;
470
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
471
+ secret?: string | null | undefined;
472
+ }>>>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ cookie: string;
475
+ jwt?: {
476
+ claim?: string | null | undefined;
477
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
478
+ secret?: string | null | undefined;
479
+ } | null | undefined;
480
+ }, {
481
+ cookie: string;
482
+ jwt?: {
483
+ claim?: string | null | undefined;
484
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
485
+ secret?: string | null | undefined;
486
+ } | null | undefined;
487
+ }>]>>>;
488
+ graphiql: z.ZodNullable<z.ZodOptional<z.ZodObject<{
489
+ enabled: z.ZodBoolean;
490
+ title: z.ZodOptional<z.ZodString>;
491
+ }, "strip", z.ZodTypeAny, {
492
+ enabled: boolean;
493
+ title?: string | undefined;
494
+ }, {
495
+ enabled: boolean;
496
+ title?: string | undefined;
497
+ }>>>;
498
+ persistedOperations: z.ZodNullable<z.ZodOptional<z.ZodObject<{
499
+ apq: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
500
+ sendHashToOrigin: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
501
+ rejectInvalidHashes: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ apq?: boolean | null | undefined;
504
+ sendHashToOrigin?: boolean | null | undefined;
505
+ rejectInvalidHashes?: boolean | null | undefined;
506
+ }, {
507
+ apq?: boolean | null | undefined;
508
+ sendHashToOrigin?: boolean | null | undefined;
509
+ rejectInvalidHashes?: boolean | null | undefined;
510
+ }>>>;
511
+ requestSigning: z.ZodNullable<z.ZodOptional<z.ZodObject<{
512
+ secret: z.ZodNullable<z.ZodOptional<z.ZodString>>;
513
+ }, "strip", z.ZodTypeAny, {
514
+ secret?: string | null | undefined;
515
+ }, {
516
+ secret?: string | null | undefined;
517
+ }>>>;
518
+ getConsumerIdentifiers: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodString]>>>;
519
+ rateLimit: z.ZodNullable<z.ZodOptional<z.ZodObject<{
520
+ name: z.ZodString;
521
+ description: z.ZodOptional<z.ZodString>;
522
+ state: z.ZodOptional<z.ZodEnum<["enabled", "disabled", "dryRun"]>>;
523
+ consumerIdentifier: z.ZodOptional<z.ZodString>;
524
+ allowList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
525
+ limit: z.ZodUnion<[z.ZodObject<{
526
+ type: z.ZodLiteral<"QueryComplexity">;
527
+ budget: z.ZodNumber;
528
+ warning: z.ZodOptional<z.ZodNumber>;
529
+ window: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
530
+ value: z.ZodNumber;
531
+ unit: z.ZodEnum<["seconds", "minutes", "hours"]>;
532
+ }, "strict", z.ZodTypeAny, {
533
+ value: number;
534
+ unit: "seconds" | "minutes" | "hours";
535
+ }, {
536
+ value: number;
537
+ unit: "seconds" | "minutes" | "hours";
538
+ }>]>;
539
+ }, "strict", z.ZodTypeAny, {
540
+ type: "QueryComplexity";
541
+ budget: number;
542
+ window: string | {
543
+ value: number;
544
+ unit: "seconds" | "minutes" | "hours";
545
+ };
546
+ warning?: number | undefined;
547
+ }, {
548
+ type: "QueryComplexity";
549
+ budget: number;
550
+ window: string | {
551
+ value: number;
552
+ unit: "seconds" | "minutes" | "hours";
553
+ };
554
+ warning?: number | undefined;
555
+ }>, z.ZodObject<{
556
+ type: z.ZodLiteral<"RequestCount">;
557
+ budget: z.ZodNumber;
558
+ warning: z.ZodOptional<z.ZodNumber>;
559
+ window: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
560
+ value: z.ZodNumber;
561
+ unit: z.ZodEnum<["seconds", "minutes", "hours"]>;
562
+ }, "strict", z.ZodTypeAny, {
563
+ value: number;
564
+ unit: "seconds" | "minutes" | "hours";
565
+ }, {
566
+ value: number;
567
+ unit: "seconds" | "minutes" | "hours";
568
+ }>]>;
569
+ }, "strict", z.ZodTypeAny, {
570
+ type: "RequestCount";
571
+ budget: number;
572
+ window: string | {
573
+ value: number;
574
+ unit: "seconds" | "minutes" | "hours";
575
+ };
576
+ warning?: number | undefined;
577
+ }, {
578
+ type: "RequestCount";
579
+ budget: number;
580
+ window: string | {
581
+ value: number;
582
+ unit: "seconds" | "minutes" | "hours";
583
+ };
584
+ warning?: number | undefined;
585
+ }>]>;
586
+ }, "strict", z.ZodTypeAny, {
587
+ name: string;
588
+ limit: {
589
+ type: "QueryComplexity";
590
+ budget: number;
591
+ window: string | {
592
+ value: number;
593
+ unit: "seconds" | "minutes" | "hours";
594
+ };
595
+ warning?: number | undefined;
596
+ } | {
597
+ type: "RequestCount";
598
+ budget: number;
599
+ window: string | {
600
+ value: number;
601
+ unit: "seconds" | "minutes" | "hours";
602
+ };
603
+ warning?: number | undefined;
604
+ };
605
+ description?: string | undefined;
606
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
607
+ consumerIdentifier?: string | undefined;
608
+ allowList?: string[] | undefined;
609
+ }, {
610
+ name: string;
611
+ limit: {
612
+ type: "QueryComplexity";
613
+ budget: number;
614
+ window: string | {
615
+ value: number;
616
+ unit: "seconds" | "minutes" | "hours";
617
+ };
618
+ warning?: number | undefined;
619
+ } | {
620
+ type: "RequestCount";
621
+ budget: number;
622
+ window: string | {
623
+ value: number;
624
+ unit: "seconds" | "minutes" | "hours";
625
+ };
626
+ warning?: number | undefined;
627
+ };
628
+ description?: string | undefined;
629
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
630
+ consumerIdentifier?: string | undefined;
631
+ allowList?: string[] | undefined;
632
+ }>>>;
633
+ rateLimits: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
634
+ name: z.ZodString;
635
+ description: z.ZodOptional<z.ZodString>;
636
+ state: z.ZodOptional<z.ZodEnum<["enabled", "disabled", "dryRun"]>>;
637
+ groupBy: z.ZodUnion<[z.ZodLiteral<"ip">, z.ZodObject<{
638
+ header: z.ZodString;
639
+ }, "strip", z.ZodTypeAny, {
640
+ header: string;
641
+ }, {
642
+ header: string;
643
+ }>, z.ZodObject<{
644
+ cookie: z.ZodString;
645
+ }, "strip", z.ZodTypeAny, {
646
+ cookie: string;
647
+ }, {
648
+ cookie: string;
649
+ }>, z.ZodObject<{
650
+ jwt: z.ZodString;
651
+ }, "strip", z.ZodTypeAny, {
652
+ jwt: string;
653
+ }, {
654
+ jwt: string;
655
+ }>, z.ZodObject<{
656
+ consumerIdentifier: z.ZodString;
657
+ }, "strip", z.ZodTypeAny, {
658
+ consumerIdentifier: string;
659
+ }, {
660
+ consumerIdentifier: string;
661
+ }>]>;
662
+ allowList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
663
+ limit: z.ZodUnion<[z.ZodObject<{
664
+ type: z.ZodLiteral<"QueryComplexity">;
665
+ budget: z.ZodNumber;
666
+ warning: z.ZodOptional<z.ZodNumber>;
667
+ window: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
668
+ value: z.ZodNumber;
669
+ unit: z.ZodEnum<["seconds", "minutes", "hours"]>;
670
+ }, "strict", z.ZodTypeAny, {
671
+ value: number;
672
+ unit: "seconds" | "minutes" | "hours";
673
+ }, {
674
+ value: number;
675
+ unit: "seconds" | "minutes" | "hours";
676
+ }>]>;
677
+ }, "strict", z.ZodTypeAny, {
678
+ type: "QueryComplexity";
679
+ budget: number;
680
+ window: string | {
681
+ value: number;
682
+ unit: "seconds" | "minutes" | "hours";
683
+ };
684
+ warning?: number | undefined;
685
+ }, {
686
+ type: "QueryComplexity";
687
+ budget: number;
688
+ window: string | {
689
+ value: number;
690
+ unit: "seconds" | "minutes" | "hours";
691
+ };
692
+ warning?: number | undefined;
693
+ }>, z.ZodObject<{
694
+ type: z.ZodLiteral<"RequestCount">;
695
+ budget: z.ZodNumber;
696
+ warning: z.ZodOptional<z.ZodNumber>;
697
+ window: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
698
+ value: z.ZodNumber;
699
+ unit: z.ZodEnum<["seconds", "minutes", "hours"]>;
700
+ }, "strict", z.ZodTypeAny, {
701
+ value: number;
702
+ unit: "seconds" | "minutes" | "hours";
703
+ }, {
704
+ value: number;
705
+ unit: "seconds" | "minutes" | "hours";
706
+ }>]>;
707
+ }, "strict", z.ZodTypeAny, {
708
+ type: "RequestCount";
709
+ budget: number;
710
+ window: string | {
711
+ value: number;
712
+ unit: "seconds" | "minutes" | "hours";
713
+ };
714
+ warning?: number | undefined;
715
+ }, {
716
+ type: "RequestCount";
717
+ budget: number;
718
+ window: string | {
719
+ value: number;
720
+ unit: "seconds" | "minutes" | "hours";
721
+ };
722
+ warning?: number | undefined;
723
+ }>]>;
724
+ }, "strict", z.ZodTypeAny, {
725
+ name: string;
726
+ limit: {
727
+ type: "QueryComplexity";
728
+ budget: number;
729
+ window: string | {
730
+ value: number;
731
+ unit: "seconds" | "minutes" | "hours";
732
+ };
733
+ warning?: number | undefined;
734
+ } | {
735
+ type: "RequestCount";
736
+ budget: number;
737
+ window: string | {
738
+ value: number;
739
+ unit: "seconds" | "minutes" | "hours";
740
+ };
741
+ warning?: number | undefined;
742
+ };
743
+ groupBy: "ip" | {
744
+ header: string;
745
+ } | {
746
+ cookie: string;
747
+ } | {
748
+ jwt: string;
749
+ } | {
750
+ consumerIdentifier: string;
751
+ };
752
+ description?: string | undefined;
753
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
754
+ allowList?: string[] | undefined;
755
+ }, {
756
+ name: string;
757
+ limit: {
758
+ type: "QueryComplexity";
759
+ budget: number;
760
+ window: string | {
761
+ value: number;
762
+ unit: "seconds" | "minutes" | "hours";
763
+ };
764
+ warning?: number | undefined;
765
+ } | {
766
+ type: "RequestCount";
767
+ budget: number;
768
+ window: string | {
769
+ value: number;
770
+ unit: "seconds" | "minutes" | "hours";
771
+ };
772
+ warning?: number | undefined;
773
+ };
774
+ groupBy: "ip" | {
775
+ header: string;
776
+ } | {
777
+ cookie: string;
778
+ } | {
779
+ jwt: string;
780
+ } | {
781
+ consumerIdentifier: string;
782
+ };
783
+ description?: string | undefined;
784
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
785
+ allowList?: string[] | undefined;
786
+ }>, "many">, z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodString]>]>>>;
787
+ complexity: z.ZodNullable<z.ZodOptional<z.ZodObject<{
788
+ listSizeArguments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
789
+ maxComplexity: z.ZodOptional<z.ZodNumber>;
790
+ }, "strict", z.ZodTypeAny, {
791
+ listSizeArguments?: string[] | undefined;
792
+ maxComplexity?: number | undefined;
793
+ }, {
794
+ listSizeArguments?: string[] | undefined;
795
+ maxComplexity?: number | undefined;
796
+ }>>>;
797
+ schemaView: z.ZodNullable<z.ZodOptional<z.ZodObject<{
798
+ include: z.ZodArray<z.ZodString, "many">;
799
+ exclude: z.ZodArray<z.ZodString, "many">;
800
+ }, "strip", z.ZodTypeAny, {
801
+ include: string[];
802
+ exclude: string[];
803
+ }, {
804
+ include: string[];
805
+ exclude: string[];
806
+ }>>>;
807
+ security: z.ZodNullable<z.ZodOptional<z.ZodObject<{
808
+ requestSize: z.ZodOptional<z.ZodNullable<z.ZodObject<{
809
+ maxBytes: z.ZodNumber;
810
+ enabled: z.ZodBoolean;
811
+ }, "strip", z.ZodTypeAny, {
812
+ enabled: boolean;
813
+ maxBytes: number;
814
+ }, {
815
+ enabled: boolean;
816
+ maxBytes: number;
817
+ }>>>;
818
+ directives: z.ZodOptional<z.ZodNullable<z.ZodObject<{
819
+ max: z.ZodNumber;
820
+ enabled: z.ZodBoolean;
821
+ }, "strip", z.ZodTypeAny, {
822
+ enabled: boolean;
823
+ max: number;
824
+ }, {
825
+ enabled: boolean;
826
+ max: number;
827
+ }>>>;
828
+ depth: z.ZodOptional<z.ZodNullable<z.ZodObject<{
829
+ max: z.ZodNumber;
830
+ enabled: z.ZodBoolean;
831
+ }, "strip", z.ZodTypeAny, {
832
+ enabled: boolean;
833
+ max: number;
834
+ }, {
835
+ enabled: boolean;
836
+ max: number;
837
+ }>>>;
838
+ aliases: z.ZodOptional<z.ZodNullable<z.ZodObject<{
839
+ max: z.ZodNumber;
840
+ enabled: z.ZodBoolean;
841
+ }, "strip", z.ZodTypeAny, {
842
+ enabled: boolean;
843
+ max: number;
844
+ }, {
845
+ enabled: boolean;
846
+ max: number;
847
+ }>>>;
848
+ suggestionsInErrors: z.ZodOptional<z.ZodNullable<z.ZodObject<{
849
+ mode: z.ZodEnum<["mask"]>;
850
+ enabled: z.ZodBoolean;
851
+ }, "strip", z.ZodTypeAny, {
852
+ enabled: boolean;
853
+ mode: "mask";
854
+ }, {
855
+ enabled: boolean;
856
+ mode: "mask";
857
+ }>>>;
858
+ }, "strip", z.ZodTypeAny, {
859
+ requestSize?: {
860
+ enabled: boolean;
861
+ maxBytes: number;
862
+ } | null | undefined;
863
+ directives?: {
864
+ enabled: boolean;
865
+ max: number;
866
+ } | null | undefined;
867
+ depth?: {
868
+ enabled: boolean;
869
+ max: number;
870
+ } | null | undefined;
871
+ aliases?: {
872
+ enabled: boolean;
873
+ max: number;
874
+ } | null | undefined;
875
+ suggestionsInErrors?: {
876
+ enabled: boolean;
877
+ mode: "mask";
878
+ } | null | undefined;
879
+ }, {
880
+ requestSize?: {
881
+ enabled: boolean;
882
+ maxBytes: number;
883
+ } | null | undefined;
884
+ directives?: {
885
+ enabled: boolean;
886
+ max: number;
887
+ } | null | undefined;
888
+ depth?: {
889
+ enabled: boolean;
890
+ max: number;
891
+ } | null | undefined;
892
+ aliases?: {
893
+ enabled: boolean;
894
+ max: number;
895
+ } | null | undefined;
896
+ suggestionsInErrors?: {
897
+ enabled: boolean;
898
+ mode: "mask";
899
+ } | null | undefined;
900
+ }>>>;
901
+ removeCookies: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
902
+ variableLogging: z.ZodNullable<z.ZodOptional<z.ZodObject<{
903
+ enabled: z.ZodBoolean;
904
+ }, "strip", z.ZodTypeAny, {
905
+ enabled: boolean;
906
+ }, {
907
+ enabled: boolean;
908
+ }>>>;
909
+ }, "strip", z.ZodTypeAny, {
910
+ app?: string | undefined;
911
+ name?: string | undefined;
912
+ originUrl?: string | undefined;
913
+ httpVersion?: "1.1" | "2" | "3" | null | undefined;
914
+ schema?: string | null | undefined;
915
+ schemaPolling?: {
916
+ enabled: boolean;
917
+ } | null | undefined;
918
+ cacheIntrospection?: boolean | null | undefined;
919
+ blockIntrospection?: boolean | null | undefined;
920
+ injectHeaders?: boolean | null | undefined;
921
+ devPortal?: {
922
+ enabled: boolean;
923
+ title?: string | undefined;
924
+ readme?: string | undefined;
925
+ description?: string | undefined;
926
+ urls?: {
927
+ privacy?: string | undefined;
928
+ terms?: string | undefined;
929
+ website?: string | undefined;
930
+ logo?: string | undefined;
931
+ favicon?: string | undefined;
932
+ support?: string | undefined;
933
+ } | undefined;
934
+ brandColor?: string | undefined;
935
+ auth?: boolean | undefined;
936
+ } | null | undefined;
937
+ partialQueryCaching?: {
938
+ enabled: boolean;
939
+ experimentalDeferSupport?: boolean | undefined;
940
+ } | null | undefined;
941
+ ignoreOriginCacheControl?: boolean | null | undefined;
942
+ queryDepthLimit?: number | null | undefined;
943
+ passThroughOnly?: boolean | null | undefined;
944
+ mutationPolicy?: "Type" | "List" | "Entity" | "None" | null | undefined;
945
+ bypassCacheHeaders?: {
946
+ name: string;
947
+ }[] | null | undefined;
948
+ enablePlayground?: boolean | null | undefined;
949
+ headers?: Record<string, string> | null | undefined;
950
+ scopes?: Record<string, string | ((args_0: {
951
+ headers: Record<string, string | string[]>;
952
+ cookies: Record<string, string>;
953
+ }, ...args: unknown[]) => string | null) | {
954
+ definition?: string | ((args_0: {
955
+ headers: Record<string, string | string[]>;
956
+ cookies: Record<string, string>;
957
+ }, ...args: unknown[]) => string | null) | null | undefined;
958
+ jwt?: {
959
+ claim?: string | null | undefined;
960
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
961
+ secret?: string | null | undefined;
962
+ } | null | undefined;
963
+ }> | null | undefined;
964
+ rootTypeNames?: {
965
+ query?: string | null | undefined;
966
+ mutation?: string | null | undefined;
967
+ subscription?: string | null | undefined;
968
+ } | null | undefined;
969
+ keyFields?: {
970
+ types: Record<string, string[]> | null;
971
+ autoAdd?: boolean | null | undefined;
972
+ defaults?: string[] | null | undefined;
973
+ } | null | undefined;
974
+ rules?: {
975
+ description?: string | null | undefined;
976
+ types?: string[] | Record<string, boolean | string[] | Record<string, boolean>> | null | undefined;
977
+ operationHashes?: string[] | null | undefined;
978
+ maxAge?: number | null | undefined;
979
+ swr?: number | null | undefined;
980
+ scope?: string | null | undefined;
981
+ }[] | null | undefined;
982
+ nonCacheable?: string[] | null | undefined;
983
+ retries?: {
984
+ networkErrors?: {
985
+ isEnabled?: boolean | null | undefined;
986
+ whenGraphQLResponse?: boolean | null | undefined;
987
+ } | null | undefined;
988
+ serverErrors?: {
989
+ isEnabled?: boolean | null | undefined;
990
+ whenGraphQLResponse?: boolean | null | undefined;
991
+ } | null | undefined;
992
+ } | null | undefined;
993
+ customAttributes?: Record<string, {
994
+ header: string;
995
+ jwt?: {
996
+ claim?: string | null | undefined;
997
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
998
+ secret?: string | null | undefined;
999
+ } | null | undefined;
1000
+ } | {
1001
+ cookie: string;
1002
+ jwt?: {
1003
+ claim?: string | null | undefined;
1004
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1005
+ secret?: string | null | undefined;
1006
+ } | null | undefined;
1007
+ }> | null | undefined;
1008
+ userId?: {
1009
+ header: string;
1010
+ jwt?: {
1011
+ claim?: string | null | undefined;
1012
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1013
+ secret?: string | null | undefined;
1014
+ } | null | undefined;
1015
+ } | {
1016
+ cookie: string;
1017
+ jwt?: {
1018
+ claim?: string | null | undefined;
1019
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1020
+ secret?: string | null | undefined;
1021
+ } | null | undefined;
1022
+ } | null | undefined;
1023
+ graphiql?: {
1024
+ enabled: boolean;
1025
+ title?: string | undefined;
1026
+ } | null | undefined;
1027
+ persistedOperations?: {
1028
+ apq?: boolean | null | undefined;
1029
+ sendHashToOrigin?: boolean | null | undefined;
1030
+ rejectInvalidHashes?: boolean | null | undefined;
1031
+ } | null | undefined;
1032
+ requestSigning?: {
1033
+ secret?: string | null | undefined;
1034
+ } | null | undefined;
1035
+ getConsumerIdentifiers?: string | ((...args: unknown[]) => unknown) | null | undefined;
1036
+ rateLimit?: {
1037
+ name: string;
1038
+ limit: {
1039
+ type: "QueryComplexity";
1040
+ budget: number;
1041
+ window: string | {
1042
+ value: number;
1043
+ unit: "seconds" | "minutes" | "hours";
1044
+ };
1045
+ warning?: number | undefined;
1046
+ } | {
1047
+ type: "RequestCount";
1048
+ budget: number;
1049
+ window: string | {
1050
+ value: number;
1051
+ unit: "seconds" | "minutes" | "hours";
1052
+ };
1053
+ warning?: number | undefined;
1054
+ };
1055
+ description?: string | undefined;
1056
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1057
+ consumerIdentifier?: string | undefined;
1058
+ allowList?: string[] | undefined;
1059
+ } | null | undefined;
1060
+ rateLimits?: string | ((...args: unknown[]) => unknown) | {
1061
+ name: string;
1062
+ limit: {
1063
+ type: "QueryComplexity";
1064
+ budget: number;
1065
+ window: string | {
1066
+ value: number;
1067
+ unit: "seconds" | "minutes" | "hours";
1068
+ };
1069
+ warning?: number | undefined;
1070
+ } | {
1071
+ type: "RequestCount";
1072
+ budget: number;
1073
+ window: string | {
1074
+ value: number;
1075
+ unit: "seconds" | "minutes" | "hours";
1076
+ };
1077
+ warning?: number | undefined;
1078
+ };
1079
+ groupBy: "ip" | {
1080
+ header: string;
1081
+ } | {
1082
+ cookie: string;
1083
+ } | {
1084
+ jwt: string;
1085
+ } | {
1086
+ consumerIdentifier: string;
1087
+ };
1088
+ description?: string | undefined;
1089
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1090
+ allowList?: string[] | undefined;
1091
+ }[] | null | undefined;
1092
+ complexity?: {
1093
+ listSizeArguments?: string[] | undefined;
1094
+ maxComplexity?: number | undefined;
1095
+ } | null | undefined;
1096
+ schemaView?: {
1097
+ include: string[];
1098
+ exclude: string[];
1099
+ } | null | undefined;
1100
+ security?: {
1101
+ requestSize?: {
1102
+ enabled: boolean;
1103
+ maxBytes: number;
1104
+ } | null | undefined;
1105
+ directives?: {
1106
+ enabled: boolean;
1107
+ max: number;
1108
+ } | null | undefined;
1109
+ depth?: {
1110
+ enabled: boolean;
1111
+ max: number;
1112
+ } | null | undefined;
1113
+ aliases?: {
1114
+ enabled: boolean;
1115
+ max: number;
1116
+ } | null | undefined;
1117
+ suggestionsInErrors?: {
1118
+ enabled: boolean;
1119
+ mode: "mask";
1120
+ } | null | undefined;
1121
+ } | null | undefined;
1122
+ removeCookies?: string[] | null | undefined;
1123
+ variableLogging?: {
1124
+ enabled: boolean;
1125
+ } | null | undefined;
1126
+ }, {
1127
+ app?: string | undefined;
1128
+ name?: string | undefined;
1129
+ originUrl?: string | undefined;
1130
+ httpVersion?: "1.1" | "2" | "3" | null | undefined;
1131
+ schema?: string | null | undefined;
1132
+ schemaPolling?: {
1133
+ enabled: boolean;
1134
+ } | null | undefined;
1135
+ cacheIntrospection?: boolean | null | undefined;
1136
+ blockIntrospection?: boolean | null | undefined;
1137
+ injectHeaders?: boolean | null | undefined;
1138
+ devPortal?: {
1139
+ enabled: boolean;
1140
+ title?: string | undefined;
1141
+ readme?: string | undefined;
1142
+ description?: string | undefined;
1143
+ urls?: {
1144
+ privacy?: string | undefined;
1145
+ terms?: string | undefined;
1146
+ website?: string | undefined;
1147
+ logo?: string | undefined;
1148
+ favicon?: string | undefined;
1149
+ support?: string | undefined;
1150
+ } | undefined;
1151
+ brandColor?: string | undefined;
1152
+ auth?: boolean | undefined;
1153
+ } | null | undefined;
1154
+ partialQueryCaching?: {
1155
+ enabled: boolean;
1156
+ experimentalDeferSupport?: boolean | undefined;
1157
+ } | null | undefined;
1158
+ ignoreOriginCacheControl?: boolean | null | undefined;
1159
+ queryDepthLimit?: number | null | undefined;
1160
+ passThroughOnly?: boolean | null | undefined;
1161
+ mutationPolicy?: "Type" | "List" | "Entity" | "None" | null | undefined;
1162
+ bypassCacheHeaders?: {
1163
+ name: string;
1164
+ }[] | null | undefined;
1165
+ enablePlayground?: boolean | null | undefined;
1166
+ headers?: Record<string, string> | null | undefined;
1167
+ scopes?: Record<string, string | ((args_0: {
1168
+ headers: Record<string, string | string[]>;
1169
+ cookies: Record<string, string>;
1170
+ }, ...args: unknown[]) => string | null) | {
1171
+ definition?: string | ((args_0: {
1172
+ headers: Record<string, string | string[]>;
1173
+ cookies: Record<string, string>;
1174
+ }, ...args: unknown[]) => string | null) | null | undefined;
1175
+ jwt?: {
1176
+ claim?: string | null | undefined;
1177
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1178
+ secret?: string | null | undefined;
1179
+ } | null | undefined;
1180
+ }> | null | undefined;
1181
+ rootTypeNames?: {
1182
+ query?: string | null | undefined;
1183
+ mutation?: string | null | undefined;
1184
+ subscription?: string | null | undefined;
1185
+ } | null | undefined;
1186
+ keyFields?: {
1187
+ types: Record<string, string[]> | null;
1188
+ autoAdd?: boolean | null | undefined;
1189
+ defaults?: string[] | null | undefined;
1190
+ } | null | undefined;
1191
+ rules?: {
1192
+ description?: string | null | undefined;
1193
+ types?: string[] | Record<string, boolean | string[] | Record<string, boolean>> | null | undefined;
1194
+ operationHashes?: string[] | null | undefined;
1195
+ maxAge?: number | null | undefined;
1196
+ swr?: number | null | undefined;
1197
+ scope?: string | null | undefined;
1198
+ }[] | null | undefined;
1199
+ nonCacheable?: string[] | null | undefined;
1200
+ retries?: {
1201
+ networkErrors?: {
1202
+ isEnabled?: boolean | null | undefined;
1203
+ whenGraphQLResponse?: boolean | null | undefined;
1204
+ } | null | undefined;
1205
+ serverErrors?: {
1206
+ isEnabled?: boolean | null | undefined;
1207
+ whenGraphQLResponse?: boolean | null | undefined;
1208
+ } | null | undefined;
1209
+ } | null | undefined;
1210
+ customAttributes?: Record<string, {
1211
+ header: string;
1212
+ jwt?: {
1213
+ claim?: string | null | undefined;
1214
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1215
+ secret?: string | null | undefined;
1216
+ } | null | undefined;
1217
+ } | {
1218
+ cookie: string;
1219
+ jwt?: {
1220
+ claim?: string | null | undefined;
1221
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1222
+ secret?: string | null | undefined;
1223
+ } | null | undefined;
1224
+ }> | null | undefined;
1225
+ userId?: {
1226
+ header: string;
1227
+ jwt?: {
1228
+ claim?: string | null | undefined;
1229
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1230
+ secret?: string | null | undefined;
1231
+ } | null | undefined;
1232
+ } | {
1233
+ cookie: string;
1234
+ jwt?: {
1235
+ claim?: string | null | undefined;
1236
+ algorithm?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES256k" | "EdDSA" | "PS256" | "PS384" | "PS512" | null | undefined;
1237
+ secret?: string | null | undefined;
1238
+ } | null | undefined;
1239
+ } | null | undefined;
1240
+ graphiql?: {
1241
+ enabled: boolean;
1242
+ title?: string | undefined;
1243
+ } | null | undefined;
1244
+ persistedOperations?: {
1245
+ apq?: boolean | null | undefined;
1246
+ sendHashToOrigin?: boolean | null | undefined;
1247
+ rejectInvalidHashes?: boolean | null | undefined;
1248
+ } | null | undefined;
1249
+ requestSigning?: {
1250
+ secret?: string | null | undefined;
1251
+ } | null | undefined;
1252
+ getConsumerIdentifiers?: string | ((...args: unknown[]) => unknown) | null | undefined;
1253
+ rateLimit?: {
1254
+ name: string;
1255
+ limit: {
1256
+ type: "QueryComplexity";
1257
+ budget: number;
1258
+ window: string | {
1259
+ value: number;
1260
+ unit: "seconds" | "minutes" | "hours";
1261
+ };
1262
+ warning?: number | undefined;
1263
+ } | {
1264
+ type: "RequestCount";
1265
+ budget: number;
1266
+ window: string | {
1267
+ value: number;
1268
+ unit: "seconds" | "minutes" | "hours";
1269
+ };
1270
+ warning?: number | undefined;
1271
+ };
1272
+ description?: string | undefined;
1273
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1274
+ consumerIdentifier?: string | undefined;
1275
+ allowList?: string[] | undefined;
1276
+ } | null | undefined;
1277
+ rateLimits?: string | ((...args: unknown[]) => unknown) | {
1278
+ name: string;
1279
+ limit: {
1280
+ type: "QueryComplexity";
1281
+ budget: number;
1282
+ window: string | {
1283
+ value: number;
1284
+ unit: "seconds" | "minutes" | "hours";
1285
+ };
1286
+ warning?: number | undefined;
1287
+ } | {
1288
+ type: "RequestCount";
1289
+ budget: number;
1290
+ window: string | {
1291
+ value: number;
1292
+ unit: "seconds" | "minutes" | "hours";
1293
+ };
1294
+ warning?: number | undefined;
1295
+ };
1296
+ groupBy: "ip" | {
1297
+ header: string;
1298
+ } | {
1299
+ cookie: string;
1300
+ } | {
1301
+ jwt: string;
1302
+ } | {
1303
+ consumerIdentifier: string;
1304
+ };
1305
+ description?: string | undefined;
1306
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1307
+ allowList?: string[] | undefined;
1308
+ }[] | null | undefined;
1309
+ complexity?: {
1310
+ listSizeArguments?: string[] | undefined;
1311
+ maxComplexity?: number | undefined;
1312
+ } | null | undefined;
1313
+ schemaView?: {
1314
+ include: string[];
1315
+ exclude: string[];
1316
+ } | null | undefined;
1317
+ security?: {
1318
+ requestSize?: {
1319
+ enabled: boolean;
1320
+ maxBytes: number;
1321
+ } | null | undefined;
1322
+ directives?: {
1323
+ enabled: boolean;
1324
+ max: number;
1325
+ } | null | undefined;
1326
+ depth?: {
1327
+ enabled: boolean;
1328
+ max: number;
1329
+ } | null | undefined;
1330
+ aliases?: {
1331
+ enabled: boolean;
1332
+ max: number;
1333
+ } | null | undefined;
1334
+ suggestionsInErrors?: {
1335
+ enabled: boolean;
1336
+ mode: "mask";
1337
+ } | null | undefined;
1338
+ } | null | undefined;
1339
+ removeCookies?: string[] | null | undefined;
1340
+ variableLogging?: {
1341
+ enabled: boolean;
1342
+ } | null | undefined;
1343
+ }>;
1344
+ type Input$1 = Readonly<z.infer<typeof inputSchema>>;
1345
+
1346
+ declare const environmentsSchema: z__default.ZodRecord<z__default.ZodString, z__default.ZodObject<{
1347
+ readonly app: z__default.ZodOptional<z__default.ZodString>;
1348
+ readonly name: z__default.ZodOptional<z__default.ZodString>;
1349
+ readonly schema: z__default.ZodOptional<z__default.ZodString>;
1350
+ readonly originUrl: z__default.ZodOptional<z__default.ZodString>;
1351
+ readonly enablePlayground: z__default.ZodOptional<z__default.ZodBoolean>;
1352
+ readonly devPortal: z__default.ZodNullable<z__default.ZodOptional<z__default.ZodObject<{
1353
+ enabled: z__default.ZodBoolean;
1354
+ title: z__default.ZodOptional<z__default.ZodString>;
1355
+ readme: z__default.ZodOptional<z__default.ZodString>;
1356
+ description: z__default.ZodOptional<z__default.ZodString>;
1357
+ urls: z__default.ZodOptional<z__default.ZodObject<{
1358
+ privacy: z__default.ZodOptional<z__default.ZodString>;
1359
+ terms: z__default.ZodOptional<z__default.ZodString>;
1360
+ website: z__default.ZodOptional<z__default.ZodString>;
1361
+ logo: z__default.ZodOptional<z__default.ZodString>;
1362
+ favicon: z__default.ZodOptional<z__default.ZodString>;
1363
+ support: z__default.ZodOptional<z__default.ZodUnion<[z__default.ZodString, z__default.ZodEffects<z__default.ZodString, string, string>]>>;
1364
+ }, "strip", z__default.ZodTypeAny, {
1365
+ privacy?: string | undefined;
1366
+ terms?: string | undefined;
1367
+ website?: string | undefined;
1368
+ logo?: string | undefined;
1369
+ favicon?: string | undefined;
1370
+ support?: string | undefined;
1371
+ }, {
1372
+ privacy?: string | undefined;
1373
+ terms?: string | undefined;
1374
+ website?: string | undefined;
1375
+ logo?: string | undefined;
1376
+ favicon?: string | undefined;
1377
+ support?: string | undefined;
1378
+ }>>;
1379
+ brandColor: z__default.ZodOptional<z__default.ZodString>;
1380
+ auth: z__default.ZodOptional<z__default.ZodBoolean>;
1381
+ }, "strip", z__default.ZodTypeAny, {
1382
+ enabled: boolean;
1383
+ title?: string | undefined;
1384
+ readme?: string | undefined;
1385
+ description?: string | undefined;
1386
+ urls?: {
1387
+ privacy?: string | undefined;
1388
+ terms?: string | undefined;
1389
+ website?: string | undefined;
1390
+ logo?: string | undefined;
1391
+ favicon?: string | undefined;
1392
+ support?: string | undefined;
1393
+ } | undefined;
1394
+ brandColor?: string | undefined;
1395
+ auth?: boolean | undefined;
1396
+ }, {
1397
+ enabled: boolean;
1398
+ title?: string | undefined;
1399
+ readme?: string | undefined;
1400
+ description?: string | undefined;
1401
+ urls?: {
1402
+ privacy?: string | undefined;
1403
+ terms?: string | undefined;
1404
+ website?: string | undefined;
1405
+ logo?: string | undefined;
1406
+ favicon?: string | undefined;
1407
+ support?: string | undefined;
1408
+ } | undefined;
1409
+ brandColor?: string | undefined;
1410
+ auth?: boolean | undefined;
1411
+ }>>>;
1412
+ readonly partialQueryCaching: z__default.ZodNullable<z__default.ZodOptional<z__default.ZodObject<{
1413
+ enabled: z__default.ZodBoolean;
1414
+ experimentalDeferSupport: z__default.ZodOptional<z__default.ZodBoolean>;
1415
+ }, "strip", z__default.ZodTypeAny, {
1416
+ enabled: boolean;
1417
+ experimentalDeferSupport?: boolean | undefined;
1418
+ }, {
1419
+ enabled: boolean;
1420
+ experimentalDeferSupport?: boolean | undefined;
1421
+ }>>>;
1422
+ readonly rateLimit: z__default.ZodNullable<z__default.ZodOptional<z__default.ZodObject<{
1423
+ name: z__default.ZodString;
1424
+ description: z__default.ZodOptional<z__default.ZodString>;
1425
+ state: z__default.ZodOptional<z__default.ZodEnum<["enabled", "disabled", "dryRun"]>>;
1426
+ consumerIdentifier: z__default.ZodOptional<z__default.ZodString>;
1427
+ allowList: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString, "many">>;
1428
+ limit: z__default.ZodUnion<[z__default.ZodObject<{
1429
+ type: z__default.ZodLiteral<"QueryComplexity">;
1430
+ budget: z__default.ZodNumber;
1431
+ warning: z__default.ZodOptional<z__default.ZodNumber>;
1432
+ window: z__default.ZodUnion<[z__default.ZodEffects<z__default.ZodString, string, string>, z__default.ZodObject<{
1433
+ value: z__default.ZodNumber;
1434
+ unit: z__default.ZodEnum<["seconds", "minutes", "hours"]>;
1435
+ }, "strict", z__default.ZodTypeAny, {
1436
+ value: number;
1437
+ unit: "seconds" | "minutes" | "hours";
1438
+ }, {
1439
+ value: number;
1440
+ unit: "seconds" | "minutes" | "hours";
1441
+ }>]>;
1442
+ }, "strict", z__default.ZodTypeAny, {
1443
+ type: "QueryComplexity";
1444
+ budget: number;
1445
+ window: string | {
1446
+ value: number;
1447
+ unit: "seconds" | "minutes" | "hours";
1448
+ };
1449
+ warning?: number | undefined;
1450
+ }, {
1451
+ type: "QueryComplexity";
1452
+ budget: number;
1453
+ window: string | {
1454
+ value: number;
1455
+ unit: "seconds" | "minutes" | "hours";
1456
+ };
1457
+ warning?: number | undefined;
1458
+ }>, z__default.ZodObject<{
1459
+ type: z__default.ZodLiteral<"RequestCount">;
1460
+ budget: z__default.ZodNumber;
1461
+ warning: z__default.ZodOptional<z__default.ZodNumber>;
1462
+ window: z__default.ZodUnion<[z__default.ZodEffects<z__default.ZodString, string, string>, z__default.ZodObject<{
1463
+ value: z__default.ZodNumber;
1464
+ unit: z__default.ZodEnum<["seconds", "minutes", "hours"]>;
1465
+ }, "strict", z__default.ZodTypeAny, {
1466
+ value: number;
1467
+ unit: "seconds" | "minutes" | "hours";
1468
+ }, {
1469
+ value: number;
1470
+ unit: "seconds" | "minutes" | "hours";
1471
+ }>]>;
1472
+ }, "strict", z__default.ZodTypeAny, {
1473
+ type: "RequestCount";
1474
+ budget: number;
1475
+ window: string | {
1476
+ value: number;
1477
+ unit: "seconds" | "minutes" | "hours";
1478
+ };
1479
+ warning?: number | undefined;
1480
+ }, {
1481
+ type: "RequestCount";
1482
+ budget: number;
1483
+ window: string | {
1484
+ value: number;
1485
+ unit: "seconds" | "minutes" | "hours";
1486
+ };
1487
+ warning?: number | undefined;
1488
+ }>]>;
1489
+ }, "strict", z__default.ZodTypeAny, {
1490
+ name: string;
1491
+ limit: {
1492
+ type: "QueryComplexity";
1493
+ budget: number;
1494
+ window: string | {
1495
+ value: number;
1496
+ unit: "seconds" | "minutes" | "hours";
1497
+ };
1498
+ warning?: number | undefined;
1499
+ } | {
1500
+ type: "RequestCount";
1501
+ budget: number;
1502
+ window: string | {
1503
+ value: number;
1504
+ unit: "seconds" | "minutes" | "hours";
1505
+ };
1506
+ warning?: number | undefined;
1507
+ };
1508
+ description?: string | undefined;
1509
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1510
+ consumerIdentifier?: string | undefined;
1511
+ allowList?: string[] | undefined;
1512
+ }, {
1513
+ name: string;
1514
+ limit: {
1515
+ type: "QueryComplexity";
1516
+ budget: number;
1517
+ window: string | {
1518
+ value: number;
1519
+ unit: "seconds" | "minutes" | "hours";
1520
+ };
1521
+ warning?: number | undefined;
1522
+ } | {
1523
+ type: "RequestCount";
1524
+ budget: number;
1525
+ window: string | {
1526
+ value: number;
1527
+ unit: "seconds" | "minutes" | "hours";
1528
+ };
1529
+ warning?: number | undefined;
1530
+ };
1531
+ description?: string | undefined;
1532
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1533
+ consumerIdentifier?: string | undefined;
1534
+ allowList?: string[] | undefined;
1535
+ }>>>;
1536
+ readonly complexity: z__default.ZodNullable<z__default.ZodOptional<z__default.ZodObject<{
1537
+ listSizeArguments: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString, "many">>;
1538
+ maxComplexity: z__default.ZodOptional<z__default.ZodNumber>;
1539
+ }, "strict", z__default.ZodTypeAny, {
1540
+ listSizeArguments?: string[] | undefined;
1541
+ maxComplexity?: number | undefined;
1542
+ }, {
1543
+ listSizeArguments?: string[] | undefined;
1544
+ maxComplexity?: number | undefined;
1545
+ }>>>;
1546
+ readonly rateLimits: z__default.ZodNullable<z__default.ZodOptional<z__default.ZodUnion<[z__default.ZodArray<z__default.ZodOptional<z__default.ZodNullable<z__default.ZodObject<{
1547
+ name: z__default.ZodString;
1548
+ description: z__default.ZodOptional<z__default.ZodString>;
1549
+ state: z__default.ZodOptional<z__default.ZodEnum<["enabled", "disabled", "dryRun"]>>;
1550
+ groupBy: z__default.ZodUnion<[z__default.ZodLiteral<"ip">, z__default.ZodObject<{
1551
+ header: z__default.ZodString;
1552
+ }, "strip", z__default.ZodTypeAny, {
1553
+ header: string;
1554
+ }, {
1555
+ header: string;
1556
+ }>, z__default.ZodObject<{
1557
+ cookie: z__default.ZodString;
1558
+ }, "strip", z__default.ZodTypeAny, {
1559
+ cookie: string;
1560
+ }, {
1561
+ cookie: string;
1562
+ }>, z__default.ZodObject<{
1563
+ jwt: z__default.ZodString;
1564
+ }, "strip", z__default.ZodTypeAny, {
1565
+ jwt: string;
1566
+ }, {
1567
+ jwt: string;
1568
+ }>, z__default.ZodObject<{
1569
+ consumerIdentifier: z__default.ZodString;
1570
+ }, "strip", z__default.ZodTypeAny, {
1571
+ consumerIdentifier: string;
1572
+ }, {
1573
+ consumerIdentifier: string;
1574
+ }>]>;
1575
+ allowList: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString, "many">>;
1576
+ limit: z__default.ZodUnion<[z__default.ZodObject<{
1577
+ type: z__default.ZodLiteral<"QueryComplexity">;
1578
+ budget: z__default.ZodNumber;
1579
+ warning: z__default.ZodOptional<z__default.ZodNumber>;
1580
+ window: z__default.ZodUnion<[z__default.ZodEffects<z__default.ZodString, string, string>, z__default.ZodObject<{
1581
+ value: z__default.ZodNumber;
1582
+ unit: z__default.ZodEnum<["seconds", "minutes", "hours"]>;
1583
+ }, "strict", z__default.ZodTypeAny, {
1584
+ value: number;
1585
+ unit: "seconds" | "minutes" | "hours";
1586
+ }, {
1587
+ value: number;
1588
+ unit: "seconds" | "minutes" | "hours";
1589
+ }>]>;
1590
+ }, "strict", z__default.ZodTypeAny, {
1591
+ type: "QueryComplexity";
1592
+ budget: number;
1593
+ window: string | {
1594
+ value: number;
1595
+ unit: "seconds" | "minutes" | "hours";
1596
+ };
1597
+ warning?: number | undefined;
1598
+ }, {
1599
+ type: "QueryComplexity";
1600
+ budget: number;
1601
+ window: string | {
1602
+ value: number;
1603
+ unit: "seconds" | "minutes" | "hours";
1604
+ };
1605
+ warning?: number | undefined;
1606
+ }>, z__default.ZodObject<{
1607
+ type: z__default.ZodLiteral<"RequestCount">;
1608
+ budget: z__default.ZodNumber;
1609
+ warning: z__default.ZodOptional<z__default.ZodNumber>;
1610
+ window: z__default.ZodUnion<[z__default.ZodEffects<z__default.ZodString, string, string>, z__default.ZodObject<{
1611
+ value: z__default.ZodNumber;
1612
+ unit: z__default.ZodEnum<["seconds", "minutes", "hours"]>;
1613
+ }, "strict", z__default.ZodTypeAny, {
1614
+ value: number;
1615
+ unit: "seconds" | "minutes" | "hours";
1616
+ }, {
1617
+ value: number;
1618
+ unit: "seconds" | "minutes" | "hours";
1619
+ }>]>;
1620
+ }, "strict", z__default.ZodTypeAny, {
1621
+ type: "RequestCount";
1622
+ budget: number;
1623
+ window: string | {
1624
+ value: number;
1625
+ unit: "seconds" | "minutes" | "hours";
1626
+ };
1627
+ warning?: number | undefined;
1628
+ }, {
1629
+ type: "RequestCount";
1630
+ budget: number;
1631
+ window: string | {
1632
+ value: number;
1633
+ unit: "seconds" | "minutes" | "hours";
1634
+ };
1635
+ warning?: number | undefined;
1636
+ }>]>;
1637
+ }, "strict", z__default.ZodTypeAny, {
1638
+ name: string;
1639
+ limit: {
1640
+ type: "QueryComplexity";
1641
+ budget: number;
1642
+ window: string | {
1643
+ value: number;
1644
+ unit: "seconds" | "minutes" | "hours";
1645
+ };
1646
+ warning?: number | undefined;
1647
+ } | {
1648
+ type: "RequestCount";
1649
+ budget: number;
1650
+ window: string | {
1651
+ value: number;
1652
+ unit: "seconds" | "minutes" | "hours";
1653
+ };
1654
+ warning?: number | undefined;
1655
+ };
1656
+ groupBy: "ip" | {
1657
+ header: string;
1658
+ } | {
1659
+ cookie: string;
1660
+ } | {
1661
+ jwt: string;
1662
+ } | {
1663
+ consumerIdentifier: string;
1664
+ };
1665
+ description?: string | undefined;
1666
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1667
+ allowList?: string[] | undefined;
1668
+ }, {
1669
+ name: string;
1670
+ limit: {
1671
+ type: "QueryComplexity";
1672
+ budget: number;
1673
+ window: string | {
1674
+ value: number;
1675
+ unit: "seconds" | "minutes" | "hours";
1676
+ };
1677
+ warning?: number | undefined;
1678
+ } | {
1679
+ type: "RequestCount";
1680
+ budget: number;
1681
+ window: string | {
1682
+ value: number;
1683
+ unit: "seconds" | "minutes" | "hours";
1684
+ };
1685
+ warning?: number | undefined;
1686
+ };
1687
+ groupBy: "ip" | {
1688
+ header: string;
1689
+ } | {
1690
+ cookie: string;
1691
+ } | {
1692
+ jwt: string;
1693
+ } | {
1694
+ consumerIdentifier: string;
1695
+ };
1696
+ description?: string | undefined;
1697
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1698
+ allowList?: string[] | undefined;
1699
+ }>>>, "many">, z__default.ZodUnion<[z__default.ZodFunction<z__default.ZodTuple<[], z__default.ZodUnknown>, z__default.ZodUnknown>, z__default.ZodString]>]>>>;
1700
+ }, "strip", z__default.ZodTypeAny, {
1701
+ app?: string | undefined;
1702
+ name?: string | undefined;
1703
+ originUrl?: string | undefined;
1704
+ schema?: string | undefined;
1705
+ devPortal?: {
1706
+ enabled: boolean;
1707
+ title?: string | undefined;
1708
+ readme?: string | undefined;
1709
+ description?: string | undefined;
1710
+ urls?: {
1711
+ privacy?: string | undefined;
1712
+ terms?: string | undefined;
1713
+ website?: string | undefined;
1714
+ logo?: string | undefined;
1715
+ favicon?: string | undefined;
1716
+ support?: string | undefined;
1717
+ } | undefined;
1718
+ brandColor?: string | undefined;
1719
+ auth?: boolean | undefined;
1720
+ } | null | undefined;
1721
+ partialQueryCaching?: {
1722
+ enabled: boolean;
1723
+ experimentalDeferSupport?: boolean | undefined;
1724
+ } | null | undefined;
1725
+ enablePlayground?: boolean | undefined;
1726
+ rateLimit?: {
1727
+ name: string;
1728
+ limit: {
1729
+ type: "QueryComplexity";
1730
+ budget: number;
1731
+ window: string | {
1732
+ value: number;
1733
+ unit: "seconds" | "minutes" | "hours";
1734
+ };
1735
+ warning?: number | undefined;
1736
+ } | {
1737
+ type: "RequestCount";
1738
+ budget: number;
1739
+ window: string | {
1740
+ value: number;
1741
+ unit: "seconds" | "minutes" | "hours";
1742
+ };
1743
+ warning?: number | undefined;
1744
+ };
1745
+ description?: string | undefined;
1746
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1747
+ consumerIdentifier?: string | undefined;
1748
+ allowList?: string[] | undefined;
1749
+ } | null | undefined;
1750
+ rateLimits?: string | ((...args: unknown[]) => unknown) | ({
1751
+ name: string;
1752
+ limit: {
1753
+ type: "QueryComplexity";
1754
+ budget: number;
1755
+ window: string | {
1756
+ value: number;
1757
+ unit: "seconds" | "minutes" | "hours";
1758
+ };
1759
+ warning?: number | undefined;
1760
+ } | {
1761
+ type: "RequestCount";
1762
+ budget: number;
1763
+ window: string | {
1764
+ value: number;
1765
+ unit: "seconds" | "minutes" | "hours";
1766
+ };
1767
+ warning?: number | undefined;
1768
+ };
1769
+ groupBy: "ip" | {
1770
+ header: string;
1771
+ } | {
1772
+ cookie: string;
1773
+ } | {
1774
+ jwt: string;
1775
+ } | {
1776
+ consumerIdentifier: string;
1777
+ };
1778
+ description?: string | undefined;
1779
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1780
+ allowList?: string[] | undefined;
1781
+ } | null | undefined)[] | null | undefined;
1782
+ complexity?: {
1783
+ listSizeArguments?: string[] | undefined;
1784
+ maxComplexity?: number | undefined;
1785
+ } | null | undefined;
1786
+ }, {
1787
+ app?: string | undefined;
1788
+ name?: string | undefined;
1789
+ originUrl?: string | undefined;
1790
+ schema?: string | undefined;
1791
+ devPortal?: {
1792
+ enabled: boolean;
1793
+ title?: string | undefined;
1794
+ readme?: string | undefined;
1795
+ description?: string | undefined;
1796
+ urls?: {
1797
+ privacy?: string | undefined;
1798
+ terms?: string | undefined;
1799
+ website?: string | undefined;
1800
+ logo?: string | undefined;
1801
+ favicon?: string | undefined;
1802
+ support?: string | undefined;
1803
+ } | undefined;
1804
+ brandColor?: string | undefined;
1805
+ auth?: boolean | undefined;
1806
+ } | null | undefined;
1807
+ partialQueryCaching?: {
1808
+ enabled: boolean;
1809
+ experimentalDeferSupport?: boolean | undefined;
1810
+ } | null | undefined;
1811
+ enablePlayground?: boolean | undefined;
1812
+ rateLimit?: {
1813
+ name: string;
1814
+ limit: {
1815
+ type: "QueryComplexity";
1816
+ budget: number;
1817
+ window: string | {
1818
+ value: number;
1819
+ unit: "seconds" | "minutes" | "hours";
1820
+ };
1821
+ warning?: number | undefined;
1822
+ } | {
1823
+ type: "RequestCount";
1824
+ budget: number;
1825
+ window: string | {
1826
+ value: number;
1827
+ unit: "seconds" | "minutes" | "hours";
1828
+ };
1829
+ warning?: number | undefined;
1830
+ };
1831
+ description?: string | undefined;
1832
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1833
+ consumerIdentifier?: string | undefined;
1834
+ allowList?: string[] | undefined;
1835
+ } | null | undefined;
1836
+ rateLimits?: string | ((...args: unknown[]) => unknown) | ({
1837
+ name: string;
1838
+ limit: {
1839
+ type: "QueryComplexity";
1840
+ budget: number;
1841
+ window: string | {
1842
+ value: number;
1843
+ unit: "seconds" | "minutes" | "hours";
1844
+ };
1845
+ warning?: number | undefined;
1846
+ } | {
1847
+ type: "RequestCount";
1848
+ budget: number;
1849
+ window: string | {
1850
+ value: number;
1851
+ unit: "seconds" | "minutes" | "hours";
1852
+ };
1853
+ warning?: number | undefined;
1854
+ };
1855
+ groupBy: "ip" | {
1856
+ header: string;
1857
+ } | {
1858
+ cookie: string;
1859
+ } | {
1860
+ jwt: string;
1861
+ } | {
1862
+ consumerIdentifier: string;
1863
+ };
1864
+ description?: string | undefined;
1865
+ state?: "enabled" | "disabled" | "dryRun" | undefined;
1866
+ allowList?: string[] | undefined;
1867
+ } | null | undefined)[] | null | undefined;
1868
+ complexity?: {
1869
+ listSizeArguments?: string[] | undefined;
1870
+ maxComplexity?: number | undefined;
1871
+ } | null | undefined;
1872
+ }>>;
1873
+ type Environments = z__default.infer<typeof environmentsSchema>;
1874
+
1875
+ type Input = Readonly<Omit<Input$1, keyof RateLimitConfig> & RateLimitConfig>;
1876
+ type Config = {
1877
+ config: Input & {
1878
+ name: string;
1879
+ originUrl: string;
1880
+ schema?: string;
1881
+ environments?: Environments;
1882
+ };
1883
+ };
1884
+ declare const createConfig: (input: Partial<Input>) => Input;
1885
+
1886
+ export { type ComplexityConfig, type ComplexityLimit, type Config, type ConfigFunction, type EdgeRequest, type Input, type RateLimitConfig, type RateLimitRule, type RateLimitRules, type RequestLimit, type ScopeContext, type ScopeFunctionDefinition, type TimeWindow, createConfig as default };