@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
|
@@ -42,6 +42,22 @@ export class ForumPosts extends APIResource {
|
|
|
42
42
|
return this._client.get(path`/forum_posts/${id}`, options);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Update an existing forum post
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const forumPost = await client.forumPosts.update('id');
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
update(
|
|
54
|
+
id: string,
|
|
55
|
+
body: ForumPostUpdateParams | null | undefined = {},
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): APIPromise<Shared.ForumPost> {
|
|
58
|
+
return this._client.patch(path`/forum_posts/${id}`, { body, ...options });
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
/**
|
|
46
62
|
* Lists forum posts
|
|
47
63
|
*
|
|
@@ -88,6 +104,11 @@ export interface ForumPostListResponse {
|
|
|
88
104
|
*/
|
|
89
105
|
content: string | null;
|
|
90
106
|
|
|
107
|
+
/**
|
|
108
|
+
* The timestamp when the post was created
|
|
109
|
+
*/
|
|
110
|
+
created_at: string;
|
|
111
|
+
|
|
91
112
|
/**
|
|
92
113
|
* Whether the forum post has been edited
|
|
93
114
|
*/
|
|
@@ -118,6 +139,11 @@ export interface ForumPostListResponse {
|
|
|
118
139
|
*/
|
|
119
140
|
title: string | null;
|
|
120
141
|
|
|
142
|
+
/**
|
|
143
|
+
* The timestamp when the post was last updated
|
|
144
|
+
*/
|
|
145
|
+
updated_at: string;
|
|
146
|
+
|
|
121
147
|
/**
|
|
122
148
|
* The user who created this forum post
|
|
123
149
|
*/
|
|
@@ -160,7 +186,9 @@ export interface ForumPostCreateParams {
|
|
|
160
186
|
/**
|
|
161
187
|
* The attachments for this post
|
|
162
188
|
*/
|
|
163
|
-
attachments?: Array<
|
|
189
|
+
attachments?: Array<
|
|
190
|
+
ForumPostCreateParams.AttachmentInputWithDirectUploadID | ForumPostCreateParams.AttachmentInputWithID
|
|
191
|
+
> | null;
|
|
164
192
|
|
|
165
193
|
/**
|
|
166
194
|
* This is the main body of the post in Markdown format. Hidden if paywalled and
|
|
@@ -212,20 +240,25 @@ export namespace ForumPostCreateParams {
|
|
|
212
240
|
/**
|
|
213
241
|
* Input for an attachment
|
|
214
242
|
*/
|
|
215
|
-
export interface
|
|
216
|
-
/**
|
|
217
|
-
* The ID of an existing attachment object. Use this when updating a resource and
|
|
218
|
-
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
219
|
-
* doing.
|
|
220
|
-
*/
|
|
221
|
-
id?: string | null;
|
|
222
|
-
|
|
243
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
223
244
|
/**
|
|
224
245
|
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
225
246
|
* the direct upload that was created when uploading the file to S3 via the
|
|
226
247
|
* mediaDirectUpload mutation.
|
|
227
248
|
*/
|
|
228
|
-
direct_upload_id
|
|
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;
|
|
229
262
|
}
|
|
230
263
|
|
|
231
264
|
/**
|
|
@@ -256,6 +289,57 @@ export namespace ForumPostCreateParams {
|
|
|
256
289
|
}
|
|
257
290
|
}
|
|
258
291
|
|
|
292
|
+
export interface ForumPostUpdateParams {
|
|
293
|
+
/**
|
|
294
|
+
* The attachments for this post
|
|
295
|
+
*/
|
|
296
|
+
attachments?: Array<
|
|
297
|
+
ForumPostUpdateParams.AttachmentInputWithDirectUploadID | ForumPostUpdateParams.AttachmentInputWithID
|
|
298
|
+
> | null;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* This is the main body of the post in Markdown format. Hidden if paywalled and
|
|
302
|
+
* user hasn't purchased access to it.
|
|
303
|
+
*/
|
|
304
|
+
content?: string | null;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Whether the post is pinned. You can only pin a top level posts (not comments).
|
|
308
|
+
*/
|
|
309
|
+
is_pinned?: boolean | null;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* The title of the post. Only visible if paywalled.
|
|
313
|
+
*/
|
|
314
|
+
title?: string | null;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export namespace ForumPostUpdateParams {
|
|
318
|
+
/**
|
|
319
|
+
* Input for an attachment
|
|
320
|
+
*/
|
|
321
|
+
export interface AttachmentInputWithDirectUploadID {
|
|
322
|
+
/**
|
|
323
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
324
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
325
|
+
* mediaDirectUpload mutation.
|
|
326
|
+
*/
|
|
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;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
259
343
|
export interface ForumPostListParams extends CursorPageParams {
|
|
260
344
|
/**
|
|
261
345
|
* The ID of the experience to list forum posts for
|
|
@@ -293,6 +377,7 @@ export declare namespace ForumPosts {
|
|
|
293
377
|
type ForumPostListResponse as ForumPostListResponse,
|
|
294
378
|
type ForumPostListResponsesCursorPage as ForumPostListResponsesCursorPage,
|
|
295
379
|
type ForumPostCreateParams as ForumPostCreateParams,
|
|
380
|
+
type ForumPostUpdateParams as ForumPostUpdateParams,
|
|
296
381
|
type ForumPostListParams as ForumPostListParams,
|
|
297
382
|
};
|
|
298
383
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -37,11 +37,58 @@ export {
|
|
|
37
37
|
type CheckoutConfigurationListParams,
|
|
38
38
|
type CheckoutConfigurationListResponsesCursorPage,
|
|
39
39
|
} from './checkout-configurations';
|
|
40
|
-
export {
|
|
40
|
+
export {
|
|
41
|
+
Companies,
|
|
42
|
+
type CompanyListResponse,
|
|
43
|
+
type CompanyCreateParams,
|
|
44
|
+
type CompanyListParams,
|
|
45
|
+
type CompanyListResponsesCursorPage,
|
|
46
|
+
} from './companies';
|
|
47
|
+
export {
|
|
48
|
+
CourseChapters,
|
|
49
|
+
type CourseChapter,
|
|
50
|
+
type CourseChapterListResponse,
|
|
51
|
+
type CourseChapterDeleteResponse,
|
|
52
|
+
type CourseChapterCreateParams,
|
|
53
|
+
type CourseChapterUpdateParams,
|
|
54
|
+
type CourseChapterListParams,
|
|
55
|
+
type CourseChapterListResponsesCursorPage,
|
|
56
|
+
} from './course-chapters';
|
|
41
57
|
export {
|
|
42
58
|
CourseLessonInteractions,
|
|
43
59
|
type CourseLessonInteractionListParams,
|
|
44
60
|
} from './course-lesson-interactions';
|
|
61
|
+
export {
|
|
62
|
+
CourseLessons,
|
|
63
|
+
type AssessmentQuestionTypes,
|
|
64
|
+
type Lesson,
|
|
65
|
+
type LessonTypes,
|
|
66
|
+
type LessonVisibilities,
|
|
67
|
+
type CourseLessonListResponse,
|
|
68
|
+
type CourseLessonDeleteResponse,
|
|
69
|
+
type CourseLessonCreateParams,
|
|
70
|
+
type CourseLessonUpdateParams,
|
|
71
|
+
type CourseLessonListParams,
|
|
72
|
+
type CourseLessonListResponsesCursorPage,
|
|
73
|
+
} from './course-lessons';
|
|
74
|
+
export {
|
|
75
|
+
CourseStudents,
|
|
76
|
+
type CourseStudentRetrieveResponse,
|
|
77
|
+
type CourseStudentListResponse,
|
|
78
|
+
type CourseStudentListParams,
|
|
79
|
+
type CourseStudentListResponsesCursorPage,
|
|
80
|
+
} from './course-students';
|
|
81
|
+
export {
|
|
82
|
+
Courses,
|
|
83
|
+
type Course,
|
|
84
|
+
type Languages,
|
|
85
|
+
type CourseListResponse,
|
|
86
|
+
type CourseDeleteResponse,
|
|
87
|
+
type CourseCreateParams,
|
|
88
|
+
type CourseUpdateParams,
|
|
89
|
+
type CourseListParams,
|
|
90
|
+
type CourseListResponsesCursorPage,
|
|
91
|
+
} from './courses';
|
|
45
92
|
export {
|
|
46
93
|
Entries,
|
|
47
94
|
type EntryListResponse,
|
|
@@ -58,12 +105,14 @@ export {
|
|
|
58
105
|
type ExperienceListParams,
|
|
59
106
|
type ExperienceAttachParams,
|
|
60
107
|
type ExperienceDetachParams,
|
|
108
|
+
type ExperienceDuplicateParams,
|
|
61
109
|
type ExperienceListResponsesCursorPage,
|
|
62
110
|
} from './experiences';
|
|
63
111
|
export {
|
|
64
112
|
ForumPosts,
|
|
65
113
|
type ForumPostListResponse,
|
|
66
114
|
type ForumPostCreateParams,
|
|
115
|
+
type ForumPostUpdateParams,
|
|
67
116
|
type ForumPostListParams,
|
|
68
117
|
type ForumPostListResponsesCursorPage,
|
|
69
118
|
} from './forum-posts';
|
|
@@ -76,7 +125,6 @@ export {
|
|
|
76
125
|
} from './forums';
|
|
77
126
|
export {
|
|
78
127
|
Invoices,
|
|
79
|
-
type InvoiceCreateResponse,
|
|
80
128
|
type InvoiceVoidResponse,
|
|
81
129
|
type InvoiceCreateParams,
|
|
82
130
|
type InvoiceListParams,
|
|
@@ -102,11 +150,15 @@ export {
|
|
|
102
150
|
Messages,
|
|
103
151
|
type MessageListResponse,
|
|
104
152
|
type MessageCreateParams,
|
|
153
|
+
type MessageUpdateParams,
|
|
105
154
|
type MessageListParams,
|
|
106
155
|
type MessageListResponsesCursorPage,
|
|
107
156
|
} from './messages';
|
|
108
157
|
export {
|
|
109
158
|
Payments,
|
|
159
|
+
type BillingReasons,
|
|
160
|
+
type CardBrands,
|
|
161
|
+
type PaymentMethodTypes,
|
|
110
162
|
type PaymentListResponse,
|
|
111
163
|
type PaymentListParams,
|
|
112
164
|
type PaymentRefundParams,
|
|
@@ -128,6 +180,17 @@ export {
|
|
|
128
180
|
type ProductUpdateParams,
|
|
129
181
|
type ProductListParams,
|
|
130
182
|
} from './products';
|
|
183
|
+
export {
|
|
184
|
+
PromoCodes,
|
|
185
|
+
type PromoCode,
|
|
186
|
+
type PromoCodeStatus,
|
|
187
|
+
type PromoDuration,
|
|
188
|
+
type PromoCodeListResponse,
|
|
189
|
+
type PromoCodeDeleteResponse,
|
|
190
|
+
type PromoCodeCreateParams,
|
|
191
|
+
type PromoCodeListParams,
|
|
192
|
+
type PromoCodeListResponsesCursorPage,
|
|
193
|
+
} from './promo-codes';
|
|
131
194
|
export {
|
|
132
195
|
Reactions,
|
|
133
196
|
type ReactionListResponse,
|
|
@@ -135,6 +198,14 @@ export {
|
|
|
135
198
|
type ReactionListParams,
|
|
136
199
|
type ReactionListResponsesCursorPage,
|
|
137
200
|
} from './reactions';
|
|
201
|
+
export {
|
|
202
|
+
Reviews,
|
|
203
|
+
type ReviewStatus,
|
|
204
|
+
type ReviewRetrieveResponse,
|
|
205
|
+
type ReviewListResponse,
|
|
206
|
+
type ReviewListParams,
|
|
207
|
+
type ReviewListResponsesCursorPage,
|
|
208
|
+
} from './reviews';
|
|
138
209
|
export {
|
|
139
210
|
Shipments,
|
|
140
211
|
type ShipmentListResponse,
|