@whop/sdk 0.0.22 → 0.0.23

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/upload-file.d.mts +39 -0
  11. package/lib/upload-file.d.mts.map +1 -0
  12. package/lib/upload-file.d.ts +39 -0
  13. package/lib/upload-file.d.ts.map +1 -0
  14. package/lib/upload-file.js +68 -0
  15. package/lib/upload-file.js.map +1 -0
  16. package/lib/upload-file.mjs +65 -0
  17. package/lib/upload-file.mjs.map +1 -0
  18. package/package.json +1 -1
  19. package/resources/files.d.mts +104 -0
  20. package/resources/files.d.mts.map +1 -0
  21. package/resources/files.d.ts +104 -0
  22. package/resources/files.d.ts.map +1 -0
  23. package/resources/files.js +35 -0
  24. package/resources/files.js.map +1 -0
  25. package/resources/files.mjs +31 -0
  26. package/resources/files.mjs.map +1 -0
  27. package/resources/index.d.mts +2 -1
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +2 -1
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +3 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +1 -0
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/payments.d.mts +1 -1
  36. package/resources/payments.d.mts.map +1 -1
  37. package/resources/payments.d.ts +1 -1
  38. package/resources/payments.d.ts.map +1 -1
  39. package/resources/plans.d.mts +8 -0
  40. package/resources/plans.d.mts.map +1 -1
  41. package/resources/plans.d.ts +8 -0
  42. package/resources/plans.d.ts.map +1 -1
  43. package/resources/webhooks.d.mts +431 -1
  44. package/resources/webhooks.d.mts.map +1 -1
  45. package/resources/webhooks.d.ts +431 -1
  46. package/resources/webhooks.d.ts.map +1 -1
  47. package/resources/webhooks.js +90 -0
  48. package/resources/webhooks.js.map +1 -1
  49. package/resources/webhooks.mjs +90 -0
  50. package/resources/webhooks.mjs.map +1 -1
  51. package/src/client.ts +28 -0
  52. package/src/lib/upload-file.ts +115 -0
  53. package/src/resources/files.ts +140 -0
  54. package/src/resources/index.ts +10 -0
  55. package/src/resources/payments.ts +30 -30
  56. package/src/resources/plans.ts +10 -0
  57. package/src/resources/webhooks.ts +793 -0
  58. package/src/version.ts +1 -1
  59. package/version.d.mts +1 -1
  60. package/version.d.ts +1 -1
  61. package/version.js +1 -1
  62. package/version.mjs +1 -1
@@ -243,35 +243,34 @@ export type CardBrands =
243
243
  * The different types of payment methods that can be used.
244
244
  */
245
245
  export type PaymentMethodTypes =
246
- | 'acss_debit'
247
- | 'affirm'
248
246
  | 'afterpay_clearpay'
249
247
  | 'alipay'
250
- | 'alma'
251
248
  | 'amazon_pay'
252
249
  | 'apple_pay'
253
- | 'au_becs_debit'
254
- | 'bacs_debit'
255
250
  | 'bancontact'
256
- | 'billie'
257
- | 'blik'
258
- | 'boleto'
259
251
  | 'card'
260
252
  | 'cashapp'
261
253
  | 'crypto'
262
- | 'eps'
263
- | 'fpx'
264
- | 'giropay'
265
254
  | 'google_pay'
266
- | 'grabpay'
267
255
  | 'ideal'
268
- | 'kakao_pay'
269
256
  | 'klarna'
270
- | 'konbini'
271
- | 'kr_card'
272
- | 'link'
273
257
  | 'mobilepay'
258
+ | 'sepa_debit'
259
+ | 'swish'
260
+ | 'twint'
261
+ | 'us_bank_account'
262
+ | 'zip'
263
+ | 'vipps'
264
+ | 'paypal'
265
+ | 'sezzle'
266
+ | 'coinbase'
267
+ | 'splitit'
268
+ | 'platform_balance'
269
+ | 'apple'
270
+ | 'venmo'
271
+ | 'affirm'
274
272
  | 'multibanco'
273
+ | 'wechat_pay'
275
274
  | 'naver_pay'
276
275
  | 'nz_bank_account'
277
276
  | 'oxxo'
@@ -284,13 +283,22 @@ export type PaymentMethodTypes =
284
283
  | 'revolut_pay'
285
284
  | 'samsung_pay'
286
285
  | 'satispay'
287
- | 'sepa_debit'
288
286
  | 'sofort'
289
- | 'swish'
290
- | 'twint'
291
- | 'us_bank_account'
292
- | 'wechat_pay'
293
- | 'zip'
287
+ | 'konbini'
288
+ | 'kr_card'
289
+ | 'link'
290
+ | 'grabpay'
291
+ | 'kakao_pay'
292
+ | 'billie'
293
+ | 'blik'
294
+ | 'boleto'
295
+ | 'eps'
296
+ | 'fpx'
297
+ | 'giropay'
298
+ | 'acss_debit'
299
+ | 'alma'
300
+ | 'au_becs_debit'
301
+ | 'bacs_debit'
294
302
  | 'bizum'
295
303
  | 'capchase_pay'
296
304
  | 'kriya'
@@ -299,7 +307,6 @@ export type PaymentMethodTypes =
299
307
  | 'paypay'
300
308
  | 'sequra'
301
309
  | 'scalapay'
302
- | 'vipps'
303
310
  | 'custom'
304
311
  | 'customer_balance'
305
312
  | 'gopay'
@@ -309,7 +316,6 @@ export type PaymentMethodTypes =
309
316
  | 'ng_card'
310
317
  | 'ng_market'
311
318
  | 'ng_ussd'
312
- | 'paypal'
313
319
  | 'payto'
314
320
  | 'qris'
315
321
  | 'rechnung'
@@ -322,12 +328,6 @@ export type PaymentMethodTypes =
322
328
  | 'id_bank_transfer'
323
329
  | 'demo_pay'
324
330
  | 'shop_pay'
325
- | 'sezzle'
326
- | 'coinbase'
327
- | 'splitit'
328
- | 'platform_balance'
329
- | 'apple'
330
- | 'venmo'
331
331
  | 'unknown';
332
332
 
333
333
  /**
@@ -370,6 +370,11 @@ export interface PlanCreateParams {
370
370
  */
371
371
  internal_notes?: string | null;
372
372
 
373
+ /**
374
+ * Whether this plan uses legacy payment method controls
375
+ */
376
+ legacy_payment_method_controls?: boolean | null;
377
+
373
378
  /**
374
379
  * Whether or not the tax is included in a plan's price (or if it hasn't been set
375
380
  * up)
@@ -555,6 +560,11 @@ export interface PlanUpdateParams {
555
560
  */
556
561
  internal_notes?: string | null;
557
562
 
563
+ /**
564
+ * Whether this plan uses legacy payment method controls
565
+ */
566
+ legacy_payment_method_controls?: boolean | null;
567
+
558
568
  /**
559
569
  * Whether or not to offer a discount to cancel a subscription.
560
570
  */