dodopayments 2.17.2 → 2.19.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 +37 -0
- package/client.d.mts +8 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -4
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +14 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/balances.d.mts +52 -0
- package/resources/balances.d.mts.map +1 -0
- package/resources/balances.d.ts +52 -0
- package/resources/balances.d.ts.map +1 -0
- package/resources/balances.js +16 -0
- package/resources/balances.js.map +1 -0
- package/resources/balances.mjs +12 -0
- package/resources/balances.mjs.map +1 -0
- package/resources/checkout-sessions.d.mts +289 -493
- package/resources/checkout-sessions.d.mts.map +1 -1
- package/resources/checkout-sessions.d.ts +289 -493
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.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/subscriptions.d.mts +20 -0
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +20 -0
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/webhook-events.d.mts +1 -1
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +1 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/src/client.ts +48 -5
- package/src/internal/parse.ts +6 -0
- package/src/resources/balances.ts +271 -0
- package/src/resources/checkout-sessions.ts +338 -577
- package/src/resources/index.ts +14 -0
- package/src/resources/payments.ts +6 -0
- package/src/resources/subscriptions.ts +22 -0
- package/src/resources/webhook-events.ts +6 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/index.ts
CHANGED
|
@@ -9,6 +9,12 @@ export {
|
|
|
9
9
|
type AddonListParams,
|
|
10
10
|
type AddonResponsesDefaultPageNumberPagination,
|
|
11
11
|
} from './addons';
|
|
12
|
+
export {
|
|
13
|
+
Balances,
|
|
14
|
+
type BalanceLedgerEntry,
|
|
15
|
+
type BalanceRetrieveLedgerParams,
|
|
16
|
+
type BalanceLedgerEntriesDefaultPageNumberPagination,
|
|
17
|
+
} from './balances';
|
|
12
18
|
export {
|
|
13
19
|
Brands,
|
|
14
20
|
type Brand,
|
|
@@ -19,9 +25,17 @@ export {
|
|
|
19
25
|
} from './brands';
|
|
20
26
|
export {
|
|
21
27
|
CheckoutSessions,
|
|
28
|
+
type CheckoutSessionBillingAddress,
|
|
29
|
+
type CheckoutSessionCustomization,
|
|
30
|
+
type CheckoutSessionFlags,
|
|
22
31
|
type CheckoutSessionRequest,
|
|
23
32
|
type CheckoutSessionResponse,
|
|
24
33
|
type CheckoutSessionStatus,
|
|
34
|
+
type CustomField,
|
|
35
|
+
type ProductItemReq,
|
|
36
|
+
type SubscriptionData,
|
|
37
|
+
type ThemeConfig,
|
|
38
|
+
type ThemeModeConfig,
|
|
25
39
|
type CheckoutSessionPreviewResponse,
|
|
26
40
|
type CheckoutSessionCreateParams,
|
|
27
41
|
type CheckoutSessionPreviewParams,
|
|
@@ -320,6 +320,12 @@ export interface Payment {
|
|
|
320
320
|
*/
|
|
321
321
|
product_cart?: Array<Payment.ProductCart> | null;
|
|
322
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Summary of the refund status for this payment. None if no succeeded refunds
|
|
325
|
+
* exist.
|
|
326
|
+
*/
|
|
327
|
+
refund_status?: 'partial' | 'full' | null;
|
|
328
|
+
|
|
323
329
|
/**
|
|
324
330
|
* This represents the portion of settlement_amount that corresponds to taxes
|
|
325
331
|
* collected. Especially relevant for adaptive pricing where the tax component must
|
|
@@ -982,6 +982,17 @@ export interface SubscriptionChangePlanParams {
|
|
|
982
982
|
* be taken
|
|
983
983
|
*/
|
|
984
984
|
metadata?: { [key: string]: string } | null;
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Controls behavior when the plan change payment fails.
|
|
988
|
+
*
|
|
989
|
+
* - `prevent_change`: Keep subscription on current plan until payment succeeds
|
|
990
|
+
* - `apply_change` (default): Apply plan change immediately regardless of payment
|
|
991
|
+
* outcome
|
|
992
|
+
*
|
|
993
|
+
* If not specified, uses the business-level default setting.
|
|
994
|
+
*/
|
|
995
|
+
on_payment_failure?: 'prevent_change' | 'apply_change' | null;
|
|
985
996
|
}
|
|
986
997
|
|
|
987
998
|
export interface SubscriptionChargeParams {
|
|
@@ -1066,6 +1077,17 @@ export interface SubscriptionPreviewChangePlanParams {
|
|
|
1066
1077
|
* be taken
|
|
1067
1078
|
*/
|
|
1068
1079
|
metadata?: { [key: string]: string } | null;
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Controls behavior when the plan change payment fails.
|
|
1083
|
+
*
|
|
1084
|
+
* - `prevent_change`: Keep subscription on current plan until payment succeeds
|
|
1085
|
+
* - `apply_change` (default): Apply plan change immediately regardless of payment
|
|
1086
|
+
* outcome
|
|
1087
|
+
*
|
|
1088
|
+
* If not specified, uses the business-level default setting.
|
|
1089
|
+
*/
|
|
1090
|
+
on_payment_failure?: 'prevent_change' | 'apply_change' | null;
|
|
1069
1091
|
}
|
|
1070
1092
|
|
|
1071
1093
|
export interface SubscriptionRetrieveUsageHistoryParams extends DefaultPageNumberPaginationParams {
|
|
@@ -34,7 +34,12 @@ export type WebhookEventType =
|
|
|
34
34
|
| 'subscription.expired'
|
|
35
35
|
| 'subscription.plan_changed'
|
|
36
36
|
| 'subscription.updated'
|
|
37
|
-
| 'license_key.created'
|
|
37
|
+
| 'license_key.created'
|
|
38
|
+
| 'payout.not_initiated'
|
|
39
|
+
| 'payout.on_hold'
|
|
40
|
+
| 'payout.in_progress'
|
|
41
|
+
| 'payout.failed'
|
|
42
|
+
| 'payout.success';
|
|
38
43
|
|
|
39
44
|
export interface WebhookPayload {
|
|
40
45
|
business_id: string;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.19.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.19.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.19.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|