@zuplo/runtime 5.1952.0 → 5.1956.0

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.
package/types-public.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { KeyLike } from "jose";
2
- import type { OpenAPIV3_1 } from "openapi-types";
3
- import type { ValidateFunction as ValidateFunction_2 } from "ajv";
1
+ import { KeyLike } from 'jose';
2
+ import type { OpenAPIV3_1 } from 'openapi-types';
3
+ import type { ValidateFunction as ValidateFunction_2 } from 'ajv';
4
4
 
5
5
  /**
6
6
  * Amberflo is a usage metering and billing service. This policy allows you to send metering calls for each API to their meter ingest endpoint.
@@ -21,71 +21,62 @@ import type { ValidateFunction as ValidateFunction_2 } from "ajv";
21
21
  * @param policyName - The name of the policy as set in policies.json
22
22
  * @returns A Request or a Response
23
23
  */
24
- export declare function AmberfloMeteringInboundPolicy(
25
- request: ZuploRequest,
26
- context: ZuploContext,
27
- options: AmberfloMeteringInboundPolicyOptions,
28
- policyName: string
29
- ): Promise<ZuploRequest<RequestGeneric>>;
24
+ export declare function AmberfloMeteringInboundPolicy(request: ZuploRequest, context: ZuploContext, options: AmberfloMeteringInboundPolicyOptions, policyName: string): Promise<ZuploRequest<RequestGeneric>>;
30
25
 
31
26
  /**
32
27
  * The options for this policy. Many of them can be overridden at the code level in a request using the `AmberfloMeteringPolicy.setRequestProperties` method.
33
28
  */
34
29
  export declare interface AmberfloMeteringInboundPolicyOptions {
35
- /**
36
- * The API key to use when sending metering calls to Amberflo.
37
- */
38
- apiKey: string;
39
- /**
40
- * The name of the meter to use when sending metering calls to Amberflo (overridable in code).
41
- */
42
- meterApiName?: string;
43
- /**
44
- * The value to use when sending metering calls to Amberflo (overridable in code).
45
- */
46
- meterValue?: number;
47
- /**
48
- * The path to the property on `request.user` contains the customer ID. For example `.data.accountNumber` would read the `request.user.data.accountNumber` property.
49
- */
50
- customerIdPropertyPath?: string;
51
- /**
52
- * The default customerId for all metering calls - overridable in code and by `customerIdPropertyPath`.
53
- */
54
- customerId?: string;
55
- /**
56
- * A dictionary of dimensions to be sent to Amberflo (extensible in code).
57
- */
58
- dimensions?: {
59
- [k: string]: string;
60
- };
61
- /**
62
- * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo.
63
- */
64
- statusCodes?: string | number[];
65
- /**
66
- * The URL to send metering events. This is useful for testing purposes.
67
- */
68
- url?: string;
30
+ /**
31
+ * The API key to use when sending metering calls to Amberflo.
32
+ */
33
+ apiKey: string;
34
+ /**
35
+ * The name of the meter to use when sending metering calls to Amberflo (overridable in code).
36
+ */
37
+ meterApiName?: string;
38
+ /**
39
+ * The value to use when sending metering calls to Amberflo (overridable in code).
40
+ */
41
+ meterValue?: number;
42
+ /**
43
+ * The path to the property on `request.user` contains the customer ID. For example `.data.accountNumber` would read the `request.user.data.accountNumber` property.
44
+ */
45
+ customerIdPropertyPath?: string;
46
+ /**
47
+ * The default customerId for all metering calls - overridable in code and by `customerIdPropertyPath`.
48
+ */
49
+ customerId?: string;
50
+ /**
51
+ * A dictionary of dimensions to be sent to Amberflo (extensible in code).
52
+ */
53
+ dimensions?: {
54
+ [k: string]: string;
55
+ };
56
+ /**
57
+ * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo.
58
+ */
59
+ statusCodes?: string | number[];
60
+ /**
61
+ * The URL to send metering events. This is useful for testing purposes.
62
+ */
63
+ url?: string;
69
64
  }
70
65
 
71
66
  declare interface AmberfloMeteringIngestPayload {
72
- customerId: string;
73
- meterApiName: string;
74
- meterValue: number;
75
- meterTimeInMillis: number;
76
- dimensions: Record<string, string>;
67
+ customerId: string;
68
+ meterApiName: string;
69
+ meterValue: number;
70
+ meterTimeInMillis: number;
71
+ dimensions: Record<string, string>;
77
72
  }
78
73
 
79
74
  export declare class AmberfloMeteringPolicy {
80
- static setRequestProperties(
81
- context: ZuploContext,
82
- properties: AmberfloMeteringProperties
83
- ): void;
75
+ static setRequestProperties(context: ZuploContext, properties: AmberfloMeteringProperties): void;
84
76
  }
85
77
 
