@paygentic/sdk 0.8.0 → 0.8.2
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/README.md +5 -3
- package/dist/commonjs/funcs/billableMetricsListEvents.js +1 -0
- package/dist/commonjs/funcs/billableMetricsListEvents.js.map +1 -1
- package/dist/commonjs/funcs/billableMetricsMeter.js +2 -0
- package/dist/commonjs/funcs/billableMetricsMeter.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsReconcileSubscriptionFeatures.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsReconcileSubscriptionFeatures.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsReconcileSubscriptionFeatures.js +125 -0
- package/dist/commonjs/funcs/subscriptionsReconcileSubscriptionFeatures.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/eventresponse.d.ts +7 -0
- package/dist/commonjs/models/eventresponse.d.ts.map +1 -1
- package/dist/commonjs/models/eventresponse.js +1 -0
- package/dist/commonjs/models/eventresponse.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +6 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +6 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +4 -4
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +7 -6
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/meterevent.d.ts +4 -0
- package/dist/commonjs/models/meterevent.d.ts.map +1 -1
- package/dist/commonjs/models/meterevent.js +1 -0
- package/dist/commonjs/models/meterevent.js.map +1 -1
- package/dist/commonjs/models/operations/advancetestclock.d.ts +12 -12
- package/dist/commonjs/models/operations/advancetestclock.d.ts.map +1 -1
- package/dist/commonjs/models/operations/advancetestclock.js +13 -13
- package/dist/commonjs/models/operations/advancetestclock.js.map +1 -1
- package/dist/commonjs/models/operations/createplan.d.ts +8 -2
- package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createplan.js +4 -1
- package/dist/commonjs/models/operations/createplan.js.map +1 -1
- package/dist/commonjs/models/operations/getbillablemetricmeter.d.ts +11 -1
- package/dist/commonjs/models/operations/getbillablemetricmeter.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getbillablemetricmeter.js +2 -0
- package/dist/commonjs/models/operations/getbillablemetricmeter.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/ingestevent.d.ts +71 -3
- package/dist/commonjs/models/operations/ingestevent.d.ts.map +1 -1
- package/dist/commonjs/models/operations/ingestevent.js +28 -2
- package/dist/commonjs/models/operations/ingestevent.js.map +1 -1
- package/dist/commonjs/models/operations/listbillablemetricevents.d.ts +5 -0
- package/dist/commonjs/models/operations/listbillablemetricevents.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listbillablemetricevents.js +1 -0
- package/dist/commonjs/models/operations/listbillablemetricevents.js.map +1 -1
- package/dist/commonjs/models/operations/reconcilesubscriptionfeatures.d.ts +30 -0
- package/dist/commonjs/models/operations/reconcilesubscriptionfeatures.d.ts.map +1 -0
- package/dist/commonjs/models/operations/reconcilesubscriptionfeatures.js +63 -0
- package/dist/commonjs/models/operations/reconcilesubscriptionfeatures.js.map +1 -0
- package/dist/commonjs/models/operations/updateplan.d.ts +6 -0
- package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateplan.js +3 -0
- package/dist/commonjs/models/operations/updateplan.js.map +1 -1
- package/dist/commonjs/models/plan.d.ts +5 -0
- package/dist/commonjs/models/plan.d.ts.map +1 -1
- package/dist/commonjs/models/plan.js +2 -0
- package/dist/commonjs/models/plan.js.map +1 -1
- package/dist/commonjs/models/plancreditallocation.d.ts +30 -0
- package/dist/commonjs/models/plancreditallocation.d.ts.map +1 -0
- package/dist/commonjs/models/plancreditallocation.js +62 -0
- package/dist/commonjs/models/plancreditallocation.js.map +1 -0
- package/dist/commonjs/models/reconciledfeatureadded.d.ts +15 -0
- package/dist/commonjs/models/reconciledfeatureadded.d.ts.map +1 -0
- package/dist/commonjs/models/reconciledfeatureadded.js +52 -0
- package/dist/commonjs/models/reconciledfeatureadded.js.map +1 -0
- package/dist/commonjs/models/reconciledfeaturefailed.d.ts +29 -0
- package/dist/commonjs/models/reconciledfeaturefailed.d.ts.map +1 -0
- package/dist/commonjs/models/reconciledfeaturefailed.js +62 -0
- package/dist/commonjs/models/reconciledfeaturefailed.js.map +1 -0
- package/dist/commonjs/models/reconciledfeatureremoved.d.ts +11 -0
- package/dist/commonjs/models/reconciledfeatureremoved.d.ts.map +1 -0
- package/dist/commonjs/models/reconciledfeatureremoved.js +51 -0
- package/dist/commonjs/models/reconciledfeatureremoved.js.map +1 -0
- package/dist/commonjs/models/reconciledfeatureskipped.d.ts +11 -0
- package/dist/commonjs/models/reconciledfeatureskipped.d.ts.map +1 -0
- package/dist/commonjs/models/reconciledfeatureskipped.js +51 -0
- package/dist/commonjs/models/reconciledfeatureskipped.js.map +1 -0
- package/dist/commonjs/models/subscriptionreconciliation.d.ts +62 -0
- package/dist/commonjs/models/subscriptionreconciliation.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionreconciliation.js +83 -0
- package/dist/commonjs/models/subscriptionreconciliation.js.map +1 -0
- package/dist/commonjs/models/usageresponse.d.ts +10 -2
- package/dist/commonjs/models/usageresponse.d.ts.map +1 -1
- package/dist/commonjs/models/usageresponse.js +2 -0
- package/dist/commonjs/models/usageresponse.js.map +1 -1
- package/dist/commonjs/sdk/subscriptions.d.ts +7 -0
- package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/subscriptions.js +10 -0
- package/dist/commonjs/sdk/subscriptions.js.map +1 -1
- package/dist/esm/funcs/billableMetricsListEvents.js +1 -0
- package/dist/esm/funcs/billableMetricsListEvents.js.map +1 -1
- package/dist/esm/funcs/billableMetricsMeter.js +2 -0
- package/dist/esm/funcs/billableMetricsMeter.js.map +1 -1
- package/dist/esm/funcs/subscriptionsReconcileSubscriptionFeatures.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsReconcileSubscriptionFeatures.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsReconcileSubscriptionFeatures.js +89 -0
- package/dist/esm/funcs/subscriptionsReconcileSubscriptionFeatures.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/eventresponse.d.ts +7 -0
- package/dist/esm/models/eventresponse.d.ts.map +1 -1
- package/dist/esm/models/eventresponse.js +1 -0
- package/dist/esm/models/eventresponse.js.map +1 -1
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +4 -4
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +5 -4
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/meterevent.d.ts +4 -0
- package/dist/esm/models/meterevent.d.ts.map +1 -1
- package/dist/esm/models/meterevent.js +1 -0
- package/dist/esm/models/meterevent.js.map +1 -1
- package/dist/esm/models/operations/advancetestclock.d.ts +12 -12
- package/dist/esm/models/operations/advancetestclock.d.ts.map +1 -1
- package/dist/esm/models/operations/advancetestclock.js +10 -10
- package/dist/esm/models/operations/advancetestclock.js.map +1 -1
- package/dist/esm/models/operations/createplan.d.ts +8 -2
- package/dist/esm/models/operations/createplan.d.ts.map +1 -1
- package/dist/esm/models/operations/createplan.js +4 -1
- package/dist/esm/models/operations/createplan.js.map +1 -1
- package/dist/esm/models/operations/getbillablemetricmeter.d.ts +11 -1
- package/dist/esm/models/operations/getbillablemetricmeter.d.ts.map +1 -1
- package/dist/esm/models/operations/getbillablemetricmeter.js +2 -0
- package/dist/esm/models/operations/getbillablemetricmeter.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/ingestevent.d.ts +71 -3
- package/dist/esm/models/operations/ingestevent.d.ts.map +1 -1
- package/dist/esm/models/operations/ingestevent.js +25 -1
- package/dist/esm/models/operations/ingestevent.js.map +1 -1
- package/dist/esm/models/operations/listbillablemetricevents.d.ts +5 -0
- package/dist/esm/models/operations/listbillablemetricevents.d.ts.map +1 -1
- package/dist/esm/models/operations/listbillablemetricevents.js +1 -0
- package/dist/esm/models/operations/listbillablemetricevents.js.map +1 -1
- package/dist/esm/models/operations/reconcilesubscriptionfeatures.d.ts +30 -0
- package/dist/esm/models/operations/reconcilesubscriptionfeatures.d.ts.map +1 -0
- package/dist/esm/models/operations/reconcilesubscriptionfeatures.js +25 -0
- package/dist/esm/models/operations/reconcilesubscriptionfeatures.js.map +1 -0
- package/dist/esm/models/operations/updateplan.d.ts +6 -0
- package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
- package/dist/esm/models/operations/updateplan.js +3 -0
- package/dist/esm/models/operations/updateplan.js.map +1 -1
- package/dist/esm/models/plan.d.ts +5 -0
- package/dist/esm/models/plan.d.ts.map +1 -1
- package/dist/esm/models/plan.js +2 -0
- package/dist/esm/models/plan.js.map +1 -1
- package/dist/esm/models/plancreditallocation.d.ts +30 -0
- package/dist/esm/models/plancreditallocation.d.ts.map +1 -0
- package/dist/esm/models/plancreditallocation.js +24 -0
- package/dist/esm/models/plancreditallocation.js.map +1 -0
- package/dist/esm/models/reconciledfeatureadded.d.ts +15 -0
- package/dist/esm/models/reconciledfeatureadded.d.ts.map +1 -0
- package/dist/esm/models/reconciledfeatureadded.js +15 -0
- package/dist/esm/models/reconciledfeatureadded.js.map +1 -0
- package/dist/esm/models/reconciledfeaturefailed.d.ts +29 -0
- package/dist/esm/models/reconciledfeaturefailed.d.ts.map +1 -0
- package/dist/esm/models/reconciledfeaturefailed.js +25 -0
- package/dist/esm/models/reconciledfeaturefailed.js.map +1 -0
- package/dist/esm/models/reconciledfeatureremoved.d.ts +11 -0
- package/dist/esm/models/reconciledfeatureremoved.d.ts.map +1 -0
- package/dist/esm/models/reconciledfeatureremoved.js +14 -0
- package/dist/esm/models/reconciledfeatureremoved.js.map +1 -0
- package/dist/esm/models/reconciledfeatureskipped.d.ts +11 -0
- package/dist/esm/models/reconciledfeatureskipped.d.ts.map +1 -0
- package/dist/esm/models/reconciledfeatureskipped.js +14 -0
- package/dist/esm/models/reconciledfeatureskipped.js.map +1 -0
- package/dist/esm/models/subscriptionreconciliation.d.ts +62 -0
- package/dist/esm/models/subscriptionreconciliation.d.ts.map +1 -0
- package/dist/esm/models/subscriptionreconciliation.js +44 -0
- package/dist/esm/models/subscriptionreconciliation.js.map +1 -0
- package/dist/esm/models/usageresponse.d.ts +10 -2
- package/dist/esm/models/usageresponse.d.ts.map +1 -1
- package/dist/esm/models/usageresponse.js +2 -0
- package/dist/esm/models/usageresponse.js.map +1 -1
- package/dist/esm/sdk/subscriptions.d.ts +7 -0
- package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/subscriptions.js +10 -0
- package/dist/esm/sdk/subscriptions.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/billableMetricsListEvents.ts +1 -0
- package/src/funcs/billableMetricsMeter.ts +2 -0
- package/src/funcs/subscriptionsReconcileSubscriptionFeatures.ts +184 -0
- package/src/lib/config.ts +2 -2
- package/src/models/eventresponse.ts +8 -0
- package/src/models/index.ts +6 -0
- package/src/models/invoice.ts +10 -9
- package/src/models/meterevent.ts +5 -0
- package/src/models/operations/advancetestclock.ts +39 -23
- package/src/models/operations/createplan.ts +11 -3
- package/src/models/operations/getbillablemetricmeter.ts +13 -1
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/ingestevent.ts +116 -6
- package/src/models/operations/listbillablemetricevents.ts +6 -0
- package/src/models/operations/reconcilesubscriptionfeatures.ts +78 -0
- package/src/models/operations/updateplan.ts +8 -0
- package/src/models/plan.ts +9 -0
- package/src/models/plancreditallocation.ts +68 -0
- package/src/models/reconciledfeatureadded.ts +38 -0
- package/src/models/reconciledfeaturefailed.ts +55 -0
- package/src/models/reconciledfeatureremoved.ts +33 -0
- package/src/models/reconciledfeatureskipped.ts +33 -0
- package/src/models/subscriptionreconciliation.ts +144 -0
- package/src/models/usageresponse.ts +12 -2
- package/src/sdk/subscriptions.ts +18 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
-
export type
|
|
2
|
+
export type IngestEventRequestBody2 = {
|
|
3
3
|
/**
|
|
4
4
|
* CloudEvents type. Must match an eventType configured on a BillableMetric.
|
|
5
5
|
*/
|
|
@@ -9,9 +9,53 @@ export type IngestEventRequest = {
|
|
|
9
9
|
*/
|
|
10
10
|
source: string;
|
|
11
11
|
/**
|
|
12
|
-
* Customer or entity ID this event relates to.
|
|
12
|
+
* Customer or entity ID this event relates to. Required unless externalSubject is provided.
|
|
13
|
+
*/
|
|
14
|
+
subject?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, events may resolve to the previous customer for up to one hour. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.
|
|
17
|
+
*/
|
|
18
|
+
externalSubject: string;
|
|
19
|
+
/**
|
|
20
|
+
* Organization/merchant ID. Defaults to the authenticated user's organization. Platform users can specify a different organization.
|
|
21
|
+
*/
|
|
22
|
+
namespace?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Event timestamp. Defaults to server time if not provided.
|
|
25
|
+
*/
|
|
26
|
+
timestamp?: Date | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* User-provided deduplication key. If not provided, a unique key is generated.
|
|
29
|
+
*/
|
|
30
|
+
idempotencyKey?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Optional external identifier for cross-referencing with external systems. Alphanumeric characters, hyphens, and underscores only.
|
|
33
|
+
*/
|
|
34
|
+
externalId?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Event payload containing the metering data.
|
|
37
|
+
*/
|
|
38
|
+
data: {
|
|
39
|
+
[k: string]: any;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type IngestEventRequestBody1 = {
|
|
43
|
+
/**
|
|
44
|
+
* CloudEvents type. Must match an eventType configured on a BillableMetric.
|
|
45
|
+
*/
|
|
46
|
+
type: string;
|
|
47
|
+
/**
|
|
48
|
+
* Event source URI identifying the application.
|
|
49
|
+
*/
|
|
50
|
+
source: string;
|
|
51
|
+
/**
|
|
52
|
+
* Customer or entity ID this event relates to. Required unless externalSubject is provided.
|
|
13
53
|
*/
|
|
14
54
|
subject: string;
|
|
55
|
+
/**
|
|
56
|
+
* Your own customer identifier, matched against the customer's externalId. Fallback for when the Paygentic customer ID is not known — prefer subject when it is. Events reported before the customer exists are linked retroactively once a customer with this externalId is created. Resolution is eventually consistent: after an externalId is removed or reassigned, events may resolve to the previous customer for up to one hour. If subject is also provided, subject takes precedence and externalSubject is recorded but not used for resolution.
|
|
57
|
+
*/
|
|
58
|
+
externalSubject?: string | undefined;
|
|
15
59
|
/**
|
|
16
60
|
* Organization/merchant ID. Defaults to the authenticated user's organization. Platform users can specify a different organization.
|
|
17
61
|
*/
|
|
@@ -35,11 +79,30 @@ export type IngestEventRequest = {
|
|
|
35
79
|
[k: string]: any;
|
|
36
80
|
};
|
|
37
81
|
};
|
|
82
|
+
export type IngestEventRequest = IngestEventRequestBody1 | IngestEventRequestBody2;
|
|
38
83
|
/** @internal */
|
|
39
|
-
export type
|
|
84
|
+
export type IngestEventRequestBody2$Outbound = {
|
|
85
|
+
type: string;
|
|
86
|
+
source: string;
|
|
87
|
+
subject?: string | undefined;
|
|
88
|
+
externalSubject: string;
|
|
89
|
+
namespace?: string | undefined;
|
|
90
|
+
timestamp?: string | undefined;
|
|
91
|
+
idempotencyKey?: string | undefined;
|
|
92
|
+
externalId?: string | undefined;
|
|
93
|
+
data: {
|
|
94
|
+
[k: string]: any;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
/** @internal */
|
|
98
|
+
export declare const IngestEventRequestBody2$outboundSchema: z.ZodType<IngestEventRequestBody2$Outbound, z.ZodTypeDef, IngestEventRequestBody2>;
|
|
99
|
+
export declare function ingestEventRequestBody2ToJSON(ingestEventRequestBody2: IngestEventRequestBody2): string;
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type IngestEventRequestBody1$Outbound = {
|
|
40
102
|
type: string;
|
|
41
103
|
source: string;
|
|
42
104
|
subject: string;
|
|
105
|
+
externalSubject?: string | undefined;
|
|
43
106
|
namespace?: string | undefined;
|
|
44
107
|
timestamp?: string | undefined;
|
|
45
108
|
idempotencyKey?: string | undefined;
|
|
@@ -49,6 +112,11 @@ export type IngestEventRequest$Outbound = {
|
|
|
49
112
|
};
|
|
50
113
|
};
|
|
51
114
|
/** @internal */
|
|
115
|
+
export declare const IngestEventRequestBody1$outboundSchema: z.ZodType<IngestEventRequestBody1$Outbound, z.ZodTypeDef, IngestEventRequestBody1>;
|
|
116
|
+
export declare function ingestEventRequestBody1ToJSON(ingestEventRequestBody1: IngestEventRequestBody1): string;
|
|
117
|
+
/** @internal */
|
|
118
|
+
export type IngestEventRequest$Outbound = IngestEventRequestBody1$Outbound | IngestEventRequestBody2$Outbound;
|
|
119
|
+
/** @internal */
|
|
52
120
|
export declare const IngestEventRequest$outboundSchema: z.ZodType<IngestEventRequest$Outbound, z.ZodTypeDef, IngestEventRequest>;
|
|
53
121
|
export declare function ingestEventRequestToJSON(ingestEventRequest: IngestEventRequest): string;
|
|
54
122
|
//# sourceMappingURL=ingestevent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestevent.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/ingestevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"ingestevent.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/ingestevent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;OAEG;IACH,SAAS,CAAC,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,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,gCAAgC,EAChC,CAAC,CAAC,UAAU,EACZ,uBAAuB,CAWvB,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GACnC,gCAAgC,GAChC,gCAAgC,CAAC;AAErC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAIlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -3,16 +3,40 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
/** @internal */
|
|
6
|
-
export const
|
|
6
|
+
export const IngestEventRequestBody2$outboundSchema = z.object({
|
|
7
|
+
type: z.string(),
|
|
8
|
+
source: z.string(),
|
|
9
|
+
subject: z.string().optional(),
|
|
10
|
+
externalSubject: z.string(),
|
|
11
|
+
namespace: z.string().optional(),
|
|
12
|
+
timestamp: z.date().transform(v => v.toISOString()).optional(),
|
|
13
|
+
idempotencyKey: z.string().optional(),
|
|
14
|
+
externalId: z.string().optional(),
|
|
15
|
+
data: z.record(z.any()),
|
|
16
|
+
});
|
|
17
|
+
export function ingestEventRequestBody2ToJSON(ingestEventRequestBody2) {
|
|
18
|
+
return JSON.stringify(IngestEventRequestBody2$outboundSchema.parse(ingestEventRequestBody2));
|
|
19
|
+
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const IngestEventRequestBody1$outboundSchema = z.object({
|
|
7
22
|
type: z.string(),
|
|
8
23
|
source: z.string(),
|
|
9
24
|
subject: z.string(),
|
|
25
|
+
externalSubject: z.string().optional(),
|
|
10
26
|
namespace: z.string().optional(),
|
|
11
27
|
timestamp: z.date().transform(v => v.toISOString()).optional(),
|
|
12
28
|
idempotencyKey: z.string().optional(),
|
|
13
29
|
externalId: z.string().optional(),
|
|
14
30
|
data: z.record(z.any()),
|
|
15
31
|
});
|
|
32
|
+
export function ingestEventRequestBody1ToJSON(ingestEventRequestBody1) {
|
|
33
|
+
return JSON.stringify(IngestEventRequestBody1$outboundSchema.parse(ingestEventRequestBody1));
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const IngestEventRequest$outboundSchema = z.union([
|
|
37
|
+
z.lazy(() => IngestEventRequestBody1$outboundSchema),
|
|
38
|
+
z.lazy(() => IngestEventRequestBody2$outboundSchema),
|
|
39
|
+
]);
|
|
16
40
|
export function ingestEventRequestToJSON(ingestEventRequest) {
|
|
17
41
|
return JSON.stringify(IngestEventRequest$outboundSchema.parse(ingestEventRequest));
|
|
18
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestevent.js","sourceRoot":"","sources":["../../../../src/models/operations/ingestevent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ingestevent.js","sourceRoot":"","sources":["../../../../src/models/operations/ingestevent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAiG5B,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAA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AC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,sCAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC;AAOD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,KAAK,CAAC;IACV,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,sCAAsC,CAAC;IACpD,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,sCAAsC,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -25,6 +25,10 @@ export type ListBillableMetricEventsRequest = {
|
|
|
25
25
|
* Filter by external identifier. Alphanumeric characters, hyphens, and underscores only.
|
|
26
26
|
*/
|
|
27
27
|
externalId?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Filter by the merchant's own customer identifier the event was reported with.
|
|
30
|
+
*/
|
|
31
|
+
externalSubject?: string | undefined;
|
|
28
32
|
};
|
|
29
33
|
/** @internal */
|
|
30
34
|
export type ListBillableMetricEventsRequest$Outbound = {
|
|
@@ -35,6 +39,7 @@ export type ListBillableMetricEventsRequest$Outbound = {
|
|
|
35
39
|
limit: number;
|
|
36
40
|
offset: number;
|
|
37
41
|
externalId?: string | undefined;
|
|
42
|
+
externalSubject?: string | undefined;
|
|
38
43
|
};
|
|
39
44
|
/** @internal */
|
|
40
45
|
export declare const ListBillableMetricEventsRequest$outboundSchema: z.ZodType<ListBillableMetricEventsRequest$Outbound, z.ZodTypeDef, ListBillableMetricEventsRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbillablemetricevents.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/listbillablemetricevents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;IACT;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"listbillablemetricevents.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/listbillablemetricevents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,EAAE,EAAE,IAAI,CAAC;IACT;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,wCAAwC,GAAG;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,wCAAwC,EACxC,CAAC,CAAC,UAAU,EACZ,+BAA+B,CAU/B,CAAC;AAEH,wBAAgB,qCAAqC,CACnD,+BAA+B,EAAE,+BAA+B,GAC/D,MAAM,CAMR"}
|
|
@@ -11,6 +11,7 @@ export const ListBillableMetricEventsRequest$outboundSchema = z.object({
|
|
|
11
11
|
limit: z.number().int().default(20),
|
|
12
12
|
offset: z.number().int().default(0),
|
|
13
13
|
externalId: z.string().optional(),
|
|
14
|
+
externalSubject: z.string().optional(),
|
|
14
15
|
});
|
|
15
16
|
export function listBillableMetricEventsRequestToJSON(listBillableMetricEventsRequest) {
|
|
16
17
|
return JSON.stringify(ListBillableMetricEventsRequest$outboundSchema.parse(listBillableMetricEventsRequest));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbillablemetricevents.js","sourceRoot":"","sources":["../../../../src/models/operations/listbillablemetricevents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"listbillablemetricevents.js","sourceRoot":"","sources":["../../../../src/models/operations/listbillablemetricevents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AA8C5B,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAIvD,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9C,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACnC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACnC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEH,MAAM,UAAU,qCAAqC,CACnD,+BAAgE;IAEhE,OAAO,IAAI,CAAC,SAAS,CACnB,8CAA8C,CAAC,KAAK,CAClD,+BAA+B,CAChC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
export type ReconcileSubscriptionFeaturesRequestBody = {
|
|
3
|
+
/**
|
|
4
|
+
* Preview the outcome without creating any entitlement, grant, or line item.
|
|
5
|
+
*/
|
|
6
|
+
dryRun?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type ReconcileSubscriptionFeaturesRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The subscription ID
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
requestBody?: ReconcileSubscriptionFeaturesRequestBody | undefined;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type ReconcileSubscriptionFeaturesRequestBody$Outbound = {
|
|
17
|
+
dryRun: boolean;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const ReconcileSubscriptionFeaturesRequestBody$outboundSchema: z.ZodType<ReconcileSubscriptionFeaturesRequestBody$Outbound, z.ZodTypeDef, ReconcileSubscriptionFeaturesRequestBody>;
|
|
21
|
+
export declare function reconcileSubscriptionFeaturesRequestBodyToJSON(reconcileSubscriptionFeaturesRequestBody: ReconcileSubscriptionFeaturesRequestBody): string;
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type ReconcileSubscriptionFeaturesRequest$Outbound = {
|
|
24
|
+
id: string;
|
|
25
|
+
RequestBody?: ReconcileSubscriptionFeaturesRequestBody$Outbound | undefined;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const ReconcileSubscriptionFeaturesRequest$outboundSchema: z.ZodType<ReconcileSubscriptionFeaturesRequest$Outbound, z.ZodTypeDef, ReconcileSubscriptionFeaturesRequest>;
|
|
29
|
+
export declare function reconcileSubscriptionFeaturesRequestToJSON(reconcileSubscriptionFeaturesRequest: ReconcileSubscriptionFeaturesRequest): string;
|
|
30
|
+
//# sourceMappingURL=reconcilesubscriptionfeatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcilesubscriptionfeatures.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/reconcilesubscriptionfeatures.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,MAAM,wCAAwC,GAAG;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,wCAAwC,GAAG,SAAS,CAAC;CACpE,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,iDAAiD,GAAG;IAC9D,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uDAAuD,EAAE,CAAC,CAAC,OAAO,CAC7E,iDAAiD,EACjD,CAAC,CAAC,UAAU,EACZ,wCAAwC,CAGxC,CAAC;AAEH,wBAAgB,8CAA8C,CAC5D,wCAAwC,EACtC,wCAAwC,GACzC,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,6CAA6C,GAAG;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,iDAAiD,GAAG,SAAS,CAAC;CAC7E,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mDAAmD,EAAE,CAAC,CAAC,OAAO,CACzE,6CAA6C,EAC7C,CAAC,CAAC,UAAU,EACZ,oCAAoC,CAUpC,CAAC;AAEH,wBAAgB,0CAA0C,CACxD,oCAAoC,EAAE,oCAAoC,GACzE,MAAM,CAMR"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ReconcileSubscriptionFeaturesRequestBody$outboundSchema = z.object({
|
|
8
|
+
dryRun: z.boolean().default(false),
|
|
9
|
+
});
|
|
10
|
+
export function reconcileSubscriptionFeaturesRequestBodyToJSON(reconcileSubscriptionFeaturesRequestBody) {
|
|
11
|
+
return JSON.stringify(ReconcileSubscriptionFeaturesRequestBody$outboundSchema.parse(reconcileSubscriptionFeaturesRequestBody));
|
|
12
|
+
}
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ReconcileSubscriptionFeaturesRequest$outboundSchema = z.object({
|
|
15
|
+
id: z.string(),
|
|
16
|
+
requestBody: z.lazy(() => ReconcileSubscriptionFeaturesRequestBody$outboundSchema).optional(),
|
|
17
|
+
}).transform((v) => {
|
|
18
|
+
return remap$(v, {
|
|
19
|
+
requestBody: "RequestBody",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export function reconcileSubscriptionFeaturesRequestToJSON(reconcileSubscriptionFeaturesRequest) {
|
|
23
|
+
return JSON.stringify(ReconcileSubscriptionFeaturesRequest$outboundSchema.parse(reconcileSubscriptionFeaturesRequest));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=reconcilesubscriptionfeatures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconcilesubscriptionfeatures.js","sourceRoot":"","sources":["../../../../src/models/operations/reconcilesubscriptionfeatures.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAsB1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,uDAAuD,GAIhE,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,UAAU,8CAA8C,CAC5D,wCAC0C;IAE1C,OAAO,IAAI,CAAC,SAAS,CACnB,uDAAuD,CAAC,KAAK,CAC3D,wCAAwC,CACzC,CACF,CAAC;AACJ,CAAC;AAQD,gBAAgB;AAChB,MAAM,CAAC,MAAM,mDAAmD,GAI5D,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACvB,uDAAuD,CACxD,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,aAAa;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,0CAA0C,CACxD,oCAA0E;IAE1E,OAAO,IAAI,CAAC,SAAS,CACnB,mDAAmD,CAAC,KAAK,CACvD,oCAAoC,CACrC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
+
import * as models from "../index.js";
|
|
3
4
|
/**
|
|
4
5
|
* ISO 8601 duration for the billing period. Takes precedence over billingInterval when both are provided.
|
|
5
6
|
*/
|
|
@@ -85,6 +86,10 @@ export type UpdatePlanRequestBody = {
|
|
|
85
86
|
* ISO 8601 datetime reference point for billing period alignment. Must be in the past or present. Set to null to clear the anchor and revert to start-time-based anchoring.
|
|
86
87
|
*/
|
|
87
88
|
billingAnchor?: Date | null | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Credit-pool funding declarations for this plan. Each entry funds a distinct pricing unit's credit pool when a subscription to this plan activates: the allocated amount is minted as a credit grant on the customer's pool for that pricing unit, once at activation, or on a recurring basis only when that allocation explicitly sets recurrencePeriod. A plan may declare zero or more allocations; no two allocations on the same plan may target the same pricingUnitId.
|
|
91
|
+
*/
|
|
92
|
+
creditAllocations?: Array<models.PlanCreditAllocation> | undefined;
|
|
88
93
|
};
|
|
89
94
|
export type UpdatePlanRequest = {
|
|
90
95
|
/**
|
|
@@ -113,6 +118,7 @@ export type UpdatePlanRequestBody$Outbound = {
|
|
|
113
118
|
renewalReminderEnabled?: boolean | undefined;
|
|
114
119
|
renewalReminderDays?: number | undefined;
|
|
115
120
|
billingAnchor?: string | null | undefined;
|
|
121
|
+
creditAllocations?: Array<models.PlanCreditAllocation$Outbound> | undefined;
|
|
116
122
|
};
|
|
117
123
|
/** @internal */
|
|
118
124
|
export declare const UpdatePlanRequestBody$outboundSchema: z.ZodType<UpdatePlanRequestBody$Outbound, z.ZodTypeDef, UpdatePlanRequestBody>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateplan.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updateplan.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"updateplan.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/updateplan.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,wBAAwB,CAChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;CAK5B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAChD,OAAO,yBAAyB,CACjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;CAGxB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE7E,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,cAAc,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,M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ISO 8601 duration for the billing period. Takes precedence over billingInterval when both are provided.
|
|
8
9
|
*/
|
|
@@ -48,6 +49,8 @@ export const UpdatePlanRequestBody$outboundSchema = z.object({
|
|
|
48
49
|
renewalReminderDays: z.number().int().optional(),
|
|
49
50
|
billingAnchor: z.nullable(z.date().transform(v => v.toISOString()))
|
|
50
51
|
.optional(),
|
|
52
|
+
creditAllocations: z.array(models.PlanCreditAllocation$outboundSchema)
|
|
53
|
+
.optional(),
|
|
51
54
|
});
|
|
52
55
|
export function updatePlanRequestBodyToJSON(updatePlanRequestBody) {
|
|
53
56
|
return JSON.stringify(UpdatePlanRequestBody$outboundSchema.parse(updatePlanRequestBody));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateplan.js","sourceRoot":"","sources":["../../../../src/models/operations/updateplan.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"updateplan.js","sourceRoot":"","sources":["../../../../src/models/operations/updateplan.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAC;AAQX;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC;AAQX;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,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E,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;SAChE,QAAQ,EAAE;IACb,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,mCAAmC,CAAC;SACnE,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,oCAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC;AAQD,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;CAChE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,aAAa;KAC3B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,gCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v3";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { PlanCreditAllocation } from "./plancreditallocation.js";
|
|
5
6
|
import { Price } from "./price.js";
|
|
6
7
|
export declare const PlanObject: {
|
|
7
8
|
readonly Plan: "plan";
|
|
@@ -99,6 +100,10 @@ export type Plan = {
|
|
|
99
100
|
* ISO 8601 datetime reference point for billing period alignment. Must be in the past or present at the time of creation or update. When set, all subscriptions created under this plan align their first billing period to the next recurrence of this anchor. Null means each subscription uses its own start time (hour-rounded) as the anchor.
|
|
100
101
|
*/
|
|
101
102
|
billingAnchor?: Date | null | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Credit-pool funding declarations for this plan. Each entry funds a distinct pricing unit's credit pool when a subscription to this plan activates: the allocated amount is minted as a credit grant on the customer's pool for that pricing unit, once at activation, or on a recurring basis only when that allocation explicitly sets recurrencePeriod. A plan may declare zero or more allocations; no two allocations on the same plan target the same pricingUnitId.
|
|
105
|
+
*/
|
|
106
|
+
creditAllocations?: Array<PlanCreditAllocation> | undefined;
|
|
102
107
|
};
|
|
103
108
|
/** @internal */
|
|
104
109
|
export declare const PlanObject$inboundSchema: z.ZodNativeEnum<typeof PlanObject>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/models/plan.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAuB,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,UAAU;;CAEb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;;;CAGd,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AAO,CAQP,CAAC;AAEH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAMtD;AAED,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,WAAW,CAChD,CAAC;AAE3B,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAiClE,CAAC;AAEL,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAM3C"}
|
package/dist/esm/models/plan.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { PlanCreditAllocation$inboundSchema, } from "./plancreditallocation.js";
|
|
7
8
|
import { Price$inboundSchema } from "./price.js";
|
|
8
9
|
export const PlanObject = {
|
|
9
10
|
Plan: "plan",
|
|
@@ -70,6 +71,7 @@ export const Plan$inboundSchema = z
|
|
|
70
71
|
renewalReminderDays: z.number().int().optional(),
|
|
71
72
|
billingVersion: z.number().int().optional(),
|
|
72
73
|
billingAnchor: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
74
|
+
creditAllocations: z.array(PlanCreditAllocation$inboundSchema).optional(),
|
|
73
75
|
});
|
|
74
76
|
export function planFromJSON(jsonString) {
|
|
75
77
|
return safeParse(jsonString, (x) => Plan$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Plan' from JSON`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/models/plan.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,Q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,EAAE,CAAC,QAAQ,EAAE;IAC3C,aAAa,EAAE,CAAC,CAAC,QAAQ,CACvB,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAClE,CAAC,QAAQ,EAAE;IACZ,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAEL,MAAM,UAAU,YAAY,CAC1B,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9C,kCAAkC,CACnC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type PlanCreditAllocation = {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for a pricing unit
|
|
7
|
+
*/
|
|
8
|
+
pricingUnitId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Number of credits minted into the customer's pool for this pricing unit each time the allocation is provisioned. Must be a positive number.
|
|
11
|
+
*/
|
|
12
|
+
amount: number;
|
|
13
|
+
/**
|
|
14
|
+
* ISO 8601 duration (e.g. 'P1M') controlling how often the allocation's credits are re-minted on the customer's pool. Recurrence is opt-in: when omitted, the allocation is minted once at subscription activation and never refills — even on a recurring plan. Set this field explicitly for credits that should replenish each period.
|
|
15
|
+
*/
|
|
16
|
+
recurrencePeriod?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const PlanCreditAllocation$inboundSchema: z.ZodType<PlanCreditAllocation, z.ZodTypeDef, unknown>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type PlanCreditAllocation$Outbound = {
|
|
22
|
+
pricingUnitId: string;
|
|
23
|
+
amount: number;
|
|
24
|
+
recurrencePeriod?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const PlanCreditAllocation$outboundSchema: z.ZodType<PlanCreditAllocation$Outbound, z.ZodTypeDef, PlanCreditAllocation>;
|
|
28
|
+
export declare function planCreditAllocationToJSON(planCreditAllocation: PlanCreditAllocation): string;
|
|
29
|
+
export declare function planCreditAllocationFromJSON(jsonString: string): SafeParseResult<PlanCreditAllocation, SDKValidationError>;
|
|
30
|
+
//# sourceMappingURL=plancreditallocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plancreditallocation.d.ts","sourceRoot":"","sources":["../../../src/models/plancreditallocation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,oBAAoB,EACpB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AACH,gBAAgB;AAChB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,6BAA6B,EAC7B,CAAC,CAAC,UAAU,EACZ,oBAAoB,CAKpB,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,oBAAoB,EAAE,oBAAoB,GACzC,MAAM,CAIR;AACD,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAM3D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const PlanCreditAllocation$inboundSchema = z.object({
|
|
8
|
+
pricingUnitId: z.string(),
|
|
9
|
+
amount: z.number(),
|
|
10
|
+
recurrencePeriod: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const PlanCreditAllocation$outboundSchema = z.object({
|
|
14
|
+
pricingUnitId: z.string(),
|
|
15
|
+
amount: z.number(),
|
|
16
|
+
recurrencePeriod: z.string().optional(),
|
|
17
|
+
});
|
|
18
|
+
export function planCreditAllocationToJSON(planCreditAllocation) {
|
|
19
|
+
return JSON.stringify(PlanCreditAllocation$outboundSchema.parse(planCreditAllocation));
|
|
20
|
+
}
|
|
21
|
+
export function planCreditAllocationFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => PlanCreditAllocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PlanCreditAllocation' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=plancreditallocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plancreditallocation.js","sourceRoot":"","sources":["../../../src/models/plancreditallocation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAmB9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAI3C,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAQH,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CACxC,oBAA0C;IAE1C,OAAO,IAAI,CAAC,SAAS,CACnB,mCAAmC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAChE,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,4BAA4B,CAC1C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9D,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type ReconciledFeatureAdded = {
|
|
5
|
+
featureId: string;
|
|
6
|
+
featureKey: string;
|
|
7
|
+
/**
|
|
8
|
+
* False when this feature's price never produces a recurring line item (an instant price, a credit-denominated price, or an already-elapsed one-time charge) — the feature is entitled but not billed by this reconciliation.
|
|
9
|
+
*/
|
|
10
|
+
billed: boolean;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ReconciledFeatureAdded$inboundSchema: z.ZodType<ReconciledFeatureAdded, z.ZodTypeDef, unknown>;
|
|
14
|
+
export declare function reconciledFeatureAddedFromJSON(jsonString: string): SafeParseResult<ReconciledFeatureAdded, SDKValidationError>;
|
|
15
|
+
//# sourceMappingURL=reconciledfeatureadded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciledfeatureadded.d.ts","sourceRoot":"","sources":["../../../src/models/reconciledfeatureadded.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAC1D,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAM7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ReconciledFeatureAdded$inboundSchema = z.object({
|
|
8
|
+
featureId: z.string(),
|
|
9
|
+
featureKey: z.string(),
|
|
10
|
+
billed: z.boolean(),
|
|
11
|
+
});
|
|
12
|
+
export function reconciledFeatureAddedFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => ReconciledFeatureAdded$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReconciledFeatureAdded' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=reconciledfeatureadded.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciledfeatureadded.js","sourceRoot":"","sources":["../../../src/models/reconciledfeatureadded.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAa9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,UAAU,8BAA8B,CAC5C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChE,oDAAoD,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Coded failure reason. `grant_mint_failed` means the entitlement was created but its initial metered grant could not be minted; re-running this reconciliation retries the mint.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Reason: {
|
|
9
|
+
readonly EntitlementFailed: "entitlement_failed";
|
|
10
|
+
readonly GrantMintFailed: "grant_mint_failed";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Coded failure reason. `grant_mint_failed` means the entitlement was created but its initial metered grant could not be minted; re-running this reconciliation retries the mint.
|
|
14
|
+
*/
|
|
15
|
+
export type Reason = ClosedEnum<typeof Reason>;
|
|
16
|
+
export type ReconciledFeatureFailed = {
|
|
17
|
+
featureId: string;
|
|
18
|
+
featureKey: string;
|
|
19
|
+
/**
|
|
20
|
+
* Coded failure reason. `grant_mint_failed` means the entitlement was created but its initial metered grant could not be minted; re-running this reconciliation retries the mint.
|
|
21
|
+
*/
|
|
22
|
+
reason: Reason;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const Reason$inboundSchema: z.ZodNativeEnum<typeof Reason>;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const ReconciledFeatureFailed$inboundSchema: z.ZodType<ReconciledFeatureFailed, z.ZodTypeDef, unknown>;
|
|
28
|
+
export declare function reconciledFeatureFailedFromJSON(jsonString: string): SafeParseResult<ReconciledFeatureFailed, SDKValidationError>;
|
|
29
|
+
//# sourceMappingURL=reconciledfeaturefailed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciledfeaturefailed.d.ts","sourceRoot":"","sources":["../../../src/models/reconciledfeaturefailed.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,MAAM;;;CAGT,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAE/C,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,MAAM,CAC3C,CAAC;AAEtB,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAC3D,uBAAuB,EACvB,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/**
|
|
7
|
+
* Coded failure reason. `grant_mint_failed` means the entitlement was created but its initial metered grant could not be minted; re-running this reconciliation retries the mint.
|
|
8
|
+
*/
|
|
9
|
+
export const Reason = {
|
|
10
|
+
EntitlementFailed: "entitlement_failed",
|
|
11
|
+
GrantMintFailed: "grant_mint_failed",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const Reason$inboundSchema = z
|
|
15
|
+
.nativeEnum(Reason);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ReconciledFeatureFailed$inboundSchema = z.object({
|
|
18
|
+
featureId: z.string(),
|
|
19
|
+
featureKey: z.string(),
|
|
20
|
+
reason: Reason$inboundSchema,
|
|
21
|
+
});
|
|
22
|
+
export function reconciledFeatureFailedFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => ReconciledFeatureFailed$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReconciledFeatureFailed' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=reconciledfeaturefailed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciledfeaturefailed.js","sourceRoot":"","sources":["../../../src/models/reconciledfeaturefailed.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,iBAAiB,EAAE,oBAAoB;IACvC,eAAe,EAAE,mBAAmB;CAC5B,CAAC;AAeX,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAAmC,CAAC;KAClE,UAAU,CAAC,MAAM,CAAC,CAAC;AAEtB,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,oBAAoB;CAC7B,CAAC,CAAC;AAEH,MAAM,UAAU,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type ReconciledFeatureRemoved = {
|
|
5
|
+
featureId: string;
|
|
6
|
+
featureKey: string;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const ReconciledFeatureRemoved$inboundSchema: z.ZodType<ReconciledFeatureRemoved, z.ZodTypeDef, unknown>;
|
|
10
|
+
export declare function reconciledFeatureRemovedFromJSON(jsonString: string): SafeParseResult<ReconciledFeatureRemoved, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=reconciledfeatureremoved.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciledfeatureremoved.d.ts","sourceRoot":"","sources":["../../../src/models/reconciledfeatureremoved.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
|