dodopayments 1.50.0 → 1.51.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 +19 -0
- package/README.md +17 -35
- package/index.d.mts +7 -7
- package/index.d.ts +7 -7
- package/index.d.ts.map +1 -1
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/index.mjs +5 -5
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/checkout-sessions.d.ts +348 -0
- package/resources/checkout-sessions.d.ts.map +1 -0
- package/resources/checkout-sessions.js +12 -0
- package/resources/checkout-sessions.js.map +1 -0
- package/resources/checkout-sessions.mjs +8 -0
- package/resources/checkout-sessions.mjs.map +1 -0
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +6 -6
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/subscriptions.d.ts +38 -33
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/webhooks/index.d.ts +1 -1
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js +2 -2
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs +1 -1
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.ts +8 -140
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +5 -8
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +3 -6
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/index.ts +22 -16
- package/src/resources/checkout-sessions.ts +422 -0
- package/src/resources/index.ts +10 -7
- package/src/resources/subscriptions.ts +44 -37
- package/src/resources/webhooks/index.ts +2 -5
- package/src/resources/webhooks/webhooks.ts +12 -173
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/your-webhook-url.d.ts +0 -66
- package/resources/your-webhook-url.d.ts.map +0 -1
- package/resources/your-webhook-url.js +0 -23
- package/resources/your-webhook-url.js.map +0 -1
- package/resources/your-webhook-url.mjs +0 -19
- package/resources/your-webhook-url.mjs.map +0 -1
- package/src/resources/your-webhook-url.ts +0 -104
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.51.0 (2025-08-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.50.0...v1.51.0](https://github.com/dodopayments/dodopayments-node/compare/v1.50.0...v1.51.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** updated example ([151f228](https://github.com/dodopayments/dodopayments-node/commit/151f228a14708fbe310759a6bf3a8f8ae5c7bf05))
|
|
10
|
+
* **api:** updated openapi spec to v1.51.0 and added checkout sessions ([a6112d2](https://github.com/dodopayments/dodopayments-node/commit/a6112d233096c7965cadc198ea24bd97cb5fe7c1))
|
|
11
|
+
* **mcp:** add code execution tool ([4078bec](https://github.com/dodopayments/dodopayments-node/commit/4078becd78ac85ca3c02979e64c50762ffa98ff4))
|
|
12
|
+
* **mcp:** add option to infer mcp client ([a8e60df](https://github.com/dodopayments/dodopayments-node/commit/a8e60df1a59e578dee481d59a47808e7cf54bdc8))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
* **internal:** make mcp-server publishing public by defaut ([016ca5d](https://github.com/dodopayments/dodopayments-node/commit/016ca5dfe898dd368284ba0ca1021f5ba7ca8a03))
|
|
18
|
+
* **mcp:** add cors to oauth metadata route ([7a1dfab](https://github.com/dodopayments/dodopayments-node/commit/7a1dfab7417af634831e17ade3d230ad9c669efe))
|
|
19
|
+
* **mcp:** update package.json ([178dc54](https://github.com/dodopayments/dodopayments-node/commit/178dc547856924dc78e53476a476b2e094b17e13))
|
|
20
|
+
* **mcp:** update types ([4a5334a](https://github.com/dodopayments/dodopayments-node/commit/4a5334aa6ffe45df5a838f0e1adf0729e8774124))
|
|
21
|
+
|
|
3
22
|
## 1.50.0 (2025-08-19)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v1.49.0...v1.50.0](https://github.com/dodopayments/dodopayments-node/compare/v1.49.0...v1.50.0)
|
package/README.md
CHANGED
|
@@ -27,13 +27,11 @@ const client = new DodoPayments({
|
|
|
27
27
|
environment: 'test_mode', // defaults to 'live_mode'
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
const
|
|
31
|
-
billing: { city: 'city', country: 'AF', state: 'state', street: 'street', zipcode: 'zipcode' },
|
|
32
|
-
customer: { customer_id: 'customer_id' },
|
|
30
|
+
const checkoutSessionResponse = await client.checkoutSessions.create({
|
|
33
31
|
product_cart: [{ product_id: 'product_id', quantity: 0 }],
|
|
34
32
|
});
|
|
35
33
|
|
|
36
|
-
console.log(
|
|
34
|
+
console.log(checkoutSessionResponse.session_id);
|
|
37
35
|
```
|
|
38
36
|
|
|
39
37
|
### Request & Response types
|
|
@@ -49,12 +47,12 @@ const client = new DodoPayments({
|
|
|
49
47
|
environment: 'test_mode', // defaults to 'live_mode'
|
|
50
48
|
});
|
|
51
49
|
|
|
52
|
-
const params: DodoPayments.
|
|
53
|
-
billing: { city: 'city', country: 'AF', state: 'state', street: 'street', zipcode: 'zipcode' },
|
|
54
|
-
customer: { customer_id: 'customer_id' },
|
|
50
|
+
const params: DodoPayments.CheckoutSessionCreateParams = {
|
|
55
51
|
product_cart: [{ product_id: 'product_id', quantity: 0 }],
|
|
56
52
|
};
|
|
57
|
-
const
|
|
53
|
+
const checkoutSessionResponse: DodoPayments.CheckoutSessionResponse = await client.checkoutSessions.create(
|
|
54
|
+
params,
|
|
55
|
+
);
|
|
58
56
|
```
|
|
59
57
|
|
|
60
58
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
@@ -67,12 +65,8 @@ a subclass of `APIError` will be thrown:
|
|
|
67
65
|
|
|
68
66
|
<!-- prettier-ignore -->
|
|
69
67
|
```ts
|
|
70
|
-
const
|
|
71
|
-
.create({
|
|
72
|
-
billing: { city: 'city', country: 'AF', state: 'state', street: 'street', zipcode: 'zipcode' },
|
|
73
|
-
customer: { customer_id: 'customer_id' },
|
|
74
|
-
product_cart: [{ product_id: 'product_id', quantity: 0 }],
|
|
75
|
-
})
|
|
68
|
+
const checkoutSessionResponse = await client.checkoutSessions
|
|
69
|
+
.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] })
|
|
76
70
|
.catch(async (err) => {
|
|
77
71
|
if (err instanceof DodoPayments.APIError) {
|
|
78
72
|
console.log(err.status); // 400
|
|
@@ -113,7 +107,7 @@ const client = new DodoPayments({
|
|
|
113
107
|
});
|
|
114
108
|
|
|
115
109
|
// Or, configure per-request:
|
|
116
|
-
await client.
|
|
110
|
+
await client.checkoutSessions.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] }, {
|
|
117
111
|
maxRetries: 5,
|
|
118
112
|
});
|
|
119
113
|
```
|
|
@@ -130,7 +124,7 @@ const client = new DodoPayments({
|
|
|
130
124
|
});
|
|
131
125
|
|
|
132
126
|
// Override per-request:
|
|
133
|
-
await client.
|
|
127
|
+
await client.checkoutSessions.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] }, {
|
|
134
128
|
timeout: 5 * 1000,
|
|
135
129
|
});
|
|
136
130
|
```
|
|
@@ -182,25 +176,17 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi
|
|
|
182
176
|
```ts
|
|
183
177
|
const client = new DodoPayments();
|
|
184
178
|
|
|
185
|
-
const response = await client.
|
|
186
|
-
.create({
|
|
187
|
-
billing: { city: 'city', country: 'AF', state: 'state', street: 'street', zipcode: 'zipcode' },
|
|
188
|
-
customer: { customer_id: 'customer_id' },
|
|
189
|
-
product_cart: [{ product_id: 'product_id', quantity: 0 }],
|
|
190
|
-
})
|
|
179
|
+
const response = await client.checkoutSessions
|
|
180
|
+
.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] })
|
|
191
181
|
.asResponse();
|
|
192
182
|
console.log(response.headers.get('X-My-Header'));
|
|
193
183
|
console.log(response.statusText); // access the underlying Response object
|
|
194
184
|
|
|
195
|
-
const { data:
|
|
196
|
-
.create({
|
|
197
|
-
billing: { city: 'city', country: 'AF', state: 'state', street: 'street', zipcode: 'zipcode' },
|
|
198
|
-
customer: { customer_id: 'customer_id' },
|
|
199
|
-
product_cart: [{ product_id: 'product_id', quantity: 0 }],
|
|
200
|
-
})
|
|
185
|
+
const { data: checkoutSessionResponse, response: raw } = await client.checkoutSessions
|
|
186
|
+
.create({ product_cart: [{ product_id: 'product_id', quantity: 0 }] })
|
|
201
187
|
.withResponse();
|
|
202
188
|
console.log(raw.headers.get('X-My-Header'));
|
|
203
|
-
console.log(
|
|
189
|
+
console.log(checkoutSessionResponse.session_id);
|
|
204
190
|
```
|
|
205
191
|
|
|
206
192
|
### Making custom/undocumented requests
|
|
@@ -304,12 +290,8 @@ const client = new DodoPayments({
|
|
|
304
290
|
});
|
|
305
291
|
|
|
306
292
|
// Override per-request:
|
|
307
|
-
await client.
|
|
308
|
-
{
|
|
309
|
-
billing: { city: 'city', country: 'AF', state: 'state', street: 'street', zipcode: 'zipcode' },
|
|
310
|
-
customer: { customer_id: 'customer_id' },
|
|
311
|
-
product_cart: [{ product_id: 'product_id', quantity: 0 }],
|
|
312
|
-
},
|
|
293
|
+
await client.checkoutSessions.create(
|
|
294
|
+
{ product_cart: [{ product_id: 'product_id', quantity: 0 }] },
|
|
313
295
|
{
|
|
314
296
|
httpAgent: new http.Agent({ keepAlive: false }),
|
|
315
297
|
},
|
package/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ import * as Uploads from "./uploads.js";
|
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
8
|
import { AddonCreateParams, AddonListParams, AddonResponse, AddonResponsesDefaultPageNumberPagination, AddonUpdateImagesResponse, AddonUpdateParams, Addons } from "./resources/addons.js";
|
|
9
9
|
import { Brand, BrandCreateParams, BrandListResponse, BrandUpdateImagesResponse, BrandUpdateParams, Brands } from "./resources/brands.js";
|
|
10
|
+
import { CheckoutSessionCreateParams, CheckoutSessionRequest, CheckoutSessionResponse, CheckoutSessions } from "./resources/checkout-sessions.js";
|
|
10
11
|
import { Discount, DiscountCreateParams, DiscountListParams, DiscountType, DiscountUpdateParams, Discounts, DiscountsDefaultPageNumberPagination } from "./resources/discounts.js";
|
|
11
12
|
import { Dispute, DisputeListParams, DisputeListResponse, DisputeListResponsesDefaultPageNumberPagination, DisputeStage, DisputeStatus, Disputes, GetDispute } from "./resources/disputes.js";
|
|
12
13
|
import { LicenseKeyInstance, LicenseKeyInstanceListParams, LicenseKeyInstanceUpdateParams, LicenseKeyInstances, LicenseKeyInstancesDefaultPageNumberPagination } from "./resources/license-key-instances.js";
|
|
@@ -16,13 +17,12 @@ import { CountryCode, Currency, Misc, MiscListSupportedCountriesResponse, TaxCat
|
|
|
16
17
|
import { AttachExistingCustomer, BillingAddress, CreateNewCustomer, CustomerLimitedDetails, CustomerRequest, IntentStatus, NewCustomer, OneTimeProductCartItem, Payment, PaymentCreateParams, PaymentCreateResponse, PaymentListParams, PaymentListResponse, PaymentListResponsesDefaultPageNumberPagination, PaymentMethodTypes, PaymentRetrieveLineItemsResponse, Payments } from "./resources/payments.js";
|
|
17
18
|
import { PayoutListParams, PayoutListResponse, PayoutListResponsesDefaultPageNumberPagination, Payouts } from "./resources/payouts.js";
|
|
18
19
|
import { Refund, RefundCreateParams, RefundListParams, RefundStatus, Refunds, RefundsDefaultPageNumberPagination } from "./resources/refunds.js";
|
|
19
|
-
import { AddonCartResponseItem, AttachAddon, Subscription, SubscriptionChangePlanParams, SubscriptionChargeParams, SubscriptionChargeResponse, SubscriptionCreateParams, SubscriptionCreateResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesDefaultPageNumberPagination, SubscriptionStatus, SubscriptionUpdateParams, Subscriptions, TimeInterval } from "./resources/subscriptions.js";
|
|
20
|
+
import { AddonCartResponseItem, AttachAddon, OnDemandSubscription, Subscription, SubscriptionChangePlanParams, SubscriptionChargeParams, SubscriptionChargeResponse, SubscriptionCreateParams, SubscriptionCreateResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesDefaultPageNumberPagination, SubscriptionStatus, SubscriptionUpdateParams, Subscriptions, TimeInterval } from "./resources/subscriptions.js";
|
|
20
21
|
import { WebhookEventType, WebhookEvents, WebhookPayload } from "./resources/webhook-events.js";
|
|
21
|
-
import { YourWebhookURL, YourWebhookURLCreateParams } from "./resources/your-webhook-url.js";
|
|
22
22
|
import { Customer, CustomerCreateParams, CustomerListParams, CustomerPortalSession, CustomerUpdateParams, Customers, CustomersDefaultPageNumberPagination } from "./resources/customers/customers.js";
|
|
23
23
|
import { Invoices } from "./resources/invoices/invoices.js";
|
|
24
24
|
import { LicenseKeyDuration, Price, Product, ProductCreateParams, ProductListParams, ProductListResponse, ProductListResponsesDefaultPageNumberPagination, ProductUpdateFilesParams, ProductUpdateFilesResponse, ProductUpdateParams, Products } from "./resources/products/products.js";
|
|
25
|
-
import { WebhookCreateParams,
|
|
25
|
+
import { WebhookCreateParams, WebhookDetails, WebhookDetailsCursorPagePagination, WebhookListParams, WebhookRetrieveSecretResponse, WebhookUpdateParams, Webhooks } from "./resources/webhooks/webhooks.js";
|
|
26
26
|
declare const environments: {
|
|
27
27
|
live_mode: string;
|
|
28
28
|
test_mode: string;
|
|
@@ -114,6 +114,7 @@ export declare class DodoPayments extends Core.APIClient {
|
|
|
114
114
|
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
115
115
|
*/
|
|
116
116
|
constructor({ baseURL, bearerToken, ...opts }?: ClientOptions);
|
|
117
|
+
checkoutSessions: API.CheckoutSessions;
|
|
117
118
|
payments: API.Payments;
|
|
118
119
|
subscriptions: API.Subscriptions;
|
|
119
120
|
invoices: API.Invoices;
|
|
@@ -131,7 +132,6 @@ export declare class DodoPayments extends Core.APIClient {
|
|
|
131
132
|
addons: API.Addons;
|
|
132
133
|
brands: API.Brands;
|
|
133
134
|
webhooks: API.Webhooks;
|
|
134
|
-
yourWebhookURL: API.YourWebhookURL;
|
|
135
135
|
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
136
136
|
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
137
137
|
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
@@ -159,8 +159,9 @@ export declare namespace DodoPayments {
|
|
|
159
159
|
export { type DefaultPageNumberPaginationParams as DefaultPageNumberPaginationParams, type DefaultPageNumberPaginationResponse as DefaultPageNumberPaginationResponse, };
|
|
160
160
|
export import CursorPagePagination = Pagination.CursorPagePagination;
|
|
161
161
|
export { type CursorPagePaginationParams as CursorPagePaginationParams, type CursorPagePaginationResponse as CursorPagePaginationResponse, };
|
|
162
|
+
export { CheckoutSessions as CheckoutSessions, type CheckoutSessionRequest as CheckoutSessionRequest, type CheckoutSessionResponse as CheckoutSessionResponse, type CheckoutSessionCreateParams as CheckoutSessionCreateParams, };
|
|
162
163
|
export { Payments as Payments, type AttachExistingCustomer as AttachExistingCustomer, type BillingAddress as BillingAddress, type CreateNewCustomer as CreateNewCustomer, type CustomerLimitedDetails as CustomerLimitedDetails, type CustomerRequest as CustomerRequest, type IntentStatus as IntentStatus, type NewCustomer as NewCustomer, type OneTimeProductCartItem as OneTimeProductCartItem, type Payment as Payment, type PaymentMethodTypes as PaymentMethodTypes, type PaymentCreateResponse as PaymentCreateResponse, type PaymentListResponse as PaymentListResponse, type PaymentRetrieveLineItemsResponse as PaymentRetrieveLineItemsResponse, PaymentListResponsesDefaultPageNumberPagination as PaymentListResponsesDefaultPageNumberPagination, type PaymentCreateParams as PaymentCreateParams, type PaymentListParams as PaymentListParams, };
|
|
163
|
-
export { Subscriptions as Subscriptions, type AddonCartResponseItem as AddonCartResponseItem, type AttachAddon as AttachAddon, type Subscription as Subscription, type SubscriptionStatus as SubscriptionStatus, type TimeInterval as TimeInterval, type SubscriptionCreateResponse as SubscriptionCreateResponse, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionChargeResponse as SubscriptionChargeResponse, SubscriptionListResponsesDefaultPageNumberPagination as SubscriptionListResponsesDefaultPageNumberPagination, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionChangePlanParams as SubscriptionChangePlanParams, type SubscriptionChargeParams as SubscriptionChargeParams, };
|
|
164
|
+
export { Subscriptions as Subscriptions, type AddonCartResponseItem as AddonCartResponseItem, type AttachAddon as AttachAddon, type OnDemandSubscription as OnDemandSubscription, type Subscription as Subscription, type SubscriptionStatus as SubscriptionStatus, type TimeInterval as TimeInterval, type SubscriptionCreateResponse as SubscriptionCreateResponse, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionChargeResponse as SubscriptionChargeResponse, SubscriptionListResponsesDefaultPageNumberPagination as SubscriptionListResponsesDefaultPageNumberPagination, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionChangePlanParams as SubscriptionChangePlanParams, type SubscriptionChargeParams as SubscriptionChargeParams, };
|
|
164
165
|
export { Invoices as Invoices };
|
|
165
166
|
export { Licenses as Licenses, type LicenseValidateResponse as LicenseValidateResponse, type LicenseActivateParams as LicenseActivateParams, type LicenseDeactivateParams as LicenseDeactivateParams, type LicenseValidateParams as LicenseValidateParams, };
|
|
166
167
|
export { LicenseKeys as LicenseKeys, type LicenseKey as LicenseKey, type LicenseKeyStatus as LicenseKeyStatus, LicenseKeysDefaultPageNumberPagination as LicenseKeysDefaultPageNumberPagination, type LicenseKeyUpdateParams as LicenseKeyUpdateParams, type LicenseKeyListParams as LicenseKeyListParams, };
|
|
@@ -175,8 +176,7 @@ export declare namespace DodoPayments {
|
|
|
175
176
|
export { Discounts as Discounts, type Discount as Discount, type DiscountType as DiscountType, DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination, type DiscountCreateParams as DiscountCreateParams, type DiscountUpdateParams as DiscountUpdateParams, type DiscountListParams as DiscountListParams, };
|
|
176
177
|
export { Addons as Addons, type AddonResponse as AddonResponse, type AddonUpdateImagesResponse as AddonUpdateImagesResponse, AddonResponsesDefaultPageNumberPagination as AddonResponsesDefaultPageNumberPagination, type AddonCreateParams as AddonCreateParams, type AddonUpdateParams as AddonUpdateParams, type AddonListParams as AddonListParams, };
|
|
177
178
|
export { Brands as Brands, type Brand as Brand, type BrandListResponse as BrandListResponse, type BrandUpdateImagesResponse as BrandUpdateImagesResponse, type BrandCreateParams as BrandCreateParams, type BrandUpdateParams as BrandUpdateParams, };
|
|
178
|
-
export { Webhooks as Webhooks, type
|
|
179
|
-
export { YourWebhookURL as YourWebhookURL, type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
179
|
+
export { Webhooks as Webhooks, type WebhookDetails as WebhookDetails, type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse, WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
180
180
|
}
|
|
181
181
|
export { toFile, fileFromPath } from "./uploads.js";
|
|
182
182
|
export { DodoPaymentsError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import * as Uploads from "./uploads.js";
|
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
8
|
import { AddonCreateParams, AddonListParams, AddonResponse, AddonResponsesDefaultPageNumberPagination, AddonUpdateImagesResponse, AddonUpdateParams, Addons } from "./resources/addons.js";
|
|
9
9
|
import { Brand, BrandCreateParams, BrandListResponse, BrandUpdateImagesResponse, BrandUpdateParams, Brands } from "./resources/brands.js";
|
|
10
|
+
import { CheckoutSessionCreateParams, CheckoutSessionRequest, CheckoutSessionResponse, CheckoutSessions } from "./resources/checkout-sessions.js";
|
|
10
11
|
import { Discount, DiscountCreateParams, DiscountListParams, DiscountType, DiscountUpdateParams, Discounts, DiscountsDefaultPageNumberPagination } from "./resources/discounts.js";
|
|
11
12
|
import { Dispute, DisputeListParams, DisputeListResponse, DisputeListResponsesDefaultPageNumberPagination, DisputeStage, DisputeStatus, Disputes, GetDispute } from "./resources/disputes.js";
|
|
12
13
|
import { LicenseKeyInstance, LicenseKeyInstanceListParams, LicenseKeyInstanceUpdateParams, LicenseKeyInstances, LicenseKeyInstancesDefaultPageNumberPagination } from "./resources/license-key-instances.js";
|
|
@@ -16,13 +17,12 @@ import { CountryCode, Currency, Misc, MiscListSupportedCountriesResponse, TaxCat
|
|
|
16
17
|
import { AttachExistingCustomer, BillingAddress, CreateNewCustomer, CustomerLimitedDetails, CustomerRequest, IntentStatus, NewCustomer, OneTimeProductCartItem, Payment, PaymentCreateParams, PaymentCreateResponse, PaymentListParams, PaymentListResponse, PaymentListResponsesDefaultPageNumberPagination, PaymentMethodTypes, PaymentRetrieveLineItemsResponse, Payments } from "./resources/payments.js";
|
|
17
18
|
import { PayoutListParams, PayoutListResponse, PayoutListResponsesDefaultPageNumberPagination, Payouts } from "./resources/payouts.js";
|
|
18
19
|
import { Refund, RefundCreateParams, RefundListParams, RefundStatus, Refunds, RefundsDefaultPageNumberPagination } from "./resources/refunds.js";
|
|
19
|
-
import { AddonCartResponseItem, AttachAddon, Subscription, SubscriptionChangePlanParams, SubscriptionChargeParams, SubscriptionChargeResponse, SubscriptionCreateParams, SubscriptionCreateResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesDefaultPageNumberPagination, SubscriptionStatus, SubscriptionUpdateParams, Subscriptions, TimeInterval } from "./resources/subscriptions.js";
|
|
20
|
+
import { AddonCartResponseItem, AttachAddon, OnDemandSubscription, Subscription, SubscriptionChangePlanParams, SubscriptionChargeParams, SubscriptionChargeResponse, SubscriptionCreateParams, SubscriptionCreateResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesDefaultPageNumberPagination, SubscriptionStatus, SubscriptionUpdateParams, Subscriptions, TimeInterval } from "./resources/subscriptions.js";
|
|
20
21
|
import { WebhookEventType, WebhookEvents, WebhookPayload } from "./resources/webhook-events.js";
|
|
21
|
-
import { YourWebhookURL, YourWebhookURLCreateParams } from "./resources/your-webhook-url.js";
|
|
22
22
|
import { Customer, CustomerCreateParams, CustomerListParams, CustomerPortalSession, CustomerUpdateParams, Customers, CustomersDefaultPageNumberPagination } from "./resources/customers/customers.js";
|
|
23
23
|
import { Invoices } from "./resources/invoices/invoices.js";
|
|
24
24
|
import { LicenseKeyDuration, Price, Product, ProductCreateParams, ProductListParams, ProductListResponse, ProductListResponsesDefaultPageNumberPagination, ProductUpdateFilesParams, ProductUpdateFilesResponse, ProductUpdateParams, Products } from "./resources/products/products.js";
|
|
25
|
-
import { WebhookCreateParams,
|
|
25
|
+
import { WebhookCreateParams, WebhookDetails, WebhookDetailsCursorPagePagination, WebhookListParams, WebhookRetrieveSecretResponse, WebhookUpdateParams, Webhooks } from "./resources/webhooks/webhooks.js";
|
|
26
26
|
declare const environments: {
|
|
27
27
|
live_mode: string;
|
|
28
28
|
test_mode: string;
|
|
@@ -114,6 +114,7 @@ export declare class DodoPayments extends Core.APIClient {
|
|
|
114
114
|
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
115
115
|
*/
|
|
116
116
|
constructor({ baseURL, bearerToken, ...opts }?: ClientOptions);
|
|
117
|
+
checkoutSessions: API.CheckoutSessions;
|
|
117
118
|
payments: API.Payments;
|
|
118
119
|
subscriptions: API.Subscriptions;
|
|
119
120
|
invoices: API.Invoices;
|
|
@@ -131,7 +132,6 @@ export declare class DodoPayments extends Core.APIClient {
|
|
|
131
132
|
addons: API.Addons;
|
|
132
133
|
brands: API.Brands;
|
|
133
134
|
webhooks: API.Webhooks;
|
|
134
|
-
yourWebhookURL: API.YourWebhookURL;
|
|
135
135
|
protected defaultQuery(): Core.DefaultQuery | undefined;
|
|
136
136
|
protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
137
137
|
protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
|
|
@@ -159,8 +159,9 @@ export declare namespace DodoPayments {
|
|
|
159
159
|
export { type DefaultPageNumberPaginationParams as DefaultPageNumberPaginationParams, type DefaultPageNumberPaginationResponse as DefaultPageNumberPaginationResponse, };
|
|
160
160
|
export import CursorPagePagination = Pagination.CursorPagePagination;
|
|
161
161
|
export { type CursorPagePaginationParams as CursorPagePaginationParams, type CursorPagePaginationResponse as CursorPagePaginationResponse, };
|
|
162
|
+
export { CheckoutSessions as CheckoutSessions, type CheckoutSessionRequest as CheckoutSessionRequest, type CheckoutSessionResponse as CheckoutSessionResponse, type CheckoutSessionCreateParams as CheckoutSessionCreateParams, };
|
|
162
163
|
export { Payments as Payments, type AttachExistingCustomer as AttachExistingCustomer, type BillingAddress as BillingAddress, type CreateNewCustomer as CreateNewCustomer, type CustomerLimitedDetails as CustomerLimitedDetails, type CustomerRequest as CustomerRequest, type IntentStatus as IntentStatus, type NewCustomer as NewCustomer, type OneTimeProductCartItem as OneTimeProductCartItem, type Payment as Payment, type PaymentMethodTypes as PaymentMethodTypes, type PaymentCreateResponse as PaymentCreateResponse, type PaymentListResponse as PaymentListResponse, type PaymentRetrieveLineItemsResponse as PaymentRetrieveLineItemsResponse, PaymentListResponsesDefaultPageNumberPagination as PaymentListResponsesDefaultPageNumberPagination, type PaymentCreateParams as PaymentCreateParams, type PaymentListParams as PaymentListParams, };
|
|
163
|
-
export { Subscriptions as Subscriptions, type AddonCartResponseItem as AddonCartResponseItem, type AttachAddon as AttachAddon, type Subscription as Subscription, type SubscriptionStatus as SubscriptionStatus, type TimeInterval as TimeInterval, type SubscriptionCreateResponse as SubscriptionCreateResponse, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionChargeResponse as SubscriptionChargeResponse, SubscriptionListResponsesDefaultPageNumberPagination as SubscriptionListResponsesDefaultPageNumberPagination, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionChangePlanParams as SubscriptionChangePlanParams, type SubscriptionChargeParams as SubscriptionChargeParams, };
|
|
164
|
+
export { Subscriptions as Subscriptions, type AddonCartResponseItem as AddonCartResponseItem, type AttachAddon as AttachAddon, type OnDemandSubscription as OnDemandSubscription, type Subscription as Subscription, type SubscriptionStatus as SubscriptionStatus, type TimeInterval as TimeInterval, type SubscriptionCreateResponse as SubscriptionCreateResponse, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionChargeResponse as SubscriptionChargeResponse, SubscriptionListResponsesDefaultPageNumberPagination as SubscriptionListResponsesDefaultPageNumberPagination, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionChangePlanParams as SubscriptionChangePlanParams, type SubscriptionChargeParams as SubscriptionChargeParams, };
|
|
164
165
|
export { Invoices as Invoices };
|
|
165
166
|
export { Licenses as Licenses, type LicenseValidateResponse as LicenseValidateResponse, type LicenseActivateParams as LicenseActivateParams, type LicenseDeactivateParams as LicenseDeactivateParams, type LicenseValidateParams as LicenseValidateParams, };
|
|
166
167
|
export { LicenseKeys as LicenseKeys, type LicenseKey as LicenseKey, type LicenseKeyStatus as LicenseKeyStatus, LicenseKeysDefaultPageNumberPagination as LicenseKeysDefaultPageNumberPagination, type LicenseKeyUpdateParams as LicenseKeyUpdateParams, type LicenseKeyListParams as LicenseKeyListParams, };
|
|
@@ -175,8 +176,7 @@ export declare namespace DodoPayments {
|
|
|
175
176
|
export { Discounts as Discounts, type Discount as Discount, type DiscountType as DiscountType, DiscountsDefaultPageNumberPagination as DiscountsDefaultPageNumberPagination, type DiscountCreateParams as DiscountCreateParams, type DiscountUpdateParams as DiscountUpdateParams, type DiscountListParams as DiscountListParams, };
|
|
176
177
|
export { Addons as Addons, type AddonResponse as AddonResponse, type AddonUpdateImagesResponse as AddonUpdateImagesResponse, AddonResponsesDefaultPageNumberPagination as AddonResponsesDefaultPageNumberPagination, type AddonCreateParams as AddonCreateParams, type AddonUpdateParams as AddonUpdateParams, type AddonListParams as AddonListParams, };
|
|
177
178
|
export { Brands as Brands, type Brand as Brand, type BrandListResponse as BrandListResponse, type BrandUpdateImagesResponse as BrandUpdateImagesResponse, type BrandCreateParams as BrandCreateParams, type BrandUpdateParams as BrandUpdateParams, };
|
|
178
|
-
export { Webhooks as Webhooks, type
|
|
179
|
-
export { YourWebhookURL as YourWebhookURL, type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
179
|
+
export { Webhooks as Webhooks, type WebhookDetails as WebhookDetails, type WebhookRetrieveSecretResponse as WebhookRetrieveSecretResponse, WebhookDetailsCursorPagePagination as WebhookDetailsCursorPagePagination, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
|
|
180
180
|
}
|
|
181
181
|
export { toFile, fileFromPath } from "./uploads.js";
|
|
182
182
|
export { DodoPaymentsError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,O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AAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,YAAY,CAAC"}
|
package/index.js
CHANGED
|
@@ -33,6 +33,7 @@ const Uploads = __importStar(require("./uploads.js"));
|
|
|
33
33
|
const API = __importStar(require("./resources/index.js"));
|
|
34
34
|
const addons_1 = require("./resources/addons.js");
|
|
35
35
|
const brands_1 = require("./resources/brands.js");
|
|
36
|
+
const checkout_sessions_1 = require("./resources/checkout-sessions.js");
|
|
36
37
|
const discounts_1 = require("./resources/discounts.js");
|
|
37
38
|
const disputes_1 = require("./resources/disputes.js");
|
|
38
39
|
const license_key_instances_1 = require("./resources/license-key-instances.js");
|
|
@@ -44,7 +45,6 @@ const payouts_1 = require("./resources/payouts.js");
|
|
|
44
45
|
const refunds_1 = require("./resources/refunds.js");
|
|
45
46
|
const subscriptions_1 = require("./resources/subscriptions.js");
|
|
46
47
|
const webhook_events_1 = require("./resources/webhook-events.js");
|
|
47
|
-
const your_webhook_url_1 = require("./resources/your-webhook-url.js");
|
|
48
48
|
const customers_1 = require("./resources/customers/customers.js");
|
|
49
49
|
const invoices_1 = require("./resources/invoices/invoices.js");
|
|
50
50
|
const products_1 = require("./resources/products/products.js");
|
|
@@ -92,6 +92,7 @@ class DodoPayments extends Core.APIClient {
|
|
|
92
92
|
fetch: options.fetch,
|
|
93
93
|
});
|
|
94
94
|
_DodoPayments_instances.add(this);
|
|
95
|
+
this.checkoutSessions = new API.CheckoutSessions(this);
|
|
95
96
|
this.payments = new API.Payments(this);
|
|
96
97
|
this.subscriptions = new API.Subscriptions(this);
|
|
97
98
|
this.invoices = new API.Invoices(this);
|
|
@@ -109,7 +110,6 @@ class DodoPayments extends Core.APIClient {
|
|
|
109
110
|
this.addons = new API.Addons(this);
|
|
110
111
|
this.brands = new API.Brands(this);
|
|
111
112
|
this.webhooks = new API.Webhooks(this);
|
|
112
|
-
this.yourWebhookURL = new API.YourWebhookURL(this);
|
|
113
113
|
this._options = options;
|
|
114
114
|
this.bearerToken = bearerToken;
|
|
115
115
|
}
|
|
@@ -147,6 +147,7 @@ DodoPayments.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
|
147
147
|
DodoPayments.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
148
148
|
DodoPayments.toFile = Uploads.toFile;
|
|
149
149
|
DodoPayments.fileFromPath = Uploads.fileFromPath;
|
|
150
|
+
DodoPayments.CheckoutSessions = checkout_sessions_1.CheckoutSessions;
|
|
150
151
|
DodoPayments.Payments = payments_1.Payments;
|
|
151
152
|
DodoPayments.PaymentListResponsesDefaultPageNumberPagination =
|
|
152
153
|
payments_1.PaymentListResponsesDefaultPageNumberPagination;
|
|
@@ -179,8 +180,7 @@ DodoPayments.Addons = addons_1.Addons;
|
|
|
179
180
|
DodoPayments.AddonResponsesDefaultPageNumberPagination = addons_1.AddonResponsesDefaultPageNumberPagination;
|
|
180
181
|
DodoPayments.Brands = brands_1.Brands;
|
|
181
182
|
DodoPayments.Webhooks = webhooks_1.Webhooks;
|
|
182
|
-
DodoPayments.
|
|
183
|
-
DodoPayments.YourWebhookURL = your_webhook_url_1.YourWebhookURL;
|
|
183
|
+
DodoPayments.WebhookDetailsCursorPagePagination = webhooks_1.WebhookDetailsCursorPagePagination;
|
|
184
184
|
var uploads_1 = require("./uploads.js");
|
|
185
185
|
Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
|
|
186
186
|
Object.defineProperty(exports, "fileFromPath", { enumerable: true, get: function () { return uploads_1.fileFromPath; } });
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":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,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,kBAAe,YAAY,CAAC"}
|
package/index.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import * as Uploads from "./uploads.mjs";
|
|
|
7
7
|
import * as API from "./resources/index.mjs";
|
|
8
8
|
import { AddonResponsesDefaultPageNumberPagination, Addons, } from "./resources/addons.mjs";
|
|
9
9
|
import { Brands, } from "./resources/brands.mjs";
|
|
10
|
+
import { CheckoutSessions, } from "./resources/checkout-sessions.mjs";
|
|
10
11
|
import { Discounts, DiscountsDefaultPageNumberPagination, } from "./resources/discounts.mjs";
|
|
11
12
|
import { DisputeListResponsesDefaultPageNumberPagination, Disputes, } from "./resources/disputes.mjs";
|
|
12
13
|
import { LicenseKeyInstances, LicenseKeyInstancesDefaultPageNumberPagination, } from "./resources/license-key-instances.mjs";
|
|
@@ -18,11 +19,10 @@ import { PayoutListResponsesDefaultPageNumberPagination, Payouts, } from "./reso
|
|
|
18
19
|
import { Refunds, RefundsDefaultPageNumberPagination, } from "./resources/refunds.mjs";
|
|
19
20
|
import { SubscriptionListResponsesDefaultPageNumberPagination, Subscriptions, } from "./resources/subscriptions.mjs";
|
|
20
21
|
import { WebhookEvents } from "./resources/webhook-events.mjs";
|
|
21
|
-
import { YourWebhookURL } from "./resources/your-webhook-url.mjs";
|
|
22
22
|
import { Customers, CustomersDefaultPageNumberPagination, } from "./resources/customers/customers.mjs";
|
|
23
23
|
import { Invoices } from "./resources/invoices/invoices.mjs";
|
|
24
24
|
import { ProductListResponsesDefaultPageNumberPagination, Products, } from "./resources/products/products.mjs";
|
|
25
|
-
import {
|
|
25
|
+
import { WebhookDetailsCursorPagePagination, Webhooks, } from "./resources/webhooks/webhooks.mjs";
|
|
26
26
|
const environments = {
|
|
27
27
|
live_mode: 'https://live.dodopayments.com',
|
|
28
28
|
test_mode: 'https://test.dodopayments.com',
|
|
@@ -66,6 +66,7 @@ export class DodoPayments extends Core.APIClient {
|
|
|
66
66
|
fetch: options.fetch,
|
|
67
67
|
});
|
|
68
68
|
_DodoPayments_instances.add(this);
|
|
69
|
+
this.checkoutSessions = new API.CheckoutSessions(this);
|
|
69
70
|
this.payments = new API.Payments(this);
|
|
70
71
|
this.subscriptions = new API.Subscriptions(this);
|
|
71
72
|
this.invoices = new API.Invoices(this);
|
|
@@ -83,7 +84,6 @@ export class DodoPayments extends Core.APIClient {
|
|
|
83
84
|
this.addons = new API.Addons(this);
|
|
84
85
|
this.brands = new API.Brands(this);
|
|
85
86
|
this.webhooks = new API.Webhooks(this);
|
|
86
|
-
this.yourWebhookURL = new API.YourWebhookURL(this);
|
|
87
87
|
this._options = options;
|
|
88
88
|
this.bearerToken = bearerToken;
|
|
89
89
|
}
|
|
@@ -120,6 +120,7 @@ DodoPayments.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
|
120
120
|
DodoPayments.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
121
121
|
DodoPayments.toFile = Uploads.toFile;
|
|
122
122
|
DodoPayments.fileFromPath = Uploads.fileFromPath;
|
|
123
|
+
DodoPayments.CheckoutSessions = CheckoutSessions;
|
|
123
124
|
DodoPayments.Payments = Payments;
|
|
124
125
|
DodoPayments.PaymentListResponsesDefaultPageNumberPagination =
|
|
125
126
|
PaymentListResponsesDefaultPageNumberPagination;
|
|
@@ -152,8 +153,7 @@ DodoPayments.Addons = Addons;
|
|
|
152
153
|
DodoPayments.AddonResponsesDefaultPageNumberPagination = AddonResponsesDefaultPageNumberPagination;
|
|
153
154
|
DodoPayments.Brands = Brands;
|
|
154
155
|
DodoPayments.Webhooks = Webhooks;
|
|
155
|
-
DodoPayments.
|
|
156
|
-
DodoPayments.YourWebhookURL = YourWebhookURL;
|
|
156
|
+
DodoPayments.WebhookDetailsCursorPagePagination = WebhookDetailsCursorPagePagination;
|
|
157
157
|
export { toFile, fileFromPath } from "./uploads.mjs";
|
|
158
158
|
export { DodoPaymentsError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
|
|
159
159
|
export default DodoPayments;
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAOf,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAIL,yCAAyC,EAGzC,MAAM,GACP;OACM,EAML,MAAM,GACP;OACM,EAML,SAAS,EACT,oCAAoC,GACrC;OACM,EAIL,+CAA+C,EAG/C,QAAQ,GAET;OACM,EAIL,mBAAmB,EACnB,8CAA8C,GAC/C;OACM,EAKL,WAAW,EACX,sCAAsC,GACvC;OACM,EAKL,QAAQ,GACT;OACM,EAGL,IAAI,GAGL;OACM,EAcL,+CAA+C,EAG/C,QAAQ,GACT;OACM,EAGL,8CAA8C,EAC9C,OAAO,GACR;OACM,EAKL,OAAO,EACP,kCAAkC,GACnC;OACM,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,UAAU;OAOf,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAIL,yCAAyC,EAGzC,MAAM,GACP;OACM,EAML,MAAM,GACP;OACM,EAIL,gBAAgB,GACjB;OACM,EAML,SAAS,EACT,oCAAoC,GACrC;OACM,EAIL,+CAA+C,EAG/C,QAAQ,GAET;OACM,EAIL,mBAAmB,EACnB,8CAA8C,GAC/C;OACM,EAKL,WAAW,EACX,sCAAsC,GACvC;OACM,EAKL,QAAQ,GACT;OACM,EAGL,IAAI,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