@zuplo/runtime 6.52.18 → 6.52.20
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/out/esm/index.js +45 -45
- package/out/types/index.d.ts +72 -0
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -5788,6 +5788,73 @@ export declare interface OpenIdJwtInboundPolicyOptions {
|
|
|
5788
5788
|
};
|
|
5789
5789
|
}
|
|
5790
5790
|
|
|
5791
|
+
/**
|
|
5792
|
+
* OpenMeter is a usage metering service. This policy allows
|
|
5793
|
+
* you to send metering calls for each API to their event ingest endpoint.
|
|
5794
|
+
*
|
|
5795
|
+
* @title OpenMeter Metering
|
|
5796
|
+
* @public
|
|
5797
|
+
* @param request - The ZuploRequest
|
|
5798
|
+
* @param context - The ZuploContext
|
|
5799
|
+
* @param options - The policy options set in policies.json
|
|
5800
|
+
* @param policyName - The name of the policy as set in policies.json
|
|
5801
|
+
* @returns A Request or a Response
|
|
5802
|
+
*/
|
|
5803
|
+
export declare function OpenMeterMeteringInboundPolicy(
|
|
5804
|
+
request: ZuploRequest,
|
|
5805
|
+
context: ZuploContext,
|
|
5806
|
+
options: OpenMeterMeteringInboundPolicy_2,
|
|
5807
|
+
policyName: string
|
|
5808
|
+
): Promise<ZuploRequest<RequestGeneric_2>>;
|
|
5809
|
+
|
|
5810
|
+
/**
|
|
5811
|
+
* Send usage metrics to OpenMeter.
|
|
5812
|
+
* @public
|
|
5813
|
+
*/
|
|
5814
|
+
declare interface OpenMeterMeteringInboundPolicy_2 {
|
|
5815
|
+
/**
|
|
5816
|
+
* The URL of the OpenMeter API endpoint.
|
|
5817
|
+
*/
|
|
5818
|
+
url: string;
|
|
5819
|
+
/**
|
|
5820
|
+
* The API key to use when sending metering calls to OpenMeter.
|
|
5821
|
+
*/
|
|
5822
|
+
apiKey?: string;
|
|
5823
|
+
/**
|
|
5824
|
+
* The type of event to use when sending metering calls to OpenMeter (overridable in code).
|
|
5825
|
+
*/
|
|
5826
|
+
eventType?: string;
|
|
5827
|
+
/**
|
|
5828
|
+
* The value to use when sending metering calls to OpenMeter (overridable in code).
|
|
5829
|
+
*/
|
|
5830
|
+
meterValue?: number;
|
|
5831
|
+
/**
|
|
5832
|
+
* The path to the property on `request.user` contains the customer ID. For example `.data.accountNumber` would read the `request.user.data.accountNumber` property.
|
|
5833
|
+
*/
|
|
5834
|
+
customerIdPropertyPath?: string;
|
|
5835
|
+
/**
|
|
5836
|
+
* The default customerId (subject) for all metering calls - overridable in code and by `customerIdPropertyPath`.
|
|
5837
|
+
*/
|
|
5838
|
+
customerId?: string;
|
|
5839
|
+
/**
|
|
5840
|
+
* The source identifier for the event (e.g. service name).
|
|
5841
|
+
*/
|
|
5842
|
+
source?: string;
|
|
5843
|
+
/**
|
|
5844
|
+
* A dictionary of additional data to be sent to OpenMeter (extensible in code).
|
|
5845
|
+
*/
|
|
5846
|
+
data?: {
|
|
5847
|
+
[k: string]: unknown;
|
|
5848
|
+
};
|
|
5849
|
+
/**
|
|
5850
|
+
* A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to OpenMeter.
|
|
5851
|
+
*/
|
|
5852
|
+
statusCodes: string | number[];
|
|
5853
|
+
}
|
|
5854
|
+
|
|
5855
|
+
export declare type OpenMeterMeteringInboundPolicyOptions =
|
|
5856
|
+
OpenMeterMeteringInboundPolicy_2;
|
|
5857
|
+
|
|
5791
5858
|
/**
|
|
5792
5859
|
* A policy that can modify the outgoing HTTP response before it is returned
|
|
5793
5860
|
* to the client. Outbound policies run after the handler has generated a response.
|
|
@@ -6553,6 +6620,11 @@ export declare function redirectHandler(
|
|
|
6553
6620
|
context: ZuploContext
|
|
6554
6621
|
): Promise<Response>;
|
|
6555
6622
|
|
|
6623
|
+
export declare function redirectLegacyDevPortal(
|
|
6624
|
+
request: ZuploRequest,
|
|
6625
|
+
context: ZuploContext
|
|
6626
|
+
): Promise<Response>;
|
|
6627
|
+
|
|
6556
6628
|
/**
|
|
6557
6629
|
*
|
|
6558
6630
|
* @export
|