@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,348 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Reviews extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a review by its ID
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<ReviewRetrieveResponse> {
|
|
14
|
+
return this._client.get(path`/reviews/${id}`, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List all reviews
|
|
19
|
+
*/
|
|
20
|
+
list(
|
|
21
|
+
query: ReviewListParams,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): PagePromise<ReviewListResponsesCursorPage, ReviewListResponse> {
|
|
24
|
+
return this._client.getAPIList('/reviews', CursorPage<ReviewListResponse>, { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ReviewListResponsesCursorPage = CursorPage<ReviewListResponse>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The statuses a review can have
|
|
32
|
+
*/
|
|
33
|
+
export type ReviewStatus = 'pending' | 'published' | 'removed';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* An object representing a user review of a company.
|
|
37
|
+
*/
|
|
38
|
+
export interface ReviewRetrieveResponse {
|
|
39
|
+
/**
|
|
40
|
+
* The internal ID of the review.
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The attachments attached to the review.
|
|
46
|
+
*/
|
|
47
|
+
attachments: Array<ReviewRetrieveResponse.Attachment>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The company the review is for.
|
|
51
|
+
*/
|
|
52
|
+
company: ReviewRetrieveResponse.Company;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The timestamp of when the review was created.
|
|
56
|
+
*/
|
|
57
|
+
created_at: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The description of the review.
|
|
61
|
+
*/
|
|
62
|
+
description: string | null;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The timestamp of when the user joined the product.
|
|
66
|
+
*/
|
|
67
|
+
joined_at: string | null;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Whether or not the user paid for the product. If null, the payment status is
|
|
71
|
+
* unknown.
|
|
72
|
+
*/
|
|
73
|
+
paid_for_product: boolean | null;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The product the review is for.
|
|
77
|
+
*/
|
|
78
|
+
product: ReviewRetrieveResponse.Product;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The timestamp of when the review was published.
|
|
82
|
+
*/
|
|
83
|
+
published_at: string | null;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The number of stars the user gave the product.
|
|
87
|
+
*/
|
|
88
|
+
stars: number;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The status of the review.
|
|
92
|
+
*/
|
|
93
|
+
status: ReviewStatus;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The title of the review.
|
|
97
|
+
*/
|
|
98
|
+
title: string | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The timestamp of when the review was last updated.
|
|
102
|
+
*/
|
|
103
|
+
updated_at: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The user account that performed the action.
|
|
107
|
+
*/
|
|
108
|
+
user: ReviewRetrieveResponse.User;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export namespace ReviewRetrieveResponse {
|
|
112
|
+
/**
|
|
113
|
+
* Represents an image attachment
|
|
114
|
+
*/
|
|
115
|
+
export interface Attachment {
|
|
116
|
+
/**
|
|
117
|
+
* The ID of the attachment
|
|
118
|
+
*/
|
|
119
|
+
id: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The attachment's content type (e.g., image/jpg, video/mp4)
|
|
123
|
+
*/
|
|
124
|
+
content_type: string | null;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The name of the file
|
|
128
|
+
*/
|
|
129
|
+
filename: string | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
133
|
+
* should be used for apps.
|
|
134
|
+
*/
|
|
135
|
+
url: string | null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The company the review is for.
|
|
140
|
+
*/
|
|
141
|
+
export interface Company {
|
|
142
|
+
/**
|
|
143
|
+
* The ID (tag) of the company.
|
|
144
|
+
*/
|
|
145
|
+
id: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The slug/route of the company on the Whop site.
|
|
149
|
+
*/
|
|
150
|
+
route: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The title of the company.
|
|
154
|
+
*/
|
|
155
|
+
title: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The product the review is for.
|
|
160
|
+
*/
|
|
161
|
+
export interface Product {
|
|
162
|
+
/**
|
|
163
|
+
* The internal ID of the public product.
|
|
164
|
+
*/
|
|
165
|
+
id: string;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The title of the product. Use for Whop 4.0.
|
|
169
|
+
*/
|
|
170
|
+
title: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The user account that performed the action.
|
|
175
|
+
*/
|
|
176
|
+
export interface User {
|
|
177
|
+
/**
|
|
178
|
+
* The internal ID of the user.
|
|
179
|
+
*/
|
|
180
|
+
id: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The name of the user from their Whop account.
|
|
184
|
+
*/
|
|
185
|
+
name: string | null;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The username of the user from their Whop account.
|
|
189
|
+
*/
|
|
190
|
+
username: string;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* An object representing a user review of a company.
|
|
196
|
+
*/
|
|
197
|
+
export interface ReviewListResponse {
|
|
198
|
+
/**
|
|
199
|
+
* The internal ID of the review.
|
|
200
|
+
*/
|
|
201
|
+
id: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The attachments attached to the review.
|
|
205
|
+
*/
|
|
206
|
+
attachments: Array<ReviewListResponse.Attachment>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The timestamp of when the review was created.
|
|
210
|
+
*/
|
|
211
|
+
created_at: string;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The description of the review.
|
|
215
|
+
*/
|
|
216
|
+
description: string | null;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The timestamp of when the user joined the product.
|
|
220
|
+
*/
|
|
221
|
+
joined_at: string | null;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Whether or not the user paid for the product. If null, the payment status is
|
|
225
|
+
* unknown.
|
|
226
|
+
*/
|
|
227
|
+
paid_for_product: boolean | null;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The timestamp of when the review was published.
|
|
231
|
+
*/
|
|
232
|
+
published_at: string | null;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The number of stars the user gave the product.
|
|
236
|
+
*/
|
|
237
|
+
stars: number;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The status of the review.
|
|
241
|
+
*/
|
|
242
|
+
status: ReviewStatus;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The title of the review.
|
|
246
|
+
*/
|
|
247
|
+
title: string | null;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The timestamp of when the review was last updated.
|
|
251
|
+
*/
|
|
252
|
+
updated_at: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* The user account that performed the action.
|
|
256
|
+
*/
|
|
257
|
+
user: ReviewListResponse.User;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export namespace ReviewListResponse {
|
|
261
|
+
/**
|
|
262
|
+
* Represents an image attachment
|
|
263
|
+
*/
|
|
264
|
+
export interface Attachment {
|
|
265
|
+
/**
|
|
266
|
+
* The ID of the attachment
|
|
267
|
+
*/
|
|
268
|
+
id: string;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The attachment's content type (e.g., image/jpg, video/mp4)
|
|
272
|
+
*/
|
|
273
|
+
content_type: string | null;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The name of the file
|
|
277
|
+
*/
|
|
278
|
+
filename: string | null;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* This is the URL you use to render optimized attachments on the client. This
|
|
282
|
+
* should be used for apps.
|
|
283
|
+
*/
|
|
284
|
+
url: string | null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* The user account that performed the action.
|
|
289
|
+
*/
|
|
290
|
+
export interface User {
|
|
291
|
+
/**
|
|
292
|
+
* The internal ID of the user.
|
|
293
|
+
*/
|
|
294
|
+
id: string;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The name of the user from their Whop account.
|
|
298
|
+
*/
|
|
299
|
+
name: string | null;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* The username of the user from their Whop account.
|
|
303
|
+
*/
|
|
304
|
+
username: string;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface ReviewListParams extends CursorPageParams {
|
|
309
|
+
/**
|
|
310
|
+
* The ID of the product
|
|
311
|
+
*/
|
|
312
|
+
product_id: string;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
316
|
+
*/
|
|
317
|
+
before?: string | null;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Returns the first _n_ elements from the list.
|
|
321
|
+
*/
|
|
322
|
+
first?: number | null;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Returns the last _n_ elements from the list.
|
|
326
|
+
*/
|
|
327
|
+
last?: number | null;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* The maximum star rating of the review (inclusive)
|
|
331
|
+
*/
|
|
332
|
+
max_stars?: number | null;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* The minimum star rating of the review (inclusive)
|
|
336
|
+
*/
|
|
337
|
+
min_stars?: number | null;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export declare namespace Reviews {
|
|
341
|
+
export {
|
|
342
|
+
type ReviewStatus as ReviewStatus,
|
|
343
|
+
type ReviewRetrieveResponse as ReviewRetrieveResponse,
|
|
344
|
+
type ReviewListResponse as ReviewListResponse,
|
|
345
|
+
type ReviewListResponsesCursorPage as ReviewListResponsesCursorPage,
|
|
346
|
+
type ReviewListParams as ReviewListParams,
|
|
347
|
+
};
|
|
348
|
+
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import * as Shared from './shared';
|
|
4
|
+
import * as PaymentsAPI from './payments';
|
|
4
5
|
import { CursorPage } from '../core/pagination';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -444,7 +445,8 @@ export interface CheckoutConfiguration {
|
|
|
444
445
|
plan: CheckoutConfiguration.Plan;
|
|
445
446
|
|
|
446
447
|
/**
|
|
447
|
-
*
|
|
448
|
+
* A URL you can send to customers to complete a checkout. It looks like
|
|
449
|
+
* `/checkout/plan_xxxx?session={id}`
|
|
448
450
|
*/
|
|
449
451
|
purchase_url: string;
|
|
450
452
|
|
|
@@ -555,6 +557,12 @@ export interface Company {
|
|
|
555
557
|
*/
|
|
556
558
|
member_count: number;
|
|
557
559
|
|
|
560
|
+
/**
|
|
561
|
+
* A key-value store of data for the account, created/updated by the platform that
|
|
562
|
+
* made the account.
|
|
563
|
+
*/
|
|
564
|
+
metadata: { [key: string]: unknown } | null;
|
|
565
|
+
|
|
558
566
|
/**
|
|
559
567
|
* The user who owns this company
|
|
560
568
|
*/
|
|
@@ -1256,6 +1264,11 @@ export interface ForumPost {
|
|
|
1256
1264
|
*/
|
|
1257
1265
|
content: string | null;
|
|
1258
1266
|
|
|
1267
|
+
/**
|
|
1268
|
+
* The timestamp when the post was created
|
|
1269
|
+
*/
|
|
1270
|
+
created_at: string;
|
|
1271
|
+
|
|
1259
1272
|
/**
|
|
1260
1273
|
* Whether the forum post has been edited
|
|
1261
1274
|
*/
|
|
@@ -1286,6 +1299,11 @@ export interface ForumPost {
|
|
|
1286
1299
|
*/
|
|
1287
1300
|
title: string | null;
|
|
1288
1301
|
|
|
1302
|
+
/**
|
|
1303
|
+
* The timestamp when the post was last updated
|
|
1304
|
+
*/
|
|
1305
|
+
updated_at: string;
|
|
1306
|
+
|
|
1289
1307
|
/**
|
|
1290
1308
|
* The user who created this forum post
|
|
1291
1309
|
*/
|
|
@@ -1439,7 +1457,8 @@ export interface Invoice {
|
|
|
1439
1457
|
email_address: string | null;
|
|
1440
1458
|
|
|
1441
1459
|
/**
|
|
1442
|
-
*
|
|
1460
|
+
* A signed token that allows fetching the invoice data publically without being
|
|
1461
|
+
* authenticated.
|
|
1443
1462
|
*/
|
|
1444
1463
|
fetch_invoice_token: string;
|
|
1445
1464
|
|
|
@@ -1531,7 +1550,8 @@ export interface InvoiceListItem {
|
|
|
1531
1550
|
email_address: string | null;
|
|
1532
1551
|
|
|
1533
1552
|
/**
|
|
1534
|
-
*
|
|
1553
|
+
* A signed token that allows fetching the invoice data publically without being
|
|
1554
|
+
* authenticated.
|
|
1535
1555
|
*/
|
|
1536
1556
|
fetch_invoice_token: string;
|
|
1537
1557
|
|
|
@@ -1694,6 +1714,11 @@ export interface Membership {
|
|
|
1694
1714
|
*/
|
|
1695
1715
|
plan: Membership.Plan;
|
|
1696
1716
|
|
|
1717
|
+
/**
|
|
1718
|
+
* The Product this Membership grants access to.
|
|
1719
|
+
*/
|
|
1720
|
+
product: Membership.Product;
|
|
1721
|
+
|
|
1697
1722
|
/**
|
|
1698
1723
|
* The Promo Code that is currently applied to this Membership.
|
|
1699
1724
|
*/
|
|
@@ -1763,6 +1788,21 @@ export namespace Membership {
|
|
|
1763
1788
|
id: string;
|
|
1764
1789
|
}
|
|
1765
1790
|
|
|
1791
|
+
/**
|
|
1792
|
+
* The Product this Membership grants access to.
|
|
1793
|
+
*/
|
|
1794
|
+
export interface Product {
|
|
1795
|
+
/**
|
|
1796
|
+
* The internal ID of the public product.
|
|
1797
|
+
*/
|
|
1798
|
+
id: string;
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* The title of the product. Use for Whop 4.0.
|
|
1802
|
+
*/
|
|
1803
|
+
title: string;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1766
1806
|
/**
|
|
1767
1807
|
* The Promo Code that is currently applied to this Membership.
|
|
1768
1808
|
*/
|
|
@@ -2006,14 +2046,14 @@ export interface Payment {
|
|
|
2006
2046
|
billing_address: Payment.BillingAddress | null;
|
|
2007
2047
|
|
|
2008
2048
|
/**
|
|
2009
|
-
* The
|
|
2049
|
+
* The reason why a specific payment was billed
|
|
2010
2050
|
*/
|
|
2011
|
-
billing_reason:
|
|
2051
|
+
billing_reason: PaymentsAPI.BillingReasons | null;
|
|
2012
2052
|
|
|
2013
2053
|
/**
|
|
2014
|
-
*
|
|
2054
|
+
* Possible card brands that a payment token can have
|
|
2015
2055
|
*/
|
|
2016
|
-
card_brand:
|
|
2056
|
+
card_brand: PaymentsAPI.CardBrands | null;
|
|
2017
2057
|
|
|
2018
2058
|
/**
|
|
2019
2059
|
* The last 4 digits of the card used to make the payment.
|
|
@@ -2060,16 +2100,21 @@ export interface Payment {
|
|
|
2060
2100
|
*/
|
|
2061
2101
|
membership: Payment.Membership | null;
|
|
2062
2102
|
|
|
2103
|
+
/**
|
|
2104
|
+
* The custom metadata stored on this payment. This will be copied the checkout
|
|
2105
|
+
* configuration for which this payment was made
|
|
2106
|
+
*/
|
|
2107
|
+
metadata: { [key: string]: unknown } | null;
|
|
2108
|
+
|
|
2063
2109
|
/**
|
|
2064
2110
|
* The datetime the payment was paid
|
|
2065
2111
|
*/
|
|
2066
2112
|
paid_at: string | null;
|
|
2067
2113
|
|
|
2068
2114
|
/**
|
|
2069
|
-
*
|
|
2070
|
-
* klarna, affirm, card, cashapp
|
|
2115
|
+
* The different types of payment methods that can be used.
|
|
2071
2116
|
*/
|
|
2072
|
-
payment_method_type:
|
|
2117
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
|
|
2073
2118
|
|
|
2074
2119
|
/**
|
|
2075
2120
|
* The plan attached to this payment.
|
|
@@ -2087,7 +2132,8 @@ export interface Payment {
|
|
|
2087
2132
|
promo_code: Payment.PromoCode | null;
|
|
2088
2133
|
|
|
2089
2134
|
/**
|
|
2090
|
-
*
|
|
2135
|
+
* True only for payments that are `paid`, have not been fully refunded, and were
|
|
2136
|
+
* processed by a payment processor that allows refunds.
|
|
2091
2137
|
*/
|
|
2092
2138
|
refundable: boolean;
|
|
2093
2139
|
|
|
@@ -2102,7 +2148,9 @@ export interface Payment {
|
|
|
2102
2148
|
refunded_at: string | null;
|
|
2103
2149
|
|
|
2104
2150
|
/**
|
|
2105
|
-
*
|
|
2151
|
+
* True when the payment status is `open` and its membership is in one of the
|
|
2152
|
+
* retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
2153
|
+
* otherwise false. Used to decide if Whop can attempt the charge again.
|
|
2106
2154
|
*/
|
|
2107
2155
|
retryable: boolean;
|
|
2108
2156
|
|
|
@@ -2137,7 +2185,8 @@ export interface Payment {
|
|
|
2137
2185
|
user: Payment.User | null;
|
|
2138
2186
|
|
|
2139
2187
|
/**
|
|
2140
|
-
*
|
|
2188
|
+
* True when the payment is tied to a membership in `past_due`, the payment status
|
|
2189
|
+
* is `open`, and the processor allows voiding payments; otherwise false.
|
|
2141
2190
|
*/
|
|
2142
2191
|
voidable: boolean;
|
|
2143
2192
|
}
|
|
@@ -2288,7 +2337,7 @@ export namespace Payment {
|
|
|
2288
2337
|
code: string | null;
|
|
2289
2338
|
|
|
2290
2339
|
/**
|
|
2291
|
-
* The number of
|
|
2340
|
+
* The number of months the promo is applied for.
|
|
2292
2341
|
*/
|
|
2293
2342
|
number_of_intervals: number | null;
|
|
2294
2343
|
|
|
@@ -2393,6 +2442,11 @@ export interface Plan {
|
|
|
2393
2442
|
*/
|
|
2394
2443
|
member_count: number | null;
|
|
2395
2444
|
|
|
2445
|
+
/**
|
|
2446
|
+
* The explicit payment method configuration for the plan, if any.
|
|
2447
|
+
*/
|
|
2448
|
+
payment_method_configuration: Plan.PaymentMethodConfiguration | null;
|
|
2449
|
+
|
|
2396
2450
|
/**
|
|
2397
2451
|
* Indicates if the plan is a one time payment or recurring.
|
|
2398
2452
|
*/
|
|
@@ -2418,16 +2472,31 @@ export interface Plan {
|
|
|
2418
2472
|
*/
|
|
2419
2473
|
renewal_price: number;
|
|
2420
2474
|
|
|
2475
|
+
/**
|
|
2476
|
+
* The number of units available for purchase. Only displayed to authorized actors
|
|
2477
|
+
*/
|
|
2478
|
+
stock: number | null;
|
|
2479
|
+
|
|
2421
2480
|
/**
|
|
2422
2481
|
* The tax type for the plan.
|
|
2423
2482
|
*/
|
|
2424
2483
|
tax_type: TaxType;
|
|
2425
2484
|
|
|
2485
|
+
/**
|
|
2486
|
+
* The title of the plan. This will be visible on the product page to customers.
|
|
2487
|
+
*/
|
|
2488
|
+
title: string | null;
|
|
2489
|
+
|
|
2426
2490
|
/**
|
|
2427
2491
|
* The number of free trial days added before a renewal plan.
|
|
2428
2492
|
*/
|
|
2429
2493
|
trial_period_days: number | null;
|
|
2430
2494
|
|
|
2495
|
+
/**
|
|
2496
|
+
* Limits/doesn't limit the number of units available for purchase.
|
|
2497
|
+
*/
|
|
2498
|
+
unlimited_stock: boolean;
|
|
2499
|
+
|
|
2431
2500
|
/**
|
|
2432
2501
|
* When the plan was last updated.
|
|
2433
2502
|
*/
|
|
@@ -2500,6 +2569,32 @@ export namespace Plan {
|
|
|
2500
2569
|
id: string;
|
|
2501
2570
|
}
|
|
2502
2571
|
|
|
2572
|
+
/**
|
|
2573
|
+
* The explicit payment method configuration for the plan, if any.
|
|
2574
|
+
*/
|
|
2575
|
+
export interface PaymentMethodConfiguration {
|
|
2576
|
+
/**
|
|
2577
|
+
* An array of payment method identifiers that are explicitly disabled. Only
|
|
2578
|
+
* applies if the include_platform_defaults is true.
|
|
2579
|
+
*/
|
|
2580
|
+
disabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* An array of payment method identifiers that are explicitly enabled. This means
|
|
2584
|
+
* these payment methods will be shown on checkout. Example use case is to only
|
|
2585
|
+
* enable a specific payment method like cashapp, or extending the platform
|
|
2586
|
+
* defaults with additional methods.
|
|
2587
|
+
*/
|
|
2588
|
+
enabled: Array<PaymentsAPI.PaymentMethodTypes>;
|
|
2589
|
+
|
|
2590
|
+
/**
|
|
2591
|
+
* Whether Whop's platform default payment method enablement settings are included
|
|
2592
|
+
* in this configuration. The full list of default payment methods can be found in
|
|
2593
|
+
* the documentation at docs.whop.com/payments.
|
|
2594
|
+
*/
|
|
2595
|
+
include_platform_defaults: boolean;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2503
2598
|
/**
|
|
2504
2599
|
* The access pass for the plan.
|
|
2505
2600
|
*/
|
|
@@ -2565,6 +2660,13 @@ export interface Product {
|
|
|
2565
2660
|
*/
|
|
2566
2661
|
description: string | null;
|
|
2567
2662
|
|
|
2663
|
+
/**
|
|
2664
|
+
* A unique identifier used to create or update products. When provided on product
|
|
2665
|
+
* creation endpoints, we’ll look up an existing product by this identifier — if it
|
|
2666
|
+
* exists, we’ll update it; if not, we’ll create a new one.
|
|
2667
|
+
*/
|
|
2668
|
+
external_identifier: string | null;
|
|
2669
|
+
|
|
2568
2670
|
/**
|
|
2569
2671
|
* The percentage of a transaction a user is eligible to earn from the whop
|
|
2570
2672
|
* marketplace global affiliate program.
|
|
@@ -2724,6 +2826,13 @@ export interface ProductListItem {
|
|
|
2724
2826
|
*/
|
|
2725
2827
|
created_at: string;
|
|
2726
2828
|
|
|
2829
|
+
/**
|
|
2830
|
+
* A unique identifier used to create or update products. When provided on product
|
|
2831
|
+
* creation endpoints, we’ll look up an existing product by this identifier — if it
|
|
2832
|
+
* exists, we’ll update it; if not, we’ll create a new one.
|
|
2833
|
+
*/
|
|
2834
|
+
external_identifier: string | null;
|
|
2835
|
+
|
|
2727
2836
|
/**
|
|
2728
2837
|
* The headline of the product.
|
|
2729
2838
|
*/
|
|
@@ -3130,6 +3239,11 @@ export interface Transfer {
|
|
|
3130
3239
|
*/
|
|
3131
3240
|
fee_amount: number | null;
|
|
3132
3241
|
|
|
3242
|
+
/**
|
|
3243
|
+
* A hash of metadata attached to the transfer
|
|
3244
|
+
*/
|
|
3245
|
+
metadata: { [key: string]: unknown } | null;
|
|
3246
|
+
|
|
3133
3247
|
/**
|
|
3134
3248
|
* The notes of the credit transaction transfer
|
|
3135
3249
|
*/
|
|
@@ -106,6 +106,11 @@ export interface TransferListResponse {
|
|
|
106
106
|
*/
|
|
107
107
|
fee_amount: number | null;
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* A hash of metadata attached to the transfer
|
|
111
|
+
*/
|
|
112
|
+
metadata: { [key: string]: unknown } | null;
|
|
113
|
+
|
|
109
114
|
/**
|
|
110
115
|
* The notes of the credit transaction transfer
|
|
111
116
|
*/
|
|
@@ -145,6 +150,11 @@ export interface TransferCreateParams {
|
|
|
145
150
|
*/
|
|
146
151
|
idempotence_key?: string | null;
|
|
147
152
|
|
|
153
|
+
/**
|
|
154
|
+
* A hash of metadata to attach to the transfer.
|
|
155
|
+
*/
|
|
156
|
+
metadata?: { [key: string]: unknown } | null;
|
|
157
|
+
|
|
148
158
|
/**
|
|
149
159
|
* Notes for the transfer. Maximum of 50 characters.
|
|
150
160
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.4'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.4";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|