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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EACL,2BAA2B,GAG5B;OACM,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,kBAAkB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,2BAAqD,CAAA,EAAE;YACtG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CA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AAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED,mBAAmB,CACjB,cAAsB,EACtB,IAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,cAAc,wBAAwB,EAAE;YACrF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as DisputesAPI from "./disputes.mjs";
|
|
3
|
+
import * as LicenseKeysAPI from "./license-keys.mjs";
|
|
4
|
+
import * as PaymentsAPI from "./payments.mjs";
|
|
5
|
+
import * as RefundsAPI from "./refunds.mjs";
|
|
6
|
+
import * as SubscriptionsAPI from "./subscriptions.mjs";
|
|
7
|
+
import * as WebhookEventsAPI from "./webhook-events.mjs";
|
|
8
|
+
import * as BalancesAPI from "./credit-entitlements/balances.mjs";
|
|
9
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
10
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
11
|
+
export declare class YourWebhookURL extends APIResource {
|
|
12
|
+
create(params: YourWebhookURLCreateParams, options?: RequestOptions): APIPromise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface YourWebhookURLCreateParams {
|
|
15
|
+
/**
|
|
16
|
+
* Body param
|
|
17
|
+
*/
|
|
18
|
+
business_id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Body param: The latest data at the time of delivery attempt
|
|
21
|
+
*/
|
|
22
|
+
data: YourWebhookURLCreateParams.Payment | YourWebhookURLCreateParams.Subscription | YourWebhookURLCreateParams.Refund | YourWebhookURLCreateParams.Dispute | YourWebhookURLCreateParams.LicenseKey | YourWebhookURLCreateParams.CreditLedgerEntry | YourWebhookURLCreateParams.CreditBalanceLow;
|
|
23
|
+
/**
|
|
24
|
+
* Body param: The timestamp of when the event occurred (not necessarily the same
|
|
25
|
+
* of when it was delivered)
|
|
26
|
+
*/
|
|
27
|
+
timestamp: string;
|
|
28
|
+
/**
|
|
29
|
+
* Body param: Event types for Dodo events
|
|
30
|
+
*/
|
|
31
|
+
type: WebhookEventsAPI.WebhookEventType;
|
|
32
|
+
/**
|
|
33
|
+
* Header param: Unique identifier for the webhook
|
|
34
|
+
*/
|
|
35
|
+
'webhook-id': string;
|
|
36
|
+
/**
|
|
37
|
+
* Header param: Signature of the Webhook
|
|
38
|
+
*/
|
|
39
|
+
'webhook-signature': string;
|
|
40
|
+
/**
|
|
41
|
+
* Header param: Unix timestamp when the webhook was sent
|
|
42
|
+
*/
|
|
43
|
+
'webhook-timestamp': string;
|
|
44
|
+
}
|
|
45
|
+
export declare namespace YourWebhookURLCreateParams {
|
|
46
|
+
interface Payment extends PaymentsAPI.Payment {
|
|
47
|
+
payload_type: 'Payment';
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Response struct representing subscription details
|
|
51
|
+
*/
|
|
52
|
+
interface Subscription extends SubscriptionsAPI.Subscription {
|
|
53
|
+
payload_type: 'Subscription';
|
|
54
|
+
}
|
|
55
|
+
interface Refund extends RefundsAPI.Refund {
|
|
56
|
+
payload_type: 'Refund';
|
|
57
|
+
}
|
|
58
|
+
interface Dispute extends DisputesAPI.GetDispute {
|
|
59
|
+
payload_type: 'Dispute';
|
|
60
|
+
}
|
|
61
|
+
interface LicenseKey extends LicenseKeysAPI.LicenseKey {
|
|
62
|
+
payload_type: 'LicenseKey';
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Response for a ledger entry
|
|
66
|
+
*/
|
|
67
|
+
interface CreditLedgerEntry extends BalancesAPI.CreditLedgerEntry {
|
|
68
|
+
payload_type: 'CreditLedgerEntry';
|
|
69
|
+
}
|
|
70
|
+
interface CreditBalanceLow {
|
|
71
|
+
available_balance: string;
|
|
72
|
+
credit_entitlement_id: string;
|
|
73
|
+
credit_entitlement_name: string;
|
|
74
|
+
customer_id: string;
|
|
75
|
+
payload_type: 'CreditBalanceLow';
|
|
76
|
+
subscription_credits_amount: string;
|
|
77
|
+
subscription_id: string;
|
|
78
|
+
threshold_amount: string;
|
|
79
|
+
threshold_percent: number;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export declare namespace YourWebhookURL {
|
|
83
|
+
export { type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=your-webhook-url.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"your-webhook-url.d.mts","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,cAAc;OACnB,KAAK,WAAW;OAChB,KAAK,UAAU;OACf,KAAK,gBAAgB;OACrB,KAAK,gBAAgB;OACrB,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C,MAAM,CAAC,MAAM,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAqBvF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EACA,0BAA0B,CAAC,OAAO,GAClC,0BAA0B,CAAC,YAAY,GACvC,0BAA0B,CAAC,MAAM,GACjC,0BAA0B,CAAC,OAAO,GAClC,0BAA0B,CAAC,UAAU,GACrC,0BAA0B,CAAC,iBAAiB,GAC5C,0BAA0B,CAAC,gBAAgB,CAAC;IAEhD;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IAExC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,yBAAiB,0BAA0B,CAAC;IAC1C,UAAiB,OAAQ,SAAQ,WAAW,CAAC,OAAO;QAClD,YAAY,EAAE,SAAS,CAAC;KACzB;IAED;;OAEG;IACH,UAAiB,YAAa,SAAQ,gBAAgB,CAAC,YAAY;QACjE,YAAY,EAAE,cAAc,CAAC;KAC9B;IAED,UAAiB,MAAO,SAAQ,UAAU,CAAC,MAAM;QAC/C,YAAY,EAAE,QAAQ,CAAC;KACxB;IAED,UAAiB,OAAQ,SAAQ,WAAW,CAAC,UAAU;QACrD,YAAY,EAAE,SAAS,CAAC;KACzB;IAED,UAAiB,UAAW,SAAQ,cAAc,CAAC,UAAU;QAC3D,YAAY,EAAE,YAAY,CAAC;KAC5B;IAED;;OAEG;IACH,UAAiB,iBAAkB,SAAQ,WAAW,CAAC,iBAAiB;QACtE,YAAY,EAAE,mBAAmB,CAAC;KACnC;IAED,UAAiB,gBAAgB;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAE1B,qBAAqB,EAAE,MAAM,CAAC;QAE9B,uBAAuB,EAAE,MAAM,CAAC;QAEhC,WAAW,EAAE,MAAM,CAAC;QAEpB,YAAY,EAAE,kBAAkB,CAAC;QAEjC,2BAA2B,EAAE,MAAM,CAAC;QAEpC,eAAe,EAAE,MAAM,CAAC;QAExB,gBAAgB,EAAE,MAAM,CAAC;QAEzB,iBAAiB,EAAE,MAAM,CAAC;KAC3B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as DisputesAPI from "./disputes.js";
|
|
3
|
+
import * as LicenseKeysAPI from "./license-keys.js";
|
|
4
|
+
import * as PaymentsAPI from "./payments.js";
|
|
5
|
+
import * as RefundsAPI from "./refunds.js";
|
|
6
|
+
import * as SubscriptionsAPI from "./subscriptions.js";
|
|
7
|
+
import * as WebhookEventsAPI from "./webhook-events.js";
|
|
8
|
+
import * as BalancesAPI from "./credit-entitlements/balances.js";
|
|
9
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
10
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
11
|
+
export declare class YourWebhookURL extends APIResource {
|
|
12
|
+
create(params: YourWebhookURLCreateParams, options?: RequestOptions): APIPromise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface YourWebhookURLCreateParams {
|
|
15
|
+
/**
|
|
16
|
+
* Body param
|
|
17
|
+
*/
|
|
18
|
+
business_id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Body param: The latest data at the time of delivery attempt
|
|
21
|
+
*/
|
|
22
|
+
data: YourWebhookURLCreateParams.Payment | YourWebhookURLCreateParams.Subscription | YourWebhookURLCreateParams.Refund | YourWebhookURLCreateParams.Dispute | YourWebhookURLCreateParams.LicenseKey | YourWebhookURLCreateParams.CreditLedgerEntry | YourWebhookURLCreateParams.CreditBalanceLow;
|
|
23
|
+
/**
|
|
24
|
+
* Body param: The timestamp of when the event occurred (not necessarily the same
|
|
25
|
+
* of when it was delivered)
|
|
26
|
+
*/
|
|
27
|
+
timestamp: string;
|
|
28
|
+
/**
|
|
29
|
+
* Body param: Event types for Dodo events
|
|
30
|
+
*/
|
|
31
|
+
type: WebhookEventsAPI.WebhookEventType;
|
|
32
|
+
/**
|
|
33
|
+
* Header param: Unique identifier for the webhook
|
|
34
|
+
*/
|
|
35
|
+
'webhook-id': string;
|
|
36
|
+
/**
|
|
37
|
+
* Header param: Signature of the Webhook
|
|
38
|
+
*/
|
|
39
|
+
'webhook-signature': string;
|
|
40
|
+
/**
|
|
41
|
+
* Header param: Unix timestamp when the webhook was sent
|
|
42
|
+
*/
|
|
43
|
+
'webhook-timestamp': string;
|
|
44
|
+
}
|
|
45
|
+
export declare namespace YourWebhookURLCreateParams {
|
|
46
|
+
interface Payment extends PaymentsAPI.Payment {
|
|
47
|
+
payload_type: 'Payment';
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Response struct representing subscription details
|
|
51
|
+
*/
|
|
52
|
+
interface Subscription extends SubscriptionsAPI.Subscription {
|
|
53
|
+
payload_type: 'Subscription';
|
|
54
|
+
}
|
|
55
|
+
interface Refund extends RefundsAPI.Refund {
|
|
56
|
+
payload_type: 'Refund';
|
|
57
|
+
}
|
|
58
|
+
interface Dispute extends DisputesAPI.GetDispute {
|
|
59
|
+
payload_type: 'Dispute';
|
|
60
|
+
}
|
|
61
|
+
interface LicenseKey extends LicenseKeysAPI.LicenseKey {
|
|
62
|
+
payload_type: 'LicenseKey';
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Response for a ledger entry
|
|
66
|
+
*/
|
|
67
|
+
interface CreditLedgerEntry extends BalancesAPI.CreditLedgerEntry {
|
|
68
|
+
payload_type: 'CreditLedgerEntry';
|
|
69
|
+
}
|
|
70
|
+
interface CreditBalanceLow {
|
|
71
|
+
available_balance: string;
|
|
72
|
+
credit_entitlement_id: string;
|
|
73
|
+
credit_entitlement_name: string;
|
|
74
|
+
customer_id: string;
|
|
75
|
+
payload_type: 'CreditBalanceLow';
|
|
76
|
+
subscription_credits_amount: string;
|
|
77
|
+
subscription_id: string;
|
|
78
|
+
threshold_amount: string;
|
|
79
|
+
threshold_percent: number;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export declare namespace YourWebhookURL {
|
|
83
|
+
export { type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=your-webhook-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"your-webhook-url.d.ts","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,c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QAC3D,YAAY,EAAE,YAAY,CAAC;KAC5B;IAED;;OAEG;IACH,UAAiB,iBAAkB,SAAQ,WAAW,CAAC,iBAAiB;QACtE,YAAY,EAAE,mBAAmB,CAAC;KACnC;IAED,UAAiB,gBAAgB;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAE1B,qBAAqB,EAAE,MAAM,CAAC;QAE9B,uBAAuB,EAAE,MAAM,CAAC;QAEhC,WAAW,EAAE,MAAM,CAAC;QAEpB,YAAY,EAAE,kBAAkB,CAAC;QAEjC,2BAA2B,EAAE,MAAM,CAAC;QAEpC,eAAe,EAAE,MAAM,CAAC;QAExB,gBAAgB,EAAE,MAAM,CAAC;QAEzB,iBAAiB,EAAE,MAAM,CAAC;KAC3B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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.YourWebhookURL = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
class YourWebhookURL extends resource_1.APIResource {
|
|
8
|
+
create(params, options) {
|
|
9
|
+
const { 'webhook-id': webhookID, 'webhook-signature': webhookSignature, 'webhook-timestamp': webhookTimestamp, ...body } = params;
|
|
10
|
+
return this._client.post('/your-webhook-url', {
|
|
11
|
+
body,
|
|
12
|
+
...options,
|
|
13
|
+
headers: (0, headers_1.buildHeaders)([
|
|
14
|
+
{
|
|
15
|
+
Accept: '*/*',
|
|
16
|
+
'webhook-id': webhookID,
|
|
17
|
+
'webhook-signature': webhookSignature,
|
|
18
|
+
'webhook-timestamp': webhookTimestamp,
|
|
19
|
+
},
|
|
20
|
+
options?.headers,
|
|
21
|
+
]),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.YourWebhookURL = YourWebhookURL;
|
|
26
|
+
//# sourceMappingURL=your-webhook-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"your-webhook-url.js","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAS/C,oDAAmD;AAGnD,MAAa,cAAe,SAAQ,sBAAW;IAC7C,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EACJ,YAAY,EAAE,SAAS,EACvB,mBAAmB,EAAE,gBAAgB,EACrC,mBAAmB,EAAE,gBAAgB,EACrC,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC5C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,YAAY,EAAE,SAAS;oBACvB,mBAAmB,EAAE,gBAAgB;oBACrC,mBAAmB,EAAE,gBAAgB;iBACtC;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,wCAsBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
export class YourWebhookURL extends APIResource {
|
|
5
|
+
create(params, options) {
|
|
6
|
+
const { 'webhook-id': webhookID, 'webhook-signature': webhookSignature, 'webhook-timestamp': webhookTimestamp, ...body } = params;
|
|
7
|
+
return this._client.post('/your-webhook-url', {
|
|
8
|
+
body,
|
|
9
|
+
...options,
|
|
10
|
+
headers: buildHeaders([
|
|
11
|
+
{
|
|
12
|
+
Accept: '*/*',
|
|
13
|
+
'webhook-id': webhookID,
|
|
14
|
+
'webhook-signature': webhookSignature,
|
|
15
|
+
'webhook-timestamp': webhookTimestamp,
|
|
16
|
+
},
|
|
17
|
+
options?.headers,
|
|
18
|
+
]),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=your-webhook-url.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"your-webhook-url.mjs","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OASf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EACJ,YAAY,EAAE,SAAS,EACvB,mBAAmB,EAAE,gBAAgB,EACrC,mBAAmB,EAAE,gBAAgB,EACrC,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC5C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,YAAY,EAAE,SAAS;oBACvB,mBAAmB,EAAE,gBAAgB;oBACrC,mBAAmB,EAAE,gBAAgB;iBACtC;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -194,6 +194,7 @@ import {
|
|
|
194
194
|
UsageEvents,
|
|
195
195
|
} from './resources/usage-events';
|
|
196
196
|
import { WebhookEventType, WebhookEvents, WebhookPayload } from './resources/webhook-events';
|
|
197
|
+
import { YourWebhookURL, YourWebhookURLCreateParams } from './resources/your-webhook-url';
|
|
197
198
|
import {
|
|
198
199
|
CbbOverageBehavior,
|
|
199
200
|
CreditEntitlement,
|
|
@@ -215,6 +216,19 @@ import {
|
|
|
215
216
|
CustomersDefaultPageNumberPagination,
|
|
216
217
|
} from './resources/customers/customers';
|
|
217
218
|
import { Invoices } from './resources/invoices/invoices';
|
|
219
|
+
import {
|
|
220
|
+
ProductCollectionCreateParams,
|
|
221
|
+
ProductCollectionCreateResponse,
|
|
222
|
+
ProductCollectionListParams,
|
|
223
|
+
ProductCollectionListResponse,
|
|
224
|
+
ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
225
|
+
ProductCollectionRetrieveResponse,
|
|
226
|
+
ProductCollectionUnarchiveResponse,
|
|
227
|
+
ProductCollectionUpdateImagesParams,
|
|
228
|
+
ProductCollectionUpdateImagesResponse,
|
|
229
|
+
ProductCollectionUpdateParams,
|
|
230
|
+
ProductCollections,
|
|
231
|
+
} from './resources/product-collections/product-collections';
|
|
218
232
|
import {
|
|
219
233
|
AddMeterToPrice,
|
|
220
234
|
AttachCreditEntitlement,
|
|
@@ -1056,6 +1070,8 @@ export class DodoPayments {
|
|
|
1056
1070
|
meters: API.Meters = new API.Meters(this);
|
|
1057
1071
|
balances: API.Balances = new API.Balances(this);
|
|
1058
1072
|
creditEntitlements: API.CreditEntitlements = new API.CreditEntitlements(this);
|
|
1073
|
+
productCollections: API.ProductCollections = new API.ProductCollections(this);
|
|
1074
|
+
yourWebhookURL: API.YourWebhookURL = new API.YourWebhookURL(this);
|
|
1059
1075
|
}
|
|
1060
1076
|
|
|
1061
1077
|
DodoPayments.CheckoutSessions = CheckoutSessions;
|
|
@@ -1080,6 +1096,8 @@ DodoPayments.UsageEvents = UsageEvents;
|
|
|
1080
1096
|
DodoPayments.Meters = Meters;
|
|
1081
1097
|
DodoPayments.Balances = Balances;
|
|
1082
1098
|
DodoPayments.CreditEntitlements = CreditEntitlements;
|
|
1099
|
+
DodoPayments.ProductCollections = ProductCollections;
|
|
1100
|
+
DodoPayments.YourWebhookURL = YourWebhookURL;
|
|
1083
1101
|
|
|
1084
1102
|
export declare namespace DodoPayments {
|
|
1085
1103
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1377,4 +1395,20 @@ export declare namespace DodoPayments {
|
|
|
1377
1395
|
type CreditEntitlementUpdateParams as CreditEntitlementUpdateParams,
|
|
1378
1396
|
type CreditEntitlementListParams as CreditEntitlementListParams,
|
|
1379
1397
|
};
|
|
1398
|
+
|
|
1399
|
+
export {
|
|
1400
|
+
ProductCollections as ProductCollections,
|
|
1401
|
+
type ProductCollectionCreateResponse as ProductCollectionCreateResponse,
|
|
1402
|
+
type ProductCollectionRetrieveResponse as ProductCollectionRetrieveResponse,
|
|
1403
|
+
type ProductCollectionListResponse as ProductCollectionListResponse,
|
|
1404
|
+
type ProductCollectionUnarchiveResponse as ProductCollectionUnarchiveResponse,
|
|
1405
|
+
type ProductCollectionUpdateImagesResponse as ProductCollectionUpdateImagesResponse,
|
|
1406
|
+
type ProductCollectionListResponsesDefaultPageNumberPagination as ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
1407
|
+
type ProductCollectionCreateParams as ProductCollectionCreateParams,
|
|
1408
|
+
type ProductCollectionUpdateParams as ProductCollectionUpdateParams,
|
|
1409
|
+
type ProductCollectionListParams as ProductCollectionListParams,
|
|
1410
|
+
type ProductCollectionUpdateImagesParams as ProductCollectionUpdateImagesParams,
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1413
|
+
export { YourWebhookURL as YourWebhookURL, type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
1380
1414
|
}
|
|
@@ -75,9 +75,9 @@ export interface CheckoutSessionCustomization {
|
|
|
75
75
|
/**
|
|
76
76
|
* Theme of the page (determines which mode - light/dark/system - to use)
|
|
77
77
|
*
|
|
78
|
-
*
|
|
78
|
+
* If not provided, uses the business-configured theme from business_themes table.
|
|
79
79
|
*/
|
|
80
|
-
theme?: 'dark' | 'light' | 'system';
|
|
80
|
+
theme?: 'dark' | 'light' | 'system' | null;
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Optional custom theme configuration with colors for light and dark modes
|
|
@@ -169,6 +169,12 @@ export interface CheckoutSessionRequest {
|
|
|
169
169
|
*/
|
|
170
170
|
billing_currency?: MiscAPI.Currency | null;
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* The URL to redirect the customer if they cancel or go back from the checkout. If
|
|
174
|
+
* not provided, the back button will not be displayed.
|
|
175
|
+
*/
|
|
176
|
+
cancel_url?: string | null;
|
|
177
|
+
|
|
172
178
|
/**
|
|
173
179
|
* If confirm is true, all the details will be finalized. If required data is
|
|
174
180
|
* missing, an API error is thrown.
|
|
@@ -783,6 +789,12 @@ export interface CheckoutSessionCreateParams {
|
|
|
783
789
|
*/
|
|
784
790
|
billing_currency?: MiscAPI.Currency | null;
|
|
785
791
|
|
|
792
|
+
/**
|
|
793
|
+
* The URL to redirect the customer if they cancel or go back from the checkout. If
|
|
794
|
+
* not provided, the back button will not be displayed.
|
|
795
|
+
*/
|
|
796
|
+
cancel_url?: string | null;
|
|
797
|
+
|
|
786
798
|
/**
|
|
787
799
|
* If confirm is true, all the details will be finalized. If required data is
|
|
788
800
|
* missing, an API error is thrown.
|
|
@@ -883,6 +895,12 @@ export interface CheckoutSessionPreviewParams {
|
|
|
883
895
|
*/
|
|
884
896
|
billing_currency?: MiscAPI.Currency | null;
|
|
885
897
|
|
|
898
|
+
/**
|
|
899
|
+
* The URL to redirect the customer if they cancel or go back from the checkout. If
|
|
900
|
+
* not provided, the back button will not be displayed.
|
|
901
|
+
*/
|
|
902
|
+
cancel_url?: string | null;
|
|
903
|
+
|
|
886
904
|
/**
|
|
887
905
|
* If confirm is true, all the details will be finalized. If required data is
|
|
888
906
|
* missing, an API error is thrown.
|
|
@@ -12,15 +12,21 @@ export class CustomerPortal extends APIResource {
|
|
|
12
12
|
params: CustomerPortalCreateParams | null | undefined = {},
|
|
13
13
|
options?: RequestOptions,
|
|
14
14
|
): APIPromise<CustomersAPI.CustomerPortalSession> {
|
|
15
|
-
const { send_email } = params ?? {};
|
|
15
|
+
const { return_url, send_email } = params ?? {};
|
|
16
16
|
return this._client.post(path`/customers/${customerID}/customer-portal/session`, {
|
|
17
|
-
query: { send_email },
|
|
17
|
+
query: { return_url, send_email },
|
|
18
18
|
...options,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface CustomerPortalCreateParams {
|
|
24
|
+
/**
|
|
25
|
+
* Optional return URL for this session. Overrides the business-level default. This
|
|
26
|
+
* URL will be shown as a "Return to {business}" back button in the portal.
|
|
27
|
+
*/
|
|
28
|
+
return_url?: string;
|
|
29
|
+
|
|
24
30
|
/**
|
|
25
31
|
* If true, will send link to user.
|
|
26
32
|
*/
|
|
@@ -155,6 +155,11 @@ export namespace CustomerRetrievePaymentMethodsResponse {
|
|
|
155
155
|
|
|
156
156
|
last_used_at?: string | null;
|
|
157
157
|
|
|
158
|
+
/**
|
|
159
|
+
* All supported payment method types (from Hyperswitch).
|
|
160
|
+
*
|
|
161
|
+
* Used for disabled-payment-methods filtering and validation.
|
|
162
|
+
*/
|
|
158
163
|
payment_method_type?: PaymentsAPI.PaymentMethodTypes | null;
|
|
159
164
|
|
|
160
165
|
recurring_enabled?: boolean | null;
|
package/src/resources/index.ts
CHANGED
|
@@ -150,6 +150,19 @@ export {
|
|
|
150
150
|
type PayoutListParams,
|
|
151
151
|
type PayoutListResponsesDefaultPageNumberPagination,
|
|
152
152
|
} from './payouts';
|
|
153
|
+
export {
|
|
154
|
+
ProductCollections,
|
|
155
|
+
type ProductCollectionCreateResponse,
|
|
156
|
+
type ProductCollectionRetrieveResponse,
|
|
157
|
+
type ProductCollectionListResponse,
|
|
158
|
+
type ProductCollectionUnarchiveResponse,
|
|
159
|
+
type ProductCollectionUpdateImagesResponse,
|
|
160
|
+
type ProductCollectionCreateParams,
|
|
161
|
+
type ProductCollectionUpdateParams,
|
|
162
|
+
type ProductCollectionListParams,
|
|
163
|
+
type ProductCollectionUpdateImagesParams,
|
|
164
|
+
type ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
165
|
+
} from './product-collections/product-collections';
|
|
153
166
|
export {
|
|
154
167
|
Products,
|
|
155
168
|
type AddMeterToPrice,
|
|
@@ -257,3 +270,4 @@ export {
|
|
|
257
270
|
type WebhookListParams,
|
|
258
271
|
type WebhookDetailsCursorPagePagination,
|
|
259
272
|
} from './webhooks/webhooks';
|
|
273
|
+
export { YourWebhookURL, type YourWebhookURLCreateParams } from './your-webhook-url';
|
|
@@ -15,6 +15,14 @@ export class Payments extends APIResource {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
retrievePayout(payoutID: string, options?: RequestOptions): APIPromise<Response> {
|
|
19
|
+
return this._client.get(path`/invoices/payouts/${payoutID}`, {
|
|
20
|
+
...options,
|
|
21
|
+
headers: buildHeaders([{ Accept: 'application/pdf' }, options?.headers]),
|
|
22
|
+
__binaryResponse: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
retrieveRefund(refundID: string, options?: RequestOptions): APIPromise<Response> {
|
|
19
27
|
return this._client.get(path`/invoices/refunds/${refundID}`, {
|
|
20
28
|
...options,
|
|
@@ -364,6 +364,11 @@ export interface Payment {
|
|
|
364
364
|
updated_at?: string | null;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
/**
|
|
368
|
+
* All supported payment method types (from Hyperswitch).
|
|
369
|
+
*
|
|
370
|
+
* Used for disabled-payment-methods filtering and validation.
|
|
371
|
+
*/
|
|
367
372
|
export type PaymentMethodTypes =
|
|
368
373
|
| 'ach'
|
|
369
374
|
| 'affirm'
|
|
@@ -0,0 +1,174 @@
|
|
|
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 ItemsAPI from './items';
|
|
7
|
+
import { ItemCreateParams, ItemCreateResponse, ItemDeleteParams, ItemUpdateParams, Items } from './items';
|
|
8
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
9
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
10
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
11
|
+
import { path } from '../../../internal/utils/path';
|
|
12
|
+
|
|
13
|
+
export class Groups extends APIResource {
|
|
14
|
+
items: ItemsAPI.Items = new ItemsAPI.Items(this._client);
|
|
15
|
+
|
|
16
|
+
create(id: string, body: GroupCreateParams, options?: RequestOptions): APIPromise<GroupCreateResponse> {
|
|
17
|
+
return this._client.post(path`/product-collections/${id}/groups`, { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
update(groupID: string, params: GroupUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
21
|
+
const { id, ...body } = params;
|
|
22
|
+
return this._client.patch(path`/product-collections/${id}/groups/${groupID}`, {
|
|
23
|
+
body,
|
|
24
|
+
...options,
|
|
25
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
delete(groupID: string, params: GroupDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
30
|
+
const { id } = params;
|
|
31
|
+
return this._client.delete(path`/product-collections/${id}/groups/${groupID}`, {
|
|
32
|
+
...options,
|
|
33
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface GroupCreateResponse {
|
|
39
|
+
group_id: string;
|
|
40
|
+
|
|
41
|
+
products: Array<GroupCreateResponse.Product>;
|
|
42
|
+
|
|
43
|
+
status: boolean;
|
|
44
|
+
|
|
45
|
+
group_name?: string | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export namespace GroupCreateResponse {
|
|
49
|
+
export interface Product {
|
|
50
|
+
id: string;
|
|
51
|
+
|
|
52
|
+
addons_count: number;
|
|
53
|
+
|
|
54
|
+
files_count: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Whether this product has any credit entitlements attached
|
|
58
|
+
*/
|
|
59
|
+
has_credit_entitlements: boolean;
|
|
60
|
+
|
|
61
|
+
is_recurring: boolean;
|
|
62
|
+
|
|
63
|
+
license_key_enabled: boolean;
|
|
64
|
+
|
|
65
|
+
meters_count: number;
|
|
66
|
+
|
|
67
|
+
product_id: string;
|
|
68
|
+
|
|
69
|
+
status: boolean;
|
|
70
|
+
|
|
71
|
+
currency?: MiscAPI.Currency | null;
|
|
72
|
+
|
|
73
|
+
description?: string | null;
|
|
74
|
+
|
|
75
|
+
name?: string | null;
|
|
76
|
+
|
|
77
|
+
price?: number | null;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* One-time price details.
|
|
81
|
+
*/
|
|
82
|
+
price_detail?: ProductsAPI.Price | null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Represents the different categories of taxation applicable to various products
|
|
86
|
+
* and services.
|
|
87
|
+
*/
|
|
88
|
+
tax_category?: MiscAPI.TaxCategory | null;
|
|
89
|
+
|
|
90
|
+
tax_inclusive?: boolean | null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface GroupCreateParams {
|
|
95
|
+
/**
|
|
96
|
+
* Products in this group
|
|
97
|
+
*/
|
|
98
|
+
products: Array<GroupCreateParams.Product>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Optional group name. Multiple groups can have null names, but named groups must
|
|
102
|
+
* be unique per collection
|
|
103
|
+
*/
|
|
104
|
+
group_name?: string | null;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Status of the group (defaults to true if not provided)
|
|
108
|
+
*/
|
|
109
|
+
status?: boolean | null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export namespace GroupCreateParams {
|
|
113
|
+
export interface Product {
|
|
114
|
+
/**
|
|
115
|
+
* Product ID to include in the group
|
|
116
|
+
*/
|
|
117
|
+
product_id: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Status of the product in this group (defaults to true if not provided)
|
|
121
|
+
*/
|
|
122
|
+
status?: boolean | null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface GroupUpdateParams {
|
|
127
|
+
/**
|
|
128
|
+
* Path param: Product Collection Id
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Body param: Optional group name update: Some(Some(name)) = set name, Some(None)
|
|
134
|
+
* = clear name, None = no change
|
|
135
|
+
*/
|
|
136
|
+
group_name?: string | null;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Body param: Optional new order for products in this group (array of
|
|
140
|
+
* product_collection_group_pdts UUIDs)
|
|
141
|
+
*/
|
|
142
|
+
product_order?: Array<string> | null;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Body param: Optional status update
|
|
146
|
+
*/
|
|
147
|
+
status?: boolean | null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface GroupDeleteParams {
|
|
151
|
+
/**
|
|
152
|
+
* Product Collection Id
|
|
153
|
+
*/
|
|
154
|
+
id: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
Groups.Items = Items;
|
|
158
|
+
|
|
159
|
+
export declare namespace Groups {
|
|
160
|
+
export {
|
|
161
|
+
type GroupCreateResponse as GroupCreateResponse,
|
|
162
|
+
type GroupCreateParams as GroupCreateParams,
|
|
163
|
+
type GroupUpdateParams as GroupUpdateParams,
|
|
164
|
+
type GroupDeleteParams as GroupDeleteParams,
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export {
|
|
168
|
+
Items as Items,
|
|
169
|
+
type ItemCreateResponse as ItemCreateResponse,
|
|
170
|
+
type ItemCreateParams as ItemCreateParams,
|
|
171
|
+
type ItemUpdateParams as ItemUpdateParams,
|
|
172
|
+
type ItemDeleteParams as ItemDeleteParams,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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';
|
|
10
|
+
export {
|
|
11
|
+
Items,
|
|
12
|
+
type ItemCreateResponse,
|
|
13
|
+
type ItemCreateParams,
|
|
14
|
+
type ItemUpdateParams,
|
|
15
|
+
type ItemDeleteParams,
|
|
16
|
+
} from './items';
|