@whop/sdk 0.0.24 → 0.0.26

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.
Files changed (181) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +30 -18
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +30 -18
  6. package/client.d.ts.map +1 -1
  7. package/client.js +15 -2
  8. package/client.js.map +1 -1
  9. package/client.mjs +17 -4
  10. package/client.mjs.map +1 -1
  11. package/internal/parse.d.mts.map +1 -1
  12. package/internal/parse.d.ts.map +1 -1
  13. package/internal/parse.js +5 -0
  14. package/internal/parse.js.map +1 -1
  15. package/internal/parse.mjs +5 -0
  16. package/internal/parse.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/ai-chats.d.mts +169 -0
  19. package/resources/ai-chats.d.mts.map +1 -0
  20. package/resources/ai-chats.d.ts +169 -0
  21. package/resources/ai-chats.d.ts.map +1 -0
  22. package/resources/ai-chats.js +53 -0
  23. package/resources/ai-chats.js.map +1 -0
  24. package/resources/ai-chats.mjs +49 -0
  25. package/resources/ai-chats.mjs.map +1 -0
  26. package/resources/apps.d.mts +1 -1
  27. package/resources/apps.d.mts.map +1 -1
  28. package/resources/apps.d.ts +1 -1
  29. package/resources/apps.d.ts.map +1 -1
  30. package/resources/authorized-users.d.mts +39 -5
  31. package/resources/authorized-users.d.mts.map +1 -1
  32. package/resources/authorized-users.d.ts +39 -5
  33. package/resources/authorized-users.d.ts.map +1 -1
  34. package/resources/authorized-users.js +1 -1
  35. package/resources/authorized-users.js.map +1 -1
  36. package/resources/authorized-users.mjs +1 -1
  37. package/resources/authorized-users.mjs.map +1 -1
  38. package/resources/checkout-configurations.d.mts +12 -0
  39. package/resources/checkout-configurations.d.mts.map +1 -1
  40. package/resources/checkout-configurations.d.ts +12 -0
  41. package/resources/checkout-configurations.d.ts.map +1 -1
  42. package/resources/company-token-transactions.d.mts +339 -0
  43. package/resources/company-token-transactions.d.mts.map +1 -0
  44. package/resources/company-token-transactions.d.ts +339 -0
  45. package/resources/company-token-transactions.d.ts.map +1 -0
  46. package/resources/company-token-transactions.js +59 -0
  47. package/resources/company-token-transactions.js.map +1 -0
  48. package/resources/company-token-transactions.mjs +55 -0
  49. package/resources/company-token-transactions.mjs.map +1 -0
  50. package/resources/dm-channels.d.mts +161 -0
  51. package/resources/dm-channels.d.mts.map +1 -0
  52. package/resources/dm-channels.d.ts +161 -0
  53. package/resources/dm-channels.d.ts.map +1 -0
  54. package/resources/dm-channels.js +87 -0
  55. package/resources/dm-channels.js.map +1 -0
  56. package/resources/dm-channels.mjs +83 -0
  57. package/resources/dm-channels.mjs.map +1 -0
  58. package/resources/dm-members.d.mts +190 -0
  59. package/resources/dm-members.d.mts.map +1 -0
  60. package/resources/dm-members.d.ts +190 -0
  61. package/resources/dm-members.d.ts.map +1 -0
  62. package/resources/dm-members.js +94 -0
  63. package/resources/dm-members.js.map +1 -0
  64. package/resources/dm-members.mjs +90 -0
  65. package/resources/dm-members.mjs.map +1 -0
  66. package/resources/files.d.mts +7 -3
  67. package/resources/files.d.mts.map +1 -1
  68. package/resources/files.d.ts +7 -3
  69. package/resources/files.d.ts.map +1 -1
  70. package/resources/index.d.mts +13 -9
  71. package/resources/index.d.mts.map +1 -1
  72. package/resources/index.d.ts +13 -9
  73. package/resources/index.d.ts.map +1 -1
  74. package/resources/index.js +9 -1
  75. package/resources/index.js.map +1 -1
  76. package/resources/index.mjs +6 -2
  77. package/resources/index.mjs.map +1 -1
  78. package/resources/leads.d.mts +9 -177
  79. package/resources/leads.d.mts.map +1 -1
  80. package/resources/leads.d.ts +9 -177
  81. package/resources/leads.d.ts.map +1 -1
  82. package/resources/ledger-accounts.d.mts +3 -2
  83. package/resources/ledger-accounts.d.mts.map +1 -1
  84. package/resources/ledger-accounts.d.ts +3 -2
  85. package/resources/ledger-accounts.d.ts.map +1 -1
  86. package/resources/ledger-accounts.js.map +1 -1
  87. package/resources/ledger-accounts.mjs.map +1 -1
  88. package/resources/members.d.mts +13 -5
  89. package/resources/members.d.mts.map +1 -1
  90. package/resources/members.d.ts +13 -5
  91. package/resources/members.d.ts.map +1 -1
  92. package/resources/members.js +1 -1
  93. package/resources/members.js.map +1 -1
  94. package/resources/members.mjs +1 -1
  95. package/resources/members.mjs.map +1 -1
  96. package/resources/memberships.d.mts +32 -2
  97. package/resources/memberships.d.mts.map +1 -1
  98. package/resources/memberships.d.ts +32 -2
  99. package/resources/memberships.d.ts.map +1 -1
  100. package/resources/memberships.js +18 -0
  101. package/resources/memberships.js.map +1 -1
  102. package/resources/memberships.mjs +18 -0
  103. package/resources/memberships.mjs.map +1 -1
  104. package/resources/messages.d.mts +17 -1
  105. package/resources/messages.d.mts.map +1 -1
  106. package/resources/messages.d.ts +17 -1
  107. package/resources/messages.d.ts.map +1 -1
  108. package/resources/messages.js +10 -0
  109. package/resources/messages.js.map +1 -1
  110. package/resources/messages.mjs +10 -0
  111. package/resources/messages.mjs.map +1 -1
  112. package/resources/payments.d.mts +42 -1
  113. package/resources/payments.d.mts.map +1 -1
  114. package/resources/payments.d.ts +42 -1
  115. package/resources/payments.d.ts.map +1 -1
  116. package/resources/payout-methods.d.mts +26 -3
  117. package/resources/payout-methods.d.mts.map +1 -1
  118. package/resources/payout-methods.d.ts +26 -3
  119. package/resources/payout-methods.d.ts.map +1 -1
  120. package/resources/payout-methods.js.map +1 -1
  121. package/resources/payout-methods.mjs.map +1 -1
  122. package/resources/reactions.d.mts +24 -1
  123. package/resources/reactions.d.mts.map +1 -1
  124. package/resources/reactions.d.ts +24 -1
  125. package/resources/reactions.d.ts.map +1 -1
  126. package/resources/reactions.js +11 -0
  127. package/resources/reactions.js.map +1 -1
  128. package/resources/reactions.mjs +11 -0
  129. package/resources/reactions.mjs.map +1 -1
  130. package/resources/refunds.d.mts +1 -1
  131. package/resources/refunds.d.mts.map +1 -1
  132. package/resources/refunds.d.ts +1 -1
  133. package/resources/refunds.d.ts.map +1 -1
  134. package/resources/shared.d.mts +73 -1
  135. package/resources/shared.d.mts.map +1 -1
  136. package/resources/shared.d.ts +73 -1
  137. package/resources/shared.d.ts.map +1 -1
  138. package/resources/verifications.d.mts +11 -3
  139. package/resources/verifications.d.mts.map +1 -1
  140. package/resources/verifications.d.ts +11 -3
  141. package/resources/verifications.d.ts.map +1 -1
  142. package/resources/webhooks.d.mts +43 -293
  143. package/resources/webhooks.d.mts.map +1 -1
  144. package/resources/webhooks.d.ts +43 -293
  145. package/resources/webhooks.d.ts.map +1 -1
  146. package/resources/webhooks.js.map +1 -1
  147. package/resources/webhooks.mjs +2 -2
  148. package/resources/webhooks.mjs.map +1 -1
  149. package/resources/withdrawals.d.mts +21 -128
  150. package/resources/withdrawals.d.mts.map +1 -1
  151. package/resources/withdrawals.d.ts +21 -128
  152. package/resources/withdrawals.d.ts.map +1 -1
  153. package/src/client.ts +133 -18
  154. package/src/internal/parse.ts +6 -0
  155. package/src/resources/ai-chats.ts +227 -0
  156. package/src/resources/apps.ts +6 -0
  157. package/src/resources/authorized-users.ts +45 -5
  158. package/src/resources/checkout-configurations.ts +15 -0
  159. package/src/resources/company-token-transactions.ts +433 -0
  160. package/src/resources/dm-channels.ts +212 -0
  161. package/src/resources/dm-members.ts +248 -0
  162. package/src/resources/files.ts +8 -2
  163. package/src/resources/index.ts +64 -9
  164. package/src/resources/leads.ts +9 -205
  165. package/src/resources/ledger-accounts.ts +3 -35
  166. package/src/resources/members.ts +16 -6
  167. package/src/resources/memberships.ts +45 -9
  168. package/src/resources/messages.ts +22 -0
  169. package/src/resources/payments.ts +109 -57
  170. package/src/resources/payout-methods.ts +37 -2
  171. package/src/resources/reactions.ts +36 -0
  172. package/src/resources/refunds.ts +2 -1
  173. package/src/resources/shared.ts +110 -11
  174. package/src/resources/verifications.ts +49 -36
  175. package/src/resources/webhooks.ts +78 -728
  176. package/src/resources/withdrawals.ts +29 -205
  177. package/src/version.ts +1 -1
  178. package/version.d.mts +1 -1
  179. package/version.d.ts +1 -1
  180. package/version.js +1 -1
  181. package/version.mjs +1 -1
