@zuplo/runtime 6.66.13 → 6.66.15
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 +44 -44
- package/out/esm/index.js.map +1 -1
- package/out/types/index.d.ts +52 -0
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -5779,6 +5779,25 @@ export declare interface MoesifInboundPolicyOptions {
|
|
|
5779
5779
|
*/
|
|
5780
5780
|
export declare class MonetizationInboundPolicy extends InboundPolicy<MonetizationInboundPolicyOptions> {
|
|
5781
5781
|
#private;
|
|
5782
|
+
/**
|
|
5783
|
+
* Set the monetization subscription data for the current request.
|
|
5784
|
+
*
|
|
5785
|
+
* @param context - The ZuploContext
|
|
5786
|
+
* @param subscription - The subscription to set.
|
|
5787
|
+
*/
|
|
5788
|
+
static setSubscriptionData(
|
|
5789
|
+
context: ZuploContext,
|
|
5790
|
+
subscription: MonetizationSubscription
|
|
5791
|
+
): void;
|
|
5792
|
+
/**
|
|
5793
|
+
* Get the monetization subscription data for the current request.
|
|
5794
|
+
*
|
|
5795
|
+
* @param context - The ZuploContext
|
|
5796
|
+
* @returns The subscription data or undefined
|
|
5797
|
+
*/
|
|
5798
|
+
static getSubscriptionData(
|
|
5799
|
+
context: ZuploContext
|
|
5800
|
+
): MonetizationSubscription | undefined;
|
|
5782
5801
|
constructor(options: MonetizationInboundPolicyOptions, policyName: string);
|
|
5783
5802
|
handler(
|
|
5784
5803
|
request: ZuploRequest,
|
|
@@ -5819,6 +5838,39 @@ export declare interface MonetizationInboundPolicyOptions {
|
|
|
5819
5838
|
meterOnStatusCodes?: string | number[];
|
|
5820
5839
|
}
|
|
5821
5840
|
|
|
5841
|
+
export declare interface MonetizationSubscription {
|
|
5842
|
+
paymentStatus?: {
|
|
5843
|
+
isFirstPayment: boolean;
|
|
5844
|
+
lastPaymentFailedAt?: string;
|
|
5845
|
+
lastPaymentSucceededAt?: string;
|
|
5846
|
+
status: "paid" | "not_required" | "pending" | "failed" | "uncollectible";
|
|
5847
|
+
};
|
|
5848
|
+
id: string;
|
|
5849
|
+
customerId: string;
|
|
5850
|
+
name: string;
|
|
5851
|
+
status: string;
|
|
5852
|
+
currency: string;
|
|
5853
|
+
billingCadence: string;
|
|
5854
|
+
activeFrom: string;
|
|
5855
|
+
activeTo?: string;
|
|
5856
|
+
plan: {
|
|
5857
|
+
id: string;
|
|
5858
|
+
name: string;
|
|
5859
|
+
description?: string;
|
|
5860
|
+
};
|
|
5861
|
+
entitlements: Record<
|
|
5862
|
+
string,
|
|
5863
|
+
{
|
|
5864
|
+
balance: number;
|
|
5865
|
+
hasAccess: boolean;
|
|
5866
|
+
overage: number;
|
|
5867
|
+
usage: number;
|
|
5868
|
+
}
|
|
5869
|
+
>;
|
|
5870
|
+
createdAt: string;
|
|
5871
|
+
updatedAt: string;
|
|
5872
|
+
}
|
|
5873
|
+
|
|
5822
5874
|
declare interface MultiRequests {
|
|
5823
5875
|
RequestReference: RequestReference;
|
|
5824
5876
|
}
|