@whop/sdk 0.0.23 → 0.0.24

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 (112) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/app-builds.d.mts +7 -18
  10. package/resources/app-builds.d.mts.map +1 -1
  11. package/resources/app-builds.d.ts +7 -18
  12. package/resources/app-builds.d.ts.map +1 -1
  13. package/resources/app-builds.js +1 -1
  14. package/resources/app-builds.mjs +1 -1
  15. package/resources/apps.d.mts +19 -17
  16. package/resources/apps.d.mts.map +1 -1
  17. package/resources/apps.d.ts +19 -17
  18. package/resources/apps.d.ts.map +1 -1
  19. package/resources/checkout-configurations.d.mts +8 -17
  20. package/resources/checkout-configurations.d.mts.map +1 -1
  21. package/resources/checkout-configurations.d.ts +8 -17
  22. package/resources/checkout-configurations.d.ts.map +1 -1
  23. package/resources/companies.d.mts +23 -34
  24. package/resources/companies.d.mts.map +1 -1
  25. package/resources/companies.d.ts +23 -34
  26. package/resources/companies.d.ts.map +1 -1
  27. package/resources/course-lessons.d.mts +19 -84
  28. package/resources/course-lessons.d.mts.map +1 -1
  29. package/resources/course-lessons.d.ts +19 -84
  30. package/resources/course-lessons.d.ts.map +1 -1
  31. package/resources/courses.d.mts +8 -42
  32. package/resources/courses.d.mts.map +1 -1
  33. package/resources/courses.d.ts +8 -42
  34. package/resources/courses.d.ts.map +1 -1
  35. package/resources/disputes.d.mts +16 -68
  36. package/resources/disputes.d.mts.map +1 -1
  37. package/resources/disputes.d.ts +16 -68
  38. package/resources/disputes.d.ts.map +1 -1
  39. package/resources/experiences.d.mts +19 -17
  40. package/resources/experiences.d.mts.map +1 -1
  41. package/resources/experiences.d.ts +19 -17
  42. package/resources/experiences.d.ts.map +1 -1
  43. package/resources/forum-posts.d.mts +6 -32
  44. package/resources/forum-posts.d.mts.map +1 -1
  45. package/resources/forum-posts.d.ts +6 -32
  46. package/resources/forum-posts.d.ts.map +1 -1
  47. package/resources/index.d.mts +1 -1
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +1 -1
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js.map +1 -1
  52. package/resources/index.mjs.map +1 -1
  53. package/resources/ledger-accounts.d.mts +0 -4
  54. package/resources/ledger-accounts.d.mts.map +1 -1
  55. package/resources/ledger-accounts.d.ts +0 -4
  56. package/resources/ledger-accounts.d.ts.map +1 -1
  57. package/resources/messages.d.mts +6 -32
  58. package/resources/messages.d.mts.map +1 -1
  59. package/resources/messages.d.ts +6 -32
  60. package/resources/messages.d.ts.map +1 -1
  61. package/resources/notifications.d.mts +4 -0
  62. package/resources/notifications.d.mts.map +1 -1
  63. package/resources/notifications.d.ts +4 -0
  64. package/resources/notifications.d.ts.map +1 -1
  65. package/resources/notifications.js +4 -0
  66. package/resources/notifications.js.map +1 -1
  67. package/resources/notifications.mjs +4 -0
  68. package/resources/notifications.mjs.map +1 -1
  69. package/resources/payments.d.mts +1 -1
  70. package/resources/payments.d.mts.map +1 -1
  71. package/resources/payments.d.ts +1 -1
  72. package/resources/payments.d.ts.map +1 -1
  73. package/resources/payout-methods.d.mts +8 -0
  74. package/resources/payout-methods.d.mts.map +1 -1
  75. package/resources/payout-methods.d.ts +8 -0
  76. package/resources/payout-methods.d.ts.map +1 -1
  77. package/resources/plans.d.mts +8 -34
  78. package/resources/plans.d.mts.map +1 -1
  79. package/resources/plans.d.ts +8 -34
  80. package/resources/plans.d.ts.map +1 -1
  81. package/resources/webhooks.d.mts +6 -10
  82. package/resources/webhooks.d.mts.map +1 -1
  83. package/resources/webhooks.d.ts +6 -10
  84. package/resources/webhooks.d.ts.map +1 -1
  85. package/resources/withdrawals.d.mts +8 -19
  86. package/resources/withdrawals.d.mts.map +1 -1
  87. package/resources/withdrawals.d.ts +8 -19
  88. package/resources/withdrawals.d.ts.map +1 -1
  89. package/src/client.ts +0 -2
  90. package/src/resources/app-builds.ts +7 -21
  91. package/src/resources/apps.ts +21 -18
  92. package/src/resources/checkout-configurations.ts +9 -18
  93. package/src/resources/companies.ts +25 -42
  94. package/src/resources/course-lessons.ts +19 -104
  95. package/src/resources/courses.ts +8 -52
  96. package/src/resources/disputes.ts +16 -84
  97. package/src/resources/experiences.ts +21 -21
  98. package/src/resources/forum-posts.ts +6 -38
  99. package/src/resources/index.ts +0 -1
  100. package/src/resources/ledger-accounts.ts +0 -18
  101. package/src/resources/messages.ts +6 -38
  102. package/src/resources/notifications.ts +4 -0
  103. package/src/resources/payments.ts +16 -0
  104. package/src/resources/payout-methods.ts +10 -0
  105. package/src/resources/plans.ts +8 -36
  106. package/src/resources/webhooks.ts +7 -10
  107. package/src/resources/withdrawals.ts +8 -21
  108. package/src/version.ts +1 -1
  109. package/version.d.mts +1 -1
  110. package/version.d.ts +1 -1
  111. package/version.js +1 -1
  112. package/version.mjs +1 -1
