@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
|
@@ -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
|
|
|
@@ -1256,6 +1258,11 @@ export interface ForumPost {
|
|
|
1256
1258
|
*/
|
|
1257
1259
|
content: string | null;
|
|
1258
1260
|
|
|
1261
|
+
/**
|
|
1262
|
+
* The timestamp when the post was created
|
|
1263
|
+
*/
|
|
1264
|
+
created_at: string;
|
|
1265
|
+
|
|
1259
1266
|
/**
|
|
1260
1267
|
* Whether the forum post has been edited
|
|
1261
1268
|
*/
|
|
@@ -1286,6 +1293,11 @@ export interface ForumPost {
|
|
|
1286
1293
|
*/
|
|
1287
1294
|
title: string | null;
|
|
1288
1295
|
|
|
1296
|
+
/**
|
|
1297
|
+
* The timestamp when the post was last updated
|
|
1298
|
+
*/
|
|
1299
|
+
updated_at: string;
|
|
1300
|
+
|
|
1289
1301
|
/**
|
|
1290
1302
|
* The user who created this forum post
|
|
1291
1303
|
*/
|
|
@@ -1439,7 +1451,8 @@ export interface Invoice {
|
|
|
1439
1451
|
email_address: string | null;
|
|
1440
1452
|
|
|
1441
1453
|
/**
|
|
1442
|
-
*
|
|
1454
|
+
* A signed token that allows fetching the invoice data publically without being
|
|
1455
|
+
* authenticated.
|
|
1443
1456
|
*/
|
|
1444
1457
|
fetch_invoice_token: string;
|
|
1445
1458
|
|
|
@@ -1531,7 +1544,8 @@ export interface InvoiceListItem {
|
|
|
1531
1544
|
email_address: string | null;
|
|
1532
1545
|
|
|
1533
1546
|
/**
|
|
1534
|
-
*
|
|
1547
|
+
* A signed token that allows fetching the invoice data publically without being
|
|
1548
|
+
* authenticated.
|
|
1535
1549
|
*/
|
|
1536
1550
|
fetch_invoice_token: string;
|
|
1537
1551
|
|
|
@@ -1694,6 +1708,11 @@ export interface Membership {
|
|
|
1694
1708
|
*/
|
|
1695
1709
|
plan: Membership.Plan;
|
|
1696
1710
|
|
|
1711
|
+
/**
|
|
1712
|
+
* The Product this Membership grants access to.
|
|
1713
|
+
*/
|
|
1714
|
+
product: Membership.Product;
|
|
1715
|
+
|
|
1697
1716
|
/**
|
|
1698
1717
|
* The Promo Code that is currently applied to this Membership.
|
|
1699
1718
|
*/
|
|
@@ -1763,6 +1782,21 @@ export namespace Membership {
|
|
|
1763
1782
|
id: string;
|
|
1764
1783
|
}
|
|
1765
1784
|
|
|
1785
|
+
/**
|
|
1786
|
+
* The Product this Membership grants access to.
|
|
1787
|
+
*/
|
|
1788
|
+
export interface Product {
|
|
1789
|
+
/**
|
|
1790
|
+
* The internal ID of the public product.
|
|
1791
|
+
*/
|
|
1792
|
+
id: string;
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* The title of the product. Use for Whop 4.0.
|
|
1796
|
+
*/
|
|
1797
|
+
title: string;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1766
1800
|
/**
|
|
1767
1801
|
* The Promo Code that is currently applied to this Membership.
|
|
1768
1802
|
*/
|
|
@@ -2006,14 +2040,14 @@ export interface Payment {
|
|
|
2006
2040
|
billing_address: Payment.BillingAddress | null;
|
|
2007
2041
|
|
|
2008
2042
|
/**
|
|
2009
|
-
* The
|
|
2043
|
+
* The reason why a specific payment was billed
|
|
2010
2044
|
*/
|
|
2011
|
-
billing_reason:
|
|
2045
|
+
billing_reason: PaymentsAPI.BillingReasons | null;
|
|
2012
2046
|
|
|
2013
2047
|
/**
|
|
2014
|
-
*
|
|
2048
|
+
* Possible card brands that a payment token can have
|
|
2015
2049
|
*/
|
|
2016
|
-
card_brand:
|
|
2050
|
+
card_brand: PaymentsAPI.CardBrands | null;
|
|
2017
2051
|
|
|
2018
2052
|
/**
|
|
2019
2053
|
* The last 4 digits of the card used to make the payment.
|
|
@@ -2066,10 +2100,9 @@ export interface Payment {
|
|
|
2066
2100
|
paid_at: string | null;
|
|
2067
2101
|
|
|
2068
2102
|
/**
|
|
2069
|
-
*
|
|
2070
|
-
* klarna, affirm, card, cashapp
|
|
2103
|
+
* The different types of payment methods that can be used.
|
|
2071
2104
|
*/
|
|
2072
|
-
payment_method_type:
|
|
2105
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
|
|
2073
2106
|
|
|
2074
2107
|
/**
|
|
2075
2108
|
* The plan attached to this payment.
|
|
@@ -2087,7 +2120,8 @@ export interface Payment {
|
|
|
2087
2120
|
promo_code: Payment.PromoCode | null;
|
|
2088
2121
|
|
|
2089
2122
|
/**
|
|
2090
|
-
*
|
|
2123
|
+
* True only for payments that are `paid`, have not been fully refunded, and were
|
|
2124
|
+
* processed by a payment processor that allows refunds.
|
|
2091
2125
|
*/
|
|
2092
2126
|
refundable: boolean;
|
|
2093
2127
|
|
|
@@ -2102,7 +2136,9 @@ export interface Payment {
|
|
|
2102
2136
|
refunded_at: string | null;
|
|
2103
2137
|
|
|
2104
2138
|
/**
|
|
2105
|
-
*
|
|
2139
|
+
* True when the payment status is `open` and its membership is in one of the
|
|
2140
|
+
* retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
2141
|
+
* otherwise false. Used to decide if Whop can attempt the charge again.
|
|
2106
2142
|
*/
|
|
2107
2143
|
retryable: boolean;
|
|
2108
2144
|
|
|
@@ -2137,7 +2173,8 @@ export interface Payment {
|
|
|
2137
2173
|
user: Payment.User | null;
|
|
2138
2174
|
|
|
2139
2175
|
/**
|
|
2140
|
-
*
|
|
2176
|
+
* True when the payment is tied to a membership in `past_due`, the payment status
|
|
2177
|
+
* is `open`, and the processor allows voiding payments; otherwise false.
|
|
2141
2178
|
*/
|
|
2142
2179
|
voidable: boolean;
|
|
2143
2180
|
}
|
|
@@ -2288,7 +2325,7 @@ export namespace Payment {
|
|
|
2288
2325
|
code: string | null;
|
|
2289
2326
|
|
|
2290
2327
|
/**
|
|
2291
|
-
* The number of
|
|
2328
|
+
* The number of months the promo is applied for.
|
|
2292
2329
|
*/
|
|
2293
2330
|
number_of_intervals: number | null;
|
|
2294
2331
|
|
|
@@ -2418,16 +2455,31 @@ export interface Plan {
|
|
|
2418
2455
|
*/
|
|
2419
2456
|
renewal_price: number;
|
|
2420
2457
|
|
|
2458
|
+
/**
|
|
2459
|
+
* The number of units available for purchase. Only displayed to authorized actors
|
|
2460
|
+
*/
|
|
2461
|
+
stock: number | null;
|
|
2462
|
+
|
|
2421
2463
|
/**
|
|
2422
2464
|
* The tax type for the plan.
|
|
2423
2465
|
*/
|
|
2424
2466
|
tax_type: TaxType;
|
|
2425
2467
|
|
|
2468
|
+
/**
|
|
2469
|
+
* The title of the plan. This will be visible on the product page to customers.
|
|
2470
|
+
*/
|
|
2471
|
+
title: string | null;
|
|
2472
|
+
|
|
2426
2473
|
/**
|
|
2427
2474
|
* The number of free trial days added before a renewal plan.
|
|
2428
2475
|
*/
|
|
2429
2476
|
trial_period_days: number | null;
|
|
2430
2477
|
|
|
2478
|
+
/**
|
|
2479
|
+
* Limits/doesn't limit the number of units available for purchase.
|
|
2480
|
+
*/
|
|
2481
|
+
unlimited_stock: boolean;
|
|
2482
|
+
|
|
2431
2483
|
/**
|
|
2432
2484
|
* When the plan was last updated.
|
|
2433
2485
|
*/
|
|
@@ -2565,6 +2617,13 @@ export interface Product {
|
|
|
2565
2617
|
*/
|
|
2566
2618
|
description: string | null;
|
|
2567
2619
|
|
|
2620
|
+
/**
|
|
2621
|
+
* A unique identifier used to create or update products. When provided on product
|
|
2622
|
+
* creation endpoints, we’ll look up an existing product by this identifier — if it
|
|
2623
|
+
* exists, we’ll update it; if not, we’ll create a new one.
|
|
2624
|
+
*/
|
|
2625
|
+
external_identifier: string | null;
|
|
2626
|
+
|
|
2568
2627
|
/**
|
|
2569
2628
|
* The percentage of a transaction a user is eligible to earn from the whop
|
|
2570
2629
|
* marketplace global affiliate program.
|
|
@@ -2724,6 +2783,13 @@ export interface ProductListItem {
|
|
|
2724
2783
|
*/
|
|
2725
2784
|
created_at: string;
|
|
2726
2785
|
|
|
2786
|
+
/**
|
|
2787
|
+
* A unique identifier used to create or update products. When provided on product
|
|
2788
|
+
* creation endpoints, we’ll look up an existing product by this identifier — if it
|
|
2789
|
+
* exists, we’ll update it; if not, we’ll create a new one.
|
|
2790
|
+
*/
|
|
2791
|
+
external_identifier: string | null;
|
|
2792
|
+
|
|
2727
2793
|
/**
|
|
2728
2794
|
* The headline of the product.
|
|
2729
2795
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.3'; // 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.3";
|
|
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.3";
|
|
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.3'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|