@whop/sdk 0.0.25 → 0.0.27
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 +58 -0
- package/client.d.mts +29 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -25
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -5
- 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 +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +36 -104
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +36 -104
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +43 -9
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +43 -9
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +23 -109
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +23 -109
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/dm-channels.d.mts +161 -0
- package/resources/dm-channels.d.mts.map +1 -0
- package/resources/dm-channels.d.ts +161 -0
- package/resources/dm-channels.d.ts.map +1 -0
- package/resources/dm-channels.js +87 -0
- package/resources/dm-channels.js.map +1 -0
- package/resources/dm-channels.mjs +83 -0
- package/resources/dm-channels.mjs.map +1 -0
- package/resources/dm-members.d.mts +14 -66
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +14 -66
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +9 -5
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +9 -5
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +12 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -11
- 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 +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +21 -189
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +21 -189
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +12 -9
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +12 -9
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +14 -14
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +14 -14
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +1 -1
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +1 -1
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +25 -15
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -15
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +59 -19
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +59 -19
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +14 -9
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +14 -9
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +209 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +209 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +12 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +12 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +105 -350
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +105 -350
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +32 -139
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +32 -139
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +87 -41
- package/src/internal/parse.ts +6 -0
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +36 -122
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +49 -9
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +24 -126
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +16 -78
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +10 -4
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +38 -18
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +21 -217
- package/src/resources/ledger-accounts.ts +12 -42
- package/src/resources/members.ts +15 -15
- package/src/resources/memberships.ts +34 -30
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +67 -17
- package/src/resources/payout-methods.ts +21 -8
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +217 -145
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +50 -37
- package/src/resources/webhooks.ts +138 -785
- package/src/resources/withdrawals.ts +39 -216
- 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/plans.ts
CHANGED
|
@@ -118,18 +118,18 @@ export class Plans extends APIResource {
|
|
|
118
118
|
export type PlanListResponsesCursorPage = CursorPage<PlanListResponse>;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* A plan
|
|
122
|
-
*
|
|
123
|
-
*
|
|
121
|
+
* A plan defines pricing and billing terms for a product. Each product can have
|
|
122
|
+
* multiple plans representing different pricing options, such as one-time
|
|
123
|
+
* payments, recurring subscriptions, or free trials.
|
|
124
124
|
*/
|
|
125
125
|
export interface PlanListResponse {
|
|
126
126
|
/**
|
|
127
|
-
* The
|
|
127
|
+
* The unique identifier for the plan.
|
|
128
128
|
*/
|
|
129
129
|
id: string;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
* The interval at which the plan charges (renewal plans).
|
|
132
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
133
133
|
*/
|
|
134
134
|
billing_period: number | null;
|
|
135
135
|
|
|
@@ -139,7 +139,7 @@ export interface PlanListResponse {
|
|
|
139
139
|
company: PlanListResponse.Company | null;
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
*
|
|
142
|
+
* The datetime the plan was created.
|
|
143
143
|
*/
|
|
144
144
|
created_at: string;
|
|
145
145
|
|
|
@@ -154,12 +154,15 @@ export interface PlanListResponse {
|
|
|
154
154
|
description: string | null;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* The
|
|
157
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
158
|
+
* For example, 365 for a one-year access pass.
|
|
158
159
|
*/
|
|
159
160
|
expiration_days: number | null;
|
|
160
161
|
|
|
161
162
|
/**
|
|
162
|
-
* The
|
|
163
|
+
* The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).
|
|
164
|
+
* For one-time plans, this is the full price. For renewal plans, this is charged
|
|
165
|
+
* on top of the first renewal_price.
|
|
163
166
|
*/
|
|
164
167
|
initial_price: number;
|
|
165
168
|
|
|
@@ -204,7 +207,8 @@ export interface PlanListResponse {
|
|
|
204
207
|
release_method: Shared.ReleaseMethod;
|
|
205
208
|
|
|
206
209
|
/**
|
|
207
|
-
* The price
|
|
210
|
+
* The recurring price charged every billing_period in the plan's base_currency
|
|
211
|
+
* (e.g., 9.99 for $9.99/period). Zero for one-time plans.
|
|
208
212
|
*/
|
|
209
213
|
renewal_price: number;
|
|
210
214
|
|
|
@@ -229,12 +233,13 @@ export interface PlanListResponse {
|
|
|
229
233
|
trial_period_days: number | null;
|
|
230
234
|
|
|
231
235
|
/**
|
|
232
|
-
*
|
|
236
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
237
|
+
* purchases are limited by the stock field.
|
|
233
238
|
*/
|
|
234
239
|
unlimited_stock: boolean;
|
|
235
240
|
|
|
236
241
|
/**
|
|
237
|
-
*
|
|
242
|
+
* The datetime the plan was last updated.
|
|
238
243
|
*/
|
|
239
244
|
updated_at: string;
|
|
240
245
|
|
|
@@ -250,7 +255,7 @@ export namespace PlanListResponse {
|
|
|
250
255
|
*/
|
|
251
256
|
export interface Company {
|
|
252
257
|
/**
|
|
253
|
-
* The
|
|
258
|
+
* The unique identifier for the company.
|
|
254
259
|
*/
|
|
255
260
|
id: string;
|
|
256
261
|
|
|
@@ -265,7 +270,7 @@ export namespace PlanListResponse {
|
|
|
265
270
|
*/
|
|
266
271
|
export interface Invoice {
|
|
267
272
|
/**
|
|
268
|
-
* The
|
|
273
|
+
* The unique identifier for the invoice.
|
|
269
274
|
*/
|
|
270
275
|
id: string;
|
|
271
276
|
}
|
|
@@ -301,7 +306,7 @@ export namespace PlanListResponse {
|
|
|
301
306
|
*/
|
|
302
307
|
export interface Product {
|
|
303
308
|
/**
|
|
304
|
-
* The
|
|
309
|
+
* The unique identifier for the product.
|
|
305
310
|
*/
|
|
306
311
|
id: string;
|
|
307
312
|
|
|
@@ -361,7 +366,7 @@ export interface PlanCreateParams {
|
|
|
361
366
|
/**
|
|
362
367
|
* An additional amount charged upon first purchase. Use only if a one time payment
|
|
363
368
|
* OR you want to charge an additional amount on top of the renewal price. Provided
|
|
364
|
-
* as a number in
|
|
369
|
+
* as a number in the specified currency. Eg: 10.43 for $10.43
|
|
365
370
|
*/
|
|
366
371
|
initial_price?: number | null;
|
|
367
372
|
|
|
@@ -399,7 +404,7 @@ export interface PlanCreateParams {
|
|
|
399
404
|
|
|
400
405
|
/**
|
|
401
406
|
* The amount the customer is charged every billing period. Use only if a recurring
|
|
402
|
-
* payment. Provided as a number in
|
|
407
|
+
* payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
|
|
403
408
|
*/
|
|
404
409
|
renewal_price?: number | null;
|
|
405
410
|
|
|
@@ -424,7 +429,8 @@ export interface PlanCreateParams {
|
|
|
424
429
|
trial_period_days?: number | null;
|
|
425
430
|
|
|
426
431
|
/**
|
|
427
|
-
*
|
|
432
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
433
|
+
* purchases are limited by the stock field.
|
|
428
434
|
*/
|
|
429
435
|
unlimited_stock?: boolean | null;
|
|
430
436
|
|
|
@@ -507,7 +513,7 @@ export namespace PlanCreateParams {
|
|
|
507
513
|
|
|
508
514
|
export interface PlanUpdateParams {
|
|
509
515
|
/**
|
|
510
|
-
* The interval at which the plan charges (renewal plans).
|
|
516
|
+
* The interval in days at which the plan charges (renewal plans).
|
|
511
517
|
*/
|
|
512
518
|
billing_period?: number | null;
|
|
513
519
|
|
|
@@ -527,7 +533,8 @@ export interface PlanUpdateParams {
|
|
|
527
533
|
description?: string | null;
|
|
528
534
|
|
|
529
535
|
/**
|
|
530
|
-
* The
|
|
536
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
537
|
+
* For example, 365 for a one-year access pass.
|
|
531
538
|
*/
|
|
532
539
|
expiration_days?: number | null;
|
|
533
540
|
|
|
@@ -537,7 +544,8 @@ export interface PlanUpdateParams {
|
|
|
537
544
|
image?: PlanUpdateParams.Image | null;
|
|
538
545
|
|
|
539
546
|
/**
|
|
540
|
-
* An additional amount charged upon first purchase.
|
|
547
|
+
* An additional amount charged upon first purchase. Provided as a number in the
|
|
548
|
+
* specified currency. Eg: 10.43 for $10.43 USD.
|
|
541
549
|
*/
|
|
542
550
|
initial_price?: number | null;
|
|
543
551
|
|
|
@@ -569,7 +577,8 @@ export interface PlanUpdateParams {
|
|
|
569
577
|
payment_method_configuration?: PlanUpdateParams.PaymentMethodConfiguration | null;
|
|
570
578
|
|
|
571
579
|
/**
|
|
572
|
-
* The amount the customer is charged every billing period.
|
|
580
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
581
|
+
* the specified currency. Eg: 10.43 for $10.43 USD.
|
|
573
582
|
*/
|
|
574
583
|
renewal_price?: number | null;
|
|
575
584
|
|
|
@@ -580,13 +589,13 @@ export interface PlanUpdateParams {
|
|
|
580
589
|
|
|
581
590
|
/**
|
|
582
591
|
* The price to display with a strikethrough for the initial price. Provided as a
|
|
583
|
-
* number in
|
|
592
|
+
* number in the specified currency. Eg: 19.99 for $19.99
|
|
584
593
|
*/
|
|
585
594
|
strike_through_initial_price?: number | null;
|
|
586
595
|
|
|
587
596
|
/**
|
|
588
597
|
* The price to display with a strikethrough for the renewal price. Provided as a
|
|
589
|
-
* number in
|
|
598
|
+
* number in the specified currency. Eg: 19.99 for $19.99
|
|
590
599
|
*/
|
|
591
600
|
strike_through_renewal_price?: number | null;
|
|
592
601
|
|
|
@@ -601,7 +610,8 @@ export interface PlanUpdateParams {
|
|
|
601
610
|
trial_period_days?: number | null;
|
|
602
611
|
|
|
603
612
|
/**
|
|
604
|
-
*
|
|
613
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
614
|
+
* purchases are limited by the stock field.
|
|
605
615
|
*/
|
|
606
616
|
unlimited_stock?: boolean | null;
|
|
607
617
|
|
|
@@ -248,7 +248,8 @@ export namespace ProductCreateParams {
|
|
|
248
248
|
custom_fields?: Array<PlanOptions.CustomField> | null;
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
|
-
* An additional amount charged upon first purchase.
|
|
251
|
+
* An additional amount charged upon first purchase. Provided as a number in the
|
|
252
|
+
* specified currency. Eg: 10.43 for $10.43 USD.
|
|
252
253
|
*/
|
|
253
254
|
initial_price?: number | null;
|
|
254
255
|
|
|
@@ -263,7 +264,8 @@ export namespace ProductCreateParams {
|
|
|
263
264
|
release_method?: Shared.ReleaseMethod | null;
|
|
264
265
|
|
|
265
266
|
/**
|
|
266
|
-
* The amount the customer is charged every billing period.
|
|
267
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
268
|
+
* the specified currency. Eg: 10.43 for $10.43 USD.
|
|
267
269
|
*/
|
|
268
270
|
renewal_price?: number | null;
|
|
269
271
|
|
|
@@ -99,16 +99,20 @@ export class PromoCodes extends APIResource {
|
|
|
99
99
|
export type PromoCodeListResponsesCursorPage = CursorPage<PromoCodeListResponse>;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* A promo code applies a discount to a plan during checkout. Promo codes can be
|
|
103
|
+
* percentage-based or fixed-amount, and can have usage limits and expiration
|
|
104
|
+
* dates.
|
|
103
105
|
*/
|
|
104
106
|
export interface PromoCode {
|
|
105
107
|
/**
|
|
106
|
-
* The
|
|
108
|
+
* The unique identifier for the promo code.
|
|
107
109
|
*/
|
|
108
110
|
id: string;
|
|
109
111
|
|
|
110
112
|
/**
|
|
111
|
-
* The amount
|
|
113
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
114
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
115
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
112
116
|
*/
|
|
113
117
|
amount_off: number;
|
|
114
118
|
|
|
@@ -128,7 +132,7 @@ export interface PromoCode {
|
|
|
128
132
|
company: PromoCode.Company;
|
|
129
133
|
|
|
130
134
|
/**
|
|
131
|
-
* The
|
|
135
|
+
* The datetime the promo code was created.
|
|
132
136
|
*/
|
|
133
137
|
created_at: string;
|
|
134
138
|
|
|
@@ -205,7 +209,7 @@ export namespace PromoCode {
|
|
|
205
209
|
*/
|
|
206
210
|
export interface Company {
|
|
207
211
|
/**
|
|
208
|
-
* The
|
|
212
|
+
* The unique identifier for the company.
|
|
209
213
|
*/
|
|
210
214
|
id: string;
|
|
211
215
|
|
|
@@ -220,7 +224,7 @@ export namespace PromoCode {
|
|
|
220
224
|
*/
|
|
221
225
|
export interface Product {
|
|
222
226
|
/**
|
|
223
|
-
* The
|
|
227
|
+
* The unique identifier for the product.
|
|
224
228
|
*/
|
|
225
229
|
id: string;
|
|
226
230
|
|
|
@@ -242,16 +246,20 @@ export type PromoCodeStatus = 'active' | 'inactive' | 'archived';
|
|
|
242
246
|
export type PromoDuration = 'forever' | 'once' | 'repeating';
|
|
243
247
|
|
|
244
248
|
/**
|
|
245
|
-
*
|
|
249
|
+
* A promo code applies a discount to a plan during checkout. Promo codes can be
|
|
250
|
+
* percentage-based or fixed-amount, and can have usage limits and expiration
|
|
251
|
+
* dates.
|
|
246
252
|
*/
|
|
247
253
|
export interface PromoCodeListResponse {
|
|
248
254
|
/**
|
|
249
|
-
* The
|
|
255
|
+
* The unique identifier for the promo code.
|
|
250
256
|
*/
|
|
251
257
|
id: string;
|
|
252
258
|
|
|
253
259
|
/**
|
|
254
|
-
* The amount
|
|
260
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
261
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
262
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
255
263
|
*/
|
|
256
264
|
amount_off: number;
|
|
257
265
|
|
|
@@ -266,7 +274,7 @@ export interface PromoCodeListResponse {
|
|
|
266
274
|
code: string | null;
|
|
267
275
|
|
|
268
276
|
/**
|
|
269
|
-
* The
|
|
277
|
+
* The datetime the promo code was created.
|
|
270
278
|
*/
|
|
271
279
|
created_at: string;
|
|
272
280
|
|
|
@@ -343,7 +351,7 @@ export namespace PromoCodeListResponse {
|
|
|
343
351
|
*/
|
|
344
352
|
export interface Product {
|
|
345
353
|
/**
|
|
346
|
-
* The
|
|
354
|
+
* The unique identifier for the product.
|
|
347
355
|
*/
|
|
348
356
|
id: string;
|
|
349
357
|
|
|
@@ -361,7 +369,9 @@ export type PromoCodeDeleteResponse = boolean;
|
|
|
361
369
|
|
|
362
370
|
export interface PromoCodeCreateParams {
|
|
363
371
|
/**
|
|
364
|
-
* The amount
|
|
372
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
373
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
374
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
365
375
|
*/
|
|
366
376
|
amount_off: number;
|
|
367
377
|
|
package/src/resources/refunds.ts
CHANGED
|
@@ -52,7 +52,8 @@ export type PaymentProvider =
|
|
|
52
52
|
| 'splitit'
|
|
53
53
|
| 'platform_balance'
|
|
54
54
|
| 'multi_psp'
|
|
55
|
-
| 'adyen'
|
|
55
|
+
| 'adyen'
|
|
56
|
+
| 'claritypay';
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* The status of the refund reference.
|
|
@@ -73,21 +74,23 @@ export type RefundReferenceType =
|
|
|
73
74
|
export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
|
|
74
75
|
|
|
75
76
|
/**
|
|
76
|
-
*
|
|
77
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
78
|
+
* amount, status, and payment provider.
|
|
77
79
|
*/
|
|
78
80
|
export interface RefundRetrieveResponse {
|
|
79
81
|
/**
|
|
80
|
-
* The
|
|
82
|
+
* The unique identifier for the refund.
|
|
81
83
|
*/
|
|
82
84
|
id: string;
|
|
83
85
|
|
|
84
86
|
/**
|
|
85
|
-
* The amount of the refund.
|
|
87
|
+
* The amount of the refund. Provided as a number in the specified currency. Eg:
|
|
88
|
+
* 10.43 for $10.43 USD.
|
|
86
89
|
*/
|
|
87
90
|
amount: number;
|
|
88
91
|
|
|
89
92
|
/**
|
|
90
|
-
* The
|
|
93
|
+
* The datetime the refund was created.
|
|
91
94
|
*/
|
|
92
95
|
created_at: string;
|
|
93
96
|
|
|
@@ -138,7 +141,7 @@ export namespace RefundRetrieveResponse {
|
|
|
138
141
|
*/
|
|
139
142
|
export interface Payment {
|
|
140
143
|
/**
|
|
141
|
-
* The payment
|
|
144
|
+
* The unique identifier for the payment.
|
|
142
145
|
*/
|
|
143
146
|
id: string;
|
|
144
147
|
|
|
@@ -158,7 +161,7 @@ export namespace RefundRetrieveResponse {
|
|
|
158
161
|
card_last4: string | null;
|
|
159
162
|
|
|
160
163
|
/**
|
|
161
|
-
* The datetime the payment was created
|
|
164
|
+
* The datetime the payment was created.
|
|
162
165
|
*/
|
|
163
166
|
created_at: string;
|
|
164
167
|
|
|
@@ -219,7 +222,7 @@ export namespace RefundRetrieveResponse {
|
|
|
219
222
|
*/
|
|
220
223
|
export interface Member {
|
|
221
224
|
/**
|
|
222
|
-
* The
|
|
225
|
+
* The unique identifier for the company member.
|
|
223
226
|
*/
|
|
224
227
|
id: string;
|
|
225
228
|
|
|
@@ -234,7 +237,7 @@ export namespace RefundRetrieveResponse {
|
|
|
234
237
|
*/
|
|
235
238
|
export interface Membership {
|
|
236
239
|
/**
|
|
237
|
-
* The
|
|
240
|
+
* The unique identifier for the membership.
|
|
238
241
|
*/
|
|
239
242
|
id: string;
|
|
240
243
|
|
|
@@ -249,7 +252,7 @@ export namespace RefundRetrieveResponse {
|
|
|
249
252
|
*/
|
|
250
253
|
export interface User {
|
|
251
254
|
/**
|
|
252
|
-
* The
|
|
255
|
+
* The unique identifier for the user.
|
|
253
256
|
*/
|
|
254
257
|
id: string;
|
|
255
258
|
|
|
@@ -272,21 +275,23 @@ export namespace RefundRetrieveResponse {
|
|
|
272
275
|
}
|
|
273
276
|
|
|
274
277
|
/**
|
|
275
|
-
*
|
|
278
|
+
* A refund represents a full or partial reversal of a payment, including the
|
|
279
|
+
* amount, status, and payment provider.
|
|
276
280
|
*/
|
|
277
281
|
export interface RefundListResponse {
|
|
278
282
|
/**
|
|
279
|
-
* The
|
|
283
|
+
* The unique identifier for the refund.
|
|
280
284
|
*/
|
|
281
285
|
id: string;
|
|
282
286
|
|
|
283
287
|
/**
|
|
284
|
-
* The amount of the refund.
|
|
288
|
+
* The amount of the refund. Provided as a number in the specified currency. Eg:
|
|
289
|
+
* 10.43 for $10.43 USD.
|
|
285
290
|
*/
|
|
286
291
|
amount: number;
|
|
287
292
|
|
|
288
293
|
/**
|
|
289
|
-
* The
|
|
294
|
+
* The datetime the refund was created.
|
|
290
295
|
*/
|
|
291
296
|
created_at: string;
|
|
292
297
|
|
|
@@ -337,7 +342,7 @@ export namespace RefundListResponse {
|
|
|
337
342
|
*/
|
|
338
343
|
export interface Payment {
|
|
339
344
|
/**
|
|
340
|
-
* The payment
|
|
345
|
+
* The unique identifier for the payment.
|
|
341
346
|
*/
|
|
342
347
|
id: string;
|
|
343
348
|
}
|
package/src/resources/reviews.ts
CHANGED
|
@@ -37,7 +37,7 @@ export type ReviewStatus = 'pending' | 'published' | 'removed';
|
|
|
37
37
|
*/
|
|
38
38
|
export interface ReviewRetrieveResponse {
|
|
39
39
|
/**
|
|
40
|
-
* The
|
|
40
|
+
* The unique identifier for the review.
|
|
41
41
|
*/
|
|
42
42
|
id: string;
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ export interface ReviewRetrieveResponse {
|
|
|
52
52
|
company: ReviewRetrieveResponse.Company;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* The
|
|
55
|
+
* The datetime the review was created.
|
|
56
56
|
*/
|
|
57
57
|
created_at: string;
|
|
58
58
|
|
|
@@ -98,7 +98,7 @@ export interface ReviewRetrieveResponse {
|
|
|
98
98
|
title: string | null;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* The
|
|
101
|
+
* The datetime the review was last updated.
|
|
102
102
|
*/
|
|
103
103
|
updated_at: string;
|
|
104
104
|
|
|
@@ -140,7 +140,7 @@ export namespace ReviewRetrieveResponse {
|
|
|
140
140
|
*/
|
|
141
141
|
export interface Company {
|
|
142
142
|
/**
|
|
143
|
-
* The
|
|
143
|
+
* The unique identifier for the company.
|
|
144
144
|
*/
|
|
145
145
|
id: string;
|
|
146
146
|
|
|
@@ -160,7 +160,7 @@ export namespace ReviewRetrieveResponse {
|
|
|
160
160
|
*/
|
|
161
161
|
export interface Product {
|
|
162
162
|
/**
|
|
163
|
-
* The
|
|
163
|
+
* The unique identifier for the product.
|
|
164
164
|
*/
|
|
165
165
|
id: string;
|
|
166
166
|
|
|
@@ -175,7 +175,7 @@ export namespace ReviewRetrieveResponse {
|
|
|
175
175
|
*/
|
|
176
176
|
export interface User {
|
|
177
177
|
/**
|
|
178
|
-
* The
|
|
178
|
+
* The unique identifier for the user.
|
|
179
179
|
*/
|
|
180
180
|
id: string;
|
|
181
181
|
|
|
@@ -196,7 +196,7 @@ export namespace ReviewRetrieveResponse {
|
|
|
196
196
|
*/
|
|
197
197
|
export interface ReviewListResponse {
|
|
198
198
|
/**
|
|
199
|
-
* The
|
|
199
|
+
* The unique identifier for the review.
|
|
200
200
|
*/
|
|
201
201
|
id: string;
|
|
202
202
|
|
|
@@ -206,7 +206,7 @@ export interface ReviewListResponse {
|
|
|
206
206
|
attachments: Array<ReviewListResponse.Attachment>;
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* The
|
|
209
|
+
* The datetime the review was created.
|
|
210
210
|
*/
|
|
211
211
|
created_at: string;
|
|
212
212
|
|
|
@@ -247,7 +247,7 @@ export interface ReviewListResponse {
|
|
|
247
247
|
title: string | null;
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
|
-
* The
|
|
250
|
+
* The datetime the review was last updated.
|
|
251
251
|
*/
|
|
252
252
|
updated_at: string;
|
|
253
253
|
|
|
@@ -289,7 +289,7 @@ export namespace ReviewListResponse {
|
|
|
289
289
|
*/
|
|
290
290
|
export interface User {
|
|
291
291
|
/**
|
|
292
|
-
* The
|
|
292
|
+
* The unique identifier for the user.
|
|
293
293
|
*/
|
|
294
294
|
id: string;
|
|
295
295
|
|
|
@@ -53,12 +53,11 @@ export class SetupIntents extends APIResource {
|
|
|
53
53
|
export type SetupIntentListResponsesCursorPage = CursorPage<SetupIntentListResponse>;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
* to add a payment method to their account without making a purchase.
|
|
56
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
58
57
|
*/
|
|
59
58
|
export interface SetupIntent {
|
|
60
59
|
/**
|
|
61
|
-
* The setup intent
|
|
60
|
+
* The unique identifier for the setup intent.
|
|
62
61
|
*/
|
|
63
62
|
id: string;
|
|
64
63
|
|
|
@@ -73,7 +72,7 @@ export interface SetupIntent {
|
|
|
73
72
|
company: SetupIntent.Company | null;
|
|
74
73
|
|
|
75
74
|
/**
|
|
76
|
-
* The datetime the
|
|
75
|
+
* The datetime the setup intent was created.
|
|
77
76
|
*/
|
|
78
77
|
created_at: string;
|
|
79
78
|
|
|
@@ -109,7 +108,7 @@ export namespace SetupIntent {
|
|
|
109
108
|
*/
|
|
110
109
|
export interface CheckoutConfiguration {
|
|
111
110
|
/**
|
|
112
|
-
* The
|
|
111
|
+
* The unique identifier for the checkout session.
|
|
113
112
|
*/
|
|
114
113
|
id: string;
|
|
115
114
|
}
|
|
@@ -119,7 +118,7 @@ export namespace SetupIntent {
|
|
|
119
118
|
*/
|
|
120
119
|
export interface Company {
|
|
121
120
|
/**
|
|
122
|
-
* The
|
|
121
|
+
* The unique identifier for the company.
|
|
123
122
|
*/
|
|
124
123
|
id: string;
|
|
125
124
|
}
|
|
@@ -129,7 +128,7 @@ export namespace SetupIntent {
|
|
|
129
128
|
*/
|
|
130
129
|
export interface Member {
|
|
131
130
|
/**
|
|
132
|
-
* The
|
|
131
|
+
* The unique identifier for the company member.
|
|
133
132
|
*/
|
|
134
133
|
id: string;
|
|
135
134
|
|
|
@@ -145,7 +144,7 @@ export namespace SetupIntent {
|
|
|
145
144
|
*/
|
|
146
145
|
export interface User {
|
|
147
146
|
/**
|
|
148
|
-
* The
|
|
147
|
+
* The unique identifier for the company member user.
|
|
149
148
|
*/
|
|
150
149
|
id: string;
|
|
151
150
|
|
|
@@ -171,7 +170,7 @@ export namespace SetupIntent {
|
|
|
171
170
|
*/
|
|
172
171
|
export interface PaymentMethod {
|
|
173
172
|
/**
|
|
174
|
-
* The
|
|
173
|
+
* The unique identifier for the payment token.
|
|
175
174
|
*/
|
|
176
175
|
id: string;
|
|
177
176
|
|
|
@@ -181,7 +180,7 @@ export namespace SetupIntent {
|
|
|
181
180
|
card: PaymentMethod.Card | null;
|
|
182
181
|
|
|
183
182
|
/**
|
|
184
|
-
* The
|
|
183
|
+
* The datetime the payment token was created.
|
|
185
184
|
*/
|
|
186
185
|
created_at: string;
|
|
187
186
|
|
|
@@ -225,12 +224,11 @@ export namespace SetupIntent {
|
|
|
225
224
|
export type SetupIntentStatus = 'processing' | 'succeeded' | 'canceled' | 'requires_action';
|
|
226
225
|
|
|
227
226
|
/**
|
|
228
|
-
*
|
|
229
|
-
* to add a payment method to their account without making a purchase.
|
|
227
|
+
* A setup intent allows a user to save a payment method without making a purchase.
|
|
230
228
|
*/
|
|
231
229
|
export interface SetupIntentListResponse {
|
|
232
230
|
/**
|
|
233
|
-
* The setup intent
|
|
231
|
+
* The unique identifier for the setup intent.
|
|
234
232
|
*/
|
|
235
233
|
id: string;
|
|
236
234
|
|
|
@@ -245,7 +243,7 @@ export interface SetupIntentListResponse {
|
|
|
245
243
|
company: SetupIntentListResponse.Company | null;
|
|
246
244
|
|
|
247
245
|
/**
|
|
248
|
-
* The datetime the
|
|
246
|
+
* The datetime the setup intent was created.
|
|
249
247
|
*/
|
|
250
248
|
created_at: string;
|
|
251
249
|
|
|
@@ -281,7 +279,7 @@ export namespace SetupIntentListResponse {
|
|
|
281
279
|
*/
|
|
282
280
|
export interface CheckoutConfiguration {
|
|
283
281
|
/**
|
|
284
|
-
* The
|
|
282
|
+
* The unique identifier for the checkout session.
|
|
285
283
|
*/
|
|
286
284
|
id: string;
|
|
287
285
|
}
|
|
@@ -291,7 +289,7 @@ export namespace SetupIntentListResponse {
|
|
|
291
289
|
*/
|
|
292
290
|
export interface Company {
|
|
293
291
|
/**
|
|
294
|
-
* The
|
|
292
|
+
* The unique identifier for the company.
|
|
295
293
|
*/
|
|
296
294
|
id: string;
|
|
297
295
|
}
|
|
@@ -301,7 +299,7 @@ export namespace SetupIntentListResponse {
|
|
|
301
299
|
*/
|
|
302
300
|
export interface Member {
|
|
303
301
|
/**
|
|
304
|
-
* The
|
|
302
|
+
* The unique identifier for the company member.
|
|
305
303
|
*/
|
|
306
304
|
id: string;
|
|
307
305
|
|
|
@@ -317,7 +315,7 @@ export namespace SetupIntentListResponse {
|
|
|
317
315
|
*/
|
|
318
316
|
export interface User {
|
|
319
317
|
/**
|
|
320
|
-
* The
|
|
318
|
+
* The unique identifier for the company member user.
|
|
321
319
|
*/
|
|
322
320
|
id: string;
|
|
323
321
|
|
|
@@ -343,7 +341,7 @@ export namespace SetupIntentListResponse {
|
|
|
343
341
|
*/
|
|
344
342
|
export interface PaymentMethod {
|
|
345
343
|
/**
|
|
346
|
-
* The
|
|
344
|
+
* The unique identifier for the payment token.
|
|
347
345
|
*/
|
|
348
346
|
id: string;
|
|
349
347
|
|
|
@@ -353,7 +351,7 @@ export namespace SetupIntentListResponse {
|
|
|
353
351
|
card: PaymentMethod.Card | null;
|
|
354
352
|
|
|
355
353
|
/**
|
|
356
|
-
* The
|
|
354
|
+
* The datetime the payment token was created.
|
|
357
355
|
*/
|
|
358
356
|
created_at: string;
|
|
359
357
|
|