@usehercules/sdk 1.3.0 → 1.5.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.
- package/CHANGELOG.md +20 -0
- package/LICENSE +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +4 -0
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +4 -0
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -0
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -0
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +3 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/pay/coupons.d.mts +1 -1
- package/resources/beta/pay/coupons.d.ts +1 -1
- package/resources/beta/pay/customers.d.mts +1 -1
- package/resources/beta/pay/customers.d.ts +1 -1
- package/resources/beta/pay/entitlements.d.mts +4 -22
- package/resources/beta/pay/entitlements.d.mts.map +1 -1
- package/resources/beta/pay/entitlements.d.ts +4 -22
- package/resources/beta/pay/entitlements.d.ts.map +1 -1
- package/resources/beta/pay/entitlements.js +3 -4
- package/resources/beta/pay/entitlements.js.map +1 -1
- package/resources/beta/pay/entitlements.mjs +3 -4
- package/resources/beta/pay/entitlements.mjs.map +1 -1
- package/resources/beta/pay/pay.d.mts +76 -16
- package/resources/beta/pay/pay.d.mts.map +1 -1
- package/resources/beta/pay/pay.d.ts +76 -16
- package/resources/beta/pay/pay.d.ts.map +1 -1
- package/resources/beta/pay/pay.js.map +1 -1
- package/resources/beta/pay/pay.mjs.map +1 -1
- package/resources/beta/pay/products/entitlements.d.mts +1 -1
- package/resources/beta/pay/products/entitlements.d.ts +1 -1
- package/resources/beta/pay/products/index.d.mts +1 -0
- package/resources/beta/pay/products/index.d.mts.map +1 -1
- package/resources/beta/pay/products/index.d.ts +1 -0
- package/resources/beta/pay/products/index.d.ts.map +1 -1
- package/resources/beta/pay/products/index.js +3 -1
- package/resources/beta/pay/products/index.js.map +1 -1
- package/resources/beta/pay/products/index.mjs +1 -0
- package/resources/beta/pay/products/index.mjs.map +1 -1
- package/resources/beta/pay/products/products.d.mts +45 -14
- package/resources/beta/pay/products/products.d.mts.map +1 -1
- package/resources/beta/pay/products/products.d.ts +45 -14
- package/resources/beta/pay/products/products.d.ts.map +1 -1
- package/resources/beta/pay/products/products.js +4 -0
- package/resources/beta/pay/products/products.js.map +1 -1
- package/resources/beta/pay/products/products.mjs +4 -0
- package/resources/beta/pay/products/products.mjs.map +1 -1
- package/resources/beta/pay/products/variants.d.mts +206 -0
- package/resources/beta/pay/products/variants.d.mts.map +1 -0
- package/resources/beta/pay/products/variants.d.ts +206 -0
- package/resources/beta/pay/products/variants.d.ts.map +1 -0
- package/resources/beta/pay/products/variants.js +56 -0
- package/resources/beta/pay/products/variants.js.map +1 -0
- package/resources/beta/pay/products/variants.mjs +52 -0
- package/resources/beta/pay/products/variants.mjs.map +1 -0
- package/resources/beta/push-notifications/index.d.mts +3 -0
- package/resources/beta/push-notifications/index.d.mts.map +1 -0
- package/resources/beta/push-notifications/index.d.ts +3 -0
- package/resources/beta/push-notifications/index.d.ts.map +1 -0
- package/resources/beta/push-notifications/index.js +9 -0
- package/resources/beta/push-notifications/index.js.map +1 -0
- package/resources/beta/push-notifications/index.mjs +4 -0
- package/resources/beta/push-notifications/index.mjs.map +1 -0
- package/resources/beta/push-notifications/push-notifications.d.mts +78 -0
- package/resources/beta/push-notifications/push-notifications.d.mts.map +1 -0
- package/resources/beta/push-notifications/push-notifications.d.ts +78 -0
- package/resources/beta/push-notifications/push-notifications.d.ts.map +1 -0
- package/resources/beta/push-notifications/push-notifications.js +32 -0
- package/resources/beta/push-notifications/push-notifications.js.map +1 -0
- package/resources/beta/push-notifications/push-notifications.mjs +27 -0
- package/resources/beta/push-notifications/push-notifications.mjs.map +1 -0
- package/resources/beta/push-notifications/subscriptions.d.mts +74 -0
- package/resources/beta/push-notifications/subscriptions.d.mts.map +1 -0
- package/resources/beta/push-notifications/subscriptions.d.ts +74 -0
- package/resources/beta/push-notifications/subscriptions.d.ts.map +1 -0
- package/resources/beta/push-notifications/subscriptions.js +23 -0
- package/resources/beta/push-notifications/subscriptions.js.map +1 -0
- package/resources/beta/push-notifications/subscriptions.mjs +19 -0
- package/resources/beta/push-notifications/subscriptions.mjs.map +1 -0
- package/resources/beta/push-notifications.d.mts +2 -0
- package/resources/beta/push-notifications.d.mts.map +1 -0
- package/resources/beta/push-notifications.d.ts +2 -0
- package/resources/beta/push-notifications.d.ts.map +1 -0
- package/resources/beta/push-notifications.js +6 -0
- package/resources/beta/push-notifications.js.map +1 -0
- package/resources/beta/push-notifications.mjs +3 -0
- package/resources/beta/push-notifications.mjs.map +1 -0
- package/src/resources/beta/beta.ts +18 -0
- package/src/resources/beta/index.ts +6 -0
- package/src/resources/beta/pay/coupons.ts +1 -1
- package/src/resources/beta/pay/customers.ts +1 -1
- package/src/resources/beta/pay/entitlements.ts +4 -26
- package/src/resources/beta/pay/pay.ts +87 -17
- package/src/resources/beta/pay/products/entitlements.ts +1 -1
- package/src/resources/beta/pay/products/index.ts +10 -0
- package/src/resources/beta/pay/products/products.ts +70 -14
- package/src/resources/beta/pay/products/variants.ts +279 -0
- package/src/resources/beta/push-notifications/index.ts +14 -0
- package/src/resources/beta/push-notifications/push-notifications.ts +112 -0
- package/src/resources/beta/push-notifications/subscriptions.ts +96 -0
- package/src/resources/beta/push-notifications.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -60,30 +60,66 @@ export interface PayCancelResponse {
|
|
|
60
60
|
*/
|
|
61
61
|
export interface PayCheckResponse {
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
has_entitlement: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* The entitlement key that was checked
|
|
63
|
+
* The entitlement ID that was checked
|
|
68
64
|
*/
|
|
69
|
-
|
|
65
|
+
entitlement_id: string;
|
|
70
66
|
/**
|
|
71
|
-
*
|
|
67
|
+
* Whether the customer has the entitlement
|
|
72
68
|
*/
|
|
73
|
-
|
|
69
|
+
has_entitlement: boolean;
|
|
74
70
|
}
|
|
75
71
|
/**
|
|
76
|
-
* Checkout
|
|
72
|
+
* Checkout response. For new customers, returns a checkout URL. For existing
|
|
73
|
+
* subscribers, returns the updated subscription.
|
|
77
74
|
*/
|
|
78
75
|
export interface PayCheckoutResponse {
|
|
79
76
|
/**
|
|
80
|
-
* The checkout session ID
|
|
77
|
+
* The checkout session ID (for checkout action) or subscription ID (for update
|
|
78
|
+
* action)
|
|
81
79
|
*/
|
|
82
80
|
id: string;
|
|
83
81
|
/**
|
|
84
|
-
* The checkout
|
|
82
|
+
* The action taken: 'checkout' for new subscriptions (redirect to URL), 'update'
|
|
83
|
+
* for subscription changes (already applied)
|
|
85
84
|
*/
|
|
86
|
-
|
|
85
|
+
action: 'checkout' | 'update';
|
|
86
|
+
/**
|
|
87
|
+
* The checkout mode: subscription for recurring prices, payment for one-time
|
|
88
|
+
* prices. Only present for 'checkout' action.
|
|
89
|
+
*/
|
|
90
|
+
mode?: 'subscription' | 'payment' | null;
|
|
91
|
+
/**
|
|
92
|
+
* The updated subscription details. Only present for 'update' action.
|
|
93
|
+
*/
|
|
94
|
+
subscription?: PayCheckoutResponse.Subscription | null;
|
|
95
|
+
/**
|
|
96
|
+
* The checkout URL to redirect the customer to. Only present for 'checkout'
|
|
97
|
+
* action.
|
|
98
|
+
*/
|
|
99
|
+
url?: string | null;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace PayCheckoutResponse {
|
|
102
|
+
/**
|
|
103
|
+
* The updated subscription details. Only present for 'update' action.
|
|
104
|
+
*/
|
|
105
|
+
interface Subscription {
|
|
106
|
+
/**
|
|
107
|
+
* The subscription ID
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
/**
|
|
111
|
+
* The product ID
|
|
112
|
+
*/
|
|
113
|
+
product_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* The subscription status
|
|
116
|
+
*/
|
|
117
|
+
status: string;
|
|
118
|
+
/**
|
|
119
|
+
* The variant ID if applicable
|
|
120
|
+
*/
|
|
121
|
+
variant_id?: string | null;
|
|
122
|
+
}
|
|
87
123
|
}
|
|
88
124
|
export interface PayCancelParams {
|
|
89
125
|
/**
|
|
@@ -106,9 +142,9 @@ export interface PayCheckParams {
|
|
|
106
142
|
*/
|
|
107
143
|
customer_id: string;
|
|
108
144
|
/**
|
|
109
|
-
* The entitlement
|
|
145
|
+
* The entitlement ID to check for access
|
|
110
146
|
*/
|
|
111
|
-
|
|
147
|
+
entitlement_id: string;
|
|
112
148
|
}
|
|
113
149
|
export interface PayCheckoutParams {
|
|
114
150
|
/**
|
|
@@ -116,13 +152,20 @@ export interface PayCheckoutParams {
|
|
|
116
152
|
*/
|
|
117
153
|
customer_id: string;
|
|
118
154
|
/**
|
|
119
|
-
* The product ID to
|
|
155
|
+
* The product ID to purchase
|
|
120
156
|
*/
|
|
121
157
|
product_id: string;
|
|
122
158
|
/**
|
|
123
|
-
* Optional custom ID for the subscription. If not provided, one will be
|
|
159
|
+
* Optional custom ID for the subscription or payment. If not provided, one will be
|
|
160
|
+
* generated.
|
|
124
161
|
*/
|
|
125
162
|
id?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Override billing cycle anchor behavior for subscription updates. 'now' resets to
|
|
165
|
+
* current time, 'unchanged' keeps original anchor. If not provided, uses the
|
|
166
|
+
* price's configured default.
|
|
167
|
+
*/
|
|
168
|
+
billing_cycle_anchor?: 'now' | 'unchanged';
|
|
126
169
|
/**
|
|
127
170
|
* URL to redirect on cancel
|
|
128
171
|
*/
|
|
@@ -131,10 +174,27 @@ export interface PayCheckoutParams {
|
|
|
131
174
|
* Promotion code to apply
|
|
132
175
|
*/
|
|
133
176
|
promotion_code?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Override proration behavior for subscription updates. 'default' creates
|
|
179
|
+
* prorations, 'none' disables them. If not provided, uses the price's configured
|
|
180
|
+
* default.
|
|
181
|
+
*/
|
|
182
|
+
proration_behavior?: 'default' | 'none';
|
|
183
|
+
/**
|
|
184
|
+
* Override proration date calculation for subscription updates. 'now' uses current
|
|
185
|
+
* time, 'start_of_period' uses billing period start. If not provided, uses the
|
|
186
|
+
* price's configured default.
|
|
187
|
+
*/
|
|
188
|
+
proration_date?: 'now' | 'start_of_period';
|
|
134
189
|
/**
|
|
135
190
|
* URL to redirect on success
|
|
136
191
|
*/
|
|
137
192
|
success_url?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Optional variant ID to specify a particular pricing tier. If not provided, the
|
|
195
|
+
* product's default price is used.
|
|
196
|
+
*/
|
|
197
|
+
variant_id?: string;
|
|
138
198
|
}
|
|
139
199
|
export declare namespace Pay {
|
|
140
200
|
export { type PayCancelResponse as PayCancelResponse, type PayCheckResponse as PayCheckResponse, type PayCheckoutResponse as PayCheckoutResponse, type PayCancelParams as PayCancelParams, type PayCheckParams as PayCheckParams, type PayCheckoutParams as PayCheckoutParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/pay/pay.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACpB;OACM,KAAK,YAAY;OACjB,EACL,QAAQ,EACR,eAAe,EACf,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,qBAAqB,EACtB;OACM,KAA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OAIG;IACH,MAAM,CAAC,IAAqB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAoB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,IAAuB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AAkMD,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC;AAC1B,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACxB,GAAG,CAAC,YAAY,GAAG,YAAY,CAAC;AAChC,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { Entitlements, type ProductEntitlement, type EntitlementListParams, type EntitlementAttachParams, type EntitlementRemoveParams, type ProductEntitlementsCursorIDPage, } from "./entitlements.mjs";
|
|
2
2
|
export { Products, type Product, type ProductCreateParams, type ProductUpdateParams, type ProductListParams, type ProductsCursorIDPage, } from "./products.mjs";
|
|
3
|
+
export { Variants, type Variant, type VariantCreateParams, type VariantUpdateParams, type VariantListParams, type VariantArchiveParams, type VariantGetParams, type VariantsCursorIDPage, } from "./variants.mjs";
|
|
3
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { Entitlements, type ProductEntitlement, type EntitlementListParams, type EntitlementAttachParams, type EntitlementRemoveParams, type ProductEntitlementsCursorIDPage, } from "./entitlements.js";
|
|
2
2
|
export { Products, type Product, type ProductCreateParams, type ProductUpdateParams, type ProductListParams, type ProductsCursorIDPage, } from "./products.js";
|
|
3
|
+
export { Variants, type Variant, type VariantCreateParams, type VariantUpdateParams, type VariantListParams, type VariantArchiveParams, type VariantGetParams, type VariantsCursorIDPage, } from "./variants.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":"OAEO,EACL,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,GACrC;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B;OACM,EACL,QAAQ,EACR,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Products = exports.Entitlements = void 0;
|
|
4
|
+
exports.Variants = exports.Products = exports.Entitlements = void 0;
|
|
5
5
|
var entitlements_1 = require("./entitlements.js");
|
|
6
6
|
Object.defineProperty(exports, "Entitlements", { enumerable: true, get: function () { return entitlements_1.Entitlements; } });
|
|
7
7
|
var products_1 = require("./products.js");
|
|
8
8
|
Object.defineProperty(exports, "Products", { enumerable: true, get: function () { return products_1.Products; } });
|
|
9
|
+
var variants_1 = require("./variants.js");
|
|
10
|
+
Object.defineProperty(exports, "Variants", { enumerable: true, get: function () { return variants_1.Variants; } });
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAOwB;AANtB,4GAAA,YAAY,OAAA;AAOd,0CAOoB;AANlB,oGAAA,QAAQ,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAOwB;AANtB,4GAAA,YAAY,OAAA;AAOd,0CAOoB;AANlB,oGAAA,QAAQ,OAAA;AAOV,0CASoB;AARlB,oGAAA,QAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,YAAY,GAMb;OACM,EACL,QAAQ,GAMT"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,YAAY,GAMb;OACM,EACL,QAAQ,GAMT;OACM,EACL,QAAQ,GAQT"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { APIResource } from "../../../../core/resource.mjs";
|
|
2
2
|
import * as EntitlementsAPI from "./entitlements.mjs";
|
|
3
3
|
import { EntitlementAttachParams, EntitlementListParams, EntitlementRemoveParams, Entitlements, ProductEntitlement, ProductEntitlementsCursorIDPage } from "./entitlements.mjs";
|
|
4
|
+
import * as VariantsAPI from "./variants.mjs";
|
|
5
|
+
import { Variant, VariantArchiveParams, VariantCreateParams, VariantGetParams, VariantListParams, VariantUpdateParams, Variants, VariantsCursorIDPage } from "./variants.mjs";
|
|
4
6
|
import { APIPromise } from "../../../../core/api-promise.mjs";
|
|
5
7
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../../../core/pagination.mjs";
|
|
6
8
|
import { RequestOptions } from "../../../../internal/request-options.mjs";
|
|
7
9
|
export declare class Products extends APIResource {
|
|
8
10
|
entitlements: EntitlementsAPI.Entitlements;
|
|
11
|
+
variants: VariantsAPI.Variants;
|
|
9
12
|
/**
|
|
10
13
|
* Creates a new subscription product with a recurring price. Common examples
|
|
11
14
|
* include Free, Pro, Business, or Teams tiers. After creating a product, attach
|
|
@@ -37,17 +40,17 @@ export declare class Products extends APIResource {
|
|
|
37
40
|
}
|
|
38
41
|
export type ProductsCursorIDPage = CursorIDPage<Product>;
|
|
39
42
|
/**
|
|
40
|
-
* A
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
+
* A product that customers can purchase. Products can be one-time purchases or
|
|
44
|
+
* recurring subscriptions. Attach entitlements to a product to grant features to
|
|
45
|
+
* customers.
|
|
43
46
|
*/
|
|
44
47
|
export interface Product {
|
|
45
48
|
/**
|
|
46
|
-
* Unique identifier for the
|
|
49
|
+
* Unique identifier for the price
|
|
47
50
|
*/
|
|
48
51
|
id: string;
|
|
49
52
|
/**
|
|
50
|
-
* Whether the product is available for new
|
|
53
|
+
* Whether the product is available for new purchases
|
|
51
54
|
*/
|
|
52
55
|
active: boolean;
|
|
53
56
|
/**
|
|
@@ -59,7 +62,7 @@ export interface Product {
|
|
|
59
62
|
*/
|
|
60
63
|
name: string;
|
|
61
64
|
/**
|
|
62
|
-
*
|
|
65
|
+
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
63
66
|
*/
|
|
64
67
|
default_price?: Product.DefaultPrice | null;
|
|
65
68
|
/**
|
|
@@ -69,25 +72,46 @@ export interface Product {
|
|
|
69
72
|
}
|
|
70
73
|
export declare namespace Product {
|
|
71
74
|
/**
|
|
72
|
-
*
|
|
75
|
+
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
73
76
|
*/
|
|
74
77
|
interface DefaultPrice {
|
|
75
78
|
/**
|
|
76
|
-
* Unique identifier for the
|
|
79
|
+
* Unique identifier for the price
|
|
77
80
|
*/
|
|
78
81
|
id: string;
|
|
82
|
+
/**
|
|
83
|
+
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
84
|
+
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
85
|
+
*/
|
|
86
|
+
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
79
87
|
/**
|
|
80
88
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
81
89
|
*/
|
|
82
90
|
currency: string;
|
|
83
91
|
/**
|
|
84
|
-
* Billing frequency: day, week, month, or year
|
|
92
|
+
* Billing frequency for recurring prices: day, week, month, or year. Null for
|
|
93
|
+
* one-time prices.
|
|
85
94
|
*/
|
|
86
|
-
interval: 'day' | 'week' | 'month' | 'year';
|
|
95
|
+
interval: 'day' | 'week' | 'month' | 'year' | null;
|
|
87
96
|
/**
|
|
88
|
-
* Number of intervals between billings
|
|
97
|
+
* Number of intervals between billings for recurring prices. Null for one-time
|
|
98
|
+
* prices.
|
|
89
99
|
*/
|
|
90
|
-
interval_count: number;
|
|
100
|
+
interval_count: number | null;
|
|
101
|
+
/**
|
|
102
|
+
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
103
|
+
* 'none' disables them. Null for one-time prices.
|
|
104
|
+
*/
|
|
105
|
+
proration_behavior: 'default' | 'none' | null;
|
|
106
|
+
/**
|
|
107
|
+
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
108
|
+
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
109
|
+
*/
|
|
110
|
+
proration_date: 'now' | 'start_of_period' | null;
|
|
111
|
+
/**
|
|
112
|
+
* Price type: one_time for single purchases, recurring for subscriptions
|
|
113
|
+
*/
|
|
114
|
+
type: 'one_time' | 'recurring';
|
|
91
115
|
/**
|
|
92
116
|
* Price amount in the smallest currency unit (e.g., cents)
|
|
93
117
|
*/
|
|
@@ -117,13 +141,19 @@ export interface ProductCreateParams {
|
|
|
117
141
|
*/
|
|
118
142
|
description?: string;
|
|
119
143
|
/**
|
|
120
|
-
* Billing frequency: day, week, month, or year
|
|
144
|
+
* Billing frequency for recurring prices: day, week, month, or year. Required for
|
|
145
|
+
* recurring type, ignored for one_time.
|
|
121
146
|
*/
|
|
122
147
|
interval?: 'day' | 'week' | 'month' | 'year';
|
|
123
148
|
/**
|
|
124
|
-
* Number of intervals between billings
|
|
149
|
+
* Number of intervals between billings for recurring prices. Required for
|
|
150
|
+
* recurring type, ignored for one_time.
|
|
125
151
|
*/
|
|
126
152
|
interval_count?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Price type: one_time for single purchases, recurring for subscriptions
|
|
155
|
+
*/
|
|
156
|
+
type?: 'one_time' | 'recurring';
|
|
127
157
|
}
|
|
128
158
|
export interface ProductUpdateParams {
|
|
129
159
|
/**
|
|
@@ -148,5 +178,6 @@ export interface ProductListParams extends CursorIDPageParams {
|
|
|
148
178
|
export declare namespace Products {
|
|
149
179
|
export { type Product as Product, type ProductsCursorIDPage as ProductsCursorIDPage, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, };
|
|
150
180
|
export { Entitlements as Entitlements, type ProductEntitlement as ProductEntitlement, type ProductEntitlementsCursorIDPage as ProductEntitlementsCursorIDPage, type EntitlementListParams as EntitlementListParams, type EntitlementAttachParams as EntitlementAttachParams, type EntitlementRemoveParams as EntitlementRemoveParams, };
|
|
181
|
+
export { Variants as Variants, type Variant as Variant, type VariantsCursorIDPage as VariantsCursorIDPage, type VariantCreateParams as VariantCreateParams, type VariantUpdateParams as VariantUpdateParams, type VariantListParams as VariantListParams, type VariantArchiveParams as VariantArchiveParams, type VariantGetParams as VariantGetParams, };
|
|
151
182
|
}
|
|
152
183
|
//# sourceMappingURL=products.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.mts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EAClB,+BAA+B,EAChC;OACM,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;
|
|
1
|
+
{"version":3,"file":"products.d.mts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EAClB,+BAA+B,EAChC;OACM,KAAK,WAAW;OAChB,EACL,OAAO,EACP,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACrB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAC5F,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAIhF;;;;OAIG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,OAAO,CAAC;IAItB;;;;OAIG;IACH,IAAI,CACF,KAAK,GAAE,i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AA+B,EACvE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { APIResource } from "../../../../core/resource.js";
|
|
2
2
|
import * as EntitlementsAPI from "./entitlements.js";
|
|
3
3
|
import { EntitlementAttachParams, EntitlementListParams, EntitlementRemoveParams, Entitlements, ProductEntitlement, ProductEntitlementsCursorIDPage } from "./entitlements.js";
|
|
4
|
+
import * as VariantsAPI from "./variants.js";
|
|
5
|
+
import { Variant, VariantArchiveParams, VariantCreateParams, VariantGetParams, VariantListParams, VariantUpdateParams, Variants, VariantsCursorIDPage } from "./variants.js";
|
|
4
6
|
import { APIPromise } from "../../../../core/api-promise.js";
|
|
5
7
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../../../core/pagination.js";
|
|
6
8
|
import { RequestOptions } from "../../../../internal/request-options.js";
|
|
7
9
|
export declare class Products extends APIResource {
|
|
8
10
|
entitlements: EntitlementsAPI.Entitlements;
|
|
11
|
+
variants: VariantsAPI.Variants;
|
|
9
12
|
/**
|
|
10
13
|
* Creates a new subscription product with a recurring price. Common examples
|
|
11
14
|
* include Free, Pro, Business, or Teams tiers. After creating a product, attach
|
|
@@ -37,17 +40,17 @@ export declare class Products extends APIResource {
|
|
|
37
40
|
}
|
|
38
41
|
export type ProductsCursorIDPage = CursorIDPage<Product>;
|
|
39
42
|
/**
|
|
40
|
-
* A
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
+
* A product that customers can purchase. Products can be one-time purchases or
|
|
44
|
+
* recurring subscriptions. Attach entitlements to a product to grant features to
|
|
45
|
+
* customers.
|
|
43
46
|
*/
|
|
44
47
|
export interface Product {
|
|
45
48
|
/**
|
|
46
|
-
* Unique identifier for the
|
|
49
|
+
* Unique identifier for the price
|
|
47
50
|
*/
|
|
48
51
|
id: string;
|
|
49
52
|
/**
|
|
50
|
-
* Whether the product is available for new
|
|
53
|
+
* Whether the product is available for new purchases
|
|
51
54
|
*/
|
|
52
55
|
active: boolean;
|
|
53
56
|
/**
|
|
@@ -59,7 +62,7 @@ export interface Product {
|
|
|
59
62
|
*/
|
|
60
63
|
name: string;
|
|
61
64
|
/**
|
|
62
|
-
*
|
|
65
|
+
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
63
66
|
*/
|
|
64
67
|
default_price?: Product.DefaultPrice | null;
|
|
65
68
|
/**
|
|
@@ -69,25 +72,46 @@ export interface Product {
|
|
|
69
72
|
}
|
|
70
73
|
export declare namespace Product {
|
|
71
74
|
/**
|
|
72
|
-
*
|
|
75
|
+
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
73
76
|
*/
|
|
74
77
|
interface DefaultPrice {
|
|
75
78
|
/**
|
|
76
|
-
* Unique identifier for the
|
|
79
|
+
* Unique identifier for the price
|
|
77
80
|
*/
|
|
78
81
|
id: string;
|
|
82
|
+
/**
|
|
83
|
+
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
84
|
+
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
85
|
+
*/
|
|
86
|
+
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
79
87
|
/**
|
|
80
88
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
81
89
|
*/
|
|
82
90
|
currency: string;
|
|
83
91
|
/**
|
|
84
|
-
* Billing frequency: day, week, month, or year
|
|
92
|
+
* Billing frequency for recurring prices: day, week, month, or year. Null for
|
|
93
|
+
* one-time prices.
|
|
85
94
|
*/
|
|
86
|
-
interval: 'day' | 'week' | 'month' | 'year';
|
|
95
|
+
interval: 'day' | 'week' | 'month' | 'year' | null;
|
|
87
96
|
/**
|
|
88
|
-
* Number of intervals between billings
|
|
97
|
+
* Number of intervals between billings for recurring prices. Null for one-time
|
|
98
|
+
* prices.
|
|
89
99
|
*/
|
|
90
|
-
interval_count: number;
|
|
100
|
+
interval_count: number | null;
|
|
101
|
+
/**
|
|
102
|
+
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
103
|
+
* 'none' disables them. Null for one-time prices.
|
|
104
|
+
*/
|
|
105
|
+
proration_behavior: 'default' | 'none' | null;
|
|
106
|
+
/**
|
|
107
|
+
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
108
|
+
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
109
|
+
*/
|
|
110
|
+
proration_date: 'now' | 'start_of_period' | null;
|
|
111
|
+
/**
|
|
112
|
+
* Price type: one_time for single purchases, recurring for subscriptions
|
|
113
|
+
*/
|
|
114
|
+
type: 'one_time' | 'recurring';
|
|
91
115
|
/**
|
|
92
116
|
* Price amount in the smallest currency unit (e.g., cents)
|
|
93
117
|
*/
|
|
@@ -117,13 +141,19 @@ export interface ProductCreateParams {
|
|
|
117
141
|
*/
|
|
118
142
|
description?: string;
|
|
119
143
|
/**
|
|
120
|
-
* Billing frequency: day, week, month, or year
|
|
144
|
+
* Billing frequency for recurring prices: day, week, month, or year. Required for
|
|
145
|
+
* recurring type, ignored for one_time.
|
|
121
146
|
*/
|
|
122
147
|
interval?: 'day' | 'week' | 'month' | 'year';
|
|
123
148
|
/**
|
|
124
|
-
* Number of intervals between billings
|
|
149
|
+
* Number of intervals between billings for recurring prices. Required for
|
|
150
|
+
* recurring type, ignored for one_time.
|
|
125
151
|
*/
|
|
126
152
|
interval_count?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Price type: one_time for single purchases, recurring for subscriptions
|
|
155
|
+
*/
|
|
156
|
+
type?: 'one_time' | 'recurring';
|
|
127
157
|
}
|
|
128
158
|
export interface ProductUpdateParams {
|
|
129
159
|
/**
|
|
@@ -148,5 +178,6 @@ export interface ProductListParams extends CursorIDPageParams {
|
|
|
148
178
|
export declare namespace Products {
|
|
149
179
|
export { type Product as Product, type ProductsCursorIDPage as ProductsCursorIDPage, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, };
|
|
150
180
|
export { Entitlements as Entitlements, type ProductEntitlement as ProductEntitlement, type ProductEntitlementsCursorIDPage as ProductEntitlementsCursorIDPage, type EntitlementListParams as EntitlementListParams, type EntitlementAttachParams as EntitlementAttachParams, type EntitlementRemoveParams as EntitlementRemoveParams, };
|
|
181
|
+
export { Variants as Variants, type Variant as Variant, type VariantsCursorIDPage as VariantsCursorIDPage, type VariantCreateParams as VariantCreateParams, type VariantUpdateParams as VariantUpdateParams, type VariantListParams as VariantListParams, type VariantArchiveParams as VariantArchiveParams, type VariantGetParams as VariantGetParams, };
|
|
151
182
|
}
|
|
152
183
|
//# sourceMappingURL=products.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EACL,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EAClB,+BAA+B,EAChC;OACM,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OACtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":"O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C;CACH"}
|
|
@@ -6,12 +6,15 @@ const tslib_1 = require("../../../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../../../core/resource.js");
|
|
7
7
|
const EntitlementsAPI = tslib_1.__importStar(require("./entitlements.js"));
|
|
8
8
|
const entitlements_1 = require("./entitlements.js");
|
|
9
|
+
const VariantsAPI = tslib_1.__importStar(require("./variants.js"));
|
|
10
|
+
const variants_1 = require("./variants.js");
|
|
9
11
|
const pagination_1 = require("../../../../core/pagination.js");
|
|
10
12
|
const path_1 = require("../../../../internal/utils/path.js");
|
|
11
13
|
class Products extends resource_1.APIResource {
|
|
12
14
|
constructor() {
|
|
13
15
|
super(...arguments);
|
|
14
16
|
this.entitlements = new EntitlementsAPI.Entitlements(this._client);
|
|
17
|
+
this.variants = new VariantsAPI.Variants(this._client);
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* Creates a new subscription product with a recurring price. Common examples
|
|
@@ -54,4 +57,5 @@ class Products extends resource_1.APIResource {
|
|
|
54
57
|
}
|
|
55
58
|
exports.Products = Products;
|
|
56
59
|
Products.Entitlements = entitlements_1.Entitlements;
|
|
60
|
+
Products.Variants = variants_1.Variants;
|
|
57
61
|
//# sourceMappingURL=products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,2DAAwD;AACxD,2EAAkD;AAClD,oDAOwB;
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,2DAAwD;AACxD,2EAAkD;AAClD,oDAOwB;AACxB,mEAA0C;AAC1C,4CASoB;AAEpB,+DAAiG;AAEjG,6DAAuD;AAEvD,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,C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
2
2
|
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
3
|
import * as EntitlementsAPI from "./entitlements.mjs";
|
|
4
4
|
import { Entitlements, } from "./entitlements.mjs";
|
|
5
|
+
import * as VariantsAPI from "./variants.mjs";
|
|
6
|
+
import { Variants, } from "./variants.mjs";
|
|
5
7
|
import { CursorIDPage } from "../../../../core/pagination.mjs";
|
|
6
8
|
import { path } from "../../../../internal/utils/path.mjs";
|
|
7
9
|
export class Products extends APIResource {
|
|
8
10
|
constructor() {
|
|
9
11
|
super(...arguments);
|
|
10
12
|
this.entitlements = new EntitlementsAPI.Entitlements(this._client);
|
|
13
|
+
this.variants = new VariantsAPI.Variants(this._client);
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Creates a new subscription product with a recurring price. Common examples
|
|
@@ -49,4 +52,5 @@ export class Products extends APIResource {
|
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
Products.Entitlements = Entitlements;
|
|
55
|
+
Products.Variants = Variants;
|
|
52
56
|
//# sourceMappingURL=products.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAIL,YAAY,GAGb;OAEM,EAAE,YAAY,EAAwC;OAEtD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"products.mjs","sourceRoot":"","sources":["../../../../src/resources/beta/pay/products/products.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAIL,YAAY,GAGb;OACM,KAAK,WAAW;OAChB,EAOL,QAAQ,GAET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