86
- declare interface AmberfloMeteringProperties
87
- extends Omit<AmberfloMeteringIngestPayload, "meterTimeInMillis"> {
88
- customerId: string;
78
+ declare interface AmberfloMeteringProperties extends Omit<AmberfloMeteringIngestPayload, "meterTimeInMillis"> {
79
+ customerId: string;
89
80
  }
90
81
 
91
82
  /* Excluded from this release type: API_KEY */
@@ -121,10 +112,10 @@ export declare const ApiAuthKeyInboundPolicy: typeof ApiKeyInboundPolicy;
121
112
  * The options for this policy.
122
113
  */
123
114
  export declare interface ApiAuthKeyInboundPolicyOptions {
124
- /**
125
- * If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401.
126
- */
127
- allowUnauthenticatedRequests?: boolean;
115
+ /**
116
+ * If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401.
117
+ */
118
+ allowUnauthenticatedRequests?: boolean;
128
119
  }
129
120
 
130
121
  /**
@@ -150,104 +141,97 @@ export declare interface ApiAuthKeyInboundPolicyOptions {
150
141
  * @param policyName - The name of the policy as set in policies.json
151
142
  * @returns A Request or a Response
152
143
  */
153
- export declare function ApiKeyInboundPolicy(
154
- request: ZuploRequest,
155
- context: ZuploContext,
156
- unparsedOptions: ApiKeyInboundPolicyOptions,
157
- policyName: string
158
- ): Promise<ZuploRequest<RequestGeneric> | Response>;
144
+ export declare function ApiKeyInboundPolicy(request: ZuploRequest, context: ZuploContext, unparsedOptions: ApiKeyInboundPolicyOptions, policyName: string): Promise<Response | ZuploRequest<RequestGeneric>>;
159
145
 
160
146
  /**
161
147
  * The options for this policy.
162
148
  */
163
149
  export declare interface ApiKeyInboundPolicyOptions {
164
- /**
165
- * The name of the header with the key.
166
- */
167
- authHeader?: string;
168
- /**
169
- * The scheme used on the header.
170
- */
171
- authScheme?: string;
172
- /**
173
- * The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project.
174
- */
175
- bucketName?: string;
176
- /**
177
- * If requests should proceed even if the policy does not successfully authenticate the request. Defaults to false and rejects any request without a valid API key (returning a `401 - Unauthorized` response). Set to `true` to support multiple authentication methods or support both authenticated and anonymous requests.
178
- */
179
- allowUnauthenticatedRequests?: boolean;
180
- /**
181
- * The time to cache authentication results for a particular key. Higher values will decrease latency. Cached results will be valid until the cache expires even in the event the key is deleted, etc.
182
- */
183
- cacheTtlSeconds?: number;
184
- /**
185
- * Zuplo will automatically document your API key header within your OpenAPI specification & Developer Portal. Set this to `true` to disable this behavior.
186
- */
187
- disableAutomaticallyAddingKeyHeaderToOpenApi?: boolean;
150
+ /**
151
+ * The name of the header with the key.
152
+ */
153
+ authHeader?: string;
154
+ /**
155
+ * The scheme used on the header.
156
+ */
157
+ authScheme?: string;
158
+ /**
159
+ * The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project.
160
+ */
161
+ bucketName?: string;
162
+ /**
163
+ * If requests should proceed even if the policy does not successfully authenticate the request. Defaults to false and rejects any request without a valid API key (returning a `401 - Unauthorized` response). Set to `true` to support multiple authentication methods or support both authenticated and anonymous requests.
164
+ */
165
+ allowUnauthenticatedRequests?: boolean;
166
+ /**
167
+ * The time to cache authentication results for a particular key. Higher values will decrease latency. Cached results will be valid until the cache expires even in the event the key is deleted, etc.
168
+ */
169
+ cacheTtlSeconds?: number;
170
+ /**
171
+ * Zuplo will automatically document your API key header within your OpenAPI specification & Developer Portal. Set this to `true` to disable this behavior.
172
+ */
173
+ disableAutomaticallyAddingKeyHeaderToOpenApi?: boolean;
188
174
  }
189
175
 
190
176
  /* Excluded from this release type: ApiKeyValidationResult */
191
177
 
192
178
  export declare interface AuditLogDataStaxInit {
193
- url: string;
194
- xCassandraToken: string;
179
+ url: string;
180
+ xCassandraToken: string;
195
181
  }
196
182
 
197
- export declare class AuditLogDataStaxProvider
198
- implements AuditLogOutputProvider
199
- {
200
- #private;
201
- constructor(options: AuditLogDataStaxInit);
202
- writeLogBatch: (entries: AuditLogEntry[]) => Promise<void>;
183
+ export declare class AuditLogDataStaxProvider implements AuditLogOutputProvider {
184
+ #private;
185
+ constructor(options: AuditLogDataStaxInit);
186
+ writeLogBatch: (entries: AuditLogEntry[]) => Promise<void>;
203
187
  }
204
188
 
205
189
  declare interface AuditLogEntry {
206
- timestamp: Date;
207
- durationMs: number;
208
- routePath: string;
209
- requestId: string;
210
- userSub?: string;
211
- request: {
212
- url: string;
213
- method: HttpMethod;
214
- headers?: Record<string, string>;
215
- body?: string;
216
- };
217
- response: {
218
- status: number;
219
- statusText: string;
220
- headers?: Record<string, string>;
221
- body?: string;
222
- };
190
+ timestamp: Date;
191
+ durationMs: number;
192
+ routePath: string;
193
+ requestId: string;
194
+ userSub?: string;
195
+ request: {
196
+ url: string;
197
+ method: HttpMethod;
198
+ headers?: Record<string, string>;
199
+ body?: string;
200
+ };
201
+ response: {
202
+ status: number;
203
+ statusText: string;
204
+ headers?: Record<string, string>;
205
+ body?: string;
206
+ };
223
207
  }
224
208
 
225
209
  export declare interface AuditLogInit {
226
- requestFilter?: AuditLogRequestFilter;
227
- include?: {
228
- request?: {
229
- headers?: boolean;
230
- body?: boolean;
231
- };
232
- response?: {
233
- headers?: boolean;
234
- body?: boolean;
210
+ requestFilter?: AuditLogRequestFilter;
211
+ include?: {
212
+ request?: {
213
+ headers?: boolean;
214
+ body?: boolean;
215
+ };
216
+ response?: {
217
+ headers?: boolean;
218
+ body?: boolean;
219
+ };
235
220
  };
236
- };
237
221
  }
238
222
 
239
223
  declare interface AuditLogOutputProvider {
240
- writeLogBatch: (entries: AuditLogEntry[]) => Promise<void>;
224
+ writeLogBatch: (entries: AuditLogEntry[]) => Promise<void>;
241
225
  }
242
226
 
243
227
  export declare class AuditLogPlugin extends SystemRuntimePlugin {
244
- #private;
245
- constructor(outputProvider: AuditLogOutputProvider, init?: AuditLogInit);
246
- initialize(runtimeInit: RuntimeExtensions): Promise<void>;
228
+ #private;
229
+ constructor(outputProvider: AuditLogOutputProvider, init?: AuditLogInit);
230
+ initialize(runtimeInit: RuntimeExtensions): Promise<void>;
247
231
  }
248
232
 
249
233
  declare interface AuditLogRequestFilter {
250
- (request: ZuploRequest, context: ZuploContext): Promise<boolean>;
234
+ (request: ZuploRequest, context: ZuploContext): Promise<boolean>;
251
235
  }
252
236
 
253
237
  /**
@@ -272,164 +256,161 @@ export declare const Auth0JwtInboundPolicy: InboundPolicyHandler<Auth0JwtInbound
272
256
  * The options for this policy.
273
257
  */
274
258
  export declare interface Auth0JwtInboundPolicyOptions {
275
- /**
276
- * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
277
- */
278
- allowUnauthenticatedRequests?: boolean;
279
- /**
280
- * Your Auth0 domain. For example, `my-company.auth0.com`.
281
- */
282
- auth0Domain: string;
283
- /**
284
- * The Auth0 audience of your API, for example `https://api.example.com/`.
285
- */
286
- audience?: string;
259
+ /**
260
+ * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
261
+ */
262
+ allowUnauthenticatedRequests?: boolean;
263
+ /**
264
+ * Your Auth0 domain. For example, `my-company.auth0.com`.
265
+ */
266
+ auth0Domain: string;
267
+ /**
268
+ * The Auth0 audience of your API, for example `https://api.example.com/`.
269
+ */
270
+ audience?: string;
287
271
  }
288
272
 
289
273
  declare interface AwsLambdaEventV1 {
290
- [key: string]: string | null | undefined | number | boolean | object;
291
- version: "1.0";
292
- resource: string;
293
- path: string;
294
- httpMethod: string;
295
- headers: Record<string, string>;
296
- multiValueHeaders: Record<string, string[]>;
297
- queryStringParameters: Record<string, string>;
298
- multiValueQueryStringParameters: Record<string, string[]>;
299
- requestContext: {
300
- accountId: string | null;
301
- apiId: string | null;
302
- authorizer: {
303
- claims: Record<string, string>;
304
- scopes: string[];
305
- };
306
- domainName: string;
307
- domainPrefix: string | null;
308
- extendedRequestId: string;
274
+ [key: string]: string | null | undefined | number | boolean | object;
275
+ version: "1.0";
276
+ resource: string;
277
+ path: string;
309
278
  httpMethod: string;
310
- identity: {
311
- accessKey: null | string;
312
- accountId: null | string;
313
- caller: null | string;
314
- cognitoAuthenticationProvider: null | string;
315
- cognitoAuthenticationType: null | string;
316
- cognitoIdentityId: null | string;
317
- cognitoIdentityPoolId: null | string;
318
- principalOrgId: null | string;
319
- sourceIp: string | null;
320
- user: null | string;
321
- userAgent: string | null;
322
- userArn: null | string;
323
- clientCert: {
324
- clientCertPem: null | string;
325
- subjectDN: null | string;
326
- issuerDN: null | string;
327
- serialNumber: null | string;
328
- validity: {
329
- notBefore: null | string;
330
- notAfter: null | string;
279
+ headers: Record<string, string>;
280
+ multiValueHeaders: Record<string, string[]>;
281
+ queryStringParameters: Record<string, string>;
282
+ multiValueQueryStringParameters: Record<string, string[]>;
283
+ requestContext: {
284
+ accountId: string | null;
285
+ apiId: string | null;
286
+ authorizer: {
287
+ claims: Record<string, string>;
288
+ scopes: string[];
331
289
  };
332
- };
290
+ domainName: string;
291
+ domainPrefix: string | null;
292
+ extendedRequestId: string;
293
+ httpMethod: string;
294
+ identity: {
295
+ accessKey: null | string;
296
+ accountId: null | string;
297
+ caller: null | string;
298
+ cognitoAuthenticationProvider: null | string;
299
+ cognitoAuthenticationType: null | string;
300
+ cognitoIdentityId: null | string;
301
+ cognitoIdentityPoolId: null | string;
302
+ principalOrgId: null | string;
303
+ sourceIp: string | null;
304
+ user: null | string;
305
+ userAgent: string | null;
306
+ userArn: null | string;
307
+ clientCert: {
308
+ clientCertPem: null | string;
309
+ subjectDN: null | string;
310
+ issuerDN: null | string;
311
+ serialNumber: null | string;
312
+ validity: {
313
+ notBefore: null | string;
314
+ notAfter: null | string;
315
+ };
316
+ };
317
+ };
318
+ path: string;
319
+ protocol: string;
320
+ requestId: string;
321
+ requestTime: string;
322
+ requestTimeEpoch: number;
323
+ resourceId: string | null;
324
+ resourcePath: string;
325
+ stage: null | string;
333
326
  };
334
- path: string;
335
- protocol: string;
336
- requestId: string;
337
- requestTime: string;
338
- requestTimeEpoch: number;
339
- resourceId: string | null;
340
- resourcePath: string;
341
- stage: null | string;
342
- };
343
- pathParameters: Record<string, string>;
344
- stageVariables: null | Record<string, string>;
327
+ pathParameters: Record<string, string>;
328
+ stageVariables: null | Record<string, string>;
345
329
  }
346
330
 
347
331
  declare interface AwsLambdaEventV2 {
348
- [key: string]: string | null | undefined | number | boolean | object;
349
- version: "2.0";
350
- routeKey: string | null;
351
- rawPath: string;
352
- rawQueryString: string;
353
- cookies: string[];
354
- headers: Record<string, string>;
355
- queryStringParameters: Record<string, string>;
356
- requestContext: {
357
- accountId: string | null;
358
- apiId: string | null;
359
- authentication: {
360
- clientCert: {
361
- clientCertPem: string | null;
362
- subjectDN: string | null;
363
- issuerDN: string | null;
364
- serialNumber: string | null;
365
- validity: {
366
- notBefore: string | null;
367
- notAfter: string | null;
332
+ [key: string]: string | null | undefined | number | boolean | object;
333
+ version: "2.0";
334
+ routeKey: string | null;
335
+ rawPath: string;
336
+ rawQueryString: string;
337
+ cookies: string[];
338
+ headers: Record<string, string>;
339
+ queryStringParameters: Record<string, string>;
340
+ requestContext: {
341
+ accountId: string | null;
342
+ apiId: string | null;
343
+ authentication: {
344
+ clientCert: {
345
+ clientCertPem: string | null;
346
+ subjectDN: string | null;
347
+ issuerDN: string | null;
348
+ serialNumber: string | null;
349
+ validity: {
350
+ notBefore: string | null;
351
+ notAfter: string | null;
352
+ };
353
+ };
368
354
  };
369
- };
370
- };
371
- authorizer: {
372
- jwt: {
373
- claims: Record<string, string>;
374
- scopes: string[];
375
- };
376
- };
377
- domainName: string | null;
378
- domainPrefix: string | null;
379
- http: {
380
- method: string;
381
- path: string;
382
- protocol: string;
383
- sourceIp: string | null;
384
- userAgent: string | null;
355
+ authorizer: {
356
+ jwt: {
357
+ claims: Record<string, string>;
358
+ scopes: string[];
359
+ };
360
+ };
361
+ domainName: string | null;
362
+ domainPrefix: string | null;
363
+ http: {
364
+ method: string;
365
+ path: string;
366
+ protocol: string;
367
+ sourceIp: string | null;
368
+ userAgent: string | null;
369
+ };
370
+ requestId: string;
371
+ routeKey: string | null;
372
+ stage: null;
373
+ time: string;
374
+ timeEpoch: number;
385
375
  };
386
- requestId: string;
387
- routeKey: string | null;
388
- stage: null;
389
- time: string;
390
- timeEpoch: number;
391
- };
392
- pathParameters: Record<string, string>;
393
- stageVariables: string | null;
376
+ pathParameters: Record<string, string>;
377
+ stageVariables: string | null;
394
378
  }
395
379
 
396
380
  /* Excluded from this release type: awsLambdaHandler */
397
381
 
398
382
  export declare const AwsLambdaHandlerExtensions: {
399
- addSendingAwsLambdaEventHook: (hook: OnSendingAwsLambdaEventHook) => void;
383
+ addSendingAwsLambdaEventHook: (hook: OnSendingAwsLambdaEventHook) => void;
400
384
  };
401
385
 
402
386
  declare interface AWSLoggingOptions {
403
- region: string;
404
- accessKeyId: string;
405
- secretAccessKey: string;
406
- logGroupName: string;
407
- logStreamName: string;
387
+ region: string;
388
+ accessKeyId: string;
389
+ secretAccessKey: string;
390
+ logGroupName: string;
391
+ logStreamName: string;
408
392
  }
409
393
 
410
394
  export declare class AWSLoggingPlugin extends LogPlugin {
411
- private options;
412
- constructor(options: AWSLoggingOptions);
413
- getTransport(): LogTransport;
395
+ private options;
396
+ constructor(options: AWSLoggingOptions);
397
+ getTransport(): LogTransport;
414
398
  }
415
399
 
416
400
  export declare class BackgroundDispatcher<TPayload> {
417
- #private;
418
- constructor(
419
- dispatcher: DispatchFunction<TPayload>,
420
- options: BatchDispatcherOptions
421
- );
422
- enqueue: (payload: TPayload) => void;
401
+ #private;
402
+ constructor(dispatcher: DispatchFunction<TPayload>, options: BatchDispatcherOptions);
403
+ enqueue: (payload: TPayload) => void;
423
404
  }
424
405
 
425
406
  export declare class BackgroundLoader<T = unknown> {
426
- #private;
427
- constructor(loader: BackgroundLoaderFunction<T>, ttlSeconds: number);
428
- get(key: string): Promise<T>;
407
+ #private;
408
+ constructor(loader: BackgroundLoaderFunction<T>, ttlSeconds: number);
409
+ get(key: string): Promise<T>;
429
410
  }
430
411
 
431
412
  declare interface BackgroundLoaderFunction<T> {
432
- (key: string): Promise<T>;
413
+ (key: string): Promise<T>;
433
414
  }
434
415
 
435
416
  /* Excluded from this release type: BaseCryptoBeta */
@@ -440,20 +421,20 @@ declare interface BackgroundLoaderFunction<T> {
440
421
  * An account object.
441
422
  */
442
423
  declare interface BasicAuthAccount {
443
- /**
444
- * The username for the account (this will be the `sub` property on `request.user`.
445
- */
446
- username: string;
447
- /**
448
- * The password for the account - note we recommend storing this in environment variables.
449
- */
450
- password: string;
451
- /**
452
- * The data payload you want associated with this account (this will be the `data` property on `request.user`).
453
- */
454
- data?: {
455
- [k: string]: unknown;
456
- };
424
+ /**
425
+ * The username for the account (this will be the `sub` property on `request.user`.
426
+ */
427
+ username: string;
428
+ /**
429
+ * The password for the account - note we recommend storing this in environment variables.
430
+ */
431
+ password: string;
432
+ /**
433
+ * The data payload you want associated with this account (this will be the `data` property on `request.user`).
434
+ */
435
+ data?: {
436
+ [k: string]: unknown;
437
+ };
457
438
  }
458
439
 
459
440
  /**
@@ -484,63 +465,63 @@ export declare const BasicAuthInboundPolicy: InboundPolicyHandler<BasicAuthInbou
484
465
  * The options for this policy.
485
466
  */
486
467
  export declare interface BasicAuthInboundPolicyOptions {
487
- /**
488
- * An array of account objects (username, password and data properties).
489
- */
490
- accounts: BasicAuthAccount[];
491
- /**
492
- * If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401.
493
- */
494
- allowUnauthenticatedRequests?: boolean;
468
+ /**
469
+ * An array of account objects (username, password and data properties).
470
+ */
471
+ accounts: BasicAuthAccount[];
472
+ /**
473
+ * If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401.
474
+ */
475
+ allowUnauthenticatedRequests?: boolean;
495
476
  }
496
477
 
497
478
  /* Excluded from this release type: BatchDispatch */
498
479
 
499
480
  declare interface BatchDispatcherOptions {
500
- msDelay: number;
501
- name?: string;
481
+ msDelay: number;
482
+ name?: string;
502
483
  }
503
484
 
504
485
  /* Excluded from this release type: BuildEnvironment */
505
486
 
506
487
  declare interface BuildRouteConfiguration {
507
- path: string;
508
- methods: HttpMethod[];
509
- /**
488
+ path: string;
489
+ methods: HttpMethod[];
490
+ /**
510
491
  /* @deprecated This property is not used and will be removed in future versions
511
492
  */
512
- label?: string;
513
- /**
493
+ label?: string;
494
+ /**
514
495
  /* @deprecated This property is not used and will be removed in future versions
515
496
  */
516
- key?: string;
517
- handler: HandlerDefinition;
518
- corsPolicy?: CorsPolicy;
519
- /**
497
+ key?: string;
498
+ handler: HandlerDefinition;
499
+ corsPolicy?: CorsPolicy;
500
+ /**
520
501
  /* @deprecated This property is deprecated. Use route.raw() instead.
521
502
  */
522
- custom?: any;
523
- /**
503
+ custom?: any;
504
+ /**
524
505
  /* @deprecated This property is not used and will be removed in future versions
525
506
  */
526
- version: string;
527
- policies?: {
528
- inbound?: string[];
529
- outbound?: string[];
530
- };
531
- /**
507
+ version: string;
508
+ policies?: {
509
+ inbound?: string[];
510
+ outbound?: string[];
511
+ };
512
+ /**
532
513
  /* @deprecated This property is deprecated. Use route.raw() instead.
533
514
  */
534
- excludeFromOpenApi?: boolean;
535
- pathPattern?: string;
536
- /* Excluded from this release type: raw */
515
+ excludeFromOpenApi?: boolean;
516
+ pathPattern?: string;
517
+ /* Excluded from this release type: raw */
537
518
  }
538
519
 
539
520
  /**
540
521
  * Internal
541
522
  */
542
523
  declare interface CacheOptions {
543
- logger?: Logger;
524
+ logger?: Logger;
544
525
  }
545
526
 
546
527
  /**
@@ -554,41 +535,36 @@ declare interface CacheOptions {
554
535
  * @param policyName - The name of the policy as set in policies.json
555
536
  * @returns A Request or a Response
556
537
  */
557
- export declare function CachingInboundPolicy(
558
- request: ZuploRequest,
559
- context: ZuploContext,
560
- options: CachingInboundPolicyOptions,
561
- policyName: string
562
- ): Promise<ZuploRequest<RequestGeneric> | Response>;
538
+ export declare function CachingInboundPolicy(request: ZuploRequest, context: ZuploContext, options: CachingInboundPolicyOptions, policyName: string): Promise<Response | ZuploRequest<RequestGeneric>>;
563
539
 
564
540
  /**
565
541
  * The options for this policy.
566
542
  */
567
543
  export declare interface CachingInboundPolicyOptions {
568
- /**
569
- * Specifies an id or 'key' for this policy to store cache. This is useful for cache-busting. For example, set this property to an env var and if you change that env var value, you invalidate the cache.
570
- */
571
- cacheId?: string;
572
- /**
573
- * By default, the Authorization header is always considered in the caching policy. You can disable by setting this to `true`.
574
- */
575
- dangerouslyIgnoreAuthorizationHeader?: boolean;
576
- /**
577
- * The headers to be considered when caching.
578
- */
579
- headers?: string[];
580
- /**
581
- * HTTP Methods to be cached. Valid methods are: GET, POST, PUT, PATCH, DELETE, HEAD.
582
- */
583
- cacheHttpMethods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD")[];
584
- /**
585
- * The timeout of the cache in seconds.
586
- */
587
- expirationSecondsTtl?: number;
588
- /**
589
- * Response status codes to be cached.
590
- */
591
- statusCodes?: number[];
544
+ /**
545
+ * Specifies an id or 'key' for this policy to store cache. This is useful for cache-busting. For example, set this property to an env var and if you change that env var value, you invalidate the cache.
546
+ */
547
+ cacheId?: string;
548
+ /**
549
+ * By default, the Authorization header is always considered in the caching policy. You can disable by setting this to `true`.
550
+ */
551
+ dangerouslyIgnoreAuthorizationHeader?: boolean;
552
+ /**
553
+ * The headers to be considered when caching.
554
+ */
555
+ headers?: string[];
556
+ /**
557
+ * HTTP Methods to be cached. Valid methods are: GET, POST, PUT, PATCH, DELETE, HEAD.
558
+ */
559
+ cacheHttpMethods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD")[];
560
+ /**
561
+ * The timeout of the cache in seconds.
562
+ */
563
+ expirationSecondsTtl?: number;
564
+ /**
565
+ * Response status codes to be cached.
566
+ */
567
+ statusCodes?: number[];
592
568
  }
593
569
 
594
570
  /**
@@ -608,10 +584,10 @@ export declare const ChangeMethodInboundPolicy: InboundPolicyHandler<ChangeMetho
608
584
  * The options for this policy.
609
585
  */
610
586
  export declare interface ChangeMethodInboundPolicyOptions {
611
- /**
612
- * The HTTP Method to be used, e.g. POST, GET, PUT, PATCH, etc.
613
- */
614
- method: string;
587
+ /**
588
+ * The HTTP Method to be used, e.g. POST, GET, PUT, PATCH, etc.
589
+ */
590
+ method: string;
615
591
  }
616
592
 
617
593
  /**
@@ -631,10 +607,10 @@ export declare const ClearHeadersInboundPolicy: InboundPolicyHandler<ClearHeader
631
607
  * The options for this policy.
632
608
  */
633
609
  export declare interface ClearHeadersInboundPolicyOptions {
634
- /**
635
- * The headers that should not be removed.
636
- */
637
- exclude?: string[];
610
+ /**
611
+ * The headers that should not be removed.
612
+ */
613
+ exclude?: string[];
638
614
  }
639
615
 
640
616
  /**
@@ -654,10 +630,10 @@ export declare const ClearHeadersOutboundPolicy: OutboundPolicyHandler<ClearHead
654
630
  * The options for this policy.
655
631
  */
656
632
  export declare interface ClearHeadersOutboundPolicyOptions {
657
- /**
658
- * The headers that should not be removed.
659
- */
660
- exclude?: string[];
633
+ /**
634
+ * The headers that should not be removed.
635
+ */
636
+ exclude?: string[];
661
637
  }
662
638
 
663
639
  /**
@@ -682,14 +658,14 @@ export declare const ClerkJwtInboundPolicy: InboundPolicyHandler<ClerkJwtInbound
682
658
  * The options for this policy.
683
659
  */
684
660
  export declare interface ClerkJwtInboundPolicyOptions {
685
- /**
686
- * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
687
- */
688
- allowUnauthenticatedRequests?: boolean;
689
- /**
690
- * Your Clerk frontend api url, i.e. `https://sensible-skunk-49.clerk.accounts.dev`. Can be found in the Clerk portal: https://dashboard.clerk.com/last-active?path=api-keys.
691
- */
692
- frontendApiUrl: string;
661
+ /**
662
+ * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
663
+ */
664
+ allowUnauthenticatedRequests?: boolean;
665
+ /**
666
+ * Your Clerk frontend api url, i.e. `https://sensible-skunk-49.clerk.accounts.dev`. Can be found in the Clerk portal: https://dashboard.clerk.com/last-active?path=api-keys.
667
+ */
668
+ frontendApiUrl: string;
693
669
  }
694
670
 
695
671
  /**
@@ -717,18 +693,18 @@ export declare const CognitoJwtInboundPolicy: InboundPolicyHandler<CognitoJwtInb
717
693
  * The options for this policy.
718
694
  */
719
695
  export declare interface CognitoJwtInboundPolicyOptions {
720
- /**
721
- * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
722
- */
723
- allowUnauthenticatedRequests?: boolean;
724
- /**
725
- * The AWS region where your Cognito instance is deployed.
726
- */
727
- region: string;
728
- /**
729
- * The user pool identifier.
730
- */
731
- userPoolId: string;
696
+ /**
697
+ * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
698
+ */
699
+ allowUnauthenticatedRequests?: boolean;
700
+ /**
701
+ * The AWS region where your Cognito instance is deployed.
702
+ */
703
+ region: string;
704
+ /**
705
+ * The user pool identifier.
706
+ */
707
+ userPoolId: string;
732
708
  }
733
709
 
734
710
  /**
@@ -737,26 +713,26 @@ export declare interface CognitoJwtInboundPolicyOptions {
737
713
  declare type CompatibilityDate = "2023-03-14" | "2024-01-15";
738
714
 
739
715
  declare interface CompatibilityFlags {
740
- /**
741
- * Whether or not outbound policies should run if the response from the
742
- * handlers is not `response.ok`
743
- *
744
- * @compatibilityDate 2024-01-15
745
- */
746
- runOutboundPoliciesOnHandlerOnAllStatuses: boolean;
747
- /**
748
- * Whether or not hooks run on system routes
749
- *
750
- * @compatibilityDate 2024-01-15
751
- */
752
- doNotRunHooksOnSystemRoutes: boolean;
753
- /**
754
- * Remove all vendor (cf-, zp-) headers except for the specific
755
- * list of allowed headers
756
- *
757
- * @compatibilityDate 2024-01-15
758
- */
759
- removeAllVendorHeadersExceptListed: boolean;
716
+ /**
717
+ * Whether or not outbound policies should run if the response from the
718
+ * handlers is not `response.ok`
719
+ *
720
+ * @compatibilityDate 2024-01-15
721
+ */
722
+ runOutboundPoliciesOnHandlerOnAllStatuses: boolean;
723
+ /**
724
+ * Whether or not hooks run on system routes
725
+ *
726
+ * @compatibilityDate 2024-01-15
727
+ */
728
+ doNotRunHooksOnSystemRoutes: boolean;
729
+ /**
730
+ * Remove all vendor (cf-, zp-) headers except for the specific
731
+ * list of allowed headers
732
+ *
733
+ * @compatibilityDate 2024-01-15
734
+ */
735
+ removeAllVendorHeadersExceptListed: boolean;
760
736
  }
761
737
 
762
738
  /**
@@ -783,10 +759,10 @@ export declare const CompositeInboundPolicy: InboundPolicyHandler<CompositeInbou
783
759
  * The options for this policy.
784
760
  */
785
761
  export declare interface CompositeInboundPolicyOptions {
786
- /**
787
- * The list of policy references (beware circular references).
788
- */
789
- policies?: string[];
762
+ /**
763
+ * The list of policy references (beware circular references).
764
+ */
765
+ policies?: string[];
790
766
  }
791
767
 
792
768
  /**
@@ -796,7 +772,7 @@ export declare interface CompositeInboundPolicyOptions {
796
772
  * @public
797
773
  */
798
774
  export declare class ConfigurationError extends RuntimeError {
799
- constructor(message: string, options?: ErrorOptions);
775
+ constructor(message: string, options?: ErrorOptions);
800
776
  }
801
777
 
802
778
  /* Excluded from this release type: ContentTypes */
@@ -839,12 +815,12 @@ export declare class ConfigurationError extends RuntimeError {
839
815
  * ```
840
816
  */
841
817
  export declare class ContextData<T = any> {
842
- #private;
843
- constructor(name: string);
844
- set(context: ZuploContext, data: T): void;
845
- get(context: ZuploContext): T | undefined;
846
- static set<T = any>(context: ZuploContext, name: string, data: T): void;
847
- static get<T = any>(context: ZuploContext, name: string): T | undefined;
818
+ #private;
819
+ constructor(name: string);
820
+ set(context: ZuploContext, data: T): void;
821
+ get(context: ZuploContext): T | undefined;
822
+ static set<T = any>(context: ZuploContext, name: string, data: T): void;
823
+ static get<T = any>(context: ZuploContext, name: string): T | undefined;
848
824
  }
849
825
 
850
826
  /** The 2-letter continent codes Cloudflare uses */
@@ -853,13 +829,13 @@ declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
853
829
  export declare type CorsPolicy = string | "anything-goes" | "none";
854
830
 
855
831
  export declare interface CorsPolicyConfiguration {
856
- name: string;
857
- allowCredentials?: boolean;
858
- maxAge?: number;
859
- allowedOrigins: string[] | string;
860
- allowedMethods?: HttpMethod[] | string;
861
- allowedHeaders?: string[] | string;
862
- exposeHeaders?: string[] | string;
832
+ name: string;
833
+ allowCredentials?: boolean;
834
+ maxAge?: number;
835
+ allowedOrigins: string[] | string;
836
+ allowedMethods?: HttpMethod[] | string;
837
+ allowedHeaders?: string[] | string;
838
+ exposeHeaders?: string[] | string;
863
839
  }
864
840
 
865
841
  /* Excluded from this release type: CryptoBeta */
@@ -886,91 +862,88 @@ export declare const CurityPhantomTokenInboundPolicy: InboundPolicyHandler<Curit
886
862
  * The options for this policy.
887
863
  */
888
864
  export declare interface CurityPhantomTokenInboundPolicyOptions {
889
- /**
890
- * The client ID of the Curity application.
891
- */
892
- clientId: string;
893
- /**
894
- * The client secret of the Curity application.
895
- */
896
- clientSecret: string;
897
- /**
898
- * The introspection URL of the Curity application.
899
- */
900
- introspectionUrl: string;
901
- /**
902
- * The duration in seconds to cache the introspected response.
903
- */
904
- cacheDurationSeconds?: number;
865
+ /**
866
+ * The client ID of the Curity application.
867
+ */
868
+ clientId: string;
869
+ /**
870
+ * The client secret of the Curity application.
871
+ */
872
+ clientSecret: string;
873
+ /**
874
+ * The introspection URL of the Curity application.
875
+ */
876
+ introspectionUrl: string;
877
+ /**
878
+ * The duration in seconds to cache the introspected response.
879
+ */
880
+ cacheDurationSeconds?: number;
905
881
  }
906
882
 
907
883
  /* Excluded from this release type: CustomRateLimitDetails */
908
884
 
909
885
  declare interface DataDogLoggingOptions {
910
- url?: string;
911
- apiKey: string;
886
+ url?: string;
887
+ apiKey: string;
912
888
  }
913
889
 
914
890
  export declare class DataDogLoggingPlugin extends LogPlugin {
915
- private options;
916
- constructor(options: DataDogLoggingOptions);
917
- /* Excluded from this release type: getTransport */
891
+ private options;
892
+ constructor(options: DataDogLoggingOptions);
893
+ /* Excluded from this release type: getTransport */
918
894
  }
919
895
 
920
896
  declare interface DataDogMetricsContext {
921
- tags: string[];
897
+ tags: string[];
922
898
  }
923
899
 
924
900
  declare interface DataDogMetricsOptions {
925
- url?: string;
926
- apiKey: string;
927
- tags?: string[];
928
- metrics?: MetricsType;
929
- include?: IncludeMetrics;
901
+ url?: string;
902
+ apiKey: string;
903
+ tags?: string[];
904
+ metrics?: MetricsType;
905
+ include?: IncludeMetrics;
930
906
  }
931
907
 
932
908
  export declare class DataDogMetricsPlugin extends MetricsPlugin {
933
- private options;
934
- constructor(options: DataDogMetricsOptions);
935
- getTransport(): MetricsTransport;
936
- static setContext(context: ZuploContext, data: DataDogMetricsContext): void;
909
+ private options;
910
+ constructor(options: DataDogMetricsOptions);
911
+ getTransport(): MetricsTransport;
912
+ static setContext(context: ZuploContext, data: DataDogMetricsContext): void;
937
913
  }
938
914
 
939
- export declare interface DevPortalRuntimeConfig {
940
- enabled: boolean;
941
- sitePathname: string;
942
- }
915
+ /* Excluded from this release type: DevPortalRuntimeConfig */
943
916
 
944
917
  /* Excluded from this release type: DispatchFunction */
945
918
 
946
919
  declare interface DynaTraceLoggingOptions {
947
- url: string;
948
- apiToken: string;
920
+ url: string;
921
+ apiToken: string;
949
922
  }
950
923
 
951
924
  export declare class DynaTraceLoggingPlugin extends LogPlugin {
952
- private options;
953
- constructor(options: DynaTraceLoggingOptions);
954
- /* Excluded from this release type: getTransport */
925
+ private options;
926
+ constructor(options: DynaTraceLoggingOptions);
927
+ /* Excluded from this release type: getTransport */
955
928
  }
956
929
 
957
930
  declare interface DynatraceMetricsContext {
958
- dimensions: string[];
931
+ dimensions: string[];
959
932
  }
960
933
 
961
934
  declare interface DynatraceMetricsOptions {
962
- url: string;
963
- apiToken: string;
964
- dimensions?: string[];
965
- metrics?: MetricsType;
966
- include?: IncludeMetrics;
935
+ url: string;
936
+ apiToken: string;
937
+ dimensions?: string[];
938
+ metrics?: MetricsType;
939
+ include?: IncludeMetrics;
967
940
  }
968
941
 
969
942
  export declare class DynatraceMetricsPlugin extends MetricsPlugin {
970
- private options;
971
- constructor(options: DynatraceMetricsOptions);
972
- getTransport(): MetricsTransport;
973
- static setContext(context: ZuploContext, data: DynatraceMetricsContext): void;
943
+ private options;
944
+ constructor(options: DynatraceMetricsOptions);
945
+ getTransport(): MetricsTransport;
946
+ static setContext(context: ZuploContext, data: DynatraceMetricsContext): void;
974
947
  }
975
948
 
976
949
  /* Excluded from this release type: environment */
@@ -1004,14 +977,14 @@ export declare const FirebaseJwtInboundPolicy: InboundPolicyHandler<FirebaseJwtI
1004
977
  * The options for this policy.
1005
978
  */
1006
979
  export declare interface FirebaseJwtInboundPolicyOptions {
1007
- /**
1008
- * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
1009
- */
1010
- allowUnauthenticatedRequests?: boolean;
1011
- /**
1012
- * Your Firebase Project ID.
1013
- */
1014
- projectId: string;
980
+ /**
981
+ * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
982
+ */
983
+ allowUnauthenticatedRequests?: boolean;
984
+ /**
985
+ * Your Firebase Project ID.
986
+ */
987
+ projectId: string;
1015
988
  }
1016
989
 
1017
990
  /**
@@ -1031,14 +1004,14 @@ export declare const FormDataToJsonInboundPolicy: InboundPolicyHandler<FormDataT
1031
1004
  * The options for this policy.
1032
1005
  */
1033
1006
  export declare interface FormDataToJsonInboundPolicyOptions {
1034
- /**
1035
- * Should the policy return an error if the request is not of the type form data.
1036
- */
1037
- badRequestIfNotFormData?: boolean;
1038
- /**
1039
- * The name of the honeypot field. Used to provide basic spam filtering.
1040
- */
1041
- optionalHoneypotName?: string;
1007
+ /**
1008
+ * Should the policy return an error if the request is not of the type form data.
1009
+ */
1010
+ badRequestIfNotFormData?: boolean;
1011
+ /**
1012
+ * The name of the honeypot field. Used to provide basic spam filtering.
1013
+ */
1014
+ optionalHoneypotName?: string;
1042
1015
  }
1043
1016
 
1044
1017
  /* Excluded from this release type: Gateway */
@@ -1060,115 +1033,78 @@ export declare const GeoFilterInboundPolicy: InboundPolicyHandler<GeoFilterInbou
1060
1033
  * The options for this policy.
1061
1034
  */
1062
1035
  export declare interface GeoFilterInboundPolicyOptions {
1063
- block?: GeoSpec;
1064
- allow?: GeoSpec;
1065
- /**
1066
- * Specifies whether unknown geo-location parameters should be ignored (allowed through).
1067
- */
1068
- ignoreUnknown?: boolean;
1036
+ block?: GeoSpec;
1037
+ allow?: GeoSpec;
1038
+ /**
1039
+ * Specifies whether unknown geo-location parameters should be ignored (allowed through).
1040
+ */
1041
+ ignoreUnknown?: boolean;
1069
1042
  }
1070
1043
 
1071
1044
  declare interface GeoSpec {
1072
- /**
1073
- * comma separated string of country codes to allow (e.g. "US, CA").
1074
- */
1075
- countries?: string;
1076
- /**
1077
- * comma separated string of region codes to allow (e.g. "TX, WA").
1078
- */
1079
- regionCodes?: string;
1080
- /**
1081
- * comma separated string of ASNs to allow (e.g. "395747, 28304").
1082
- */
1083
- asns?: string;
1084
- }
1085
-
1086
- export declare function getIdForParameterSchema(
1087
- path: string,
1088
- operation: string,
1089
- type: string,
1090
- name: string
1091
- ): string;
1092
-
1093
- export declare function getIdForRefSchema(
1094
- oasFileName: string,
1095
- ref: string
1096
- ): string;
1097
-
1098
- export declare function getIdForRequestBodySchema(
1099
- path: string,
1100
- operation: string,
1101
- contentType: string
1102
- ): string;
1103
-
1104
- export declare function getRawOperationDataIdentifierName(
1105
- oasFileName: string,
1106
- path: string,
1107
- operation: string
1108
- ): string;
1045
+ /**
1046
+ * comma separated string of country codes to allow (e.g. "US, CA").
1047
+ */
1048
+ countries?: string;
1049
+ /**
1050
+ * comma separated string of region codes to allow (e.g. "TX, WA").
1051
+ */
1052
+ regionCodes?: string;
1053
+ /**
1054
+ * comma separated string of ASNs to allow (e.g. "395747, 28304").
1055
+ */
1056
+ asns?: string;
1057
+ }
1058
+
1059
+ export declare function getIdForParameterSchema(path: string, operation: string, type: string, name: string): string;
1060
+
1061
+ export declare function getIdForRefSchema(oasFileName: string, ref: string): string;
1062
+
1063
+ export declare function getIdForRequestBodySchema(path: string, operation: string, contentType: string): string;
1064
+
1065
+ export declare function getRawOperationDataIdentifierName(oasFileName: string, path: string, operation: string): string;
1109
1066
 
1110
1067
  declare interface GoogleCloudLoggingOptions {
1111
- serviceAccountJson: string;
1112
- logName: string;
1068
+ serviceAccountJson: string;
1069
+ logName: string;
1113
1070
  }
1114
1071
 
1115
1072
  export declare class GoogleCloudLoggingPlugin extends LogPlugin {
1116
- private options;
1117
- constructor(options: GoogleCloudLoggingOptions);
1118
- /* Excluded from this release type: getTransport */
1073
+ private options;
1074
+ constructor(options: GoogleCloudLoggingOptions);
1075
+ /* Excluded from this release type: getTransport */
1119
1076
  }
1120
1077
 
1121
1078
  /* Excluded from this release type: Handler */
1122
1079
 
1123
1080
  export declare interface HandlerDefinition {
1124
- module: any;
1125
- export: string;
1126
- options?: unknown;
1127
- }
1128
-
1129
- export declare type HttpMethod =
1130
- | "GET"
1131
- | "HEAD"
1132
- | "POST"
1133
- | "PUT"
1134
- | "DELETE"
1135
- | "CONNECT"
1136
- | "OPTIONS"
1137
- | "TRACE"
1138
- | "PATCH";
1081
+ module: any;
1082
+ export: string;
1083
+ options?: unknown;
1084
+ }
1085
+
1086
+ export declare type HttpMethod = "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH";
1139
1087
 
1140
1088
  /* Excluded from this release type: HttpProblems */
1141
1089
 
1142
1090
  declare class HttpProblemsBase {
1143
- /**
1144
- * Creates a Response in the standard format from a problem detail
1145
- * @param details - The details of the problem
1146
- * @param request - The ZuploRequest object
1147
- * @param context - The ZuploContext object
1148
- * @returns A HTTP Response promise
1149
- */
1150
- static format: (
1151
- details: ProblemDetails | ProblemResponseDetails,
1152
- request: ZuploRequest,
1153
- context: ZuploContext
1154
- ) => Promise<Response>;
1155
- /**
1156
- * Creates a problem from the status code
1157
- */
1158
- static getProblemFromStatus(
1159
- status: HttpStatusCode,
1160
- problem?: Partial<Omit<ProblemDetails, "status" | "title">>
1161
- ): ProblemDetails;
1091
+ /**
1092
+ * Creates a Response in the standard format from a problem detail
1093
+ * @param details - The details of the problem
1094
+ * @param request - The ZuploRequest object
1095
+ * @param context - The ZuploContext object
1096
+ * @returns A HTTP Response promise
1097
+ */
1098
+ static format: (details: ProblemDetails | ProblemResponseDetails, request: ZuploRequest, context: ZuploContext) => Promise<Response>;
1099
+ /**
1100
+ * Creates a problem from the status code
1101
+ */
1102
+ static getProblemFromStatus(status: HttpStatusCode, problem?: Partial<Omit<ProblemDetails, "status" | "title">>): ProblemDetails;
1162
1103
  }
1163
1104
 
1164
1105
  /* Excluded from this release type: HttpStatusCode */
1165
1106
 
1166
- declare type HttpStatusCodeRangeDefinition =
1167
- | "1XX"
1168
- | "2XX"
1169
- | "3XX"
1170
- | "4XX"
1171
- | "5XX";
1107
+ declare type HttpStatusCodeRangeDefinition = "1XX" | "2XX" | "3XX" | "4XX" | "5XX";
1172
1108
 
1173
1109
  /* Excluded from this release type: httpStatuses */
1174
1110
 
@@ -1188,337 +1124,83 @@ declare type HttpStatusCodeRangeDefinition =
1188
1124
  * @returns A Response or Request object
1189
1125
  */
1190
1126
  export declare interface InboundPolicyHandler<TOptions = any> {
1191
- (
1192
- request: ZuploRequest,
1193
- context: ZuploContext,
1194
- options: TOptions,
1195
- policyName: string
1196
- ): Promise<ZuploRequest | Response>;
1127
+ (request: ZuploRequest, context: ZuploContext, options: TOptions, policyName: string): Promise<ZuploRequest | Response>;
1197
1128
  }
1198
1129
 
1199
1130
  declare interface IncludeMetrics {
1200
- country?: boolean;
1201
- httpMethod?: boolean;
1202
- statusCode?: boolean;
1203
- path?: boolean;
1131
+ country?: boolean;
1132
+ httpMethod?: boolean;
1133
+ statusCode?: boolean;
1134
+ path?: boolean;
1204
1135
  }
1205
1136
 
1206
1137
  declare interface IncomingRequestProperties {
1207
- /**
1208
- * ASN of the incoming request, for example, 395747.
1209
- */
1210
- readonly asn: number | undefined;
1211
- /**
1212
- * The organization which owns the ASN of the incoming request,
1213
- * for example, Google Cloud.
1214
- */
1215
- readonly asOrganization: string | undefined;
1216
- /**
1217
- * City of the incoming request, for example, "Austin".
1218
- */
1219
- readonly city: string | undefined;
1220
- /**
1221
- * Continent of the incoming request, for example, "NA".
1222
- */
1223
- readonly continent: ContinentCode | undefined;
1224
- /**
1225
- * The two-letter country code in the request.
1226
- * @see {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2|ISO 3166-1 alpha-2}
1227
- */
1228
- readonly country: Iso3166Alpha2Code | undefined;
1229
- /**
1230
- * Latitude of the incoming request, for example, "30.27130".
1231
- */
1232
- readonly latitude: string | undefined;
1233
- /**
1234
- * Longitude of the incoming request, for example, "-97.74260".
1235
- */
1236
- readonly longitude: string | undefined;
1237
- /**
1238
- * The three-letter IATA airport code of the data center that the request hit,
1239
- * for example, "DFW".
1240
- * @see {@link https://en.wikipedia.org/wiki/IATA_airport_code|IATA airport code}
1241
- */
1242
- readonly colo: string | undefined;
1243
- /**
1244
- * Postal code of the incoming request, for example, "78701".
1245
- */
1246
- readonly postalCode: string | undefined;
1247
- /**
1248
- * Metro code (DMA) of the incoming request, for example, "635".
1249
- */
1250
- readonly metroCode: string | undefined;
1251
- /**
1252
- * If known, the ISO 3166-2 name for the first level region associated with
1253
- * the IP address of the incoming request, for example, "Texas".
1254
- * @see {@link https://en.wikipedia.org/wiki/ISO_3166-2|ISO 3166-2}
1255
- */
1256
- readonly region: string | undefined;
1257
- /**
1258
- * If known, the ISO 3166-2 code for the first-level region associated with
1259
- * the IP address of the incoming request, for example, "TX".
1260
- * @see {@link https://en.wikipedia.org/wiki/ISO_3166-2|ISO 3166-2}
1261
- */
1262
- readonly regionCode: string | undefined;
1263
- /**
1264
- * Timezone of the incoming request, for example, "America/Chicago".
1265
- */
1266
- readonly timezone: string | undefined;
1138
+ /**
1139
+ * ASN of the incoming request, for example, 395747.
1140
+ */
1141
+ readonly asn: number | undefined;
1142
+ /**
1143
+ * The organization which owns the ASN of the incoming request,
1144
+ * for example, Google Cloud.
1145
+ */
1146
+ readonly asOrganization: string | undefined;
1147
+ /**
1148
+ * City of the incoming request, for example, "Austin".
1149
+ */
1150
+ readonly city: string | undefined;
1151
+ /**
1152
+ * Continent of the incoming request, for example, "NA".
1153
+ */
1154
+ readonly continent: ContinentCode | undefined;
1155
+ /**
1156
+ * The two-letter country code in the request.
1157
+ * @see {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2|ISO 3166-1 alpha-2}
1158
+ */
1159
+ readonly country: Iso3166Alpha2Code | undefined;
1160
+ /**
1161
+ * Latitude of the incoming request, for example, "30.27130".
1162
+ */
1163
+ readonly latitude: string | undefined;
1164
+ /**
1165
+ * Longitude of the incoming request, for example, "-97.74260".
1166
+ */
1167
+ readonly longitude: string | undefined;
1168
+ /**
1169
+ * The three-letter IATA airport code of the data center that the request hit,
1170
+ * for example, "DFW".
1171
+ * @see {@link https://en.wikipedia.org/wiki/IATA_airport_code|IATA airport code}
1172
+ */
1173
+ readonly colo: string | undefined;
1174
+ /**
1175
+ * Postal code of the incoming request, for example, "78701".
1176
+ */
1177
+ readonly postalCode: string | undefined;
1178
+ /**
1179
+ * Metro code (DMA) of the incoming request, for example, "635".
1180
+ */
1181
+ readonly metroCode: string | undefined;
1182
+ /**
1183
+ * If known, the ISO 3166-2 name for the first level region associated with
1184
+ * the IP address of the incoming request, for example, "Texas".
1185
+ * @see {@link https://en.wikipedia.org/wiki/ISO_3166-2|ISO 3166-2}
1186
+ */
1187
+ readonly region: string | undefined;
1188
+ /**
1189
+ * If known, the ISO 3166-2 code for the first-level region associated with
1190
+ * the IP address of the incoming request, for example, "TX".
1191
+ * @see {@link https://en.wikipedia.org/wiki/ISO_3166-2|ISO 3166-2}
1192
+ */
1193
+ readonly regionCode: string | undefined;
1194
+ /**
1195
+ * Timezone of the incoming request, for example, "America/Chicago".
1196
+ */
1197
+ readonly timezone: string | undefined;
1267
1198
  }
1268
1199
 
1269
1200
  /* Excluded from this release type: IRequestProcessor */
1270
1201
 
1271
1202
  /** ISO 3166-1 Alpha-2 codes */
1272
- declare type Iso3166Alpha2Code =
1273
- | "AD"
1274
- | "AE"
1275
- | "AF"
1276
- | "AG"
1277
- | "AI"
1278
- | "AL"
1279
- | "AM"
1280
- | "AO"
1281
- | "AQ"
1282
- | "AR"
1283
- | "AS"
1284
- | "AT"
1285
- | "AU"
1286
- | "AW"
1287
- | "AX"
1288
- | "AZ"
1289
- | "BA"
1290
- | "BB"
1291
- | "BD"
1292
- | "BE"
1293
- | "BF"
1294
- | "BG"
1295
- | "BH"
1296
- | "BI"
1297
- | "BJ"
1298
- | "BL"
1299
- | "BM"
1300
- | "BN"
1301
- | "BO"
1302
- | "BQ"
1303
- | "BR"
1304
- | "BS"
1305
- | "BT"
1306
- | "BV"
1307
- | "BW"
1308
- | "BY"
1309
- | "BZ"
1310
- | "CA"
1311
- | "CC"
1312
- | "CD"
1313
- | "CF"
1314
- | "CG"
1315
- | "CH"
1316
- | "CI"
1317
- | "CK"
1318
- | "CL"
1319
- | "CM"
1320
- | "CN"
1321
- | "CO"
1322
- | "CR"
1323
- | "CU"
1324
- | "CV"
1325
- | "CW"
1326
- | "CX"
1327
- | "CY"
1328
- | "CZ"
1329
- | "DE"
1330
- | "DJ"
1331
- | "DK"
1332
- | "DM"
1333
- | "DO"
1334
- | "DZ"
1335
- | "EC"
1336
- | "EE"
1337
- | "EG"
1338
- | "EH"
1339
- | "ER"
1340
- | "ES"
1341
- | "ET"
1342
- | "FI"
1343
- | "FJ"
1344
- | "FK"
1345
- | "FM"
1346
- | "FO"
1347
- | "FR"
1348
- | "GA"
1349
- | "GB"
1350
- | "GD"
1351
- | "GE"
1352
- | "GF"
1353
- | "GG"
1354
- | "GH"
1355
- | "GI"
1356
- | "GL"
1357
- | "GM"
1358
- | "GN"
1359
- | "GP"
1360
- | "GQ"
1361
- | "GR"
1362
- | "GS"
1363
- | "GT"
1364
- | "GU"
1365
- | "GW"
1366
- | "GY"
1367
- | "HK"
1368
- | "HM"
1369
- | "HN"
1370
- | "HR"
1371
- | "HT"
1372
- | "HU"
1373
- | "ID"
1374
- | "IE"
1375
- | "IL"
1376
- | "IM"
1377
- | "IN"
1378
- | "IO"
1379
- | "IQ"
1380
- | "IR"
1381
- | "IS"
1382
- | "IT"
1383
- | "JE"
1384
- | "JM"
1385
- | "JO"
1386
- | "JP"
1387
- | "KE"
1388
- | "KG"
1389
- | "KH"
1390
- | "KI"
1391
- | "KM"
1392
- | "KN"
1393
- | "KP"
1394
- | "KR"
1395
- | "KW"
1396
- | "KY"
1397
- | "KZ"
1398
- | "LA"
1399
- | "LB"
1400
- | "LC"
1401
- | "LI"
1402
- | "LK"
1403
- | "LR"
1404
- | "LS"
1405
- | "LT"
1406
- | "LU"
1407
- | "LV"
1408
- | "LY"
1409
- | "MA"
1410
- | "MC"
1411
- | "MD"
1412
- | "ME"
1413
- | "MF"
1414
- | "MG"
1415
- | "MH"
1416
- | "MK"
1417
- | "ML"
1418
- | "MM"
1419
- | "MN"
1420
- | "MO"
1421
- | "MP"
1422
- | "MQ"
1423
- | "MR"
1424
- | "MS"
1425
- | "MT"
1426
- | "MU"
1427
- | "MV"
1428
- | "MW"
1429
- | "MX"
1430
- | "MY"
1431
- | "MZ"
1432
- | "NA"
1433
- | "NC"
1434
- | "NE"
1435
- | "NF"
1436
- | "NG"
1437
- | "NI"
1438
- | "NL"
1439
- | "NO"
1440
- | "NP"
1441
- | "NR"
1442
- | "NU"
1443
- | "NZ"
1444
- | "OM"
1445
- | "PA"
1446
- | "PE"
1447
- | "PF"
1448
- | "PG"
1449
- | "PH"
1450
- | "PK"
1451
- | "PL"
1452
- | "PM"
1453
- | "PN"
1454
- | "PR"
1455
- | "PS"
1456
- | "PT"
1457
- | "PW"
1458
- | "PY"
1459
- | "QA"
1460
- | "RE"
1461
- | "RO"
1462
- | "RS"
1463
- | "RU"
1464
- | "RW"
1465
- | "SA"
1466
- | "SB"
1467
- | "SC"
1468
- | "SD"
1469
- | "SE"
1470
- | "SG"
1471
- | "SH"
1472
- | "SI"
1473
- | "SJ"
1474
- | "SK"
1475
- | "SL"
1476
- | "SM"
1477
- | "SN"
1478
- | "SO"
1479
- | "SR"
1480
- | "SS"
1481
- | "ST"
1482
- | "SV"
1483
- | "SX"
1484
- | "SY"
1485
- | "SZ"
1486
- | "TC"
1487
- | "TD"
1488
- | "TF"
1489
- | "TG"
1490
- | "TH"
1491
- | "TJ"
1492
- | "TK"
1493
- | "TL"
1494
- | "TM"
1495
- | "TN"
1496
- | "TO"
1497
- | "TR"
1498
- | "TT"
1499
- | "TV"
1500
- | "TW"
1501
- | "TZ"
1502
- | "UA"
1503
- | "UG"
1504
- | "UM"
1505
- | "US"
1506
- | "UY"
1507
- | "UZ"
1508
- | "VA"
1509
- | "VC"
1510
- | "VE"
1511
- | "VG"
1512
- | "VI"
1513
- | "VN"
1514
- | "VU"
1515
- | "WF"
1516
- | "WS"
1517
- | "YE"
1518
- | "YT"
1519
- | "ZA"
1520
- | "ZM"
1521
- | "ZW";
1203
+ declare type Iso3166Alpha2Code = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
1522
1204
 
1523
1205
  /* Excluded from this release type: isRestrictedEnvVariableName */
1524
1206
 
@@ -1541,10 +1223,10 @@ export declare const JWTScopeValidationInboundPolicy: InboundPolicyHandler<JWTSc
1541
1223
  * The options for this policy.
1542
1224
  */
1543
1225
  export declare interface JWTScopeValidationInboundPolicyOptions {
1544
- /**
1545
- * An array of of JWT scopes.
1546
- */
1547
- scopes: string[];
1226
+ /**
1227
+ * An array of of JWT scopes.
1228
+ */
1229
+ scopes: string[];
1548
1230
  }
1549
1231
 
1550
1232
  /* Excluded from this release type: KevValueStoreGetOptions */
@@ -1556,8 +1238,8 @@ export declare interface JWTScopeValidationInboundPolicyOptions {
1556
1238
  /* Excluded from this release type: LogEntry */
1557
1239
 
1558
1240
  declare interface LogField {
1559
- name: string;
1560
- content: Primitive;
1241
+ name: string;
1242
+ content: Primitive;
1561
1243
  }
1562
1244
 
1563
1245
  /* Excluded from this release type: LogFormat */
@@ -1566,10 +1248,19 @@ declare interface LogField {
1566
1248
 
1567
1249
  /* Excluded from this release type: LoggingContext */
1568
1250
 
1251
+ declare type LoggingEnvironmentStage = "working-copy" | "preview" | "production" | "local" | "unknown";
1252
+
1253
+ /**
1254
+ * This type exists mostly because we can't break existing loggers,
1255
+ * it is probably better to have environment stage and something indicating
1256
+ * runtime (which more closely resembles what we actually use internally)
1257
+ */
1258
+ declare type LoggingEnvironmentType = "edge" | "working-copy" | "local" | "unknown";
1259
+
1569
1260
  declare interface LogInsightLogEntry {
1570
- text: string;
1571
- timestamp: number;
1572
- fields: LogField[];
1261
+ text: string;
1262
+ timestamp: number;
1263
+ fields: LogField[];
1573
1264
  }
1574
1265
 
1575
1266
  /* Excluded from this release type: LogLevel */
@@ -1577,7 +1268,7 @@ declare interface LogInsightLogEntry {
1577
1268
  /* Excluded from this release type: LogOwnerType */
1578
1269
 
1579
1270
  declare abstract class LogPlugin extends RuntimePlugin {
1580
- /* Excluded from this release type: getTransport */
1271
+ /* Excluded from this release type: getTransport */
1581
1272
  }
1582
1273
 
1583
1274
  declare type LogSourceType = "runtime" | "request";
@@ -1585,24 +1276,24 @@ declare type LogSourceType = "runtime" | "request";
1585
1276
  /* Excluded from this release type: LogTransport */
1586
1277
 
1587
1278
  export declare class LokiLoggingPlugin extends LogPlugin {
1588
- private options;
1589
- constructor(options: LokiLoggingPluginOptions);
1590
- /* Excluded from this release type: getTransport */
1279
+ private options;
1280
+ constructor(options: LokiLoggingPluginOptions);
1281
+ /* Excluded from this release type: getTransport */
1591
1282
  }
1592
1283
 
1593
1284
  declare interface LokiLoggingPluginOptions {
1594
- url: string;
1595
- username: string;
1596
- password: string;
1285
+ url: string;
1286
+ username: string;
1287
+ password: string;
1597
1288
  }
1598
1289
 
1599
1290
  /* Excluded from this release type: LookupResult */
1600
1291
 
1601
1292
  export declare class MemoryZoneReadThroughCache<T = unknown> {
1602
- #private;
1603
- constructor(name: string, context: ZuploContext);
1604
- get(key: string): Promise<T | undefined>;
1605
- put(key: string, data: T, ttlSeconds: number): void;
1293
+ #private;
1294
+ constructor(name: string, context: ZuploContext);
1295
+ get(key: string): Promise<T | undefined>;
1296
+ put(key: string, data: T, ttlSeconds: number): void;
1606
1297
  }
1607
1298
 
1608
1299
  /* Excluded from this release type: MeteringPlugin */
@@ -1616,39 +1307,39 @@ export declare class MemoryZoneReadThroughCache<T = unknown> {
1616
1307
  /* Excluded from this release type: MetricsData */
1617
1308
 
1618
1309
  declare abstract class MetricsPlugin extends RuntimePlugin {
1619
- /* Excluded from this release type: getTransport */
1310
+ /* Excluded from this release type: getTransport */
1620
1311
  }
1621
1312
 
1622
1313
  declare interface MetricsTransport {
1623
- pushMetrics(entry: MetricsData, context: ZuploContext): void;
1314
+ pushMetrics(entry: MetricsData, context: ZuploContext): void;
1624
1315
  }
1625
1316
 
1626
1317
  declare interface MetricsType {
1627
- latency?: boolean;
1628
- requestContentLength?: boolean;
1629
- responseContentLength?: boolean;
1318
+ latency?: boolean;
1319
+ requestContentLength?: boolean;
1320
+ responseContentLength?: boolean;
1630
1321
  }
1631
1322
 
1632
1323
  /**
1633
1324
  * The options for this policy.
1634
1325
  */
1635
1326
  export declare interface MockApiInboundOptions {
1636
- /**
1637
- * Indicates whether the response should be selected randomly, from the available examples (that match any filter criteria). If `false` the first matching example is used.
1638
- */
1639
- random?: boolean;
1640
- /**
1641
- * Specifies a prefix to match the responses to select from. Typically this is a status code like "200" or "2XX". If you want the policy to select randomly from all 2XX codes, set this property to "2" and random to `true`.
1642
- */
1643
- responsePrefixFilter?: string;
1644
- /**
1645
- * Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).
1646
- */
1647
- contentType?: string;
1648
- /**
1649
- * Specify the name of the example to select. If not specified, the first matching response is used (or random).
1650
- */
1651
- exampleName?: string;
1327
+ /**
1328
+ * Indicates whether the response should be selected randomly, from the available examples (that match any filter criteria). If `false` the first matching example is used.
1329
+ */
1330
+ random?: boolean;
1331
+ /**
1332
+ * Specifies a prefix to match the responses to select from. Typically this is a status code like "200" or "2XX". If you want the policy to select randomly from all 2XX codes, set this property to "2" and random to `true`.
1333
+ */
1334
+ responsePrefixFilter?: string;
1335
+ /**
1336
+ * Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).
1337
+ */
1338
+ contentType?: string;
1339
+ /**
1340
+ * Specify the name of the example to select. If not specified, the first matching response is used (or random).
1341
+ */
1342
+ exampleName?: string;
1652
1343
  }
1653
1344
 
1654
1345
  /**
@@ -1667,11 +1358,11 @@ export declare const MockApiInboundPolicy: InboundPolicyHandler<MockApiInboundOp
1667
1358
  declare type Modify<T, R> = Omit<T, keyof R> & R;
1668
1359
 
1669
1360
  declare interface MoesifContext {
1670
- apiVersion?: string;
1671
- userId?: string;
1672
- companyId?: string;
1673
- sessionToken?: string;
1674
- metadata?: unknown;
1361
+ apiVersion?: string;
1362
+ userId?: string;
1363
+ companyId?: string;
1364
+ sessionToken?: string;
1365
+ metadata?: unknown;
1675
1366
  }
1676
1367
 
1677
1368
  /**
@@ -1693,29 +1384,24 @@ declare interface MoesifContext {
1693
1384
  * @param policyName - The name of the policy as set in policies.json
1694
1385
  * @returns A Request or a Response
1695
1386
  */
1696
- export declare function MoesifInboundPolicy(
1697
- request: ZuploRequest,
1698
- context: ZuploContext,
1699
- passedOptions: MoesifInboundPolicyOptions,
1700
- policyName: string
1701
- ): Promise<ZuploRequest<RequestGeneric>>;
1387
+ export declare function MoesifInboundPolicy(request: ZuploRequest, context: ZuploContext, passedOptions: MoesifInboundPolicyOptions, policyName: string): Promise<ZuploRequest<RequestGeneric>>;
1702
1388
 
1703
1389
  /**
1704
1390
  * The options for this policy. Many of them can be overridden at the code level in a request using the `AmberfloMeteringPolicy.setRequestProperties` method.
1705
1391
  */
1706
1392
  export declare interface MoesifInboundPolicyOptions {
1707
- /**
1708
- * Your Moesif application ID.
1709
- */
1710
- applicationId: string;
1711
- /**
1712
- * Set to false to disable sending the request body to Moesif.
1713
- */
1714
- logRequestBody?: boolean;
1715
- /**
1716
- * Set to false to disable sending the response body to Moesif.
1717
- */
1718
- logResponseBody?: boolean;
1393
+ /**
1394
+ * Your Moesif application ID.
1395
+ */
1396
+ applicationId: string;
1397
+ /**
1398
+ * Set to false to disable sending the request body to Moesif.
1399
+ */
1400
+ logRequestBody?: boolean;
1401
+ /**
1402
+ * Set to false to disable sending the response body to Moesif.
1403
+ */
1404
+ logResponseBody?: boolean;
1719
1405
  }
1720
1406
 
1721
1407
  /* Excluded from this release type: MonetizationInboundPolicy */
@@ -1724,55 +1410,46 @@ export declare interface MoesifInboundPolicyOptions {
1724
1410
  * The options for this policy.
1725
1411
  */
1726
1412
  export declare interface MonetizationInboundPolicyOptions {
1727
- /**
1728
- * Indicates if requests without subscription should be allowed or not.
1729
- */
1730
- allowRequestsWithoutSubscription?: boolean;
1731
- /**
1732
- * Indicates which subscription statuses should be allowed.
1733
- */
1734
- allowedSubscriptionStatuses?: (
1735
- | "active"
1736
- | "inactive"
1737
- | "incomplete"
1738
- | "incomplete-expired"
1739
- | "trialing"
1740
- | "past-due"
1741
- | "canceled"
1742
- | "unpaid"
1743
- )[];
1744
- /**
1745
- * Indicates the bucket to be used, overrides the default one.
1746
- */
1747
- bucketId?: string;
1748
- /**
1749
- * Indicates if requests over quota should be allowed or not.
1750
- */
1751
- allowRequestsOverQuota?: boolean;
1752
- /**
1753
- * The meters to be used by the policy against the subscription quota.
1754
- */
1755
- meters: {
1756
- /**
1757
- * This interface was referenced by `undefined`'s JSON-Schema definition
1758
- * via the `patternProperty` "^.*$".
1759
- */
1760
- [k: string]: number;
1761
- };
1762
- /**
1763
- * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call.
1764
- */
1765
- meterOnStatusCodes?: string | number[];
1413
+ /**
1414
+ * Indicates if requests without subscription should be allowed or not.
1415
+ */
1416
+ allowRequestsWithoutSubscription?: boolean;
1417
+ /**
1418
+ * Indicates which subscription statuses should be allowed.
1419
+ */
1420
+ allowedSubscriptionStatuses?: ("active" | "inactive" | "incomplete" | "incomplete-expired" | "trialing" | "past-due" | "canceled" | "unpaid")[];
1421
+ /**
1422
+ * Indicates the bucket to be used, overrides the default one.
1423
+ */
1424
+ bucketId?: string;
1425
+ /**
1426
+ * Indicates if requests over quota should be allowed or not.
1427
+ */
1428
+ allowRequestsOverQuota?: boolean;
1429
+ /**
1430
+ * The meters to be used by the policy against the subscription quota.
1431
+ */
1432
+ meters: {
1433
+ /**
1434
+ * This interface was referenced by `undefined`'s JSON-Schema definition
1435
+ * via the `patternProperty` "^.*$".
1436
+ */
1437
+ [k: string]: number;
1438
+ };
1439
+ /**
1440
+ * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call.
1441
+ */
1442
+ meterOnStatusCodes?: string | number[];
1766
1443
  }
1767
1444
 
1768
1445
  declare type MonetizationPolicyMeters = {
1769
- [Key in string]: number;
1446
+ [Key in string]: number;
1770
1447
  };
1771
1448
 
1772
1449
  /* Excluded from this release type: MonetizationSubscription */
1773
1450
 
1774
1451
  declare interface NotFoundOptions {
1775
- routesMatchedByPathOnly: RouteConfiguration[];
1452
+ routesMatchedByPathOnly: RouteConfiguration[];
1776
1453
  }
1777
1454
 
1778
1455
  /**
@@ -1800,58 +1477,43 @@ export declare const OktaJwtInboundPolicy: InboundPolicyHandler<OktaJwtInboundPo
1800
1477
  * The options for this policy.
1801
1478
  */
1802
1479
  export declare interface OktaJwtInboundPolicyOptions {
1803
- /**
1804
- * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
1805
- */
1806
- allowUnauthenticatedRequests?: boolean;
1807
- /**
1808
- * Your Okta authorization server's issuer URL. For example, `https://dev-12345.okta.com/oauth2/abc`.
1809
- */
1810
- issuerUrl: string;
1811
- /**
1812
- * The Okta audience of your API, for example `api://my-api`.
1813
- */
1814
- audience?: string;
1480
+ /**
1481
+ * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
1482
+ */
1483
+ allowUnauthenticatedRequests?: boolean;
1484
+ /**
1485
+ * Your Okta authorization server's issuer URL. For example, `https://dev-12345.okta.com/oauth2/abc`.
1486
+ */
1487
+ issuerUrl: string;
1488
+ /**
1489
+ * The Okta audience of your API, for example `api://my-api`.
1490
+ */
1491
+ audience?: string;
1815
1492
  }
1816
1493
 
1817
1494
  /**
1818
1495
  * @public
1819
1496
  */
1820
1497
  declare interface OnRequestHook {
1821
- (
1822
- request: ZuploRequest,
1823
- context: ZuploContext
1824
- ): Promise<ZuploRequest | Response> | (ZuploRequest | Response);
1498
+ (request: ZuploRequest, context: ZuploContext): Promise<ZuploRequest | Response> | (ZuploRequest | Response);
1825
1499
  }
1826
1500
 
1827
1501
  /**
1828
1502
  * @public
1829
1503
  */
1830
1504
  declare interface OnResponseSendingFinalHook {
1831
- (
1832
- response: Response,
1833
- request: ZuploRequest,
1834
- context: ZuploContext
1835
- ): Promise<void> | void;
1505
+ (response: Response, request: ZuploRequest, context: ZuploContext): Promise<void> | void;
1836
1506
  }
1837
1507
 
1838
1508
  /**
1839
1509
  * @public
1840
1510
  */
1841
1511
  declare interface OnResponseSendingHook {
1842
- (
1843
- response: Response,
1844
- request: ZuploRequest,
1845
- context: ZuploContext
1846
- ): Promise<Response> | Response;
1512
+ (response: Response, request: ZuploRequest, context: ZuploContext): Promise<Response> | Response;
1847
1513
  }
1848
1514
 
1849
1515
  declare interface OnSendingAwsLambdaEventHook {
1850
- (
1851
- request: ZuploRequest,
1852
- context: ZuploContext,
1853
- event: AwsLambdaEventV1 | AwsLambdaEventV2
1854
- ): Promise<AwsLambdaEventV1 | AwsLambdaEventV2>;
1516
+ (request: ZuploRequest, context: ZuploContext, event: AwsLambdaEventV1 | AwsLambdaEventV2): Promise<AwsLambdaEventV1 | AwsLambdaEventV2>;
1855
1517
  }
1856
1518
 
1857
1519
  /* Excluded from this release type: openApiSpecHandler */
@@ -1884,45 +1546,44 @@ declare interface OnSendingAwsLambdaEventHook {
1884
1546
  */
1885
1547
  export declare const OpenIdJwtInboundPolicy: InboundPolicyHandler<OpenIdJwtInboundPolicyInternalOptions>;
1886
1548
 
1887
- declare interface OpenIdJwtInboundPolicyInternalOptions
1888
- extends Omit<OpenIdJwtInboundPolicyOptions, "secret"> {
1889
- secret?: string | KeyLike;
1549
+ declare interface OpenIdJwtInboundPolicyInternalOptions extends Omit<OpenIdJwtInboundPolicyOptions, "secret"> {
1550
+ secret?: string | KeyLike;
1890
1551
  }
1891
1552
 
1892
1553
  /**
1893
1554
  * The options for this policy.
1894
1555
  */
1895
1556
  export declare interface OpenIdJwtInboundPolicyOptions {
1896
- /**
1897
- * The expected issuer claim in the JWT token.
1898
- */
1899
- issuer?: string;
1900
- /**
1901
- * The expected audience claim in the JWT token.
1902
- */
1903
- audience?: string;
1904
- /**
1905
- * the url of the JSON Web Key Set (JWKS) - this is used to validate the JWT token signature (either this or `secret` must be set).
1906
- */
1907
- jwkUrl?: string;
1908
- /**
1909
- * The key used to verify the signature of the JWT token (either this or `jwkUrl` must be set).
1910
- */
1911
- secret?: string;
1912
- /**
1913
- * indicates whether the request should continue if authentication fails. Defaults is `false` which means unauthenticated users will automatically receive a 401 response.
1914
- */
1915
- allowUnauthenticatedRequests?: boolean;
1916
- /**
1917
- * The name of the property in the JWT token that contains the user's unique identifier.
1918
- */
1919
- subPropertyName?: string;
1920
- /**
1921
- * Additional headers to send with the JWK request.
1922
- */
1923
- headers?: {
1924
- [k: string]: string;
1925
- };
1557
+ /**
1558
+ * The expected issuer claim in the JWT token.
1559
+ */
1560
+ issuer?: string;
1561
+ /**
1562
+ * The expected audience claim in the JWT token.
1563
+ */
1564
+ audience?: string;
1565
+ /**
1566
+ * the url of the JSON Web Key Set (JWKS) - this is used to validate the JWT token signature (either this or `secret` must be set).
1567
+ */
1568
+ jwkUrl?: string;
1569
+ /**
1570
+ * The key used to verify the signature of the JWT token (either this or `jwkUrl` must be set).
1571
+ */
1572
+ secret?: string;
1573
+ /**
1574
+ * indicates whether the request should continue if authentication fails. Defaults is `false` which means unauthenticated users will automatically receive a 401 response.
1575
+ */
1576
+ allowUnauthenticatedRequests?: boolean;
1577
+ /**
1578
+ * The name of the property in the JWT token that contains the user's unique identifier.
1579
+ */
1580
+ subPropertyName?: string;
1581
+ /**
1582
+ * Additional headers to send with the JWK request.
1583
+ */
1584
+ headers?: {
1585
+ [k: string]: string;
1586
+ };
1926
1587
  }
1927
1588
 
1928
1589
  export declare const originalFetch: typeof fetch;
@@ -1942,13 +1603,7 @@ export declare const originalFetch: typeof fetch;
1942
1603
  * @returns A Response object
1943
1604
  */
1944
1605
  export declare interface OutboundPolicyHandler<TOptions = any> {
1945
- (
1946
- response: Response,
1947
- request: ZuploRequest,
1948
- context: ZuploContext,
1949
- options: TOptions,
1950
- policyName: string
1951
- ): Promise<Response>;
1606
+ (response: Response, request: ZuploRequest, context: ZuploContext, options: TOptions, policyName: string): Promise<Response>;
1952
1607
  }
1953
1608
 
1954
1609
  /* Excluded from this release type: ParameterBaseObject */
@@ -1961,36 +1616,29 @@ export declare interface OutboundPolicyHandler<TOptions = any> {
1961
1616
  * use them (i.e. everything is converted to a string)
1962
1617
  */
1963
1618
  declare interface ParsedCorsPolicyConfiguration {
1964
- name: string;
1965
- allowCredentials: string | undefined;
1966
- maxAge: string | undefined;
1967
- allowedOrigins: string[];
1968
- allowedMethods?: string;
1969
- allowedHeaders?: string;
1970
- exposeHeaders?: string;
1619
+ name: string;
1620
+ allowCredentials: string | undefined;
1621
+ maxAge: string | undefined;
1622
+ allowedOrigins: string[];
1623
+ allowedMethods?: string;
1624
+ allowedHeaders?: string;
1625
+ exposeHeaders?: string;
1971
1626
  }
1972
1627
 
1973
1628
  declare interface ParsedRouteData extends Omit<RouteData, "corsPolicies"> {
1974
- corsPolicies: ParsedCorsPolicyConfiguration[];
1629
+ corsPolicies: ParsedCorsPolicyConfiguration[];
1975
1630
  }
1976
1631
 
1977
1632
  /* Excluded from this release type: PolicyBase */
1978
1633
 
1979
1634
  export declare interface PolicyConfiguration {
1980
- name: string;
1981
- policyType: string;
1982
- handler: HandlerDefinition;
1983
- options?: unknown;
1635
+ name: string;
1636
+ policyType: string;
1637
+ handler: HandlerDefinition;
1638
+ options?: unknown;
1984
1639
  }
1985
1640
 
1986
- declare type Primitive =
1987
- | null
1988
- | undefined
1989
- | string
1990
- | number
1991
- | boolean
1992
- | symbol
1993
- | bigint;
1641
+ declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
1994
1642
 
1995
1643
  /* Excluded from this release type: ProblemDetails */
1996
1644
 
@@ -2022,18 +1670,18 @@ export declare const PropelAuthJwtInboundPolicy: InboundPolicyHandler<PropelAuth
2022
1670
  * The options for this policy.
2023
1671
  */
2024
1672
  export declare interface PropelAuthJwtInboundPolicyOptions {
2025
- /**
2026
- * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
2027
- */
2028
- allowUnauthenticatedRequests?: boolean;
2029
- /**
2030
- * Your PropelAuth authUrl. For example, `https://6587563.propelauthtest.com`.
2031
- */
2032
- authUrl: string;
2033
- /**
2034
- * Your public (verifier) key that is used to verify access tokens. This key has a value that begins with '-----BEGIN PUBLIC KEY-----'. Make sure to remove all line breaks from the key before saving the variable.
2035
- */
2036
- verifierKey: string;
1673
+ /**
1674
+ * Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.
1675
+ */
1676
+ allowUnauthenticatedRequests?: boolean;
1677
+ /**
1678
+ * Your PropelAuth authUrl. For example, `https://6587563.propelauthtest.com`.
1679
+ */
1680
+ authUrl: string;
1681
+ /**
1682
+ * Your public (verifier) key that is used to verify access tokens. This key has a value that begins with '-----BEGIN PUBLIC KEY-----'. Make sure to remove all line breaks from the key before saving the variable.
1683
+ */
1684
+ verifierKey: string;
2037
1685
  }
2038
1686
 
2039
1687
  /* Excluded from this release type: purgeGatewayCache */
@@ -2074,44 +1722,44 @@ declare type RateLimitHeaderMode = "none" | "retry-after";
2074
1722
  * @returns A Request or a Response
2075
1723
  */
2076
1724
  declare const RateLimitInboundPolicy: InboundPolicyHandler<RateLimitInboundPolicyOptions>;
2077
- export { RateLimitInboundPolicy as BasicRateLimitInboundPolicy };
2078
- export { RateLimitInboundPolicy };
1725
+ export { RateLimitInboundPolicy as BasicRateLimitInboundPolicy }
1726
+ export { RateLimitInboundPolicy }
2079
1727
 
2080
1728
  /**
2081
1729
  * The options for this policy.
2082
1730
  */
2083
1731
  declare interface RateLimitInboundPolicyOptions {
2084
- rateLimitBy: RateLimitByType;
2085
- /**
2086
- * The max number of requests allowed in the given time window.
2087
- */
2088
- requestsAllowed: number;
2089
- /**
2090
- * The time window in which the requests are rate-limited. The count restarts after each window expires.
2091
- */
2092
- timeWindowMinutes: number;
2093
- /**
2094
- * The function that returns dynamic configuration data. Used only with `rateLimitBy=function`.
2095
- */
2096
- identifier?: {
2097
- /**
2098
- * used only with rateLimitBy=function. Specifies the export to load your custom bucket function, e.g. `default`, `rateLimitIdentifier`.
1732
+ rateLimitBy: RateLimitByType;
1733
+ /**
1734
+ * The max number of requests allowed in the given time window.
2099
1735
  */
2100
- export: string;
1736
+ requestsAllowed: number;
2101
1737
  /**
2102
- * Specifies the module to load your custom bucket function, in the format `$import(./modules/my-module)`.
1738
+ * The time window in which the requests are rate-limited. The count restarts after each window expires.
2103
1739
  */
2104
- module: string;
2105
- };
2106
- headerMode?: RateLimitHeaderMode;
2107
- /**
2108
- * If true, the policy will throw an error in the event there is a problem connecting to the rate limit service.
2109
- */
2110
- throwOnFailure?: boolean;
2111
- mode?: RateLimitMode;
1740
+ timeWindowMinutes: number;
1741
+ /**
1742
+ * The function that returns dynamic configuration data. Used only with `rateLimitBy=function`.
1743
+ */
1744
+ identifier?: {
1745
+ /**
1746
+ * used only with rateLimitBy=function. Specifies the export to load your custom bucket function, e.g. `default`, `rateLimitIdentifier`.
1747
+ */
1748
+ export: string;
1749
+ /**
1750
+ * Specifies the module to load your custom bucket function, in the format `$import(./modules/my-module)`.
1751
+ */
1752
+ module: string;
1753
+ };
1754
+ headerMode?: RateLimitHeaderMode;
1755
+ /**
1756
+ * If true, the policy will throw an error in the event there is a problem connecting to the rate limit service.
1757
+ */
1758
+ throwOnFailure?: boolean;
1759
+ mode?: RateLimitMode;
2112
1760
  }
2113
- export { RateLimitInboundPolicyOptions as BasicRateLimitInboundPolicyOptions };
2114
- export { RateLimitInboundPolicyOptions };
1761
+ export { RateLimitInboundPolicyOptions as BasicRateLimitInboundPolicyOptions }
1762
+ export { RateLimitInboundPolicyOptions }
2115
1763
 
2116
1764
  /**
2117
1765
  * The mode of the policy. If set to `async`, the policy will check if the request is over the rate limit without blocking. This can result in some requests allowed over the rate limit.
@@ -2122,30 +1770,30 @@ declare type RateLimitMode = "strict" | "async";
2122
1770
  * The options for this policy. Many of them can be overridden at the code level in a request using the `AmberfloMeteringPolicy.setRequestProperties` method.
2123
1771
  */
2124
1772
  declare interface ReadmeMeteringInboundPolicyOptions {
2125
- /**
2126
- * The API key to use when sending metrics calls to Readme.
2127
- */
2128
- apiKey: string;
2129
- /**
2130
- * This is the path to the property on `request.user` that contains the label you want to use. For example `.data.accountNumber` would read the `request.user.data.accountNumber` property.
2131
- */
2132
- userLabelPropertyPath?: string;
2133
- /**
2134
- * This is the path to the property on `request.user` that contains the e-mail of the user. For example `.data.email` would read the `request.user.data.email` property.
2135
- */
2136
- userEmailPropertyPath?: string;
2137
- /**
2138
- * Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.
2139
- */
2140
- development?: boolean;
2141
- /**
2142
- * When true, Zuplo sends the full request path (which might contain sensitive information). By default, we only send the route path which should not contain sensitive information.
2143
- */
2144
- useFullRequestPath?: boolean;
2145
- /**
2146
- * The URL to send metering events. This is useful for testing purposes.
2147
- */
2148
- url?: string;
1773
+ /**
1774
+ * The API key to use when sending metrics calls to Readme.
1775
+ */
1776
+ apiKey: string;
1777
+ /**
1778
+ * This is the path to the property on `request.user` that contains the label you want to use. For example `.data.accountNumber` would read the `request.user.data.accountNumber` property.
1779
+ */
1780
+ userLabelPropertyPath?: string;
1781
+ /**
1782
+ * This is the path to the property on `request.user` that contains the e-mail of the user. For example `.data.email` would read the `request.user.data.email` property.
1783
+ */
1784
+ userEmailPropertyPath?: string;
1785
+ /**
1786
+ * Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.
1787
+ */
1788
+ development?: boolean;
1789
+ /**
1790
+ * When true, Zuplo sends the full request path (which might contain sensitive information). By default, we only send the route path which should not contain sensitive information.
1791
+ */
1792
+ useFullRequestPath?: boolean;
1793
+ /**
1794
+ * The URL to send metering events. This is useful for testing purposes.
1795
+ */
1796
+ url?: string;
2149
1797
  }
2150
1798
 
2151
1799
  /**
@@ -2164,12 +1812,7 @@ declare interface ReadmeMeteringInboundPolicyOptions {
2164
1812
  * @param policyName - The name of the policy as set in policies.json
2165
1813
  * @returns A Request or a Response
2166
1814
  */
2167
- export declare function ReadmeMetricsInboundPolicy(
2168
- request: ZuploRequest,
2169
- context: ZuploContext,
2170
- options: ReadmeMeteringInboundPolicyOptions,
2171
- policyName: string
2172
- ): Promise<ZuploRequest<RequestGeneric>>;
1815
+ export declare function ReadmeMetricsInboundPolicy(request: ZuploRequest, context: ZuploContext, options: ReadmeMeteringInboundPolicyOptions, policyName: string): Promise<ZuploRequest<RequestGeneric>>;
2173
1816
 
2174
1817
  /* Excluded from this release type: redirectHandler */
2175
1818
 
@@ -2190,10 +1833,10 @@ export declare const RemoveHeadersInboundPolicy: InboundPolicyHandler<RemoveHead
2190
1833
  * The options for this policy.
2191
1834
  */
2192
1835
  export declare interface RemoveHeadersInboundPolicyOptions {
2193
- /**
2194
- * An array of headers to remove from the incoming request.
2195
- */
2196
- headers: string[];
1836
+ /**
1837
+ * An array of headers to remove from the incoming request.
1838
+ */
1839
+ headers: string[];
2197
1840
  }
2198
1841
 
2199
1842
  /**
@@ -2213,10 +1856,10 @@ export declare const RemoveHeadersOutboundPolicy: OutboundPolicyHandler<RemoveHe
2213
1856
  * The options for this policy.
2214
1857
  */
2215
1858
  export declare interface RemoveHeadersOutboundPolicyOptions {
2216
- /**
2217
- * An array of headers to be removed from the outgoing response.
2218
- */
2219
- headers: string[];
1859
+ /**
1860
+ * An array of headers to be removed from the outgoing response.
1861
+ */
1862
+ headers: string[];
2220
1863
  }
2221
1864
 
2222
1865
  /**
@@ -2236,10 +1879,10 @@ export declare const RemoveQueryParamsInboundPolicy: InboundPolicyHandler<Remove
2236
1879
  * The options for this policy.
2237
1880
  */
2238
1881
  export declare interface RemoveQueryParamsInboundPolicyOptions {
2239
- /**
2240
- * An array of query parameters to be removed from the incoming request.
2241
- */
2242
- params: string[];
1882
+ /**
1883
+ * An array of query parameters to be removed from the incoming request.
1884
+ */
1885
+ params: string[];
2243
1886
  }
2244
1887
 
2245
1888
  /**
@@ -2259,35 +1902,41 @@ export declare const ReplaceStringOutboundPolicy: OutboundPolicyHandler<ReplaceS
2259
1902
  * The options for this policy.
2260
1903
  */
2261
1904
  export declare interface ReplaceStringOutboundPolicyOptions {
2262
- /**
2263
- * The type of string replacement to perform.
2264
- */
2265
- mode: "regexp" | "string";
2266
- /**
2267
- * The pattern to match.
2268
- */
2269
- match: string;
2270
- /**
2271
- * The value to each match is replaced with.
2272
- */
2273
- replaceWith: string;
1905
+ /**
1906
+ * The type of string replacement to perform.
1907
+ */
1908
+ mode: "regexp" | "string";
1909
+ /**
1910
+ * The pattern to match.
1911
+ */
1912
+ match: string;
1913
+ /**
1914
+ * The value to each match is replaced with.
1915
+ */
1916
+ replaceWith: string;
2274
1917
  }
2275
1918
 
1919
+ /* Excluded from this release type: RequestContext */
1920
+
2276
1921
  /**
2277
1922
  * The types of the properties in a request
2278
1923
  * @public
2279
1924
  */
2280
1925
  declare interface RequestGeneric extends RequestInitGeneric {
2281
- Query?: RequestQueryDefault;
1926
+ Query?: RequestQueryDefault;
2282
1927
  }
2283
1928
 
1929
+ /* Excluded from this release type: RequestHandlerFunction */
1930
+
1931
+ /* Excluded from this release type: RequestHandlerProxy */
1932
+
2284
1933
  /**
2285
1934
  * The types of the properties in a request init object
2286
1935
  * @public
2287
1936
  */
2288
1937
  declare interface RequestInitGeneric {
2289
- UserData?: UserDataDefault;
2290
- Params?: RequestParamsDefault;
1938
+ UserData?: UserDataDefault;
1939
+ Params?: RequestParamsDefault;
2291
1940
  }
2292
1941
 
2293
1942
  declare type RequestParamsDefault = Record<string, string>;
@@ -2311,14 +1960,14 @@ export declare const RequestSizeLimitInboundPolicy: InboundPolicyHandler<Request
2311
1960
  * The options for this policy.
2312
1961
  */
2313
1962
  export declare interface RequestSizeLimitInboundPolicyOptions {
2314
- /**
2315
- * The maximum size of the request in bytes.
2316
- */
2317
- maxSizeInBytes: number;
2318
- /**
2319
- * If true, the policy will reject any request with a `content-length` header in excess of `maxSizeInBytes` bytes value, but will not verify the actual size of the request. This is more efficient and offers slightly better memory usage but should only be used if you trust/control the clients calling the gateway to send an accurate content-length. If false, the gateway will actually verify the request size and reject any request with a size in excess of the stated maximum.
2320
- */
2321
- trustContentLengthHeader?: boolean;
1963
+ /**
1964
+ * The maximum size of the request in bytes.
1965
+ */
1966
+ maxSizeInBytes: number;
1967
+ /**
1968
+ * If true, the policy will reject any request with a `content-length` header in excess of `maxSizeInBytes` bytes value, but will not verify the actual size of the request. This is more efficient and offers slightly better memory usage but should only be used if you trust/control the clients calling the gateway to send an accurate content-length. If false, the gateway will actually verify the request size and reject any request with a size in excess of the stated maximum.
1969
+ */
1970
+ trustContentLengthHeader?: boolean;
2322
1971
  }
2323
1972
 
2324
1973
  /**
@@ -2326,8 +1975,8 @@ export declare interface RequestSizeLimitInboundPolicyOptions {
2326
1975
  * @public
2327
1976
  */
2328
1977
  export declare interface RequestUser<TUserData> {
2329
- sub: string;
2330
- data: TUserData;
1978
+ sub: string;
1979
+ data: TUserData;
2331
1980
  }
2332
1981
 
2333
1982
  /**
@@ -2355,18 +2004,18 @@ export declare const RequestValidationInboundPolicy: InboundPolicyHandler<Reques
2355
2004
  * The options for this policy.
2356
2005
  */
2357
2006
  export declare interface RequestValidationInboundPolicyOptions {
2358
- /**
2359
- * The log level to use when logging validation errors.
2360
- */
2361
- logLevel?: "error" | "warn" | "info" | "debug";
2362
- validateBody?: ValidationOptions;
2363
- validateQueryParameters?: ValidationOptions1;
2364
- validatePathParameters?: ValidationOptions2;
2365
- validateHeaders?: ValidationOptions3;
2366
- /**
2367
- * Whether to include the request in the logs.
2368
- */
2369
- includeRequestInLogs?: boolean;
2007
+ /**
2008
+ * The log level to use when logging validation errors.
2009
+ */
2010
+ logLevel?: "error" | "warn" | "info" | "debug";
2011
+ validateBody?: ValidationOptions;
2012
+ validateQueryParameters?: ValidationOptions1;
2013
+ validatePathParameters?: ValidationOptions2;
2014
+ validateHeaders?: ValidationOptions3;
2015
+ /**
2016
+ * Whether to include the request in the logs.
2017
+ */
2018
+ includeRequestInLogs?: boolean;
2370
2019
  }
2371
2020
 
2372
2021
  /**
@@ -2400,26 +2049,21 @@ export declare const RequireOriginInboundPolicy: InboundPolicyHandler<RequireOri
2400
2049
  * The options for this policy.
2401
2050
  */
2402
2051
  export declare interface RequireOriginInboundPolicyOptions {
2403
- /**
2404
- * A comma separated string containing valid origins.
2405
- */
2406
- origins: string;
2407
- /**
2408
- * The `detail` of the HTTP Problem response, if the origin is missing or disallowed.
2409
- */
2410
- failureDetail?: string;
2052
+ /**
2053
+ * A comma separated string containing valid origins.
2054
+ */
2055
+ origins: string;
2056
+ /**
2057
+ * The `detail` of the HTTP Problem response, if the origin is missing or disallowed.
2058
+ */
2059
+ failureDetail?: string;
2411
2060
  }
2412
2061
 
2413
- declare type ResolveRequestParams<
2414
- TParams extends RequestParamsDefault | undefined,
2415
- > = TParams extends RequestParamsDefault ? TParams : RequestParamsDefault;
2062
+ declare type ResolveRequestParams<TParams extends RequestParamsDefault | undefined> = TParams extends RequestParamsDefault ? TParams : RequestParamsDefault;
2416
2063
 
2417
- declare type ResolveRequestQuery<
2418
- TQuery extends RequestQueryDefault | undefined,
2419
- > = TQuery extends RequestQueryDefault ? TQuery : RequestQueryDefault;
2064
+ declare type ResolveRequestQuery<TQuery extends RequestQueryDefault | undefined> = TQuery extends RequestQueryDefault ? TQuery : RequestQueryDefault;
2420
2065
 
2421
- declare type ResolveUserData<TUserData extends UserDataDefault | undefined> =
2422
- TUserData extends UserDataDefault ? TUserData : UserDataDefault;
2066
+ declare type ResolveUserData<TUserData extends UserDataDefault | undefined> = TUserData extends UserDataDefault ? TUserData : UserDataDefault;
2423
2067
 
2424
2068
  /* Excluded from this release type: ResponsesDefinition */
2425
2069
 
@@ -2427,47 +2071,46 @@ declare type ResolveUserData<TUserData extends UserDataDefault | undefined> =
2427
2071
 
2428
2072
  /* Excluded from this release type: ResponseSentEvent */
2429
2073
 
2430
- export declare interface RouteConfiguration
2431
- extends Omit<BuildRouteConfiguration, "raw"> {
2432
- /**
2433
- * @deprecated Please switch to "raw().operationId"
2434
- */
2435
- operationId?: string;
2436
- /**
2437
- * @deprecated Please switch to "raw().summary"
2438
- */
2439
- summary?: string;
2440
- /**
2441
- * @deprecated Please switch to "raw().tags"
2442
- */
2443
- tags?: string[];
2444
- /**
2445
- * @deprecated Please switch to "raw().parameters"
2446
- */
2447
- parameters?: ParameterDefinition[];
2448
- /**
2449
- * @deprecated Please switch to "raw().responses"
2450
- */
2451
- responses?: ResponsesDefinition;
2452
- raw<T>(): T;
2074
+ export declare interface RouteConfiguration extends Omit<BuildRouteConfiguration, "raw"> {
2075
+ /**
2076
+ * @deprecated Please switch to "raw().operationId"
2077
+ */
2078
+ operationId?: string;
2079
+ /**
2080
+ * @deprecated Please switch to "raw().summary"
2081
+ */
2082
+ summary?: string;
2083
+ /**
2084
+ * @deprecated Please switch to "raw().tags"
2085
+ */
2086
+ tags?: string[];
2087
+ /**
2088
+ * @deprecated Please switch to "raw().parameters"
2089
+ */
2090
+ parameters?: ParameterDefinition[];
2091
+ /**
2092
+ * @deprecated Please switch to "raw().responses"
2093
+ */
2094
+ responses?: ResponsesDefinition;
2095
+ raw<T>(): T;
2453
2096
  }
2454
2097
 
2455
2098
  export declare interface RouteData {
2456
- /**
2099
+ /**
2457
2100
  /* @deprecated This property is not used and will be removed in future versions
2458
2101
  */
2459
- info?: OpenAPIV3_1.InfoObject;
2460
- /**
2102
+ info?: OpenAPIV3_1.InfoObject;
2103
+ /**
2461
2104
  /* @deprecated This property is not used and will be removed in future versions
2462
2105
  */
2463
- versions: VersionData[];
2464
- /**
2465
- * @minItems 0
2466
- */
2467
- routes: RouteConfiguration[];
2468
- policies?: PolicyConfiguration[];
2469
- corsPolicies?: CorsPolicyConfiguration[];
2470
- requestErrorHandler?: HandlerDefinition;
2106
+ versions: VersionData[];
2107
+ /**
2108
+ * @minItems 0
2109
+ */
2110
+ routes: RouteConfiguration[];
2111
+ policies?: PolicyConfiguration[];
2112
+ corsPolicies?: CorsPolicyConfiguration[];
2113
+ requestErrorHandler?: HandlerDefinition;
2471
2114
  }
2472
2115
 
2473
2116
  /* Excluded from this release type: RouteHandler */
@@ -2485,24 +2128,21 @@ export declare interface RouteData {
2485
2128
  * @public
2486
2129
  */
2487
2130
  export declare class RuntimeError extends Error {
2488
- extensionMembers: Record<string, unknown> | undefined;
2489
- constructor(message: string, options?: ErrorOptions);
2490
- constructor(
2491
- info: {
2492
- message: string;
2493
- extensionMembers?: Record<string, unknown>;
2494
- },
2495
- options?: ErrorOptions
2496
- );
2131
+ extensionMembers: Record<string, unknown> | undefined;
2132
+ constructor(message: string, options?: ErrorOptions);
2133
+ constructor(info: {
2134
+ message: string;
2135
+ extensionMembers?: Record<string, unknown>;
2136
+ }, options?: ErrorOptions);
2497
2137
  }
2498
2138
 
2499
2139
  /* Excluded from this release type: RuntimeExtensions */
2500
2140
 
2501
2141
  export declare interface RuntimeExtensionsFunction {
2502
- (runtime: RuntimeExtensions): Promise<void>;
2142
+ (runtime: RuntimeExtensions): Promise<void>;
2503
2143
  }
2504
2144
 
2505
- declare abstract class RuntimePlugin {}
2145
+ /* Excluded from this release type: RuntimePlugin */
2506
2146
 
2507
2147
  /* Excluded from this release type: RuntimeSettings */
2508
2148
 
@@ -2546,10 +2186,10 @@ export declare const SetBodyInboundPolicy: InboundPolicyHandler<SetBodyInboundPo
2546
2186
  * The options for this policy.
2547
2187
  */
2548
2188
  export declare interface SetBodyInboundPolicyOptions {
2549
- /**
2550
- * The value to set for the body.
2551
- */
2552
- body: string;
2189
+ /**
2190
+ * The value to set for the body.
2191
+ */
2192
+ body: string;
2553
2193
  }
2554
2194
 
2555
2195
  /**
@@ -2573,23 +2213,23 @@ export declare const SetHeadersInboundPolicy: InboundPolicyHandler<SetHeadersInb
2573
2213
  * The options for this policy.
2574
2214
  */
2575
2215
  export declare interface SetHeadersInboundPolicyOptions {
2576
- /**
2577
- * An array of headers to set in the request. By default, headers will be overwritten if they already exists in the request, specify the overwrite property to change this behavior.
2578
- */
2579
- headers: {
2580
- /**
2581
- * The name of the header.
2582
- */
2583
- name: string;
2584
- /**
2585
- * The value of the header.
2586
- */
2587
- value: string;
2588
2216
  /**
2589
- * Overwrite the value if the header is already present in the request.
2217
+ * An array of headers to set in the request. By default, headers will be overwritten if they already exists in the request, specify the overwrite property to change this behavior.
2590
2218
  */
2591
- overwrite?: boolean;
2592
- }[];
2219
+ headers: {
2220
+ /**
2221
+ * The name of the header.
2222
+ */
2223
+ name: string;
2224
+ /**
2225
+ * The value of the header.
2226
+ */
2227
+ value: string;
2228
+ /**
2229
+ * Overwrite the value if the header is already present in the request.
2230
+ */
2231
+ overwrite?: boolean;
2232
+ }[];
2593
2233
  }
2594
2234
 
2595
2235
  /**
@@ -2609,29 +2249,26 @@ export declare const SetHeadersOutboundPolicy: OutboundPolicyHandler<SetHeadersO
2609
2249
  * The options for this policy.
2610
2250
  */
2611
2251
  export declare interface SetHeadersOutboundPolicyOptions {
2612
- /**
2613
- * An array of headers to set on the response. By default, headers will be overwritten if they already exists in the response, specify the overwrite property to change this behavior.
2614
- */
2615
- headers: {
2616
2252
  /**
2617
- * The name of the header.
2253
+ * An array of headers to set on the response. By default, headers will be overwritten if they already exists in the response, specify the overwrite property to change this behavior.
2618
2254
  */
2619
- name: string;
2620
- /**
2621
- * The value of the header.
2622
- */
2623
- value: string;
2624
- /**
2625
- * Overwrite the value if the header is already present in the response.
2626
- */
2627
- overwrite?: boolean;
2628
- }[];
2255
+ headers: {
2256
+ /**
2257
+ * The name of the header.
2258
+ */
2259
+ name: string;
2260
+ /**
2261
+ * The value of the header.
2262
+ */
2263
+ value: string;
2264
+ /**
2265
+ * Overwrite the value if the header is already present in the response.
2266
+ */
2267
+ overwrite?: boolean;
2268
+ }[];
2629
2269
  }
2630
2270
 
2631
- export declare function setMoesifContext(
2632
- context: ZuploContext,
2633
- moesifContext: MoesifContext
2634
- ): void;
2271
+ export declare function setMoesifContext(context: ZuploContext, moesifContext: MoesifContext): void;
2635
2272
 
2636
2273
  /**
2637
2274
  * Adds or sets query parameters on the incoming request.
@@ -2650,23 +2287,23 @@ export declare const SetQueryParamsInboundPolicy: InboundPolicyHandler<SetQueryP
2650
2287
  * The options for this policy.
2651
2288
  */
2652
2289
  export declare interface SetQueryParamsInboundPolicyOptions {
2653
- /**
2654
- * An array of query params to set in the request. By default, query parameters will be overwritten if they already exist in the request, specify the overwrite property to change this behavior.
2655
- */
2656
- params: {
2657
- /**
2658
- * The name of the param.
2659
- */
2660
- name: string;
2661
- /**
2662
- * The value of the param.
2663
- */
2664
- value: string;
2665
2290
  /**
2666
- * Overwrite the value if the param is already present in the request.
2291
+ * An array of query params to set in the request. By default, query parameters will be overwritten if they already exist in the request, specify the overwrite property to change this behavior.
2667
2292
  */
2668
- overwrite?: boolean;
2669
- }[];
2293
+ params: {
2294
+ /**
2295
+ * The name of the param.
2296
+ */
2297
+ name: string;
2298
+ /**
2299
+ * The value of the param.
2300
+ */
2301
+ value: string;
2302
+ /**
2303
+ * Overwrite the value if the param is already present in the request.
2304
+ */
2305
+ overwrite?: boolean;
2306
+ }[];
2670
2307
  }
2671
2308
 
2672
2309
  /**
@@ -2686,14 +2323,14 @@ export declare const SetStatusOutboundPolicy: OutboundPolicyHandler<SetStatusOut
2686
2323
  * The options for this policy.
2687
2324
  */
2688
2325
  export declare interface SetStatusOutboundPolicyOptions {
2689
- /**
2690
- * The status code to be used in the response.
2691
- */
2692
- status?: number;
2693
- /**
2694
- * The statusText to be used in the response.
2695
- */
2696
- statusText?: string;
2326
+ /**
2327
+ * The status code to be used in the response.
2328
+ */
2329
+ status?: number;
2330
+ /**
2331
+ * The statusText to be used in the response.
2332
+ */
2333
+ statusText?: string;
2697
2334
  }
2698
2335
 
2699
2336
  /**
@@ -2713,10 +2350,10 @@ export declare const SleepInboundPolicy: InboundPolicyHandler<SleepInboundPolicy
2713
2350
  * The options for this policy.
2714
2351
  */
2715
2352
  export declare interface SleepInboundPolicyOptions {
2716
- /**
2717
- * The number of milliseconds to delay the request.
2718
- */
2719
- sleepInMs: number;
2353
+ /**
2354
+ * The number of milliseconds to delay the request.
2355
+ */
2356
+ sleepInMs: number;
2720
2357
  }
2721
2358
 
2722
2359
  /* Excluded from this release type: StandardEnv */
@@ -2741,38 +2378,35 @@ export declare interface SleepInboundPolicyOptions {
2741
2378
  * @returns A Request or a Response
2742
2379
  */
2743
2380
  export declare class StripeWebhookVerificationInboundPolicy extends InboundPolicy<StripeWebhookVerificationInboundPolicyOptions> {
2744
- handler(
2745
- request: ZuploRequest,
2746
- context: ZuploContext
2747
- ): Promise<ZuploRequest<RequestGeneric> | Response>;
2381
+ handler(request: ZuploRequest, context: ZuploContext): Promise<Response | ZuploRequest<RequestGeneric>>;
2748
2382
  }
2749
2383
 
2750
2384
  /**
2751
2385
  * The options for this policy.
2752
2386
  */
2753
2387
  export declare interface StripeWebhookVerificationInboundPolicyOptions {
2754
- /**
2755
- * The signing secret for the webhook.
2756
- */
2757
- signingSecret: string;
2758
- /**
2759
- * The allowed clock skew in seconds between the time the webhook signature was crated and the current time.
2760
- */
2761
- tolerance?: number;
2388
+ /**
2389
+ * The signing secret for the webhook.
2390
+ */
2391
+ signingSecret: string;
2392
+ /**
2393
+ * The allowed clock skew in seconds between the time the webhook signature was crated and the current time.
2394
+ */
2395
+ tolerance?: number;
2762
2396
  }
2763
2397
 
2764
2398
  /* Excluded from this release type: SubscriptionMeters */
2765
2399
 
2766
2400
  declare interface SumoLogicLoggingOptions {
2767
- url: string;
2768
- name?: string;
2769
- category?: string;
2401
+ url: string;
2402
+ name?: string;
2403
+ category?: string;
2770
2404
  }
2771
2405
 
2772
2406
  export declare class SumoLogicLoggingPlugin extends LogPlugin {
2773
- private options;
2774
- constructor(options: SumoLogicLoggingOptions);
2775
- /* Excluded from this release type: getTransport */
2407
+ private options;
2408
+ constructor(options: SumoLogicLoggingOptions);
2409
+ /* Excluded from this release type: getTransport */
2776
2410
  }
2777
2411
 
2778
2412
  /**
@@ -2806,20 +2440,20 @@ export declare const SupabaseJwtInboundPolicy: InboundPolicyHandler<SupabaseJwtI
2806
2440
  * The options for this policy.
2807
2441
  */
2808
2442
  export declare interface SupabaseJwtInboundPolicyOptions {
2809
- /**
2810
- * The key used to verify the signature of the JWT token.
2811
- */
2812
- secret: string;
2813
- /**
2814
- * Indicates whether the request should continue if authentication fails. Default is `false` which means unauthenticated users will automatically receive a 401 response.
2815
- */
2816
- allowUnauthenticatedRequests?: boolean;
2817
- /**
2818
- * Any claims that must be present for authentication to succeed - multiple valid values can be specified for each claim.
2819
- */
2820
- requiredClaims?: {
2821
- [k: string]: string[];
2822
- };
2443
+ /**
2444
+ * The key used to verify the signature of the JWT token.
2445
+ */
2446
+ secret: string;
2447
+ /**
2448
+ * Indicates whether the request should continue if authentication fails. Default is `false` which means unauthenticated users will automatically receive a 401 response.
2449
+ */
2450
+ allowUnauthenticatedRequests?: boolean;
2451
+ /**
2452
+ * Any claims that must be present for authentication to succeed - multiple valid values can be specified for each claim.
2453
+ */
2454
+ requiredClaims?: {
2455
+ [k: string]: string[];
2456
+ };
2823
2457
  }
2824
2458
 
2825
2459
  /* Excluded from this release type: SYSTEM_LOGGER */
@@ -2830,6 +2464,10 @@ export declare interface SupabaseJwtInboundPolicyOptions {
2830
2464
 
2831
2465
  /* Excluded from this release type: SystemRuntimePlugin */
2832
2466
 
2467
+ /* Excluded from this release type: TelemetryInitializationOptions */
2468
+
2469
+ /* Excluded from this release type: TelemetryPlugin */
2470
+
2833
2471
  /**
2834
2472
  * Uses Azure Active Directory to add an Authorization header to the request in order to authenticate requests using Azure identity.
2835
2473
  *
@@ -2858,26 +2496,26 @@ export declare const UpstreamAzureAdServiceAuthInboundPolicy: InboundPolicyHandl
2858
2496
  * The options for this policy.
2859
2497
  */
2860
2498
  export declare interface UpstreamAzureAdServiceAuthInboundPolicyOptions {
2861
- /**
2862
- * Azure Active Directory Tenant ID.
2863
- */
2864
- activeDirectoryTenantId: string;
2865
- /**
2866
- * The Application (client) ID of the Azure AD App Registration.
2867
- */
2868
- activeDirectoryClientId: string;
2869
- /**
2870
- * The client secret of the Azure AD App Registration.
2871
- */
2872
- activeDirectoryClientSecret: string;
2873
- /**
2874
- * The number of times to retry fetching the token in the event of a failure..
2875
- */
2876
- tokenRetries?: number;
2877
- /**
2878
- * The number of seconds less than the token expiration to cache the token.
2879
- */
2880
- expirationOffsetSeconds?: number;
2499
+ /**
2500
+ * Azure Active Directory Tenant ID.
2501
+ */
2502
+ activeDirectoryTenantId: string;
2503
+ /**
2504
+ * The Application (client) ID of the Azure AD App Registration.
2505
+ */
2506
+ activeDirectoryClientId: string;
2507
+ /**
2508
+ * The client secret of the Azure AD App Registration.
2509
+ */
2510
+ activeDirectoryClientSecret: string;
2511
+ /**
2512
+ * The number of times to retry fetching the token in the event of a failure..
2513
+ */
2514
+ tokenRetries?: number;
2515
+ /**
2516
+ * The number of seconds less than the token expiration to cache the token.
2517
+ */
2518
+ expirationOffsetSeconds?: number;
2881
2519
  }
2882
2520
 
2883
2521
  /**
@@ -2909,18 +2547,18 @@ export declare const UpstreamFirebaseAdminAuthInboundPolicy: InboundPolicyHandle
2909
2547
  * The options for this policy.
2910
2548
  */
2911
2549
  export declare interface UpstreamFirebaseAdminAuthInboundPolicyOptions {
2912
- /**
2913
- * The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.
2914
- */
2915
- serviceAccountJson: string;
2916
- /**
2917
- * The number of times to retry fetching the token in the event of a failure.
2918
- */
2919
- tokenRetries?: number;
2920
- /**
2921
- * The number of seconds less than the token expiration to cache the token.
2922
- */
2923
- expirationOffsetSeconds?: number;
2550
+ /**
2551
+ * The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.
2552
+ */
2553
+ serviceAccountJson: string;
2554
+ /**
2555
+ * The number of times to retry fetching the token in the event of a failure.
2556
+ */
2557
+ tokenRetries?: number;
2558
+ /**
2559
+ * The number of seconds less than the token expiration to cache the token.
2560
+ */
2561
+ expirationOffsetSeconds?: number;
2924
2562
  }
2925
2563
 
2926
2564
  /**
@@ -2952,35 +2590,35 @@ export declare const UpstreamFirebaseUserAuthInboundPolicy: InboundPolicyHandler
2952
2590
  * The options for this policy.
2953
2591
  */
2954
2592
  export declare interface UpstreamFirebaseUserAuthInboundPolicyOptions {
2955
- /**
2956
- * The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.
2957
- */
2958
- serviceAccountJson: string;
2959
- /**
2960
- * The userId to use as the custom token's subject.
2961
- */
2962
- userId?: string;
2963
- /**
2964
- * The property on the incoming request.user object to retrieve the value of the userId.
2965
- */
2966
- userIdPropertyPath?: string;
2967
- /**
2968
- * Additional claims to include in the custom token's payload.
2969
- */
2970
- developerClaims?: Record<string, string | number | boolean | null>;
2971
- /**
2972
- * The Firebase Web API Key (found in project settings)
2973
- * @see {@link https://firebase.google.com/docs/projects/api-keys|Firebase API Keys}.
2974
- */
2975
- webApiKey: string;
2976
- /**
2977
- * The number of times to retry fetching the token in the event of a failure.
2978
- */
2979
- tokenRetries?: number;
2980
- /**
2981
- * The number of seconds less than the token expiration to cache the token.
2982
- */
2983
- expirationOffsetSeconds?: number;
2593
+ /**
2594
+ * The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.
2595
+ */
2596
+ serviceAccountJson: string;
2597
+ /**
2598
+ * The userId to use as the custom token's subject.
2599
+ */
2600
+ userId?: string;
2601
+ /**
2602
+ * The property on the incoming request.user object to retrieve the value of the userId.
2603
+ */
2604
+ userIdPropertyPath?: string;
2605
+ /**
2606
+ * Additional claims to include in the custom token's payload.
2607
+ */
2608
+ developerClaims?: Record<string, string | number | boolean | null>;
2609
+ /**
2610
+ * The Firebase Web API Key (found in project settings)
2611
+ * @see {@link https://firebase.google.com/docs/projects/api-keys|Firebase API Keys}.
2612
+ */
2613
+ webApiKey: string;
2614
+ /**
2615
+ * The number of times to retry fetching the token in the event of a failure.
2616
+ */
2617
+ tokenRetries?: number;
2618
+ /**
2619
+ * The number of seconds less than the token expiration to cache the token.
2620
+ */
2621
+ expirationOffsetSeconds?: number;
2984
2622
  }
2985
2623
 
2986
2624
  /**
@@ -3010,14 +2648,14 @@ export declare const UpstreamGcpJwtInboundPolicy: InboundPolicyHandler<UpstreamG
3010
2648
  * The options for this policy.
3011
2649
  */
3012
2650
  export declare interface UpstreamGcpJwtInboundPolicyOptions {
3013
- /**
3014
- * The audience for the minted JWT. See the document {@link https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement|AuthRequirement} for details.
3015
- */
3016
- audience: string;
3017
- /**
3018
- * The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.
3019
- */
3020
- serviceAccountJson: string;
2651
+ /**
2652
+ * The audience for the minted JWT. See the document {@link https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement|AuthRequirement} for details.
2653
+ */
2654
+ audience: string;
2655
+ /**
2656
+ * The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.
2657
+ */
2658
+ serviceAccountJson: string;
3021
2659
  }
3022
2660
 
3023
2661
  /**
@@ -3055,31 +2693,31 @@ export declare const UpstreamGcpServiceAuthInboundPolicy: InboundPolicyHandler<U
3055
2693
  * The options for this policy.
3056
2694
  */
3057
2695
  export declare interface UpstreamGcpServiceAuthInboundPolicyOptions {
3058
- /**
3059
- * The audience for the service to be called. This is typically the URL of your service endpoint like 'https://my-service-a2ev-uc.a.run.app'. If calling a Google API, leave this empty.
3060
- */
3061
- audience?: string;
3062
- /**
3063
- * The scopes to grant the access token. See {@link https://developers.google.com/identity/protocols/oauth2/scopes|documentation} for details. This is only set with calling a Google API. If calling a service like Cloud Run, etc. leave this empty.
3064
- */
3065
- scopes?: string[];
3066
- /**
3067
- * The Google Service Account key in JSON format. Note you can load this from environment variables using the `$env(ENV_VAR)` syntax.
3068
- * @see {@link https://developers.google.com/workspace/guides/create-credentials|Create access credentials}.
3069
- */
3070
- serviceAccountJson: string;
3071
- /**
3072
- * The number of times to retry fetching the token in the event of a failure.
3073
- */
3074
- tokenRetries?: number;
3075
- /**
3076
- * The number of seconds less than the token expiration to cache the token.
3077
- */
3078
- expirationOffsetSeconds?: number;
3079
- /**
3080
- * This is an advanced option that should only be used if you do not want to persist information in ZoneCache.
3081
- */
3082
- useMemoryCacheOnly?: boolean;
2696
+ /**
2697
+ * The audience for the service to be called. This is typically the URL of your service endpoint like 'https://my-service-a2ev-uc.a.run.app'. If calling a Google API, leave this empty.
2698
+ */
2699
+ audience?: string;
2700
+ /**
2701
+ * The scopes to grant the access token. See {@link https://developers.google.com/identity/protocols/oauth2/scopes|documentation} for details. This is only set with calling a Google API. If calling a service like Cloud Run, etc. leave this empty.
2702
+ */
2703
+ scopes?: string[];
2704
+ /**
2705
+ * The Google Service Account key in JSON format. Note you can load this from environment variables using the `$env(ENV_VAR)` syntax.
2706
+ * @see {@link https://developers.google.com/workspace/guides/create-credentials|Create access credentials}.
2707
+ */
2708
+ serviceAccountJson: string;
2709
+ /**
2710
+ * The number of times to retry fetching the token in the event of a failure.
2711
+ */
2712
+ tokenRetries?: number;
2713
+ /**
2714
+ * The number of seconds less than the token expiration to cache the token.
2715
+ */
2716
+ expirationOffsetSeconds?: number;
2717
+ /**
2718
+ * This is an advanced option that should only be used if you do not want to persist information in ZoneCache.
2719
+ */
2720
+ useMemoryCacheOnly?: boolean;
3083
2721
  }
3084
2722
 
3085
2723
  /* Excluded from this release type: urlForwardHandler */
@@ -3120,102 +2758,84 @@ export declare const ValidateJsonSchemaInbound: InboundPolicyHandler<ValidateJso
3120
2758
  * The options for this policy.
3121
2759
  */
3122
2760
  export declare interface ValidateJsonSchemaInboundOptions {
3123
- /**
3124
- * The JSON schema to validate against.
3125
- */
3126
- validator: string;
2761
+ /**
2762
+ * The JSON schema to validate against.
2763
+ */
2764
+ validator: string;
3127
2765
  }
3128
2766
 
3129
2767
  /**
3130
2768
  * The action to perform when validation fails.
3131
2769
  */
3132
- declare type ValidationOptions =
3133
- | "none"
3134
- | "log-only"
3135
- | "reject-and-log"
3136
- | "reject-only";
2770
+ declare type ValidationOptions = "none" | "log-only" | "reject-and-log" | "reject-only";
3137
2771
 
3138
2772
  /**
3139
2773
  * The action to perform when validation fails.
3140
2774
  */
3141
- declare type ValidationOptions1 =
3142
- | "none"
3143
- | "log-only"
3144
- | "reject-and-log"
3145
- | "reject-only";
2775
+ declare type ValidationOptions1 = "none" | "log-only" | "reject-and-log" | "reject-only";
3146
2776
 
3147
2777
  /**
3148
2778
  * The action to perform when validation fails.
3149
2779
  */
3150
- declare type ValidationOptions2 =
3151
- | "none"
3152
- | "log-only"
3153
- | "reject-and-log"
3154
- | "reject-only";
2780
+ declare type ValidationOptions2 = "none" | "log-only" | "reject-and-log" | "reject-only";
3155
2781
 
3156
2782
  /**
3157
2783
  * The action to perform when validation fails.
3158
2784
  */
3159
- declare type ValidationOptions3 =
3160
- | "none"
3161
- | "log-only"
3162
- | "reject-and-log"
3163
- | "reject-only";
2785
+ declare type ValidationOptions3 = "none" | "log-only" | "reject-and-log" | "reject-only";
3164
2786
 
3165
2787
  export declare interface VersionData {
3166
- name: string;
3167
- pathPrefix: string;
3168
- info?: OpenAPIV3_1.InfoObject;
3169
- /**
3170
- * The project relative path to the OpenAPI spec.
3171
- */
3172
- openApiFile?: string;
3173
- tags?: Omit<OpenAPIV3_1.TagObject, "externalDocs">[];
3174
- /**
3175
- * If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored.
3176
- */
3177
- excludeFromOpenApi?: boolean;
3178
- /**
3179
- * If true, schema validation found in the OpenAPI spec will be enforced on requests/responses.
3180
- */
3181
- enforceOpenApi?: boolean;
2788
+ name: string;
2789
+ pathPrefix: string;
2790
+ info?: OpenAPIV3_1.InfoObject;
2791
+ /**
2792
+ * The project relative path to the OpenAPI spec.
2793
+ */
2794
+ openApiFile?: string;
2795
+ tags?: Omit<OpenAPIV3_1.TagObject, "externalDocs">[];
2796
+ /**
2797
+ * If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored.
2798
+ */
2799
+ excludeFromOpenApi?: boolean;
2800
+ /**
2801
+ * If true, schema validation found in the OpenAPI spec will be enforced on requests/responses.
2802
+ */
2803
+ enforceOpenApi?: boolean;
3182
2804
  }
3183
2805
 
3184
2806
  declare interface VMWareLogInsightLoggingOptions {
3185
- url: string;
3186
- /**
3187
- * An array of string tuples to replace within the text field of a log entry.
3188
- * @example
3189
- * ```
3190
- * [
3191
- * ["'", ""],
3192
- * ['"', ""],
3193
- * ["\\n", ""],
3194
- * ["\\", ""],
3195
- * ["*", ""],
3196
- * ["&", ""],
3197
- * [":", "="],
3198
- * ]
3199
- * ```
3200
- */
3201
- textReplacements?: [string, string][];
3202
- /**
3203
- * The unique agent identifier of the logger.
3204
- */
3205
- agentId?: string;
3206
- fields?: Record<string, string | number | boolean>;
3207
- onMessageSending?: (event: LogInsightLogEntry) => LogInsightLogEntry;
2807
+ url: string;
2808
+ /**
2809
+ * An array of string tuples to replace within the text field of a log entry.
2810
+ * @example
2811
+ * ```
2812
+ * [
2813
+ * ["'", ""],
2814
+ * ['"', ""],
2815
+ * ["\\n", ""],
2816
+ * ["\\", ""],
2817
+ * ["*", ""],
2818
+ * ["&", ""],
2819
+ * [":", "="],
2820
+ * ]
2821
+ * ```
2822
+ */
2823
+ textReplacements?: [string, string][];
2824
+ /**
2825
+ * The unique agent identifier of the logger.
2826
+ */
2827
+ agentId?: string;
2828
+ fields?: Record<string, string | number | boolean>;
2829
+ onMessageSending?: (event: LogInsightLogEntry) => LogInsightLogEntry;
3208
2830
  }
3209
2831
 
3210
2832
  export declare class VMWareLogInsightLoggingPlugin extends LogPlugin {
3211
- private options;
3212
- constructor(options: VMWareLogInsightLoggingOptions);
3213
- /* Excluded from this release type: getTransport */
2833
+ private options;
2834
+ constructor(options: VMWareLogInsightLoggingOptions);
2835
+ /* Excluded from this release type: getTransport */
3214
2836
  }
3215
2837
 
3216
- declare interface WaitUntilFunc {
3217
- (promise: Promise<any>): void;
3218
- }
2838
+ /* Excluded from this release type: WaitUntilFunc */
3219
2839
 
3220
2840
  /* Excluded from this release type: webSocketHandler */
3221
2841
 
@@ -3236,56 +2856,52 @@ declare interface WaitUntilFunc {
3236
2856
  * @returns A Request or a Response
3237
2857
  */
3238
2858
  export declare class XmlToJsonOutboundPolicy extends OutboundPolicy<XmlToJsonPolicyOptions> {
3239
- private parser;
3240
- private parseOnStatusCodes;
3241
- constructor(options: XmlToJsonPolicyOptions, policyName: string);
3242
- handler(
3243
- response: Response,
3244
- request: ZuploRequest,
3245
- context: ZuploContext
3246
- ): Promise<Response>;
2859
+ private parser;
2860
+ private parseOnStatusCodes;
2861
+ constructor(options: XmlToJsonPolicyOptions, policyName: string);
2862
+ handler(response: Response, request: ZuploRequest, context: ZuploContext): Promise<Response>;
3247
2863
  }
3248
2864
 
3249
2865
  /**
3250
2866
  * The options for this policy.
3251
2867
  */
3252
2868
  export declare interface XmlToJsonPolicyOptions {
3253
- /**
3254
- * Remove namespace string from tag and attribute names.
3255
- */
3256
- removeNSPrefix?: boolean;
3257
- /**
3258
- * Ignore processing instruction tags. i.e. `<?elementnames <fred>, <bert>, <harry> ?>`.
3259
- */
3260
- ignoreProcessingInstructions?: boolean;
3261
- /**
3262
- * Ignore declarations. i.e. `<?xml version="1.0"?>`.
3263
- */
3264
- ignoreDeclarations?: boolean;
3265
- /**
3266
- * Ignore tag attributes.
3267
- */
3268
- ignoreAttributes?: boolean;
3269
- /**
3270
- * At particular point, if you don't want to parse a tag and it's nested tags then you can set their path in stopNodes. You can also set tags which should not be processed irrespective of their path using * as the wildcard.
3271
- */
3272
- stopNodes?: string[];
3273
- /**
3274
- * The prefix of attribute names in the resulting JS object.
3275
- */
3276
- attributeNamePrefix?: string;
3277
- /**
3278
- * Text value of a tag is parsed to #text property by default.
3279
- */
3280
- textNodeName?: string;
3281
- /**
3282
- * Remove surrounding whitespace from tag or attribute value.
3283
- */
3284
- trimValues?: boolean;
3285
- /**
3286
- * A list of status codes and ranges "200-299, 304" that should the XML parser should run on. If not set, the parser will run on all status codes.
3287
- */
3288
- parseOnStatusCodes?: string | number[];
2869
+ /**
2870
+ * Remove namespace string from tag and attribute names.
2871
+ */
2872
+ removeNSPrefix?: boolean;
2873
+ /**
2874
+ * Ignore processing instruction tags. i.e. `<?elementnames <fred>, <bert>, <harry> ?>`.
2875
+ */
2876
+ ignoreProcessingInstructions?: boolean;
2877
+ /**
2878
+ * Ignore declarations. i.e. `<?xml version="1.0"?>`.
2879
+ */
2880
+ ignoreDeclarations?: boolean;
2881
+ /**
2882
+ * Ignore tag attributes.
2883
+ */
2884
+ ignoreAttributes?: boolean;
2885
+ /**
2886
+ * At particular point, if you don't want to parse a tag and it's nested tags then you can set their path in stopNodes. You can also set tags which should not be processed irrespective of their path using * as the wildcard.
2887
+ */
2888
+ stopNodes?: string[];
2889
+ /**
2890
+ * The prefix of attribute names in the resulting JS object.
2891
+ */
2892
+ attributeNamePrefix?: string;
2893
+ /**
2894
+ * Text value of a tag is parsed to #text property by default.
2895
+ */
2896
+ textNodeName?: string;
2897
+ /**
2898
+ * Remove surrounding whitespace from tag or attribute value.
2899
+ */
2900
+ trimValues?: boolean;
2901
+ /**
2902
+ * A list of status codes and ranges "200-299, 304" that should the XML parser should run on. If not set, the parser will run on all status codes.
2903
+ */
2904
+ parseOnStatusCodes?: string | number[];
3289
2905
  }
3290
2906
 
3291
2907
  /**
@@ -3296,21 +2912,19 @@ export declare interface XmlToJsonPolicyOptions {
3296
2912
  * not replicated.
3297
2913
  */
3298
2914
  export declare class ZoneCache<T = any> {
3299
- #private;
3300
- constructor(name: string, context: ZuploContext);
3301
- /* Excluded from this release type: __constructor */
3302
- get(key: string): Promise<T | undefined>;
3303
- put(key: string, data: T, ttlSeconds: number): Promise<void>;
3304
- delete(key: string): Promise<void>;
3305
- deleteFallback(key: string): Promise<void>;
3306
- logDebug(...messages: unknown[]): void;
2915
+ #private;
2916
+ constructor(name: string, context: ZuploContext);
2917
+ /* Excluded from this release type: __constructor */
2918
+ get(key: string): Promise<T | undefined>;
2919
+ put(key: string, data: T, ttlSeconds: number): Promise<void>;
2920
+ delete(key: string): Promise<void>;
2921
+ deleteFallback(key: string): Promise<void>;
2922
+ logDebug(...messages: unknown[]): void;
3307
2923
  }
3308
2924
 
3309
2925
  /* Excluded from this release type: ZuploContext */
3310
2926
 
3311
- declare interface ZuploEventContext {
3312
- waitUntil: WaitUntilFunc;
3313
- }
2927
+ /* Excluded from this release type: ZuploEventContext */
3314
2928
 
3315
2929
  /**
3316
2930
  * ZuploRequest includes various parsed objects from the
@@ -3318,67 +2932,63 @@ declare interface ZuploEventContext {
3318
2932
  * standard {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | Request}.
3319
2933
  * @public
3320
2934
  */
3321
- export declare class ZuploRequest<
3322
- TOptions extends RequestGeneric = RequestGeneric,
3323
- > extends Request {
3324
- #private;
3325
- constructor(input: string | Request, init?: ZuploRequestInit<TOptions>);
3326
- /**
3327
- * A dictionary of query-string values
3328
- *
3329
- * @example
3330
- * The url `https://example.com?foo=bar` would return
3331
- * the following query object:
3332
- *
3333
- * ```
3334
- * const foo = request.query.foo;
3335
- * ```
3336
- *
3337
- * @readonly
3338
- */
3339
- get query(): Readonly<ResolveRequestQuery<TOptions["Query"]>>;
3340
- /**
3341
- * If you use tokens in your route’s URL, they are
3342
- * automatically parsed into properties on the params
3343
- * property of your request.
3344
- *
3345
- * @example
3346
- * The route `/products/:productId/vendors/:vendorId`
3347
- * would include two params:
3348
- *
3349
- * ```
3350
- * const productId = request.params.productId;
3351
- * const vendorId = request.params.vendorId;
3352
- * ```
3353
- * @readonly
3354
- */
3355
- get params(): Readonly<ResolveRequestParams<TOptions["Params"]>>;
3356
- /**
3357
- * An optional object identifying a ‘user’.
3358
- *
3359
- * @remarks
3360
- * If undefined this typically means the request is
3361
- * anonymous. If present, the user object will have
3362
- * a sub property that is a unique identifier for
3363
- * that user. There is also an optional data property
3364
- * that is of any type that typically contains other
3365
- * information about the user. When using JWT tokens
3366
- * you’ll usually find all the claims here.
3367
- *
3368
- * @readonly
3369
- */
3370
- user?: RequestUser<ResolveUserData<TOptions["UserData"]>>;
2935
+ export declare class ZuploRequest<TOptions extends RequestGeneric = RequestGeneric> extends Request {
2936
+ #private;
2937
+ constructor(input: string | Request, init?: ZuploRequestInit<TOptions>);
2938
+ /**
2939
+ * A dictionary of query-string values
2940
+ *
2941
+ * @example
2942
+ * The url `https://example.com?foo=bar` would return
2943
+ * the following query object:
2944
+ *
2945
+ * ```
2946
+ * const foo = request.query.foo;
2947
+ * ```
2948
+ *
2949
+ * @readonly
2950
+ */
2951
+ get query(): Readonly<ResolveRequestQuery<TOptions["Query"]>>;
2952
+ /**
2953
+ * If you use tokens in your route’s URL, they are
2954
+ * automatically parsed into properties on the params
2955
+ * property of your request.
2956
+ *
2957
+ * @example
2958
+ * The route `/products/:productId/vendors/:vendorId`
2959
+ * would include two params:
2960
+ *
2961
+ * ```
2962
+ * const productId = request.params.productId;
2963
+ * const vendorId = request.params.vendorId;
2964
+ * ```
2965
+ * @readonly
2966
+ */
2967
+ get params(): Readonly<ResolveRequestParams<TOptions["Params"]>>;
2968
+ /**
2969
+ * An optional object identifying a ‘user’.
2970
+ *
2971
+ * @remarks
2972
+ * If undefined this typically means the request is
2973
+ * anonymous. If present, the user object will have
2974
+ * a sub property that is a unique identifier for
2975
+ * that user. There is also an optional data property
2976
+ * that is of any type that typically contains other
2977
+ * information about the user. When using JWT tokens
2978
+ * you’ll usually find all the claims here.
2979
+ *
2980
+ * @readonly
2981
+ */
2982
+ user?: RequestUser<ResolveUserData<TOptions["UserData"]>>;
3371
2983
  }
3372
2984
 
3373
2985
  /**
3374
2986
  * The initialization values of a request
3375
2987
  * @public
3376
2988
  */
3377
- declare interface ZuploRequestInit<
3378
- TOptions extends RequestInitGeneric = RequestInitGeneric,
3379
- > extends RequestInit {
3380
- params?: ResolveRequestParams<TOptions["Params"]>;
3381
- user?: ResolveUserData<TOptions["UserData"]>;
2989
+ declare interface ZuploRequestInit<TOptions extends RequestInitGeneric = RequestInitGeneric> extends RequestInit {
2990
+ params?: ResolveRequestParams<TOptions["Params"]>;
2991
+ user?: ResolveUserData<TOptions["UserData"]>;
3382
2992
  }
3383
2993
 
3384
- export {};
2994
+ export { }