@@ -0,0 +1,248 @@
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 DmMembers extends APIResource {
10
+ /**
11
+ * Adds a user to a DM channel
12
+ *
13
+ * Required permissions:
14
+ *
15
+ * - `dms:channel:manage`
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const dmMember = await client.dmMembers.create({
20
+ * channel_id: 'channel_id',
21
+ * user_id: 'user_xxxxxxxxxxxxx',
22
+ * });
23
+ * ```
24
+ */
25
+ create(body: DmMemberCreateParams, options?: RequestOptions): APIPromise<DmMember> {
26
+ return this._client.post('/dm_members', { body, ...options });
27
+ }
28
+
29
+ /**
30
+ * Retrieves a DM channel member
31
+ *
32
+ * Required permissions:
33
+ *
34
+ * - `dms:read`
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const dmMember = await client.dmMembers.retrieve('id');
39
+ * ```
40
+ */
41
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmMember> {
42
+ return this._client.get(path`/dm_members/${id}`, options);
43
+ }
44
+
45
+ /**
46
+ * Updates a DM channel member's settings
47
+ *
48
+ * Required permissions:
49
+ *
50
+ * - `dms:channel:manage`
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const dmMember = await client.dmMembers.update('id');
55
+ * ```
56
+ */
57
+ update(
58
+ id: string,
59
+ body: DmMemberUpdateParams | null | undefined = {},
60
+ options?: RequestOptions,
61
+ ): APIPromise<DmMember> {
62
+ return this._client.patch(path`/dm_members/${id}`, { body, ...options });
63
+ }
64
+
65
+ /**
66
+ * Lists members of a DM channel
67
+ *
68
+ * Required permissions:
69
+ *
70
+ * - `dms:read`
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * // Automatically fetches more pages as needed.
75
+ * for await (const dmMemberListResponse of client.dmMembers.list(
76
+ * { channel_id: 'channel_id' },
77
+ * )) {
78
+ * // ...
79
+ * }
80
+ * ```
81
+ */
82
+ list(
83
+ query: DmMemberListParams,
84
+ options?: RequestOptions,
85
+ ): PagePromise<DmMemberListResponsesCursorPage, DmMemberListResponse> {
86
+ return this._client.getAPIList('/dm_members', CursorPage<DmMemberListResponse>, { query, ...options });
87
+ }
88
+
89
+ /**
90
+ * Removes a user from a DM channel
91
+ *
92
+ * Required permissions:
93
+ *
94
+ * - `dms:channel:manage`
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const dmMember = await client.dmMembers.delete('id');
99
+ * ```
100
+ */
101
+ delete(id: string, options?: RequestOptions): APIPromise<DmMemberDeleteResponse> {
102
+ return this._client.delete(path`/dm_members/${id}`, options);
103
+ }
104
+ }
105
+
106
+ export type DmMemberListResponsesCursorPage = CursorPage<DmMemberListResponse>;
107
+
108
+ /**
109
+ * The notification preferences for a DMs feed member
110
+ */
111
+ export type DmFeedMemberNotificationPreferences = 'all' | 'mentions' | 'none';
112
+
113
+ /**
114
+ * The statuses of a DMs feed member
115
+ */
116
+ export type DmFeedMemberStatuses = 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
117
+
118
+ /**
119
+ * Represents a member of a DM channel
120
+ */
121
+ export interface DmMember {
122
+ /**
123
+ * The unique identifier for the entity
124
+ */
125
+ id: string;
126
+
127
+ /**
128
+ * The ID of the DM channel
129
+ */
130
+ channel_id: string;
131
+
132
+ /**
133
+ * Timestamp when the member last viewed the channel (in milliseconds since Unix
134
+ * epoch)
135
+ */
136
+ last_viewed_at: string | null;
137
+
138
+ /**
139
+ * The notification preference for this member (all, mentions, none)
140
+ */
141
+ notification_preference: DmFeedMemberNotificationPreferences;
142
+
143
+ /**
144
+ * The status of the membership (requested, accepted, rejected)
145
+ */
146
+ status: DmFeedMemberStatuses;
147
+
148
+ /**
149
+ * The ID of the user who is a member of the channel
150
+ */
151
+ user_id: string;
152
+ }
153
+
154
+ /**
155
+ * Represents a member of a DM channel
156
+ */
157
+ export interface DmMemberListResponse {
158
+ /**
159
+ * The unique identifier for the entity
160
+ */
161
+ id: string;
162
+
163
+ /**
164
+ * The ID of the DM channel
165
+ */
166
+ channel_id: string;
167
+
168
+ /**
169
+ * Timestamp when the member last viewed the channel (in milliseconds since Unix
170
+ * epoch)
171
+ */
172
+ last_viewed_at: string | null;
173
+
174
+ /**
175
+ * The status of the membership (requested, accepted, rejected)
176
+ */
177
+ status: DmFeedMemberStatuses;
178
+
179
+ /**
180
+ * The ID of the user who is a member of the channel
181
+ */
182
+ user_id: string;
183
+ }
184
+
185
+ /**
186
+ * Represents `true` or `false` values.
187
+ */
188
+ export type DmMemberDeleteResponse = boolean;
189
+
190
+ export interface DmMemberCreateParams {
191
+ /**
192
+ * The ID of the DM channel to add the member to
193
+ */
194
+ channel_id: string;
195
+
196
+ /**
197
+ * The ID of the user to add to the channel
198
+ */
199
+ user_id: string;
200
+ }
201
+
202
+ export interface DmMemberUpdateParams {
203
+ /**
204
+ * The notification preferences for a DMs feed member
205
+ */
206
+ notification_preference?: DmFeedMemberNotificationPreferences | null;
207
+
208
+ /**
209
+ * The statuses of a DMs feed member
210
+ */
211
+ status?: DmFeedMemberStatuses | null;
212
+ }
213
+
214
+ export interface DmMemberListParams extends CursorPageParams {
215
+ /**
216
+ * The ID of the DM channel to list members for
217
+ */
218
+ channel_id: string;
219
+
220
+ /**
221
+ * Returns the elements in the list that come before the specified cursor.
222
+ */
223
+ before?: string | null;
224
+
225
+ /**
226
+ * Returns the first _n_ elements from the list.
227
+ */
228
+ first?: number | null;
229
+
230
+ /**
231
+ * Returns the last _n_ elements from the list.
232
+ */
233
+ last?: number | null;
234
+ }
235
+
236
+ export declare namespace DmMembers {
237
+ export {
238
+ type DmFeedMemberNotificationPreferences as DmFeedMemberNotificationPreferences,
239
+ type DmFeedMemberStatuses as DmFeedMemberStatuses,
240
+ type DmMember as DmMember,
241
+ type DmMemberListResponse as DmMemberListResponse,
242
+ type DmMemberDeleteResponse as DmMemberDeleteResponse,
243
+ type DmMemberListResponsesCursorPage as DmMemberListResponsesCursorPage,
244
+ type DmMemberCreateParams as DmMemberCreateParams,
245
+ type DmMemberUpdateParams as DmMemberUpdateParams,
246
+ type DmMemberListParams as DmMemberListParams,
247
+ };
248
+ }
@@ -36,6 +36,11 @@ export class Files extends APIResource {
36
36
  }
