@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.
- package/CHANGELOG.md +64 -0
- package/client.d.mts +14 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -8
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +8 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +58 -0
- package/resources/access-tokens.d.mts.map +1 -0
- package/resources/access-tokens.d.ts +58 -0
- package/resources/access-tokens.d.ts.map +1 -0
- package/resources/access-tokens.js +25 -0
- package/resources/access-tokens.js.map +1 -0
- package/resources/access-tokens.mjs +21 -0
- package/resources/access-tokens.mjs.map +1 -0
- package/resources/app-builds.d.mts +16 -13
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +16 -13
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +1 -1
- package/resources/app-builds.mjs +1 -1
- package/resources/apps.d.mts +15 -10
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +15 -10
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +221 -183
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +221 -183
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +4 -20
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +4 -20
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +157 -0
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +157 -0
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +22 -0
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +22 -0
- package/resources/companies.mjs.map +1 -1
- package/resources/course-lesson-interactions.d.mts +2 -2
- package/resources/course-lesson-interactions.d.ts +2 -2
- package/resources/course-lesson-interactions.js +2 -2
- package/resources/course-lesson-interactions.mjs +2 -2
- package/resources/course-lessons.d.mts +184 -24
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +184 -24
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-students.d.mts +187 -0
- package/resources/course-students.d.mts.map +1 -0
- package/resources/course-students.d.ts +187 -0
- package/resources/course-students.d.ts.map +1 -0
- package/resources/course-students.js +36 -0
- package/resources/course-students.js.map +1 -0
- package/resources/course-students.mjs +32 -0
- package/resources/course-students.mjs.map +1 -0
- package/resources/courses.d.mts +85 -21
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +85 -21
- package/resources/courses.d.ts.map +1 -1
- package/resources/entries.d.mts +2 -2
- package/resources/entries.d.ts +2 -2
- package/resources/experiences.d.mts +15 -10
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +15 -10
- package/resources/experiences.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +29 -19
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +29 -19
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/index.d.mts +6 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +539 -167
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +539 -167
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +2 -24
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +2 -24
- package/resources/invoices.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +1 -1
- package/resources/ledger-accounts.d.ts +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +11 -11
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +11 -11
- package/resources/members.d.ts.map +1 -1
- package/resources/memberships.d.mts +4 -4
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +4 -4
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +29 -19
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +29 -19
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +10 -3
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +10 -3
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +118 -20
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +118 -20
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +20 -15
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +20 -15
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +4 -4
- package/resources/promo-codes.d.ts +4 -4
- package/resources/shared.d.mts +69 -20
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +69 -20
- package/resources/shared.d.ts.map +1 -1
- package/resources/transfers.d.mts +12 -0
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +12 -0
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +3 -0
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +3 -0
- package/resources/users.d.ts.map +1 -1
- package/src/client.ts +45 -10
- package/src/resources/access-tokens.ts +72 -0
- package/src/resources/app-builds.ts +19 -14
- package/src/resources/apps.ts +16 -11
- package/src/resources/checkout-configurations.ts +245 -199
- package/src/resources/companies.ts +196 -0
- package/src/resources/course-lesson-interactions.ts +2 -2
- package/src/resources/course-lessons.ts +223 -24
- package/src/resources/course-students.ts +238 -0
- package/src/resources/courses.ts +104 -22
- package/src/resources/entries.ts +2 -2
- package/src/resources/experiences.ts +19 -11
- package/src/resources/forum-posts.ts +35 -21
- package/src/resources/index.ts +17 -2
- package/src/resources/invoices.ts +630 -171
- package/src/resources/ledger-accounts.ts +1 -1
- package/src/resources/members.ts +12 -12
- package/src/resources/memberships.ts +5 -5
- package/src/resources/messages.ts +35 -21
- package/src/resources/payments.ts +10 -3
- package/src/resources/plans.ts +130 -20
- package/src/resources/products.ts +24 -16
- package/src/resources/promo-codes.ts +4 -4
- package/src/resources/shared.ts +70 -20
- package/src/resources/transfers.ts +10 -0
- package/src/resources/users.ts +3 -0
- 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
|
@@ -3,10 +3,23 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as Shared from './shared';
|
|
5
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
8
9
|
|
|
9
10
|
export class Companies extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create a new sub company for your platform
|
|
13
|
+
*
|
|
14
|
+
* Required permissions:
|
|
15
|
+
*
|
|
16
|
+
* - `company:create_child`
|
|
17
|
+
* - `company:basic:read`
|
|
18
|
+
*/
|
|
19
|
+
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company> {
|
|
20
|
+
return this._client.post('/companies', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
|
|
10
23
|
/**
|
|
11
24
|
* Retrieves an company by ID or its url route
|
|
12
25
|
*
|
|
@@ -17,4 +30,187 @@ export class Companies extends APIResource {
|
|
|
17
30
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Company> {
|
|
18
31
|
return this._client.get(path`/companies/${id}`, options);
|
|
19
32
|
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Lists companies the current user has access to
|
|
36
|
+
*
|
|
37
|
+
* Required permissions:
|
|
38
|
+
*
|
|
39
|
+
* - `company:basic:read`
|
|
40
|
+
*/
|
|
41
|
+
list(
|
|
42
|
+
query: CompanyListParams,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse> {
|
|
45
|
+
return this._client.getAPIList('/companies', CursorPage<CompanyListResponse>, { query, ...options });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type CompanyListResponsesCursorPage = CursorPage<CompanyListResponse>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* An object representing a (sanitized) company.
|
|
53
|
+
*/
|
|
54
|
+
export interface CompanyListResponse {
|
|
55
|
+
/**
|
|
56
|
+
* The ID (tag) of the company.
|
|
57
|
+
*/
|
|
58
|
+
id: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The different business types a company can be.
|
|
62
|
+
*/
|
|
63
|
+
business_type: Shared.BusinessTypes | null;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* When the company was created (signed up)
|
|
67
|
+
*/
|
|
68
|
+
created_at: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The creator pitch for the company.
|
|
72
|
+
*/
|
|
73
|
+
description: string | null;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The different industry types a company can be in.
|
|
77
|
+
*/
|
|
78
|
+
industry_type: Shared.IndustryTypes | null;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The company's logo.
|
|
82
|
+
*/
|
|
83
|
+
logo: CompanyListResponse.Logo | null;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The number of members in the company.
|
|
87
|
+
*/
|
|
88
|
+
member_count: number;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A key-value store of data for the account, created/updated by the platform that
|
|
92
|
+
* made the account.
|
|
93
|
+
*/
|
|
94
|
+
metadata: { [key: string]: unknown } | null;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The user who owns this company
|
|
98
|
+
*/
|
|
99
|
+
owner_user: CompanyListResponse.OwnerUser;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The number of reviews that have been published for the company.
|
|
103
|
+
*/
|
|
104
|
+
published_reviews_count: number;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The slug/route of the company on the Whop site.
|
|
108
|
+
*/
|
|
109
|
+
route: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The title of the company.
|
|
113
|
+
*/
|
|
114
|
+
title: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The time the company was last updated.
|
|
118
|
+
*/
|
|
119
|
+
updated_at: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* If the company is Whop Verified
|
|
123
|
+
*/
|
|
124
|
+
verified: boolean;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export namespace CompanyListResponse {
|
|
128
|
+
/**
|
|
129
|
+
* The company's logo.
|
|
130
|
+
*/
|
|
131
|
+
export interface Logo {
|
|
132
|
+
/**
|
|
133
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
134
|
+
* should be used for apps.
|
|
135
|
+
*/
|
|
136
|
+
url: string | null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The user who owns this company
|
|
141
|
+
*/
|
|
142
|
+
export interface OwnerUser {
|
|
143
|
+
/**
|
|
144
|
+
* The internal ID of the user.
|
|
145
|
+
*/
|
|
146
|
+
id: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The name of the user from their Whop account.
|
|
150
|
+
*/
|
|
151
|
+
name: string | null;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The username of the user from their Whop account.
|
|
155
|
+
*/
|
|
156
|
+
username: string;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface CompanyCreateParams {
|
|
161
|
+
/**
|
|
162
|
+
* The email of the user who the company will belong to.
|
|
163
|
+
*/
|
|
164
|
+
email: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The company ID of the platform creating this company.
|
|
168
|
+
*/
|
|
169
|
+
parent_company_id: string;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The name of the company being created.
|
|
173
|
+
*/
|
|
174
|
+
title: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Additional metadata for the account
|
|
178
|
+
*/
|
|
179
|
+
metadata?: { [key: string]: unknown } | null;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface CompanyListParams extends CursorPageParams {
|
|
183
|
+
/**
|
|
184
|
+
* The ID of the parent company to list sub companies for
|
|
185
|
+
*/
|
|
186
|
+
parent_company_id: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
190
|
+
*/
|
|
191
|
+
before?: string | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The direction of the sort.
|
|
195
|
+
*/
|
|
196
|
+
direction?: Shared.Direction | null;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Returns the first _n_ elements from the list.
|
|
200
|
+
*/
|
|
201
|
+
first?: number | null;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Returns the last _n_ elements from the list.
|
|
205
|
+
*/
|
|
206
|
+
last?: number | null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export declare namespace Companies {
|
|
210
|
+
export {
|
|
211
|
+
type CompanyListResponse as CompanyListResponse,
|
|
212
|
+
type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage,
|
|
213
|
+
type CompanyCreateParams as CompanyCreateParams,
|
|
214
|
+
type CompanyListParams as CompanyListParams,
|
|
215
|
+
};
|
|
20
216
|
}
|
|
@@ -14,8 +14,8 @@ export class CourseLessonInteractions extends APIResource {
|
|
|
14
14
|
*
|
|
15
15
|
* Required permissions:
|
|
16
16
|
*
|
|
17
|
-
* - `course_lesson_interaction:read`
|
|
18
17
|
* - `courses:read`
|
|
18
|
+
* - `course_analytics:read`
|
|
19
19
|
*/
|
|
20
20
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CourseLessonInteraction> {
|
|
21
21
|
return this._client.get(path`/course_lesson_interactions/${id}`, options);
|
|
@@ -26,8 +26,8 @@ export class CourseLessonInteractions extends APIResource {
|
|
|
26
26
|
*
|
|
27
27
|
* Required permissions:
|
|
28
28
|
*
|
|
29
|
-
* - `course_lesson_interaction:read`
|
|
30
29
|
* - `courses:read`
|
|
30
|
+
* - `course_analytics:read`
|
|
31
31
|
*/
|
|
32
32
|
list(
|
|
33
33
|
query: CourseLessonInteractionListParams | null | undefined = {},
|
|
@@ -118,6 +118,11 @@ export type CourseLessonListResponsesCursorPage = CursorPage<CourseLessonListRes
|
|
|
118
118
|
*/
|
|
119
119
|
export type AssessmentQuestionTypes = 'short_answer' | 'true_false' | 'multiple_choice' | 'multiple_select';
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* The type of embed for a lesson
|
|
123
|
+
*/
|
|
124
|
+
export type EmbedType = 'youtube' | 'loom';
|
|
125
|
+
|
|
121
126
|
/**
|
|
122
127
|
* A lesson from the courses app
|
|
123
128
|
*/
|
|
@@ -147,6 +152,16 @@ export interface Lesson {
|
|
|
147
152
|
*/
|
|
148
153
|
days_from_course_start_until_unlock: number | null;
|
|
149
154
|
|
|
155
|
+
/**
|
|
156
|
+
* ID for the embed (YouTube video ID or Loom share ID)
|
|
157
|
+
*/
|
|
158
|
+
embed_id: string | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The type of embed for a lesson
|
|
162
|
+
*/
|
|
163
|
+
embed_type: EmbedType | null;
|
|
164
|
+
|
|
150
165
|
/**
|
|
151
166
|
* The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
|
|
152
167
|
*/
|
|
@@ -162,6 +177,11 @@ export interface Lesson {
|
|
|
162
177
|
*/
|
|
163
178
|
order: number;
|
|
164
179
|
|
|
180
|
+
/**
|
|
181
|
+
* The thumbnail for the lesson
|
|
182
|
+
*/
|
|
183
|
+
thumbnail: Lesson.Thumbnail | null;
|
|
184
|
+
|
|
165
185
|
/**
|
|
166
186
|
* The title of the lesson
|
|
167
187
|
*/
|
|
@@ -190,9 +210,10 @@ export namespace Lesson {
|
|
|
190
210
|
id: string;
|
|
191
211
|
|
|
192
212
|
/**
|
|
193
|
-
* The correct answer for the question. Used for short answer questions
|
|
213
|
+
* The correct answer for the question. Used for short answer questions. Only
|
|
214
|
+
* visible to admins (users with courses:update permission)
|
|
194
215
|
*/
|
|
195
|
-
correct_answer: string;
|
|
216
|
+
correct_answer: string | null;
|
|
196
217
|
|
|
197
218
|
/**
|
|
198
219
|
* When the question was created
|
|
@@ -262,9 +283,10 @@ export namespace Lesson {
|
|
|
262
283
|
id: string;
|
|
263
284
|
|
|
264
285
|
/**
|
|
265
|
-
* Whether this option is a correct answer
|
|
286
|
+
* Whether this option is a correct answer. Only visible to admins (users with
|
|
287
|
+
* courses:update permission)
|
|
266
288
|
*/
|
|
267
|
-
is_correct: boolean;
|
|
289
|
+
is_correct: boolean | null;
|
|
268
290
|
|
|
269
291
|
/**
|
|
270
292
|
* The text of the answer option
|
|
@@ -330,6 +352,17 @@ export namespace Lesson {
|
|
|
330
352
|
url: string | null;
|
|
331
353
|
}
|
|
332
354
|
|
|
355
|
+
/**
|
|
356
|
+
* The thumbnail for the lesson
|
|
357
|
+
*/
|
|
358
|
+
export interface Thumbnail {
|
|
359
|
+
/**
|
|
360
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
361
|
+
* should be used for apps.
|
|
362
|
+
*/
|
|
363
|
+
url: string | null;
|
|
364
|
+
}
|
|
365
|
+
|
|
333
366
|
/**
|
|
334
367
|
* The associated Mux asset for video lessons
|
|
335
368
|
*/
|
|
@@ -381,6 +414,16 @@ export interface CourseLessonListResponse {
|
|
|
381
414
|
*/
|
|
382
415
|
days_from_course_start_until_unlock: number | null;
|
|
383
416
|
|
|
417
|
+
/**
|
|
418
|
+
* ID for the embed (YouTube video ID or Loom share ID)
|
|
419
|
+
*/
|
|
420
|
+
embed_id: string | null;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* The type of embed for a lesson
|
|
424
|
+
*/
|
|
425
|
+
embed_type: EmbedType | null;
|
|
426
|
+
|
|
384
427
|
/**
|
|
385
428
|
* The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
|
|
386
429
|
*/
|
|
@@ -391,6 +434,11 @@ export interface CourseLessonListResponse {
|
|
|
391
434
|
*/
|
|
392
435
|
order: number;
|
|
393
436
|
|
|
437
|
+
/**
|
|
438
|
+
* The thumbnail for the lesson
|
|
439
|
+
*/
|
|
440
|
+
thumbnail: CourseLessonListResponse.Thumbnail | null;
|
|
441
|
+
|
|
394
442
|
/**
|
|
395
443
|
* The title of the lesson
|
|
396
444
|
*/
|
|
@@ -403,6 +451,19 @@ export interface CourseLessonListResponse {
|
|
|
403
451
|
visibility: LessonVisibilities;
|
|
404
452
|
}
|
|
405
453
|
|
|
454
|
+
export namespace CourseLessonListResponse {
|
|
455
|
+
/**
|
|
456
|
+
* The thumbnail for the lesson
|
|
457
|
+
*/
|
|
458
|
+
export interface Thumbnail {
|
|
459
|
+
/**
|
|
460
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
461
|
+
* should be used for apps.
|
|
462
|
+
*/
|
|
463
|
+
url: string | null;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
406
467
|
/**
|
|
407
468
|
* Represents `true` or `false` values.
|
|
408
469
|
*/
|
|
@@ -429,13 +490,62 @@ export interface CourseLessonCreateParams {
|
|
|
429
490
|
*/
|
|
430
491
|
days_from_course_start_until_unlock?: number | null;
|
|
431
492
|
|
|
493
|
+
/**
|
|
494
|
+
* ID for the embed (YouTube video ID or Loom share ID)
|
|
495
|
+
*/
|
|
496
|
+
embed_id?: string | null;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* The type of embed for a lesson
|
|
500
|
+
*/
|
|
501
|
+
embed_type?: EmbedType | null;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* The thumbnail for the lesson in png, jpeg, or gif format
|
|
505
|
+
*/
|
|
506
|
+
thumbnail?:
|
|
507
|
+
| CourseLessonCreateParams.AttachmentInputWithDirectUploadID
|
|
508
|
+
| CourseLessonCreateParams.AttachmentInputWithID
|
|
509
|
+
| null;
|
|
510
|
+
|
|
432
511
|
/**
|
|
433
512
|
* The title of the lesson
|
|
434
513
|
*/
|
|
435
514
|
title?: string | null;
|
|
436
515
|
}
|
|
437
516
|
|
|
517
|
+
export namespace CourseLessonCreateParams {
|
|
518
|
+
/**
|
|
519
|
+
* Input for an attachment
|
|
520
|
+
*/
|
|
521
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
522
|
+
/**
|
|
523
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
524
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
525
|
+
* mediaDirectUpload mutation.
|
|
526
|
+
*/
|
|
527
|
+
direct_upload_id: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Input for an attachment
|
|
532
|
+
*/
|
|
533
|
+
export interface AttachmentInputWithID {
|
|
534
|
+
/**
|
|
535
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
536
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
537
|
+
* doing.
|
|
538
|
+
*/
|
|
539
|
+
id: string;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
438
543
|
export interface CourseLessonUpdateParams {
|
|
544
|
+
/**
|
|
545
|
+
* Completion requirements for quiz/knowledge check lessons
|
|
546
|
+
*/
|
|
547
|
+
assessment_completion_requirement?: CourseLessonUpdateParams.AssessmentCompletionRequirement | null;
|
|
548
|
+
|
|
439
549
|
/**
|
|
440
550
|
* Assessment questions for quiz/knowledge check lessons. Replaces all existing
|
|
441
551
|
* questions.
|
|
@@ -446,7 +556,10 @@ export interface CourseLessonUpdateParams {
|
|
|
446
556
|
* General attachments for the lesson (PDFs, files, etc). Replaces all existing
|
|
447
557
|
* attachments.
|
|
448
558
|
*/
|
|
449
|
-
attachments?: Array<
|
|
559
|
+
attachments?: Array<
|
|
560
|
+
| CourseLessonUpdateParams.AttachmentInputWithDirectUploadID
|
|
561
|
+
| CourseLessonUpdateParams.AttachmentInputWithID
|
|
562
|
+
> | null;
|
|
450
563
|
|
|
451
564
|
/**
|
|
452
565
|
* The content of the lesson
|
|
@@ -458,6 +571,16 @@ export interface CourseLessonUpdateParams {
|
|
|
458
571
|
*/
|
|
459
572
|
days_from_course_start_until_unlock?: number | null;
|
|
460
573
|
|
|
574
|
+
/**
|
|
575
|
+
* ID for the embed (YouTube video ID or Loom share ID)
|
|
576
|
+
*/
|
|
577
|
+
embed_id?: string | null;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* The type of embed for a lesson
|
|
581
|
+
*/
|
|
582
|
+
embed_type?: EmbedType | null;
|
|
583
|
+
|
|
461
584
|
/**
|
|
462
585
|
* The available types for a lesson
|
|
463
586
|
*/
|
|
@@ -466,13 +589,29 @@ export interface CourseLessonUpdateParams {
|
|
|
466
589
|
/**
|
|
467
590
|
* The main PDF file for this lesson
|
|
468
591
|
*/
|
|
469
|
-
main_pdf?:
|
|
592
|
+
main_pdf?:
|
|
593
|
+
| CourseLessonUpdateParams.AttachmentInputWithDirectUploadID
|
|
594
|
+
| CourseLessonUpdateParams.AttachmentInputWithID
|
|
595
|
+
| null;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Maximum number of attempts allowed for assessments
|
|
599
|
+
*/
|
|
600
|
+
max_attempts?: number | null;
|
|
470
601
|
|
|
471
602
|
/**
|
|
472
603
|
* The ID of the Mux asset to attach to this lesson for video lessons
|
|
473
604
|
*/
|
|
474
605
|
mux_asset_id?: string | null;
|
|
475
606
|
|
|
607
|
+
/**
|
|
608
|
+
* The thumbnail for the lesson in png, jpeg, or gif format
|
|
609
|
+
*/
|
|
610
|
+
thumbnail?:
|
|
611
|
+
| CourseLessonUpdateParams.AttachmentInputWithDirectUploadID
|
|
612
|
+
| CourseLessonUpdateParams.AttachmentInputWithID
|
|
613
|
+
| null;
|
|
614
|
+
|
|
476
615
|
/**
|
|
477
616
|
* The title of the lesson
|
|
478
617
|
*/
|
|
@@ -486,6 +625,23 @@ export interface CourseLessonUpdateParams {
|
|
|
486
625
|
}
|
|
487
626
|
|
|
488
627
|
export namespace CourseLessonUpdateParams {
|
|
628
|
+
/**
|
|
629
|
+
* Completion requirements for quiz/knowledge check lessons
|
|
630
|
+
*/
|
|
631
|
+
export interface AssessmentCompletionRequirement {
|
|
632
|
+
/**
|
|
633
|
+
* The minimum grade percentage required to pass (0-100). Cannot be set together
|
|
634
|
+
* with minimum_questions_correct.
|
|
635
|
+
*/
|
|
636
|
+
minimum_grade_percent?: number | null;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* The minimum number of questions that must be answered correctly. Cannot be set
|
|
640
|
+
* together with minimum_grade_percent.
|
|
641
|
+
*/
|
|
642
|
+
minimum_questions_correct?: number | null;
|
|
643
|
+
}
|
|
644
|
+
|
|
489
645
|
/**
|
|
490
646
|
* Input for creating or updating an assessment question
|
|
491
647
|
*/
|
|
@@ -514,7 +670,10 @@ export namespace CourseLessonUpdateParams {
|
|
|
514
670
|
/**
|
|
515
671
|
* Optional image attachment for the question
|
|
516
672
|
*/
|
|
517
|
-
image?:
|
|
673
|
+
image?:
|
|
674
|
+
| AssessmentQuestion.AttachmentInputWithDirectUploadID
|
|
675
|
+
| AssessmentQuestion.AttachmentInputWithID
|
|
676
|
+
| null;
|
|
518
677
|
|
|
519
678
|
/**
|
|
520
679
|
* The answer options for multiple choice/select questions
|
|
@@ -524,22 +683,27 @@ export namespace CourseLessonUpdateParams {
|
|
|
524
683
|
|
|
525
684
|
export namespace AssessmentQuestion {
|
|
526
685
|
/**
|
|
527
|
-
*
|
|
686
|
+
* Input for an attachment
|
|
528
687
|
*/
|
|
529
|
-
export interface
|
|
530
|
-
/**
|
|
531
|
-
* The ID of an existing attachment object. Use this when updating a resource and
|
|
532
|
-
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
533
|
-
* doing.
|
|
534
|
-
*/
|
|
535
|
-
id?: string | null;
|
|
536
|
-
|
|
688
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
537
689
|
/**
|
|
538
690
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
539
691
|
* the direct upload that was created when uploading the file to S3 via the
|
|
540
692
|
* mediaDirectUpload mutation.
|
|
541
693
|
*/
|
|
542
|
-
direct_upload_id
|
|
694
|
+
direct_upload_id: string;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Input for an attachment
|
|
699
|
+
*/
|
|
700
|
+
export interface AttachmentInputWithID {
|
|
701
|
+
/**
|
|
702
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
703
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
704
|
+
* doing.
|
|
705
|
+
*/
|
|
706
|
+
id: string;
|
|
543
707
|
}
|
|
544
708
|
|
|
545
709
|
/**
|
|
@@ -567,39 +731,73 @@ export namespace CourseLessonUpdateParams {
|
|
|
567
731
|
/**
|
|
568
732
|
* Input for an attachment
|
|
569
733
|
*/
|
|
570
|
-
export interface
|
|
734
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
735
|
+
/**
|
|
736
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
737
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
738
|
+
* mediaDirectUpload mutation.
|
|
739
|
+
*/
|
|
740
|
+
direct_upload_id: string;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Input for an attachment
|
|
745
|
+
*/
|
|
746
|
+
export interface AttachmentInputWithID {
|
|
571
747
|
/**
|
|
572
748
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
573
749
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
574
750
|
* doing.
|
|
575
751
|
*/
|
|
576
|
-
id
|
|
752
|
+
id: string;
|
|
753
|
+
}
|
|
577
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Input for an attachment
|
|
757
|
+
*/
|
|
758
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
578
759
|
/**
|
|
579
760
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
580
761
|
* the direct upload that was created when uploading the file to S3 via the
|
|
581
762
|
* mediaDirectUpload mutation.
|
|
582
763
|
*/
|
|
583
|
-
direct_upload_id
|
|
764
|
+
direct_upload_id: string;
|
|
584
765
|
}
|
|
585
766
|
|
|
586
767
|
/**
|
|
587
|
-
*
|
|
768
|
+
* Input for an attachment
|
|
588
769
|
*/
|
|
589
|
-
export interface
|
|
770
|
+
export interface AttachmentInputWithID {
|
|
590
771
|
/**
|
|
591
772
|
* The ID of an existing attachment object. Use this when updating a resource and
|
|
592
773
|
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
593
774
|
* doing.
|
|
594
775
|
*/
|
|
595
|
-
id
|
|
776
|
+
id: string;
|
|
777
|
+
}
|
|
596
778
|
|
|
779
|
+
/**
|
|
780
|
+
* Input for an attachment
|
|
781
|
+
*/
|
|
782
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
597
783
|
/**
|
|
598
784
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
599
785
|
* the direct upload that was created when uploading the file to S3 via the
|
|
600
786
|
* mediaDirectUpload mutation.
|
|
601
787
|
*/
|
|
602
|
-
direct_upload_id
|
|
788
|
+
direct_upload_id: string;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Input for an attachment
|
|
793
|
+
*/
|
|
794
|
+
export interface AttachmentInputWithID {
|
|
795
|
+
/**
|
|
796
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
797
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
798
|
+
* doing.
|
|
799
|
+
*/
|
|
800
|
+
id: string;
|
|
603
801
|
}
|
|
604
802
|
}
|
|
605
803
|
|
|
@@ -633,6 +831,7 @@ export interface CourseLessonListParams extends CursorPageParams {
|
|
|
633
831
|
export declare namespace CourseLessons {
|
|
634
832
|
export {
|
|
635
833
|
type AssessmentQuestionTypes as AssessmentQuestionTypes,
|
|
834
|
+
type EmbedType as EmbedType,
|
|
636
835
|
type Lesson as Lesson,
|
|
637
836
|
type LessonTypes as LessonTypes,
|
|
638
837
|
type LessonVisibilities as LessonVisibilities,
|