@whop/sdk 0.0.7 → 0.0.9

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 (162) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +19 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +19 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/account-links.d.mts +59 -0
  12. package/resources/account-links.d.mts.map +1 -0
  13. package/resources/account-links.d.ts +59 -0
  14. package/resources/account-links.d.ts.map +1 -0
  15. package/resources/account-links.js +27 -0
  16. package/resources/account-links.js.map +1 -0
  17. package/resources/account-links.mjs +23 -0
  18. package/resources/account-links.mjs.map +1 -0
  19. package/resources/app-builds.d.mts +8 -0
  20. package/resources/app-builds.d.mts.map +1 -1
  21. package/resources/app-builds.d.ts +8 -0
  22. package/resources/app-builds.d.ts.map +1 -1
  23. package/resources/apps.d.mts +18 -2
  24. package/resources/apps.d.mts.map +1 -1
  25. package/resources/apps.d.ts +18 -2
  26. package/resources/apps.d.ts.map +1 -1
  27. package/resources/authorized-users.d.mts +8 -0
  28. package/resources/authorized-users.d.mts.map +1 -1
  29. package/resources/authorized-users.d.ts +8 -0
  30. package/resources/authorized-users.d.ts.map +1 -1
  31. package/resources/checkout-configurations.d.mts +173 -8
  32. package/resources/checkout-configurations.d.mts.map +1 -1
  33. package/resources/checkout-configurations.d.ts +173 -8
  34. package/resources/checkout-configurations.d.ts.map +1 -1
  35. package/resources/checkout-configurations.js +1 -0
  36. package/resources/checkout-configurations.js.map +1 -1
  37. package/resources/checkout-configurations.mjs +1 -0
  38. package/resources/checkout-configurations.mjs.map +1 -1
  39. package/resources/companies.d.mts +8 -0
  40. package/resources/companies.d.mts.map +1 -1
  41. package/resources/companies.d.ts +8 -0
  42. package/resources/companies.d.ts.map +1 -1
  43. package/resources/course-lessons.d.mts +199 -1
  44. package/resources/course-lessons.d.mts.map +1 -1
  45. package/resources/course-lessons.d.ts +199 -1
  46. package/resources/course-lessons.d.ts.map +1 -1
  47. package/resources/course-lessons.js +40 -0
  48. package/resources/course-lessons.js.map +1 -1
  49. package/resources/course-lessons.mjs +40 -0
  50. package/resources/course-lessons.mjs.map +1 -1
  51. package/resources/courses.d.mts +8 -0
  52. package/resources/courses.d.mts.map +1 -1
  53. package/resources/courses.d.ts +8 -0
  54. package/resources/courses.d.ts.map +1 -1
  55. package/resources/disputes.d.mts +8 -0
  56. package/resources/disputes.d.mts.map +1 -1
  57. package/resources/disputes.d.ts +8 -0
  58. package/resources/disputes.d.ts.map +1 -1
  59. package/resources/entries.d.mts +8 -0
  60. package/resources/entries.d.mts.map +1 -1
  61. package/resources/entries.d.ts +8 -0
  62. package/resources/entries.d.ts.map +1 -1
  63. package/resources/experiences.d.mts +8 -0
  64. package/resources/experiences.d.mts.map +1 -1
  65. package/resources/experiences.d.ts +8 -0
  66. package/resources/experiences.d.ts.map +1 -1
  67. package/resources/forum-posts.d.mts +7 -3
  68. package/resources/forum-posts.d.mts.map +1 -1
  69. package/resources/forum-posts.d.ts +7 -3
  70. package/resources/forum-posts.d.ts.map +1 -1
  71. package/resources/index.d.mts +8 -5
  72. package/resources/index.d.mts.map +1 -1
  73. package/resources/index.d.ts +8 -5
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +7 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +3 -0
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/invoices.d.mts +8 -0
  80. package/resources/invoices.d.mts.map +1 -1
  81. package/resources/invoices.d.ts +8 -0
  82. package/resources/invoices.d.ts.map +1 -1
  83. package/resources/payments.d.mts +1 -1
  84. package/resources/payments.d.mts.map +1 -1
  85. package/resources/payments.d.ts +1 -1
  86. package/resources/payments.d.ts.map +1 -1
  87. package/resources/plans.d.mts +9 -11
  88. package/resources/plans.d.mts.map +1 -1
  89. package/resources/plans.d.ts +9 -11
  90. package/resources/plans.d.ts.map +1 -1
  91. package/resources/products.d.mts +8 -26
  92. package/resources/products.d.mts.map +1 -1
  93. package/resources/products.d.ts +8 -26
  94. package/resources/products.d.ts.map +1 -1
  95. package/resources/promo-codes.d.mts +8 -0
  96. package/resources/promo-codes.d.mts.map +1 -1
  97. package/resources/promo-codes.d.ts +8 -0
  98. package/resources/promo-codes.d.ts.map +1 -1
  99. package/resources/refunds.d.mts +303 -0
  100. package/resources/refunds.d.mts.map +1 -0
  101. package/resources/refunds.d.ts +303 -0
  102. package/resources/refunds.d.ts.map +1 -0
  103. package/resources/refunds.js +34 -0
  104. package/resources/refunds.js.map +1 -0
  105. package/resources/refunds.mjs +30 -0
  106. package/resources/refunds.mjs.map +1 -0
  107. package/resources/reviews.d.mts +8 -0
  108. package/resources/reviews.d.mts.map +1 -1
  109. package/resources/reviews.d.ts +8 -0
  110. package/resources/reviews.d.ts.map +1 -1
  111. package/resources/shared.d.mts +43 -2
  112. package/resources/shared.d.mts.map +1 -1
  113. package/resources/shared.d.ts +43 -2
  114. package/resources/shared.d.ts.map +1 -1
  115. package/resources/transfers.d.mts +8 -0
  116. package/resources/transfers.d.mts.map +1 -1
  117. package/resources/transfers.d.ts +8 -0
  118. package/resources/transfers.d.ts.map +1 -1
  119. package/resources/webhooks.d.mts +382 -2
  120. package/resources/webhooks.d.mts.map +1 -1
  121. package/resources/webhooks.d.ts +382 -2
  122. package/resources/webhooks.d.ts.map +1 -1
  123. package/resources/webhooks.js.map +1 -1
  124. package/resources/webhooks.mjs.map +1 -1
  125. package/resources/withdrawals.d.mts +233 -0
  126. package/resources/withdrawals.d.mts.map +1 -0
  127. package/resources/withdrawals.d.ts +233 -0
  128. package/resources/withdrawals.d.ts.map +1 -0
  129. package/resources/withdrawals.js +31 -0
  130. package/resources/withdrawals.js.map +1 -0
  131. package/resources/withdrawals.mjs +27 -0
  132. package/resources/withdrawals.mjs.map +1 -0
  133. package/src/client.ts +77 -0
  134. package/src/resources/account-links.ts +73 -0
  135. package/src/resources/app-builds.ts +10 -0
  136. package/src/resources/apps.ts +22 -0
  137. package/src/resources/authorized-users.ts +10 -0
  138. package/src/resources/checkout-configurations.ts +199 -8
  139. package/src/resources/companies.ts +10 -0
  140. package/src/resources/course-lessons.ts +250 -0
  141. package/src/resources/courses.ts +10 -0
  142. package/src/resources/disputes.ts +10 -0
  143. package/src/resources/entries.ts +10 -0
  144. package/src/resources/experiences.ts +10 -0
  145. package/src/resources/forum-posts.ts +8 -2
  146. package/src/resources/index.ts +32 -0
  147. package/src/resources/invoices.ts +10 -0
  148. package/src/resources/payments.ts +1 -0
  149. package/src/resources/plans.ts +11 -13
  150. package/src/resources/products.ts +10 -32
  151. package/src/resources/promo-codes.ts +10 -0
  152. package/src/resources/refunds.ts +393 -0
  153. package/src/resources/reviews.ts +10 -0
  154. package/src/resources/shared.ts +49 -2
  155. package/src/resources/transfers.ts +10 -0
  156. package/src/resources/webhooks.ts +463 -1
  157. package/src/resources/withdrawals.ts +361 -0
  158. package/src/version.ts +1 -1
  159. package/version.d.mts +1 -1
  160. package/version.d.ts +1 -1
  161. package/version.js +1 -1
  162. package/version.mjs +1 -1
