@whop/sdk 0.0.25 → 0.0.27
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 +58 -0
- package/client.d.mts +29 -25
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -25
- package/client.d.ts.map +1 -1
- package/client.js +14 -3
- package/client.js.map +1 -1
- package/client.mjs +16 -5
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +32 -51
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +32 -51
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/ai-chats.d.mts +36 -104
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +36 -104
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +1 -1
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +1 -1
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +2 -2
- package/resources/app-builds.d.ts +2 -2
- package/resources/apps.d.mts +5 -4
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +5 -4
- package/resources/apps.d.ts.map +1 -1
- package/resources/authorized-users.d.mts +43 -9
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +43 -9
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +1 -1
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +1 -1
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +1 -1
- package/resources/chat-channels.d.ts +1 -1
- package/resources/checkout-configurations.d.mts +24 -16
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +24 -16
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/companies.d.mts +38 -25
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +38 -25
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -4
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -4
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +23 -109
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +23 -109
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/course-chapters.d.mts +3 -3
- package/resources/course-chapters.d.ts +3 -3
- package/resources/course-lessons.d.mts +15 -15
- package/resources/course-lessons.d.ts +15 -15
- package/resources/course-students.d.mts +6 -6
- package/resources/course-students.d.ts +6 -6
- package/resources/courses.d.mts +8 -8
- package/resources/courses.d.ts +8 -8
- package/resources/disputes.d.mts +20 -18
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +20 -18
- package/resources/disputes.d.ts.map +1 -1
- package/resources/dm-channels.d.mts +161 -0
- package/resources/dm-channels.d.mts.map +1 -0
- package/resources/dm-channels.d.ts +161 -0
- package/resources/dm-channels.d.ts.map +1 -0
- package/resources/dm-channels.js +87 -0
- package/resources/dm-channels.js.map +1 -0
- package/resources/dm-channels.mjs +83 -0
- package/resources/dm-channels.mjs.map +1 -0
- package/resources/dm-members.d.mts +14 -66
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +14 -66
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/entries.d.mts +6 -6
- package/resources/entries.d.ts +6 -6
- package/resources/experiences.d.mts +6 -5
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +6 -5
- package/resources/experiences.d.ts.map +1 -1
- package/resources/fee-markups.d.mts +6 -6
- package/resources/fee-markups.d.ts +6 -6
- package/resources/files.d.mts +9 -5
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +9 -5
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +8 -4
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +8 -4
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forums.d.mts +1 -1
- package/resources/forums.d.ts +1 -1
- package/resources/index.d.mts +12 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +12 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +28 -20
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +28 -20
- package/resources/invoices.d.ts.map +1 -1
- package/resources/leads.d.mts +21 -189
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +21 -189
- package/resources/leads.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +12 -9
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +12 -9
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +14 -14
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +14 -14
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +1 -1
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +1 -1
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +25 -15
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +25 -15
- package/resources/memberships.d.ts.map +1 -1
- package/resources/messages.d.mts +7 -3
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -3
- package/resources/messages.d.ts.map +1 -1
- package/resources/payments.d.mts +59 -19
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +59 -19
- package/resources/payments.d.ts.map +1 -1
- package/resources/payout-methods.d.mts +14 -9
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +14 -9
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +34 -24
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +34 -24
- package/resources/plans.d.ts.map +1 -1
- package/resources/products.d.mts +4 -2
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +4 -2
- package/resources/products.d.ts.map +1 -1
- package/resources/promo-codes.d.mts +22 -12
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +22 -12
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/reactions.d.mts +1 -1
- package/resources/reactions.d.ts +1 -1
- package/resources/refunds.d.mts +19 -15
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +19 -15
- package/resources/refunds.d.ts.map +1 -1
- package/resources/reviews.d.mts +10 -10
- package/resources/reviews.d.ts +10 -10
- package/resources/setup-intents.d.mts +18 -20
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +18 -20
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/shared.d.mts +209 -137
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +209 -137
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +4 -4
- package/resources/shipments.d.ts +4 -4
- package/resources/support-channels.d.mts +1 -1
- package/resources/support-channels.d.ts +1 -1
- package/resources/topups.d.mts +6 -4
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +6 -4
- package/resources/topups.d.ts.map +1 -1
- package/resources/transfers.d.mts +8 -5
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +8 -5
- package/resources/transfers.d.ts.map +1 -1
- package/resources/users.d.mts +46 -8
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -8
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +10 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +10 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +12 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +12 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/webhooks.d.mts +105 -350
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +105 -350
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +32 -139
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +32 -139
- package/resources/withdrawals.d.ts.map +1 -1
- package/src/client.ts +87 -41
- package/src/internal/parse.ts +6 -0
- package/src/resources/access-tokens.ts +35 -56
- package/src/resources/ai-chats.ts +36 -122
- package/src/resources/app-builds.ts +2 -2
- package/src/resources/apps.ts +5 -4
- package/src/resources/authorized-users.ts +49 -9
- package/src/resources/chat-channels.ts +1 -1
- package/src/resources/checkout-configurations.ts +24 -16
- package/src/resources/companies.ts +41 -26
- package/src/resources/company-token-transactions.ts +24 -126
- package/src/resources/course-chapters.ts +3 -3
- package/src/resources/course-lessons.ts +15 -15
- package/src/resources/course-students.ts +6 -6
- package/src/resources/courses.ts +8 -8
- package/src/resources/disputes.ts +20 -18
- package/src/resources/dm-channels.ts +212 -0
- package/src/resources/dm-members.ts +16 -78
- package/src/resources/entries.ts +6 -6
- package/src/resources/experiences.ts +6 -5
- package/src/resources/fee-markups.ts +6 -6
- package/src/resources/files.ts +10 -4
- package/src/resources/forum-posts.ts +8 -4
- package/src/resources/forums.ts +1 -1
- package/src/resources/index.ts +38 -18
- package/src/resources/invoices.ts +28 -20
- package/src/resources/leads.ts +21 -217
- package/src/resources/ledger-accounts.ts +12 -42
- package/src/resources/members.ts +15 -15
- package/src/resources/memberships.ts +34 -30
- package/src/resources/messages.ts +7 -3
- package/src/resources/payments.ts +67 -17
- package/src/resources/payout-methods.ts +21 -8
- package/src/resources/plans.ts +34 -24
- package/src/resources/products.ts +4 -2
- package/src/resources/promo-codes.ts +22 -12
- package/src/resources/reactions.ts +1 -1
- package/src/resources/refunds.ts +20 -15
- package/src/resources/reviews.ts +10 -10
- package/src/resources/setup-intents.ts +18 -20
- package/src/resources/shared.ts +217 -145
- package/src/resources/shipments.ts +4 -4
- package/src/resources/support-channels.ts +1 -1
- package/src/resources/topups.ts +6 -4
- package/src/resources/transfers.ts +8 -5
- package/src/resources/users.ts +58 -8
- package/src/resources/verifications.ts +50 -37
- package/src/resources/webhooks.ts +138 -785
- package/src/resources/withdrawals.ts +39 -216
- 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
package/src/resources/members.ts
CHANGED
|
@@ -31,7 +31,7 @@ export class Members extends APIResource {
|
|
|
31
31
|
* - `member:phone:read`
|
|
32
32
|
*/
|
|
33
33
|
list(
|
|
34
|
-
query: MemberListParams,
|
|
34
|
+
query: MemberListParams | null | undefined = {},
|
|
35
35
|
options?: RequestOptions,
|
|
36
36
|
): PagePromise<MemberListResponsesCursorPage, MemberListResponse> {
|
|
37
37
|
return this._client.getAPIList('/members', CursorPage<MemberListResponse>, { query, ...options });
|
|
@@ -47,7 +47,7 @@ export type MemberListResponsesCursorPage = CursorPage<MemberListResponse>;
|
|
|
47
47
|
*/
|
|
48
48
|
export interface MemberRetrieveResponse {
|
|
49
49
|
/**
|
|
50
|
-
* The
|
|
50
|
+
* The unique identifier for the company member.
|
|
51
51
|
*/
|
|
52
52
|
id: string;
|
|
53
53
|
|
|
@@ -70,7 +70,7 @@ export interface MemberRetrieveResponse {
|
|
|
70
70
|
company_token_balance: number;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* The datetime the company member was created.
|
|
74
74
|
*/
|
|
75
75
|
created_at: string;
|
|
76
76
|
|
|
@@ -100,7 +100,7 @@ export interface MemberRetrieveResponse {
|
|
|
100
100
|
status: Shared.MemberStatuses;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* The
|
|
103
|
+
* The datetime the company member was last updated.
|
|
104
104
|
*/
|
|
105
105
|
updated_at: string;
|
|
106
106
|
|
|
@@ -121,7 +121,7 @@ export namespace MemberRetrieveResponse {
|
|
|
121
121
|
*/
|
|
122
122
|
export interface Company {
|
|
123
123
|
/**
|
|
124
|
-
* The
|
|
124
|
+
* The unique identifier for the company.
|
|
125
125
|
*/
|
|
126
126
|
id: string;
|
|
127
127
|
|
|
@@ -141,7 +141,7 @@ export namespace MemberRetrieveResponse {
|
|
|
141
141
|
*/
|
|
142
142
|
export interface User {
|
|
143
143
|
/**
|
|
144
|
-
* The
|
|
144
|
+
* The unique identifier for the company member user.
|
|
145
145
|
*/
|
|
146
146
|
id: string;
|
|
147
147
|
|
|
@@ -169,7 +169,7 @@ export namespace MemberRetrieveResponse {
|
|
|
169
169
|
*/
|
|
170
170
|
export interface MemberListResponse {
|
|
171
171
|
/**
|
|
172
|
-
* The
|
|
172
|
+
* The unique identifier for the company member.
|
|
173
173
|
*/
|
|
174
174
|
id: string;
|
|
175
175
|
|
|
@@ -187,7 +187,7 @@ export interface MemberListResponse {
|
|
|
187
187
|
company_token_balance: number;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
190
|
+
* The datetime the company member was created.
|
|
191
191
|
*/
|
|
192
192
|
created_at: string;
|
|
193
193
|
|
|
@@ -217,7 +217,7 @@ export interface MemberListResponse {
|
|
|
217
217
|
status: Shared.MemberStatuses;
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
|
-
* The
|
|
220
|
+
* The datetime the company member was last updated.
|
|
221
221
|
*/
|
|
222
222
|
updated_at: string;
|
|
223
223
|
|
|
@@ -238,7 +238,7 @@ export namespace MemberListResponse {
|
|
|
238
238
|
*/
|
|
239
239
|
export interface User {
|
|
240
240
|
/**
|
|
241
|
-
* The
|
|
241
|
+
* The unique identifier for the company member user.
|
|
242
242
|
*/
|
|
243
243
|
id: string;
|
|
244
244
|
|
|
@@ -260,11 +260,6 @@ export namespace MemberListResponse {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
export interface MemberListParams extends CursorPageParams {
|
|
263
|
-
/**
|
|
264
|
-
* The ID of the company to list members for
|
|
265
|
-
*/
|
|
266
|
-
company_id: string;
|
|
267
|
-
|
|
268
263
|
/**
|
|
269
264
|
* The access level a given user (or company) has to a product or company.
|
|
270
265
|
*/
|
|
@@ -275,6 +270,11 @@ export interface MemberListParams extends CursorPageParams {
|
|
|
275
270
|
*/
|
|
276
271
|
before?: string | null;
|
|
277
272
|
|
|
273
|
+
/**
|
|
274
|
+
* The ID of the company to list members for
|
|
275
|
+
*/
|
|
276
|
+
company_id?: string | null;
|
|
277
|
+
|
|
278
278
|
/**
|
|
279
279
|
* The minimum creation date to filter by
|
|
280
280
|
*/
|
|
@@ -117,12 +117,25 @@ export class Memberships extends APIResource {
|
|
|
117
117
|
export type MembershipListResponsesCursorPage = CursorPage<MembershipListResponse>;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
120
|
+
* The different reasons a user can choose for why they are canceling their
|
|
121
|
+
* membership.
|
|
122
|
+
*/
|
|
123
|
+
export type CancelOptions =
|
|
124
|
+
| 'too_expensive'
|
|
125
|
+
| 'switching'
|
|
126
|
+
| 'missing_features'
|
|
127
|
+
| 'technical_issues'
|
|
128
|
+
| 'bad_experience'
|
|
129
|
+
| 'other'
|
|
130
|
+
| 'testing';
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A membership represents an active relationship between a user and a product. It
|
|
134
|
+
* tracks the user's access, billing status, and renewal schedule.
|
|
122
135
|
*/
|
|
123
136
|
export interface MembershipListResponse {
|
|
124
137
|
/**
|
|
125
|
-
* The
|
|
138
|
+
* The unique identifier for the membership.
|
|
126
139
|
*/
|
|
127
140
|
id: string;
|
|
128
141
|
|
|
@@ -136,15 +149,7 @@ export interface MembershipListResponse {
|
|
|
136
149
|
* The different reasons a user can choose for why they are canceling their
|
|
137
150
|
* membership.
|
|
138
151
|
*/
|
|
139
|
-
cancel_option:
|
|
140
|
-
| 'too_expensive'
|
|
141
|
-
| 'switching'
|
|
142
|
-
| 'missing_features'
|
|
143
|
-
| 'technical_issues'
|
|
144
|
-
| 'bad_experience'
|
|
145
|
-
| 'other'
|
|
146
|
-
| 'testing'
|
|
147
|
-
| null;
|
|
152
|
+
cancel_option: CancelOptions | null;
|
|
148
153
|
|
|
149
154
|
/**
|
|
150
155
|
* The epoch timestamp of when the customer initiated a cancellation.
|
|
@@ -162,7 +167,7 @@ export interface MembershipListResponse {
|
|
|
162
167
|
company: MembershipListResponse.Company;
|
|
163
168
|
|
|
164
169
|
/**
|
|
165
|
-
* The
|
|
170
|
+
* The datetime the membership was created.
|
|
166
171
|
*/
|
|
167
172
|
created_at: string;
|
|
168
173
|
|
|
@@ -171,6 +176,11 @@ export interface MembershipListResponse {
|
|
|
171
176
|
*/
|
|
172
177
|
currency: Shared.Currency | null;
|
|
173
178
|
|
|
179
|
+
/**
|
|
180
|
+
* When the member joined the company.
|
|
181
|
+
*/
|
|
182
|
+
joined_at: string | null;
|
|
183
|
+
|
|
174
184
|
/**
|
|
175
185
|
* The license key for this Membership. This is only present if the membership
|
|
176
186
|
* grants access to an instance of the Whop Software app.
|
|
@@ -188,7 +198,8 @@ export interface MembershipListResponse {
|
|
|
188
198
|
member: MembershipListResponse.Member | null;
|
|
189
199
|
|
|
190
200
|
/**
|
|
191
|
-
*
|
|
201
|
+
* Custom key-value pairs for the membership (commonly used for software licensing,
|
|
202
|
+
* e.g., HWID). Max 50 keys, 500 chars per key, 5000 chars per value.
|
|
192
203
|
*/
|
|
193
204
|
metadata: { [key: string]: unknown };
|
|
194
205
|
|
|
@@ -230,7 +241,7 @@ export interface MembershipListResponse {
|
|
|
230
241
|
status: Shared.MembershipStatus;
|
|
231
242
|
|
|
232
243
|
/**
|
|
233
|
-
*
|
|
244
|
+
* The datetime the membership was last updated.
|
|
234
245
|
*/
|
|
235
246
|
updated_at: string;
|
|
236
247
|
|
|
@@ -246,7 +257,7 @@ export namespace MembershipListResponse {
|
|
|
246
257
|
*/
|
|
247
258
|
export interface Company {
|
|
248
259
|
/**
|
|
249
|
-
* The
|
|
260
|
+
* The unique identifier for the company.
|
|
250
261
|
*/
|
|
251
262
|
id: string;
|
|
252
263
|
|
|
@@ -261,7 +272,7 @@ export namespace MembershipListResponse {
|
|
|
261
272
|
*/
|
|
262
273
|
export interface Member {
|
|
263
274
|
/**
|
|
264
|
-
* The
|
|
275
|
+
* The unique identifier for the member.
|
|
265
276
|
*/
|
|
266
277
|
id: string;
|
|
267
278
|
}
|
|
@@ -271,7 +282,7 @@ export namespace MembershipListResponse {
|
|
|
271
282
|
*/
|
|
272
283
|
export interface Plan {
|
|
273
284
|
/**
|
|
274
|
-
* The
|
|
285
|
+
* The unique identifier for the plan.
|
|
275
286
|
*/
|
|
276
287
|
id: string;
|
|
277
288
|
}
|
|
@@ -281,7 +292,7 @@ export namespace MembershipListResponse {
|
|
|
281
292
|
*/
|
|
282
293
|
export interface Product {
|
|
283
294
|
/**
|
|
284
|
-
* The
|
|
295
|
+
* The unique identifier for the product.
|
|
285
296
|
*/
|
|
286
297
|
id: string;
|
|
287
298
|
|
|
@@ -296,7 +307,7 @@ export namespace MembershipListResponse {
|
|
|
296
307
|
*/
|
|
297
308
|
export interface PromoCode {
|
|
298
309
|
/**
|
|
299
|
-
* The
|
|
310
|
+
* The unique identifier for the promo code.
|
|
300
311
|
*/
|
|
301
312
|
id: string;
|
|
302
313
|
}
|
|
@@ -306,7 +317,7 @@ export namespace MembershipListResponse {
|
|
|
306
317
|
*/
|
|
307
318
|
export interface User {
|
|
308
319
|
/**
|
|
309
|
-
* The
|
|
320
|
+
* The unique identifier for the user.
|
|
310
321
|
*/
|
|
311
322
|
id: string;
|
|
312
323
|
|
|
@@ -343,15 +354,7 @@ export interface MembershipListParams extends CursorPageParams {
|
|
|
343
354
|
/**
|
|
344
355
|
* The cancel options to filter the memberships by
|
|
345
356
|
*/
|
|
346
|
-
cancel_options?: Array<
|
|
347
|
-
| 'too_expensive'
|
|
348
|
-
| 'switching'
|
|
349
|
-
| 'missing_features'
|
|
350
|
-
| 'technical_issues'
|
|
351
|
-
| 'bad_experience'
|
|
352
|
-
| 'other'
|
|
353
|
-
| 'testing'
|
|
354
|
-
> | null;
|
|
357
|
+
cancel_options?: Array<CancelOptions> | null;
|
|
355
358
|
|
|
356
359
|
/**
|
|
357
360
|
* The ID of the company to list memberships for
|
|
@@ -431,6 +434,7 @@ export interface MembershipPauseParams {
|
|
|
431
434
|
|
|
432
435
|
export declare namespace Memberships {
|
|
433
436
|
export {
|
|
437
|
+
type CancelOptions as CancelOptions,
|
|
434
438
|
type MembershipListResponse as MembershipListResponse,
|
|
435
439
|
type MembershipListResponsesCursorPage as MembershipListResponsesCursorPage,
|
|
436
440
|
type MembershipUpdateParams as MembershipUpdateParams,
|
|
@@ -74,7 +74,11 @@ export type MessageListResponsesCursorPage = CursorPage<MessageListResponse>;
|
|
|
74
74
|
*/
|
|
75
75
|
export interface MessageListResponse {
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Represents a unique identifier that is Base64 obfuscated. It is often used to
|
|
78
|
+
* refetch an object or as key for a cache. The ID type appears in a JSON response
|
|
79
|
+
* as a String; however, it is not intended to be human-readable. When expected as
|
|
80
|
+
* an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`)
|
|
81
|
+
* input value will be accepted as an ID.
|
|
78
82
|
*/
|
|
79
83
|
id: string;
|
|
80
84
|
|
|
@@ -156,7 +160,7 @@ export namespace MessageListResponse {
|
|
|
156
160
|
*/
|
|
157
161
|
export interface Option {
|
|
158
162
|
/**
|
|
159
|
-
* The
|
|
163
|
+
* The unique identifier for the poll option.
|
|
160
164
|
*/
|
|
161
165
|
id: string;
|
|
162
166
|
|
|
@@ -202,7 +206,7 @@ export namespace MessageListResponse {
|
|
|
202
206
|
*/
|
|
203
207
|
export interface User {
|
|
204
208
|
/**
|
|
205
|
-
* The
|
|
209
|
+
* The unique identifier for the user.
|
|
206
210
|
*/
|
|
207
211
|
id: string;
|
|
208
212
|
|
|
@@ -253,6 +253,8 @@ export type CardBrands =
|
|
|
253
253
|
| 'fuel_card'
|
|
254
254
|
| 'dankort'
|
|
255
255
|
| 'carnet'
|
|
256
|
+
| 'atm_card'
|
|
257
|
+
| 'china_union_payuzcard'
|
|
256
258
|
| 'unknown';
|
|
257
259
|
|
|
258
260
|
/**
|
|
@@ -277,6 +279,7 @@ export type PaymentMethodTypes =
|
|
|
277
279
|
| 'capchase_pay'
|
|
278
280
|
| 'card'
|
|
279
281
|
| 'cashapp'
|
|
282
|
+
| 'claritypay'
|
|
280
283
|
| 'coinbase'
|
|
281
284
|
| 'crypto'
|
|
282
285
|
| 'custom'
|
|
@@ -349,11 +352,12 @@ export type PaymentMethodTypes =
|
|
|
349
352
|
| 'unknown';
|
|
350
353
|
|
|
351
354
|
/**
|
|
352
|
-
*
|
|
355
|
+
* A payment represents a completed or attempted charge for a membership. Payments
|
|
356
|
+
* track the amount, status, currency, and payment method used.
|
|
353
357
|
*/
|
|
354
358
|
export interface PaymentListResponse {
|
|
355
359
|
/**
|
|
356
|
-
* The payment
|
|
360
|
+
* The unique identifier for the payment.
|
|
357
361
|
*/
|
|
358
362
|
id: string;
|
|
359
363
|
|
|
@@ -362,6 +366,11 @@ export interface PaymentListResponse {
|
|
|
362
366
|
*/
|
|
363
367
|
amount_after_fees: number;
|
|
364
368
|
|
|
369
|
+
/**
|
|
370
|
+
* The application fee charged on this payment.
|
|
371
|
+
*/
|
|
372
|
+
application_fee: PaymentListResponse.ApplicationFee | null;
|
|
373
|
+
|
|
365
374
|
/**
|
|
366
375
|
* Whether this payment was auto refunded or not
|
|
367
376
|
*/
|
|
@@ -393,7 +402,7 @@ export interface PaymentListResponse {
|
|
|
393
402
|
company: PaymentListResponse.Company | null;
|
|
394
403
|
|
|
395
404
|
/**
|
|
396
|
-
* The datetime the payment was created
|
|
405
|
+
* The datetime the payment was created.
|
|
397
406
|
*/
|
|
398
407
|
created_at: string;
|
|
399
408
|
|
|
@@ -534,6 +543,41 @@ export interface PaymentListResponse {
|
|
|
534
543
|
}
|
|
535
544
|
|
|
536
545
|
export namespace PaymentListResponse {
|
|
546
|
+
/**
|
|
547
|
+
* The application fee charged on this payment.
|
|
548
|
+
*/
|
|
549
|
+
export interface ApplicationFee {
|
|
550
|
+
/**
|
|
551
|
+
* The unique identifier for the application fee.
|
|
552
|
+
*/
|
|
553
|
+
id: string;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The application fee amount.
|
|
557
|
+
*/
|
|
558
|
+
amount: number;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* The amount of the application fee that has been captured.
|
|
562
|
+
*/
|
|
563
|
+
amount_captured: number;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* The amount of the application fee that has been refunded.
|
|
567
|
+
*/
|
|
568
|
+
amount_refunded: number;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* The datetime the application fee was created.
|
|
572
|
+
*/
|
|
573
|
+
created_at: string;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* The currency of the application fee.
|
|
577
|
+
*/
|
|
578
|
+
currency: Shared.Currency;
|
|
579
|
+
}
|
|
580
|
+
|
|
537
581
|
/**
|
|
538
582
|
* The address of the user who made the payment.
|
|
539
583
|
*/
|
|
@@ -579,7 +623,7 @@ export namespace PaymentListResponse {
|
|
|
579
623
|
*/
|
|
580
624
|
export interface Company {
|
|
581
625
|
/**
|
|
582
|
-
* The
|
|
626
|
+
* The unique identifier for the company.
|
|
583
627
|
*/
|
|
584
628
|
id: string;
|
|
585
629
|
|
|
@@ -599,7 +643,7 @@ export namespace PaymentListResponse {
|
|
|
599
643
|
*/
|
|
600
644
|
export interface Member {
|
|
601
645
|
/**
|
|
602
|
-
* The
|
|
646
|
+
* The unique identifier for the company member.
|
|
603
647
|
*/
|
|
604
648
|
id: string;
|
|
605
649
|
|
|
@@ -614,7 +658,7 @@ export namespace PaymentListResponse {
|
|
|
614
658
|
*/
|
|
615
659
|
export interface Membership {
|
|
616
660
|
/**
|
|
617
|
-
* The
|
|
661
|
+
* The unique identifier for the membership.
|
|
618
662
|
*/
|
|
619
663
|
id: string;
|
|
620
664
|
|
|
@@ -629,7 +673,7 @@ export namespace PaymentListResponse {
|
|
|
629
673
|
*/
|
|
630
674
|
export interface PaymentMethod {
|
|
631
675
|
/**
|
|
632
|
-
* The
|
|
676
|
+
* The unique identifier for the payment token.
|
|
633
677
|
*/
|
|
634
678
|
id: string;
|
|
635
679
|
|
|
@@ -639,7 +683,7 @@ export namespace PaymentListResponse {
|
|
|
639
683
|
card: PaymentMethod.Card | null;
|
|
640
684
|
|
|
641
685
|
/**
|
|
642
|
-
* The
|
|
686
|
+
* The datetime the payment token was created.
|
|
643
687
|
*/
|
|
644
688
|
created_at: string;
|
|
645
689
|
|
|
@@ -681,7 +725,7 @@ export namespace PaymentListResponse {
|
|
|
681
725
|
*/
|
|
682
726
|
export interface Plan {
|
|
683
727
|
/**
|
|
684
|
-
* The
|
|
728
|
+
* The unique identifier for the plan.
|
|
685
729
|
*/
|
|
686
730
|
id: string;
|
|
687
731
|
}
|
|
@@ -691,7 +735,7 @@ export namespace PaymentListResponse {
|
|
|
691
735
|
*/
|
|
692
736
|
export interface Product {
|
|
693
737
|
/**
|
|
694
|
-
* The
|
|
738
|
+
* The unique identifier for the product.
|
|
695
739
|
*/
|
|
696
740
|
id: string;
|
|
697
741
|
|
|
@@ -711,12 +755,14 @@ export namespace PaymentListResponse {
|
|
|
711
755
|
*/
|
|
712
756
|
export interface PromoCode {
|
|
713
757
|
/**
|
|
714
|
-
* The
|
|
758
|
+
* The unique identifier for the promo code.
|
|
715
759
|
*/
|
|
716
760
|
id: string;
|
|
717
761
|
|
|
718
762
|
/**
|
|
719
|
-
* The amount
|
|
763
|
+
* The discount amount. Interpretation depends on promo_type: if 'percentage', this
|
|
764
|
+
* is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
|
|
765
|
+
* off (e.g., 10.00 means $10.00 off).
|
|
720
766
|
*/
|
|
721
767
|
amount_off: number;
|
|
722
768
|
|
|
@@ -746,7 +792,7 @@ export namespace PaymentListResponse {
|
|
|
746
792
|
*/
|
|
747
793
|
export interface User {
|
|
748
794
|
/**
|
|
749
|
-
* The
|
|
795
|
+
* The unique identifier for the user.
|
|
750
796
|
*/
|
|
751
797
|
id: string;
|
|
752
798
|
|
|
@@ -867,7 +913,8 @@ export declare namespace PaymentCreateParams {
|
|
|
867
913
|
currency: Shared.Currency;
|
|
868
914
|
|
|
869
915
|
/**
|
|
870
|
-
* The interval at which the plan charges (renewal plans).
|
|
916
|
+
* The interval in days at which the plan charges (renewal plans). For example, 30
|
|
917
|
+
* for monthly billing.
|
|
871
918
|
*/
|
|
872
919
|
billing_period?: number | null;
|
|
873
920
|
|
|
@@ -877,7 +924,8 @@ export declare namespace PaymentCreateParams {
|
|
|
877
924
|
description?: string | null;
|
|
878
925
|
|
|
879
926
|
/**
|
|
880
|
-
* The
|
|
927
|
+
* The number of days until the membership expires and revokes access (expiration
|
|
928
|
+
* plans). For example, 365 for one year.
|
|
881
929
|
*/
|
|
882
930
|
expiration_days?: number | null;
|
|
883
931
|
|
|
@@ -888,7 +936,8 @@ export declare namespace PaymentCreateParams {
|
|
|
888
936
|
force_create_new_plan?: boolean | null;
|
|
889
937
|
|
|
890
938
|
/**
|
|
891
|
-
* An additional amount charged upon first purchase.
|
|
939
|
+
* An additional amount charged upon first purchase. Provided as a number in the
|
|
940
|
+
* specified currency. Eg: 10.43 for $10.43 USD.
|
|
892
941
|
*/
|
|
893
942
|
initial_price?: number | null;
|
|
894
943
|
|
|
@@ -914,7 +963,8 @@ export declare namespace PaymentCreateParams {
|
|
|
914
963
|
product_id?: string | null;
|
|
915
964
|
|
|
916
965
|
/**
|
|
917
|
-
* The amount the customer is charged every billing period.
|
|
966
|
+
* The amount the customer is charged every billing period. Provided as a number in
|
|
967
|
+
* the specified currency. Eg: 10.43 for $10.43 USD.
|
|
918
968
|
*/
|
|
919
969
|
renewal_price?: number | null;
|
|
920
970
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as PayoutMethodsAPI from './payout-methods';
|
|
4
5
|
import { APIPromise } from '../core/api-promise';
|
|
5
6
|
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
@@ -38,12 +39,23 @@ export class PayoutMethods extends APIResource {
|
|
|
38
39
|
|
|
39
40
|
export type PayoutMethodListResponsesCursorPage = CursorPage<PayoutMethodListResponse>;
|
|
40
41
|
|
|
42
|
+
/**
|
|
43
|
+
* The category of a payout destination.
|
|
44
|
+
*/
|
|
45
|
+
export type PayoutDestinationCategory =
|
|
46
|
+
| 'crypto'
|
|
47
|
+
| 'rtp'
|
|
48
|
+
| 'next_day_bank'
|
|
49
|
+
| 'bank_wire'
|
|
50
|
+
| 'digital_wallet'
|
|
51
|
+
| 'unknown';
|
|
52
|
+
|
|
41
53
|
/**
|
|
42
54
|
* An object representing an user's setup payout destination.
|
|
43
55
|
*/
|
|
44
56
|
export interface PayoutMethodRetrieveResponse {
|
|
45
57
|
/**
|
|
46
|
-
* The
|
|
58
|
+
* The unique identifier for the payout token.
|
|
47
59
|
*/
|
|
48
60
|
id: string;
|
|
49
61
|
|
|
@@ -59,7 +71,7 @@ export interface PayoutMethodRetrieveResponse {
|
|
|
59
71
|
company: PayoutMethodRetrieveResponse.Company | null;
|
|
60
72
|
|
|
61
73
|
/**
|
|
62
|
-
* The
|
|
74
|
+
* The datetime the payout token was created.
|
|
63
75
|
*/
|
|
64
76
|
created_at: string;
|
|
65
77
|
|
|
@@ -97,7 +109,7 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
97
109
|
*/
|
|
98
110
|
export interface Company {
|
|
99
111
|
/**
|
|
100
|
-
* The
|
|
112
|
+
* The unique identifier for the company.
|
|
101
113
|
*/
|
|
102
114
|
id: string;
|
|
103
115
|
}
|
|
@@ -109,7 +121,7 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
109
121
|
/**
|
|
110
122
|
* The category of the payout destination
|
|
111
123
|
*/
|
|
112
|
-
category:
|
|
124
|
+
category: PayoutMethodsAPI.PayoutDestinationCategory;
|
|
113
125
|
|
|
114
126
|
/**
|
|
115
127
|
* The country code of the payout destination
|
|
@@ -128,7 +140,7 @@ export namespace PayoutMethodRetrieveResponse {
|
|
|
128
140
|
*/
|
|
129
141
|
export interface PayoutMethodListResponse {
|
|
130
142
|
/**
|
|
131
|
-
* The
|
|
143
|
+
* The unique identifier for the payout token.
|
|
132
144
|
*/
|
|
133
145
|
id: string;
|
|
134
146
|
|
|
@@ -144,7 +156,7 @@ export interface PayoutMethodListResponse {
|
|
|
144
156
|
company: PayoutMethodListResponse.Company | null;
|
|
145
157
|
|
|
146
158
|
/**
|
|
147
|
-
* The
|
|
159
|
+
* The datetime the payout token was created.
|
|
148
160
|
*/
|
|
149
161
|
created_at: string;
|
|
150
162
|
|
|
@@ -182,7 +194,7 @@ export namespace PayoutMethodListResponse {
|
|
|
182
194
|
*/
|
|
183
195
|
export interface Company {
|
|
184
196
|
/**
|
|
185
|
-
* The
|
|
197
|
+
* The unique identifier for the company.
|
|
186
198
|
*/
|
|
187
199
|
id: string;
|
|
188
200
|
}
|
|
@@ -194,7 +206,7 @@ export namespace PayoutMethodListResponse {
|
|
|
194
206
|
/**
|
|
195
207
|
* The category of the payout destination
|
|
196
208
|
*/
|
|
197
|
-
category:
|
|
209
|
+
category: PayoutMethodsAPI.PayoutDestinationCategory;
|
|
198
210
|
|
|
199
211
|
/**
|
|
200
212
|
* The country code of the payout destination
|
|
@@ -232,6 +244,7 @@ export interface PayoutMethodListParams extends CursorPageParams {
|
|
|
232
244
|
|
|
233
245
|
export declare namespace PayoutMethods {
|
|
234
246
|
export {
|
|
247
|
+
type PayoutDestinationCategory as PayoutDestinationCategory,
|
|
235
248
|
type PayoutMethodRetrieveResponse as PayoutMethodRetrieveResponse,
|
|
236
249
|
type PayoutMethodListResponse as PayoutMethodListResponse,
|
|
237
250
|
type PayoutMethodListResponsesCursorPage as PayoutMethodListResponsesCursorPage,
|