dodopayments 2.32.1 → 2.33.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 +25 -0
- package/bin/migration-config.json +17 -17
- package/client.d.mts +15 -15
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -15
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/addons.d.mts +4 -4
- package/resources/addons.d.mts.map +1 -1
- package/resources/addons.d.ts +4 -4
- package/resources/addons.d.ts.map +1 -1
- package/resources/addons.js +6 -6
- package/resources/addons.js.map +1 -1
- package/resources/addons.mjs +6 -6
- package/resources/addons.mjs.map +1 -1
- package/resources/balances.d.mts +2 -2
- package/resources/balances.d.mts.map +1 -1
- package/resources/balances.d.ts +2 -2
- package/resources/balances.d.ts.map +1 -1
- package/resources/brands.d.mts +1 -1
- package/resources/brands.d.mts.map +1 -1
- package/resources/brands.d.ts +1 -1
- package/resources/brands.d.ts.map +1 -1
- package/resources/brands.js +3 -3
- package/resources/brands.js.map +1 -1
- package/resources/brands.mjs +3 -3
- package/resources/brands.mjs.map +1 -1
- package/resources/credit-entitlements/balances.d.mts +69 -69
- package/resources/credit-entitlements/balances.d.mts.map +1 -1
- package/resources/credit-entitlements/balances.d.ts +69 -69
- package/resources/credit-entitlements/balances.d.ts.map +1 -1
- package/resources/credit-entitlements/balances.js +41 -41
- package/resources/credit-entitlements/balances.js.map +1 -1
- package/resources/credit-entitlements/balances.mjs +41 -41
- package/resources/credit-entitlements/balances.mjs.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.mts +38 -38
- package/resources/credit-entitlements/credit-entitlements.d.mts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.d.ts +38 -38
- package/resources/credit-entitlements/credit-entitlements.d.ts.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.js +40 -40
- package/resources/credit-entitlements/credit-entitlements.js.map +1 -1
- package/resources/credit-entitlements/credit-entitlements.mjs +40 -40
- package/resources/credit-entitlements/credit-entitlements.mjs.map +1 -1
- package/resources/credit-entitlements/index.d.mts +2 -2
- package/resources/credit-entitlements/index.d.mts.map +1 -1
- package/resources/credit-entitlements/index.d.ts +2 -2
- package/resources/credit-entitlements/index.d.ts.map +1 -1
- package/resources/customers/customers.d.mts +23 -23
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +23 -23
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +16 -16
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +16 -16
- 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/wallets/index.d.mts +1 -1
- package/resources/customers/wallets/index.d.mts.map +1 -1
- package/resources/customers/wallets/index.d.ts +1 -1
- package/resources/customers/wallets/index.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.mts +8 -8
- package/resources/customers/wallets/ledger-entries.d.mts.map +1 -1
- package/resources/customers/wallets/ledger-entries.d.ts +8 -8
- package/resources/customers/wallets/ledger-entries.d.ts.map +1 -1
- package/resources/customers/wallets/ledger-entries.js +3 -3
- package/resources/customers/wallets/ledger-entries.js.map +1 -1
- package/resources/customers/wallets/ledger-entries.mjs +3 -3
- package/resources/customers/wallets/ledger-entries.mjs.map +1 -1
- package/resources/customers/wallets/wallets.d.mts +1 -1
- package/resources/customers/wallets/wallets.d.mts.map +1 -1
- package/resources/customers/wallets/wallets.d.ts +1 -1
- package/resources/customers/wallets/wallets.d.ts.map +1 -1
- package/resources/discounts.d.mts +36 -47
- package/resources/discounts.d.mts.map +1 -1
- package/resources/discounts.d.ts +36 -47
- package/resources/discounts.d.ts.map +1 -1
- package/resources/discounts.js +15 -15
- package/resources/discounts.js.map +1 -1
- package/resources/discounts.mjs +15 -15
- package/resources/discounts.mjs.map +1 -1
- package/resources/disputes.d.mts +1 -1
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +1 -1
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +3 -3
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +3 -3
- package/resources/disputes.mjs.map +1 -1
- package/resources/entitlements/entitlements.d.mts +15 -15
- package/resources/entitlements/entitlements.d.mts.map +1 -1
- package/resources/entitlements/entitlements.d.ts +15 -15
- package/resources/entitlements/entitlements.d.ts.map +1 -1
- package/resources/entitlements/entitlements.js +15 -15
- package/resources/entitlements/entitlements.js.map +1 -1
- package/resources/entitlements/entitlements.mjs +15 -15
- package/resources/entitlements/entitlements.mjs.map +1 -1
- package/resources/entitlements/files.d.mts +4 -4
- package/resources/entitlements/files.d.mts.map +1 -1
- package/resources/entitlements/files.d.ts +4 -4
- package/resources/entitlements/files.d.ts.map +1 -1
- package/resources/entitlements/files.js +6 -6
- package/resources/entitlements/files.js.map +1 -1
- package/resources/entitlements/files.mjs +6 -6
- package/resources/entitlements/files.mjs.map +1 -1
- package/resources/entitlements/index.d.mts +1 -1
- package/resources/entitlements/index.d.mts.map +1 -1
- package/resources/entitlements/index.d.ts +1 -1
- package/resources/entitlements/index.d.ts.map +1 -1
- package/resources/index.d.mts +15 -15
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +15 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/invoices/payments.d.mts +1 -1
- package/resources/invoices/payments.d.ts +1 -1
- package/resources/invoices/payments.js +4 -4
- package/resources/invoices/payments.mjs +4 -4
- package/resources/license-key-instances.d.mts +14 -14
- package/resources/license-key-instances.d.mts.map +1 -1
- package/resources/license-key-instances.d.ts +14 -14
- package/resources/license-key-instances.d.ts.map +1 -1
- package/resources/license-key-instances.js +12 -12
- package/resources/license-key-instances.js.map +1 -1
- package/resources/license-key-instances.mjs +12 -12
- package/resources/license-key-instances.mjs.map +1 -1
- package/resources/license-keys.d.mts +38 -38
- package/resources/license-keys.d.mts.map +1 -1
- package/resources/license-keys.d.ts +38 -38
- package/resources/license-keys.d.ts.map +1 -1
- package/resources/license-keys.js +16 -16
- package/resources/license-keys.js.map +1 -1
- package/resources/license-keys.mjs +16 -16
- package/resources/license-keys.mjs.map +1 -1
- package/resources/meters.d.mts +8 -8
- package/resources/meters.d.mts.map +1 -1
- package/resources/meters.d.ts +8 -8
- package/resources/meters.d.ts.map +1 -1
- package/resources/meters.js +3 -3
- package/resources/meters.js.map +1 -1
- package/resources/meters.mjs +3 -3
- package/resources/meters.mjs.map +1 -1
- package/resources/payments.d.mts +38 -32
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +38 -32
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +6 -6
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +6 -6
- package/resources/payments.mjs.map +1 -1
- package/resources/product-collections/groups/groups.d.mts +9 -9
- package/resources/product-collections/groups/groups.d.mts.map +1 -1
- package/resources/product-collections/groups/groups.d.ts +9 -9
- package/resources/product-collections/groups/groups.d.ts.map +1 -1
- package/resources/product-collections/groups/groups.js +7 -7
- package/resources/product-collections/groups/groups.js.map +1 -1
- package/resources/product-collections/groups/groups.mjs +7 -7
- package/resources/product-collections/groups/groups.mjs.map +1 -1
- package/resources/product-collections/groups/index.d.mts +2 -2
- package/resources/product-collections/groups/index.d.ts +2 -2
- package/resources/product-collections/groups/items.d.mts +12 -12
- package/resources/product-collections/groups/items.d.mts.map +1 -1
- package/resources/product-collections/groups/items.d.ts +12 -12
- package/resources/product-collections/groups/items.d.ts.map +1 -1
- package/resources/product-collections/groups/items.js +7 -7
- package/resources/product-collections/groups/items.js.map +1 -1
- package/resources/product-collections/groups/items.mjs +7 -7
- package/resources/product-collections/groups/items.mjs.map +1 -1
- package/resources/product-collections/index.d.mts +2 -2
- package/resources/product-collections/index.d.mts.map +1 -1
- package/resources/product-collections/index.d.ts +2 -2
- package/resources/product-collections/index.d.ts.map +1 -1
- package/resources/product-collections/product-collections.d.mts +86 -11
- package/resources/product-collections/product-collections.d.mts.map +1 -1
- package/resources/product-collections/product-collections.d.ts +86 -11
- package/resources/product-collections/product-collections.d.ts.map +1 -1
- package/resources/product-collections/product-collections.js +11 -11
- package/resources/product-collections/product-collections.js.map +1 -1
- package/resources/product-collections/product-collections.mjs +11 -11
- package/resources/product-collections/product-collections.mjs.map +1 -1
- package/resources/products/index.d.mts +2 -2
- package/resources/products/index.d.mts.map +1 -1
- package/resources/products/index.d.ts +2 -2
- package/resources/products/index.d.ts.map +1 -1
- package/resources/products/products.d.mts +21 -21
- package/resources/products/products.d.mts.map +1 -1
- package/resources/products/products.d.ts +21 -21
- package/resources/products/products.d.ts.map +1 -1
- package/resources/products/products.js +6 -6
- package/resources/products/products.js.map +1 -1
- package/resources/products/products.mjs +6 -6
- package/resources/products/products.mjs.map +1 -1
- package/resources/products/short-links.d.mts +11 -11
- package/resources/products/short-links.d.mts.map +1 -1
- package/resources/products/short-links.d.ts +11 -11
- package/resources/products/short-links.d.ts.map +1 -1
- package/resources/products/short-links.js +6 -6
- package/resources/products/short-links.js.map +1 -1
- package/resources/products/short-links.mjs +6 -6
- package/resources/products/short-links.mjs.map +1 -1
- package/resources/refunds.d.mts +24 -24
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +24 -24
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +6 -6
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +6 -6
- package/resources/refunds.mjs.map +1 -1
- package/resources/subscriptions.d.mts +86 -86
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +86 -86
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +23 -23
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +23 -23
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/usage-events.d.mts +61 -61
- package/resources/usage-events.d.mts.map +1 -1
- package/resources/usage-events.d.ts +61 -61
- package/resources/usage-events.d.ts.map +1 -1
- package/resources/usage-events.js +56 -56
- package/resources/usage-events.js.map +1 -1
- package/resources/usage-events.mjs +56 -56
- package/resources/usage-events.mjs.map +1 -1
- package/resources/webhooks/index.d.mts +1 -1
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/webhooks.d.mts +12 -12
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +12 -12
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +15 -15
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +15 -15
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +18 -18
- package/src/resources/addons.ts +13 -13
- package/src/resources/balances.ts +4 -2
- package/src/resources/brands.ts +4 -4
- package/src/resources/credit-entitlements/balances.ts +91 -91
- package/src/resources/credit-entitlements/credit-entitlements.ts +55 -55
- package/src/resources/credit-entitlements/index.ts +3 -3
- package/src/resources/customers/customers.ts +49 -49
- package/src/resources/customers/index.ts +1 -1
- package/src/resources/customers/wallets/index.ts +1 -1
- package/src/resources/customers/wallets/ledger-entries.ts +16 -16
- package/src/resources/customers/wallets/wallets.ts +1 -1
- package/src/resources/discounts.ts +52 -63
- package/src/resources/disputes.ts +4 -4
- package/src/resources/entitlements/entitlements.ts +36 -36
- package/src/resources/entitlements/files.ts +7 -7
- package/src/resources/entitlements/index.ts +1 -1
- package/src/resources/index.ts +18 -18
- package/src/resources/invoices/payments.ts +4 -4
- package/src/resources/license-key-instances.ts +25 -25
- package/src/resources/license-keys.ts +48 -48
- package/src/resources/meters.ts +15 -15
- package/src/resources/payments.ts +66 -59
- package/src/resources/product-collections/groups/groups.ts +16 -16
- package/src/resources/product-collections/groups/index.ts +2 -2
- package/src/resources/product-collections/groups/items.ts +19 -19
- package/src/resources/product-collections/index.ts +2 -2
- package/src/resources/product-collections/product-collections.ts +146 -26
- package/src/resources/products/index.ts +2 -2
- package/src/resources/products/products.ts +33 -33
- package/src/resources/products/short-links.ts +20 -20
- package/src/resources/refunds.ts +36 -36
- package/src/resources/subscriptions.ts +130 -130
- package/src/resources/usage-events.ts +64 -64
- package/src/resources/webhooks/index.ts +1 -1
- package/src/resources/webhooks/webhooks.ts +24 -24
- 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
|
@@ -11,6 +11,26 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
11
11
|
import { path } from '../internal/utils/path';
|
|
12
12
|
|
|
13
13
|
export class LicenseKeyInstances extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Automatically fetches more pages as needed.
|
|
18
|
+
* for await (const licenseKeyInstance of client.licenseKeyInstances.list()) {
|
|
19
|
+
* // ...
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
list(
|
|
24
|
+
query: LicenseKeyInstanceListParams | null | undefined = {},
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): PagePromise<LicenseKeyInstancesDefaultPageNumberPagination, LicenseKeyInstance> {
|
|
27
|
+
return this._client.getAPIList(
|
|
28
|
+
'/license_key_instances',
|
|
29
|
+
DefaultPageNumberPagination<LicenseKeyInstance>,
|
|
30
|
+
{ query, ...options },
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
14
34
|
/**
|
|
15
35
|
* @example
|
|
16
36
|
* ```ts
|
|
@@ -38,26 +58,6 @@ export class LicenseKeyInstances extends APIResource {
|
|
|
38
58
|
): APIPromise<LicenseKeyInstance> {
|
|
39
59
|
return this._client.patch(path`/license_key_instances/${id}`, { body, ...options });
|
|
40
60
|
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @example
|
|
44
|
-
* ```ts
|
|
45
|
-
* // Automatically fetches more pages as needed.
|
|
46
|
-
* for await (const licenseKeyInstance of client.licenseKeyInstances.list()) {
|
|
47
|
-
* // ...
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
list(
|
|
52
|
-
query: LicenseKeyInstanceListParams | null | undefined = {},
|
|
53
|
-
options?: RequestOptions,
|
|
54
|
-
): PagePromise<LicenseKeyInstancesDefaultPageNumberPagination, LicenseKeyInstance> {
|
|
55
|
-
return this._client.getAPIList(
|
|
56
|
-
'/license_key_instances',
|
|
57
|
-
DefaultPageNumberPagination<LicenseKeyInstance>,
|
|
58
|
-
{ query, ...options },
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export type LicenseKeyInstancesDefaultPageNumberPagination = DefaultPageNumberPagination<LicenseKeyInstance>;
|
|
@@ -74,10 +74,6 @@ export interface LicenseKeyInstance {
|
|
|
74
74
|
name: string;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export interface LicenseKeyInstanceUpdateParams {
|
|
78
|
-
name: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
77
|
export interface LicenseKeyInstanceListParams extends DefaultPageNumberPaginationParams {
|
|
82
78
|
/**
|
|
83
79
|
* Filter instances by entitlement grant ID
|
|
@@ -90,11 +86,15 @@ export interface LicenseKeyInstanceListParams extends DefaultPageNumberPaginatio
|
|
|
90
86
|
license_key_id?: string | null;
|
|
91
87
|
}
|
|
92
88
|
|
|
89
|
+
export interface LicenseKeyInstanceUpdateParams {
|
|
90
|
+
name: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
93
|
export declare namespace LicenseKeyInstances {
|
|
94
94
|
export {
|
|
95
95
|
type LicenseKeyInstance as LicenseKeyInstance,
|
|
96
96
|
type LicenseKeyInstancesDefaultPageNumberPagination as LicenseKeyInstancesDefaultPageNumberPagination,
|
|
97
|
-
type LicenseKeyInstanceUpdateParams as LicenseKeyInstanceUpdateParams,
|
|
98
97
|
type LicenseKeyInstanceListParams as LicenseKeyInstanceListParams,
|
|
98
|
+
type LicenseKeyInstanceUpdateParams as LicenseKeyInstanceUpdateParams,
|
|
99
99
|
};
|
|
100
100
|
}
|
|
@@ -12,17 +12,16 @@ import { path } from '../internal/utils/path';
|
|
|
12
12
|
|
|
13
13
|
export class LicenseKeys extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
* @
|
|
16
|
-
* ```ts
|
|
17
|
-
* const licenseKey = await client.licenseKeys.create({
|
|
18
|
-
* customer_id: 'customer_id',
|
|
19
|
-
* key: 'key',
|
|
20
|
-
* product_id: 'product_id',
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
15
|
+
* @deprecated
|
|
23
16
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
list(
|
|
18
|
+
query: LicenseKeyListParams | null | undefined = {},
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): PagePromise<LicenseKeysDefaultPageNumberPagination, LicenseKey> {
|
|
21
|
+
return this._client.getAPIList('/license_keys', DefaultPageNumberPagination<LicenseKey>, {
|
|
22
|
+
query,
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
/**
|
|
@@ -40,16 +39,17 @@ export class LicenseKeys extends APIResource {
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
/**
|
|
43
|
-
* @
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const licenseKey = await client.licenseKeys.create({
|
|
45
|
+
* customer_id: 'customer_id',
|
|
46
|
+
* key: 'key',
|
|
47
|
+
* product_id: 'product_id',
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
44
50
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
options?: RequestOptions,
|
|
48
|
-
): PagePromise<LicenseKeysDefaultPageNumberPagination, LicenseKey> {
|
|
49
|
-
return this._client.getAPIList('/license_keys', DefaultPageNumberPagination<LicenseKey>, {
|
|
50
|
-
query,
|
|
51
|
-
...options,
|
|
52
|
-
});
|
|
51
|
+
create(body: LicenseKeyCreateParams, options?: RequestOptions): APIPromise<LicenseKey> {
|
|
52
|
+
return this._client.post('/license_keys', { body, ...options });
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -126,31 +126,36 @@ export interface LicenseKey {
|
|
|
126
126
|
|
|
127
127
|
export type LicenseKeyStatus = 'active' | 'expired' | 'disabled';
|
|
128
128
|
|
|
129
|
-
export interface
|
|
129
|
+
export interface LicenseKeyListParams extends DefaultPageNumberPaginationParams {
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Filter license keys created on or after this timestamp
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
created_at_gte?: string;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
136
|
+
* Filter license keys created on or before this timestamp
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
created_at_lte?: string;
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
|
-
*
|
|
141
|
+
* Filter by customer ID
|
|
142
142
|
*/
|
|
143
|
-
|
|
143
|
+
customer_id?: string;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
*
|
|
146
|
+
* Filter by product ID
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
product_id?: string;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
|
-
*
|
|
151
|
+
* Filter by license key source
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
source?: 'auto' | 'import';
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Filter by license key status
|
|
157
|
+
*/
|
|
158
|
+
status?: 'active' | 'expired' | 'disabled';
|
|
154
159
|
}
|
|
155
160
|
|
|
156
161
|
export interface LicenseKeyUpdateParams {
|
|
@@ -173,36 +178,31 @@ export interface LicenseKeyUpdateParams {
|
|
|
173
178
|
expires_at?: string | null;
|
|
174
179
|
}
|
|
175
180
|
|
|
176
|
-
export interface
|
|
177
|
-
/**
|
|
178
|
-
* Filter license keys created on or after this timestamp
|
|
179
|
-
*/
|
|
180
|
-
created_at_gte?: string;
|
|
181
|
-
|
|
181
|
+
export interface LicenseKeyCreateParams {
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* The customer this license key belongs to.
|
|
184
184
|
*/
|
|
185
|
-
|
|
185
|
+
customer_id: string;
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
*
|
|
188
|
+
* The license key string to import.
|
|
189
189
|
*/
|
|
190
|
-
|
|
190
|
+
key: string;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
193
|
+
* The product this license key is for.
|
|
194
194
|
*/
|
|
195
|
-
product_id
|
|
195
|
+
product_id: string;
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
198
|
+
* Maximum number of activations allowed. Null means unlimited.
|
|
199
199
|
*/
|
|
200
|
-
|
|
200
|
+
activations_limit?: number | null;
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
|
-
*
|
|
203
|
+
* Expiration timestamp. Null means the key never expires.
|
|
204
204
|
*/
|
|
205
|
-
|
|
205
|
+
expires_at?: string | null;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
export declare namespace LicenseKeys {
|
|
@@ -210,8 +210,8 @@ export declare namespace LicenseKeys {
|
|
|
210
210
|
type LicenseKey as LicenseKey,
|
|
211
211
|
type LicenseKeyStatus as LicenseKeyStatus,
|
|
212
212
|
type LicenseKeysDefaultPageNumberPagination as LicenseKeysDefaultPageNumberPagination,
|
|
213
|
-
type LicenseKeyCreateParams as LicenseKeyCreateParams,
|
|
214
|
-
type LicenseKeyUpdateParams as LicenseKeyUpdateParams,
|
|
215
213
|
type LicenseKeyListParams as LicenseKeyListParams,
|
|
214
|
+
type LicenseKeyUpdateParams as LicenseKeyUpdateParams,
|
|
215
|
+
type LicenseKeyCreateParams as LicenseKeyCreateParams,
|
|
216
216
|
};
|
|
217
217
|
}
|
package/src/resources/meters.ts
CHANGED
|
@@ -13,6 +13,13 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
13
13
|
import { path } from '../internal/utils/path';
|
|
14
14
|
|
|
15
15
|
export class Meters extends APIResource {
|
|
16
|
+
list(
|
|
17
|
+
query: MeterListParams | null | undefined = {},
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): PagePromise<MetersDefaultPageNumberPagination, Meter> {
|
|
20
|
+
return this._client.getAPIList('/meters', DefaultPageNumberPagination<Meter>, { query, ...options });
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
create(body: MeterCreateParams, options?: RequestOptions): APIPromise<Meter> {
|
|
17
24
|
return this._client.post('/meters', { body, ...options });
|
|
18
25
|
}
|
|
@@ -21,13 +28,6 @@ export class Meters extends APIResource {
|
|
|
21
28
|
return this._client.get(path`/meters/${id}`, options);
|
|
22
29
|
}
|
|
23
30
|
|
|
24
|
-
list(
|
|
25
|
-
query: MeterListParams | null | undefined = {},
|
|
26
|
-
options?: RequestOptions,
|
|
27
|
-
): PagePromise<MetersDefaultPageNumberPagination, Meter> {
|
|
28
|
-
return this._client.getAPIList('/meters', DefaultPageNumberPagination<Meter>, { query, ...options });
|
|
29
|
-
}
|
|
30
|
-
|
|
31
31
|
archive(id: string, options?: RequestOptions): APIPromise<void> {
|
|
32
32
|
return this._client.delete(path`/meters/${id}`, {
|
|
33
33
|
...options,
|
|
@@ -146,6 +146,13 @@ export interface MeterFilter {
|
|
|
146
146
|
conjunction: Conjunction;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
export interface MeterListParams extends DefaultPageNumberPaginationParams {
|
|
150
|
+
/**
|
|
151
|
+
* List archived meters
|
|
152
|
+
*/
|
|
153
|
+
archived?: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
149
156
|
export interface MeterCreateParams {
|
|
150
157
|
/**
|
|
151
158
|
* Aggregation configuration for the meter
|
|
@@ -178,13 +185,6 @@ export interface MeterCreateParams {
|
|
|
178
185
|
filter?: MeterFilter | null;
|
|
179
186
|
}
|
|
180
187
|
|
|
181
|
-
export interface MeterListParams extends DefaultPageNumberPaginationParams {
|
|
182
|
-
/**
|
|
183
|
-
* List archived meters
|
|
184
|
-
*/
|
|
185
|
-
archived?: boolean;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
188
|
export declare namespace Meters {
|
|
189
189
|
export {
|
|
190
190
|
type Conjunction as Conjunction,
|
|
@@ -194,7 +194,7 @@ export declare namespace Meters {
|
|
|
194
194
|
type MeterAggregation as MeterAggregation,
|
|
195
195
|
type MeterFilter as MeterFilter,
|
|
196
196
|
type MetersDefaultPageNumberPagination as MetersDefaultPageNumberPagination,
|
|
197
|
-
type MeterCreateParams as MeterCreateParams,
|
|
198
197
|
type MeterListParams as MeterListParams,
|
|
198
|
+
type MeterCreateParams as MeterCreateParams,
|
|
199
199
|
};
|
|
200
200
|
}
|
|
@@ -15,6 +15,16 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
15
15
|
import { path } from '../internal/utils/path';
|
|
16
16
|
|
|
17
17
|
export class Payments extends APIResource {
|
|
18
|
+
list(
|
|
19
|
+
query: PaymentListParams | null | undefined = {},
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): PagePromise<PaymentListResponsesDefaultPageNumberPagination, PaymentListResponse> {
|
|
22
|
+
return this._client.getAPIList('/payments', DefaultPageNumberPagination<PaymentListResponse>, {
|
|
23
|
+
query,
|
|
24
|
+
...options,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
29
|
* @deprecated
|
|
20
30
|
*/
|
|
@@ -26,16 +36,6 @@ export class Payments extends APIResource {
|
|
|
26
36
|
return this._client.get(path`/payments/${paymentID}`, options);
|
|
27
37
|
}
|
|
28
38
|
|
|
29
|
-
list(
|
|
30
|
-
query: PaymentListParams | null | undefined = {},
|
|
31
|
-
options?: RequestOptions,
|
|
32
|
-
): PagePromise<PaymentListResponsesDefaultPageNumberPagination, PaymentListResponse> {
|
|
33
|
-
return this._client.getAPIList('/payments', DefaultPageNumberPagination<PaymentListResponse>, {
|
|
34
|
-
query,
|
|
35
|
-
...options,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
39
|
retrieveLineItems(
|
|
40
40
|
paymentID: string,
|
|
41
41
|
options?: RequestOptions,
|
|
@@ -237,6 +237,13 @@ export interface Payment {
|
|
|
237
237
|
*/
|
|
238
238
|
refunds: Array<RefundListItem>;
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Retry attempt number for subscription renewal payments. `0` for the original
|
|
242
|
+
* payment, `1`+ for each scheduled off-session retry after a failed renewal.
|
|
243
|
+
* Always `0` for non-subscription payments.
|
|
244
|
+
*/
|
|
245
|
+
retry_attempt: number;
|
|
246
|
+
|
|
240
247
|
/**
|
|
241
248
|
* The amount that will be credited to your Dodo balance after currency conversion
|
|
242
249
|
* and processing. Especially relevant for adaptive pricing where the customer's
|
|
@@ -670,6 +677,54 @@ export namespace PaymentRetrieveLineItemsResponse {
|
|
|
670
677
|
}
|
|
671
678
|
}
|
|
672
679
|
|
|
680
|
+
export interface PaymentListParams extends DefaultPageNumberPaginationParams {
|
|
681
|
+
/**
|
|
682
|
+
* filter by Brand id
|
|
683
|
+
*/
|
|
684
|
+
brand_id?: string;
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Get events after this created time
|
|
688
|
+
*/
|
|
689
|
+
created_at_gte?: string;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Get events created before this time
|
|
693
|
+
*/
|
|
694
|
+
created_at_lte?: string;
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Filter by customer id
|
|
698
|
+
*/
|
|
699
|
+
customer_id?: string;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Filter by product id
|
|
703
|
+
*/
|
|
704
|
+
product_id?: string;
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Filter by status
|
|
708
|
+
*/
|
|
709
|
+
status?:
|
|
710
|
+
| 'succeeded'
|
|
711
|
+
| 'failed'
|
|
712
|
+
| 'cancelled'
|
|
713
|
+
| 'processing'
|
|
714
|
+
| 'requires_customer_action'
|
|
715
|
+
| 'requires_merchant_action'
|
|
716
|
+
| 'requires_payment_method'
|
|
717
|
+
| 'requires_confirmation'
|
|
718
|
+
| 'requires_capture'
|
|
719
|
+
| 'partially_captured'
|
|
720
|
+
| 'partially_captured_and_capturable';
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Filter by subscription id
|
|
724
|
+
*/
|
|
725
|
+
subscription_id?: string;
|
|
726
|
+
}
|
|
727
|
+
|
|
673
728
|
export interface PaymentCreateParams {
|
|
674
729
|
/**
|
|
675
730
|
* Billing address details for the payment
|
|
@@ -785,54 +840,6 @@ export interface PaymentCreateParams {
|
|
|
785
840
|
tax_id?: string | null;
|
|
786
841
|
}
|
|
787
842
|
|
|
788
|
-
export interface PaymentListParams extends DefaultPageNumberPaginationParams {
|
|
789
|
-
/**
|
|
790
|
-
* filter by Brand id
|
|
791
|
-
*/
|
|
792
|
-
brand_id?: string;
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* Get events after this created time
|
|
796
|
-
*/
|
|
797
|
-
created_at_gte?: string;
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* Get events created before this time
|
|
801
|
-
*/
|
|
802
|
-
created_at_lte?: string;
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Filter by customer id
|
|
806
|
-
*/
|
|
807
|
-
customer_id?: string;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Filter by product id
|
|
811
|
-
*/
|
|
812
|
-
product_id?: string;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Filter by status
|
|
816
|
-
*/
|
|
817
|
-
status?:
|
|
818
|
-
| 'succeeded'
|
|
819
|
-
| 'failed'
|
|
820
|
-
| 'cancelled'
|
|
821
|
-
| 'processing'
|
|
822
|
-
| 'requires_customer_action'
|
|
823
|
-
| 'requires_merchant_action'
|
|
824
|
-
| 'requires_payment_method'
|
|
825
|
-
| 'requires_confirmation'
|
|
826
|
-
| 'requires_capture'
|
|
827
|
-
| 'partially_captured'
|
|
828
|
-
| 'partially_captured_and_capturable';
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* Filter by subscription id
|
|
832
|
-
*/
|
|
833
|
-
subscription_id?: string;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
843
|
export declare namespace Payments {
|
|
837
844
|
export {
|
|
838
845
|
type AttachExistingCustomer as AttachExistingCustomer,
|
|
@@ -852,7 +859,7 @@ export declare namespace Payments {
|
|
|
852
859
|
type PaymentListResponse as PaymentListResponse,
|
|
853
860
|
type PaymentRetrieveLineItemsResponse as PaymentRetrieveLineItemsResponse,
|
|
854
861
|
type PaymentListResponsesDefaultPageNumberPagination as PaymentListResponsesDefaultPageNumberPagination,
|
|
855
|
-
type PaymentCreateParams as PaymentCreateParams,
|
|
856
862
|
type PaymentListParams as PaymentListParams,
|
|
863
|
+
type PaymentCreateParams as PaymentCreateParams,
|
|
857
864
|
};
|
|
858
865
|
}
|
|
@@ -26,18 +26,18 @@ export class Groups extends APIResource {
|
|
|
26
26
|
return this._client.post(path`/product-collections/${id}/groups`, { body, ...options });
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
const { id
|
|
31
|
-
return this._client.
|
|
32
|
-
body,
|
|
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}`, {
|
|
33
32
|
...options,
|
|
34
33
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
const { id } = params;
|
|
40
|
-
return this._client.
|
|
37
|
+
update(groupID: string, params: GroupUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
38
|
+
const { id, ...body } = params;
|
|
39
|
+
return this._client.patch(path`/product-collections/${id}/groups/${groupID}`, {
|
|
40
|
+
body,
|
|
41
41
|
...options,
|
|
42
42
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
43
43
|
});
|
|
@@ -102,6 +102,13 @@ export interface GroupCreateParams {
|
|
|
102
102
|
status?: boolean | null;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
export interface GroupDeleteParams {
|
|
106
|
+
/**
|
|
107
|
+
* Product Collection Id
|
|
108
|
+
*/
|
|
109
|
+
id: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
105
112
|
export interface GroupUpdateParams {
|
|
106
113
|
/**
|
|
107
114
|
* Path param: Product Collection Id
|
|
@@ -126,13 +133,6 @@ export interface GroupUpdateParams {
|
|
|
126
133
|
status?: boolean | null;
|
|
127
134
|
}
|
|
128
135
|
|
|
129
|
-
export interface GroupDeleteParams {
|
|
130
|
-
/**
|
|
131
|
-
* Product Collection Id
|
|
132
|
-
*/
|
|
133
|
-
id: string;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
136
|
Groups.Items = Items;
|
|
137
137
|
|
|
138
138
|
export declare namespace Groups {
|
|
@@ -141,8 +141,8 @@ export declare namespace Groups {
|
|
|
141
141
|
type ProductCollectionGroupDetails as ProductCollectionGroupDetails,
|
|
142
142
|
type ProductCollectionGroupResponse as ProductCollectionGroupResponse,
|
|
143
143
|
type GroupCreateParams as GroupCreateParams,
|
|
144
|
-
type GroupUpdateParams as GroupUpdateParams,
|
|
145
144
|
type GroupDeleteParams as GroupDeleteParams,
|
|
145
|
+
type GroupUpdateParams as GroupUpdateParams,
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
export {
|
|
@@ -150,7 +150,7 @@ export declare namespace Groups {
|
|
|
150
150
|
type ProductCollectionProduct as ProductCollectionProduct,
|
|
151
151
|
type ItemCreateResponse as ItemCreateResponse,
|
|
152
152
|
type ItemCreateParams as ItemCreateParams,
|
|
153
|
-
type ItemUpdateParams as ItemUpdateParams,
|
|
154
153
|
type ItemDeleteParams as ItemDeleteParams,
|
|
154
|
+
type ItemUpdateParams as ItemUpdateParams,
|
|
155
155
|
};
|
|
156
156
|
}
|
|
@@ -6,14 +6,14 @@ export {
|
|
|
6
6
|
type ProductCollectionGroupDetails,
|
|
7
7
|
type ProductCollectionGroupResponse,
|
|
8
8
|
type GroupCreateParams,
|
|
9
|
-
type GroupUpdateParams,
|
|
10
9
|
type GroupDeleteParams,
|
|
10
|
+
type GroupUpdateParams,
|
|
11
11
|
} from './groups';
|
|
12
12
|
export {
|
|
13
13
|
Items,
|
|
14
14
|
type ProductCollectionProduct,
|
|
15
15
|
type ItemCreateResponse,
|
|
16
16
|
type ItemCreateParams,
|
|
17
|
-
type ItemUpdateParams,
|
|
18
17
|
type ItemDeleteParams,
|
|
18
|
+
type ItemUpdateParams,
|
|
19
19
|
} from './items';
|
|
@@ -19,18 +19,18 @@ export class Items extends APIResource {
|
|
|
19
19
|
return this._client.post(path`/product-collections/${id}/groups/${groupID}/items`, { body, ...options });
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
const { id, group_id
|
|
24
|
-
return this._client.
|
|
25
|
-
body,
|
|
22
|
+
delete(itemID: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
23
|
+
const { id, group_id } = params;
|
|
24
|
+
return this._client.delete(path`/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
26
25
|
...options,
|
|
27
26
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
const { id, group_id } = params;
|
|
33
|
-
return this._client.
|
|
30
|
+
update(itemID: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
31
|
+
const { id, group_id, ...body } = params;
|
|
32
|
+
return this._client.patch(path`/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
33
|
+
body,
|
|
34
34
|
...options,
|
|
35
35
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
36
36
|
});
|
|
@@ -95,33 +95,33 @@ export interface ItemCreateParams {
|
|
|
95
95
|
products: Array<GroupsAPI.GroupProduct>;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export interface
|
|
98
|
+
export interface ItemDeleteParams {
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Product Collection Id
|
|
101
101
|
*/
|
|
102
102
|
id: string;
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Product Collection Group Id
|
|
106
106
|
*/
|
|
107
107
|
group_id: string;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Body param: Status of the product in the group
|
|
111
|
-
*/
|
|
112
|
-
status: boolean;
|
|
113
108
|
}
|
|
114
109
|
|
|
115
|
-
export interface
|
|
110
|
+
export interface ItemUpdateParams {
|
|
116
111
|
/**
|
|
117
|
-
* Product Collection Id
|
|
112
|
+
* Path param: Product Collection Id
|
|
118
113
|
*/
|
|
119
114
|
id: string;
|
|
120
115
|
|
|
121
116
|
/**
|
|
122
|
-
* Product Collection Group Id
|
|
117
|
+
* Path param: Product Collection Group Id
|
|
123
118
|
*/
|
|
124
119
|
group_id: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Body param: Status of the product in the group
|
|
123
|
+
*/
|
|
124
|
+
status: boolean;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
export declare namespace Items {
|
|
@@ -129,7 +129,7 @@ export declare namespace Items {
|
|
|
129
129
|
type ProductCollectionProduct as ProductCollectionProduct,
|
|
130
130
|
type ItemCreateResponse as ItemCreateResponse,
|
|
131
131
|
type ItemCreateParams as ItemCreateParams,
|
|
132
|
-
type ItemUpdateParams as ItemUpdateParams,
|
|
133
132
|
type ItemDeleteParams as ItemDeleteParams,
|
|
133
|
+
type ItemUpdateParams as ItemUpdateParams,
|
|
134
134
|
};
|
|
135
135
|
}
|
|
@@ -6,8 +6,8 @@ export {
|
|
|
6
6
|
type ProductCollectionGroupDetails,
|
|
7
7
|
type ProductCollectionGroupResponse,
|
|
8
8
|
type GroupCreateParams,
|
|
9
|
-
type GroupUpdateParams,
|
|
10
9
|
type GroupDeleteParams,
|
|
10
|
+
type GroupUpdateParams,
|
|
11
11
|
} from './groups/index';
|
|
12
12
|
export {
|
|
13
13
|
ProductCollections,
|
|
@@ -15,9 +15,9 @@ export {
|
|
|
15
15
|
type ProductCollectionListResponse,
|
|
16
16
|
type ProductCollectionUnarchiveResponse,
|
|
17
17
|
type ProductCollectionUpdateImagesResponse,
|
|
18
|
+
type ProductCollectionListParams,
|
|
18
19
|
type ProductCollectionCreateParams,
|
|
19
20
|
type ProductCollectionUpdateParams,
|
|
20
|
-
type ProductCollectionListParams,
|
|
21
21
|
type ProductCollectionUpdateImagesParams,
|
|
22
22
|
type ProductCollectionListResponsesDefaultPageNumberPagination,
|
|
23
23
|
} from './product-collections';
|