@whop/sdk 0.0.3 → 0.0.4

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 (130) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  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 +5 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/app-builds.d.mts +16 -13
  12. package/resources/app-builds.d.mts.map +1 -1
  13. package/resources/app-builds.d.ts +16 -13
  14. package/resources/app-builds.d.ts.map +1 -1
  15. package/resources/app-builds.js +1 -1
  16. package/resources/app-builds.mjs +1 -1
  17. package/resources/apps.d.mts +15 -10
  18. package/resources/apps.d.mts.map +1 -1
  19. package/resources/apps.d.ts +15 -10
  20. package/resources/apps.d.ts.map +1 -1
  21. package/resources/checkout-configurations.d.mts +221 -183
  22. package/resources/checkout-configurations.d.mts.map +1 -1
  23. package/resources/checkout-configurations.d.ts +221 -183
  24. package/resources/checkout-configurations.d.ts.map +1 -1
  25. package/resources/checkout-configurations.js +4 -20
  26. package/resources/checkout-configurations.js.map +1 -1
  27. package/resources/checkout-configurations.mjs +4 -20
  28. package/resources/checkout-configurations.mjs.map +1 -1
  29. package/resources/companies.d.mts +157 -0
  30. package/resources/companies.d.mts.map +1 -1
  31. package/resources/companies.d.ts +157 -0
  32. package/resources/companies.d.ts.map +1 -1
  33. package/resources/companies.js +22 -0
  34. package/resources/companies.js.map +1 -1
  35. package/resources/companies.mjs +22 -0
  36. package/resources/companies.mjs.map +1 -1
  37. package/resources/course-lesson-interactions.d.mts +2 -2
  38. package/resources/course-lesson-interactions.d.ts +2 -2
  39. package/resources/course-lesson-interactions.js +2 -2
  40. package/resources/course-lesson-interactions.mjs +2 -2
  41. package/resources/course-lessons.d.mts +68 -28
  42. package/resources/course-lessons.d.mts.map +1 -1
  43. package/resources/course-lessons.d.ts +68 -28
  44. package/resources/course-lessons.d.ts.map +1 -1
  45. package/resources/course-students.d.mts +187 -0
  46. package/resources/course-students.d.mts.map +1 -0
  47. package/resources/course-students.d.ts +187 -0
  48. package/resources/course-students.d.ts.map +1 -0
  49. package/resources/course-students.js +36 -0
  50. package/resources/course-students.js.map +1 -0
  51. package/resources/course-students.mjs +32 -0
  52. package/resources/course-students.mjs.map +1 -0
  53. package/resources/courses.d.mts +40 -20
  54. package/resources/courses.d.mts.map +1 -1
  55. package/resources/courses.d.ts +40 -20
  56. package/resources/courses.d.ts.map +1 -1
  57. package/resources/experiences.d.mts +15 -10
  58. package/resources/experiences.d.mts.map +1 -1
  59. package/resources/experiences.d.ts +15 -10
  60. package/resources/experiences.d.ts.map +1 -1
  61. package/resources/forum-posts.d.mts +28 -18
  62. package/resources/forum-posts.d.mts.map +1 -1
  63. package/resources/forum-posts.d.ts +28 -18
  64. package/resources/forum-posts.d.ts.map +1 -1
  65. package/resources/index.d.mts +3 -2
  66. package/resources/index.d.mts.map +1 -1
  67. package/resources/index.d.ts +3 -2
  68. package/resources/index.d.ts.map +1 -1
  69. package/resources/index.js +3 -1
  70. package/resources/index.js.map +1 -1
  71. package/resources/index.mjs +2 -1
  72. package/resources/index.mjs.map +1 -1
  73. package/resources/invoices.d.mts +529 -146
  74. package/resources/invoices.d.mts.map +1 -1
  75. package/resources/invoices.d.ts +529 -146
  76. package/resources/invoices.d.ts.map +1 -1
  77. package/resources/invoices.js +2 -24
  78. package/resources/invoices.js.map +1 -1
  79. package/resources/invoices.mjs +2 -24
  80. package/resources/invoices.mjs.map +1 -1
  81. package/resources/messages.d.mts +28 -18
  82. package/resources/messages.d.mts.map +1 -1
  83. package/resources/messages.d.ts +28 -18
  84. package/resources/messages.d.ts.map +1 -1
  85. package/resources/payments.d.mts +8 -1
  86. package/resources/payments.d.mts.map +1 -1
  87. package/resources/payments.d.ts +8 -1
  88. package/resources/payments.d.ts.map +1 -1
  89. package/resources/plans.d.mts +112 -16
  90. package/resources/plans.d.mts.map +1 -1
  91. package/resources/plans.d.ts +112 -16
  92. package/resources/plans.d.ts.map +1 -1
  93. package/resources/plans.js.map +1 -1
  94. package/resources/plans.mjs.map +1 -1
  95. package/resources/products.d.mts +15 -10
  96. package/resources/products.d.mts.map +1 -1
  97. package/resources/products.d.ts +15 -10
  98. package/resources/products.d.ts.map +1 -1
  99. package/resources/shared.d.mts +47 -0
  100. package/resources/shared.d.mts.map +1 -1
  101. package/resources/shared.d.ts +47 -0
  102. package/resources/shared.d.ts.map +1 -1
  103. package/resources/transfers.d.mts +12 -0
  104. package/resources/transfers.d.mts.map +1 -1
  105. package/resources/transfers.d.ts +12 -0
  106. package/resources/transfers.d.ts.map +1 -1
  107. package/src/client.ts +32 -10
  108. package/src/resources/app-builds.ts +19 -14
  109. package/src/resources/apps.ts +16 -11
  110. package/src/resources/checkout-configurations.ts +245 -199
  111. package/src/resources/companies.ts +196 -0
  112. package/src/resources/course-lesson-interactions.ts +2 -2
  113. package/src/resources/course-lessons.ts +83 -30
  114. package/src/resources/course-students.ts +238 -0
  115. package/src/resources/courses.ts +50 -22
  116. package/src/resources/experiences.ts +19 -11
  117. package/src/resources/forum-posts.ts +34 -20
  118. package/src/resources/index.ts +14 -2
  119. package/src/resources/invoices.ts +620 -149
  120. package/src/resources/messages.ts +34 -20
  121. package/src/resources/payments.ts +8 -1
  122. package/src/resources/plans.ts +124 -16
  123. package/src/resources/products.ts +19 -11
  124. package/src/resources/shared.ts +48 -0
  125. package/src/resources/transfers.ts +10 -0
  126. package/src/version.ts +1 -1
  127. package/version.d.mts +1 -1
  128. package/version.d.ts +1 -1
  129. package/version.js +1 -1
  130. package/version.mjs +1 -1
