@whop/sdk 0.0.2 → 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.
- package/CHANGELOG.md +55 -0
- package/client.d.mts +30 -12
- package/client.d.mts.map +1 -1
- package/client.d.ts +30 -12
- package/client.d.ts.map +1 -1
- package/client.js +19 -1
- package/client.js.map +1 -1
- package/client.mjs +21 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- 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 +252 -140
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +252 -140
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +6 -20
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +6 -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-chapters.d.mts +185 -0
- package/resources/course-chapters.d.mts.map +1 -0
- package/resources/course-chapters.d.ts +185 -0
- package/resources/course-chapters.d.ts.map +1 -0
- package/resources/course-chapters.js +103 -0
- package/resources/course-chapters.js.map +1 -0
- package/resources/course-chapters.mjs +99 -0
- package/resources/course-chapters.mjs.map +1 -0
- 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 +563 -0
- package/resources/course-lessons.d.mts.map +1 -0
- package/resources/course-lessons.d.ts +563 -0
- package/resources/course-lessons.d.ts.map +1 -0
- package/resources/course-lessons.js +101 -0
- package/resources/course-lessons.js.map +1 -0
- package/resources/course-lessons.mjs +97 -0
- package/resources/course-lessons.mjs.map +1 -0
- 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 +485 -0
- package/resources/courses.d.mts.map +1 -0
- package/resources/courses.d.ts +485 -0
- package/resources/courses.d.ts.map +1 -0
- package/resources/courses.js +98 -0
- package/resources/courses.js.map +1 -0
- package/resources/courses.mjs +94 -0
- package/resources/courses.mjs.map +1 -0
- package/resources/experiences.d.mts +42 -11
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +42 -11
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +22 -0
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +22 -0
- package/resources/experiences.mjs.map +1 -1
- package/resources/forum-posts.d.mts +75 -10
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +75 -10
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +11 -0
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +11 -0
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/index.d.mts +12 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +529 -146
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +529 -146
- 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.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +1 -1
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/members.d.mts +4 -0
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +4 -0
- package/resources/members.d.ts.map +1 -1
- package/resources/memberships.d.mts +26 -5
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +26 -5
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +1 -1
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +1 -1
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +57 -10
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +57 -10
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +6 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +6 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/payments.d.mts +35 -13
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +35 -13
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +161 -17
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +161 -17
- 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 +30 -33
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +30 -33
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +394 -0
- package/resources/promo-codes.d.mts.map +1 -0
- package/resources/promo-codes.d.ts +394 -0
- package/resources/promo-codes.d.ts.map +1 -0
- package/resources/promo-codes.js +91 -0
- package/resources/promo-codes.js.map +1 -0
- package/resources/promo-codes.mjs +87 -0
- package/resources/promo-codes.mjs.map +1 -0
- package/resources/reviews.d.mts +277 -0
- package/resources/reviews.d.mts.map +1 -0
- package/resources/reviews.d.ts +277 -0
- package/resources/reviews.d.ts.map +1 -0
- package/resources/reviews.js +23 -0
- package/resources/reviews.js.map +1 -0
- package/resources/reviews.mjs +19 -0
- package/resources/reviews.mjs.map +1 -0
- package/resources/shared.d.mts +117 -14
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +117 -14
- 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/src/client.ts +166 -11
- package/src/resources/app-builds.ts +19 -14
- package/src/resources/apps.ts +16 -11
- package/src/resources/checkout-configurations.ts +278 -143
- package/src/resources/companies.ts +196 -0
- package/src/resources/course-chapters.ts +236 -0
- package/src/resources/course-lesson-interactions.ts +2 -2
- package/src/resources/course-lessons.ts +699 -0
- package/src/resources/course-students.ts +238 -0
- package/src/resources/courses.ts +622 -0
- package/src/resources/experiences.ts +54 -11
- package/src/resources/forum-posts.ts +95 -10
- package/src/resources/index.ts +73 -2
- package/src/resources/invoices.ts +620 -149
- package/src/resources/ledger-accounts.ts +13 -1
- package/src/resources/members.ts +5 -0
- package/src/resources/memberships.ts +31 -6
- package/src/resources/messages.ts +74 -10
- package/src/resources/payments.ts +146 -19
- package/src/resources/plans.ts +184 -17
- package/src/resources/products.ts +36 -37
- package/src/resources/promo-codes.ts +490 -0
- package/src/resources/reviews.ts +348 -0
- package/src/resources/shared.ts +128 -14
- package/src/resources/transfers.ts +10 -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
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as CourseLessonsAPI from "./course-lessons.mjs";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
5
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
|
+
export declare class Courses extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new course module in an experience
|
|
9
|
+
*
|
|
10
|
+
* Required permissions:
|
|
11
|
+
*
|
|
12
|
+
* - `courses:update`
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const course = await client.courses.create({
|
|
17
|
+
* experience_id: 'exp_xxxxxxxxxxxxxx',
|
|
18
|
+
* title: 'title',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: CourseCreateParams, options?: RequestOptions): APIPromise<Course>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves a course by ID
|
|
25
|
+
*
|
|
26
|
+
* Required permissions:
|
|
27
|
+
*
|
|
28
|
+
* - `courses:read`
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const course = await client.courses.retrieve(
|
|
33
|
+
* 'cors_xxxxxxxxxxxxx',
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Course>;
|
|
38
|
+
/**
|
|
39
|
+
* Updates a course
|
|
40
|
+
*
|
|
41
|
+
* Required permissions:
|
|
42
|
+
*
|
|
43
|
+
* - `courses:update`
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const course = await client.courses.update(
|
|
48
|
+
* 'cors_xxxxxxxxxxxxx',
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
update(id: string, body?: CourseUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Course>;
|
|
53
|
+
/**
|
|
54
|
+
* Lists courses for an experience or company
|
|
55
|
+
*
|
|
56
|
+
* Required permissions:
|
|
57
|
+
*
|
|
58
|
+
* - `courses:read`
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* // Automatically fetches more pages as needed.
|
|
63
|
+
* for await (const courseListResponse of client.courses.list()) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
list(query?: CourseListParams | null | undefined, options?: RequestOptions): PagePromise<CourseListResponsesCursorPage, CourseListResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* Deletes a course
|
|
71
|
+
*
|
|
72
|
+
* Required permissions:
|
|
73
|
+
*
|
|
74
|
+
* - `courses:update`
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const course = await client.courses.delete(
|
|
79
|
+
* 'cors_xxxxxxxxxxxxx',
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
delete(id: string, options?: RequestOptions): APIPromise<CourseDeleteResponse>;
|
|
84
|
+
}
|
|
85
|
+
export type CourseListResponsesCursorPage = CursorPage<CourseListResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* A course from the courses app
|
|
88
|
+
*/
|
|
89
|
+
export interface Course {
|
|
90
|
+
/**
|
|
91
|
+
* The ID of the course. Looks like cors_XXX
|
|
92
|
+
*/
|
|
93
|
+
id: string;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the course will award its students a PDF certificate after completing
|
|
96
|
+
* all lessons
|
|
97
|
+
*/
|
|
98
|
+
certificate_after_completion_enabled: boolean | null;
|
|
99
|
+
/**
|
|
100
|
+
* The chapters in this course
|
|
101
|
+
*/
|
|
102
|
+
chapters: Array<Course.Chapter>;
|
|
103
|
+
/**
|
|
104
|
+
* The timestamp of when the course was created
|
|
105
|
+
*/
|
|
106
|
+
created_at: string;
|
|
107
|
+
/**
|
|
108
|
+
* A short description of the course
|
|
109
|
+
*/
|
|
110
|
+
description: string | null;
|
|
111
|
+
/**
|
|
112
|
+
* The language spoken in the video content of the course, used to generate closed
|
|
113
|
+
* captions in the right language
|
|
114
|
+
*/
|
|
115
|
+
language: Languages;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the course requires students to complete the previous lesson before
|
|
118
|
+
* moving on to the next one
|
|
119
|
+
*/
|
|
120
|
+
require_completing_lessons_in_order: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* A short tagline for the course. It is displayed under the course title in the UI
|
|
123
|
+
*/
|
|
124
|
+
tagline: string | null;
|
|
125
|
+
/**
|
|
126
|
+
* The thumbnail for the course
|
|
127
|
+
*/
|
|
128
|
+
thumbnail: Course.Thumbnail | null;
|
|
129
|
+
/**
|
|
130
|
+
* The title of the course
|
|
131
|
+
*/
|
|
132
|
+
title: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* The timestamp of when the course was last updated
|
|
135
|
+
*/
|
|
136
|
+
updated_at: string;
|
|
137
|
+
}
|
|
138
|
+
export declare namespace Course {
|
|
139
|
+
/**
|
|
140
|
+
* A chapter from the courses app
|
|
141
|
+
*/
|
|
142
|
+
interface Chapter {
|
|
143
|
+
/**
|
|
144
|
+
* The ID of the chapter. Looks like chap_XXX
|
|
145
|
+
*/
|
|
146
|
+
id: string;
|
|
147
|
+
/**
|
|
148
|
+
* The lessons in this chapter
|
|
149
|
+
*/
|
|
150
|
+
lessons: Array<Chapter.Lesson>;
|
|
151
|
+
/**
|
|
152
|
+
* The order of the chapter within its course
|
|
153
|
+
*/
|
|
154
|
+
order: number;
|
|
155
|
+
/**
|
|
156
|
+
* The title of the chapter
|
|
157
|
+
*/
|
|
158
|
+
title: string;
|
|
159
|
+
}
|
|
160
|
+
namespace Chapter {
|
|
161
|
+
/**
|
|
162
|
+
* A lesson from the courses app
|
|
163
|
+
*/
|
|
164
|
+
interface Lesson {
|
|
165
|
+
/**
|
|
166
|
+
* The ID of the lesson
|
|
167
|
+
*/
|
|
168
|
+
id: string;
|
|
169
|
+
/**
|
|
170
|
+
* The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
|
|
171
|
+
*/
|
|
172
|
+
lesson_type: CourseLessonsAPI.LessonTypes;
|
|
173
|
+
/**
|
|
174
|
+
* The order of the lesson within its chapter
|
|
175
|
+
*/
|
|
176
|
+
order: number;
|
|
177
|
+
/**
|
|
178
|
+
* The title of the lesson
|
|
179
|
+
*/
|
|
180
|
+
title: string;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The thumbnail for the course
|
|
185
|
+
*/
|
|
186
|
+
interface Thumbnail {
|
|
187
|
+
/**
|
|
188
|
+
* The ID of the attachment
|
|
189
|
+
*/
|
|
190
|
+
id: string;
|
|
191
|
+
/**
|
|
192
|
+
* The attachment's content type (e.g., image/jpg, video/mp4)
|
|
193
|
+
*/
|
|
194
|
+
content_type: string | null;
|
|
195
|
+
/**
|
|
196
|
+
* The name of the file
|
|
197
|
+
*/
|
|
198
|
+
filename: string | null;
|
|
199
|
+
/**
|
|
200
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
201
|
+
* should be used for apps.
|
|
202
|
+
*/
|
|
203
|
+
optimized_url: string | null;
|
|
204
|
+
/**
|
|
205
|
+
* The original URL of the attachment, such as a direct link to S3. This should
|
|
206
|
+
* never be displayed on the client and always passed to an Imgproxy transformer.
|
|
207
|
+
*/
|
|
208
|
+
source_url: string | null;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* The available languages for a course
|
|
213
|
+
*/
|
|
214
|
+
export type Languages = 'en' | 'es' | 'it' | 'pt' | 'de' | 'fr' | 'pl' | 'ru' | 'nl' | 'ca' | 'tr' | 'sv' | 'uk' | 'no' | 'fi' | 'sk' | 'el' | 'cs' | 'hr' | 'da' | 'ro' | 'bg';
|
|
215
|
+
/**
|
|
216
|
+
* A course from the courses app
|
|
217
|
+
*/
|
|
218
|
+
export interface CourseListResponse {
|
|
219
|
+
/**
|
|
220
|
+
* The ID of the course. Looks like cors_XXX
|
|
221
|
+
*/
|
|
222
|
+
id: string;
|
|
223
|
+
/**
|
|
224
|
+
* Whether the course will award its students a PDF certificate after completing
|
|
225
|
+
* all lessons
|
|
226
|
+
*/
|
|
227
|
+
certificate_after_completion_enabled: boolean | null;
|
|
228
|
+
/**
|
|
229
|
+
* The timestamp of when the course was created
|
|
230
|
+
*/
|
|
231
|
+
created_at: string;
|
|
232
|
+
/**
|
|
233
|
+
* A short description of the course
|
|
234
|
+
*/
|
|
235
|
+
description: string | null;
|
|
236
|
+
/**
|
|
237
|
+
* The language spoken in the video content of the course, used to generate closed
|
|
238
|
+
* captions in the right language
|
|
239
|
+
*/
|
|
240
|
+
language: Languages;
|
|
241
|
+
/**
|
|
242
|
+
* Whether the course requires students to complete the previous lesson before
|
|
243
|
+
* moving on to the next one
|
|
244
|
+
*/
|
|
245
|
+
require_completing_lessons_in_order: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* A short tagline for the course. It is displayed under the course title in the UI
|
|
248
|
+
*/
|
|
249
|
+
tagline: string | null;
|
|
250
|
+
/**
|
|
251
|
+
* The thumbnail for the course
|
|
252
|
+
*/
|
|
253
|
+
thumbnail: CourseListResponse.Thumbnail | null;
|
|
254
|
+
/**
|
|
255
|
+
* The title of the course
|
|
256
|
+
*/
|
|
257
|
+
title: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* The timestamp of when the course was last updated
|
|
260
|
+
*/
|
|
261
|
+
updated_at: string;
|
|
262
|
+
}
|
|
263
|
+
export declare namespace CourseListResponse {
|
|
264
|
+
/**
|
|
265
|
+
* The thumbnail for the course
|
|
266
|
+
*/
|
|
267
|
+
interface Thumbnail {
|
|
268
|
+
/**
|
|
269
|
+
* The ID of the attachment
|
|
270
|
+
*/
|
|
271
|
+
id: string;
|
|
272
|
+
/**
|
|
273
|
+
* The attachment's content type (e.g., image/jpg, video/mp4)
|
|
274
|
+
*/
|
|
275
|
+
content_type: string | null;
|
|
276
|
+
/**
|
|
277
|
+
* The name of the file
|
|
278
|
+
*/
|
|
279
|
+
filename: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
282
|
+
* should be used for apps.
|
|
283
|
+
*/
|
|
284
|
+
optimized_url: string | null;
|
|
285
|
+
/**
|
|
286
|
+
* The original URL of the attachment, such as a direct link to S3. This should
|
|
287
|
+
* never be displayed on the client and always passed to an Imgproxy transformer.
|
|
288
|
+
*/
|
|
289
|
+
source_url: string | null;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Represents `true` or `false` values.
|
|
294
|
+
*/
|
|
295
|
+
export type CourseDeleteResponse = boolean;
|
|
296
|
+
export interface CourseCreateParams {
|
|
297
|
+
/**
|
|
298
|
+
* The ID of the experience to create the course in
|
|
299
|
+
*/
|
|
300
|
+
experience_id: string;
|
|
301
|
+
/**
|
|
302
|
+
* The title of the course
|
|
303
|
+
*/
|
|
304
|
+
title: string;
|
|
305
|
+
/**
|
|
306
|
+
* Whether the course will award its students a PDF certificate after completing
|
|
307
|
+
* all lessons
|
|
308
|
+
*/
|
|
309
|
+
certificate_after_completion_enabled?: boolean | null;
|
|
310
|
+
/**
|
|
311
|
+
* The cover image URL of the course
|
|
312
|
+
*/
|
|
313
|
+
cover_image?: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Whether the course requires students to complete the previous lesson before
|
|
316
|
+
* moving on to the next one
|
|
317
|
+
*/
|
|
318
|
+
require_completing_lessons_in_order?: boolean | null;
|
|
319
|
+
/**
|
|
320
|
+
* The tagline of the course
|
|
321
|
+
*/
|
|
322
|
+
tagline?: string | null;
|
|
323
|
+
/**
|
|
324
|
+
* The thumbnail for the course in png, jpeg, or gif format
|
|
325
|
+
*/
|
|
326
|
+
thumbnail?: CourseCreateParams.AttachmentInputWithDirectUploadID | CourseCreateParams.AttachmentInputWithID | null;
|
|
327
|
+
}
|
|
328
|
+
export declare namespace CourseCreateParams {
|
|
329
|
+
/**
|
|
330
|
+
* Input for an attachment
|
|
331
|
+
*/
|
|
332
|
+
interface AttachmentInputWithDirectUploadID {
|
|
333
|
+
/**
|
|
334
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
335
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
336
|
+
* mediaDirectUpload mutation.
|
|
337
|
+
*/
|
|
338
|
+
direct_upload_id: string;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Input for an attachment
|
|
342
|
+
*/
|
|
343
|
+
interface AttachmentInputWithID {
|
|
344
|
+
/**
|
|
345
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
346
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
347
|
+
* doing.
|
|
348
|
+
*/
|
|
349
|
+
id: string;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
export interface CourseUpdateParams {
|
|
353
|
+
/**
|
|
354
|
+
* Whether the course will award its students a PDF certificate after completing
|
|
355
|
+
* all lessons
|
|
356
|
+
*/
|
|
357
|
+
certificate_after_completion_enabled?: boolean | null;
|
|
358
|
+
/**
|
|
359
|
+
* The chapters and lessons to update
|
|
360
|
+
*/
|
|
361
|
+
chapters?: Array<CourseUpdateParams.Chapter> | null;
|
|
362
|
+
/**
|
|
363
|
+
* The cover image URL of the course
|
|
364
|
+
*/
|
|
365
|
+
cover_image?: string | null;
|
|
366
|
+
/**
|
|
367
|
+
* A short description of the course
|
|
368
|
+
*/
|
|
369
|
+
description?: string | null;
|
|
370
|
+
/**
|
|
371
|
+
* The available languages for a course
|
|
372
|
+
*/
|
|
373
|
+
language?: Languages | null;
|
|
374
|
+
/**
|
|
375
|
+
* Whether the course requires students to complete the previous lesson before
|
|
376
|
+
* moving on to the next one
|
|
377
|
+
*/
|
|
378
|
+
require_completing_lessons_in_order?: boolean | null;
|
|
379
|
+
/**
|
|
380
|
+
* A short tagline for the course
|
|
381
|
+
*/
|
|
382
|
+
tagline?: string | null;
|
|
383
|
+
/**
|
|
384
|
+
* The thumbnail for the course in png, jpeg, or gif format
|
|
385
|
+
*/
|
|
386
|
+
thumbnail?: CourseUpdateParams.AttachmentInputWithDirectUploadID | CourseUpdateParams.AttachmentInputWithID | null;
|
|
387
|
+
/**
|
|
388
|
+
* The title of the course
|
|
389
|
+
*/
|
|
390
|
+
title?: string | null;
|
|
391
|
+
}
|
|
392
|
+
export declare namespace CourseUpdateParams {
|
|
393
|
+
/**
|
|
394
|
+
* Input for updating a chapter while updating a course
|
|
395
|
+
*/
|
|
396
|
+
interface Chapter {
|
|
397
|
+
/**
|
|
398
|
+
* The ID of the chapter to update
|
|
399
|
+
*/
|
|
400
|
+
id: string;
|
|
401
|
+
/**
|
|
402
|
+
* The order of the chapter within its course
|
|
403
|
+
*/
|
|
404
|
+
order: number;
|
|
405
|
+
/**
|
|
406
|
+
* The title of the chapter
|
|
407
|
+
*/
|
|
408
|
+
title: string;
|
|
409
|
+
/**
|
|
410
|
+
* The lessons to update within this chapter
|
|
411
|
+
*/
|
|
412
|
+
lessons?: Array<Chapter.Lesson> | null;
|
|
413
|
+
}
|
|
414
|
+
namespace Chapter {
|
|
415
|
+
/**
|
|
416
|
+
* Input for updating a lesson while updating a course
|
|
417
|
+
*/
|
|
418
|
+
interface Lesson {
|
|
419
|
+
/**
|
|
420
|
+
* The ID of the lesson to update
|
|
421
|
+
*/
|
|
422
|
+
id: string;
|
|
423
|
+
/**
|
|
424
|
+
* The ID of the chapter this lesson belongs to (for moving between chapters)
|
|
425
|
+
*/
|
|
426
|
+
chapter_id: string;
|
|
427
|
+
/**
|
|
428
|
+
* The order of the lesson within its chapter
|
|
429
|
+
*/
|
|
430
|
+
order: number;
|
|
431
|
+
/**
|
|
432
|
+
* The title of the lesson
|
|
433
|
+
*/
|
|
434
|
+
title: string;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Input for an attachment
|
|
439
|
+
*/
|
|
440
|
+
interface AttachmentInputWithDirectUploadID {
|
|
441
|
+
/**
|
|
442
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
443
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
444
|
+
* mediaDirectUpload mutation.
|
|
445
|
+
*/
|
|
446
|
+
direct_upload_id: string;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Input for an attachment
|
|
450
|
+
*/
|
|
451
|
+
interface AttachmentInputWithID {
|
|
452
|
+
/**
|
|
453
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
454
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
455
|
+
* doing.
|
|
456
|
+
*/
|
|
457
|
+
id: string;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
export interface CourseListParams extends CursorPageParams {
|
|
461
|
+
/**
|
|
462
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
463
|
+
*/
|
|
464
|
+
before?: string | null;
|
|
465
|
+
/**
|
|
466
|
+
* The ID of the company
|
|
467
|
+
*/
|
|
468
|
+
company_id?: string | null;
|
|
469
|
+
/**
|
|
470
|
+
* The ID of the experience
|
|
471
|
+
*/
|
|
472
|
+
experience_id?: string | null;
|
|
473
|
+
/**
|
|
474
|
+
* Returns the first _n_ elements from the list.
|
|
475
|
+
*/
|
|
476
|
+
first?: number | null;
|
|
477
|
+
/**
|
|
478
|
+
* Returns the last _n_ elements from the list.
|
|
479
|
+
*/
|
|
480
|
+
last?: number | null;
|
|
481
|
+
}
|
|
482
|
+
export declare namespace Courses {
|
|
483
|
+
export { type Course as Course, type Languages as Languages, type CourseListResponse as CourseListResponse, type CourseDeleteResponse as CourseDeleteResponse, type CourseListResponsesCursorPage as CourseListResponsesCursorPage, type CourseCreateParams as CourseCreateParams, type CourseUpdateParams as CourseUpdateParams, type CourseListParams as CourseListParams, };
|
|
484
|
+
}
|
|
485
|
+
//# sourceMappingURL=courses.d.mts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