@@ -191,9 +191,7 @@ export interface ForumPostCreateParams {
191
191
  /**
192
192
  * The attachments for this post
193
193
  */
194
- attachments?: Array<
195
- ForumPostCreateParams.AttachmentInputWithDirectUploadID | ForumPostCreateParams.AttachmentInputWithID
196
- > | null;
194
+ attachments?: Array<ForumPostCreateParams.Attachment> | null;
197
195
 
198
196
  /**
199
197
  * This is the main body of the post in Markdown format. Hidden if paywalled and
@@ -250,23 +248,9 @@ export namespace ForumPostCreateParams {
250
248
  /**
251
249
  * Input for an attachment
252
250
  */
253
- export interface AttachmentInputWithDirectUploadID {
251
+ export interface Attachment {
254
252
  /**
255
- * This ID should be used the first time you upload an attachment. It is the ID of
256
- * the direct upload that was created when uploading the file to S3 via the
257
- * mediaDirectUpload mutation.
258
- */
259
- direct_upload_id: string;
260
- }
261
-
262
- /**
263
- * Input for an attachment
264
- */
265
- export interface AttachmentInputWithID {
266
- /**
267
- * The ID of an existing attachment object. Use this when updating a resource and
268
- * keeping a subset of the attachments. Don't use this unless you know what you're
269
- * doing.
253
+ * The ID of an existing file object.
270
254
  */
271
255
  id: string;
272
256
  }
@@ -303,9 +287,7 @@ export interface ForumPostUpdateParams {
303
287
  /**
304
288
  * The attachments for this post
305
289
  */
306
- attachments?: Array<
307
- ForumPostUpdateParams.AttachmentInputWithDirectUploadID | ForumPostUpdateParams.AttachmentInputWithID
308
- > | null;
290
+ attachments?: Array<ForumPostUpdateParams.Attachment> | null;
309
291
 
310
292
  /**
311
293
  * This is the main body of the post in Markdown format. Hidden if paywalled and
@@ -333,23 +315,9 @@ export namespace ForumPostUpdateParams {
333
315
  /**
334
316
  * Input for an attachment
335
317
  */
336
- export interface AttachmentInputWithDirectUploadID {
337
- /**
338
- * This ID should be used the first time you upload an attachment. It is the ID of
339
- * the direct upload that was created when uploading the file to S3 via the
340
- * mediaDirectUpload mutation.
341
- */
342
- direct_upload_id: string;
343
- }
344
-
345
- /**
346
- * Input for an attachment
347
- */
348
- export interface AttachmentInputWithID {
318
+ export interface Attachment {
349
319
  /**
350
- * The ID of an existing attachment object. Use this when updating a resource and
351
- * keeping a subset of the attachments. Don't use this unless you know what you're
352
- * doing.
320
+ * The ID of an existing file object.
353
321
  */
354
322
  id: string;
355
323
  }
@@ -366,7 +366,6 @@ export {
366
366
  type WithdrawalFeeTypes,
367
367
  type WithdrawalSpeeds,
368
368
  type WithdrawalStatus,
369
- type WithdrawalTypes,
370
369
  type WithdrawalCreateResponse,
371
370
  type WithdrawalRetrieveResponse,
372
371
  type WithdrawalListResponse,
@@ -34,24 +34,6 @@ export interface LedgerAccountRetrieveResponse {
34
34
  */
35
35
  balances: Array<LedgerAccountRetrieveResponse.Balance>;
36
36
 
37
- /**
38
- * The different statuses a LedgerAccountAudit can be
39
- */
40
- ledger_account_audit_status:
41
- | 'pending'
42
- | 'pending_ai_review'
43
- | 'approved'
44
- | 'reserves_imposed'
45
- | 'suspended'
46
- | 'ignored'
47
- | 'rejected'
48
- | 'requested_more_information'
49
- | 'information_submitted'
50
- | 'requested_tos_violation_correction'
51
- | 'clawback_attempted'
52
- | 'awaiting_sales_review'
53
- | null;
54
-
55
37
  /**
56
38
  * The type of ledger account.
57
39
  */
@@ -221,9 +221,7 @@ export interface MessageCreateParams {
221
221
  /**
222
222
  * The attachments for this message, such as videos or images.
223
223
  */
224
- attachments?: Array<
225
- MessageCreateParams.AttachmentInputWithDirectUploadID | MessageCreateParams.AttachmentInputWithID
226
- > | null;
224
+ attachments?: Array<MessageCreateParams.Attachment> | null;
227
225
 
228
226
  /**
229
227
  * The poll for this message
@@ -235,23 +233,9 @@ export namespace MessageCreateParams {
235
233
  /**
236
234
  * Input for an attachment
237
235
  */
238
- export interface AttachmentInputWithDirectUploadID {
236
+ export interface Attachment {
239
237
  /**
240
- * This ID should be used the first time you upload an attachment. It is the ID of
241
- * the direct upload that was created when uploading the file to S3 via the
242
- * mediaDirectUpload mutation.
243
- */
244
- direct_upload_id: string;
245
- }
246
-
247
- /**
248
- * Input for an attachment
249
- */
250
- export interface AttachmentInputWithID {
251
- /**
252
- * The ID of an existing attachment object. Use this when updating a resource and
253
- * keeping a subset of the attachments. Don't use this unless you know what you're
254
- * doing.
238
+ * The ID of an existing file object.
255
239
  */
256
240
  id: string;
257
241
  }
@@ -288,9 +272,7 @@ export interface MessageUpdateParams {
288
272
  /**
289
273
  * The attachments for this message
290
274
  */
291
- attachments?: Array<
292
- MessageUpdateParams.AttachmentInputWithDirectUploadID | MessageUpdateParams.AttachmentInputWithID
293
- > | null;
275
+ attachments?: Array<MessageUpdateParams.Attachment> | null;
294
276
 
295
277
  /**
296
278
  * The content of the message in Markdown format
@@ -307,23 +289,9 @@ export namespace MessageUpdateParams {
307
289
  /**
308
290
  * Input for an attachment
309
291
  */
310
- export interface AttachmentInputWithDirectUploadID {
311
- /**
312
- * This ID should be used the first time you upload an attachment. It is the ID of
313
- * the direct upload that was created when uploading the file to S3 via the
314
- * mediaDirectUpload mutation.
315
- */
316
- direct_upload_id: string;
317
- }
318
-
319
- /**
320
- * Input for an attachment
321
- */
322
- export interface AttachmentInputWithID {
292
+ export interface Attachment {
323
293
  /**
324
- * The ID of an existing attachment object. Use this when updating a resource and
325
- * keeping a subset of the attachments. Don't use this unless you know what you're
326
- * doing.
294
+ * The ID of an existing file object.
327
295
  */
328
296
  id: string;
329
297
  }
@@ -8,6 +8,10 @@ export class Notifications extends APIResource {
8
8
  /**
9
9
  * Queues a notification to be sent to users in an experience or company team
10
10
  *
11
+ * Required permissions:
12
+ *
13
+ * - `notification:create`
14
+ *
11
15
  * @example
12
16
  * ```ts
13
17
  * const notification = await client.notifications.create({
@@ -237,6 +237,22 @@ export type CardBrands =
237
237
  | 'jcbrupay'
238
238
  | 'elo'
239
239
  | 'maestro'
240
+ | 'tarjeta_naranja'
241
+ | 'cirrus'
242
+ | 'nspk_mir'
243
+ | 'verve'
244
+ | 'ebt'
245
+ | 'private_label'
246
+ | 'local_brand'
247
+ | 'uatp'
248
+ | 'wexcard'
249
+ | 'uzcard'
250
+ | 'meeza'
251
+ | 'hrg_store_card'
252
+ | 'girocard'
253
+ | 'fuel_card'
254
+ | 'dankort'
255
+ | 'carnet'
240
256
  | 'unknown';
241
257
 
242
258
  /**
@@ -52,6 +52,11 @@ export interface PayoutMethodRetrieveResponse {
52
52
  */
53
53
  company: PayoutMethodRetrieveResponse.Company | null;
54
54
 
55
+ /**
56
+ * The date and time the payout token was created
57
+ */
58
+ created_at: string;
59
+
55
60
  /**
56
61
  * The currency code of the payout destination. This is the currency that payouts
57
62
  * will be made in for this token.
@@ -121,6 +126,11 @@ export interface PayoutMethodListResponse {
121
126
  */
122
127
  company: PayoutMethodListResponse.Company | null;
123
128
 
129
+ /**
130
+ * The date and time the payout token was created
131
+ */
132
+ created_at: string;
133
+
124
134
  /**
125
135
  * The currency code of the payout destination. This is the currency that payouts
126
136
  * will be made in for this token.
@@ -356,7 +356,7 @@ export interface PlanCreateParams {
356
356
  /**
357
357
  * An image for the plan. This will be visible on the product page to customers.
358
358
  */
359
- image?: PlanCreateParams.AttachmentInputWithDirectUploadID | PlanCreateParams.AttachmentInputWithID | null;
359
+ image?: PlanCreateParams.Image | null;
360
360
 
361
361
  /**
362
362
  * An additional amount charged upon first purchase. Use only if a one time payment
@@ -468,25 +468,11 @@ export namespace PlanCreateParams {
468
468
  }
469
469
 
470
470
  /**
471
- * Input for an attachment
472
- */
473
- export interface AttachmentInputWithDirectUploadID {
474
- /**
475
- * This ID should be used the first time you upload an attachment. It is the ID of
476
- * the direct upload that was created when uploading the file to S3 via the
477
- * mediaDirectUpload mutation.
478
- */
479
- direct_upload_id: string;
480
- }
481
-
482
- /**
483
- * Input for an attachment
471
+ * An image for the plan. This will be visible on the product page to customers.
484
472
  */
485
- export interface AttachmentInputWithID {
473
+ export interface Image {
486
474
  /**
487
- * The ID of an existing attachment object. Use this when updating a resource and
488
- * keeping a subset of the attachments. Don't use this unless you know what you're
489
- * doing.
475
+ * The ID of an existing file object.
490
476
  */
491
477
  id: string;
492
478
  }
@@ -548,7 +534,7 @@ export interface PlanUpdateParams {
548
534
  /**
549
535
  * An image for the plan. This will be visible on the product page to customers.
550
536
  */
551
- image?: PlanUpdateParams.AttachmentInputWithDirectUploadID | PlanUpdateParams.AttachmentInputWithID | null;
537
+ image?: PlanUpdateParams.Image | null;
552
538
 
553
539
  /**
554
540
  * An additional amount charged upon first purchase.
@@ -659,25 +645,11 @@ export namespace PlanUpdateParams {
659
645
  }
660
646
 
661
647
  /**
662
- * Input for an attachment
663
- */
664
- export interface AttachmentInputWithDirectUploadID {
665
- /**
666
- * This ID should be used the first time you upload an attachment. It is the ID of
667
- * the direct upload that was created when uploading the file to S3 via the
668
- * mediaDirectUpload mutation.
669
- */
670
- direct_upload_id: string;
671
- }
672
-
673
- /**
674
- * Input for an attachment
648
+ * An image for the plan. This will be visible on the product page to customers.
675
649
  */
676
- export interface AttachmentInputWithID {
650
+ export interface Image {
677
651
  /**
678
- * The ID of an existing attachment object. Use this when updating a resource and
679
- * keeping a subset of the attachments. Don't use this unless you know what you're
680
- * doing.
652
+ * The ID of an existing file object.
681
653
  */
682
654
  id: string;
683
655
  }
@@ -1041,6 +1041,7 @@ export namespace WithdrawalCreatedWebhookEvent {
1041
1041
  | 'invalid_account_number'
1042
1042
  | 'invalid_bank_code'
1043
1043
  | 'invalid_beneficiary'
1044
+ | 'invalid_mailing_address'
1044
1045
  | 'invalid_branch_number'
1045
1046
  | 'invalid_branch_code'
1046
1047
  | 'invalid_phone_number'
@@ -1116,11 +1117,6 @@ export namespace WithdrawalCreatedWebhookEvent {
1116
1117
  * available.
1117
1118
  */
1118
1119
  trace_code: string | null;
1119
-
1120
- /**
1121
- * The type of withdrawal.
1122
- */
1123
- withdrawal_type: WithdrawalsAPI.WithdrawalTypes;
1124
1120
  }
1125
1121
 
1126
1122
  export namespace Data {
@@ -1259,6 +1255,7 @@ export namespace WithdrawalUpdatedWebhookEvent {
1259
1255
  | 'invalid_account_number'
1260
1256
  | 'invalid_bank_code'
1261
1257
  | 'invalid_beneficiary'
1258
+ | 'invalid_mailing_address'
1262
1259
  | 'invalid_branch_number'
1263
1260
  | 'invalid_branch_code'
1264
1261
  | 'invalid_phone_number'
@@ -1334,11 +1331,6 @@ export namespace WithdrawalUpdatedWebhookEvent {
1334
1331
  * available.
1335
1332
  */
1336
1333
  trace_code: string | null;
1337
-
1338
- /**
1339
- * The type of withdrawal.
1340
- */
1341
- withdrawal_type: WithdrawalsAPI.WithdrawalTypes;
1342
1334
  }
1343
1335
 
1344
1336
  export namespace Data {
@@ -1470,6 +1462,11 @@ export namespace PayoutMethodCreatedWebhookEvent {
1470
1462
  */
1471
1463
  company: Data.Company | null;
1472
1464
 
1465
+ /**
1466
+ * The date and time the payout token was created
1467
+ */
1468
+ created_at: string;
1469
+
1473
1470
  /**
1474
1471
  * The currency code of the payout destination. This is the currency that payouts
1475
1472
  * will be made in for this token.
@@ -97,11 +97,6 @@ export type WithdrawalStatus =
97
97
  | 'canceled'
98
98
  | 'denied';
99
99
 
100
- /**
101
- * The types of withdrawals
102
- */
103
- export type WithdrawalTypes = 'regular' | 'clawback';
104
-
105
100
  /**
106
101
  * A withdrawal request.
107
102
  */
@@ -155,6 +150,7 @@ export interface WithdrawalCreateResponse {
155
150
  | 'invalid_account_number'
156
151
  | 'invalid_bank_code'
157
152
  | 'invalid_beneficiary'
153
+ | 'invalid_mailing_address'
158
154
  | 'invalid_branch_number'
159
155
  | 'invalid_branch_code'
160
156
  | 'invalid_phone_number'
@@ -230,11 +226,6 @@ export interface WithdrawalCreateResponse {
230
226
  * available.
231
227
  */
232
228
  trace_code: string | null;
233
-
234
- /**
235
- * The type of withdrawal.
236
- */
237
- withdrawal_type: WithdrawalTypes;
238
229
  }
239
230
 
240
231
  export namespace WithdrawalCreateResponse {
@@ -339,6 +330,7 @@ export interface WithdrawalRetrieveResponse {
339
330
  | 'invalid_account_number'
340
331
  | 'invalid_bank_code'
341
332
  | 'invalid_beneficiary'
333
+ | 'invalid_mailing_address'
342
334
  | 'invalid_branch_number'
343
335
  | 'invalid_branch_code'
344
336
  | 'invalid_phone_number'
@@ -414,11 +406,6 @@ export interface WithdrawalRetrieveResponse {
414
406
  * available.
415
407
  */
416
408
  trace_code: string | null;
417
-
418
- /**
419
- * The type of withdrawal.
420
- */
421
- withdrawal_type: WithdrawalTypes;
422
409
  }
423
410
 
424
411
  export namespace WithdrawalRetrieveResponse {
@@ -521,11 +508,6 @@ export interface WithdrawalListResponse {
521
508
  * Status of the withdrawal.
522
509
  */
523
510
  status: WithdrawalStatus;
524
-
525
- /**
526
- * The type of withdrawal.
527
- */
528
- withdrawal_type: WithdrawalTypes;
529
511
  }
530
512
 
531
513
  export interface WithdrawalCreateParams {
@@ -548,6 +530,12 @@ export interface WithdrawalCreateParams {
548
530
  * The ID of the payout method to use for the withdrawal.
549
531
  */
550
532
  payout_method_id?: string | null;
533
+
534
+ /**
535
+ * Custom statement descriptor for the withdrawal. Must be between 5 and 22
536
+ * characters and contain only alphanumeric characters.
537
+ */
538
+ statement_descriptor?: string | null;
551
539
  }
552
540
 
553
541
  export interface WithdrawalListParams extends CursorPageParams {
@@ -592,7 +580,6 @@ export declare namespace Withdrawals {
592
580
  type WithdrawalFeeTypes as WithdrawalFeeTypes,
593
581
  type WithdrawalSpeeds as WithdrawalSpeeds,
594
582
  type WithdrawalStatus as WithdrawalStatus,
595
- type WithdrawalTypes as WithdrawalTypes,
596
583
  type WithdrawalCreateResponse as WithdrawalCreateResponse,
597
584
  type WithdrawalRetrieveResponse as WithdrawalRetrieveResponse,
598
585
  type WithdrawalListResponse as WithdrawalListResponse,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.0.23'; // x-release-please-version
1
+ export const VERSION = '0.0.24'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.23";
1
+ export declare const VERSION = "0.0.24";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.0.23";
1
+ export declare const VERSION = "0.0.24";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.0.23'; // x-release-please-version
4
+ exports.VERSION = '0.0.24'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.0.23'; // x-release-please-version
1
+ export const VERSION = '0.0.24'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map