@zuplo/runtime 5.1582.0 → 5.1584.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.
Files changed (2) hide show
  1. package/index.d.ts +63 -61
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -28,15 +28,15 @@ export declare function AmberfloMeteringInboundPolicy(request: ZuploRequest, con
28
28
  */
29
29
  export declare interface AmberfloMeteringInboundPolicyOptions {
30
30
  /**
31
- * The API key to use when sending metering calls to Amberflo
31
+ * The API key to use when sending metering calls to Amberflo.
32
32
  */
33
33
  apiKey: string;
34
34
  /**
35
- * The name of the meter to use when sending metering calls to Amberflo (overridable in code)
35
+ * The name of the meter to use when sending metering calls to Amberflo (overridable in code).
36
36
  */
37
37
  meterApiName?: string;
38
38
  /**
39
- * The value to use when sending metering calls to Amberflo (overridable in code)
39
+ * The value to use when sending metering calls to Amberflo (overridable in code).
40
40
  */
41
41
  meterValue?: number;
42
42
  /**
@@ -44,21 +44,21 @@ export declare interface AmberfloMeteringInboundPolicyOptions {
44
44
  */
45
45
  customerIdPropertyPath?: string;
46
46
  /**
47
- * The default customerId for all metering calls - overridable in code and by `customerIdPropertyPath`
47
+ * The default customerId for all metering calls - overridable in code and by `customerIdPropertyPath`.
48
48
  */
49
49
  customerId?: string;
50
50
  /**
51
- * A dictionary of dimensions to be sent to Amberflo (extensible in code)
51
+ * A dictionary of dimensions to be sent to Amberflo (extensible in code).
52
52
  */
53
53
  dimensions?: {
54
54
  [k: string]: string;
55
55
  };
56
56
  /**
57
- * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo - defaults to `result.ok` (200-299) if not set.
57
+ * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo.
58
58
  */
59
59
  statusCodes?: string | number[];
60
60
  /**
61
- * Optional, the URL to send metering events to (defaults to https://app.amberflo.io/ingest). This is useful for testing purposes.
61
+ * The URL to send metering events. This is useful for testing purposes.
62
62
  */
63
63
  url?: string;
64
64
  }
@@ -99,6 +99,7 @@ declare interface AmberfloMeteringProperties extends Omit<AmberfloMeteringIngest
99
99
  *
100
100
  * @title API Key Authentication
101
101
  * @public
102
+ * @unlisted
102
103
  * @param request - The ZuploRequest
103
104
  * @param context - The ZuploContext
104
105
  * @param unparsedOptions - The policy options set in policies.json
@@ -129,8 +130,8 @@ export declare interface ApiAuthKeyInboundPolicyOptions {
129
130
  * For more information on Zuplo's API Key Management service and options enabling
130
131
  * self-serve API Key management see the following resources:
131
132
  *
132
- * @see {@link https://zuplo.com/docs/articles/api-key-management|API Key Authentication Overview}
133
- * @see {@link https://zuplo.com/docs/articles/api-key-api|API Key Management API}
133
+ * - {@link https://zuplo.com/docs/articles/api-key-management|API Key Authentication Overview}
134
+ * - {@link https://zuplo.com/docs/articles/api-key-api|API Key Management API}
134
135
  *
135
136
  * @title API Key Authentication
136
137
  * @public
@@ -147,15 +148,15 @@ export declare function ApiKeyInboundPolicy(request: ZuploRequest, context: Zupl
147
148
  */
148
149
  export declare interface ApiKeyInboundPolicyOptions {
149
150
  /**
150
- * The name of the header with the key. Defaults to `Authorization`
151
+ * The name of the header with the key.
151
152
  */
152
153
  authHeader?: string;
153
154
  /**
154
- * The scheme used on the header. Defaults to `Bearer`
155
+ * The scheme used on the header.
155
156
  */
156
157
  authScheme?: string;
157
158
  /**
158
- * Optional - The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project. You can contact `support@zuplo.com` to create a new bucket.
159
+ * The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project.
159
160
  */
160
161
  bucketName?: string;
161
162
  /**
@@ -545,7 +546,7 @@ export declare function CachingInboundPolicy(request: ZuploRequest, context: Zup
545
546
  */
546
547
  export declare interface CachingInboundPolicyOptions {
547
548
  /**
548
- * Optional, 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.
549
+ * 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.
549
550
  */
550
551
  cacheId?: string;
551
552
  /**
@@ -557,15 +558,15 @@ export declare interface CachingInboundPolicyOptions {
557
558
  */
558
559
  headers?: string[];
559
560
  /**
560
- * HTTP Methods to be cached - defaults to GET if none specified. Valid methods are: GET, POST, PUT, PATCH, DELETE, HEAD
561
+ * HTTP Methods to be cached. Valid methods are: GET, POST, PUT, PATCH, DELETE, HEAD.
561
562
  */
562
- cacheHttpMethods?: string[];
563
+ cacheHttpMethods?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD")[];
563
564
  /**
564
565
  * The timeout of the cache in seconds
565
566
  */
566
567
  expirationSecondsTtl?: number;
567
568
  /**
568
- * Response status codes to be cached - defaults to 200, 206, 301, 302, 303, 404, 410 if none specified
569
+ * Response status codes to be cached.
569
570
  */
570
571
  statusCodes?: number[];
571
572
  }
@@ -990,7 +991,7 @@ export declare interface GeoFilterInboundPolicyOptions {
990
991
  block?: GeoSpec;
991
992
  allow?: GeoSpec;
992
993
  /**
993
- * Optional, defaults to true. Specifies whether unknown geo-location parameters should be ignored (allowed through).
994
+ * Specifies whether unknown geo-location parameters should be ignored (allowed through).
994
995
  */
995
996
  ignoreUnknown?: boolean;
996
997
  }
@@ -2349,19 +2350,19 @@ declare interface MetricsType {
2349
2350
  */
2350
2351
  export declare interface MockApiInboundOptions {
2351
2352
  /**
2352
- * Optional. 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.
2353
+ * 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.
2353
2354
  */
2354
2355
  random?: boolean;
2355
2356
  /**
2356
- * Optional. 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`.
2357
+ * 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`.
2357
2358
  */
2358
2359
  responsePrefixFilter?: string;
2359
2360
  /**
2360
- * Optional. Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).
2361
+ * Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).
2361
2362
  */
2362
2363
  contentType?: string;
2363
2364
  /**
2364
- * Optional. Specify the name of the example to select. If not specified, the first matching response is used (or random).
2365
+ * Specify the name of the example to select. If not specified, the first matching response is used (or random).
2365
2366
  */
2366
2367
  exampleName?: string;
2367
2368
  }
@@ -2415,15 +2416,15 @@ export declare function MoesifInboundPolicy(request: ZuploRequest, context: Zupl
2415
2416
  */
2416
2417
  export declare interface MoesifInboundPolicyOptions {
2417
2418
  /**
2418
- * Your Moesif application ID (required)
2419
+ * Your Moesif application ID.
2419
2420
  */
2420
2421
  applicationId: string;
2421
2422
  /**
2422
- * Set to false to disable sending the request body to Moesif (optional)
2423
+ * Set to false to disable sending the request body to Moesif.
2423
2424
  */
2424
2425
  logRequestBody?: boolean;
2425
2426
  /**
2426
- * Set to false to disable sending the response body to Moesif (optional)
2427
+ * Set to false to disable sending the response body to Moesif.
2427
2428
  */
2428
2429
  logResponseBody?: boolean;
2429
2430
  }
@@ -2545,7 +2546,7 @@ export declare interface OpenIdJwtInboundPolicyOptions {
2545
2546
  */
2546
2547
  issuer?: string;
2547
2548
  /**
2548
- * The expected audience claim in the JWT token (optional).
2549
+ * The expected audience claim in the JWT token.
2549
2550
  */
2550
2551
  audience?: string;
2551
2552
  /**
@@ -2561,7 +2562,7 @@ export declare interface OpenIdJwtInboundPolicyOptions {
2561
2562
  */
2562
2563
  allowUnauthenticatedRequests?: boolean;
2563
2564
  /**
2564
- * The name of the property in the JWT token that contains the user's unique identifier. Defaults to `sub`.
2565
+ * The name of the property in the JWT token that contains the user's unique identifier.
2565
2566
  */
2566
2567
  subPropertyName?: string;
2567
2568
  /**
@@ -2854,23 +2855,23 @@ declare interface ReadmeMeteringInboundPolicyOptions {
2854
2855
  */
2855
2856
  apiKey: string;
2856
2857
  /**
2857
- * Optional - defaults to '.sub'. 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.
2858
+ * 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.
2858
2859
  */
2859
2860
  userLabelPropertyPath?: string;
2860
2861
  /**
2861
- * Optional - defaults to empty. 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.
2862
+ * 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.
2862
2863
  */
2863
2864
  userEmailPropertyPath?: string;
2864
2865
  /**
2865
- * Optional. Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.
2866
+ * Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.
2866
2867
  */
2867
2868
  development?: boolean;
2868
2869
  /**
2869
- * Optional - defaults to false. 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.
2870
+ * 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.
2870
2871
  */
2871
2872
  useFullRequestPath?: boolean;
2872
2873
  /**
2873
- * Optional, the URL to send metering events to (defaults to https://metrics.readme.io/request). This is useful for testing purposes.
2874
+ * The URL to send metering events. This is useful for testing purposes.
2874
2875
  */
2875
2876
  url?: string;
2876
2877
  }
@@ -2919,7 +2920,7 @@ export declare const RemoveHeadersInboundPolicy: InboundPolicyHandler<RemoveHead
2919
2920
  */
2920
2921
  export declare interface RemoveHeadersInboundPolicyOptions {
2921
2922
  /**
2922
- * A list of headers to be removed from the incoming request
2923
+ * An array of headers to remove from the incoming request.
2923
2924
  */
2924
2925
  headers: string[];
2925
2926
  }
@@ -2942,7 +2943,7 @@ export declare const RemoveHeadersOutboundPolicy: OutboundPolicyHandler<RemoveHe
2942
2943
  */
2943
2944
  export declare interface RemoveHeadersOutboundPolicyOptions {
2944
2945
  /**
2945
- * A list of headers to be removed from the incoming request
2946
+ * An array of headers to be removed from the outgoing response.
2946
2947
  */
2947
2948
  headers: string[];
2948
2949
  }
@@ -2965,7 +2966,7 @@ export declare const RemoveQueryParamsInboundPolicy: InboundPolicyHandler<Remove
2965
2966
  */
2966
2967
  export declare interface RemoveQueryParamsInboundPolicyOptions {
2967
2968
  /**
2968
- * Array of query parameters to be removed
2969
+ * An array of query parameters to be removed from the incoming request.
2969
2970
  */
2970
2971
  params: string[];
2971
2972
  }
@@ -3062,15 +3063,15 @@ export declare const RequestValidationInboundPolicy: InboundPolicyHandler<Reques
3062
3063
  */
3063
3064
  export declare interface RequestValidationInboundPolicyOptions {
3064
3065
  /**
3065
- * Optional. Specify one of the log levels: 'error | warn | info | debug'. Default: info
3066
+ * The log level to use when logging validation errors.
3066
3067
  */
3067
- logLevel?: string;
3068
+ logLevel?: "error" | "warn" | "info" | "debug";
3068
3069
  validateBody?: ValidationOptions;
3069
3070
  validateQueryParameters?: ValidationOptions1;
3070
3071
  validatePathParameters?: ValidationOptions2;
3071
3072
  validateHeaders?: ValidationOptions3;
3072
3073
  /**
3073
- * Optional. Specify whether to include the request in the logs. Default: false
3074
+ * Whether to include the request in the logs.
3074
3075
  */
3075
3076
  includeRequestInLogs?: boolean;
3076
3077
  }
@@ -3317,7 +3318,7 @@ export declare const SetHeadersInboundPolicy: InboundPolicyHandler<SetHeadersInb
3317
3318
  */
3318
3319
  export declare interface SetHeadersInboundPolicyOptions {
3319
3320
  /**
3320
- * An array of name and value objects (with an optional `overwrite` boolean)
3321
+ * 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.
3321
3322
  */
3322
3323
  headers: {
3323
3324
  /**
@@ -3353,19 +3354,19 @@ export declare const SetHeadersOutboundPolicy: OutboundPolicyHandler<SetHeadersO
3353
3354
  */
3354
3355
  export declare interface SetHeadersOutboundPolicyOptions {
3355
3356
  /**
3356
- * An array of name and value objects (with an optional `overwrite` boolean)
3357
+ * 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.
3357
3358
  */
3358
3359
  headers: {
3359
3360
  /**
3360
- * The name of the header
3361
+ * The name of the header.
3361
3362
  */
3362
3363
  name: string;
3363
3364
  /**
3364
- * The value of the header
3365
+ * The value of the header.
3365
3366
  */
3366
3367
  value: string;
3367
3368
  /**
3368
- * Overwrite the value if the header is already present in the request
3369
+ * Overwrite the value if the header is already present in the response.
3369
3370
  */
3370
3371
  overwrite?: boolean;
3371
3372
  }[];
@@ -3391,7 +3392,7 @@ export declare const SetQueryParamsInboundPolicy: InboundPolicyHandler<SetQueryP
3391
3392
  */
3392
3393
  export declare interface SetQueryParamsInboundPolicyOptions {
3393
3394
  /**
3394
- * An array of name and value objects (with an optional `overwrite` boolean)
3395
+ * 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.
3395
3396
  */
3396
3397
  params: {
3397
3398
  /**
@@ -3403,7 +3404,7 @@ export declare interface SetQueryParamsInboundPolicyOptions {
3403
3404
  */
3404
3405
  value: string;
3405
3406
  /**
3406
- * Overwrite the value if the param is already present in the request
3407
+ * Overwrite the value if the param is already present in the request.
3407
3408
  */
3408
3409
  overwrite?: boolean;
3409
3410
  }[];
@@ -3431,7 +3432,7 @@ export declare interface SetStatusOutboundPolicyOptions {
3431
3432
  */
3432
3433
  status?: number;
3433
3434
  /**
3434
- * The statusText to be used in the response (optional)
3435
+ * The statusText to be used in the response.
3435
3436
  */
3436
3437
  statusText?: string;
3437
3438
  }
@@ -3567,11 +3568,11 @@ export declare interface UpstreamAzureAdServiceAuthInboundPolicyOptions {
3567
3568
  */
3568
3569
  activeDirectoryClientSecret: string;
3569
3570
  /**
3570
- * The number of times to retry fetching the token in the event of a failure. Defaults to 3.
3571
+ * The number of times to retry fetching the token in the event of a failure..
3571
3572
  */
3572
3573
  tokenRetries?: number;
3573
3574
  /**
3574
- * The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.
3575
+ * The number of seconds less than the token expiration to cache the token.
3575
3576
  */
3576
3577
  expirationOffsetSeconds?: number;
3577
3578
  }
@@ -3610,11 +3611,11 @@ export declare interface UpstreamFirebaseAdminAuthInboundPolicyOptions {
3610
3611
  */
3611
3612
  serviceAccountJson: string;
3612
3613
  /**
3613
- * The number of times to retry fetching the token in the event of a failure. Defaults to 3.
3614
+ * The number of times to retry fetching the token in the event of a failure.
3614
3615
  */
3615
3616
  tokenRetries?: number;
3616
3617
  /**
3617
- * The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.
3618
+ * The number of seconds less than the token expiration to cache the token.
3618
3619
  */
3619
3620
  expirationOffsetSeconds?: number;
3620
3621
  }
@@ -3661,20 +3662,20 @@ export declare interface UpstreamFirebaseUserAuthInboundPolicyOptions {
3661
3662
  */
3662
3663
  userIdPropertyPath?: string;
3663
3664
  /**
3664
- * Optional additional claims to include in the custom token's payload.
3665
+ * Additional claims to include in the custom token's payload.
3665
3666
  */
3666
3667
  developerClaims?: Record<string, string | number | boolean | null>;
3667
3668
  /**
3668
3669
  * The Firebase Web API Key (found in project settings)
3669
- * @see {@link https://firebase.google.com/docs/projects/api-keys|Firebase API Keys}
3670
+ * @see {@link https://firebase.google.com/docs/projects/api-keys|Firebase API Keys}.
3670
3671
  */
3671
3672
  webApiKey: string;
3672
3673
  /**
3673
- * The number of times to retry fetching the token in the event of a failure. Defaults to 3.
3674
+ * The number of times to retry fetching the token in the event of a failure.
3674
3675
  */
3675
3676
  tokenRetries?: number;
3676
3677
  /**
3677
- * The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.
3678
+ * The number of seconds less than the token expiration to cache the token.
3678
3679
  */
3679
3680
  expirationOffsetSeconds?: number;
3680
3681
  }
@@ -3707,7 +3708,7 @@ export declare const UpstreamGcpJwtInboundPolicy: InboundPolicyHandler<UpstreamG
3707
3708
  */
3708
3709
  export declare interface UpstreamGcpJwtInboundPolicyOptions {
3709
3710
  /**
3710
- * The audience for the minted JWT. Refer to https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement.
3711
+ * 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.
3711
3712
  */
3712
3713
  audience: string;
3713
3714
  /**
@@ -3718,7 +3719,6 @@ export declare interface UpstreamGcpJwtInboundPolicyOptions {
3718
3719
 
3719
3720
  /**
3720
3721
  * Creates an ID Token from Google's OAuth service and attaches it to the outgoing request. Useful when calling GCP services that are secured with GCP IAM.
3721
- * @see {@link https://cloud.google.com/functions/docs/securing/authenticating|Authenticating for invocation}
3722
3722
  *
3723
3723
  * @remarks
3724
3724
  * This policy allows you to delegate authentication and authorization to your
@@ -3735,6 +3735,8 @@ export declare interface UpstreamGcpJwtInboundPolicyOptions {
3735
3735
  * We recommend reading the `serviceAccountJson` from environment variables (so it
3736
3736
  * is not checked in to source control) using the `$env(ENV_VAR)` syntax.
3737
3737
  *
3738
+ * For information on how Google's service based auth works see {@link https://cloud.google.com/functions/docs/securing/authenticating|Authenticating for invocation}
3739
+ *
3738
3740
  * @title Upstream GCP Service Auth
3739
3741
  * @public
3740
3742
  * @param request - The ZuploRequest
@@ -3759,11 +3761,11 @@ export declare interface UpstreamGcpServiceAuthInboundPolicyOptions {
3759
3761
  */
3760
3762
  serviceAccountJson: string;
3761
3763
  /**
3762
- * The number of times to retry fetching the token in the event of a failure. Defaults to 3.
3764
+ * The number of times to retry fetching the token in the event of a failure.
3763
3765
  */
3764
3766
  tokenRetries?: number;
3765
3767
  /**
3766
- * The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.
3768
+ * The number of seconds less than the token expiration to cache the token.
3767
3769
  */
3768
3770
  expirationOffsetSeconds?: number;
3769
3771
  /**
@@ -3835,22 +3837,22 @@ export declare interface ValidateJsonSchemaInboundOptions {
3835
3837
  }
3836
3838
 
3837
3839
  /**
3838
- * Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none
3840
+ * The action to perform when validation fails.
3839
3841
  */
3840
3842
  declare type ValidationOptions = "none" | "log-only" | "reject-and-log" | "reject-only";
3841
3843
 
3842
3844
  /**
3843
- * Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none
3845
+ * The action to perform when validation fails.
3844
3846
  */
3845
3847
  declare type ValidationOptions1 = "none" | "log-only" | "reject-and-log" | "reject-only";
3846
3848
 
3847
3849
  /**
3848
- * Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none
3850
+ * The action to perform when validation fails.
3849
3851
  */
3850
3852
  declare type ValidationOptions2 = "none" | "log-only" | "reject-and-log" | "reject-only";
3851
3853
 
3852
3854
  /**
3853
- * Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none
3855
+ * The action to perform when validation fails.
3854
3856
  */
3855
3857
  declare type ValidationOptions3 = "none" | "log-only" | "reject-and-log" | "reject-only";
3856
3858
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
- "version": "5.1582.0",
3
+ "version": "5.1584.0",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "exports": {