@whop/sdk 0.0.3 → 0.0.5

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 (165) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/client.d.mts +14 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +14 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +8 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/access-tokens.d.mts +58 -0
  12. package/resources/access-tokens.d.mts.map +1 -0
  13. package/resources/access-tokens.d.ts +58 -0
  14. package/resources/access-tokens.d.ts.map +1 -0
  15. package/resources/access-tokens.js +25 -0
  16. package/resources/access-tokens.js.map +1 -0
  17. package/resources/access-tokens.mjs +21 -0
  18. package/resources/access-tokens.mjs.map +1 -0
  19. package/resources/app-builds.d.mts +16 -13
  20. package/resources/app-builds.d.mts.map +1 -1
  21. package/resources/app-builds.d.ts +16 -13
  22. package/resources/app-builds.d.ts.map +1 -1
  23. package/resources/app-builds.js +1 -1
  24. package/resources/app-builds.mjs +1 -1
  25. package/resources/apps.d.mts +15 -10
  26. package/resources/apps.d.mts.map +1 -1
  27. package/resources/apps.d.ts +15 -10
  28. package/resources/apps.d.ts.map +1 -1
  29. package/resources/checkout-configurations.d.mts +221 -183
  30. package/resources/checkout-configurations.d.mts.map +1 -1
  31. package/resources/checkout-configurations.d.ts +221 -183
  32. package/resources/checkout-configurations.d.ts.map +1 -1
  33. package/resources/checkout-configurations.js +4 -20
  34. package/resources/checkout-configurations.js.map +1 -1
  35. package/resources/checkout-configurations.mjs +4 -20
  36. package/resources/checkout-configurations.mjs.map +1 -1
  37. package/resources/companies.d.mts +157 -0
  38. package/resources/companies.d.mts.map +1 -1
  39. package/resources/companies.d.ts +157 -0
  40. package/resources/companies.d.ts.map +1 -1
  41. package/resources/companies.js +22 -0
  42. package/resources/companies.js.map +1 -1
  43. package/resources/companies.mjs +22 -0
  44. package/resources/companies.mjs.map +1 -1
  45. package/resources/course-lesson-interactions.d.mts +2 -2
  46. package/resources/course-lesson-interactions.d.ts +2 -2
  47. package/resources/course-lesson-interactions.js +2 -2
  48. package/resources/course-lesson-interactions.mjs +2 -2
  49. package/resources/course-lessons.d.mts +184 -24
  50. package/resources/course-lessons.d.mts.map +1 -1
  51. package/resources/course-lessons.d.ts +184 -24
  52. package/resources/course-lessons.d.ts.map +1 -1
  53. package/resources/course-students.d.mts +187 -0
  54. package/resources/course-students.d.mts.map +1 -0
  55. package/resources/course-students.d.ts +187 -0
  56. package/resources/course-students.d.ts.map +1 -0
  57. package/resources/course-students.js +36 -0
  58. package/resources/course-students.js.map +1 -0
  59. package/resources/course-students.mjs +32 -0
  60. package/resources/course-students.mjs.map +1 -0
  61. package/resources/courses.d.mts +85 -21
  62. package/resources/courses.d.mts.map +1 -1
  63. package/resources/courses.d.ts +85 -21
  64. package/resources/courses.d.ts.map +1 -1
  65. package/resources/entries.d.mts +2 -2
  66. package/resources/entries.d.ts +2 -2
  67. package/resources/experiences.d.mts +15 -10
  68. package/resources/experiences.d.mts.map +1 -1
  69. package/resources/experiences.d.ts +15 -10
  70. package/resources/experiences.d.ts.map +1 -1
  71. package/resources/forum-posts.d.mts +29 -19
  72. package/resources/forum-posts.d.mts.map +1 -1
  73. package/resources/forum-posts.d.ts +29 -19
  74. package/resources/forum-posts.d.ts.map +1 -1
  75. package/resources/index.d.mts +6 -4
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +6 -4
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js +5 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs +3 -1
  82. package/resources/index.mjs.map +1 -1
  83. package/resources/invoices.d.mts +539 -167
  84. package/resources/invoices.d.mts.map +1 -1
  85. package/resources/invoices.d.ts +539 -167
  86. package/resources/invoices.d.ts.map +1 -1
  87. package/resources/invoices.js +2 -24
  88. package/resources/invoices.js.map +1 -1
  89. package/resources/invoices.mjs +2 -24
  90. package/resources/invoices.mjs.map +1 -1
  91. package/resources/ledger-accounts.d.mts +1 -1
  92. package/resources/ledger-accounts.d.ts +1 -1
  93. package/resources/ledger-accounts.js +1 -1
  94. package/resources/ledger-accounts.mjs +1 -1
  95. package/resources/members.d.mts +11 -11
  96. package/resources/members.d.mts.map +1 -1
  97. package/resources/members.d.ts +11 -11
  98. package/resources/members.d.ts.map +1 -1
  99. package/resources/memberships.d.mts +4 -4
  100. package/resources/memberships.d.mts.map +1 -1
  101. package/resources/memberships.d.ts +4 -4
  102. package/resources/memberships.d.ts.map +1 -1
  103. package/resources/messages.d.mts +29 -19
  104. package/resources/messages.d.mts.map +1 -1
  105. package/resources/messages.d.ts +29 -19
  106. package/resources/messages.d.ts.map +1 -1
  107. package/resources/payments.d.mts +10 -3
  108. package/resources/payments.d.mts.map +1 -1
  109. package/resources/payments.d.ts +10 -3
  110. package/resources/payments.d.ts.map +1 -1
  111. package/resources/plans.d.mts +118 -20
  112. package/resources/plans.d.mts.map +1 -1
  113. package/resources/plans.d.ts +118 -20
  114. package/resources/plans.d.ts.map +1 -1
  115. package/resources/plans.js.map +1 -1
  116. package/resources/plans.mjs.map +1 -1
  117. package/resources/products.d.mts +20 -15
  118. package/resources/products.d.mts.map +1 -1
  119. package/resources/products.d.ts +20 -15
  120. package/resources/products.d.ts.map +1 -1
  121. package/resources/promo-codes.d.mts +4 -4
  122. package/resources/promo-codes.d.ts +4 -4
  123. package/resources/shared.d.mts +69 -20
  124. package/resources/shared.d.mts.map +1 -1
  125. package/resources/shared.d.ts +69 -20
  126. package/resources/shared.d.ts.map +1 -1
  127. package/resources/transfers.d.mts +12 -0
  128. package/resources/transfers.d.mts.map +1 -1
  129. package/resources/transfers.d.ts +12 -0
  130. package/resources/transfers.d.ts.map +1 -1
  131. package/resources/users.d.mts +3 -0
  132. package/resources/users.d.mts.map +1 -1
  133. package/resources/users.d.ts +3 -0
  134. package/resources/users.d.ts.map +1 -1
  135. package/src/client.ts +45 -10
  136. package/src/resources/access-tokens.ts +72 -0
  137. package/src/resources/app-builds.ts +19 -14
  138. package/src/resources/apps.ts +16 -11
  139. package/src/resources/checkout-configurations.ts +245 -199
  140. package/src/resources/companies.ts +196 -0
  141. package/src/resources/course-lesson-interactions.ts +2 -2
  142. package/src/resources/course-lessons.ts +223 -24
  143. package/src/resources/course-students.ts +238 -0
  144. package/src/resources/courses.ts +104 -22
  145. package/src/resources/entries.ts +2 -2
  146. package/src/resources/experiences.ts +19 -11
  147. package/src/resources/forum-posts.ts +35 -21
  148. package/src/resources/index.ts +17 -2
  149. package/src/resources/invoices.ts +630 -171
  150. package/src/resources/ledger-accounts.ts +1 -1
  151. package/src/resources/members.ts +12 -12
  152. package/src/resources/memberships.ts +5 -5
  153. package/src/resources/messages.ts +35 -21
  154. package/src/resources/payments.ts +10 -3
  155. package/src/resources/plans.ts +130 -20
  156. package/src/resources/products.ts +24 -16
  157. package/src/resources/promo-codes.ts +4 -4
  158. package/src/resources/shared.ts +70 -20
  159. package/src/resources/transfers.ts +10 -0
  160. package/src/resources/users.ts +3 -0
  161. package/src/version.ts +1 -1
  162. package/version.d.mts +1 -1
  163. package/version.d.ts +1 -1
  164. package/version.js +1 -1
  165. package/version.mjs +1 -1
