dodopayments 2.23.3 → 2.24.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 +18 -0
- package/bin/migration-config.json +187 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/checkout-sessions.d.mts +17 -2
- package/resources/checkout-sessions.d.mts.map +1 -1
- package/resources/checkout-sessions.d.ts +17 -2
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/customers/customer-portal.d.mts +5 -0
- package/resources/customers/customer-portal.d.mts.map +1 -1
- package/resources/customers/customer-portal.d.ts +5 -0
- package/resources/customers/customer-portal.d.ts.map +1 -1
- package/resources/customers/customer-portal.js +2 -2
- package/resources/customers/customer-portal.js.map +1 -1
- package/resources/customers/customer-portal.mjs +2 -2
- package/resources/customers/customer-portal.mjs.map +1 -1
- package/resources/customers/customers.d.mts +5 -0
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +5 -0
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices/payments.d.mts +1 -0
- package/resources/invoices/payments.d.mts.map +1 -1
- package/resources/invoices/payments.d.ts +1 -0
- package/resources/invoices/payments.d.ts.map +1 -1
- package/resources/invoices/payments.js +7 -0
- package/resources/invoices/payments.js.map +1 -1
- package/resources/invoices/payments.mjs +7 -0
- package/resources/invoices/payments.mjs.map +1 -1
- package/resources/payments.d.mts +5 -0
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +5 -0
- package/resources/payments.d.ts.map +1 -1
- package/resources/product-collections/groups/groups.d.mts +107 -0
- package/resources/product-collections/groups/groups.d.mts.map +1 -0
- package/resources/product-collections/groups/groups.d.ts +107 -0
- package/resources/product-collections/groups/groups.d.ts.map +1 -0
- package/resources/product-collections/groups/groups.js +37 -0
- package/resources/product-collections/groups/groups.js.map +1 -0
- package/resources/product-collections/groups/groups.mjs +32 -0
- package/resources/product-collections/groups/groups.mjs.map +1 -0
- package/resources/product-collections/groups/index.d.mts +3 -0
- package/resources/product-collections/groups/index.d.mts.map +1 -0
- package/resources/product-collections/groups/index.d.ts +3 -0
- package/resources/product-collections/groups/index.d.ts.map +1 -0
- package/resources/product-collections/groups/index.js +9 -0
- package/resources/product-collections/groups/index.js.map +1 -0
- package/resources/product-collections/groups/index.mjs +4 -0
- package/resources/product-collections/groups/index.mjs.map +1 -0
- package/resources/product-collections/groups/items.d.mts +91 -0
- package/resources/product-collections/groups/items.d.mts.map +1 -0
- package/resources/product-collections/groups/items.d.ts +91 -0
- package/resources/product-collections/groups/items.d.ts.map +1 -0
- package/resources/product-collections/groups/items.js +30 -0
- package/resources/product-collections/groups/items.js.map +1 -0
- package/resources/product-collections/groups/items.mjs +26 -0
- package/resources/product-collections/groups/items.mjs.map +1 -0
- package/resources/product-collections/groups.d.mts +2 -0
- package/resources/product-collections/groups.d.mts.map +1 -0
- package/resources/product-collections/groups.d.ts +2 -0
- package/resources/product-collections/groups.d.ts.map +1 -0
- package/resources/product-collections/groups.js +6 -0
- package/resources/product-collections/groups.js.map +1 -0
- package/resources/product-collections/groups.mjs +3 -0
- package/resources/product-collections/groups.mjs.map +1 -0
- package/resources/product-collections/index.d.mts +3 -0
- package/resources/product-collections/index.d.mts.map +1 -0
- package/resources/product-collections/index.d.ts +3 -0
- package/resources/product-collections/index.d.ts.map +1 -0
- package/resources/product-collections/index.js +9 -0
- package/resources/product-collections/index.js.map +1 -0
- package/resources/product-collections/index.mjs +4 -0
- package/resources/product-collections/index.mjs.map +1 -0
- package/resources/product-collections/product-collections.d.mts +307 -0
- package/resources/product-collections/product-collections.d.mts.map +1 -0
- package/resources/product-collections/product-collections.d.ts +307 -0
- package/resources/product-collections/product-collections.d.ts.map +1 -0
- package/resources/product-collections/product-collections.js +49 -0
- package/resources/product-collections/product-collections.js.map +1 -0
- package/resources/product-collections/product-collections.mjs +44 -0
- package/resources/product-collections/product-collections.mjs.map +1 -0
- package/resources/product-collections.d.mts +2 -0
- package/resources/product-collections.d.mts.map +1 -0
- package/resources/product-collections.d.ts +2 -0
- package/resources/product-collections.d.ts.map +1 -0
- package/resources/product-collections.js +6 -0
- package/resources/product-collections.js.map +1 -0
- package/resources/product-collections.mjs +3 -0
- package/resources/product-collections.mjs.map +1 -0
- package/resources/subscriptions.d.mts +147 -3
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +147 -3
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +6 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +6 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/your-webhook-url.d.mts +85 -0
- package/resources/your-webhook-url.d.mts.map +1 -0
- package/resources/your-webhook-url.d.ts +85 -0
- package/resources/your-webhook-url.d.ts.map +1 -0
- package/resources/your-webhook-url.js +26 -0
- package/resources/your-webhook-url.js.map +1 -0
- package/resources/your-webhook-url.mjs +22 -0
- package/resources/your-webhook-url.mjs.map +1 -0
- package/src/client.ts +34 -0
- package/src/resources/checkout-sessions.ts +20 -2
- package/src/resources/customers/customer-portal.ts +8 -2
- package/src/resources/customers/customers.ts +5 -0
- package/src/resources/index.ts +14 -0
- package/src/resources/invoices/payments.ts +8 -0
- package/src/resources/payments.ts +5 -0
- package/src/resources/product-collections/groups/groups.ts +174 -0
- package/src/resources/product-collections/groups/index.ts +16 -0
- package/src/resources/product-collections/groups/items.ts +149 -0
- package/src/resources/product-collections/groups.ts +3 -0
- package/src/resources/product-collections/index.ts +22 -0
- package/src/resources/product-collections/product-collections.ts +472 -0
- package/src/resources/product-collections.ts +3 -0
- package/src/resources/subscriptions.ts +193 -3
- package/src/resources/your-webhook-url.ts +138 -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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as MiscAPI from "../../misc.mjs";
|
|
3
|
+
import * as ProductsAPI from "../../products/products.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
|
+
export declare class Items extends APIResource {
|
|
7
|
+
create(groupID: string, params: ItemCreateParams, options?: RequestOptions): APIPromise<ItemCreateResponse>;
|
|
8
|
+
update(itemID: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
9
|
+
delete(itemID: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
10
|
+
}
|
|
11
|
+
export type ItemCreateResponse = Array<ItemCreateResponse.ItemCreateResponseItem>;
|
|
12
|
+
export declare namespace ItemCreateResponse {
|
|
13
|
+
interface ItemCreateResponseItem {
|
|
14
|
+
id: string;
|
|
15
|
+
addons_count: number;
|
|
16
|
+
files_count: number;
|
|
17
|
+
/**
|
|
18
|
+
* Whether this product has any credit entitlements attached
|
|
19
|
+
*/
|
|
20
|
+
has_credit_entitlements: boolean;
|
|
21
|
+
is_recurring: boolean;
|
|
22
|
+
license_key_enabled: boolean;
|
|
23
|
+
meters_count: number;
|
|
24
|
+
product_id: string;
|
|
25
|
+
status: boolean;
|
|
26
|
+
currency?: MiscAPI.Currency | null;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
name?: string | null;
|
|
29
|
+
price?: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* One-time price details.
|
|
32
|
+
*/
|
|
33
|
+
price_detail?: ProductsAPI.Price | null;
|
|
34
|
+
/**
|
|
35
|
+
* Represents the different categories of taxation applicable to various products
|
|
36
|
+
* and services.
|
|
37
|
+
*/
|
|
38
|
+
tax_category?: MiscAPI.TaxCategory | null;
|
|
39
|
+
tax_inclusive?: boolean | null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export interface ItemCreateParams {
|
|
43
|
+
/**
|
|
44
|
+
* Path param: Product Collection Id
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
/**
|
|
48
|
+
* Body param: Products to add to the group
|
|
49
|
+
*/
|
|
50
|
+
products: Array<ItemCreateParams.Product>;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace ItemCreateParams {
|
|
53
|
+
interface Product {
|
|
54
|
+
/**
|
|
55
|
+
* Product ID to include in the group
|
|
56
|
+
*/
|
|
57
|
+
product_id: string;
|
|
58
|
+
/**
|
|
59
|
+
* Status of the product in this group (defaults to true if not provided)
|
|
60
|
+
*/
|
|
61
|
+
status?: boolean | null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export interface ItemUpdateParams {
|
|
65
|
+
/**
|
|
66
|
+
* Path param: Product Collection Id
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
/**
|
|
70
|
+
* Path param: Product Collection Group Id
|
|
71
|
+
*/
|
|
72
|
+
group_id: string;
|
|
73
|
+
/**
|
|
74
|
+
* Body param: Status of the product in the group
|
|
75
|
+
*/
|
|
76
|
+
status: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface ItemDeleteParams {
|
|
79
|
+
/**
|
|
80
|
+
* Product Collection Id
|
|
81
|
+
*/
|
|
82
|
+
id: string;
|
|
83
|
+
/**
|
|
84
|
+
* Product Collection Group Id
|
|
85
|
+
*/
|
|
86
|
+
group_id: string;
|
|
87
|
+
}
|
|
88
|
+
export declare namespace Items {
|
|
89
|
+
export { type ItemCreateResponse as ItemCreateResponse, type ItemCreateParams as ItemCreateParams, type ItemUpdateParams as ItemUpdateParams, type ItemDeleteParams as ItemDeleteParams, };
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=items.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.mts","sourceRoot":"","sources":["../../../src/resources/product-collections/groups/items.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAKjC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAS5F,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO7F;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAElF,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,sBAAsB;QACrC,EAAE,EAAE,MAAM,CAAC;QAEX,YAAY,EAAE,MAAM,CAAC;QAErB,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,uBAAuB,EAAE,OAAO,CAAC;QAEjC,YAAY,EAAE,OAAO,CAAC;QAEtB,mBAAmB,EAAE,OAAO,CAAC;QAE7B,YAAY,EAAE,MAAM,CAAC;QAErB,UAAU,EAAE,MAAM,CAAC;QAEnB,MAAM,EAAE,OAAO,CAAC;QAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEnC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB;;WAEG;QACH,YAAY,CAAC,EAAE,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;QAExC;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAE1C,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KAChC;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,OAAO;QACtB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACzB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as MiscAPI from "../../misc.js";
|
|
3
|
+
import * as ProductsAPI from "../../products/products.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
|
+
export declare class Items extends APIResource {
|
|
7
|
+
create(groupID: string, params: ItemCreateParams, options?: RequestOptions): APIPromise<ItemCreateResponse>;
|
|
8
|
+
update(itemID: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
9
|
+
delete(itemID: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
10
|
+
}
|
|
11
|
+
export type ItemCreateResponse = Array<ItemCreateResponse.ItemCreateResponseItem>;
|
|
12
|
+
export declare namespace ItemCreateResponse {
|
|
13
|
+
interface ItemCreateResponseItem {
|
|
14
|
+
id: string;
|
|
15
|
+
addons_count: number;
|
|
16
|
+
files_count: number;
|
|
17
|
+
/**
|
|
18
|
+
* Whether this product has any credit entitlements attached
|
|
19
|
+
*/
|
|
20
|
+
has_credit_entitlements: boolean;
|
|
21
|
+
is_recurring: boolean;
|
|
22
|
+
license_key_enabled: boolean;
|
|
23
|
+
meters_count: number;
|
|
24
|
+
product_id: string;
|
|
25
|
+
status: boolean;
|
|
26
|
+
currency?: MiscAPI.Currency | null;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
name?: string | null;
|
|
29
|
+
price?: number | null;
|
|
30
|
+
/**
|
|
31
|
+
* One-time price details.
|
|
32
|
+
*/
|
|
33
|
+
price_detail?: ProductsAPI.Price | null;
|
|
34
|
+
/**
|
|
35
|
+
* Represents the different categories of taxation applicable to various products
|
|
36
|
+
* and services.
|
|
37
|
+
*/
|
|
38
|
+
tax_category?: MiscAPI.TaxCategory | null;
|
|
39
|
+
tax_inclusive?: boolean | null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export interface ItemCreateParams {
|
|
43
|
+
/**
|
|
44
|
+
* Path param: Product Collection Id
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
/**
|
|
48
|
+
* Body param: Products to add to the group
|
|
49
|
+
*/
|
|
50
|
+
products: Array<ItemCreateParams.Product>;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace ItemCreateParams {
|
|
53
|
+
interface Product {
|
|
54
|
+
/**
|
|
55
|
+
* Product ID to include in the group
|
|
56
|
+
*/
|
|
57
|
+
product_id: string;
|
|
58
|
+
/**
|
|
59
|
+
* Status of the product in this group (defaults to true if not provided)
|
|
60
|
+
*/
|
|
61
|
+
status?: boolean | null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export interface ItemUpdateParams {
|
|
65
|
+
/**
|
|
66
|
+
* Path param: Product Collection Id
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
/**
|
|
70
|
+
* Path param: Product Collection Group Id
|
|
71
|
+
*/
|
|
72
|
+
group_id: string;
|
|
73
|
+
/**
|
|
74
|
+
* Body param: Status of the product in the group
|
|
75
|
+
*/
|
|
76
|
+
status: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface ItemDeleteParams {
|
|
79
|
+
/**
|
|
80
|
+
* Product Collection Id
|
|
81
|
+
*/
|
|
82
|
+
id: string;
|
|
83
|
+
/**
|
|
84
|
+
* Product Collection Group Id
|
|
85
|
+
*/
|
|
86
|
+
group_id: string;
|
|
87
|
+
}
|
|
88
|
+
export declare namespace Items {
|
|
89
|
+
export { type ItemCreateResponse as ItemCreateResponse, type ItemCreateParams as ItemCreateParams, type ItemUpdateParams as ItemUpdateParams, type ItemDeleteParams as ItemDeleteParams, };
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../src/resources/product-collections/groups/items.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAKjC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAS5F,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO7F;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAElF,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,sBAAsB;QACrC,EAAE,EAAE,MAAM,CAAC;QAEX,YAAY,EAAE,MAAM,CAAC;QAErB,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,uBAAuB,EAAE,OAAO,CAAC;QAEjC,YAAY,EAAE,OAAO,CAAC;QAEtB,mBAAmB,EAAE,OAAO,CAAC;QAE7B,YAAY,EAAE,MAAM,CAAC;QAErB,UAAU,EAAE,MAAM,CAAC;QAEnB,MAAM,EAAE,OAAO,CAAC;QAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEnC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB;;WAEG;QACH,YAAY,CAAC,EAAE,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;QAExC;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAE1C,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KAChC;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,OAAO;QACtB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KACzB;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Items = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
8
|
+
class Items extends resource_1.APIResource {
|
|
9
|
+
create(groupID, params, options) {
|
|
10
|
+
const { id, ...body } = params;
|
|
11
|
+
return this._client.post((0, path_1.path) `/product-collections/${id}/groups/${groupID}/items`, { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
update(itemID, params, options) {
|
|
14
|
+
const { id, group_id, ...body } = params;
|
|
15
|
+
return this._client.patch((0, path_1.path) `/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
16
|
+
body,
|
|
17
|
+
...options,
|
|
18
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
delete(itemID, params, options) {
|
|
22
|
+
const { id, group_id } = params;
|
|
23
|
+
return this._client.delete((0, path_1.path) `/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
24
|
+
...options,
|
|
25
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.Items = Items;
|
|
30
|
+
//# sourceMappingURL=items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../../src/resources/product-collections/groups/items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,KAAM,SAAQ,sBAAW;IACpC,MAAM,CACJ,OAAe,EACf,MAAwB,EACxB,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,WAAW,OAAO,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,WAAW,QAAQ,UAAU,MAAM,EAAE,EAAE;YAC7F,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,WAAW,QAAQ,UAAU,MAAM,EAAE,EAAE;YAC9F,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA1BD,sBA0BC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
5
|
+
export class Items extends APIResource {
|
|
6
|
+
create(groupID, params, options) {
|
|
7
|
+
const { id, ...body } = params;
|
|
8
|
+
return this._client.post(path `/product-collections/${id}/groups/${groupID}/items`, { body, ...options });
|
|
9
|
+
}
|
|
10
|
+
update(itemID, params, options) {
|
|
11
|
+
const { id, group_id, ...body } = params;
|
|
12
|
+
return this._client.patch(path `/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
13
|
+
body,
|
|
14
|
+
...options,
|
|
15
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
delete(itemID, params, options) {
|
|
19
|
+
const { id, group_id } = params;
|
|
20
|
+
return this._client.delete(path `/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
21
|
+
...options,
|
|
22
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=items.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.mjs","sourceRoot":"","sources":["../../../src/resources/product-collections/groups/items.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC,MAAM,CACJ,OAAe,EACf,MAAwB,EACxB,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,wBAAwB,EAAE,WAAW,OAAO,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,wBAAwB,EAAE,WAAW,QAAQ,UAAU,MAAM,EAAE,EAAE;YAC7F,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,wBAAwB,EAAE,WAAW,QAAQ,UAAU,MAAM,EAAE,EAAE;YAC9F,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.d.mts","sourceRoot":"","sources":["../../src/resources/product-collections/groups.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/resources/product-collections/groups.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./groups/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/resources/product-collections/groups.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.mjs","sourceRoot":"","sources":["../../src/resources/product-collections/groups.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Groups, type GroupCreateResponse, type GroupCreateParams, type GroupUpdateParams, type GroupDeleteParams, } from "./groups/index.mjs";
|
|
2
|
+
export { ProductCollections, type ProductCollectionCreateResponse, type ProductCollectionRetrieveResponse, type ProductCollectionListResponse, type ProductCollectionUnarchiveResponse, type ProductCollectionUpdateImagesResponse, type ProductCollectionCreateParams, type ProductCollectionUpdateParams, type ProductCollectionListParams, type ProductCollectionUpdateImagesParams, type ProductCollectionListResponsesDefaultPageNumberPagination, } from "./product-collections.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/product-collections/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,kBAAkB,EAClB,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,EACvC,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,mCAAmC,EACxC,KAAK,yDAAyD,GAC/D"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Groups, type GroupCreateResponse, type GroupCreateParams, type GroupUpdateParams, type GroupDeleteParams, } from "./groups/index.js";
|
|
2
|
+
export { ProductCollections, type ProductCollectionCreateResponse, type ProductCollectionRetrieveResponse, type ProductCollectionListResponse, type ProductCollectionUnarchiveResponse, type ProductCollectionUpdateImagesResponse, type ProductCollectionCreateParams, type ProductCollectionUpdateParams, type ProductCollectionListParams, type ProductCollectionUpdateImagesParams, type ProductCollectionListResponsesDefaultPageNumberPagination, } from "./product-collections.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/product-collections/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,kBAAkB,EAClB,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,EACvC,KAAK,qCAAqC,EAC1C,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,mCAAmC,EACxC,KAAK,yDAAyD,GAC/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ProductCollections = exports.Groups = void 0;
|
|
5
|
+
var index_1 = require("./groups/index.js");
|
|
6
|
+
Object.defineProperty(exports, "Groups", { enumerable: true, get: function () { return index_1.Groups; } });
|
|
7
|
+
var product_collections_1 = require("./product-collections.js");
|
|
8
|
+
Object.defineProperty(exports, "ProductCollections", { enumerable: true, get: function () { return product_collections_1.ProductCollections; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/product-collections/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2CAMwB;AALtB,+FAAA,MAAM,OAAA;AAMR,gEAY+B;AAX7B,yHAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/product-collections/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAKP;OACM,EACL,kBAAkB,GAWnB"}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as MiscAPI from "../misc.mjs";
|
|
3
|
+
import * as ProductsAPI from "../products/products.mjs";
|
|
4
|
+
import * as GroupsAPI from "./groups/groups.mjs";
|
|
5
|
+
import { GroupCreateParams, GroupCreateResponse, GroupDeleteParams, GroupUpdateParams, Groups } from "./groups/groups.mjs";
|
|
6
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
7
|
+
import { DefaultPageNumberPagination, type DefaultPageNumberPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
8
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
9
|
+
export declare class ProductCollections extends APIResource {
|
|
10
|
+
groups: GroupsAPI.Groups;
|
|
11
|
+
create(body: ProductCollectionCreateParams, options?: RequestOptions): APIPromise<ProductCollectionCreateResponse>;
|
|
12
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<ProductCollectionRetrieveResponse>;
|
|
13
|
+
update(id: string, body: ProductCollectionUpdateParams, options?: RequestOptions): APIPromise<void>;
|
|
14
|
+
list(query?: ProductCollectionListParams | null | undefined, options?: RequestOptions): PagePromise<ProductCollectionListResponsesDefaultPageNumberPagination, ProductCollectionListResponse>;
|
|
15
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
16
|
+
unarchive(id: string, options?: RequestOptions): APIPromise<ProductCollectionUnarchiveResponse>;
|
|
17
|
+
updateImages(id: string, params?: ProductCollectionUpdateImagesParams | null | undefined, options?: RequestOptions): APIPromise<ProductCollectionUpdateImagesResponse>;
|
|
18
|
+
}
|
|
19
|
+
export type ProductCollectionListResponsesDefaultPageNumberPagination = DefaultPageNumberPagination<ProductCollectionListResponse>;
|
|
20
|
+
export interface ProductCollectionCreateResponse {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for the product collection
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Brand ID for the collection
|
|
27
|
+
*/
|
|
28
|
+
brand_id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Timestamp when the collection was created
|
|
31
|
+
*/
|
|
32
|
+
created_at: string;
|
|
33
|
+
/**
|
|
34
|
+
* Groups in this collection
|
|
35
|
+
*/
|
|
36
|
+
groups: Array<ProductCollectionCreateResponse.Group>;
|
|
37
|
+
/**
|
|
38
|
+
* Name of the collection
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* Timestamp when the collection was last updated
|
|
43
|
+
*/
|
|
44
|
+
updated_at: string;
|
|
45
|
+
/**
|
|
46
|
+
* Description of the collection
|
|
47
|
+
*/
|
|
48
|
+
description?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* URL of the collection image
|
|
51
|
+
*/
|
|
52
|
+
image?: string | null;
|
|
53
|
+
}
|
|
54
|
+
export declare namespace ProductCollectionCreateResponse {
|
|
55
|
+
interface Group {
|
|
56
|
+
group_id: string;
|
|
57
|
+
products: Array<Group.Product>;
|
|
58
|
+
status: boolean;
|
|
59
|
+
group_name?: string | null;
|
|
60
|
+
}
|
|
61
|
+
namespace Group {
|
|
62
|
+
interface Product {
|
|
63
|
+
id: string;
|
|
64
|
+
addons_count: number;
|
|
65
|
+
files_count: number;
|
|
66
|
+
/**
|
|
67
|
+
* Whether this product has any credit entitlements attached
|
|
68
|
+
*/
|
|
69
|
+
has_credit_entitlements: boolean;
|
|
70
|
+
is_recurring: boolean;
|
|
71
|
+
license_key_enabled: boolean;
|
|
72
|
+
meters_count: number;
|
|
73
|
+
product_id: string;
|
|
74
|
+
status: boolean;
|
|
75
|
+
currency?: MiscAPI.Currency | null;
|
|
76
|
+
description?: string | null;
|
|
77
|
+
name?: string | null;
|
|
78
|
+
price?: number | null;
|
|
79
|
+
/**
|
|
80
|
+
* One-time price details.
|
|
81
|
+
*/
|
|
82
|
+
price_detail?: ProductsAPI.Price | null;
|
|
83
|
+
/**
|
|
84
|
+
* Represents the different categories of taxation applicable to various products
|
|
85
|
+
* and services.
|
|
86
|
+
*/
|
|
87
|
+
tax_category?: MiscAPI.TaxCategory | null;
|
|
88
|
+
tax_inclusive?: boolean | null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export interface ProductCollectionRetrieveResponse {
|
|
93
|
+
/**
|
|
94
|
+
* Unique identifier for the product collection
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
/**
|
|
98
|
+
* Brand ID for the collection
|
|
99
|
+
*/
|
|
100
|
+
brand_id: string;
|
|
101
|
+
/**
|
|
102
|
+
* Timestamp when the collection was created
|
|
103
|
+
*/
|
|
104
|
+
created_at: string;
|
|
105
|
+
/**
|
|
106
|
+
* Groups in this collection
|
|
107
|
+
*/
|
|
108
|
+
groups: Array<ProductCollectionRetrieveResponse.Group>;
|
|
109
|
+
/**
|
|
110
|
+
* Name of the collection
|
|
111
|
+
*/
|
|
112
|
+
name: string;
|
|
113
|
+
/**
|
|
114
|
+
* Timestamp when the collection was last updated
|
|
115
|
+
*/
|
|
116
|
+
updated_at: string;
|
|
117
|
+
/**
|
|
118
|
+
* Description of the collection
|
|
119
|
+
*/
|
|
120
|
+
description?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* URL of the collection image
|
|
123
|
+
*/
|
|
124
|
+
image?: string | null;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace ProductCollectionRetrieveResponse {
|
|
127
|
+
interface Group {
|
|
128
|
+
group_id: string;
|
|
129
|
+
products: Array<Group.Product>;
|
|
130
|
+
status: boolean;
|
|
131
|
+
group_name?: string | null;
|
|
132
|
+
}
|
|
133
|
+
namespace Group {
|
|
134
|
+
interface Product {
|
|
135
|
+
id: string;
|
|
136
|
+
addons_count: number;
|
|
137
|
+
files_count: number;
|
|
138
|
+
/**
|
|
139
|
+
* Whether this product has any credit entitlements attached
|
|
140
|
+
*/
|
|
141
|
+
has_credit_entitlements: boolean;
|
|
142
|
+
is_recurring: boolean;
|
|
143
|
+
license_key_enabled: boolean;
|
|
144
|
+
meters_count: number;
|
|
145
|
+
product_id: string;
|
|
146
|
+
status: boolean;
|
|
147
|
+
currency?: MiscAPI.Currency | null;
|
|
148
|
+
description?: string | null;
|
|
149
|
+
name?: string | null;
|
|
150
|
+
price?: number | null;
|
|
151
|
+
/**
|
|
152
|
+
* One-time price details.
|
|
153
|
+
*/
|
|
154
|
+
price_detail?: ProductsAPI.Price | null;
|
|
155
|
+
/**
|
|
156
|
+
* Represents the different categories of taxation applicable to various products
|
|
157
|
+
* and services.
|
|
158
|
+
*/
|
|
159
|
+
tax_category?: MiscAPI.TaxCategory | null;
|
|
160
|
+
tax_inclusive?: boolean | null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export interface ProductCollectionListResponse {
|
|
165
|
+
/**
|
|
166
|
+
* Collection ID
|
|
167
|
+
*/
|
|
168
|
+
id: string;
|
|
169
|
+
/**
|
|
170
|
+
* Timestamp when created
|
|
171
|
+
*/
|
|
172
|
+
created_at: string;
|
|
173
|
+
/**
|
|
174
|
+
* Collection name
|
|
175
|
+
*/
|
|
176
|
+
name: string;
|
|
177
|
+
/**
|
|
178
|
+
* Number of products in the collection
|
|
179
|
+
*/
|
|
180
|
+
products_count: number;
|
|
181
|
+
/**
|
|
182
|
+
* Timestamp when last updated
|
|
183
|
+
*/
|
|
184
|
+
updated_at: string;
|
|
185
|
+
/**
|
|
186
|
+
* Collection description
|
|
187
|
+
*/
|
|
188
|
+
description?: string | null;
|
|
189
|
+
/**
|
|
190
|
+
* Collection image URL
|
|
191
|
+
*/
|
|
192
|
+
image?: string | null;
|
|
193
|
+
}
|
|
194
|
+
export interface ProductCollectionUnarchiveResponse {
|
|
195
|
+
/**
|
|
196
|
+
* Collection ID that was unarchived
|
|
197
|
+
*/
|
|
198
|
+
collection_id: string;
|
|
199
|
+
/**
|
|
200
|
+
* Product IDs that were excluded because they are archived
|
|
201
|
+
*/
|
|
202
|
+
excluded_product_ids: Array<string>;
|
|
203
|
+
/**
|
|
204
|
+
* Success message
|
|
205
|
+
*/
|
|
206
|
+
message: string;
|
|
207
|
+
}
|
|
208
|
+
export interface ProductCollectionUpdateImagesResponse {
|
|
209
|
+
/**
|
|
210
|
+
* Presigned S3 URL for uploading the image
|
|
211
|
+
*/
|
|
212
|
+
url: string;
|
|
213
|
+
/**
|
|
214
|
+
* Optional image ID (present when force_update is true)
|
|
215
|
+
*/
|
|
216
|
+
image_id?: string | null;
|
|
217
|
+
}
|
|
218
|
+
export interface ProductCollectionCreateParams {
|
|
219
|
+
/**
|
|
220
|
+
* Groups of products in this collection
|
|
221
|
+
*/
|
|
222
|
+
groups: Array<ProductCollectionCreateParams.Group>;
|
|
223
|
+
/**
|
|
224
|
+
* Name of the product collection
|
|
225
|
+
*/
|
|
226
|
+
name: string;
|
|
227
|
+
/**
|
|
228
|
+
* Brand id for the collection, if not provided will default to primary brand
|
|
229
|
+
*/
|
|
230
|
+
brand_id?: string | null;
|
|
231
|
+
/**
|
|
232
|
+
* Optional description of the product collection
|
|
233
|
+
*/
|
|
234
|
+
description?: string | null;
|
|
235
|
+
}
|
|
236
|
+
export declare namespace ProductCollectionCreateParams {
|
|
237
|
+
interface Group {
|
|
238
|
+
/**
|
|
239
|
+
* Products in this group
|
|
240
|
+
*/
|
|
241
|
+
products: Array<Group.Product>;
|
|
242
|
+
/**
|
|
243
|
+
* Optional group name. Multiple groups can have null names, but named groups must
|
|
244
|
+
* be unique per collection
|
|
245
|
+
*/
|
|
246
|
+
group_name?: string | null;
|
|
247
|
+
/**
|
|
248
|
+
* Status of the group (defaults to true if not provided)
|
|
249
|
+
*/
|
|
250
|
+
status?: boolean | null;
|
|
251
|
+
}
|
|
252
|
+
namespace Group {
|
|
253
|
+
interface Product {
|
|
254
|
+
/**
|
|
255
|
+
* Product ID to include in the group
|
|
256
|
+
*/
|
|
257
|
+
product_id: string;
|
|
258
|
+
/**
|
|
259
|
+
* Status of the product in this group (defaults to true if not provided)
|
|
260
|
+
*/
|
|
261
|
+
status?: boolean | null;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
export interface ProductCollectionUpdateParams {
|
|
266
|
+
/**
|
|
267
|
+
* Optional brand_id update
|
|
268
|
+
*/
|
|
269
|
+
brand_id?: string | null;
|
|
270
|
+
/**
|
|
271
|
+
* Optional description update - pass null to remove, omit to keep unchanged
|
|
272
|
+
*/
|
|
273
|
+
description?: string | null;
|
|
274
|
+
/**
|
|
275
|
+
* Optional new order for groups (array of group UUIDs in desired order)
|
|
276
|
+
*/
|
|
277
|
+
group_order?: Array<string> | null;
|
|
278
|
+
/**
|
|
279
|
+
* Optional image update - pass null to remove, omit to keep unchanged
|
|
280
|
+
*/
|
|
281
|
+
image_id?: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* Optional new name for the collection
|
|
284
|
+
*/
|
|
285
|
+
name?: string | null;
|
|
286
|
+
}
|
|
287
|
+
export interface ProductCollectionListParams extends DefaultPageNumberPaginationParams {
|
|
288
|
+
/**
|
|
289
|
+
* List archived collections
|
|
290
|
+
*/
|
|
291
|
+
archived?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* Filter by Brand id
|
|
294
|
+
*/
|
|
295
|
+
brand_id?: string;
|
|
296
|
+
}
|
|
297
|
+
export interface ProductCollectionUpdateImagesParams {
|
|
298
|
+
/**
|
|
299
|
+
* If true, generates a new image ID to force cache invalidation
|
|
300
|
+
*/
|
|
301
|
+
force_update?: boolean | null;
|
|
302
|
+
}
|
|
303
|
+
export declare namespace ProductCollections {
|
|
304
|
+
export { type ProductCollectionCreateResponse as ProductCollectionCreateResponse, type ProductCollectionRetrieveResponse as ProductCollectionRetrieveResponse, type ProductCollectionListResponse as ProductCollectionListResponse, type ProductCollectionUnarchiveResponse as ProductCollectionUnarchiveResponse, type ProductCollectionUpdateImagesResponse as ProductCollectionUpdateImagesResponse, type ProductCollectionListResponsesDefaultPageNumberPagination as ProductCollectionListResponsesDefaultPageNumberPagination, type ProductCollectionCreateParams as ProductCollectionCreateParams, type ProductCollectionUpdateParams as ProductCollectionUpdateParams, type ProductCollectionListParams as ProductCollectionListParams, type ProductCollectionUpdateImagesParams as ProductCollectionUpdateImagesParams, };
|
|
305
|
+
export { Groups as Groups, type GroupCreateResponse as GroupCreateResponse, type GroupCreateParams as GroupCreateParams, type GroupUpdateParams as GroupUpdateParams, type GroupDeleteParams as GroupDeleteParams, };
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=product-collections.d.mts.map
|