@whop/sdk 0.0.1-canary.0 → 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 +44 -0
- package/client.d.mts +39 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +39 -11
- package/client.d.ts.map +1 -1
- package/client.js +23 -2
- package/client.js.map +1 -1
- package/client.mjs +23 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/apps.d.mts +16 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +16 -0
- package/resources/apps.d.ts.map +1 -1
- package/resources/checkout-configurations.d.mts +96 -19
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +96 -19
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +3 -1
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +3 -1
- 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 +59 -1
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +59 -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/forums.d.mts +112 -0
- package/resources/forums.d.mts.map +1 -0
- package/resources/forums.d.ts +112 -0
- package/resources/forums.d.ts.map +1 -0
- package/resources/forums.js +41 -0
- package/resources/forums.js.map +1 -0
- package/resources/forums.mjs +37 -0
- package/resources/forums.mjs.map +1 -0
- package/resources/index.d.mts +12 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +15 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +7 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +5 -2
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +5 -2
- package/resources/invoices.d.ts.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 +274 -0
- package/resources/members.d.mts.map +1 -0
- package/resources/members.d.ts +274 -0
- package/resources/members.d.ts.map +1 -0
- package/resources/members.js +35 -0
- package/resources/members.js.map +1 -0
- package/resources/members.mjs +31 -0
- package/resources/members.mjs.map +1 -0
- 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 +54 -3
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +54 -3
- 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 +245 -24
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +245 -24
- package/resources/shared.d.ts.map +1 -1
- package/resources/users.d.mts +18 -1
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +18 -1
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +224 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +224 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +197 -3
- package/src/resources/apps.ts +18 -0
- package/src/resources/checkout-configurations.ts +111 -19
- 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 +71 -0
- package/src/resources/forum-posts.ts +71 -0
- package/src/resources/forums.ts +152 -0
- package/src/resources/index.ts +83 -0
- package/src/resources/invoices.ts +5 -2
- package/src/resources/ledger-accounts.ts +13 -1
- package/src/resources/members.ts +342 -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 +65 -3
- 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 +296 -24
- package/src/resources/users.ts +20 -1
- package/src/resources/webhooks.ts +293 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/src/client.ts
CHANGED
|
@@ -56,10 +56,44 @@ import {
|
|
|
56
56
|
CheckoutConfigurations,
|
|
57
57
|
} from './resources/checkout-configurations';
|
|
58
58
|
import { Companies } from './resources/companies';
|
|
59
|
+
import {
|
|
60
|
+
CourseChapter,
|
|
61
|
+
CourseChapterCreateParams,
|
|
62
|
+
CourseChapterDeleteResponse,
|
|
63
|
+
CourseChapterListParams,
|
|
64
|
+
CourseChapterListResponse,
|
|
65
|
+
CourseChapterListResponsesCursorPage,
|
|
66
|
+
CourseChapterUpdateParams,
|
|
67
|
+
CourseChapters,
|
|
68
|
+
} from './resources/course-chapters';
|
|
59
69
|
import {
|
|
60
70
|
CourseLessonInteractionListParams,
|
|
61
71
|
CourseLessonInteractions,
|
|
62
72
|
} from './resources/course-lesson-interactions';
|
|
73
|
+
import {
|
|
74
|
+
AssessmentQuestionTypes,
|
|
75
|
+
CourseLessonCreateParams,
|
|
76
|
+
CourseLessonDeleteResponse,
|
|
77
|
+
CourseLessonListParams,
|
|
78
|
+
CourseLessonListResponse,
|
|
79
|
+
CourseLessonListResponsesCursorPage,
|
|
80
|
+
CourseLessonUpdateParams,
|
|
81
|
+
CourseLessons,
|
|
82
|
+
Lesson,
|
|
83
|
+
LessonTypes,
|
|
84
|
+
LessonVisibilities,
|
|
85
|
+
} from './resources/course-lessons';
|
|
86
|
+
import {
|
|
87
|
+
Course,
|
|
88
|
+
CourseCreateParams,
|
|
89
|
+
CourseDeleteResponse,
|
|
90
|
+
CourseListParams,
|
|
91
|
+
CourseListResponse,
|
|
92
|
+
CourseListResponsesCursorPage,
|
|
93
|
+
CourseUpdateParams,
|
|
94
|
+
Courses,
|
|
95
|
+
Languages,
|
|
96
|
+
} from './resources/courses';
|
|
63
97
|
import {
|
|
64
98
|
Entries,
|
|
65
99
|
EntryApproveResponse,
|
|
@@ -72,6 +106,7 @@ import {
|
|
|
72
106
|
ExperienceCreateParams,
|
|
73
107
|
ExperienceDeleteResponse,
|
|
74
108
|
ExperienceDetachParams,
|
|
109
|
+
ExperienceDuplicateParams,
|
|
75
110
|
ExperienceListParams,
|
|
76
111
|
ExperienceListResponse,
|
|
77
112
|
ExperienceListResponsesCursorPage,
|
|
@@ -83,8 +118,16 @@ import {
|
|
|
83
118
|
ForumPostListParams,
|
|
84
119
|
ForumPostListResponse,
|
|
85
120
|
ForumPostListResponsesCursorPage,
|
|
121
|
+
ForumPostUpdateParams,
|
|
86
122
|
ForumPosts,
|
|
87
123
|
} from './resources/forum-posts';
|
|
124
|
+
import {
|
|
125
|
+
ForumListParams,
|
|
126
|
+
ForumListResponse,
|
|
127
|
+
ForumListResponsesCursorPage,
|
|
128
|
+
ForumUpdateParams,
|
|
129
|
+
Forums,
|
|
130
|
+
} from './resources/forums';
|
|
88
131
|
import {
|
|
89
132
|
InvoiceCreateParams,
|
|
90
133
|
InvoiceCreateResponse,
|
|
@@ -93,6 +136,13 @@ import {
|
|
|
93
136
|
Invoices,
|
|
94
137
|
} from './resources/invoices';
|
|
95
138
|
import { LedgerAccountRetrieveResponse, LedgerAccounts } from './resources/ledger-accounts';
|
|
139
|
+
import {
|
|
140
|
+
MemberListParams,
|
|
141
|
+
MemberListResponse,
|
|
142
|
+
MemberListResponsesCursorPage,
|
|
143
|
+
MemberRetrieveResponse,
|
|
144
|
+
Members,
|
|
145
|
+
} from './resources/members';
|
|
96
146
|
import {
|
|
97
147
|
MembershipCancelParams,
|
|
98
148
|
MembershipListParams,
|
|
@@ -107,12 +157,16 @@ import {
|
|
|
107
157
|
MessageListParams,
|
|
108
158
|
MessageListResponse,
|
|
109
159
|
MessageListResponsesCursorPage,
|
|
160
|
+
MessageUpdateParams,
|
|
110
161
|
Messages,
|
|
111
162
|
} from './resources/messages';
|
|
112
163
|
import {
|
|
164
|
+
BillingReasons,
|
|
165
|
+
CardBrands,
|
|
113
166
|
PaymentListParams,
|
|
114
167
|
PaymentListResponse,
|
|
115
168
|
PaymentListResponsesCursorPage,
|
|
169
|
+
PaymentMethodTypes,
|
|
116
170
|
PaymentRefundParams,
|
|
117
171
|
Payments,
|
|
118
172
|
} from './resources/payments';
|
|
@@ -132,6 +186,17 @@ import {
|
|
|
132
186
|
ProductUpdateParams,
|
|
133
187
|
Products,
|
|
134
188
|
} from './resources/products';
|
|
189
|
+
import {
|
|
190
|
+
PromoCode,
|
|
191
|
+
PromoCodeCreateParams,
|
|
192
|
+
PromoCodeDeleteResponse,
|
|
193
|
+
PromoCodeListParams,
|
|
194
|
+
PromoCodeListResponse,
|
|
195
|
+
PromoCodeListResponsesCursorPage,
|
|
196
|
+
PromoCodeStatus,
|
|
197
|
+
PromoCodes,
|
|
198
|
+
PromoDuration,
|
|
199
|
+
} from './resources/promo-codes';
|
|
135
200
|
import {
|
|
136
201
|
ReactionCreateParams,
|
|
137
202
|
ReactionListParams,
|
|
@@ -139,6 +204,14 @@ import {
|
|
|
139
204
|
ReactionListResponsesCursorPage,
|
|
140
205
|
Reactions,
|
|
141
206
|
} from './resources/reactions';
|
|
207
|
+
import {
|
|
208
|
+
ReviewListParams,
|
|
209
|
+
ReviewListResponse,
|
|
210
|
+
ReviewListResponsesCursorPage,
|
|
211
|
+
ReviewRetrieveResponse,
|
|
212
|
+
ReviewStatus,
|
|
213
|
+
Reviews,
|
|
214
|
+
} from './resources/reviews';
|
|
142
215
|
import {
|
|
143
216
|
ShipmentCreateParams,
|
|
144
217
|
ShipmentListParams,
|
|
@@ -167,10 +240,20 @@ import {
|
|
|
167
240
|
Users,
|
|
168
241
|
} from './resources/users';
|
|
169
242
|
import {
|
|
243
|
+
CourseLessonInteractionCompletedWebhookEvent,
|
|
244
|
+
EntryApprovedWebhookEvent,
|
|
245
|
+
EntryCreatedWebhookEvent,
|
|
246
|
+
EntryDeletedWebhookEvent,
|
|
247
|
+
EntryDeniedWebhookEvent,
|
|
170
248
|
InvoiceCreatedWebhookEvent,
|
|
171
249
|
InvoicePaidWebhookEvent,
|
|
172
250
|
InvoicePastDueWebhookEvent,
|
|
173
251
|
InvoiceVoidedWebhookEvent,
|
|
252
|
+
MembershipActivatedWebhookEvent,
|
|
253
|
+
MembershipDeactivatedWebhookEvent,
|
|
254
|
+
PaymentFailedWebhookEvent,
|
|
255
|
+
PaymentPendingWebhookEvent,
|
|
256
|
+
PaymentSucceededWebhookEvent,
|
|
174
257
|
UnwrapWebhookEvent,
|
|
175
258
|
Webhooks,
|
|
176
259
|
} from './resources/webhooks';
|
|
@@ -396,7 +479,7 @@ export class Whop {
|
|
|
396
479
|
}
|
|
397
480
|
|
|
398
481
|
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
399
|
-
return qs.stringify(query, { arrayFormat: '
|
|
482
|
+
return qs.stringify(query, { arrayFormat: 'brackets' });
|
|
400
483
|
}
|
|
401
484
|
|
|
402
485
|
private getUserAgent(): string {
|
|
@@ -884,6 +967,8 @@ export class Whop {
|
|
|
884
967
|
}
|
|
885
968
|
}
|
|
886
969
|
|
|
970
|
+
verifyUserToken: ReturnType<typeof makeUserTokenVerifierFromSdk> = makeUserTokenVerifierFromSdk(this);
|
|
971
|
+
|
|
887
972
|
static Whop = this;
|
|
888
973
|
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
889
974
|
|
|
@@ -926,8 +1011,13 @@ export class Whop {
|
|
|
926
1011
|
supportChannels: API.SupportChannels = new API.SupportChannels(this);
|
|
927
1012
|
experiences: API.Experiences = new API.Experiences(this);
|
|
928
1013
|
reactions: API.Reactions = new API.Reactions(this);
|
|
929
|
-
|
|
930
|
-
|
|
1014
|
+
members: API.Members = new API.Members(this);
|
|
1015
|
+
forums: API.Forums = new API.Forums(this);
|
|
1016
|
+
promoCodes: API.PromoCodes = new API.PromoCodes(this);
|
|
1017
|
+
courses: API.Courses = new API.Courses(this);
|
|
1018
|
+
courseChapters: API.CourseChapters = new API.CourseChapters(this);
|
|
1019
|
+
courseLessons: API.CourseLessons = new API.CourseLessons(this);
|
|
1020
|
+
reviews: API.Reviews = new API.Reviews(this);
|
|
931
1021
|
}
|
|
932
1022
|
|
|
933
1023
|
Whop.Apps = Apps;
|
|
@@ -953,6 +1043,13 @@ Whop.Payments = Payments;
|
|
|
953
1043
|
Whop.SupportChannels = SupportChannels;
|
|
954
1044
|
Whop.Experiences = Experiences;
|
|
955
1045
|
Whop.Reactions = Reactions;
|
|
1046
|
+
Whop.Members = Members;
|
|
1047
|
+
Whop.Forums = Forums;
|
|
1048
|
+
Whop.PromoCodes = PromoCodes;
|
|
1049
|
+
Whop.Courses = Courses;
|
|
1050
|
+
Whop.CourseChapters = CourseChapters;
|
|
1051
|
+
Whop.CourseLessons = CourseLessons;
|
|
1052
|
+
Whop.Reviews = Reviews;
|
|
956
1053
|
|
|
957
1054
|
export declare namespace Whop {
|
|
958
1055
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -998,6 +1095,16 @@ export declare namespace Whop {
|
|
|
998
1095
|
type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent,
|
|
999
1096
|
type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent,
|
|
1000
1097
|
type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent,
|
|
1098
|
+
type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent,
|
|
1099
|
+
type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent,
|
|
1100
|
+
type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent,
|
|
1101
|
+
type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent,
|
|
1102
|
+
type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent,
|
|
1103
|
+
type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent,
|
|
1104
|
+
type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
|
|
1105
|
+
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
1106
|
+
type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
|
|
1107
|
+
type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent,
|
|
1001
1108
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1002
1109
|
};
|
|
1003
1110
|
|
|
@@ -1024,6 +1131,7 @@ export declare namespace Whop {
|
|
|
1024
1131
|
type ForumPostListResponse as ForumPostListResponse,
|
|
1025
1132
|
type ForumPostListResponsesCursorPage as ForumPostListResponsesCursorPage,
|
|
1026
1133
|
type ForumPostCreateParams as ForumPostCreateParams,
|
|
1134
|
+
type ForumPostUpdateParams as ForumPostUpdateParams,
|
|
1027
1135
|
type ForumPostListParams as ForumPostListParams,
|
|
1028
1136
|
};
|
|
1029
1137
|
|
|
@@ -1087,6 +1195,7 @@ export declare namespace Whop {
|
|
|
1087
1195
|
type MessageListResponse as MessageListResponse,
|
|
1088
1196
|
type MessageListResponsesCursorPage as MessageListResponsesCursorPage,
|
|
1089
1197
|
type MessageCreateParams as MessageCreateParams,
|
|
1198
|
+
type MessageUpdateParams as MessageUpdateParams,
|
|
1090
1199
|
type MessageListParams as MessageListParams,
|
|
1091
1200
|
};
|
|
1092
1201
|
|
|
@@ -1107,6 +1216,9 @@ export declare namespace Whop {
|
|
|
1107
1216
|
|
|
1108
1217
|
export {
|
|
1109
1218
|
Payments as Payments,
|
|
1219
|
+
type BillingReasons as BillingReasons,
|
|
1220
|
+
type CardBrands as CardBrands,
|
|
1221
|
+
type PaymentMethodTypes as PaymentMethodTypes,
|
|
1110
1222
|
type PaymentListResponse as PaymentListResponse,
|
|
1111
1223
|
type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
|
|
1112
1224
|
type PaymentListParams as PaymentListParams,
|
|
@@ -1131,6 +1243,7 @@ export declare namespace Whop {
|
|
|
1131
1243
|
type ExperienceListParams as ExperienceListParams,
|
|
1132
1244
|
type ExperienceAttachParams as ExperienceAttachParams,
|
|
1133
1245
|
type ExperienceDetachParams as ExperienceDetachParams,
|
|
1246
|
+
type ExperienceDuplicateParams as ExperienceDuplicateParams,
|
|
1134
1247
|
};
|
|
1135
1248
|
|
|
1136
1249
|
export {
|
|
@@ -1141,6 +1254,81 @@ export declare namespace Whop {
|
|
|
1141
1254
|
type ReactionListParams as ReactionListParams,
|
|
1142
1255
|
};
|
|
1143
1256
|
|
|
1257
|
+
export {
|
|
1258
|
+
Members as Members,
|
|
1259
|
+
type MemberRetrieveResponse as MemberRetrieveResponse,
|
|
1260
|
+
type MemberListResponse as MemberListResponse,
|
|
1261
|
+
type MemberListResponsesCursorPage as MemberListResponsesCursorPage,
|
|
1262
|
+
type MemberListParams as MemberListParams,
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
export {
|
|
1266
|
+
Forums as Forums,
|
|
1267
|
+
type ForumListResponse as ForumListResponse,
|
|
1268
|
+
type ForumListResponsesCursorPage as ForumListResponsesCursorPage,
|
|
1269
|
+
type ForumUpdateParams as ForumUpdateParams,
|
|
1270
|
+
type ForumListParams as ForumListParams,
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
export {
|
|
1274
|
+
PromoCodes as PromoCodes,
|
|
1275
|
+
type PromoCode as PromoCode,
|
|
1276
|
+
type PromoCodeStatus as PromoCodeStatus,
|
|
1277
|
+
type PromoDuration as PromoDuration,
|
|
1278
|
+
type PromoCodeListResponse as PromoCodeListResponse,
|
|
1279
|
+
type PromoCodeDeleteResponse as PromoCodeDeleteResponse,
|
|
1280
|
+
type PromoCodeListResponsesCursorPage as PromoCodeListResponsesCursorPage,
|
|
1281
|
+
type PromoCodeCreateParams as PromoCodeCreateParams,
|
|
1282
|
+
type PromoCodeListParams as PromoCodeListParams,
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
export {
|
|
1286
|
+
Courses as Courses,
|
|
1287
|
+
type Course as Course,
|
|
1288
|
+
type Languages as Languages,
|
|
1289
|
+
type CourseListResponse as CourseListResponse,
|
|
1290
|
+
type CourseDeleteResponse as CourseDeleteResponse,
|
|
1291
|
+
type CourseListResponsesCursorPage as CourseListResponsesCursorPage,
|
|
1292
|
+
type CourseCreateParams as CourseCreateParams,
|
|
1293
|
+
type CourseUpdateParams as CourseUpdateParams,
|
|
1294
|
+
type CourseListParams as CourseListParams,
|
|
1295
|
+
};
|
|
1296
|
+
|
|
1297
|
+
export {
|
|
1298
|
+
CourseChapters as CourseChapters,
|
|
1299
|
+
type CourseChapter as CourseChapter,
|
|
1300
|
+
type CourseChapterListResponse as CourseChapterListResponse,
|
|
1301
|
+
type CourseChapterDeleteResponse as CourseChapterDeleteResponse,
|
|
1302
|
+
type CourseChapterListResponsesCursorPage as CourseChapterListResponsesCursorPage,
|
|
1303
|
+
type CourseChapterCreateParams as CourseChapterCreateParams,
|
|
1304
|
+
type CourseChapterUpdateParams as CourseChapterUpdateParams,
|
|
1305
|
+
type CourseChapterListParams as CourseChapterListParams,
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
export {
|
|
1309
|
+
CourseLessons as CourseLessons,
|
|
1310
|
+
type AssessmentQuestionTypes as AssessmentQuestionTypes,
|
|
1311
|
+
type Lesson as Lesson,
|
|
1312
|
+
type LessonTypes as LessonTypes,
|
|
1313
|
+
type LessonVisibilities as LessonVisibilities,
|
|
1314
|
+
type CourseLessonListResponse as CourseLessonListResponse,
|
|
1315
|
+
type CourseLessonDeleteResponse as CourseLessonDeleteResponse,
|
|
1316
|
+
type CourseLessonListResponsesCursorPage as CourseLessonListResponsesCursorPage,
|
|
1317
|
+
type CourseLessonCreateParams as CourseLessonCreateParams,
|
|
1318
|
+
type CourseLessonUpdateParams as CourseLessonUpdateParams,
|
|
1319
|
+
type CourseLessonListParams as CourseLessonListParams,
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
export {
|
|
1323
|
+
Reviews as Reviews,
|
|
1324
|
+
type ReviewStatus as ReviewStatus,
|
|
1325
|
+
type ReviewRetrieveResponse as ReviewRetrieveResponse,
|
|
1326
|
+
type ReviewListResponse as ReviewListResponse,
|
|
1327
|
+
type ReviewListResponsesCursorPage as ReviewListResponsesCursorPage,
|
|
1328
|
+
type ReviewListParams as ReviewListParams,
|
|
1329
|
+
};
|
|
1330
|
+
|
|
1331
|
+
export type AccessLevel = API.AccessLevel;
|
|
1144
1332
|
export type AccessPassType = API.AccessPassType;
|
|
1145
1333
|
export type App = API.App;
|
|
1146
1334
|
export type AppBuild = API.AppBuild;
|
|
@@ -1160,9 +1348,11 @@ export declare namespace Whop {
|
|
|
1160
1348
|
export type CustomCta = API.CustomCta;
|
|
1161
1349
|
export type Direction = API.Direction;
|
|
1162
1350
|
export type DmsPostTypes = API.DmsPostTypes;
|
|
1351
|
+
export type EmailNotificationPreferences = API.EmailNotificationPreferences;
|
|
1163
1352
|
export type Entry = API.Entry;
|
|
1164
1353
|
export type EntryStatus = API.EntryStatus;
|
|
1165
1354
|
export type Experience = API.Experience;
|
|
1355
|
+
export type Forum = API.Forum;
|
|
1166
1356
|
export type ForumPost = API.ForumPost;
|
|
1167
1357
|
export type FriendlyReceiptStatus = API.FriendlyReceiptStatus;
|
|
1168
1358
|
export type GlobalAffiliateStatus = API.GlobalAffiliateStatus;
|
|
@@ -1170,6 +1360,8 @@ export declare namespace Whop {
|
|
|
1170
1360
|
export type Invoice = API.Invoice;
|
|
1171
1361
|
export type InvoiceListItem = API.InvoiceListItem;
|
|
1172
1362
|
export type InvoiceStatus = API.InvoiceStatus;
|
|
1363
|
+
export type MemberMostRecentActions = API.MemberMostRecentActions;
|
|
1364
|
+
export type MemberStatuses = API.MemberStatuses;
|
|
1173
1365
|
export type Membership = API.Membership;
|
|
1174
1366
|
export type MembershipStatus = API.MembershipStatus;
|
|
1175
1367
|
export type Message = API.Message;
|
|
@@ -1192,6 +1384,8 @@ export declare namespace Whop {
|
|
|
1192
1384
|
export type Transfer = API.Transfer;
|
|
1193
1385
|
export type Visibility = API.Visibility;
|
|
1194
1386
|
export type VisibilityFilter = API.VisibilityFilter;
|
|
1387
|
+
export type WhoCanCommentTypes = API.WhoCanCommentTypes;
|
|
1195
1388
|
export type WhoCanPost = API.WhoCanPost;
|
|
1389
|
+
export type WhoCanPostTypes = API.WhoCanPostTypes;
|
|
1196
1390
|
export type WhoCanReact = API.WhoCanReact;
|
|
1197
1391
|
}
|
package/src/resources/apps.ts
CHANGED
|
@@ -142,6 +142,12 @@ export interface AppListResponse {
|
|
|
142
142
|
*/
|
|
143
143
|
experience_path: string | null;
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* The icon for the app. This icon is shown on discovery, on the product page, on
|
|
147
|
+
* checkout, and as a default icon for the experiences.
|
|
148
|
+
*/
|
|
149
|
+
icon: AppListResponse.Icon | null;
|
|
150
|
+
|
|
145
151
|
/**
|
|
146
152
|
* The name of the app
|
|
147
153
|
*/
|
|
@@ -198,6 +204,18 @@ export namespace AppListResponse {
|
|
|
198
204
|
*/
|
|
199
205
|
username: string;
|
|
200
206
|
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The icon for the app. This icon is shown on discovery, on the product page, on
|
|
210
|
+
* checkout, and as a default icon for the experiences.
|
|
211
|
+
*/
|
|
212
|
+
export interface Icon {
|
|
213
|
+
/**
|
|
214
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
215
|
+
* should be used for apps.
|
|
216
|
+
*/
|
|
217
|
+
url: string | null;
|
|
218
|
+
}
|
|
201
219
|
}
|
|
202
220
|
|
|
203
221
|
export interface AppCreateParams {
|
|
@@ -9,12 +9,14 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
|
|
10
10
|
export class CheckoutConfigurations extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
* Creates a new checkout
|
|
12
|
+
* Creates a new checkout configuration
|
|
13
13
|
*
|
|
14
14
|
* Required permissions:
|
|
15
15
|
*
|
|
16
16
|
* - `checkout_configuration:create`
|
|
17
17
|
* - `plan:create`
|
|
18
|
+
* - `access_pass:create`
|
|
19
|
+
* - `access_pass:update`
|
|
18
20
|
*
|
|
19
21
|
* @example
|
|
20
22
|
* ```ts
|
|
@@ -80,48 +82,52 @@ export class CheckoutConfigurations extends APIResource {
|
|
|
80
82
|
export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutConfigurationListResponse>;
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
|
-
* A checkout
|
|
85
|
+
* A checkout configuration object.
|
|
86
|
+
* Can be used to create a reusable custom configuration for a checkout, including attaching plans, affiliates and custom metadata to the checkout.
|
|
87
|
+
* This configuration can be re-used by multiple users.
|
|
88
|
+
* All successful payments and memberships resulting from a checkout will contain the passed metadata.
|
|
84
89
|
*/
|
|
85
90
|
export interface CheckoutConfigurationListResponse {
|
|
86
91
|
/**
|
|
87
|
-
* The ID of the checkout
|
|
92
|
+
* The ID of the checkout configuration
|
|
88
93
|
*/
|
|
89
94
|
id: string;
|
|
90
95
|
|
|
91
96
|
/**
|
|
92
|
-
* The affiliate code to use for the checkout
|
|
97
|
+
* The affiliate code to use for the checkout configuration
|
|
93
98
|
*/
|
|
94
|
-
affiliate_code: string;
|
|
99
|
+
affiliate_code: string | null;
|
|
95
100
|
|
|
96
101
|
/**
|
|
97
|
-
* The ID of the company to use for the checkout
|
|
102
|
+
* The ID of the company to use for the checkout configuration
|
|
98
103
|
*/
|
|
99
104
|
company_id: string;
|
|
100
105
|
|
|
101
106
|
/**
|
|
102
|
-
* The metadata to use for the checkout
|
|
107
|
+
* The metadata to use for the checkout configuration
|
|
103
108
|
*/
|
|
104
109
|
metadata: { [key: string]: unknown };
|
|
105
110
|
|
|
106
111
|
/**
|
|
107
|
-
* The plan to use for the checkout
|
|
112
|
+
* The plan to use for the checkout configuration
|
|
108
113
|
*/
|
|
109
114
|
plan: CheckoutConfigurationListResponse.Plan;
|
|
110
115
|
|
|
111
116
|
/**
|
|
112
|
-
*
|
|
117
|
+
* A URL you can send to customers to complete a checkout. It looks like
|
|
118
|
+
* `/checkout/plan_xxxx?session={id}`
|
|
113
119
|
*/
|
|
114
120
|
purchase_url: string;
|
|
115
121
|
|
|
116
122
|
/**
|
|
117
|
-
* The URL to redirect the user to after the checkout
|
|
123
|
+
* The URL to redirect the user to after the checkout configuration is created
|
|
118
124
|
*/
|
|
119
|
-
redirect_url: string;
|
|
125
|
+
redirect_url: string | null;
|
|
120
126
|
}
|
|
121
127
|
|
|
122
128
|
export namespace CheckoutConfigurationListResponse {
|
|
123
129
|
/**
|
|
124
|
-
* The plan to use for the checkout
|
|
130
|
+
* The plan to use for the checkout configuration
|
|
125
131
|
*/
|
|
126
132
|
export interface Plan {
|
|
127
133
|
/**
|
|
@@ -178,34 +184,34 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
178
184
|
|
|
179
185
|
export interface CheckoutConfigurationCreateParams {
|
|
180
186
|
/**
|
|
181
|
-
* The affiliate code to use for the checkout
|
|
187
|
+
* The affiliate code to use for the checkout configuration
|
|
182
188
|
*/
|
|
183
189
|
affiliate_code?: string | null;
|
|
184
190
|
|
|
185
191
|
/**
|
|
186
|
-
* The metadata to use for the checkout
|
|
192
|
+
* The metadata to use for the checkout configuration
|
|
187
193
|
*/
|
|
188
194
|
metadata?: { [key: string]: unknown } | null;
|
|
189
195
|
|
|
190
196
|
/**
|
|
191
|
-
* Pass this object to create a new plan for this checkout
|
|
197
|
+
* Pass this object to create a new plan for this checkout configuration
|
|
192
198
|
*/
|
|
193
199
|
plan?: CheckoutConfigurationCreateParams.Plan | null;
|
|
194
200
|
|
|
195
201
|
/**
|
|
196
|
-
* The ID of the plan to use for the checkout
|
|
202
|
+
* The ID of the plan to use for the checkout configuration
|
|
197
203
|
*/
|
|
198
204
|
plan_id?: string | null;
|
|
199
205
|
|
|
200
206
|
/**
|
|
201
|
-
* The URL to redirect the user to after the checkout
|
|
207
|
+
* The URL to redirect the user to after the checkout configuration is created
|
|
202
208
|
*/
|
|
203
209
|
redirect_url?: string | null;
|
|
204
210
|
}
|
|
205
211
|
|
|
206
212
|
export namespace CheckoutConfigurationCreateParams {
|
|
207
213
|
/**
|
|
208
|
-
* Pass this object to create a new plan for this checkout
|
|
214
|
+
* Pass this object to create a new plan for this checkout configuration
|
|
209
215
|
*/
|
|
210
216
|
export interface Plan {
|
|
211
217
|
/**
|
|
@@ -271,7 +277,13 @@ export namespace CheckoutConfigurationCreateParams {
|
|
|
271
277
|
plan_type?: Shared.PlanType | null;
|
|
272
278
|
|
|
273
279
|
/**
|
|
274
|
-
*
|
|
280
|
+
* Pass this object to create a new product for this plan. We will use the product
|
|
281
|
+
* external identifier to find or create an existing product.
|
|
282
|
+
*/
|
|
283
|
+
product?: Plan.Product | null;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* The product the plan is related to. Either this or product is required.
|
|
275
287
|
*/
|
|
276
288
|
product_id?: string | null;
|
|
277
289
|
|
|
@@ -352,6 +364,86 @@ export namespace CheckoutConfigurationCreateParams {
|
|
|
352
364
|
*/
|
|
353
365
|
direct_upload_id?: string | null;
|
|
354
366
|
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Pass this object to create a new product for this plan. We will use the product
|
|
370
|
+
* external identifier to find or create an existing product.
|
|
371
|
+
*/
|
|
372
|
+
export interface Product {
|
|
373
|
+
/**
|
|
374
|
+
* A unique ID used to find or create a product. When provided during creation, we
|
|
375
|
+
* will look for an existing product with this external identifier — if found, it
|
|
376
|
+
* will be updated; otherwise, a new product will be created.
|
|
377
|
+
*/
|
|
378
|
+
external_identifier: string;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* The title of the product.
|
|
382
|
+
*/
|
|
383
|
+
title: string;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* The different business types a company can be.
|
|
387
|
+
*/
|
|
388
|
+
business_type?: Shared.BusinessTypes | null;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Whether or not to collect shipping information at checkout from the customer.
|
|
392
|
+
*/
|
|
393
|
+
collect_shipping_address?: boolean | null;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
|
|
397
|
+
* between 5 and 22 characters, contain at least one letter, and not contain any of
|
|
398
|
+
* the following characters: <, >, \, ', "
|
|
399
|
+
*/
|
|
400
|
+
custom_statement_descriptor?: string | null;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* A written description of the product.
|
|
404
|
+
*/
|
|
405
|
+
description?: string | null;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The percentage of the revenue that goes to the global affiliate program.
|
|
409
|
+
*/
|
|
410
|
+
global_affiliate_percentage?: number | null;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* The different statuses of the global affiliate program for an access pass.
|
|
414
|
+
*/
|
|
415
|
+
global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The headline of the product.
|
|
419
|
+
*/
|
|
420
|
+
headline?: string | null;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* The different industry types a company can be in.
|
|
424
|
+
*/
|
|
425
|
+
industry_type?: Shared.IndustryTypes | null;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* The ID of the product tax code to apply to this product.
|
|
429
|
+
*/
|
|
430
|
+
product_tax_code_id?: string | null;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* The URL to redirect the customer to after a purchase.
|
|
434
|
+
*/
|
|
435
|
+
redirect_purchase_url?: string | null;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* The route of the product.
|
|
439
|
+
*/
|
|
440
|
+
route?: string | null;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Visibility of a resource
|
|
444
|
+
*/
|
|
445
|
+
visibility?: Shared.Visibility | null;
|
|
446
|
+
}
|
|
355
447
|
}
|
|
356
448
|
}
|
|
357
449
|
|