@usehercules/sdk 1.8.0 → 1.10.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 +42 -0
- package/client.d.mts +0 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -3
- package/client.d.ts.map +1 -1
- package/client.js +2 -15
- package/client.js.map +1 -1
- package/client.mjs +2 -15
- package/client.mjs.map +1 -1
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- 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/commerce/commerce.d.mts +17 -12
- package/resources/beta/commerce/commerce.d.mts.map +1 -1
- package/resources/beta/commerce/commerce.d.ts +17 -12
- package/resources/beta/commerce/commerce.d.ts.map +1 -1
- package/resources/beta/commerce/commerce.js.map +1 -1
- package/resources/beta/commerce/commerce.mjs.map +1 -1
- package/resources/beta/commerce/coupons.d.mts +2 -1
- package/resources/beta/commerce/coupons.d.mts.map +1 -1
- package/resources/beta/commerce/coupons.d.ts +2 -1
- package/resources/beta/commerce/coupons.d.ts.map +1 -1
- package/resources/beta/commerce/customers.d.mts +255 -4
- package/resources/beta/commerce/customers.d.mts.map +1 -1
- package/resources/beta/commerce/customers.d.ts +255 -4
- package/resources/beta/commerce/customers.d.ts.map +1 -1
- package/resources/beta/commerce/customers.js +2 -1
- package/resources/beta/commerce/customers.js.map +1 -1
- package/resources/beta/commerce/customers.mjs +2 -1
- package/resources/beta/commerce/customers.mjs.map +1 -1
- package/resources/beta/commerce/products/products.d.mts +275 -183
- package/resources/beta/commerce/products/products.d.mts.map +1 -1
- package/resources/beta/commerce/products/products.d.ts +275 -183
- package/resources/beta/commerce/products/products.d.ts.map +1 -1
- package/resources/beta/commerce/products/products.js.map +1 -1
- package/resources/beta/commerce/products/products.mjs.map +1 -1
- package/resources/beta/commerce/products/resources.d.mts +23 -22
- package/resources/beta/commerce/products/resources.d.mts.map +1 -1
- package/resources/beta/commerce/products/resources.d.ts +23 -22
- package/resources/beta/commerce/products/resources.d.ts.map +1 -1
- package/resources/beta/commerce/products/variants.d.mts +137 -103
- package/resources/beta/commerce/products/variants.d.mts.map +1 -1
- package/resources/beta/commerce/products/variants.d.ts +137 -103
- package/resources/beta/commerce/products/variants.d.ts.map +1 -1
- package/resources/beta/content/assets.d.mts +226 -0
- package/resources/beta/content/assets.d.mts.map +1 -0
- package/resources/beta/content/assets.d.ts +226 -0
- package/resources/beta/content/assets.d.ts.map +1 -0
- package/resources/beta/content/assets.js +56 -0
- package/resources/beta/content/assets.js.map +1 -0
- package/resources/beta/content/assets.mjs +52 -0
- package/resources/beta/content/assets.mjs.map +1 -0
- package/resources/beta/content/content.d.mts +26 -0
- package/resources/beta/content/content.d.mts.map +1 -0
- package/resources/beta/content/content.d.ts +26 -0
- package/resources/beta/content/content.d.ts.map +1 -0
- package/resources/beta/content/content.js +33 -0
- package/resources/beta/content/content.js.map +1 -0
- package/resources/beta/content/content.mjs +28 -0
- package/resources/beta/content/content.mjs.map +1 -0
- package/resources/beta/content/entries.d.mts +266 -0
- package/resources/beta/content/entries.d.mts.map +1 -0
- package/resources/beta/content/entries.d.ts +266 -0
- package/resources/beta/content/entries.d.ts.map +1 -0
- package/resources/beta/content/entries.js +63 -0
- package/resources/beta/content/entries.js.map +1 -0
- package/resources/beta/content/entries.mjs +59 -0
- package/resources/beta/content/entries.mjs.map +1 -0
- package/resources/beta/content/index.d.mts +7 -0
- package/resources/beta/content/index.d.mts.map +1 -0
- package/resources/beta/content/index.d.ts +7 -0
- package/resources/beta/content/index.d.ts.map +1 -0
- package/resources/beta/content/index.js +17 -0
- package/resources/beta/content/index.js.map +1 -0
- package/resources/beta/content/index.mjs +8 -0
- package/resources/beta/content/index.mjs.map +1 -0
- package/resources/beta/content/locales.d.mts +116 -0
- package/resources/beta/content/locales.d.mts.map +1 -0
- package/resources/beta/content/locales.d.ts +116 -0
- package/resources/beta/content/locales.d.ts.map +1 -0
- package/resources/beta/content/locales.js +49 -0
- package/resources/beta/content/locales.js.map +1 -0
- package/resources/beta/content/locales.mjs +45 -0
- package/resources/beta/content/locales.mjs.map +1 -0
- package/resources/beta/content/models/fields.d.mts +186 -0
- package/resources/beta/content/models/fields.d.mts.map +1 -0
- package/resources/beta/content/models/fields.d.ts +186 -0
- package/resources/beta/content/models/fields.d.ts.map +1 -0
- package/resources/beta/content/models/fields.js +37 -0
- package/resources/beta/content/models/fields.js.map +1 -0
- package/resources/beta/content/models/fields.mjs +33 -0
- package/resources/beta/content/models/fields.mjs.map +1 -0
- package/resources/beta/content/models/index.d.mts +3 -0
- package/resources/beta/content/models/index.d.mts.map +1 -0
- package/resources/beta/content/models/index.d.ts +3 -0
- package/resources/beta/content/models/index.d.ts.map +1 -0
- package/resources/beta/content/models/index.js +9 -0
- package/resources/beta/content/models/index.js.map +1 -0
- package/resources/beta/content/models/index.mjs +4 -0
- package/resources/beta/content/models/index.mjs.map +1 -0
- package/resources/beta/content/models/models.d.mts +296 -0
- package/resources/beta/content/models/models.d.mts.map +1 -0
- package/resources/beta/content/models/models.d.ts +296 -0
- package/resources/beta/content/models/models.d.ts.map +1 -0
- package/resources/beta/content/models/models.js +54 -0
- package/resources/beta/content/models/models.js.map +1 -0
- package/resources/beta/content/models/models.mjs +49 -0
- package/resources/beta/content/models/models.mjs.map +1 -0
- package/resources/beta/content/models.d.mts +2 -0
- package/resources/beta/content/models.d.mts.map +1 -0
- package/resources/beta/content/models.d.ts +2 -0
- package/resources/beta/content/models.d.ts.map +1 -0
- package/resources/beta/content/models.js +6 -0
- package/resources/beta/content/models.js.map +1 -0
- package/resources/beta/content/models.mjs +3 -0
- package/resources/beta/content/models.mjs.map +1 -0
- package/resources/beta/content/releases/index.d.mts +3 -0
- package/resources/beta/content/releases/index.d.mts.map +1 -0
- package/resources/beta/content/releases/index.d.ts +3 -0
- package/resources/beta/content/releases/index.d.ts.map +1 -0
- package/resources/beta/content/releases/index.js +9 -0
- package/resources/beta/content/releases/index.js.map +1 -0
- package/resources/beta/content/releases/index.mjs +4 -0
- package/resources/beta/content/releases/index.mjs.map +1 -0
- package/resources/beta/content/releases/items.d.mts +39 -0
- package/resources/beta/content/releases/items.d.mts.map +1 -0
- package/resources/beta/content/releases/items.d.ts +39 -0
- package/resources/beta/content/releases/items.d.ts.map +1 -0
- package/resources/beta/content/releases/items.js +28 -0
- package/resources/beta/content/releases/items.js.map +1 -0
- package/resources/beta/content/releases/items.mjs +24 -0
- package/resources/beta/content/releases/items.mjs.map +1 -0
- package/resources/beta/content/releases/releases.d.mts +151 -0
- package/resources/beta/content/releases/releases.d.mts.map +1 -0
- package/resources/beta/content/releases/releases.d.ts +151 -0
- package/resources/beta/content/releases/releases.d.ts.map +1 -0
- package/resources/beta/content/releases/releases.js +69 -0
- package/resources/beta/content/releases/releases.js.map +1 -0
- package/resources/beta/content/releases/releases.mjs +64 -0
- package/resources/beta/content/releases/releases.mjs.map +1 -0
- package/resources/beta/content/releases.d.mts +2 -0
- package/resources/beta/content/releases.d.mts.map +1 -0
- package/resources/beta/content/releases.d.ts +2 -0
- package/resources/beta/content/releases.d.ts.map +1 -0
- package/resources/beta/content/releases.js +6 -0
- package/resources/beta/content/releases.js.map +1 -0
- package/resources/beta/content/releases.mjs +3 -0
- package/resources/beta/content/releases.mjs.map +1 -0
- package/resources/beta/content.d.mts +2 -0
- package/resources/beta/content.d.mts.map +1 -0
- package/resources/beta/content.d.ts +2 -0
- package/resources/beta/content.d.ts.map +1 -0
- package/resources/beta/content.js +6 -0
- package/resources/beta/content.js.map +1 -0
- package/resources/beta/content.mjs +3 -0
- package/resources/beta/content.mjs.map +1 -0
- 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/src/client.ts +2 -17
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/resources/beta/beta.ts +6 -0
- package/src/resources/beta/commerce/commerce.ts +19 -13
- package/src/resources/beta/commerce/coupons.ts +2 -1
- package/src/resources/beta/commerce/customers.ts +315 -5
- package/src/resources/beta/commerce/products/products.ts +318 -206
- package/src/resources/beta/commerce/products/resources.ts +23 -22
- package/src/resources/beta/commerce/products/variants.ts +164 -118
- package/src/resources/beta/content/assets.ts +299 -0
- package/src/resources/beta/content/content.ts +117 -0
- package/src/resources/beta/content/entries.ts +347 -0
- package/src/resources/beta/content/index.ts +47 -0
- package/src/resources/beta/content/locales.ts +169 -0
- package/src/resources/beta/content/models/fields.ts +276 -0
- package/src/resources/beta/content/models/index.ts +12 -0
- package/src/resources/beta/content/models/models.ts +436 -0
- package/src/resources/beta/content/models.ts +3 -0
- package/src/resources/beta/content/releases/index.ts +13 -0
- package/src/resources/beta/content/releases/items.ts +57 -0
- package/src/resources/beta/content/releases/releases.ts +220 -0
- package/src/resources/beta/content/releases.ts +3 -0
- package/src/resources/beta/content.ts +3 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -62,6 +62,11 @@ export interface ProductCreateResponse {
|
|
|
62
62
|
* Display name for the product (e.g., Pro, Business, Teams)
|
|
63
63
|
*/
|
|
64
64
|
name: string;
|
|
65
|
+
/**
|
|
66
|
+
* ID of the subscription group this product belongs to. Subscription groups define
|
|
67
|
+
* shared billing configuration. All products must belong to a subscription group.
|
|
68
|
+
*/
|
|
69
|
+
product_group_id: string;
|
|
65
70
|
/**
|
|
66
71
|
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
67
72
|
*/
|
|
@@ -80,11 +85,6 @@ export interface ProductCreateResponse {
|
|
|
80
85
|
metadata?: {
|
|
81
86
|
[key: string]: unknown;
|
|
82
87
|
};
|
|
83
|
-
/**
|
|
84
|
-
* ID of the product group this product belongs to. Product groups define shared
|
|
85
|
-
* billing configuration.
|
|
86
|
-
*/
|
|
87
|
-
product_group_id?: string | null;
|
|
88
88
|
/**
|
|
89
89
|
* Resources attached to this product. Customers get access to these resources when
|
|
90
90
|
* they purchase the product.
|
|
@@ -104,11 +104,6 @@ export declare namespace ProductCreateResponse {
|
|
|
104
104
|
* Unique identifier for the topic subscription
|
|
105
105
|
*/
|
|
106
106
|
id: string;
|
|
107
|
-
/**
|
|
108
|
-
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
109
|
-
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
110
|
-
*/
|
|
111
|
-
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
112
107
|
/**
|
|
113
108
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
114
109
|
*/
|
|
@@ -123,16 +118,6 @@ export declare namespace ProductCreateResponse {
|
|
|
123
118
|
* prices.
|
|
124
119
|
*/
|
|
125
120
|
interval_count: number | null;
|
|
126
|
-
/**
|
|
127
|
-
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
128
|
-
* 'none' disables them. Null for one-time prices.
|
|
129
|
-
*/
|
|
130
|
-
proration_behavior: 'default' | 'none' | null;
|
|
131
|
-
/**
|
|
132
|
-
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
133
|
-
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
134
|
-
*/
|
|
135
|
-
proration_date: 'now' | 'start_of_period' | null;
|
|
136
121
|
/**
|
|
137
122
|
* Price type: one_time for single purchases, recurring for subscriptions
|
|
138
123
|
*/
|
|
@@ -147,13 +132,33 @@ export declare namespace ProductCreateResponse {
|
|
|
147
132
|
*/
|
|
148
133
|
interface Media {
|
|
149
134
|
/**
|
|
150
|
-
*
|
|
135
|
+
* CDN file ID
|
|
151
136
|
*/
|
|
152
|
-
|
|
137
|
+
id: string;
|
|
153
138
|
/**
|
|
154
|
-
*
|
|
139
|
+
* Display order in gallery (0-indexed)
|
|
140
|
+
*/
|
|
141
|
+
display_order: number;
|
|
142
|
+
/**
|
|
143
|
+
* Type of media: image or video
|
|
144
|
+
*/
|
|
145
|
+
type: 'image' | 'video';
|
|
146
|
+
/**
|
|
147
|
+
* CDN URL of the media resource
|
|
155
148
|
*/
|
|
156
149
|
url: string;
|
|
150
|
+
/**
|
|
151
|
+
* File size in bytes
|
|
152
|
+
*/
|
|
153
|
+
file_size?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Original filename
|
|
156
|
+
*/
|
|
157
|
+
filename?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Optimized thumbnail URL for images
|
|
160
|
+
*/
|
|
161
|
+
thumbnail_url?: string;
|
|
157
162
|
}
|
|
158
163
|
/**
|
|
159
164
|
* A resource that can be attached to products to grant access to customers.
|
|
@@ -173,25 +178,25 @@ export declare namespace ProductCreateResponse {
|
|
|
173
178
|
*/
|
|
174
179
|
created: string;
|
|
175
180
|
/**
|
|
176
|
-
* Type of resource
|
|
181
|
+
* Type of resource
|
|
177
182
|
*/
|
|
178
|
-
type: '
|
|
183
|
+
type: 'feature';
|
|
179
184
|
/**
|
|
180
|
-
*
|
|
185
|
+
* Feature grant data. Required when type is 'feature'.
|
|
181
186
|
*/
|
|
182
187
|
custom_entitlement?: Resource.CustomEntitlement | null;
|
|
183
188
|
}
|
|
184
189
|
namespace Resource {
|
|
185
190
|
/**
|
|
186
|
-
*
|
|
191
|
+
* Feature grant data. Required when type is 'feature'.
|
|
187
192
|
*/
|
|
188
193
|
interface CustomEntitlement {
|
|
189
194
|
/**
|
|
190
|
-
*
|
|
195
|
+
* The feature key that identifies what access is granted (e.g., 'pro_features')
|
|
191
196
|
*/
|
|
192
197
|
id: string;
|
|
193
198
|
/**
|
|
194
|
-
* Custom metadata for the
|
|
199
|
+
* Custom metadata for the feature grant
|
|
195
200
|
*/
|
|
196
201
|
metadata?: {
|
|
197
202
|
[key: string]: unknown;
|
|
@@ -221,6 +226,11 @@ export interface ProductUpdateResponse {
|
|
|
221
226
|
* Display name for the product (e.g., Pro, Business, Teams)
|
|
222
227
|
*/
|
|
223
228
|
name: string;
|
|
229
|
+
/**
|
|
230
|
+
* ID of the subscription group this product belongs to. Subscription groups define
|
|
231
|
+
* shared billing configuration. All products must belong to a subscription group.
|
|
232
|
+
*/
|
|
233
|
+
product_group_id: string;
|
|
224
234
|
/**
|
|
225
235
|
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
226
236
|
*/
|
|
@@ -239,11 +249,6 @@ export interface ProductUpdateResponse {
|
|
|
239
249
|
metadata?: {
|
|
240
250
|
[key: string]: unknown;
|
|
241
251
|
};
|
|
242
|
-
/**
|
|
243
|
-
* ID of the product group this product belongs to. Product groups define shared
|
|
244
|
-
* billing configuration.
|
|
245
|
-
*/
|
|
246
|
-
product_group_id?: string | null;
|
|
247
252
|
/**
|
|
248
253
|
* Resources attached to this product. Customers get access to these resources when
|
|
249
254
|
* they purchase the product.
|
|
@@ -263,11 +268,6 @@ export declare namespace ProductUpdateResponse {
|
|
|
263
268
|
* Unique identifier for the topic subscription
|
|
264
269
|
*/
|
|
265
270
|
id: string;
|
|
266
|
-
/**
|
|
267
|
-
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
268
|
-
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
269
|
-
*/
|
|
270
|
-
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
271
271
|
/**
|
|
272
272
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
273
273
|
*/
|
|
@@ -282,16 +282,6 @@ export declare namespace ProductUpdateResponse {
|
|
|
282
282
|
* prices.
|
|
283
283
|
*/
|
|
284
284
|
interval_count: number | null;
|
|
285
|
-
/**
|
|
286
|
-
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
287
|
-
* 'none' disables them. Null for one-time prices.
|
|
288
|
-
*/
|
|
289
|
-
proration_behavior: 'default' | 'none' | null;
|
|
290
|
-
/**
|
|
291
|
-
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
292
|
-
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
293
|
-
*/
|
|
294
|
-
proration_date: 'now' | 'start_of_period' | null;
|
|
295
285
|
/**
|
|
296
286
|
* Price type: one_time for single purchases, recurring for subscriptions
|
|
297
287
|
*/
|
|
@@ -306,13 +296,33 @@ export declare namespace ProductUpdateResponse {
|
|
|
306
296
|
*/
|
|
307
297
|
interface Media {
|
|
308
298
|
/**
|
|
309
|
-
*
|
|
299
|
+
* CDN file ID
|
|
310
300
|
*/
|
|
311
|
-
|
|
301
|
+
id: string;
|
|
302
|
+
/**
|
|
303
|
+
* Display order in gallery (0-indexed)
|
|
304
|
+
*/
|
|
305
|
+
display_order: number;
|
|
306
|
+
/**
|
|
307
|
+
* Type of media: image or video
|
|
308
|
+
*/
|
|
309
|
+
type: 'image' | 'video';
|
|
312
310
|
/**
|
|
313
|
-
* URL of the media resource
|
|
311
|
+
* CDN URL of the media resource
|
|
314
312
|
*/
|
|
315
313
|
url: string;
|
|
314
|
+
/**
|
|
315
|
+
* File size in bytes
|
|
316
|
+
*/
|
|
317
|
+
file_size?: number;
|
|
318
|
+
/**
|
|
319
|
+
* Original filename
|
|
320
|
+
*/
|
|
321
|
+
filename?: string;
|
|
322
|
+
/**
|
|
323
|
+
* Optimized thumbnail URL for images
|
|
324
|
+
*/
|
|
325
|
+
thumbnail_url?: string;
|
|
316
326
|
}
|
|
317
327
|
/**
|
|
318
328
|
* A resource that can be attached to products to grant access to customers.
|
|
@@ -332,25 +342,25 @@ export declare namespace ProductUpdateResponse {
|
|
|
332
342
|
*/
|
|
333
343
|
created: string;
|
|
334
344
|
/**
|
|
335
|
-
* Type of resource
|
|
345
|
+
* Type of resource
|
|
336
346
|
*/
|
|
337
|
-
type: '
|
|
347
|
+
type: 'feature';
|
|
338
348
|
/**
|
|
339
|
-
*
|
|
349
|
+
* Feature grant data. Required when type is 'feature'.
|
|
340
350
|
*/
|
|
341
351
|
custom_entitlement?: Resource.CustomEntitlement | null;
|
|
342
352
|
}
|
|
343
353
|
namespace Resource {
|
|
344
354
|
/**
|
|
345
|
-
*
|
|
355
|
+
* Feature grant data. Required when type is 'feature'.
|
|
346
356
|
*/
|
|
347
357
|
interface CustomEntitlement {
|
|
348
358
|
/**
|
|
349
|
-
*
|
|
359
|
+
* The feature key that identifies what access is granted (e.g., 'pro_features')
|
|
350
360
|
*/
|
|
351
361
|
id: string;
|
|
352
362
|
/**
|
|
353
|
-
* Custom metadata for the
|
|
363
|
+
* Custom metadata for the feature grant
|
|
354
364
|
*/
|
|
355
365
|
metadata?: {
|
|
356
366
|
[key: string]: unknown;
|
|
@@ -380,6 +390,11 @@ export interface ProductListResponse {
|
|
|
380
390
|
* Display name for the product (e.g., Pro, Business, Teams)
|
|
381
391
|
*/
|
|
382
392
|
name: string;
|
|
393
|
+
/**
|
|
394
|
+
* ID of the subscription group this product belongs to. Subscription groups define
|
|
395
|
+
* shared billing configuration. All products must belong to a subscription group.
|
|
396
|
+
*/
|
|
397
|
+
product_group_id: string;
|
|
383
398
|
/**
|
|
384
399
|
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
385
400
|
*/
|
|
@@ -398,11 +413,6 @@ export interface ProductListResponse {
|
|
|
398
413
|
metadata?: {
|
|
399
414
|
[key: string]: unknown;
|
|
400
415
|
};
|
|
401
|
-
/**
|
|
402
|
-
* ID of the product group this product belongs to. Product groups define shared
|
|
403
|
-
* billing configuration.
|
|
404
|
-
*/
|
|
405
|
-
product_group_id?: string | null;
|
|
406
416
|
/**
|
|
407
417
|
* Resources attached to this product. Customers get access to these resources when
|
|
408
418
|
* they purchase the product.
|
|
@@ -422,11 +432,6 @@ export declare namespace ProductListResponse {
|
|
|
422
432
|
* Unique identifier for the topic subscription
|
|
423
433
|
*/
|
|
424
434
|
id: string;
|
|
425
|
-
/**
|
|
426
|
-
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
427
|
-
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
428
|
-
*/
|
|
429
|
-
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
430
435
|
/**
|
|
431
436
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
432
437
|
*/
|
|
@@ -441,16 +446,6 @@ export declare namespace ProductListResponse {
|
|
|
441
446
|
* prices.
|
|
442
447
|
*/
|
|
443
448
|
interval_count: number | null;
|
|
444
|
-
/**
|
|
445
|
-
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
446
|
-
* 'none' disables them. Null for one-time prices.
|
|
447
|
-
*/
|
|
448
|
-
proration_behavior: 'default' | 'none' | null;
|
|
449
|
-
/**
|
|
450
|
-
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
451
|
-
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
452
|
-
*/
|
|
453
|
-
proration_date: 'now' | 'start_of_period' | null;
|
|
454
449
|
/**
|
|
455
450
|
* Price type: one_time for single purchases, recurring for subscriptions
|
|
456
451
|
*/
|
|
@@ -465,13 +460,33 @@ export declare namespace ProductListResponse {
|
|
|
465
460
|
*/
|
|
466
461
|
interface Media {
|
|
467
462
|
/**
|
|
468
|
-
*
|
|
463
|
+
* CDN file ID
|
|
464
|
+
*/
|
|
465
|
+
id: string;
|
|
466
|
+
/**
|
|
467
|
+
* Display order in gallery (0-indexed)
|
|
468
|
+
*/
|
|
469
|
+
display_order: number;
|
|
470
|
+
/**
|
|
471
|
+
* Type of media: image or video
|
|
469
472
|
*/
|
|
470
|
-
type: 'image' | 'video'
|
|
473
|
+
type: 'image' | 'video';
|
|
471
474
|
/**
|
|
472
|
-
* URL of the media resource
|
|
475
|
+
* CDN URL of the media resource
|
|
473
476
|
*/
|
|
474
477
|
url: string;
|
|
478
|
+
/**
|
|
479
|
+
* File size in bytes
|
|
480
|
+
*/
|
|
481
|
+
file_size?: number;
|
|
482
|
+
/**
|
|
483
|
+
* Original filename
|
|
484
|
+
*/
|
|
485
|
+
filename?: string;
|
|
486
|
+
/**
|
|
487
|
+
* Optimized thumbnail URL for images
|
|
488
|
+
*/
|
|
489
|
+
thumbnail_url?: string;
|
|
475
490
|
}
|
|
476
491
|
/**
|
|
477
492
|
* A resource that can be attached to products to grant access to customers.
|
|
@@ -491,25 +506,25 @@ export declare namespace ProductListResponse {
|
|
|
491
506
|
*/
|
|
492
507
|
created: string;
|
|
493
508
|
/**
|
|
494
|
-
* Type of resource
|
|
509
|
+
* Type of resource
|
|
495
510
|
*/
|
|
496
|
-
type: '
|
|
511
|
+
type: 'feature';
|
|
497
512
|
/**
|
|
498
|
-
*
|
|
513
|
+
* Feature grant data. Required when type is 'feature'.
|
|
499
514
|
*/
|
|
500
515
|
custom_entitlement?: Resource.CustomEntitlement | null;
|
|
501
516
|
}
|
|
502
517
|
namespace Resource {
|
|
503
518
|
/**
|
|
504
|
-
*
|
|
519
|
+
* Feature grant data. Required when type is 'feature'.
|
|
505
520
|
*/
|
|
506
521
|
interface CustomEntitlement {
|
|
507
522
|
/**
|
|
508
|
-
*
|
|
523
|
+
* The feature key that identifies what access is granted (e.g., 'pro_features')
|
|
509
524
|
*/
|
|
510
525
|
id: string;
|
|
511
526
|
/**
|
|
512
|
-
* Custom metadata for the
|
|
527
|
+
* Custom metadata for the feature grant
|
|
513
528
|
*/
|
|
514
529
|
metadata?: {
|
|
515
530
|
[key: string]: unknown;
|
|
@@ -539,6 +554,11 @@ export interface ProductArchiveResponse {
|
|
|
539
554
|
* Display name for the product (e.g., Pro, Business, Teams)
|
|
540
555
|
*/
|
|
541
556
|
name: string;
|
|
557
|
+
/**
|
|
558
|
+
* ID of the subscription group this product belongs to. Subscription groups define
|
|
559
|
+
* shared billing configuration. All products must belong to a subscription group.
|
|
560
|
+
*/
|
|
561
|
+
product_group_id: string;
|
|
542
562
|
/**
|
|
543
563
|
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
544
564
|
*/
|
|
@@ -557,11 +577,6 @@ export interface ProductArchiveResponse {
|
|
|
557
577
|
metadata?: {
|
|
558
578
|
[key: string]: unknown;
|
|
559
579
|
};
|
|
560
|
-
/**
|
|
561
|
-
* ID of the product group this product belongs to. Product groups define shared
|
|
562
|
-
* billing configuration.
|
|
563
|
-
*/
|
|
564
|
-
product_group_id?: string | null;
|
|
565
580
|
/**
|
|
566
581
|
* Resources attached to this product. Customers get access to these resources when
|
|
567
582
|
* they purchase the product.
|
|
@@ -581,11 +596,6 @@ export declare namespace ProductArchiveResponse {
|
|
|
581
596
|
* Unique identifier for the topic subscription
|
|
582
597
|
*/
|
|
583
598
|
id: string;
|
|
584
|
-
/**
|
|
585
|
-
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
586
|
-
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
587
|
-
*/
|
|
588
|
-
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
589
599
|
/**
|
|
590
600
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
591
601
|
*/
|
|
@@ -600,16 +610,6 @@ export declare namespace ProductArchiveResponse {
|
|
|
600
610
|
* prices.
|
|
601
611
|
*/
|
|
602
612
|
interval_count: number | null;
|
|
603
|
-
/**
|
|
604
|
-
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
605
|
-
* 'none' disables them. Null for one-time prices.
|
|
606
|
-
*/
|
|
607
|
-
proration_behavior: 'default' | 'none' | null;
|
|
608
|
-
/**
|
|
609
|
-
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
610
|
-
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
611
|
-
*/
|
|
612
|
-
proration_date: 'now' | 'start_of_period' | null;
|
|
613
613
|
/**
|
|
614
614
|
* Price type: one_time for single purchases, recurring for subscriptions
|
|
615
615
|
*/
|
|
@@ -624,13 +624,33 @@ export declare namespace ProductArchiveResponse {
|
|
|
624
624
|
*/
|
|
625
625
|
interface Media {
|
|
626
626
|
/**
|
|
627
|
-
*
|
|
627
|
+
* CDN file ID
|
|
628
|
+
*/
|
|
629
|
+
id: string;
|
|
630
|
+
/**
|
|
631
|
+
* Display order in gallery (0-indexed)
|
|
628
632
|
*/
|
|
629
|
-
|
|
633
|
+
display_order: number;
|
|
630
634
|
/**
|
|
631
|
-
*
|
|
635
|
+
* Type of media: image or video
|
|
636
|
+
*/
|
|
637
|
+
type: 'image' | 'video';
|
|
638
|
+
/**
|
|
639
|
+
* CDN URL of the media resource
|
|
632
640
|
*/
|
|
633
641
|
url: string;
|
|
642
|
+
/**
|
|
643
|
+
* File size in bytes
|
|
644
|
+
*/
|
|
645
|
+
file_size?: number;
|
|
646
|
+
/**
|
|
647
|
+
* Original filename
|
|
648
|
+
*/
|
|
649
|
+
filename?: string;
|
|
650
|
+
/**
|
|
651
|
+
* Optimized thumbnail URL for images
|
|
652
|
+
*/
|
|
653
|
+
thumbnail_url?: string;
|
|
634
654
|
}
|
|
635
655
|
/**
|
|
636
656
|
* A resource that can be attached to products to grant access to customers.
|
|
@@ -650,25 +670,25 @@ export declare namespace ProductArchiveResponse {
|
|
|
650
670
|
*/
|
|
651
671
|
created: string;
|
|
652
672
|
/**
|
|
653
|
-
* Type of resource
|
|
673
|
+
* Type of resource
|
|
654
674
|
*/
|
|
655
|
-
type: '
|
|
675
|
+
type: 'feature';
|
|
656
676
|
/**
|
|
657
|
-
*
|
|
677
|
+
* Feature grant data. Required when type is 'feature'.
|
|
658
678
|
*/
|
|
659
679
|
custom_entitlement?: Resource.CustomEntitlement | null;
|
|
660
680
|
}
|
|
661
681
|
namespace Resource {
|
|
662
682
|
/**
|
|
663
|
-
*
|
|
683
|
+
* Feature grant data. Required when type is 'feature'.
|
|
664
684
|
*/
|
|
665
685
|
interface CustomEntitlement {
|
|
666
686
|
/**
|
|
667
|
-
*
|
|
687
|
+
* The feature key that identifies what access is granted (e.g., 'pro_features')
|
|
668
688
|
*/
|
|
669
689
|
id: string;
|
|
670
690
|
/**
|
|
671
|
-
* Custom metadata for the
|
|
691
|
+
* Custom metadata for the feature grant
|
|
672
692
|
*/
|
|
673
693
|
metadata?: {
|
|
674
694
|
[key: string]: unknown;
|
|
@@ -698,6 +718,11 @@ export interface ProductGetResponse {
|
|
|
698
718
|
* Display name for the product (e.g., Pro, Business, Teams)
|
|
699
719
|
*/
|
|
700
720
|
name: string;
|
|
721
|
+
/**
|
|
722
|
+
* ID of the subscription group this product belongs to. Subscription groups define
|
|
723
|
+
* shared billing configuration. All products must belong to a subscription group.
|
|
724
|
+
*/
|
|
725
|
+
product_group_id: string;
|
|
701
726
|
/**
|
|
702
727
|
* Price configuration for a product. Can be one-time or recurring (subscription).
|
|
703
728
|
*/
|
|
@@ -716,11 +741,6 @@ export interface ProductGetResponse {
|
|
|
716
741
|
metadata?: {
|
|
717
742
|
[key: string]: unknown;
|
|
718
743
|
};
|
|
719
|
-
/**
|
|
720
|
-
* ID of the product group this product belongs to. Product groups define shared
|
|
721
|
-
* billing configuration.
|
|
722
|
-
*/
|
|
723
|
-
product_group_id?: string | null;
|
|
724
744
|
/**
|
|
725
745
|
* Resources attached to this product. Customers get access to these resources when
|
|
726
746
|
* they purchase the product.
|
|
@@ -740,11 +760,6 @@ export declare namespace ProductGetResponse {
|
|
|
740
760
|
* Unique identifier for the topic subscription
|
|
741
761
|
*/
|
|
742
762
|
id: string;
|
|
743
|
-
/**
|
|
744
|
-
* How to handle the billing cycle when switching plans. 'now' resets to current
|
|
745
|
-
* time, 'unchanged' keeps the original anchor. Null for one-time prices.
|
|
746
|
-
*/
|
|
747
|
-
billing_cycle_anchor: 'now' | 'unchanged' | null;
|
|
748
763
|
/**
|
|
749
764
|
* Three-letter ISO currency code (e.g., usd, eur)
|
|
750
765
|
*/
|
|
@@ -759,16 +774,6 @@ export declare namespace ProductGetResponse {
|
|
|
759
774
|
* prices.
|
|
760
775
|
*/
|
|
761
776
|
interval_count: number | null;
|
|
762
|
-
/**
|
|
763
|
-
* How to handle prorations when switching plans. 'default' creates prorations,
|
|
764
|
-
* 'none' disables them. Null for one-time prices.
|
|
765
|
-
*/
|
|
766
|
-
proration_behavior: 'default' | 'none' | null;
|
|
767
|
-
/**
|
|
768
|
-
* When to calculate proration. 'now' uses current time, 'start_of_period' uses the
|
|
769
|
-
* billing period start. Null for one-time prices or to use Stripe's default.
|
|
770
|
-
*/
|
|
771
|
-
proration_date: 'now' | 'start_of_period' | null;
|
|
772
777
|
/**
|
|
773
778
|
* Price type: one_time for single purchases, recurring for subscriptions
|
|
774
779
|
*/
|
|
@@ -783,13 +788,33 @@ export declare namespace ProductGetResponse {
|
|
|
783
788
|
*/
|
|
784
789
|
interface Media {
|
|
785
790
|
/**
|
|
786
|
-
*
|
|
791
|
+
* CDN file ID
|
|
792
|
+
*/
|
|
793
|
+
id: string;
|
|
794
|
+
/**
|
|
795
|
+
* Display order in gallery (0-indexed)
|
|
787
796
|
*/
|
|
788
|
-
|
|
797
|
+
display_order: number;
|
|
789
798
|
/**
|
|
790
|
-
*
|
|
799
|
+
* Type of media: image or video
|
|
800
|
+
*/
|
|
801
|
+
type: 'image' | 'video';
|
|
802
|
+
/**
|
|
803
|
+
* CDN URL of the media resource
|
|
791
804
|
*/
|
|
792
805
|
url: string;
|
|
806
|
+
/**
|
|
807
|
+
* File size in bytes
|
|
808
|
+
*/
|
|
809
|
+
file_size?: number;
|
|
810
|
+
/**
|
|
811
|
+
* Original filename
|
|
812
|
+
*/
|
|
813
|
+
filename?: string;
|
|
814
|
+
/**
|
|
815
|
+
* Optimized thumbnail URL for images
|
|
816
|
+
*/
|
|
817
|
+
thumbnail_url?: string;
|
|
793
818
|
}
|
|
794
819
|
/**
|
|
795
820
|
* A resource that can be attached to products to grant access to customers.
|
|
@@ -809,25 +834,25 @@ export declare namespace ProductGetResponse {
|
|
|
809
834
|
*/
|
|
810
835
|
created: string;
|
|
811
836
|
/**
|
|
812
|
-
* Type of resource
|
|
837
|
+
* Type of resource
|
|
813
838
|
*/
|
|
814
|
-
type: '
|
|
839
|
+
type: 'feature';
|
|
815
840
|
/**
|
|
816
|
-
*
|
|
841
|
+
* Feature grant data. Required when type is 'feature'.
|
|
817
842
|
*/
|
|
818
843
|
custom_entitlement?: Resource.CustomEntitlement | null;
|
|
819
844
|
}
|
|
820
845
|
namespace Resource {
|
|
821
846
|
/**
|
|
822
|
-
*
|
|
847
|
+
* Feature grant data. Required when type is 'feature'.
|
|
823
848
|
*/
|
|
824
849
|
interface CustomEntitlement {
|
|
825
850
|
/**
|
|
826
|
-
*
|
|
851
|
+
* The feature key that identifies what access is granted (e.g., 'pro_features')
|
|
827
852
|
*/
|
|
828
853
|
id: string;
|
|
829
854
|
/**
|
|
830
|
-
* Custom metadata for the
|
|
855
|
+
* Custom metadata for the feature grant
|
|
831
856
|
*/
|
|
832
857
|
metadata?: {
|
|
833
858
|
[key: string]: unknown;
|
|
@@ -841,34 +866,21 @@ export interface ProductCreateParams {
|
|
|
841
866
|
*/
|
|
842
867
|
name: string;
|
|
843
868
|
/**
|
|
844
|
-
*
|
|
845
|
-
*
|
|
869
|
+
* Variants to create with the product. Each variant has its own pricing. At least
|
|
870
|
+
* one variant is required.
|
|
846
871
|
*/
|
|
847
|
-
|
|
872
|
+
variants: Array<ProductCreateParams.Variant>;
|
|
848
873
|
/**
|
|
849
|
-
* Optional custom ID for the product. If not provided,
|
|
874
|
+
* Optional custom ID for the product. Must start with 'prod\_'. If not provided,
|
|
875
|
+
* one will be generated.
|
|
850
876
|
*/
|
|
851
877
|
id?: string;
|
|
852
|
-
/**
|
|
853
|
-
* Three-letter ISO currency code
|
|
854
|
-
*/
|
|
855
|
-
currency?: string;
|
|
856
878
|
/**
|
|
857
879
|
* Detailed description of what the product includes
|
|
858
880
|
*/
|
|
859
881
|
description?: string;
|
|
860
882
|
/**
|
|
861
|
-
*
|
|
862
|
-
* recurring type, ignored for one_time.
|
|
863
|
-
*/
|
|
864
|
-
interval?: 'day' | 'week' | 'month' | 'year';
|
|
865
|
-
/**
|
|
866
|
-
* Number of intervals between billings for recurring prices. Required for
|
|
867
|
-
* recurring type, ignored for one_time.
|
|
868
|
-
*/
|
|
869
|
-
interval_count?: number;
|
|
870
|
-
/**
|
|
871
|
-
* Media attachments (images, videos) for the product
|
|
883
|
+
* Media attachments by CDN file ID
|
|
872
884
|
*/
|
|
873
885
|
media?: Array<ProductCreateParams.Media>;
|
|
874
886
|
/**
|
|
@@ -878,32 +890,107 @@ export interface ProductCreateParams {
|
|
|
878
890
|
[key: string]: unknown;
|
|
879
891
|
};
|
|
880
892
|
/**
|
|
881
|
-
* ID of the
|
|
882
|
-
* billing configuration.
|
|
893
|
+
* ID of the subscription group this product belongs to. Subscription groups define
|
|
894
|
+
* shared billing configuration.
|
|
883
895
|
*/
|
|
884
896
|
product_group_id?: string;
|
|
885
897
|
/**
|
|
886
898
|
* Tags for categorizing and filtering products
|
|
887
899
|
*/
|
|
888
900
|
tags?: Array<string>;
|
|
889
|
-
/**
|
|
890
|
-
* Price type: one_time for single purchases, recurring for subscriptions
|
|
891
|
-
*/
|
|
892
|
-
type?: 'one_time' | 'recurring';
|
|
893
901
|
}
|
|
894
902
|
export declare namespace ProductCreateParams {
|
|
895
903
|
/**
|
|
896
|
-
*
|
|
904
|
+
* Variant configuration for inline creation with a product
|
|
905
|
+
*/
|
|
906
|
+
interface Variant {
|
|
907
|
+
/**
|
|
908
|
+
* Display name for the variant
|
|
909
|
+
*/
|
|
910
|
+
name: string;
|
|
911
|
+
/**
|
|
912
|
+
* Optional custom ID for the variant. Must start with 'var\_'.
|
|
913
|
+
*/
|
|
914
|
+
id?: string;
|
|
915
|
+
/**
|
|
916
|
+
* Three-letter ISO currency code
|
|
917
|
+
*/
|
|
918
|
+
currency?: string;
|
|
919
|
+
/**
|
|
920
|
+
* Detailed description of what this variant includes
|
|
921
|
+
*/
|
|
922
|
+
description?: string;
|
|
923
|
+
/**
|
|
924
|
+
* Mark as the default variant for checkout. Only one variant can be default.
|
|
925
|
+
*/
|
|
926
|
+
is_default?: boolean;
|
|
927
|
+
/**
|
|
928
|
+
* Media attachments by CDN file ID
|
|
929
|
+
*/
|
|
930
|
+
media?: Array<Variant.Media>;
|
|
931
|
+
/**
|
|
932
|
+
* Custom metadata for the variant
|
|
933
|
+
*/
|
|
934
|
+
metadata?: {
|
|
935
|
+
[key: string]: unknown;
|
|
936
|
+
};
|
|
937
|
+
/**
|
|
938
|
+
* Recurring billing configuration for subscription variants
|
|
939
|
+
*/
|
|
940
|
+
recurring?: Variant.Recurring;
|
|
941
|
+
/**
|
|
942
|
+
* Price amount in smallest currency unit (e.g., cents)
|
|
943
|
+
*/
|
|
944
|
+
unit_amount?: number;
|
|
945
|
+
}
|
|
946
|
+
namespace Variant {
|
|
947
|
+
/**
|
|
948
|
+
* Media input for attaching to products or variants
|
|
949
|
+
*/
|
|
950
|
+
interface Media {
|
|
951
|
+
/**
|
|
952
|
+
* CDN file ID from upload
|
|
953
|
+
*/
|
|
954
|
+
cdn_file_id: string;
|
|
955
|
+
/**
|
|
956
|
+
* Type of media: image or video
|
|
957
|
+
*/
|
|
958
|
+
type: 'image' | 'video';
|
|
959
|
+
/**
|
|
960
|
+
* Display order in gallery (0-indexed)
|
|
961
|
+
*/
|
|
962
|
+
display_order?: number;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Recurring billing configuration for subscription variants
|
|
966
|
+
*/
|
|
967
|
+
interface Recurring {
|
|
968
|
+
/**
|
|
969
|
+
* Billing frequency: day, week, month, or year
|
|
970
|
+
*/
|
|
971
|
+
interval: 'day' | 'week' | 'month' | 'year';
|
|
972
|
+
/**
|
|
973
|
+
* Number of intervals between billings
|
|
974
|
+
*/
|
|
975
|
+
interval_count?: number;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Media input for attaching to products or variants
|
|
897
980
|
*/
|
|
898
981
|
interface Media {
|
|
899
982
|
/**
|
|
900
|
-
*
|
|
983
|
+
* CDN file ID from upload
|
|
901
984
|
*/
|
|
902
|
-
|
|
985
|
+
cdn_file_id: string;
|
|
903
986
|
/**
|
|
904
|
-
*
|
|
987
|
+
* Type of media: image or video
|
|
905
988
|
*/
|
|
906
|
-
|
|
989
|
+
type: 'image' | 'video';
|
|
990
|
+
/**
|
|
991
|
+
* Display order in gallery (0-indexed)
|
|
992
|
+
*/
|
|
993
|
+
display_order?: number;
|
|
907
994
|
}
|
|
908
995
|
}
|
|
909
996
|
export interface ProductUpdateParams {
|
|
@@ -916,7 +1003,7 @@ export interface ProductUpdateParams {
|
|
|
916
1003
|
*/
|
|
917
1004
|
description?: string;
|
|
918
1005
|
/**
|
|
919
|
-
*
|
|
1006
|
+
* Replace all media attachments. Pass empty array to remove all media.
|
|
920
1007
|
*/
|
|
921
1008
|
media?: Array<ProductUpdateParams.Media>;
|
|
922
1009
|
/**
|
|
@@ -930,9 +1017,10 @@ export interface ProductUpdateParams {
|
|
|
930
1017
|
*/
|
|
931
1018
|
name?: string;
|
|
932
1019
|
/**
|
|
933
|
-
* ID of the
|
|
1020
|
+
* ID of the subscription group to move this product to. All products must belong
|
|
1021
|
+
* to a subscription group.
|
|
934
1022
|
*/
|
|
935
|
-
product_group_id?: string
|
|
1023
|
+
product_group_id?: string;
|
|
936
1024
|
/**
|
|
937
1025
|
* Tags for categorizing and filtering products
|
|
938
1026
|
*/
|
|
@@ -940,17 +1028,21 @@ export interface ProductUpdateParams {
|
|
|
940
1028
|
}
|
|
941
1029
|
export declare namespace ProductUpdateParams {
|
|
942
1030
|
/**
|
|
943
|
-
* Media
|
|
1031
|
+
* Media input for attaching to products or variants
|
|
944
1032
|
*/
|
|
945
1033
|
interface Media {
|
|
946
1034
|
/**
|
|
947
|
-
*
|
|
1035
|
+
* CDN file ID from upload
|
|
948
1036
|
*/
|
|
949
|
-
|
|
1037
|
+
cdn_file_id: string;
|
|
950
1038
|
/**
|
|
951
|
-
*
|
|
1039
|
+
* Type of media: image or video
|
|
952
1040
|
*/
|
|
953
|
-
|
|
1041
|
+
type: 'image' | 'video';
|
|
1042
|
+
/**
|
|
1043
|
+
* Display order in gallery (0-indexed)
|
|
1044
|
+
*/
|
|
1045
|
+
display_order?: number;
|
|
954
1046
|
}
|
|
955
1047
|
}
|
|
956
1048
|
export interface ProductListParams extends CursorIDPageParams {
|