@whop/sdk 0.0.26 → 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.
Files changed (219) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/client.d.mts +6 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +3 -3
  11. package/resources/access-tokens.d.mts +32 -51
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +32 -51
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +6 -8
  16. package/resources/access-tokens.js.map +1 -1
  17. package/resources/access-tokens.mjs +6 -8
  18. package/resources/access-tokens.mjs.map +1 -1
  19. package/resources/ai-chats.d.mts +37 -9
  20. package/resources/ai-chats.d.mts.map +1 -1
  21. package/resources/ai-chats.d.ts +37 -9
  22. package/resources/ai-chats.d.ts.map +1 -1
  23. package/resources/ai-chats.js +1 -1
  24. package/resources/ai-chats.js.map +1 -1
  25. package/resources/ai-chats.mjs +1 -1
  26. package/resources/ai-chats.mjs.map +1 -1
  27. package/resources/app-builds.d.mts +2 -2
  28. package/resources/app-builds.d.ts +2 -2
  29. package/resources/apps.d.mts +5 -4
  30. package/resources/apps.d.mts.map +1 -1
  31. package/resources/apps.d.ts +5 -4
  32. package/resources/apps.d.ts.map +1 -1
  33. package/resources/authorized-users.d.mts +6 -6
  34. package/resources/authorized-users.d.ts +6 -6
  35. package/resources/chat-channels.d.mts +1 -1
  36. package/resources/chat-channels.d.ts +1 -1
  37. package/resources/checkout-configurations.d.mts +24 -16
  38. package/resources/checkout-configurations.d.mts.map +1 -1
  39. package/resources/checkout-configurations.d.ts +24 -16
  40. package/resources/checkout-configurations.d.ts.map +1 -1
  41. package/resources/companies.d.mts +38 -25
  42. package/resources/companies.d.mts.map +1 -1
  43. package/resources/companies.d.ts +38 -25
  44. package/resources/companies.d.ts.map +1 -1
  45. package/resources/companies.js +7 -4
  46. package/resources/companies.js.map +1 -1
  47. package/resources/companies.mjs +7 -4
  48. package/resources/companies.mjs.map +1 -1
  49. package/resources/company-token-transactions.d.mts +10 -10
  50. package/resources/company-token-transactions.d.ts +10 -10
  51. package/resources/course-chapters.d.mts +3 -3
  52. package/resources/course-chapters.d.ts +3 -3
  53. package/resources/course-lessons.d.mts +15 -15
  54. package/resources/course-lessons.d.ts +15 -15
  55. package/resources/course-students.d.mts +6 -6
  56. package/resources/course-students.d.ts +6 -6
  57. package/resources/courses.d.mts +8 -8
  58. package/resources/courses.d.ts +8 -8
  59. package/resources/disputes.d.mts +20 -18
  60. package/resources/disputes.d.mts.map +1 -1
  61. package/resources/disputes.d.ts +20 -18
  62. package/resources/disputes.d.ts.map +1 -1
  63. package/resources/entries.d.mts +6 -6
  64. package/resources/entries.d.ts +6 -6
  65. package/resources/experiences.d.mts +6 -5
  66. package/resources/experiences.d.mts.map +1 -1
  67. package/resources/experiences.d.ts +6 -5
  68. package/resources/experiences.d.ts.map +1 -1
  69. package/resources/fee-markups.d.mts +6 -6
  70. package/resources/fee-markups.d.ts +6 -6
  71. package/resources/files.d.mts +2 -2
  72. package/resources/files.d.ts +2 -2
  73. package/resources/forum-posts.d.mts +8 -4
  74. package/resources/forum-posts.d.mts.map +1 -1
  75. package/resources/forum-posts.d.ts +8 -4
  76. package/resources/forum-posts.d.ts.map +1 -1
  77. package/resources/forums.d.mts +1 -1
  78. package/resources/forums.d.ts +1 -1
  79. package/resources/index.d.mts +1 -1
  80. package/resources/index.d.mts.map +1 -1
  81. package/resources/index.d.ts +1 -1
  82. package/resources/index.d.ts.map +1 -1
  83. package/resources/index.js.map +1 -1
  84. package/resources/index.mjs.map +1 -1
  85. package/resources/invoices.d.mts +28 -20
  86. package/resources/invoices.d.mts.map +1 -1
  87. package/resources/invoices.d.ts +28 -20
  88. package/resources/invoices.d.ts.map +1 -1
  89. package/resources/leads.d.mts +12 -12
  90. package/resources/leads.d.ts +12 -12
  91. package/resources/ledger-accounts.d.mts +9 -7
  92. package/resources/ledger-accounts.d.mts.map +1 -1
  93. package/resources/ledger-accounts.d.ts +9 -7
  94. package/resources/ledger-accounts.d.ts.map +1 -1
  95. package/resources/members.d.mts +9 -9
  96. package/resources/members.d.ts +9 -9
  97. package/resources/memberships.d.mts +17 -12
  98. package/resources/memberships.d.mts.map +1 -1
  99. package/resources/memberships.d.ts +17 -12
  100. package/resources/memberships.d.ts.map +1 -1
  101. package/resources/messages.d.mts +7 -3
  102. package/resources/messages.d.mts.map +1 -1
  103. package/resources/messages.d.ts +7 -3
  104. package/resources/messages.d.ts.map +1 -1
  105. package/resources/payments.d.mts +27 -20
  106. package/resources/payments.d.mts.map +1 -1
  107. package/resources/payments.d.ts +27 -20
  108. package/resources/payments.d.ts.map +1 -1
  109. package/resources/payout-methods.d.mts +6 -6
  110. package/resources/payout-methods.d.ts +6 -6
  111. package/resources/plans.d.mts +34 -24
  112. package/resources/plans.d.mts.map +1 -1
  113. package/resources/plans.d.ts +34 -24
  114. package/resources/plans.d.ts.map +1 -1
  115. package/resources/products.d.mts +4 -2
  116. package/resources/products.d.mts.map +1 -1
  117. package/resources/products.d.ts +4 -2
  118. package/resources/products.d.ts.map +1 -1
  119. package/resources/promo-codes.d.mts +22 -12
  120. package/resources/promo-codes.d.mts.map +1 -1
  121. package/resources/promo-codes.d.ts +22 -12
  122. package/resources/promo-codes.d.ts.map +1 -1
  123. package/resources/reactions.d.mts +1 -1
  124. package/resources/reactions.d.ts +1 -1
  125. package/resources/refunds.d.mts +19 -15
  126. package/resources/refunds.d.mts.map +1 -1
  127. package/resources/refunds.d.ts +19 -15
  128. package/resources/refunds.d.ts.map +1 -1
  129. package/resources/reviews.d.mts +10 -10
  130. package/resources/reviews.d.ts +10 -10
  131. package/resources/setup-intents.d.mts +18 -20
  132. package/resources/setup-intents.d.mts.map +1 -1
  133. package/resources/setup-intents.d.ts +18 -20
  134. package/resources/setup-intents.d.ts.map +1 -1
  135. package/resources/shared.d.mts +175 -137
  136. package/resources/shared.d.mts.map +1 -1
  137. package/resources/shared.d.ts +175 -137
  138. package/resources/shared.d.ts.map +1 -1
  139. package/resources/shipments.d.mts +4 -4
  140. package/resources/shipments.d.ts +4 -4
  141. package/resources/support-channels.d.mts +1 -1
  142. package/resources/support-channels.d.ts +1 -1
  143. package/resources/topups.d.mts +6 -4
  144. package/resources/topups.d.mts.map +1 -1
  145. package/resources/topups.d.ts +6 -4
  146. package/resources/topups.d.ts.map +1 -1
  147. package/resources/transfers.d.mts +8 -5
  148. package/resources/transfers.d.mts.map +1 -1
  149. package/resources/transfers.d.ts +8 -5
  150. package/resources/transfers.d.ts.map +1 -1
  151. package/resources/users.d.mts +46 -8
  152. package/resources/users.d.mts.map +1 -1
  153. package/resources/users.d.ts +46 -8
  154. package/resources/users.d.ts.map +1 -1
  155. package/resources/users.js +10 -0
  156. package/resources/users.js.map +1 -1
  157. package/resources/users.mjs +10 -0
  158. package/resources/users.mjs.map +1 -1
  159. package/resources/verifications.d.mts +1 -1
  160. package/resources/verifications.d.ts +1 -1
  161. package/resources/webhooks.d.mts +71 -57
  162. package/resources/webhooks.d.mts.map +1 -1
  163. package/resources/webhooks.d.ts +71 -57
  164. package/resources/webhooks.d.ts.map +1 -1
  165. package/resources/withdrawals.d.mts +15 -11
  166. package/resources/withdrawals.d.mts.map +1 -1
  167. package/resources/withdrawals.d.ts +15 -11
  168. package/resources/withdrawals.d.ts.map +1 -1
  169. package/src/client.ts +20 -8
  170. package/src/resources/access-tokens.ts +35 -56
  171. package/src/resources/ai-chats.ts +42 -9
  172. package/src/resources/app-builds.ts +2 -2
  173. package/src/resources/apps.ts +5 -4
  174. package/src/resources/authorized-users.ts +6 -6
  175. package/src/resources/chat-channels.ts +1 -1
  176. package/src/resources/checkout-configurations.ts +24 -16
  177. package/src/resources/companies.ts +41 -26
  178. package/src/resources/company-token-transactions.ts +10 -10
  179. package/src/resources/course-chapters.ts +3 -3
  180. package/src/resources/course-lessons.ts +15 -15
  181. package/src/resources/course-students.ts +6 -6
  182. package/src/resources/courses.ts +8 -8
  183. package/src/resources/disputes.ts +20 -18
  184. package/src/resources/entries.ts +6 -6
  185. package/src/resources/experiences.ts +6 -5
  186. package/src/resources/fee-markups.ts +6 -6
  187. package/src/resources/files.ts +2 -2
  188. package/src/resources/forum-posts.ts +8 -4
  189. package/src/resources/forums.ts +1 -1
  190. package/src/resources/index.ts +2 -1
  191. package/src/resources/invoices.ts +28 -20
  192. package/src/resources/leads.ts +12 -12
  193. package/src/resources/ledger-accounts.ts +9 -7
  194. package/src/resources/members.ts +9 -9
  195. package/src/resources/memberships.ts +18 -12
  196. package/src/resources/messages.ts +7 -3
  197. package/src/resources/payments.ts +28 -18
  198. package/src/resources/payout-methods.ts +6 -6
  199. package/src/resources/plans.ts +34 -24
  200. package/src/resources/products.ts +4 -2
  201. package/src/resources/promo-codes.ts +22 -12
  202. package/src/resources/reactions.ts +1 -1
  203. package/src/resources/refunds.ts +20 -15
  204. package/src/resources/reviews.ts +10 -10
  205. package/src/resources/setup-intents.ts +18 -20
  206. package/src/resources/shared.ts +176 -137
  207. package/src/resources/shipments.ts +4 -4
  208. package/src/resources/support-channels.ts +1 -1
  209. package/src/resources/topups.ts +6 -4
  210. package/src/resources/transfers.ts +8 -5
  211. package/src/resources/users.ts +58 -8
  212. package/src/resources/verifications.ts +1 -1
  213. package/src/resources/webhooks.ts +71 -57
  214. package/src/resources/withdrawals.ts +15 -11
  215. package/src/version.ts +1 -1
  216. package/version.d.mts +1 -1
  217. package/version.d.ts +1 -1
  218. package/version.js +1 -1
  219. package/version.mjs +1 -1
@@ -94,7 +94,7 @@ export namespace ReactionListResponse {
94
94
  */
95
95
  export interface User {
96
96
  /**
97
- * The internal ID of the user.
97
+ * The unique identifier for the user.
98
98
  */
99
99
  id: string;
100
100
 
@@ -52,7 +52,8 @@ export type PaymentProvider =
52
52
  | 'splitit'
53
53
  | 'platform_balance'
54
54
  | 'multi_psp'
55
- | 'adyen';
55
+ | 'adyen'
56
+ | 'claritypay';
56
57
 
57
58
  /**
58
59
  * The status of the refund reference.
@@ -73,21 +74,23 @@ export type RefundReferenceType =
73
74
  export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
74
75
 
75
76
  /**
76
- * An object representing a refund made on a payment.
77
+ * A refund represents a full or partial reversal of a payment, including the
78
+ * amount, status, and payment provider.
77
79
  */
78
80
  export interface RefundRetrieveResponse {
79
81
  /**
80
- * The ID of the refund.
82
+ * The unique identifier for the refund.
81
83
  */
82
84
  id: string;
83
85
 
84
86
  /**
85
- * The amount of the refund.
87
+ * The amount of the refund. Provided as a number in the specified currency. Eg:
88
+ * 10.43 for $10.43 USD.
86
89
  */
87
90
  amount: number;
88
91
 
89
92
  /**
90
- * The time the refund was created.
93
+ * The datetime the refund was created.
91
94
  */
92
95
  created_at: string;
93
96
 
@@ -138,7 +141,7 @@ export namespace RefundRetrieveResponse {
138
141
  */
139
142
  export interface Payment {
140
143
  /**
141
- * The payment ID
144
+ * The unique identifier for the payment.
142
145
  */
143
146
  id: string;
144
147
 
@@ -158,7 +161,7 @@ export namespace RefundRetrieveResponse {
158
161
  card_last4: string | null;
159
162
 
160
163
  /**
161
- * The datetime the payment was created
164
+ * The datetime the payment was created.
162
165
  */
163
166
  created_at: string;
164
167
 
@@ -219,7 +222,7 @@ export namespace RefundRetrieveResponse {
219
222
  */
220
223
  export interface Member {
221
224
  /**
222
- * The ID of the member
225
+ * The unique identifier for the company member.
223
226
  */
224
227
  id: string;
225
228
 
@@ -234,7 +237,7 @@ export namespace RefundRetrieveResponse {
234
237
  */
235
238
  export interface Membership {
236
239
  /**
237
- * The internal ID of the membership.
240
+ * The unique identifier for the membership.
238
241
  */
239
242
  id: string;
240
243
 
@@ -249,7 +252,7 @@ export namespace RefundRetrieveResponse {
249
252
  */
250
253
  export interface User {
251
254
  /**
252
- * The internal ID of the user.
255
+ * The unique identifier for the user.
253
256
  */
254
257
  id: string;
255
258
 
@@ -272,21 +275,23 @@ export namespace RefundRetrieveResponse {
272
275
  }
273
276
 
274
277
  /**
275
- * An object representing a refund made on a payment.
278
+ * A refund represents a full or partial reversal of a payment, including the
279
+ * amount, status, and payment provider.
276
280
  */
277
281
  export interface RefundListResponse {
278
282
  /**
279
- * The ID of the refund.
283
+ * The unique identifier for the refund.
280
284
  */
281
285
  id: string;
282
286
 
283
287
  /**
284
- * The amount of the refund.
288
+ * The amount of the refund. Provided as a number in the specified currency. Eg:
289
+ * 10.43 for $10.43 USD.
285
290
  */
286
291
  amount: number;
287
292
 
288
293
  /**
289
- * The time the refund was created.
294
+ * The datetime the refund was created.
290
295
  */
291
296
  created_at: string;
292
297
 
@@ -337,7 +342,7 @@ export namespace RefundListResponse {
337
342
  */
338
343
  export interface Payment {
339
344
  /**
340
- * The payment ID
345
+ * The unique identifier for the payment.
341
346
  */
342
347
  id: string;
343
348
  }
@@ -37,7 +37,7 @@ export type ReviewStatus = 'pending' | 'published' | 'removed';
37
37
  */
38
38
  export interface ReviewRetrieveResponse {
39
39
  /**
40
- * The internal ID of the review.
40
+ * The unique identifier for the review.
41
41
  */
42
42
  id: string;
43
43
 
@@ -52,7 +52,7 @@ export interface ReviewRetrieveResponse {
52
52
  company: ReviewRetrieveResponse.Company;
53
53
 
54
54
  /**
55
- * The timestamp of when the review was created.
55
+ * The datetime the review was created.
56
56
  */
57
57
  created_at: string;
58
58
 
@@ -98,7 +98,7 @@ export interface ReviewRetrieveResponse {
98
98
  title: string | null;
99
99
 
100
100
  /**
101
- * The timestamp of when the review was last updated.
101
+ * The datetime the review was last updated.
102
102
  */
103
103
  updated_at: string;
104
104
 
@@ -140,7 +140,7 @@ export namespace ReviewRetrieveResponse {
140
140
  */
141
141
  export interface Company {
142
142
  /**
143
- * The ID (tag) of the company.
143
+ * The unique identifier for the company.
144
144
  */
145
145
  id: string;
146
146
 
@@ -160,7 +160,7 @@ export namespace ReviewRetrieveResponse {
160
160
  */
161
161
  export interface Product {
162
162
  /**
163
- * The internal ID of the public product.
163
+ * The unique identifier for the product.
164
164
  */
165
165
  id: string;
166
166
 
@@ -175,7 +175,7 @@ export namespace ReviewRetrieveResponse {
175
175
  */
176
176
  export interface User {
177
177
  /**
178
- * The internal ID of the user.
178
+ * The unique identifier for the user.
179
179
  */
180
180
  id: string;
181
181
 
@@ -196,7 +196,7 @@ export namespace ReviewRetrieveResponse {
196
196
  */
197
197
  export interface ReviewListResponse {
198
198
  /**
199
- * The internal ID of the review.
199
+ * The unique identifier for the review.
200
200
  */
201
201
  id: string;
202
202
 
@@ -206,7 +206,7 @@ export interface ReviewListResponse {
206
206
  attachments: Array<ReviewListResponse.Attachment>;
207
207
 
208
208
  /**
209
- * The timestamp of when the review was created.
209
+ * The datetime the review was created.
210
210
  */
211
211
  created_at: string;
212
212
 
@@ -247,7 +247,7 @@ export interface ReviewListResponse {
247
247
  title: string | null;
248
248
 
249
249
  /**
250
- * The timestamp of when the review was last updated.
250
+ * The datetime the review was last updated.
251
251
  */
252
252
  updated_at: string;
253
253
 
@@ -289,7 +289,7 @@ export namespace ReviewListResponse {
289
289
  */
290
290
  export interface User {
291
291
  /**
292
- * The internal ID of the user.
292
+ * The unique identifier for the user.
293
293
  */
294
294
  id: string;
295
295
 
@@ -53,12 +53,11 @@ export class SetupIntents extends APIResource {
53
53
  export type SetupIntentListResponsesCursorPage = CursorPage<SetupIntentListResponse>;
54
54
 
55
55
  /**
56
- * An object representing a setup intent, which is a flow for allowing a customer
57
- * to add a payment method to their account without making a purchase.
56
+ * A setup intent allows a user to save a payment method without making a purchase.
58
57
  */
59
58
  export interface SetupIntent {
60
59
  /**
61
- * The setup intent ID
60
+ * The unique identifier for the setup intent.
62
61
  */
63
62
  id: string;
64
63
 
@@ -73,7 +72,7 @@ export interface SetupIntent {
73
72
  company: SetupIntent.Company | null;
74
73
 
75
74
  /**
76
- * The datetime the payment was created
75
+ * The datetime the setup intent was created.
77
76
  */
78
77
  created_at: string;
79
78
 
@@ -109,7 +108,7 @@ export namespace SetupIntent {
109
108
  */
110
109
  export interface CheckoutConfiguration {
111
110
  /**
112
- * The ID of the checkout configuration
111
+ * The unique identifier for the checkout session.
113
112
  */
114
113
  id: string;
115
114
  }
@@ -119,7 +118,7 @@ export namespace SetupIntent {
119
118
  */
120
119
  export interface Company {
121
120
  /**
122
- * The ID (tag) of the company.
121
+ * The unique identifier for the company.
123
122
  */
124
123
  id: string;
125
124
  }
@@ -129,7 +128,7 @@ export namespace SetupIntent {
129
128
  */
130
129
  export interface Member {
131
130
  /**
132
- * The ID of the member
131
+ * The unique identifier for the company member.
133
132
  */
134
133
  id: string;
135
134
 
@@ -145,7 +144,7 @@ export namespace SetupIntent {
145
144
  */
146
145
  export interface User {
147
146
  /**
148
- * The internal ID of the user account.
147
+ * The unique identifier for the company member user.
149
148
  */
150
149
  id: string;
151
150
 
@@ -171,7 +170,7 @@ export namespace SetupIntent {
171
170
  */
172
171
  export interface PaymentMethod {
173
172
  /**
174
- * The ID of the payment method
173
+ * The unique identifier for the payment token.
175
174
  */
176
175
  id: string;
177
176
 
@@ -181,7 +180,7 @@ export namespace SetupIntent {
181
180
  card: PaymentMethod.Card | null;
182
181
 
183
182
  /**
184
- * The date and time the payment method was created
183
+ * The datetime the payment token was created.
185
184
  */
186
185
  created_at: string;
187
186
 
@@ -225,12 +224,11 @@ export namespace SetupIntent {
225
224
  export type SetupIntentStatus = 'processing' | 'succeeded' | 'canceled' | 'requires_action';
226
225
 
227
226
  /**
228
- * An object representing a setup intent, which is a flow for allowing a customer
229
- * to add a payment method to their account without making a purchase.
227
+ * A setup intent allows a user to save a payment method without making a purchase.
230
228
  */
231
229
  export interface SetupIntentListResponse {
232
230
  /**
233
- * The setup intent ID
231
+ * The unique identifier for the setup intent.
234
232
  */
235
233
  id: string;
236
234
 
@@ -245,7 +243,7 @@ export interface SetupIntentListResponse {
245
243
  company: SetupIntentListResponse.Company | null;
246
244
 
247
245
  /**
248
- * The datetime the payment was created
246
+ * The datetime the setup intent was created.
249
247
  */
250
248
  created_at: string;
251
249
 
@@ -281,7 +279,7 @@ export namespace SetupIntentListResponse {
281
279
  */
282
280
  export interface CheckoutConfiguration {
283
281
  /**
284
- * The ID of the checkout configuration
282
+ * The unique identifier for the checkout session.
285
283
  */
286
284
  id: string;
287
285
  }
@@ -291,7 +289,7 @@ export namespace SetupIntentListResponse {
291
289
  */
292
290
  export interface Company {
293
291
  /**
294
- * The ID (tag) of the company.
292
+ * The unique identifier for the company.
295
293
  */
296
294
  id: string;
297
295
  }
@@ -301,7 +299,7 @@ export namespace SetupIntentListResponse {
301
299
  */
302
300
  export interface Member {
303
301
  /**
304
- * The ID of the member
302
+ * The unique identifier for the company member.
305
303
  */
306
304
  id: string;
307
305
 
@@ -317,7 +315,7 @@ export namespace SetupIntentListResponse {
317
315
  */
318
316
  export interface User {
319
317
  /**
320
- * The internal ID of the user account.
318
+ * The unique identifier for the company member user.
321
319
  */
322
320
  id: string;
323
321
 
@@ -343,7 +341,7 @@ export namespace SetupIntentListResponse {
343
341
  */
344
342
  export interface PaymentMethod {
345
343
  /**
346
- * The ID of the payment method
344
+ * The unique identifier for the payment token.
347
345
  */
348
346
  id: string;
349
347
 
@@ -353,7 +351,7 @@ export namespace SetupIntentListResponse {
353
351
  card: PaymentMethod.Card | null;
354
352
 
355
353
  /**
356
- * The date and time the payment method was created
354
+ * The datetime the payment token was created.
357
355
  */
358
356
  created_at: string;
359
357