@@ -0,0 +1,238 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class CourseStudents extends APIResource {
10
+ /**
11
+ * Retrieves a course student by interaction ID
12
+ *
13
+ * Required permissions:
14
+ *
15
+ * - `courses:read`
16
+ * - `course_analytics:read`
17
+ */
18
+ retrieve(id: string, options?: RequestOptions): APIPromise<CourseStudentRetrieveResponse> {
19
+ return this._client.get(path`/course_students/${id}`, options);
20
+ }
21
+
22
+ /**
23
+ * Lists students for a course
24
+ *
25
+ * Required permissions:
26
+ *
27
+ * - `courses:read`
28
+ * - `course_analytics:read`
29
+ */
30
+ list(
31
+ query: CourseStudentListParams,
32
+ options?: RequestOptions,
33
+ ): PagePromise<CourseStudentListResponsesCursorPage, CourseStudentListResponse> {
34
+ return this._client.getAPIList('/course_students', CursorPage<CourseStudentListResponse>, {
35
+ query,
36
+ ...options,
37
+ });
38
+ }
39
+ }
40
+
41
+ export type CourseStudentListResponsesCursorPage = CursorPage<CourseStudentListResponse>;
42
+
43
+ /**
44
+ * A course student (enrollment of a student in a course)
45
+ */
46
+ export interface CourseStudentRetrieveResponse {
47
+ /**
48
+ * The ID of the course student. Looks like crsi_XXX
49
+ */
50
+ id: string;
51
+
52
+ /**
53
+ * The number of lessons the student has completed
54
+ */
55
+ completed_lessons_count: number;
56
+
57
+ /**
58
+ * The percentage of lessons completed (0-100)
59
+ */
60
+ completion_rate: number;
61
+
62
+ /**
63
+ * The course the student is enrolled in
64
+ */
65
+ course: CourseStudentRetrieveResponse.Course;
66
+
67
+ /**
68
+ * When the student first interacted with the course
69
+ */
70
+ first_interaction_at: string;
71
+
72
+ /**
73
+ * When the student last interacted with the course
74
+ */
75
+ last_interaction_at: string;
76
+
77
+ /**
78
+ * The total number of lessons the student has access to
79
+ */
80
+ total_lessons_count: number;
81
+
82
+ /**
83
+ * The user who is enrolled in the course
84
+ */
85
+ user: CourseStudentRetrieveResponse.User;
86
+ }
87
+
88
+ export namespace CourseStudentRetrieveResponse {
89
+ /**
90
+ * The course the student is enrolled in
91
+ */
92
+ export interface Course {
93
+ /**
94
+ * The ID of the course. Looks like cors_XXX
95
+ */
96
+ id: string;
97
+
98
+ /**
99
+ * The experience that the course belongs to
100
+ */
101
+ experience: Course.Experience;
102
+
103
+ /**
104
+ * The title of the course
105
+ */
106
+ title: string | null;
107
+ }
108
+
109
+ export namespace Course {
110
+ /**
111
+ * The experience that the course belongs to
112
+ */
113
+ export interface Experience {
114
+ /**
115
+ * The unique ID representing this experience
116
+ */
117
+ id: string;
118
+ }
119
+ }
120
+
121
+ /**
122
+ * The user who is enrolled in the course
123
+ */
124
+ export interface User {
125
+ /**
126
+ * The internal ID of the user.
127
+ */
128
+ id: string;
129
+
130
+ /**
131
+ * The name of the user from their Whop account.
132
+ */
133
+ name: string | null;
134
+
135
+ /**
136
+ * The username of the user from their Whop account.
137
+ */
138
+ username: string;
139
+ }
140
+ }
141
+
142
+ /**
143
+ * A course student (enrollment of a student in a course)
144
+ */
145
+ export interface CourseStudentListResponse {
146
+ /**
147
+ * The ID of the course student. Looks like crsi_XXX
148
+ */
149
+ id: string;
150
+
151
+ /**
152
+ * The number of lessons the student has completed
153
+ */
154
+ completed_lessons_count: number;
155
+
156
+ /**
157
+ * The percentage of lessons completed (0-100)
158
+ */
159
+ completion_rate: number;
160
+
161
+ /**
162
+ * When the student first interacted with the course
163
+ */
164
+ first_interaction_at: string;
165
+
166
+ /**
167
+ * When the student last interacted with the course
168
+ */
169
+ last_interaction_at: string;
170
+
171
+ /**
172
+ * The total number of lessons the student has access to
173
+ */
174
+ total_lessons_count: number;
175
+
176
+ /**
177
+ * The user who is enrolled in the course
178
+ */
179
+ user: CourseStudentListResponse.User;
180
+ }
181
+
182
+ export namespace CourseStudentListResponse {
183
+ /**
184
+ * The user who is enrolled in the course
185
+ */
186
+ export interface User {
187
+ /**
188
+ * The internal ID of the user.
189
+ */
190
+ id: string;
191
+
192
+ /**
193
+ * The name of the user from their Whop account.
194
+ */
195
+ name: string | null;
196
+
197
+ /**
198
+ * The username of the user from their Whop account.
199
+ */
200
+ username: string;
201
+ }
202
+ }
203
+
204
+ export interface CourseStudentListParams extends CursorPageParams {
205
+ /**
206
+ * The ID of the course
207
+ */
208
+ course_id: string;
209
+
210
+ /**
211
+ * Returns the elements in the list that come before the specified cursor.
212
+ */
213
+ before?: string | null;
214
+
215
+ /**
216
+ * Returns the first _n_ elements from the list.
217
+ */
218
+ first?: number | null;
219
+
220
+ /**
221
+ * Filter students by name - returns students whose names match the keyword
222
+ */
223
+ keyword?: string | null;
224
+
225
+ /**
226
+ * Returns the last _n_ elements from the list.
227
+ */
228
+ last?: number | null;
229
+ }
230
+
231
+ export declare namespace CourseStudents {
232
+ export {
233
+ type CourseStudentRetrieveResponse as CourseStudentRetrieveResponse,
234
+ type CourseStudentListResponse as CourseStudentListResponse,
235
+ type CourseStudentListResponsesCursorPage as CourseStudentListResponsesCursorPage,
236
+ type CourseStudentListParams as CourseStudentListParams,
237
+ };
238
+ }
@@ -146,6 +146,11 @@ export interface Course {
146
146
  */
147
147
  language: Languages;
148
148
 
149
+ /**
150
+ * The order of the course within its experience
151
+ */
152
+ order: string;
153
+
149
154
  /**
150
155
  * Whether the course requires students to complete the previous lesson before
151
156
  * moving on to the next one
@@ -171,6 +176,12 @@ export interface Course {
171
176
  * The timestamp of when the course was last updated
172
177
  */
173
178
  updated_at: string;
179
+
180
+ /**
181
+ * The visibility of the course. Determines how / whether this course is visible to
182
+ * users.
183
+ */
184
+ visibility: CourseVisibilities;
174
185
  }