@@ -394,11 +394,23 @@ export interface CourseCreateParams {
394
394
  */
395
395
  title: string;
396
396
 
397
+ /**
398
+ * Whether the course will award its students a PDF certificate after completing
399
+ * all lessons
400
+ */
401
+ certificate_after_completion_enabled?: boolean | null;
402
+
397
403
  /**
398
404
  * The cover image URL of the course
399
405
  */
400
406
  cover_image?: string | null;
401
407
 
408
+ /**
409
+ * Whether the course requires students to complete the previous lesson before
410
+ * moving on to the next one
411
+ */
412
+ require_completing_lessons_in_order?: boolean | null;
413
+
402
414
  /**
403
415
  * The tagline of the course
404
416
  */
@@ -407,27 +419,35 @@ export interface CourseCreateParams {
407
419
  /**
408
420
  * The thumbnail for the course in png, jpeg, or gif format
409
421
  */
410
- thumbnail?: CourseCreateParams.Thumbnail | null;
422
+ thumbnail?:
423
+ | CourseCreateParams.AttachmentInputWithDirectUploadID
424
+ | CourseCreateParams.AttachmentInputWithID
425
+ | null;
411
426
  }
412
427
 
413
428
  export namespace CourseCreateParams {
414
429
  /**
415
- * The thumbnail for the course in png, jpeg, or gif format
430
+ * Input for an attachment
416
431
  */
417
- export interface Thumbnail {
418
- /**
419
- * The ID of an existing attachment object. Use this when updating a resource and
420
- * keeping a subset of the attachments. Don't use this unless you know what you're
421
- * doing.
422
- */
423
- id?: string | null;
424
-
432
+ export interface AttachmentInputWithDirectUploadID {
425
433
  /**
426
434
  * This ID should be used the first time you upload an attachment. It is the ID of
427
435
  * the direct upload that was created when uploading the file to S3 via the
428
436
  * mediaDirectUpload mutation.
429
437
  */
430
- direct_upload_id?: string | null;
438
+ direct_upload_id: string;
439
+ }
440
+
441
+ /**
442
+ * Input for an attachment
443
+ */
444
+ export interface AttachmentInputWithID {
445
+ /**
446
+ * The ID of an existing attachment object. Use this when updating a resource and
447
+ * keeping a subset of the attachments. Don't use this unless you know what you're
448
+ * doing.
449
+ */
450
+ id: string;
431
451
  }
432
452
  }
433
453
 
@@ -472,7 +492,10 @@ export interface CourseUpdateParams {
472
492
  /**
473
493
  * The thumbnail for the course in png, jpeg, or gif format
474
494
  */
475
- thumbnail?: CourseUpdateParams.Thumbnail | null;
495
+ thumbnail?:
496
+ | CourseUpdateParams.AttachmentInputWithDirectUploadID
497
+ | CourseUpdateParams.AttachmentInputWithID
498
+ | null;
476
499
 
477
500
  /**
478
501
  * The title of the course
@@ -534,22 +557,27 @@ export namespace CourseUpdateParams {
534
557
  }
535
558
 
536
559
  /**
537
- * The thumbnail for the course in png, jpeg, or gif format
560
+ * Input for an attachment
538
561
  */
539
- export interface Thumbnail {
540
- /**
541
- * The ID of an existing attachment object. Use this when updating a resource and
542
- * keeping a subset of the attachments. Don't use this unless you know what you're
543
- * doing.
544
- */
545
- id?: string | null;
546
-
562
+ export interface AttachmentInputWithDirectUploadID {
547
563
  /**
548
564
  * This ID should be used the first time you upload an attachment. It is the ID of
549
565
  * the direct upload that was created when uploading the file to S3 via the
550
566
  * mediaDirectUpload mutation.
551
567
  */
552
- direct_upload_id?: string | null;
568
+ direct_upload_id: string;
569
+ }
570
+
571
+ /**
572
+ * Input for an attachment
573
+ */
574
+ export interface AttachmentInputWithID {
575
+ /**
576
+ * The ID of an existing attachment object. Use this when updating a resource and
577
+ * keeping a subset of the attachments. Don't use this unless you know what you're
578
+ * doing.
579
+ */
580
+ id: string;
553
581
  }
554
582
  }
555
583
 
@@ -313,7 +313,10 @@ export interface ExperienceUpdateParams {
313
313
  /**
314
314
  * The logo for the experience
315
315
  */
316
- logo?: ExperienceUpdateParams.Logo | null;
316
+ logo?:
317
+ | ExperienceUpdateParams.AttachmentInputWithDirectUploadID
318
+ | ExperienceUpdateParams.AttachmentInputWithID
319
+ | null;
317
320
 
318
321
  /**
319
322
  * The name of the experience.
@@ -333,22 +336,27 @@ export interface ExperienceUpdateParams {
333
336
 
334
337
  export namespace ExperienceUpdateParams {
335
338
  /**
336
- * The logo for the experience
339
+ * Input for an attachment
337
340
  */
338
- export interface Logo {
339
- /**
340
- * The ID of an existing attachment object. Use this when updating a resource and
341
- * keeping a subset of the attachments. Don't use this unless you know what you're
342
- * doing.
343
- */
344
- id?: string | null;
345
-
341
+ export interface AttachmentInputWithDirectUploadID {
346
342
  /**
347
343
  * This ID should be used the first time you upload an attachment. It is the ID of
348
344
  * the direct upload that was created when uploading the file to S3 via the
349
345
  * mediaDirectUpload mutation.
350
346
  */
351
- direct_upload_id?: string | null;
347
+ direct_upload_id: string;
348
+ }
349
+
350
+ /**
351
+ * Input for an attachment
352
+ */
353
+ export interface AttachmentInputWithID {
354
+ /**
355
+ * The ID of an existing attachment object. Use this when updating a resource and
356
+ * keeping a subset of the attachments. Don't use this unless you know what you're
357
+ * doing.
358
+ */
359
+ id: string;
352
360
  }
353
361
  }
354
362
 
@@ -186,7 +186,9 @@ export interface ForumPostCreateParams {
186
186
  /**
187
187
  * The attachments for this post
188
188
  */
189
- attachments?: Array<ForumPostCreateParams.Attachment> | null;
189
+ attachments?: Array<
190
+ ForumPostCreateParams.AttachmentInputWithDirectUploadID | ForumPostCreateParams.AttachmentInputWithID
191
+ > | null;
190
192
 
191
193
  /**
192
194
  * This is the main body of the post in Markdown format. Hidden if paywalled and
@@ -238,20 +240,25 @@ export namespace ForumPostCreateParams {
238
240
  /**
239
241
  * Input for an attachment
240
242
  */
241
- export interface Attachment {
242
- /**
243
- * The ID of an existing attachment object. Use this when updating a resource and
244
- * keeping a subset of the attachments. Don't use this unless you know what you're
245
- * doing.
246
- */
247
- id?: string | null;
248
-
243
+ export interface AttachmentInputWithDirectUploadID {
249
244
  /**
250
245
  * This ID should be used the first time you upload an attachment. It is the ID of
251
246
  * the direct upload that was created when uploading the file to S3 via the
252
247
  * mediaDirectUpload mutation.
253
248
  */
254
- direct_upload_id?: string | null;
249
+ direct_upload_id: string;
250
+ }
251
+
252
+ /**
253
+ * Input for an attachment
254
+ */
255
+ export interface AttachmentInputWithID {
256
+ /**
257
+ * The ID of an existing attachment object. Use this when updating a resource and
258
+ * keeping a subset of the attachments. Don't use this unless you know what you're
259
+ * doing.
260
+ */
261
+ id: string;
255
262
  }
256
263
 
257
264
  /**
@@ -286,7 +293,9 @@ export interface ForumPostUpdateParams {
286
293
  /**
287
294
  * The attachments for this post
288
295
  */
289
- attachments?: Array<ForumPostUpdateParams.Attachment> | null;
296
+ attachments?: Array<
297
+ ForumPostUpdateParams.AttachmentInputWithDirectUploadID | ForumPostUpdateParams.AttachmentInputWithID
298
+ > | null;
290
299
 
291
300
  /**
292
301
  * This is the main body of the post in Markdown format. Hidden if paywalled and
@@ -309,20 +318,25 @@ export namespace ForumPostUpdateParams {
309
318
  /**
310
319
  * Input for an attachment
311
320
  */
312
- export interface Attachment {
313
- /**
314
- * The ID of an existing attachment object. Use this when updating a resource and
315
- * keeping a subset of the attachments. Don't use this unless you know what you're
316
- * doing.
317
- */
318
- id?: string | null;
319
-
321
+ export interface AttachmentInputWithDirectUploadID {
320
322
  /**
321
323
  * This ID should be used the first time you upload an attachment. It is the ID of
322
324
  * the direct upload that was created when uploading the file to S3 via the
323
325
  * mediaDirectUpload mutation.
324
326
  */
325
- direct_upload_id?: string | null;
327
+ direct_upload_id: string;
328
+ }
329
+
330
+ /**
331
+ * Input for an attachment
332
+ */
333
+ export interface AttachmentInputWithID {
334
+ /**
335
+ * The ID of an existing attachment object. Use this when updating a resource and
336
+ * keeping a subset of the attachments. Don't use this unless you know what you're
337
+ * doing.
338
+ */
339
+ id: string;
326
340
  }
327
341
  }
328
342
 
@@ -37,7 +37,13 @@ export {
37
37
  type CheckoutConfigurationListParams,
38
38
  type CheckoutConfigurationListResponsesCursorPage,
39
39
  } from './checkout-configurations';
40
- export { Companies } from './companies';
40
+ export {
41
+ Companies,
42
+ type CompanyListResponse,
43
+ type CompanyCreateParams,
44
+ type CompanyListParams,
45
+ type CompanyListResponsesCursorPage,
46
+ } from './companies';
41
47
  export {
42
48
  CourseChapters,
43
49
  type CourseChapter,
@@ -65,6 +71,13 @@ export {
65
71
  type CourseLessonListParams,
66
72
  type CourseLessonListResponsesCursorPage,
67
73
  } from './course-lessons';
74
+ export {
75
+ CourseStudents,
76
+ type CourseStudentRetrieveResponse,
77
+ type CourseStudentListResponse,
78
+ type CourseStudentListParams,
79
+ type CourseStudentListResponsesCursorPage,
80
+ } from './course-students';
68
81
  export {
69
82
  Courses,
70
83
  type Course,
@@ -112,7 +125,6 @@ export {
112
125
  } from './forums';
113
126
  export {
114
127
  Invoices,
115
- type InvoiceCreateResponse,
116
128
  type InvoiceVoidResponse,
117
129
  type InvoiceCreateParams,
118
130
  type InvoiceListParams,