dodopayments 2.24.0 → 2.25.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 +9 -0
- package/bin/migration-config.json +15 -169
- package/client.d.mts +2 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -8
- package/client.d.ts.map +1 -1
- package/client.js +0 -6
- package/client.js.map +1 -1
- package/client.mjs +0 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/customers/customers.d.mts +8 -1
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +8 -1
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +8 -0
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +8 -0
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/disputes.d.mts +12 -0
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +12 -0
- package/resources/disputes.d.ts.map +1 -1
- package/resources/index.d.mts +1 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices/payments.d.mts +0 -1
- package/resources/invoices/payments.d.mts.map +1 -1
- package/resources/invoices/payments.d.ts +0 -1
- package/resources/invoices/payments.d.ts.map +1 -1
- package/resources/invoices/payments.js +0 -7
- package/resources/invoices/payments.js.map +1 -1
- package/resources/invoices/payments.mjs +0 -7
- package/resources/invoices/payments.mjs.map +1 -1
- package/src/client.ts +2 -34
- package/src/resources/customers/customers.ts +21 -0
- package/src/resources/customers/index.ts +1 -0
- package/src/resources/disputes.ts +15 -0
- package/src/resources/index.ts +1 -14
- package/src/resources/invoices/payments.ts +0 -8
- 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
- package/resources/product-collections/groups/groups.d.mts +0 -107
- package/resources/product-collections/groups/groups.d.mts.map +0 -1
- package/resources/product-collections/groups/groups.d.ts +0 -107
- package/resources/product-collections/groups/groups.d.ts.map +0 -1
- package/resources/product-collections/groups/groups.js +0 -37
- package/resources/product-collections/groups/groups.js.map +0 -1
- package/resources/product-collections/groups/groups.mjs +0 -32
- package/resources/product-collections/groups/groups.mjs.map +0 -1
- package/resources/product-collections/groups/index.d.mts +0 -3
- package/resources/product-collections/groups/index.d.mts.map +0 -1
- package/resources/product-collections/groups/index.d.ts +0 -3
- package/resources/product-collections/groups/index.d.ts.map +0 -1
- package/resources/product-collections/groups/index.js +0 -9
- package/resources/product-collections/groups/index.js.map +0 -1
- package/resources/product-collections/groups/index.mjs +0 -4
- package/resources/product-collections/groups/index.mjs.map +0 -1
- package/resources/product-collections/groups/items.d.mts +0 -91
- package/resources/product-collections/groups/items.d.mts.map +0 -1
- package/resources/product-collections/groups/items.d.ts +0 -91
- package/resources/product-collections/groups/items.d.ts.map +0 -1
- package/resources/product-collections/groups/items.js +0 -30
- package/resources/product-collections/groups/items.js.map +0 -1
- package/resources/product-collections/groups/items.mjs +0 -26
- package/resources/product-collections/groups/items.mjs.map +0 -1
- package/resources/product-collections/groups.d.mts +0 -2
- package/resources/product-collections/groups.d.mts.map +0 -1
- package/resources/product-collections/groups.d.ts +0 -2
- package/resources/product-collections/groups.d.ts.map +0 -1
- package/resources/product-collections/groups.js +0 -6
- package/resources/product-collections/groups.js.map +0 -1
- package/resources/product-collections/groups.mjs +0 -3
- package/resources/product-collections/groups.mjs.map +0 -1
- package/resources/product-collections/index.d.mts +0 -3
- package/resources/product-collections/index.d.mts.map +0 -1
- package/resources/product-collections/index.d.ts +0 -3
- package/resources/product-collections/index.d.ts.map +0 -1
- package/resources/product-collections/index.js +0 -9
- package/resources/product-collections/index.js.map +0 -1
- package/resources/product-collections/index.mjs +0 -4
- package/resources/product-collections/index.mjs.map +0 -1
- package/resources/product-collections/product-collections.d.mts +0 -307
- package/resources/product-collections/product-collections.d.mts.map +0 -1
- package/resources/product-collections/product-collections.d.ts +0 -307
- package/resources/product-collections/product-collections.d.ts.map +0 -1
- package/resources/product-collections/product-collections.js +0 -49
- package/resources/product-collections/product-collections.js.map +0 -1
- package/resources/product-collections/product-collections.mjs +0 -44
- package/resources/product-collections/product-collections.mjs.map +0 -1
- package/resources/product-collections.d.mts +0 -2
- package/resources/product-collections.d.mts.map +0 -1
- package/resources/product-collections.d.ts +0 -2
- package/resources/product-collections.d.ts.map +0 -1
- package/resources/product-collections.js +0 -6
- package/resources/product-collections.js.map +0 -1
- package/resources/product-collections.mjs +0 -3
- package/resources/product-collections.mjs.map +0 -1
- package/resources/your-webhook-url.d.mts +0 -85
- package/resources/your-webhook-url.d.mts.map +0 -1
- package/resources/your-webhook-url.d.ts +0 -85
- package/resources/your-webhook-url.d.ts.map +0 -1
- package/resources/your-webhook-url.js +0 -26
- package/resources/your-webhook-url.js.map +0 -1
- package/resources/your-webhook-url.mjs +0 -22
- package/resources/your-webhook-url.mjs.map +0 -1
- package/src/resources/product-collections/groups/groups.ts +0 -174
- package/src/resources/product-collections/groups/index.ts +0 -16
- package/src/resources/product-collections/groups/items.ts +0 -149
- package/src/resources/product-collections/groups.ts +0 -3
- package/src/resources/product-collections/index.ts +0 -22
- package/src/resources/product-collections/product-collections.ts +0 -472
- package/src/resources/product-collections.ts +0 -3
- package/src/resources/your-webhook-url.ts +0 -138
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Groups,
|
|
5
|
-
type GroupCreateResponse,
|
|
6
|
-
type GroupCreateParams,
|
|
7
|
-
type GroupUpdateParams,
|
|
8
|
-
type GroupDeleteParams,
|
|
9
|
-
} from './groups/index';
|
|
10
|
-
export {
|
|
11
|
-
ProductCollections,
|
|
12
|
-
type ProductCollectionCreateResponse,
|
|
13
|
-
type ProductCollectionRetrieveResponse,
|
|
14
|
-
type ProductCollectionListResponse,
|
|
15
|
-
type ProductCollectionUnarchiveResponse,
|
|
16
|
-
type ProductCollectionUpdateImagesResponse,
|
|
17
|
-
type ProductCollectionCreateParams,
|
|
18
|
-
type ProductCollectionUpdateParams,
|
|
19
|
-
type ProductCollectionListParams,
|
|
20
|
-
type ProductCollectionUpdateImagesParams,
|
|
21
|
-
type ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
22
|
-
} from './product-collections';
|
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as MiscAPI from '../misc';
|
|
5
|
-
import * as ProductsAPI from '../products/products';
|
|
6
|
-
import * as GroupsAPI from './groups/groups';
|
|
7
|
-
import {
|
|
8
|
-
GroupCreateParams,
|
|
9
|
-
GroupCreateResponse,
|
|
10
|
-
GroupDeleteParams,
|
|
11
|
-
GroupUpdateParams,
|
|
12
|
-
Groups,
|
|
13
|
-
} from './groups/groups';
|
|
14
|
-
import { APIPromise } from '../../core/api-promise';
|
|
15
|
-
import {
|
|
16
|
-
DefaultPageNumberPagination,
|
|
17
|
-
type DefaultPageNumberPaginationParams,
|
|
18
|
-
PagePromise,
|
|
19
|
-
} from '../../core/pagination';
|
|
20
|
-
import { buildHeaders } from '../../internal/headers';
|
|
21
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
22
|
-
import { path } from '../../internal/utils/path';
|
|
23
|
-
|
|
24
|
-
export class ProductCollections extends APIResource {
|
|
25
|
-
groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client);
|
|
26
|
-
|
|
27
|
-
create(
|
|
28
|
-
body: ProductCollectionCreateParams,
|
|
29
|
-
options?: RequestOptions,
|
|
30
|
-
): APIPromise<ProductCollectionCreateResponse> {
|
|
31
|
-
return this._client.post('/product-collections', { body, ...options });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<ProductCollectionRetrieveResponse> {
|
|
35
|
-
return this._client.get(path`/product-collections/${id}`, options);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
update(id: string, body: ProductCollectionUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
39
|
-
return this._client.patch(path`/product-collections/${id}`, {
|
|
40
|
-
body,
|
|
41
|
-
...options,
|
|
42
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
list(
|
|
47
|
-
query: ProductCollectionListParams | null | undefined = {},
|
|
48
|
-
options?: RequestOptions,
|
|
49
|
-
): PagePromise<ProductCollectionListResponsesDefaultPageNumberPagination, ProductCollectionListResponse> {
|
|
50
|
-
return this._client.getAPIList(
|
|
51
|
-
'/product-collections',
|
|
52
|
-
DefaultPageNumberPagination<ProductCollectionListResponse>,
|
|
53
|
-
{ query, ...options },
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
58
|
-
return this._client.delete(path`/product-collections/${id}`, {
|
|
59
|
-
...options,
|
|
60
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
unarchive(id: string, options?: RequestOptions): APIPromise<ProductCollectionUnarchiveResponse> {
|
|
65
|
-
return this._client.post(path`/product-collections/${id}/unarchive`, options);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
updateImages(
|
|
69
|
-
id: string,
|
|
70
|
-
params: ProductCollectionUpdateImagesParams | null | undefined = {},
|
|
71
|
-
options?: RequestOptions,
|
|
72
|
-
): APIPromise<ProductCollectionUpdateImagesResponse> {
|
|
73
|
-
const { force_update } = params ?? {};
|
|
74
|
-
return this._client.put(path`/product-collections/${id}/images`, { query: { force_update }, ...options });
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export type ProductCollectionListResponsesDefaultPageNumberPagination =
|
|
79
|
-
DefaultPageNumberPagination<ProductCollectionListResponse>;
|
|
80
|
-
|
|
81
|
-
export interface ProductCollectionCreateResponse {
|
|
82
|
-
/**
|
|
83
|
-
* Unique identifier for the product collection
|
|
84
|
-
*/
|
|
85
|
-
id: string;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Brand ID for the collection
|
|
89
|
-
*/
|
|
90
|
-
brand_id: string;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Timestamp when the collection was created
|
|
94
|
-
*/
|
|
95
|
-
created_at: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Groups in this collection
|
|
99
|
-
*/
|
|
100
|
-
groups: Array<ProductCollectionCreateResponse.Group>;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Name of the collection
|
|
104
|
-
*/
|
|
105
|
-
name: string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Timestamp when the collection was last updated
|
|
109
|
-
*/
|
|
110
|
-
updated_at: string;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Description of the collection
|
|
114
|
-
*/
|
|
115
|
-
description?: string | null;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* URL of the collection image
|
|
119
|
-
*/
|
|
120
|
-
image?: string | null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export namespace ProductCollectionCreateResponse {
|
|
124
|
-
export interface Group {
|
|
125
|
-
group_id: string;
|
|
126
|
-
|
|
127
|
-
products: Array<Group.Product>;
|
|
128
|
-
|
|
129
|
-
status: boolean;
|
|
130
|
-
|
|
131
|
-
group_name?: string | null;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export namespace Group {
|
|
135
|
-
export interface Product {
|
|
136
|
-
id: string;
|
|
137
|
-
|
|
138
|
-
addons_count: number;
|
|
139
|
-
|
|
140
|
-
files_count: number;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Whether this product has any credit entitlements attached
|
|
144
|
-
*/
|
|
145
|
-
has_credit_entitlements: boolean;
|
|
146
|
-
|
|
147
|
-
is_recurring: boolean;
|
|
148
|
-
|
|
149
|
-
license_key_enabled: boolean;
|
|
150
|
-
|
|
151
|
-
meters_count: number;
|
|
152
|
-
|
|
153
|
-
product_id: string;
|
|
154
|
-
|
|
155
|
-
status: boolean;
|
|
156
|
-
|
|
157
|
-
currency?: MiscAPI.Currency | null;
|
|
158
|
-
|
|
159
|
-
description?: string | null;
|
|
160
|
-
|
|
161
|
-
name?: string | null;
|
|
162
|
-
|
|
163
|
-
price?: number | null;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* One-time price details.
|
|
167
|
-
*/
|
|
168
|
-
price_detail?: ProductsAPI.Price | null;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Represents the different categories of taxation applicable to various products
|
|
172
|
-
* and services.
|
|
173
|
-
*/
|
|
174
|
-
tax_category?: MiscAPI.TaxCategory | null;
|
|
175
|
-
|
|
176
|
-
tax_inclusive?: boolean | null;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export interface ProductCollectionRetrieveResponse {
|
|
182
|
-
/**
|
|
183
|
-
* Unique identifier for the product collection
|
|
184
|
-
*/
|
|
185
|
-
id: string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Brand ID for the collection
|
|
189
|
-
*/
|
|
190
|
-
brand_id: string;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Timestamp when the collection was created
|
|
194
|
-
*/
|
|
195
|
-
created_at: string;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Groups in this collection
|
|
199
|
-
*/
|
|
200
|
-
groups: Array<ProductCollectionRetrieveResponse.Group>;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Name of the collection
|
|
204
|
-
*/
|
|
205
|
-
name: string;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Timestamp when the collection was last updated
|
|
209
|
-
*/
|
|
210
|
-
updated_at: string;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Description of the collection
|
|
214
|
-
*/
|
|
215
|
-
description?: string | null;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* URL of the collection image
|
|
219
|
-
*/
|
|
220
|
-
image?: string | null;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export namespace ProductCollectionRetrieveResponse {
|
|
224
|
-
export interface Group {
|
|
225
|
-
group_id: string;
|
|
226
|
-
|
|
227
|
-
products: Array<Group.Product>;
|
|
228
|
-
|
|
229
|
-
status: boolean;
|
|
230
|
-
|
|
231
|
-
group_name?: string | null;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export namespace Group {
|
|
235
|
-
export interface Product {
|
|
236
|
-
id: string;
|
|
237
|
-
|
|
238
|
-
addons_count: number;
|
|
239
|
-
|
|
240
|
-
files_count: number;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Whether this product has any credit entitlements attached
|
|
244
|
-
*/
|
|
245
|
-
has_credit_entitlements: boolean;
|
|
246
|
-
|
|
247
|
-
is_recurring: boolean;
|
|
248
|
-
|
|
249
|
-
license_key_enabled: boolean;
|
|
250
|
-
|
|
251
|
-
meters_count: number;
|
|
252
|
-
|
|
253
|
-
product_id: string;
|
|
254
|
-
|
|
255
|
-
status: boolean;
|
|
256
|
-
|
|
257
|
-
currency?: MiscAPI.Currency | null;
|
|
258
|
-
|
|
259
|
-
description?: string | null;
|
|
260
|
-
|
|
261
|
-
name?: string | null;
|
|
262
|
-
|
|
263
|
-
price?: number | null;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* One-time price details.
|
|
267
|
-
*/
|
|
268
|
-
price_detail?: ProductsAPI.Price | null;
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Represents the different categories of taxation applicable to various products
|
|
272
|
-
* and services.
|
|
273
|
-
*/
|
|
274
|
-
tax_category?: MiscAPI.TaxCategory | null;
|
|
275
|
-
|
|
276
|
-
tax_inclusive?: boolean | null;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export interface ProductCollectionListResponse {
|
|
282
|
-
/**
|
|
283
|
-
* Collection ID
|
|
284
|
-
*/
|
|
285
|
-
id: string;
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Timestamp when created
|
|
289
|
-
*/
|
|
290
|
-
created_at: string;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Collection name
|
|
294
|
-
*/
|
|
295
|
-
name: string;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Number of products in the collection
|
|
299
|
-
*/
|
|
300
|
-
products_count: number;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Timestamp when last updated
|
|
304
|
-
*/
|
|
305
|
-
updated_at: string;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Collection description
|
|
309
|
-
*/
|
|
310
|
-
description?: string | null;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Collection image URL
|
|
314
|
-
*/
|
|
315
|
-
image?: string | null;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export interface ProductCollectionUnarchiveResponse {
|
|
319
|
-
/**
|
|
320
|
-
* Collection ID that was unarchived
|
|
321
|
-
*/
|
|
322
|
-
collection_id: string;
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Product IDs that were excluded because they are archived
|
|
326
|
-
*/
|
|
327
|
-
excluded_product_ids: Array<string>;
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Success message
|
|
331
|
-
*/
|
|
332
|
-
message: string;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export interface ProductCollectionUpdateImagesResponse {
|
|
336
|
-
/**
|
|
337
|
-
* Presigned S3 URL for uploading the image
|
|
338
|
-
*/
|
|
339
|
-
url: string;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Optional image ID (present when force_update is true)
|
|
343
|
-
*/
|
|
344
|
-
image_id?: string | null;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export interface ProductCollectionCreateParams {
|
|
348
|
-
/**
|
|
349
|
-
* Groups of products in this collection
|
|
350
|
-
*/
|
|
351
|
-
groups: Array<ProductCollectionCreateParams.Group>;
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Name of the product collection
|
|
355
|
-
*/
|
|
356
|
-
name: string;
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Brand id for the collection, if not provided will default to primary brand
|
|
360
|
-
*/
|
|
361
|
-
brand_id?: string | null;
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Optional description of the product collection
|
|
365
|
-
*/
|
|
366
|
-
description?: string | null;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export namespace ProductCollectionCreateParams {
|
|
370
|
-
export interface Group {
|
|
371
|
-
/**
|
|
372
|
-
* Products in this group
|
|
373
|
-
*/
|
|
374
|
-
products: Array<Group.Product>;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Optional group name. Multiple groups can have null names, but named groups must
|
|
378
|
-
* be unique per collection
|
|
379
|
-
*/
|
|
380
|
-
group_name?: string | null;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Status of the group (defaults to true if not provided)
|
|
384
|
-
*/
|
|
385
|
-
status?: boolean | null;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export namespace Group {
|
|
389
|
-
export interface Product {
|
|
390
|
-
/**
|
|
391
|
-
* Product ID to include in the group
|
|
392
|
-
*/
|
|
393
|
-
product_id: string;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Status of the product in this group (defaults to true if not provided)
|
|
397
|
-
*/
|
|
398
|
-
status?: boolean | null;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export interface ProductCollectionUpdateParams {
|
|
404
|
-
/**
|
|
405
|
-
* Optional brand_id update
|
|
406
|
-
*/
|
|
407
|
-
brand_id?: string | null;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Optional description update - pass null to remove, omit to keep unchanged
|
|
411
|
-
*/
|
|
412
|
-
description?: string | null;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Optional new order for groups (array of group UUIDs in desired order)
|
|
416
|
-
*/
|
|
417
|
-
group_order?: Array<string> | null;
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Optional image update - pass null to remove, omit to keep unchanged
|
|
421
|
-
*/
|
|
422
|
-
image_id?: string | null;
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* Optional new name for the collection
|
|
426
|
-
*/
|
|
427
|
-
name?: string | null;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export interface ProductCollectionListParams extends DefaultPageNumberPaginationParams {
|
|
431
|
-
/**
|
|
432
|
-
* List archived collections
|
|
433
|
-
*/
|
|
434
|
-
archived?: boolean;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Filter by Brand id
|
|
438
|
-
*/
|
|
439
|
-
brand_id?: string;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export interface ProductCollectionUpdateImagesParams {
|
|
443
|
-
/**
|
|
444
|
-
* If true, generates a new image ID to force cache invalidation
|
|
445
|
-
*/
|
|
446
|
-
force_update?: boolean | null;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
ProductCollections.Groups = Groups;
|
|
450
|
-
|
|
451
|
-
export declare namespace ProductCollections {
|
|
452
|
-
export {
|
|
453
|
-
type ProductCollectionCreateResponse as ProductCollectionCreateResponse,
|
|
454
|
-
type ProductCollectionRetrieveResponse as ProductCollectionRetrieveResponse,
|
|
455
|
-
type ProductCollectionListResponse as ProductCollectionListResponse,
|
|
456
|
-
type ProductCollectionUnarchiveResponse as ProductCollectionUnarchiveResponse,
|
|
457
|
-
type ProductCollectionUpdateImagesResponse as ProductCollectionUpdateImagesResponse,
|
|
458
|
-
type ProductCollectionListResponsesDefaultPageNumberPagination as ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
459
|
-
type ProductCollectionCreateParams as ProductCollectionCreateParams,
|
|
460
|
-
type ProductCollectionUpdateParams as ProductCollectionUpdateParams,
|
|
461
|
-
type ProductCollectionListParams as ProductCollectionListParams,
|
|
462
|
-
type ProductCollectionUpdateImagesParams as ProductCollectionUpdateImagesParams,
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
export {
|
|
466
|
-
Groups as Groups,
|
|
467
|
-
type GroupCreateResponse as GroupCreateResponse,
|
|
468
|
-
type GroupCreateParams as GroupCreateParams,
|
|
469
|
-
type GroupUpdateParams as GroupUpdateParams,
|
|
470
|
-
type GroupDeleteParams as GroupDeleteParams,
|
|
471
|
-
};
|
|
472
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../core/resource';
|
|
4
|
-
import * as DisputesAPI from './disputes';
|
|
5
|
-
import * as LicenseKeysAPI from './license-keys';
|
|
6
|
-
import * as PaymentsAPI from './payments';
|
|
7
|
-
import * as RefundsAPI from './refunds';
|
|
8
|
-
import * as SubscriptionsAPI from './subscriptions';
|
|
9
|
-
import * as WebhookEventsAPI from './webhook-events';
|
|
10
|
-
import * as BalancesAPI from './credit-entitlements/balances';
|
|
11
|
-
import { APIPromise } from '../core/api-promise';
|
|
12
|
-
import { buildHeaders } from '../internal/headers';
|
|
13
|
-
import { RequestOptions } from '../internal/request-options';
|
|
14
|
-
|
|
15
|
-
export class YourWebhookURL extends APIResource {
|
|
16
|
-
create(params: YourWebhookURLCreateParams, options?: RequestOptions): APIPromise<void> {
|
|
17
|
-
const {
|
|
18
|
-
'webhook-id': webhookID,
|
|
19
|
-
'webhook-signature': webhookSignature,
|
|
20
|
-
'webhook-timestamp': webhookTimestamp,
|
|
21
|
-
...body
|
|
22
|
-
} = params;
|
|
23
|
-
return this._client.post('/your-webhook-url', {
|
|
24
|
-
body,
|
|
25
|
-
...options,
|
|
26
|
-
headers: buildHeaders([
|
|
27
|
-
{
|
|
28
|
-
Accept: '*/*',
|
|
29
|
-
'webhook-id': webhookID,
|
|
30
|
-
'webhook-signature': webhookSignature,
|
|
31
|
-
'webhook-timestamp': webhookTimestamp,
|
|
32
|
-
},
|
|
33
|
-
options?.headers,
|
|
34
|
-
]),
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface YourWebhookURLCreateParams {
|
|
40
|
-
/**
|
|
41
|
-
* Body param
|
|
42
|
-
*/
|
|
43
|
-
business_id: string;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Body param: The latest data at the time of delivery attempt
|
|
47
|
-
*/
|
|
48
|
-
data:
|
|
49
|
-
| YourWebhookURLCreateParams.Payment
|
|
50
|
-
| YourWebhookURLCreateParams.Subscription
|
|
51
|
-
| YourWebhookURLCreateParams.Refund
|
|
52
|
-
| YourWebhookURLCreateParams.Dispute
|
|
53
|
-
| YourWebhookURLCreateParams.LicenseKey
|
|
54
|
-
| YourWebhookURLCreateParams.CreditLedgerEntry
|
|
55
|
-
| YourWebhookURLCreateParams.CreditBalanceLow;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Body param: The timestamp of when the event occurred (not necessarily the same
|
|
59
|
-
* of when it was delivered)
|
|
60
|
-
*/
|
|
61
|
-
timestamp: string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Body param: Event types for Dodo events
|
|
65
|
-
*/
|
|
66
|
-
type: WebhookEventsAPI.WebhookEventType;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Header param: Unique identifier for the webhook
|
|
70
|
-
*/
|
|
71
|
-
'webhook-id': string;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Header param: Signature of the Webhook
|
|
75
|
-
*/
|
|
76
|
-
'webhook-signature': string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Header param: Unix timestamp when the webhook was sent
|
|
80
|
-
*/
|
|
81
|
-
'webhook-timestamp': string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export namespace YourWebhookURLCreateParams {
|
|
85
|
-
export interface Payment extends PaymentsAPI.Payment {
|
|
86
|
-
payload_type: 'Payment';
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Response struct representing subscription details
|
|
91
|
-
*/
|
|
92
|
-
export interface Subscription extends SubscriptionsAPI.Subscription {
|
|
93
|
-
payload_type: 'Subscription';
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface Refund extends RefundsAPI.Refund {
|
|
97
|
-
payload_type: 'Refund';
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface Dispute extends DisputesAPI.GetDispute {
|
|
101
|
-
payload_type: 'Dispute';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface LicenseKey extends LicenseKeysAPI.LicenseKey {
|
|
105
|
-
payload_type: 'LicenseKey';
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Response for a ledger entry
|
|
110
|
-
*/
|
|
111
|
-
export interface CreditLedgerEntry extends BalancesAPI.CreditLedgerEntry {
|
|
112
|
-
payload_type: 'CreditLedgerEntry';
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface CreditBalanceLow {
|
|
116
|
-
available_balance: string;
|
|
117
|
-
|
|
118
|
-
credit_entitlement_id: string;
|
|
119
|
-
|
|
120
|
-
credit_entitlement_name: string;
|
|
121
|
-
|
|
122
|
-
customer_id: string;
|
|
123
|
-
|
|
124
|
-
payload_type: 'CreditBalanceLow';
|
|
125
|
-
|
|
126
|
-
subscription_credits_amount: string;
|
|
127
|
-
|
|
128
|
-
subscription_id: string;
|
|
129
|
-
|
|
130
|
-
threshold_amount: string;
|
|
131
|
-
|
|
132
|
-
threshold_percent: number;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export declare namespace YourWebhookURL {
|
|
137
|
-
export { type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
138
|
-
}
|