175
186
 
176
187
  export namespace Course {
@@ -259,6 +270,12 @@ export namespace Course {
259
270
  }
260
271
  }
261
272
 
273
+ /**
274
+ * The available visibilities for a course. Determines how / whether a course is
275
+ * visible to users.
276
+ */
277
+ export type CourseVisibilities = 'visible' | 'hidden';
278
+
262
279
  /**
263
280
  * The available languages for a course
264
281
  */
@@ -317,6 +334,11 @@ export interface CourseListResponse {
317
334
  */
318
335
  language: Languages;
319
336
 
337
+ /**
338
+ * The order of the course within its experience
339
+ */
340
+ order: string;
341
+
320
342
  /**
321
343
  * Whether the course requires students to complete the previous lesson before
322
344
  * moving on to the next one
@@ -342,6 +364,12 @@ export interface CourseListResponse {
342
364
  * The timestamp of when the course was last updated
343
365
  */
344
366
  updated_at: string;
367
+
368
+ /**
369
+ * The visibility of the course. Determines how / whether this course is visible to
370
+ * users.
371
+ */
372
+ visibility: CourseVisibilities;
345
373
  }
346
374
 
347
375
  export namespace CourseListResponse {
@@ -394,11 +422,30 @@ export interface CourseCreateParams {
394
422
  */
395
423
  title: string;
396
424
 
425
+ /**
426
+ * Whether the course will award its students a PDF certificate after completing
427
+ * all lessons
428
+ */
429
+ certificate_after_completion_enabled?: boolean | null;
430
+
397
431
  /**
398
432
  * The cover image URL of the course
399
433
  */
400
434
  cover_image?: string | null;
401
435
 
436
+ /**
437
+ * The decimal order position of the course within its experience. If not provided,
438
+ * it will be set to the next sequential order. Use fractional values (e.g., 1.5)
439
+ * to place between existing courses.
440
+ */
441
+ order?: string | null;
442
+
443
+ /**
444
+ * Whether the course requires students to complete the previous lesson before
445
+ * moving on to the next one
446
+ */
447
+ require_completing_lessons_in_order?: boolean | null;
448
+
402
449
  /**
403
450
  * The tagline of the course
404
451
  */
@@ -407,27 +454,41 @@ export interface CourseCreateParams {
407
454
  /**
408
455
  * The thumbnail for the course in png, jpeg, or gif format
409
456
  */
410
- thumbnail?: CourseCreateParams.Thumbnail | null;
457
+ thumbnail?:
458
+ | CourseCreateParams.AttachmentInputWithDirectUploadID
459
+ | CourseCreateParams.AttachmentInputWithID
460
+ | null;
461
+
462
+ /**
463
+ * The available visibilities for a course. Determines how / whether a course is
464
+ * visible to users.
465
+ */
466
+ visibility?: CourseVisibilities | null;
411
467
  }
412
468
 
413
469
  export namespace CourseCreateParams {
414
470
  /**
415
- * The thumbnail for the course in png, jpeg, or gif format
471
+ * Input for an attachment
416
472
  */
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
-
473
+ export interface AttachmentInputWithDirectUploadID {
425
474
  /**
426
475
  * This ID should be used the first time you upload an attachment. It is the ID of
427
476
  * the direct upload that was created when uploading the file to S3 via the
428
477
  * mediaDirectUpload mutation.
429
478
  */
430
- direct_upload_id?: string | null;
479
+ direct_upload_id: string;
480
+ }
481
+
482
+ /**
483
+ * Input for an attachment
484
+ */
485
+ export interface AttachmentInputWithID {
486
+ /**
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.
490
+ */
491
+ id: string;
431
492
  }
432
493
  }
433
494
 
@@ -458,6 +519,12 @@ export interface CourseUpdateParams {
458
519
  */
459
520
  language?: Languages | null;
460
521
 
522
+ /**
523
+ * The decimal order position of the course within its experience. Use fractional
524
+ * values (e.g., 1.5) to place between existing courses.
525
+ */
526
+ order?: string | null;
527
+
461
528
  /**
462
529
  * Whether the course requires students to complete the previous lesson before
463
530
  * moving on to the next one
@@ -472,12 +539,21 @@ export interface CourseUpdateParams {
472
539
  /**
473
540
  * The thumbnail for the course in png, jpeg, or gif format
474
541
  */
475
- thumbnail?: CourseUpdateParams.Thumbnail | null;
542
+ thumbnail?:
543
+ | CourseUpdateParams.AttachmentInputWithDirectUploadID
544
+ | CourseUpdateParams.AttachmentInputWithID
545
+ | null;
476
546
 
477
547
  /**
478
548
  * The title of the course
479
549
  */
480
550
  title?: string | null;
551
+
552
+ /**
553
+ * The available visibilities for a course. Determines how / whether a course is
554
+ * visible to users.
555
+ */
556
+ visibility?: CourseVisibilities | null;
481
557
  }
482
558
 
483
559
  export namespace CourseUpdateParams {
@@ -534,22 +610,27 @@ export namespace CourseUpdateParams {
534
610
  }
535
611
 
536
612
  /**
537
- * The thumbnail for the course in png, jpeg, or gif format
613
+ * Input for an attachment
538
614
  */
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
-
615
+ export interface AttachmentInputWithDirectUploadID {
547
616
  /**
548
617
  * This ID should be used the first time you upload an attachment. It is the ID of
549
618
  * the direct upload that was created when uploading the file to S3 via the
550
619
  * mediaDirectUpload mutation.
551
620
  */
552
- direct_upload_id?: string | null;
621
+ direct_upload_id: string;
622
+ }
623
+
624
+ /**
625
+ * Input for an attachment
626
+ */
627
+ export interface AttachmentInputWithID {
628
+ /**
629
+ * The ID of an existing attachment object. Use this when updating a resource and
630
+ * keeping a subset of the attachments. Don't use this unless you know what you're
631
+ * doing.
632
+ */
633
+ id: string;
553
634
  }
554
635
  }
555
636
 
@@ -583,6 +664,7 @@ export interface CourseListParams extends CursorPageParams {
583
664
  export declare namespace Courses {
584
665
  export {
585
666
  type Course as Course,
667
+ type CourseVisibilities as CourseVisibilities,
586
668
  type Languages as Languages,
587
669
  type CourseListResponse as CourseListResponse,
588
670
  type CourseDeleteResponse as CourseDeleteResponse,
@@ -82,7 +82,7 @@ export interface EntryListResponse {
82
82
  plan: EntryListResponse.Plan | null;
83
83
 
84
84
  /**
85
- * The access pass tied to this entry, if there is one.
85
+ * The product tied to this entry, if there is one.
86
86
  */
87
87
  product: EntryListResponse.Product | null;
88
88
 
@@ -109,7 +109,7 @@ export namespace EntryListResponse {
109
109
  }
110
110
 
111
111
  /**
112
- * The access pass tied to this entry, if there is one.
112
+ * The product tied to this entry, if there is one.
113
113
  */
114
114
  export interface Product {
115
115
  /**
@@ -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
 
@@ -90,7 +90,7 @@ export type ForumPostListResponsesCursorPage = CursorPage<ForumPostListResponse>
90
90
  */
91
91
  export interface ForumPostListResponse {
92
92
  /**
93
- * The unique identifier for the entity
93
+ * The unique identifier of the resource.
94
94
  */
95
95
  id: string;
96
96
 
@@ -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
 
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
+ export { AccessTokens, type AccessTokenCreateResponse, type AccessTokenCreateParams } from './access-tokens';
4
5
  export {
5
6
  AppBuilds,
6
7
  type AppBuildListResponse,
@@ -37,7 +38,13 @@ export {
37
38
  type CheckoutConfigurationListParams,
38
39
  type CheckoutConfigurationListResponsesCursorPage,
39
40
  } from './checkout-configurations';
40
- export { Companies } from './companies';
41
+ export {
42
+ Companies,
43
+ type CompanyListResponse,
44
+ type CompanyCreateParams,
45
+ type CompanyListParams,
46
+ type CompanyListResponsesCursorPage,
47
+ } from './companies';
41
48
  export {
42
49
  CourseChapters,
43
50
  type CourseChapter,
@@ -55,6 +62,7 @@ export {
55
62
  export {
56
63
  CourseLessons,
57
64
  type AssessmentQuestionTypes,
65
+ type EmbedType,
58
66
  type Lesson,
59
67
  type LessonTypes,
60
68
  type LessonVisibilities,
@@ -65,9 +73,17 @@ export {
65
73
  type CourseLessonListParams,
66
74
  type CourseLessonListResponsesCursorPage,
67
75
  } from './course-lessons';
76
+ export {
77
+ CourseStudents,
78
+ type CourseStudentRetrieveResponse,
79
+ type CourseStudentListResponse,
80
+ type CourseStudentListParams,
81
+ type CourseStudentListResponsesCursorPage,
82
+ } from './course-students';
68
83
  export {
69
84
  Courses,
70
85
  type Course,
86
+ type CourseVisibilities,
71
87
  type Languages,
72
88
  type CourseListResponse,
73
89
  type CourseDeleteResponse,
@@ -112,7 +128,6 @@ export {
112
128
  } from './forums';
113
129
  export {
114
130
  Invoices,
115
- type InvoiceCreateResponse,
116
131
  type InvoiceVoidResponse,
117
132
  type InvoiceCreateParams,
118
133
  type InvoiceListParams,