37
37
  }
38
38
 
39
+ /**
40
+ * The upload status of a file
41
+ */
42
+ export type UploadStatus = 'pending' | 'processing' | 'ready' | 'failed';
43
+
39
44
  /**
40
45
  * A file that has been uploaded or is pending upload
41
46
  */
@@ -68,7 +73,7 @@ export interface FileCreateResponse {
68
73
  /**
69
74
  * The upload status of the file
70
75
  */
71
- upload_status: 'pending' | 'processing' | 'ready' | 'failed';
76
+ upload_status: UploadStatus;
72
77
 
73
78
  /**
74
79
  * The presigned URL to upload the file to (only on create)
@@ -108,7 +113,7 @@ export interface FileRetrieveResponse {
108
113
  /**
109
114
  * The upload status of the file
110
115
  */
111
- upload_status: 'pending' | 'processing' | 'ready' | 'failed';
116
+ upload_status: UploadStatus;
112
117
 
113
118
  /**
114
119
  * The URL to access the file
@@ -132,6 +137,7 @@ export interface FileUploadOptions extends RequestOptions {
132
137
 
133
138
  export declare namespace Files {
134
139
  export {
140
+ type UploadStatus as UploadStatus,
135
141
  type FileCreateResponse as FileCreateResponse,
136
142
  type FileRetrieveResponse as FileRetrieveResponse,
137
143
  type FileCreateParams as FileCreateParams,
@@ -1,6 +1,16 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export * from './shared';
4
+ export {
5
+ AIChats,
6
+ type AIChat,
7
+ type AIChatListResponse,
8
+ type AIChatDeleteResponse,
9
+ type AIChatCreateParams,
10
+ type AIChatUpdateParams,
11
+ type AIChatListParams,
12
+ type AIChatListResponsesCursorPage,
13
+ } from './ai-chats';
4
14
  export { AccessTokens, type AccessTokenCreateResponse, type AccessTokenCreateParams } from './access-tokens';
5
15
  export { AccountLinks, type AccountLinkCreateResponse, type AccountLinkCreateParams } from './account-links';
6
16
  export {
@@ -49,6 +59,15 @@ export {
49
59
  type CompanyListParams,
50
60
  type CompanyListResponsesCursorPage,
51
61
  } from './companies';
62
+ export {
63
+ CompanyTokenTransactions,
64
+ type BotTokenTransactionTypes,
65
+ type CompanyTokenTransaction,
66
+ type CompanyTokenTransactionListResponse,
67
+ type CompanyTokenTransactionCreateParams,
68
+ type CompanyTokenTransactionListParams,
69
+ type CompanyTokenTransactionListResponsesCursorPage,
70
+ } from './company-token-transactions';
52
71
  export {
53
72
  CourseChapters,
54
73
  type CourseChapter,
@@ -109,6 +128,28 @@ export {
109
128
  type DisputeUpdateEvidenceParams,
110
129
  type DisputeListResponsesCursorPage,
111
130
  } from './disputes';
131
+ export {
132
+ DmChannels,
133
+ type DmChannel,
134
+ type DmChannelListResponse,
135
+ type DmChannelDeleteResponse,
136
+ type DmChannelCreateParams,
137
+ type DmChannelUpdateParams,
138
+ type DmChannelListParams,
139
+ type DmChannelListResponsesCursorPage,
140
+ } from './dm-channels';
141
+ export {
142
+ DmMembers,
143
+ type DmFeedMemberNotificationPreferences,
144
+ type DmFeedMemberStatuses,
145
+ type DmMember,
146
+ type DmMemberListResponse,
147
+ type DmMemberDeleteResponse,
148
+ type DmMemberCreateParams,
149
+ type DmMemberUpdateParams,
150
+ type DmMemberListParams,
151
+ type DmMemberListResponsesCursorPage,
152
+ } from './dm-members';
112
153
  export {
113
154
  Entries,
114
155
  type EntryListResponse,
@@ -138,7 +179,13 @@ export {
138
179
  type FeeMarkupListParams,
139
180
  type FeeMarkupListResponsesCursorPage,
140
181
  } from './fee-markups';
141
- export { Files, type FileCreateResponse, type FileRetrieveResponse, type FileCreateParams } from './files';
182
+ export {
183
+ Files,
184
+ type UploadStatus,
185
+ type FileCreateResponse,
186
+ type FileRetrieveResponse,
187
+ type FileCreateParams,
188
+ } from './files';
142
189
  export {
143
190
  ForumPosts,
144
191
  type ForumPostVisibilityType,
@@ -163,9 +210,7 @@ export {
163
210
  } from './invoices';
164
211
  export {
165
212
  Leads,
166
- type LeadCreateResponse,
167
- type LeadRetrieveResponse,
168
- type LeadUpdateResponse,
213
+ type Lead,
169
214
  type LeadListResponse,
170
215
  type LeadCreateParams,
171
216
  type LeadUpdateParams,
@@ -182,6 +227,7 @@ export {
182
227
  } from './members';
183
228
  export {
184
229
  Memberships,
230
+ type CancelOptions,
185
231
  type MembershipListResponse,
186
232
  type MembershipUpdateParams,
187
233
  type MembershipListParams,
@@ -192,6 +238,7 @@ export {
192
238
  export {
193
239
  Messages,
194
240
  type MessageListResponse,
241
+ type MessageDeleteResponse,
195
242
  type MessageCreateParams,
196
243
  type MessageUpdateParams,
197
244
  type MessageListParams,
@@ -226,6 +273,7 @@ export {
226
273
  } from './payments';
227
274
  export {
228
275
  PayoutMethods,
276
+ type PayoutDestinationCategory,
229
277
  type PayoutMethodRetrieveResponse,
230
278
  type PayoutMethodListResponse,
231
279
  type PayoutMethodListParams,
@@ -261,8 +309,10 @@ export {
261
309
  export {
262
310
  Reactions,
263
311
  type ReactionListResponse,
312
+ type ReactionDeleteResponse,
264
313
  type ReactionCreateParams,
265
314
  type ReactionListParams,
315
+ type ReactionDeleteParams,
266
316
  type ReactionListResponsesCursorPage,
267
317
  } from './reactions';
268
318
  export {
@@ -320,12 +370,18 @@ export {
320
370
  type UserCheckAccessResponse,
321
371
  type UserCheckAccessParams,
322
372
  } from './users';
323
- export { Verifications, type VerificationRetrieveResponse } from './verifications';
373
+ export {
374
+ Verifications,
375
+ type VerificationErrorCode,
376
+ type VerificationStatus,
377
+ type VerificationRetrieveResponse,
378
+ } from './verifications';
324
379
  export {
325
380
  Webhooks,
381
+ type APIVersion,
382
+ type Webhook,
383
+ type WebhookEvent,
326
384
  type WebhookCreateResponse,
327
- type WebhookRetrieveResponse,
328
- type WebhookUpdateResponse,
329
385
  type WebhookListResponse,
330
386
  type WebhookDeleteResponse,
331
387
  type InvoiceCreatedWebhookEvent,
@@ -363,11 +419,10 @@ export {
363
419
  } from './webhooks';
364
420
  export {
365
421
  Withdrawals,
422
+ type Withdrawal,
366
423
  type WithdrawalFeeTypes,
367
424
  type WithdrawalSpeeds,
368
425
  type WithdrawalStatus,
369
- type WithdrawalCreateResponse,
370
- type WithdrawalRetrieveResponse,
371
426
  type WithdrawalListResponse,
372
427
  type WithdrawalCreateParams,
373
428
  type WithdrawalListParams,
@@ -24,7 +24,7 @@ export class Leads extends APIResource {
24
24
  * });
25
25
  * ```
26
26
  */
27
- create(body: LeadCreateParams, options?: RequestOptions): APIPromise<LeadCreateResponse> {
27
+ create(body: LeadCreateParams, options?: RequestOptions): APIPromise<Lead> {
28
28
  return this._client.post('/leads', { body, ...options });
29
29
  }
30
30
 
@@ -45,7 +45,7 @@ export class Leads extends APIResource {
45
45
  * );
46
46
  * ```
47
47
  */
48
- retrieve(id: string, options?: RequestOptions): APIPromise<LeadRetrieveResponse> {
48
+ retrieve(id: string, options?: RequestOptions): APIPromise<Lead> {
49
49
  return this._client.get(path`/leads/${id}`, options);
50
50
  }
51
51
 
@@ -70,7 +70,7 @@ export class Leads extends APIResource {
70
70
  id: string,
71
71
  body: LeadUpdateParams | null | undefined = {},
72
72
  options?: RequestOptions,
73
- ): APIPromise<LeadUpdateResponse> {
73
+ ): APIPromise<Lead> {
74
74
  return this._client.patch(path`/leads/${id}`, { body, ...options });
75
75
  }
76
76
 
@@ -107,7 +107,7 @@ export type LeadListResponsesCursorPage = CursorPage<LeadListResponse>;
107
107
  /**
108
108
  * An object representing a lead (someone who is interested in a whop).
109
109
  */
110
- export interface LeadCreateResponse {
110
+ export interface Lead {
111
111
  /**
112
112
  * The ID of the lead.
113
113
  */
@@ -121,7 +121,7 @@ export interface LeadCreateResponse {
121
121
  /**
122
122
  * The converted member, if any.
123
123
  */
124
- member: LeadCreateResponse.Member | null;
124
+ member: Lead.Member | null;
125
125
 
126
126
  /**
127
127
  * Custom metadata for the lead.
@@ -131,7 +131,7 @@ export interface LeadCreateResponse {
131
131
  /**
132
132
  * The access pass the lead is interested in, if available.
133
133
  */
134
- product: LeadCreateResponse.Product | null;
134
+ product: Lead.Product | null;
135
135
 
136
136
  /**
137
137
  * The referrer URL that brought this lead.
@@ -146,204 +146,10 @@ export interface LeadCreateResponse {
146
146
  /**
147
147
  * The user who is the lead.
148
148
  */
149
- user: LeadCreateResponse.User;
149
+ user: Lead.User;
150
150
  }
151
151
 
152
- export namespace LeadCreateResponse {
153
- /**
154
- * The converted member, if any.
155
- */
156
- export interface Member {
157
- /**
158
- * The ID of the member
159
- */
160
- id: string;
161
- }
162
-
163
- /**
164
- * The access pass the lead is interested in, if available.
165
- */
166
- export interface Product {
167
- /**
168
- * The internal ID of the public product.
169
- */
170
- id: string;
171
-
172
- /**
173
- * The title of the product. Use for Whop 4.0.
174
- */
175
- title: string;
176
- }
177
-
178
- /**
179
- * The user who is the lead.
180
- */
181
- export interface User {
182
- /**
183
- * The internal ID of the user.
184
- */
185
- id: string;
186
-
187
- /**
188
- * The email of the user
189
- */
190
- email: string | null;
191
-
192
- /**
193
- * The name of the user from their Whop account.
194
- */
195
- name: string | null;
196
-
197
- /**
198
- * The username of the user from their Whop account.
199
- */
200
- username: string;
201
- }
202
- }
203
-
204
- /**
205
- * An object representing a lead (someone who is interested in a whop).
206
- */
207
- export interface LeadRetrieveResponse {
208
- /**
209
- * The ID of the lead.
210
- */
211
- id: string;
212
-
213
- /**
214
- * The timestamp of when the lead was created.
215
- */
216
- created_at: string;
217
-
218
- /**
219
- * The converted member, if any.
220
- */
221
- member: LeadRetrieveResponse.Member | null;
222
-
223
- /**
224
- * Custom metadata for the lead.
225
- */
226
- metadata: { [key: string]: unknown } | null;
227
-
228
- /**
229
- * The access pass the lead is interested in, if available.
230
- */
231
- product: LeadRetrieveResponse.Product | null;
232
-
233
- /**
234
- * The referrer URL that brought this lead.
235
- */
236
- referrer: string | null;
237
-
238
- /**
239
- * The timestamp of when the lead was last updated.
240
- */
241
- updated_at: string;
242
-
243
- /**
244
- * The user who is the lead.
245
- */
246
- user: LeadRetrieveResponse.User;
247
- }
248
-
249
- export namespace LeadRetrieveResponse {
250
- /**
251
- * The converted member, if any.
252
- */
253
- export interface Member {
254
- /**
255
- * The ID of the member
256
- */
257
- id: string;
258
- }
259
-
260
- /**
261
- * The access pass the lead is interested in, if available.
262
- */
263
- export interface Product {
264
- /**
265
- * The internal ID of the public product.
266
- */
267
- id: string;
268
-
269
- /**
270
- * The title of the product. Use for Whop 4.0.
271
- */
272
- title: string;
273
- }
274
-
275
- /**
276
- * The user who is the lead.
277
- */
278
- export interface User {
279
- /**
280
- * The internal ID of the user.
281
- */
282
- id: string;
283
-
284
- /**
285
- * The email of the user
286
- */
287
- email: string | null;
288
-
289
- /**
290
- * The name of the user from their Whop account.
291
- */
292
- name: string | null;
293
-
294
- /**
295
- * The username of the user from their Whop account.
296
- */
297
- username: string;
298
- }
299
- }
300
-
301
- /**
302
- * An object representing a lead (someone who is interested in a whop).
303
- */
304
- export interface LeadUpdateResponse {
305
- /**
306
- * The ID of the lead.
307
- */
308
- id: string;
309
-
310
- /**
311
- * The timestamp of when the lead was created.
312
- */
313
- created_at: string;
314
-
315
- /**
316
- * The converted member, if any.
317
- */
318
- member: LeadUpdateResponse.Member | null;
319
-
320
- /**
321
- * Custom metadata for the lead.
322
- */
323
- metadata: { [key: string]: unknown } | null;
324
-
325
- /**
326
- * The access pass the lead is interested in, if available.
327
- */
328
- product: LeadUpdateResponse.Product | null;
329
-
330
- /**
331
- * The referrer URL that brought this lead.
332
- */
333
- referrer: string | null;
334
-
335
- /**
336
- * The timestamp of when the lead was last updated.
337
- */
338
- updated_at: string;
339
-
340
- /**
341
- * The user who is the lead.
342
- */
343
- user: LeadUpdateResponse.User;
344
- }
345
-
346
- export namespace LeadUpdateResponse {
152
+ export namespace Lead {
347
153
  /**
348
154
  * The converted member, if any.
349
155
  */
@@ -571,9 +377,7 @@ export interface LeadListParams extends CursorPageParams {
571
377
 
572
378
  export declare namespace Leads {
573
379
  export {
574
- type LeadCreateResponse as LeadCreateResponse,
575
- type LeadRetrieveResponse as LeadRetrieveResponse,
576
- type LeadUpdateResponse as LeadUpdateResponse,
380
+ type Lead as Lead,
577
381
  type LeadListResponse as LeadListResponse,
578
382
  type LeadListResponsesCursorPage as LeadListResponsesCursorPage,
579
383
  type LeadCreateParams as LeadCreateParams,