@whop/sdk 0.0.2 → 0.0.3
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 +23 -0
- package/client.d.mts +23 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -8
- package/client.d.ts.map +1 -1
- package/client.js +16 -1
- package/client.js.map +1 -1
- package/client.mjs +16 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/checkout-configurations.d.mts +76 -2
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +76 -2
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +2 -0
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +2 -0
- package/resources/checkout-configurations.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-lessons.d.mts +523 -0
- package/resources/course-lessons.d.mts.map +1 -0
- package/resources/course-lessons.d.ts +523 -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/courses.d.mts +465 -0
- package/resources/courses.d.mts.map +1 -0
- package/resources/courses.d.ts +465 -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 +27 -1
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +27 -1
- 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 +56 -1
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +56 -1
- 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 +9 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.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 +38 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +38 -1
- 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 +28 -13
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +28 -13
- package/resources/payments.d.ts.map +1 -1
- package/resources/plans.d.mts +49 -1
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +49 -1
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +17 -25
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +17 -25
- 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 +70 -14
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +70 -14
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +134 -1
- package/src/resources/checkout-configurations.ts +91 -2
- package/src/resources/course-chapters.ts +236 -0
- package/src/resources/course-lessons.ts +646 -0
- package/src/resources/courses.ts +594 -0
- package/src/resources/experiences.ts +35 -0
- package/src/resources/forum-posts.ts +71 -0
- package/src/resources/index.ts +59 -0
- 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 +50 -0
- package/src/resources/payments.ts +139 -19
- package/src/resources/plans.ts +60 -1
- package/src/resources/products.ts +20 -29
- package/src/resources/promo-codes.ts +490 -0
- package/src/resources/reviews.ts +348 -0
- package/src/resources/shared.ts +80 -14
- 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
|
*/
|
|
@@ -256,6 +282,50 @@ export namespace ForumPostCreateParams {
|
|
|
256
282
|
}
|
|
257
283
|
}
|
|
258
284
|
|
|
285
|
+
export interface ForumPostUpdateParams {
|
|
286
|
+
/**
|
|
287
|
+
* The attachments for this post
|
|
288
|
+
*/
|
|
289
|
+
attachments?: Array<ForumPostUpdateParams.Attachment> | null;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* This is the main body of the post in Markdown format. Hidden if paywalled and
|
|
293
|
+
* user hasn't purchased access to it.
|
|
294
|
+
*/
|
|
295
|
+
content?: string | null;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Whether the post is pinned. You can only pin a top level posts (not comments).
|
|
299
|
+
*/
|
|
300
|
+
is_pinned?: boolean | null;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The title of the post. Only visible if paywalled.
|
|
304
|
+
*/
|
|
305
|
+
title?: string | null;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export namespace ForumPostUpdateParams {
|
|
309
|
+
/**
|
|
310
|
+
* Input for an attachment
|
|
311
|
+
*/
|
|
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
|
+
|
|
320
|
+
/**
|
|
321
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
322
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
323
|
+
* mediaDirectUpload mutation.
|
|
324
|
+
*/
|
|
325
|
+
direct_upload_id?: string | null;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
259
329
|
export interface ForumPostListParams extends CursorPageParams {
|
|
260
330
|
/**
|
|
261
331
|
* The ID of the experience to list forum posts for
|
|
@@ -293,6 +363,7 @@ export declare namespace ForumPosts {
|
|
|
293
363
|
type ForumPostListResponse as ForumPostListResponse,
|
|
294
364
|
type ForumPostListResponsesCursorPage as ForumPostListResponsesCursorPage,
|
|
295
365
|
type ForumPostCreateParams as ForumPostCreateParams,
|
|
366
|
+
type ForumPostUpdateParams as ForumPostUpdateParams,
|
|
296
367
|
type ForumPostListParams as ForumPostListParams,
|
|
297
368
|
};
|
|
298
369
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -38,10 +38,44 @@ export {
|
|
|
38
38
|
type CheckoutConfigurationListResponsesCursorPage,
|
|
39
39
|
} from './checkout-configurations';
|
|
40
40
|
export { Companies } from './companies';
|
|
41
|
+
export {
|
|
42
|
+
CourseChapters,
|
|
43
|
+
type CourseChapter,
|
|
44
|
+
type CourseChapterListResponse,
|
|
45
|
+
type CourseChapterDeleteResponse,
|
|
46
|
+
type CourseChapterCreateParams,
|
|
47
|
+
type CourseChapterUpdateParams,
|
|
48
|
+
type CourseChapterListParams,
|
|
49
|
+
type CourseChapterListResponsesCursorPage,
|
|
50
|
+
} from './course-chapters';
|
|
41
51
|
export {
|
|
42
52
|
CourseLessonInteractions,
|
|
43
53
|
type CourseLessonInteractionListParams,
|
|
44
54
|
} from './course-lesson-interactions';
|
|
55
|
+
export {
|
|
56
|
+
CourseLessons,
|
|
57
|
+
type AssessmentQuestionTypes,
|
|
58
|
+
type Lesson,
|
|
59
|
+
type LessonTypes,
|
|
60
|
+
type LessonVisibilities,
|
|
61
|
+
type CourseLessonListResponse,
|
|
62
|
+
type CourseLessonDeleteResponse,
|
|
63
|
+
type CourseLessonCreateParams,
|
|
64
|
+
type CourseLessonUpdateParams,
|
|
65
|
+
type CourseLessonListParams,
|
|
66
|
+
type CourseLessonListResponsesCursorPage,
|
|
67
|
+
} from './course-lessons';
|
|
68
|
+
export {
|
|
69
|
+
Courses,
|
|
70
|
+
type Course,
|
|
71
|
+
type Languages,
|
|
72
|
+
type CourseListResponse,
|
|
73
|
+
type CourseDeleteResponse,
|
|
74
|
+
type CourseCreateParams,
|
|
75
|
+
type CourseUpdateParams,
|
|
76
|
+
type CourseListParams,
|
|
77
|
+
type CourseListResponsesCursorPage,
|
|
78
|
+
} from './courses';
|
|
45
79
|
export {
|
|
46
80
|
Entries,
|
|
47
81
|
type EntryListResponse,
|
|
@@ -58,12 +92,14 @@ export {
|
|
|
58
92
|
type ExperienceListParams,
|
|
59
93
|
type ExperienceAttachParams,
|
|
60
94
|
type ExperienceDetachParams,
|
|
95
|
+
type ExperienceDuplicateParams,
|
|
61
96
|
type ExperienceListResponsesCursorPage,
|
|
62
97
|
} from './experiences';
|
|
63
98
|
export {
|
|
64
99
|
ForumPosts,
|
|
65
100
|
type ForumPostListResponse,
|
|
66
101
|
type ForumPostCreateParams,
|
|
102
|
+
type ForumPostUpdateParams,
|
|
67
103
|
type ForumPostListParams,
|
|
68
104
|
type ForumPostListResponsesCursorPage,
|
|
69
105
|
} from './forum-posts';
|
|
@@ -102,11 +138,15 @@ export {
|
|
|
102
138
|
Messages,
|
|
103
139
|
type MessageListResponse,
|
|
104
140
|
type MessageCreateParams,
|
|
141
|
+
type MessageUpdateParams,
|
|
105
142
|
type MessageListParams,
|
|
106
143
|
type MessageListResponsesCursorPage,
|
|
107
144
|
} from './messages';
|
|
108
145
|
export {
|
|
109
146
|
Payments,
|
|
147
|
+
type BillingReasons,
|
|
148
|
+
type CardBrands,
|
|
149
|
+
type PaymentMethodTypes,
|
|
110
150
|
type PaymentListResponse,
|
|
111
151
|
type PaymentListParams,
|
|
112
152
|
type PaymentRefundParams,
|
|
@@ -128,6 +168,17 @@ export {
|
|
|
128
168
|
type ProductUpdateParams,
|
|
129
169
|
type ProductListParams,
|
|
130
170
|
} from './products';
|
|
171
|
+
export {
|
|
172
|
+
PromoCodes,
|
|
173
|
+
type PromoCode,
|
|
174
|
+
type PromoCodeStatus,
|
|
175
|
+
type PromoDuration,
|
|
176
|
+
type PromoCodeListResponse,
|
|
177
|
+
type PromoCodeDeleteResponse,
|
|
178
|
+
type PromoCodeCreateParams,
|
|
179
|
+
type PromoCodeListParams,
|
|
180
|
+
type PromoCodeListResponsesCursorPage,
|
|
181
|
+
} from './promo-codes';
|
|
131
182
|
export {
|
|
132
183
|
Reactions,
|
|
133
184
|
type ReactionListResponse,
|
|
@@ -135,6 +186,14 @@ export {
|
|
|
135
186
|
type ReactionListParams,
|
|
136
187
|
type ReactionListResponsesCursorPage,
|
|
137
188
|
} from './reactions';
|
|
189
|
+
export {
|
|
190
|
+
Reviews,
|
|
191
|
+
type ReviewStatus,
|
|
192
|
+
type ReviewRetrieveResponse,
|
|
193
|
+
type ReviewListResponse,
|
|
194
|
+
type ReviewListParams,
|
|
195
|
+
type ReviewListResponsesCursorPage,
|
|
196
|
+
} from './reviews';
|
|
138
197
|
export {
|
|
139
198
|
Shipments,
|
|
140
199
|
type ShipmentListResponse,
|
|
@@ -36,7 +36,19 @@ export interface LedgerAccountRetrieveResponse {
|
|
|
36
36
|
/**
|
|
37
37
|
* The different statuses a LedgerAccountAudit can be
|
|
38
38
|
*/
|
|
39
|
-
ledger_account_audit_status:
|
|
39
|
+
ledger_account_audit_status:
|
|
40
|
+
| 'pending'
|
|
41
|
+
| 'approved'
|
|
42
|
+
| 'reserves_imposed'
|
|
43
|
+
| 'suspended'
|
|
44
|
+
| 'ignored'
|
|
45
|
+
| 'rejected'
|
|
46
|
+
| 'requested_more_information'
|
|
47
|
+
| 'information_submitted'
|
|
48
|
+
| 'requested_tos_violation_correction'
|
|
49
|
+
| 'clawback_attempted'
|
|
50
|
+
| 'awaiting_sales_review'
|
|
51
|
+
| null;
|
|
40
52
|
|
|
41
53
|
/**
|
|
42
54
|
* The type of ledger account.
|
package/src/resources/members.ts
CHANGED
|
@@ -325,6 +325,11 @@ export interface MemberListParams extends CursorPageParams {
|
|
|
325
325
|
* The statuses to filter the members by
|
|
326
326
|
*/
|
|
327
327
|
statuses?: Array<Shared.MemberStatuses> | null;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* The user IDs to filter the members by
|
|
331
|
+
*/
|
|
332
|
+
user_ids?: Array<string> | null;
|
|
328
333
|
}
|
|
329
334
|
|
|
330
335
|
export declare namespace Members {
|
|
@@ -43,7 +43,7 @@ export class Memberships extends APIResource {
|
|
|
43
43
|
* - `member:basic:read`
|
|
44
44
|
*/
|
|
45
45
|
list(
|
|
46
|
-
query: MembershipListParams,
|
|
46
|
+
query: MembershipListParams | null | undefined = {},
|
|
47
47
|
options?: RequestOptions,
|
|
48
48
|
): PagePromise<MembershipListResponsesCursorPage, MembershipListResponse> {
|
|
49
49
|
return this._client.getAPIList('/memberships', CursorPage<MembershipListResponse>, { query, ...options });
|
|
@@ -169,6 +169,11 @@ export interface MembershipListResponse {
|
|
|
169
169
|
*/
|
|
170
170
|
plan: MembershipListResponse.Plan;
|
|
171
171
|
|
|
172
|
+
/**
|
|
173
|
+
* The Product this Membership grants access to.
|
|
174
|
+
*/
|
|
175
|
+
product: MembershipListResponse.Product;
|
|
176
|
+
|
|
172
177
|
/**
|
|
173
178
|
* The Promo Code that is currently applied to this Membership.
|
|
174
179
|
*/
|
|
@@ -238,6 +243,21 @@ export namespace MembershipListResponse {
|
|
|
238
243
|
id: string;
|
|
239
244
|
}
|
|
240
245
|
|
|
246
|
+
/**
|
|
247
|
+
* The Product this Membership grants access to.
|
|
248
|
+
*/
|
|
249
|
+
export interface Product {
|
|
250
|
+
/**
|
|
251
|
+
* The internal ID of the public product.
|
|
252
|
+
*/
|
|
253
|
+
id: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The title of the product. Use for Whop 4.0.
|
|
257
|
+
*/
|
|
258
|
+
title: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
241
261
|
/**
|
|
242
262
|
* The Promo Code that is currently applied to this Membership.
|
|
243
263
|
*/
|
|
@@ -277,11 +297,6 @@ export interface MembershipUpdateParams {
|
|
|
277
297
|
}
|
|
278
298
|
|
|
279
299
|
export interface MembershipListParams extends CursorPageParams {
|
|
280
|
-
/**
|
|
281
|
-
* The ID of the company to list memberships for
|
|
282
|
-
*/
|
|
283
|
-
company_id: string;
|
|
284
|
-
|
|
285
300
|
/**
|
|
286
301
|
* The access pass IDs to filter the memberships by
|
|
287
302
|
*/
|
|
@@ -305,6 +320,11 @@ export interface MembershipListParams extends CursorPageParams {
|
|
|
305
320
|
| 'testing'
|
|
306
321
|
> | null;
|
|
307
322
|
|
|
323
|
+
/**
|
|
324
|
+
* The ID of the company to list memberships for
|
|
325
|
+
*/
|
|
326
|
+
company_id?: string | null;
|
|
327
|
+
|
|
308
328
|
/**
|
|
309
329
|
* The minimum creation date to filter by
|
|
310
330
|
*/
|
|
@@ -349,6 +369,11 @@ export interface MembershipListParams extends CursorPageParams {
|
|
|
349
369
|
* The membership status to filter the memberships by
|
|
350
370
|
*/
|
|
351
371
|
statuses?: Array<Shared.MembershipStatus> | null;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Only return memberships from these whop user ids
|
|
375
|
+
*/
|
|
376
|
+
user_ids?: Array<string> | null;
|
|
352
377
|
}
|
|
353
378
|
|
|
354
379
|
export interface MembershipCancelParams {
|
|
@@ -30,6 +30,17 @@ export class Messages extends APIResource {
|
|
|
30
30
|
return this._client.get(path`/messages/${id}`, options);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Updates an existing message
|
|
35
|
+
*/
|
|
36
|
+
update(
|
|
37
|
+
id: string,
|
|
38
|
+
body: MessageUpdateParams | null | undefined = {},
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<Shared.Message> {
|
|
41
|
+
return this._client.patch(path`/messages/${id}`, { body, ...options });
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
/**
|
|
34
45
|
* Lists messages inside a channel
|
|
35
46
|
*
|
|
@@ -266,6 +277,44 @@ export namespace MessageCreateParams {
|
|
|
266
277
|
}
|
|
267
278
|
}
|
|
268
279
|
|
|
280
|
+
export interface MessageUpdateParams {
|
|
281
|
+
/**
|
|
282
|
+
* The attachments for this message
|
|
283
|
+
*/
|
|
284
|
+
attachments?: Array<MessageUpdateParams.Attachment> | null;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The content of the message in Markdown format
|
|
288
|
+
*/
|
|
289
|
+
content?: string | null;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Whether this message is pinned
|
|
293
|
+
*/
|
|
294
|
+
is_pinned?: boolean | null;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export namespace MessageUpdateParams {
|
|
298
|
+
/**
|
|
299
|
+
* Input for an attachment
|
|
300
|
+
*/
|
|
301
|
+
export interface Attachment {
|
|
302
|
+
/**
|
|
303
|
+
* The ID of an existing attachment object. Use this when updating a resource and
|
|
304
|
+
* keeping a subset of the attachments. Don't use this unless you know what you're
|
|
305
|
+
* doing.
|
|
306
|
+
*/
|
|
307
|
+
id?: string | null;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* This ID should be used the first time you upload an attachment. It is the ID of
|
|
311
|
+
* the direct upload that was created when uploading the file to S3 via the
|
|
312
|
+
* mediaDirectUpload mutation.
|
|
313
|
+
*/
|
|
314
|
+
direct_upload_id?: string | null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
269
318
|
export interface MessageListParams extends CursorPageParams {
|
|
270
319
|
/**
|
|
271
320
|
* The ID of the channel or the experience ID to list messages for
|
|
@@ -298,6 +347,7 @@ export declare namespace Messages {
|
|
|
298
347
|
type MessageListResponse as MessageListResponse,
|
|
299
348
|
type MessageListResponsesCursorPage as MessageListResponsesCursorPage,
|
|
300
349
|
type MessageCreateParams as MessageCreateParams,
|
|
350
|
+
type MessageUpdateParams as MessageUpdateParams,
|
|
301
351
|
type MessageListParams as MessageListParams,
|
|
302
352
|
};
|
|
303
353
|
}
|
|
@@ -141,6 +141,127 @@ export class Payments extends APIResource {
|
|
|
141
141
|
|
|
142
142
|
export type PaymentListResponsesCursorPage = CursorPage<PaymentListResponse>;
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* The reason why a specific payment was billed
|
|
146
|
+
*/
|
|
147
|
+
export type BillingReasons =
|
|
148
|
+
| 'subscription_create'
|
|
149
|
+
| 'subscription_cycle'
|
|
150
|
+
| 'subscription_update'
|
|
151
|
+
| 'one_time'
|
|
152
|
+
| 'manual'
|
|
153
|
+
| 'subscription';
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Possible card brands that a payment token can have
|
|
157
|
+
*/
|
|
158
|
+
export type CardBrands =
|
|
159
|
+
| 'mastercard'
|
|
160
|
+
| 'visa'
|
|
161
|
+
| 'amex'
|
|
162
|
+
| 'discover'
|
|
163
|
+
| 'unionpay'
|
|
164
|
+
| 'jcb'
|
|
165
|
+
| 'diners'
|
|
166
|
+
| 'link'
|
|
167
|
+
| 'troy'
|
|
168
|
+
| 'visadankort'
|
|
169
|
+
| 'visabancontact'
|
|
170
|
+
| 'china_union_pay'
|
|
171
|
+
| 'rupay'
|
|
172
|
+
| 'jcbrupay'
|
|
173
|
+
| 'elo'
|
|
174
|
+
| 'unknown';
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The different types of payment methods that can be used.
|
|
178
|
+
*/
|
|
179
|
+
export type PaymentMethodTypes =
|
|
180
|
+
| 'acss_debit'
|
|
181
|
+
| 'affirm'
|
|
182
|
+
| 'afterpay_clearpay'
|
|
183
|
+
| 'alipay'
|
|
184
|
+
| 'alma'
|
|
185
|
+
| 'amazon_pay'
|
|
186
|
+
| 'apple_pay'
|
|
187
|
+
| 'au_becs_debit'
|
|
188
|
+
| 'bacs_debit'
|
|
189
|
+
| 'bancontact'
|
|
190
|
+
| 'billie'
|
|
191
|
+
| 'blik'
|
|
192
|
+
| 'boleto'
|
|
193
|
+
| 'card'
|
|
194
|
+
| 'cashapp'
|
|
195
|
+
| 'crypto'
|
|
196
|
+
| 'eps'
|
|
197
|
+
| 'fpx'
|
|
198
|
+
| 'giropay'
|
|
199
|
+
| 'google_pay'
|
|
200
|
+
| 'grabpay'
|
|
201
|
+
| 'ideal'
|
|
202
|
+
| 'kakao_pay'
|
|
203
|
+
| 'klarna'
|
|
204
|
+
| 'konbini'
|
|
205
|
+
| 'kr_card'
|
|
206
|
+
| 'link'
|
|
207
|
+
| 'mobilepay'
|
|
208
|
+
| 'multibanco'
|
|
209
|
+
| 'naver_pay'
|
|
210
|
+
| 'nz_bank_account'
|
|
211
|
+
| 'oxxo'
|
|
212
|
+
| 'p24'
|
|
213
|
+
| 'pay_by_bank'
|
|
214
|
+
| 'payco'
|
|
215
|
+
| 'paynow'
|
|
216
|
+
| 'pix'
|
|
217
|
+
| 'promptpay'
|
|
218
|
+
| 'revolut_pay'
|
|
219
|
+
| 'samsung_pay'
|
|
220
|
+
| 'satispay'
|
|
221
|
+
| 'sepa_debit'
|
|
222
|
+
| 'sofort'
|
|
223
|
+
| 'swish'
|
|
224
|
+
| 'twint'
|
|
225
|
+
| 'us_bank_account'
|
|
226
|
+
| 'wechat_pay'
|
|
227
|
+
| 'zip'
|
|
228
|
+
| 'bizum'
|
|
229
|
+
| 'capchase_pay'
|
|
230
|
+
| 'kriya'
|
|
231
|
+
| 'mondu'
|
|
232
|
+
| 'ng_wallet'
|
|
233
|
+
| 'paypay'
|
|
234
|
+
| 'sequra'
|
|
235
|
+
| 'scalapay'
|
|
236
|
+
| 'vipps'
|
|
237
|
+
| 'custom'
|
|
238
|
+
| 'customer_balance'
|
|
239
|
+
| 'gopay'
|
|
240
|
+
| 'mb_way'
|
|
241
|
+
| 'ng_bank'
|
|
242
|
+
| 'ng_bank_transfer'
|
|
243
|
+
| 'ng_card'
|
|
244
|
+
| 'ng_market'
|
|
245
|
+
| 'ng_ussd'
|
|
246
|
+
| 'paypal'
|
|
247
|
+
| 'payto'
|
|
248
|
+
| 'qris'
|
|
249
|
+
| 'rechnung'
|
|
250
|
+
| 'south_korea_market'
|
|
251
|
+
| 'kr_market'
|
|
252
|
+
| 'shopeepay'
|
|
253
|
+
| 'upi'
|
|
254
|
+
| 'sunbit'
|
|
255
|
+
| 'netbanking'
|
|
256
|
+
| 'id_bank_transfer'
|
|
257
|
+
| 'demo_pay'
|
|
258
|
+
| 'shop_pay'
|
|
259
|
+
| 'apple'
|
|
260
|
+
| 'sezzle'
|
|
261
|
+
| 'coinbase'
|
|
262
|
+
| 'splitit'
|
|
263
|
+
| 'unknown';
|
|
264
|
+
|
|
144
265
|
/**
|
|
145
266
|
* An object representing a receipt for a membership.
|
|
146
267
|
*/
|
|
@@ -166,14 +287,14 @@ export interface PaymentListResponse {
|
|
|
166
287
|
billing_address: PaymentListResponse.BillingAddress | null;
|
|
167
288
|
|
|
168
289
|
/**
|
|
169
|
-
* The
|
|
290
|
+
* The reason why a specific payment was billed
|
|
170
291
|
*/
|
|
171
|
-
billing_reason:
|
|
292
|
+
billing_reason: BillingReasons | null;
|
|
172
293
|
|
|
173
294
|
/**
|
|
174
|
-
*
|
|
295
|
+
* Possible card brands that a payment token can have
|
|
175
296
|
*/
|
|
176
|
-
card_brand:
|
|
297
|
+
card_brand: CardBrands | null;
|
|
177
298
|
|
|
178
299
|
/**
|
|
179
300
|
* The last 4 digits of the card used to make the payment.
|
|
@@ -226,10 +347,9 @@ export interface PaymentListResponse {
|
|
|
226
347
|
paid_at: string | null;
|
|
227
348
|
|
|
228
349
|
/**
|
|
229
|
-
*
|
|
230
|
-
* klarna, affirm, card, cashapp
|
|
350
|
+
* The different types of payment methods that can be used.
|
|
231
351
|
*/
|
|
232
|
-
payment_method_type:
|
|
352
|
+
payment_method_type: PaymentMethodTypes | null;
|
|
233
353
|
|
|
234
354
|
/**
|
|
235
355
|
* The plan attached to this payment.
|
|
@@ -247,7 +367,8 @@ export interface PaymentListResponse {
|
|
|
247
367
|
promo_code: PaymentListResponse.PromoCode | null;
|
|
248
368
|
|
|
249
369
|
/**
|
|
250
|
-
*
|
|
370
|
+
* True only for payments that are `paid`, have not been fully refunded, and were
|
|
371
|
+
* processed by a payment processor that allows refunds.
|
|
251
372
|
*/
|
|
252
373
|
refundable: boolean;
|
|
253
374
|
|
|
@@ -262,7 +383,9 @@ export interface PaymentListResponse {
|
|
|
262
383
|
refunded_at: string | null;
|
|
263
384
|
|
|
264
385
|
/**
|
|
265
|
-
*
|
|
386
|
+
* True when the payment status is `open` and its membership is in one of the
|
|
387
|
+
* retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
388
|
+
* otherwise false. Used to decide if Whop can attempt the charge again.
|
|
266
389
|
*/
|
|
267
390
|
retryable: boolean;
|
|
268
391
|
|
|
@@ -297,7 +420,8 @@ export interface PaymentListResponse {
|
|
|
297
420
|
user: PaymentListResponse.User | null;
|
|
298
421
|
|
|
299
422
|
/**
|
|
300
|
-
*
|
|
423
|
+
* True when the payment is tied to a membership in `past_due`, the payment status
|
|
424
|
+
* is `open`, and the processor allows voiding payments; otherwise false.
|
|
301
425
|
*/
|
|
302
426
|
voidable: boolean;
|
|
303
427
|
}
|
|
@@ -448,7 +572,7 @@ export namespace PaymentListResponse {
|
|
|
448
572
|
code: string | null;
|
|
449
573
|
|
|
450
574
|
/**
|
|
451
|
-
* The number of
|
|
575
|
+
* The number of months the promo is applied for.
|
|
452
576
|
*/
|
|
453
577
|
number_of_intervals: number | null;
|
|
454
578
|
|
|
@@ -498,14 +622,7 @@ export interface PaymentListParams extends CursorPageParams {
|
|
|
498
622
|
/**
|
|
499
623
|
* The billing reason for the payment
|
|
500
624
|
*/
|
|
501
|
-
billing_reasons?: Array<
|
|
502
|
-
| 'subscription_create'
|
|
503
|
-
| 'subscription_cycle'
|
|
504
|
-
| 'subscription_update'
|
|
505
|
-
| 'one_time'
|
|
506
|
-
| 'manual'
|
|
507
|
-
| 'subscription'
|
|
508
|
-
> | null;
|
|
625
|
+
billing_reasons?: Array<BillingReasons> | null;
|
|
509
626
|
|
|
510
627
|
/**
|
|
511
628
|
* The minimum creation date to filter by
|
|
@@ -577,6 +694,9 @@ export interface PaymentRefundParams {
|
|
|
577
694
|
|
|
578
695
|
export declare namespace Payments {
|
|
579
696
|
export {
|
|
697
|
+
type BillingReasons as BillingReasons,
|
|
698
|
+
type CardBrands as CardBrands,
|
|
699
|
+
type PaymentMethodTypes as PaymentMethodTypes,
|
|
580
700
|
type PaymentListResponse as PaymentListResponse,
|
|
581
701
|
type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
|
|
582
702
|
type PaymentListParams as PaymentListParams,
|