@@ -85,6 +85,11 @@ export class ForumPosts extends APIResource {
85
85
 
86
86
  export type ForumPostListResponsesCursorPage = CursorPage<ForumPostListResponse>;
87
87
 
88
+ /**
89
+ * The visibility types for forum posts
90
+ */
91
+ export type ForumPostVisibilityType = 'members_only' | 'globally_visible';
92
+
88
93
  /**
89
94
  * Represents a post in forum
90
95
  */
@@ -238,7 +243,7 @@ export interface ForumPostCreateParams {
238
243
  /**
239
244
  * The visibility types for forum posts
240
245
  */
241
- visibility?: 'members_only' | 'globally_visible' | null;
246
+ visibility?: ForumPostVisibilityType | null;
242
247
  }
243
248
 
244
249
  export namespace ForumPostCreateParams {
@@ -321,7 +326,7 @@ export interface ForumPostUpdateParams {
321
326
  /**
322
327
  * The visibility types for forum posts
323
328
  */
324
- visibility?: 'members_only' | 'globally_visible' | null;
329
+ visibility?: ForumPostVisibilityType | null;
325
330
  }
326
331
 
327
332
  export namespace ForumPostUpdateParams {
@@ -384,6 +389,7 @@ export interface ForumPostListParams extends CursorPageParams {
384
389
 
385
390
  export declare namespace ForumPosts {
386
391
  export {
392
+ type ForumPostVisibilityType as ForumPostVisibilityType,
387
393
  type ForumPostListResponse as ForumPostListResponse,
388
394
  type ForumPostListResponsesCursorPage as ForumPostListResponsesCursorPage,
389
395
  type ForumPostCreateParams as ForumPostCreateParams,
@@ -2,6 +2,7 @@
2
2
 
3
3
  export * from './shared';
4
4
  export { AccessTokens, type AccessTokenCreateResponse, type AccessTokenCreateParams } from './access-tokens';
5
+ export { AccountLinks, type AccountLinkCreateResponse, type AccountLinkCreateParams } from './account-links';
5
6
  export {
6
7
  AppBuilds,
7
8
  type AppBuildListResponse,
@@ -11,6 +12,7 @@ export {
11
12
  } from './app-builds';
12
13
  export {
13
14
  Apps,
15
+ type AppType,
14
16
  type AppListResponse,
15
17
  type AppCreateParams,
16
18
  type AppUpdateParams,
@@ -33,6 +35,7 @@ export {
33
35
  } from './chat-channels';
34
36
  export {
35
37
  CheckoutConfigurations,
38
+ type CheckoutModes,
36
39
  type CheckoutConfigurationListResponse,
37
40
  type CheckoutConfigurationCreateParams,
38
41
  type CheckoutConfigurationListParams,
@@ -68,9 +71,13 @@ export {
68
71
  type LessonVisibilities,
69
72
  type CourseLessonListResponse,
70
73
  type CourseLessonDeleteResponse,
74
+ type CourseLessonMarkAsCompletedResponse,
75
+ type CourseLessonStartResponse,
76
+ type CourseLessonSubmitAssessmentResponse,
71
77
  type CourseLessonCreateParams,
72
78
  type CourseLessonUpdateParams,
73
79
  type CourseLessonListParams,
80
+ type CourseLessonSubmitAssessmentParams,
74
81
  type CourseLessonListResponsesCursorPage,
75
82
  } from './course-lessons';
76
83
  export {
@@ -122,6 +129,7 @@ export {
122
129
  } from './experiences';
123
130
  export {
124
131
  ForumPosts,
132
+ type ForumPostVisibilityType,
125
133
  type ForumPostListResponse,
126
134
  type ForumPostCreateParams,
127
135
  type ForumPostUpdateParams,
@@ -215,6 +223,17 @@ export {
215
223
  type ReactionListParams,
216
224
  type ReactionListResponsesCursorPage,
217
225
  } from './reactions';
226
+ export {
227
+ Refunds,
228
+ type PaymentProvider,
229
+ type RefundReferenceStatus,
230
+ type RefundReferenceType,
231
+ type RefundStatus,
232
+ type RefundRetrieveResponse,
233
+ type RefundListResponse,
234
+ type RefundListParams,
235
+ type RefundListResponsesCursorPage,
236
+ } from './refunds';
218
237
  export {
219
238
  Reviews,
220
239
  type ReviewStatus,
@@ -268,5 +287,18 @@ export {
268
287
  type PaymentPendingWebhookEvent,
269
288
  type DisputeCreatedWebhookEvent,
270
289
  type DisputeUpdatedWebhookEvent,
290
+ type RefundCreatedWebhookEvent,
291
+ type RefundUpdatedWebhookEvent,
271
292
  type UnwrapWebhookEvent,
272
293
  } from './webhooks';
294
+ export {
295
+ Withdrawals,
296
+ type WithdrawalFeeTypes,
297
+ type WithdrawalSpeeds,
298
+ type WithdrawalStatus,
299
+ type WithdrawalTypes,
300
+ type WithdrawalRetrieveResponse,
301
+ type WithdrawalListResponse,
302
+ type WithdrawalListParams,
303
+ type WithdrawalListResponsesCursorPage,
304
+ } from './withdrawals';
@@ -783,6 +783,16 @@ export interface InvoiceListParams extends CursorPageParams {
783
783
  */
784
784
  collection_methods?: Array<Shared.CollectionMethod> | null;
785
785
 
786
+ /**
787
+ * The minimum creation date to filter by
788
+ */
789
+ created_after?: string | null;
790
+
791
+ /**
792
+ * The maximum creation date to filter by
793
+ */
794
+ created_before?: string | null;
795
+
786
796
  /**
787
797
  * The direction of the sort.
788
798
  */
@@ -262,6 +262,7 @@ export type PaymentMethodTypes =
262
262
  | 'splitit'
263
263
  | 'platform_balance'
264
264
  | 'apple'
265
+ | 'venmo'
265
266
  | 'unknown';
266
267
 
267
268
  /**
@@ -344,7 +344,7 @@ export interface PlanCreateParams {
344
344
  description?: string | null;
345
345
 
346
346
  /**
347
- * The interval at which the plan charges (expiration plans).
347
+ * The interval at which the plan expires and revokes access (expiration plans).
348
348
  */
349
349
  expiration_days?: number | null;
350
350
 
@@ -398,18 +398,6 @@ export interface PlanCreateParams {
398
398
  */
399
399
  stock?: number | null;
400
400
 
401
- /**
402
- * The price to display with a strikethrough for the initial price. Provided as a
403
- * number in dollars. Eg: 19.99 for $19.99
404
- */
405
- strike_through_initial_price?: number | null;
406
-
407
- /**
408
- * The price to display with a strikethrough for the renewal price. Provided as a
409
- * number in dollars. Eg: 19.99 for $19.99
410
- */
411
- strike_through_renewal_price?: number | null;
412
-
413
401
  /**
414
402
  * The title of the plan. This will be visible on the product page to customers.
415
403
  */
@@ -713,6 +701,16 @@ export interface PlanListParams extends CursorPageParams {
713
701
  */
714
702
  before?: string | null;
715
703
 
704
+ /**
705
+ * The minimum creation date to filter by
706
+ */
707
+ created_after?: string | null;
708
+
709
+ /**
710
+ * The maximum creation date to filter by
711
+ */
712
+ created_before?: string | null;
713
+
716
714
  /**
717
715
  * The direction of the sort.
718
716
  */
@@ -330,14 +330,6 @@ export namespace ProductCreateParams {
330
330
  }
331
331
 
332
332
  export interface ProductUpdateParams {
333
- /**
334
- * A banner image for the product in png, jpeg format
335
- */
336
- banner_image?:
337
- | ProductUpdateParams.AttachmentInputWithDirectUploadID
338
- | ProductUpdateParams.AttachmentInputWithID
339
- | null;
340
-
341
333
  /**
342
334
  * The different business types a company can be.
343
335
  */
@@ -432,30 +424,6 @@ export interface ProductUpdateParams {
432
424
  }
433
425
 
434
426
  export namespace ProductUpdateParams {
435
- /**
436
- * Input for an attachment
437
- */
438
- export interface AttachmentInputWithDirectUploadID {
439
- /**
440
- * This ID should be used the first time you upload an attachment. It is the ID of
441
- * the direct upload that was created when uploading the file to S3 via the
442
- * mediaDirectUpload mutation.
443
- */
444
- direct_upload_id: string;
445
- }
446
-
447
- /**
448
- * Input for an attachment
449
- */
450
- export interface AttachmentInputWithID {
451
- /**
452
- * The ID of an existing attachment object. Use this when updating a resource and
453
- * keeping a subset of the attachments. Don't use this unless you know what you're
454
- * doing.
455
- */
456
- id: string;
457
- }
458
-
459
427
  /**
460
428
  * Configuration for a product on the company's store page.
461
429
  */
@@ -483,6 +451,16 @@ export interface ProductListParams extends CursorPageParams {
483
451
  */
484
452
  before?: string | null;
485
453
 
454
+ /**
455
+ * The minimum creation date to filter by
456
+ */
457
+ created_after?: string | null;
458
+
459
+ /**
460
+ * The maximum creation date to filter by
461
+ */
462
+ created_before?: string | null;
463
+
486
464
  /**
487
465
  * The direction of the sort.
488
466
  */
@@ -450,6 +450,16 @@ export interface PromoCodeListParams extends CursorPageParams {
450
450
  */
451
451
  before?: string | null;
452
452
 
453
+ /**
454
+ * The minimum creation date to filter by
455
+ */
456
+ created_after?: string | null;
457
+
458
+ /**
459
+ * The maximum creation date to filter by
460
+ */
461
+ created_before?: string | null;
462
+
453
463
  /**
454
464
  * Returns the first _n_ elements from the list.
455
465
  */
@@ -0,0 +1,393 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as PaymentsAPI from './payments';
5
+ import * as Shared from './shared';
6
+ import { APIPromise } from '../core/api-promise';
7
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
8
+ import { RequestOptions } from '../internal/request-options';
9
+ import { path } from '../internal/utils/path';
10
+
11
+ export class Refunds extends APIResource {
12
+ /**
13
+ * Retrieves a Refund by ID
14
+ *
15
+ * Required permissions:
16
+ *
17
+ * - `payment:basic:read`
18
+ * - `member:email:read`
19
+ * - `member:basic:read`
20
+ * - `member:phone:read`
21
+ */
22
+ retrieve(id: string, options?: RequestOptions): APIPromise<RefundRetrieveResponse> {
23
+ return this._client.get(path`/refunds/${id}`, options);
24
+ }
25
+
26
+ /**
27
+ * Lists Refunds for a payment.
28
+ *
29
+ * Required permissions:
30
+ *
31
+ * - `payment:basic:read`
32
+ */
33
+ list(
34
+ query: RefundListParams,
35
+ options?: RequestOptions,
36
+ ): PagePromise<RefundListResponsesCursorPage, RefundListResponse> {
37
+ return this._client.getAPIList('/refunds', CursorPage<RefundListResponse>, { query, ...options });
38
+ }
39
+ }
40
+
41
+ export type RefundListResponsesCursorPage = CursorPage<RefundListResponse>;
42
+
43
+ /**
44
+ * The different payment providers.
45
+ */
46
+ export type PaymentProvider =
47
+ | 'stripe'
48
+ | 'coinbase'
49
+ | 'paypal'
50
+ | 'apple'
51
+ | 'sezzle'
52
+ | 'splitit'
53
+ | 'platform_balance'
54
+ | 'multi_psp';
55
+
56
+ /**
57
+ * The status of the refund reference.
58
+ */
59
+ export type RefundReferenceStatus = 'available' | 'pending' | 'unavailable';
60
+
61
+ /**
62
+ * The type of refund reference that was made available by the payment provider.
63
+ */
64
+ export type RefundReferenceType =
65
+ | 'acquirer_reference_number'
66
+ | 'retrieval_reference_number'
67
+ | 'system_trace_audit_number';
68
+
69
+ /**
70
+ * The different statuses for a Refund object
71
+ */
72
+ export type RefundStatus = 'pending' | 'requires_action' | 'succeeded' | 'failed' | 'canceled';
73
+
74
+ /**
75
+ * An object representing a refund made on a payment.
76
+ */
77
+ export interface RefundRetrieveResponse {
78
+ /**
79
+ * The ID of the refund.
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * The amount of the refund.
85
+ */
86
+ amount: number;
87
+
88
+ /**
89
+ * The time the refund was created.
90
+ */
91
+ created_at: string;
92
+
93
+ /**
94
+ * The currency of the refund.
95
+ */
96
+ currency: Shared.Currency;
97
+
98
+ /**
99
+ * The payment associated with the refund.
100
+ */
101
+ payment: RefundRetrieveResponse.Payment | null;
102
+
103
+ /**
104
+ * The provider of the refund.
105
+ */
106
+ provider: PaymentProvider;
107
+
108
+ /**
109
+ * The time the refund was created by the provider.
110
+ */
111
+ provider_created_at: string | null;
112
+
113
+ /**
114
+ * The status of the refund reference.
115
+ */
116
+ reference_status: RefundReferenceStatus | null;
117
+
118
+ /**
119
+ * The type of refund reference that was made available by the payment provider.
120
+ */
121
+ reference_type: RefundReferenceType | null;
122
+
123
+ /**
124
+ * The value of the reference.
125
+ */
126
+ reference_value: string | null;
127
+
128
+ /**
129
+ * The status of the refund.
130
+ */
131
+ status: RefundStatus;
132
+ }
133
+
134
+ export namespace RefundRetrieveResponse {
135
+ /**
136
+ * The payment associated with the refund.
137
+ */
138
+ export interface Payment {
139
+ /**
140
+ * The payment ID
141
+ */
142
+ id: string;
143
+
144
+ /**
145
+ * The reason why a specific payment was billed
146
+ */
147
+ billing_reason: PaymentsAPI.BillingReasons | null;
148
+
149
+ /**
150
+ * Possible card brands that a payment token can have
151
+ */
152
+ card_brand: PaymentsAPI.CardBrands | null;
153
+
154
+ /**
155
+ * The last 4 digits of the card used to make the payment.
156
+ */
157
+ card_last4: string | null;
158
+
159
+ /**
160
+ * The datetime the payment was created
161
+ */
162
+ created_at: string;
163
+
164
+ /**
165
+ * The available currencies on the platform
166
+ */
167
+ currency: Shared.Currency | null;
168
+
169
+ /**
170
+ * When an alert came in that this transaction will be disputed
171
+ */
172
+ dispute_alerted_at: string | null;
173
+
174
+ /**
175
+ * The member attached to this payment.
176
+ */
177
+ member: Payment.Member | null;
178
+
179
+ /**
180
+ * The membership attached to this payment.
181
+ */
182
+ membership: Payment.Membership | null;
183
+
184
+ /**
185
+ * The datetime the payment was paid
186
+ */
187
+ paid_at: string | null;
188
+
189
+ /**
190
+ * The different types of payment methods that can be used.
191
+ */
192
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
193
+
194
+ /**
195
+ * The subtotal to show to the creator (excluding buyer fees).
196
+ */
197
+ subtotal: number | null;
198
+
199
+ /**
200
+ * The total to show to the creator (excluding buyer fees).
201
+ */
202
+ total: number | null;
203
+
204
+ /**
205
+ * The total in USD to show to the creator (excluding buyer fees).
206
+ */
207
+ usd_total: number | null;
208
+
209
+ /**
210
+ * The user that made this payment.
211
+ */
212
+ user: Payment.User | null;
213
+ }
214
+
215
+ export namespace Payment {
216
+ /**
217
+ * The member attached to this payment.
218
+ */
219
+ export interface Member {
220
+ /**
221
+ * The ID of the member
222
+ */
223
+ id: string;
224
+
225
+ /**
226
+ * The phone number for the member, if available.
227
+ */
228
+ phone: string | null;
229
+ }
230
+
231
+ /**
232
+ * The membership attached to this payment.
233
+ */
234
+ export interface Membership {
235
+ /**
236
+ * The internal ID of the membership.
237
+ */
238
+ id: string;
239
+
240
+ /**
241
+ * The state of the membership.
242
+ */
243
+ status: Shared.MembershipStatus;
244
+ }
245
+
246
+ /**
247
+ * The user that made this payment.
248
+ */
249
+ export interface User {
250
+ /**
251
+ * The internal ID of the user.
252
+ */
253
+ id: string;
254
+
255
+ /**
256
+ * The email of the user
257
+ */
258
+ email: string | null;
259
+
260
+ /**
261
+ * The name of the user from their Whop account.
262
+ */
263
+ name: string | null;
264
+
265
+ /**
266
+ * The username of the user from their Whop account.
267
+ */
268
+ username: string;
269
+ }
270
+ }
271
+ }
272
+
273
+ /**
274
+ * An object representing a refund made on a payment.
275
+ */
276
+ export interface RefundListResponse {
277
+ /**
278
+ * The ID of the refund.
279
+ */
280
+ id: string;
281
+
282
+ /**
283
+ * The amount of the refund.
284
+ */
285
+ amount: number;
286
+
287
+ /**
288
+ * The time the refund was created.
289
+ */
290
+ created_at: string;
291
+
292
+ /**
293
+ * The currency of the refund.
294
+ */
295
+ currency: Shared.Currency;
296
+
297
+ /**
298
+ * The payment associated with the refund.
299
+ */
300
+ payment: RefundListResponse.Payment | null;
301
+
302
+ /**
303
+ * The provider of the refund.
304
+ */
305
+ provider: PaymentProvider;
306
+
307
+ /**
308
+ * The time the refund was created by the provider.
309
+ */
310
+ provider_created_at: string | null;
311
+
312
+ /**
313
+ * The status of the refund reference.
314
+ */
315
+ reference_status: RefundReferenceStatus | null;
316
+
317
+ /**
318
+ * The type of refund reference that was made available by the payment provider.
319
+ */
320
+ reference_type: RefundReferenceType | null;
321
+
322
+ /**
323
+ * The value of the reference.
324
+ */
325
+ reference_value: string | null;
326
+
327
+ /**
328
+ * The status of the refund.
329
+ */
330
+ status: RefundStatus;
331
+ }
332
+
333
+ export namespace RefundListResponse {
334
+ /**
335
+ * The payment associated with the refund.
336
+ */
337
+ export interface Payment {
338
+ /**
339
+ * The payment ID
340
+ */
341
+ id: string;
342
+ }
343
+ }
344
+
345
+ export interface RefundListParams extends CursorPageParams {
346
+ /**
347
+ * The ID of the payment to list refunds for
348
+ */
349
+ payment_id: string;
350
+
351
+ /**
352
+ * Returns the elements in the list that come before the specified cursor.
353
+ */
354
+ before?: string | null;
355
+
356
+ /**
357
+ * The minimum creation date to filter by
358
+ */
359
+ created_after?: string | null;
360
+
361
+ /**
362
+ * The maximum creation date to filter by
363
+ */
364
+ created_before?: string | null;
365
+
366
+ /**
367
+ * The direction of the sort.
368
+ */
369
+ direction?: Shared.Direction | null;
370
+
371
+ /**
372
+ * Returns the first _n_ elements from the list.
373
+ */
374
+ first?: number | null;
375
+
376
+ /**
377
+ * Returns the last _n_ elements from the list.
378
+ */
379
+ last?: number | null;
380
+ }
381
+
382
+ export declare namespace Refunds {
383
+ export {
384
+ type PaymentProvider as PaymentProvider,
385
+ type RefundReferenceStatus as RefundReferenceStatus,
386
+ type RefundReferenceType as RefundReferenceType,
387
+ type RefundStatus as RefundStatus,
388
+ type RefundRetrieveResponse as RefundRetrieveResponse,
389
+ type RefundListResponse as RefundListResponse,
390
+ type RefundListResponsesCursorPage as RefundListResponsesCursorPage,
391
+ type RefundListParams as RefundListParams,
392
+ };
393
+ }
@@ -316,6 +316,16 @@ export interface ReviewListParams extends CursorPageParams {
316
316
  */
317
317
  before?: string | null;
318
318
 
319
+ /**
320
+ * The minimum creation date to filter by
321
+ */
322
+ created_after?: string | null;
323
+
324
+ /**
325
+ * The maximum creation date to filter by
326
+ */
327
+ created_before?: string | null;
328
+
319
329
  /**
320
330
  * Returns the first _n_ elements from the list.
321
331
  */