@zuplo/runtime 6.66.7 → 6.66.9

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.
@@ -5615,6 +5615,59 @@ export declare interface MoesifInboundPolicyOptions {
5615
5615
  logResponseBody?: boolean;
5616
5616
  }
5617
5617
 
5618
+ /**
5619
+ * Monetization inbound policy for API key validation and usage metering.
5620
+ *
5621
+ * @title Monetization Inbound
5622
+ * @hidden
5623
+ * @param request - The ZuploRequest
5624
+ * @param context - The ZuploContext
5625
+ * @param options - The policy options set in policies.json
5626
+ * @param policyName - The name of the policy as set in policies.json
5627
+ * @returns A Request or a Response
5628
+ */
5629
+ export declare class MonetizationInboundPolicy extends InboundPolicy<MonetizationInboundPolicyOptions> {
5630
+ #private;
5631
+ constructor(options: MonetizationInboundPolicyOptions, policyName: string);
5632
+ handler(
5633
+ request: ZuploRequest,
5634
+ context: ZuploContext
5635
+ ): Promise<ZuploRequest | Response>;
5636
+ }
5637
+
5638
+ /**
5639
+ * The options for this policy.
5640
+ * @public
5641
+ */
5642
+ export declare interface MonetizationInboundPolicyOptions {
5643
+ /**
5644
+ * The name of the header with the key.
5645
+ */
5646
+ authHeader?: string;
5647
+ /**
5648
+ * The scheme used on the header.
5649
+ */
5650
+ authScheme?: string;
5651
+ /**
5652
+ * 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.
5653
+ */
5654
+ cacheTtlSeconds?: number;
5655
+ /**
5656
+ * The meters to be used by the policy against the subscription quota.
5657
+ */
5658
+ meters: {
5659
+ /**
5660
+ * This interface was referenced by `undefined`'s JSON-Schema definition
5661
+ * via the `patternProperty` "^.*$".
5662
+ */
5663
+ [k: string]: number;
5664
+ };
5665
+ /**
5666
+ * A list of successful status codes and ranges "200-299, 304" that should trigger a metering call.
5667
+ */
5668
+ meterOnStatusCodes?: string | number[];
5669
+ }
5670
+
5618
5671
  declare interface MultiRequests {
5619
5672
  RequestReference: RequestReference;
5620
5673
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.66.7",
4
+ "version": "6.66.9",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {