@whop/sdk 0.0.31 → 0.0.32

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 (56) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +8 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai-chats.d.mts +4 -0
  12. package/resources/ai-chats.d.mts.map +1 -1
  13. package/resources/ai-chats.d.ts +4 -0
  14. package/resources/ai-chats.d.ts.map +1 -1
  15. package/resources/authorized-users.d.mts +7 -66
  16. package/resources/authorized-users.d.mts.map +1 -1
  17. package/resources/authorized-users.d.ts +7 -66
  18. package/resources/authorized-users.d.ts.map +1 -1
  19. package/resources/authorized-users.js.map +1 -1
  20. package/resources/authorized-users.mjs.map +1 -1
  21. package/resources/index.d.mts +2 -1
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +2 -1
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +4 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +1 -0
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/products.d.mts +10 -0
  30. package/resources/products.d.mts.map +1 -1
  31. package/resources/products.d.ts +10 -0
  32. package/resources/products.d.ts.map +1 -1
  33. package/resources/resolution-center-cases.d.mts +367 -0
  34. package/resources/resolution-center-cases.d.mts.map +1 -0
  35. package/resources/resolution-center-cases.d.ts +367 -0
  36. package/resources/resolution-center-cases.d.ts.map +1 -0
  37. package/resources/resolution-center-cases.js +38 -0
  38. package/resources/resolution-center-cases.js.map +1 -0
  39. package/resources/resolution-center-cases.mjs +34 -0
  40. package/resources/resolution-center-cases.mjs.map +1 -0
  41. package/resources/shared.d.mts +8 -7
  42. package/resources/shared.d.mts.map +1 -1
  43. package/resources/shared.d.ts +8 -7
  44. package/resources/shared.d.ts.map +1 -1
  45. package/src/client.ts +32 -4
  46. package/src/resources/ai-chats.ts +5 -0
  47. package/src/resources/authorized-users.ts +7 -80
  48. package/src/resources/index.ts +13 -2
  49. package/src/resources/products.ts +12 -0
  50. package/src/resources/resolution-center-cases.ts +492 -0
  51. package/src/resources/shared.ts +8 -22
  52. package/src/version.ts +1 -1
  53. package/version.d.mts +1 -1
  54. package/version.d.ts +1 -1
  55. package/version.js +1 -1
  56. package/version.mjs +1 -1
@@ -0,0 +1,367 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import * as Shared from "./shared.js";
3
+ import { APIPromise } from "../core/api-promise.js";
4
+ import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
5
+ import { RequestOptions } from "../internal/request-options.js";
6
+ /**
7
+ * Resolution center cases
8
+ */
9
+ export declare class ResolutionCenterCases extends APIResource {
10
+ /**
11
+ * Retrieves the details of an existing resolution center case.
12
+ *
13
+ * Required permissions:
14
+ *
15
+ * - `payment:resolution_center_case:read`
16
+ */
17
+ retrieve(id: string, options?: RequestOptions): APIPromise<ResolutionCenterCaseRetrieveResponse>;
18
+ /**
19
+ * Returns a paginated list of resolution center cases, with optional filtering by
20
+ * company, status, and creation date.
21
+ *
22
+ * Required permissions:
23
+ *
24
+ * - `payment:resolution_center_case:read`
25
+ */
26
+ list(query?: ResolutionCenterCaseListParams | null | undefined, options?: RequestOptions): PagePromise<ResolutionCenterCaseListResponsesCursorPage, ResolutionCenterCaseListResponse>;
27
+ }
28
+ export type ResolutionCenterCaseListResponsesCursorPage = CursorPage<ResolutionCenterCaseListResponse>;
29
+ /**
30
+ * The types of responses a customer can make to a resolution.
31
+ */
32
+ export type ResolutionCenterCaseCustomerResponse = 'respond' | 'appeal' | 'withdraw';
33
+ /**
34
+ * The different types of issues a resolution can be
35
+ */
36
+ export type ResolutionCenterCaseIssueType = 'forgot_to_cancel' | 'item_not_received' | 'significantly_not_as_described' | 'unauthorized_transaction' | 'product_unacceptable';
37
+ /**
38
+ * The types of responses a merchant can make to a resolution.
39
+ */
40
+ export type ResolutionCenterCaseMerchantResponse = 'accept' | 'deny' | 'request_more_info' | 'appeal' | 'respond';
41
+ /**
42
+ * The types of responses the platform can make to a resolution.
43
+ */
44
+ export type ResolutionCenterCasePlatformResponse = 'request_buyer_info' | 'request_merchant_info' | 'merchant_wins' | 'platform_refund' | 'merchant_refund';
45
+ /**
46
+ * The statuses a resolution object can have
47
+ */
48
+ export type ResolutionCenterCaseStatus = 'merchant_response_needed' | 'customer_response_needed' | 'merchant_info_needed' | 'customer_info_needed' | 'under_platform_review' | 'customer_won' | 'merchant_won' | 'customer_withdrew';
49
+ /**
50
+ * A resolution center case is a dispute or support case between a user and a
51
+ * company, tracking the issue, status, and outcome.
52
+ */
53
+ export interface ResolutionCenterCaseRetrieveResponse {
54
+ /**
55
+ * The unique identifier for the resolution.
56
+ */
57
+ id: string;
58
+ /**
59
+ * The company involved in this resolution case. Null if the company no longer
60
+ * exists.
61
+ */
62
+ company: ResolutionCenterCaseRetrieveResponse.Company | null;
63
+ /**
64
+ * The datetime the resolution was created.
65
+ */
66
+ created_at: string;
67
+ /**
68
+ * Whether the customer has filed an appeal after the initial resolution decision.
69
+ */
70
+ customer_appealed: boolean;
71
+ /**
72
+ * The list of actions currently available to the customer.
73
+ */
74
+ customer_response_actions: Array<ResolutionCenterCaseCustomerResponse>;
75
+ /**
76
+ * The deadline by which the next response is required. Null if no deadline is
77
+ * currently active. As a Unix timestamp.
78
+ */
79
+ due_date: string | null;
80
+ /**
81
+ * The category of the dispute.
82
+ */
83
+ issue: ResolutionCenterCaseIssueType;
84
+ /**
85
+ * The membership record associated with the disputed payment. Null if the
86
+ * membership no longer exists.
87
+ */
88
+ member: ResolutionCenterCaseRetrieveResponse.Member | null;
89
+ /**
90
+ * Whether the merchant has filed an appeal after the initial resolution decision.
91
+ */
92
+ merchant_appealed: boolean;
93
+ /**
94
+ * The list of actions currently available to the merchant.
95
+ */
96
+ merchant_response_actions: Array<ResolutionCenterCaseMerchantResponse>;
97
+ /**
98
+ * The payment record that is the subject of this resolution case.
99
+ */
100
+ payment: ResolutionCenterCaseRetrieveResponse.Payment;
101
+ /**
102
+ * The list of actions currently available to the Whop platform for moderating this
103
+ * resolution.
104
+ */
105
+ platform_response_actions: Array<ResolutionCenterCasePlatformResponse>;
106
+ /**
107
+ * The most recent 50 messages, actions, and status changes that have occurred
108
+ * during this resolution case.
109
+ */
110
+ resolution_events: Array<ResolutionCenterCaseRetrieveResponse.ResolutionEvent>;
111
+ /**
112
+ * The current status of the resolution case, indicating which party needs to
113
+ * respond or if the case is closed.
114
+ */
115
+ status: ResolutionCenterCaseStatus;
116
+ /**
117
+ * The datetime the resolution was last updated.
118
+ */
119
+ updated_at: string;
120
+ /**
121
+ * The customer (buyer) who filed this resolution case.
122
+ */
123
+ user: ResolutionCenterCaseRetrieveResponse.User;
124
+ }
125
+ export declare namespace ResolutionCenterCaseRetrieveResponse {
126
+ /**
127
+ * The company involved in this resolution case. Null if the company no longer
128
+ * exists.
129
+ */
130
+ interface Company {
131
+ /**
132
+ * The unique identifier for the company.
133
+ */
134
+ id: string;
135
+ /**
136
+ * The display name of the company shown to customers.
137
+ */
138
+ title: string;
139
+ }
140
+ /**
141
+ * The membership record associated with the disputed payment. Null if the
142
+ * membership no longer exists.
143
+ */
144
+ interface Member {
145
+ /**
146
+ * The unique identifier for the extra public member.
147
+ */
148
+ id: string;
149
+ }
150
+ /**
151
+ * The payment record that is the subject of this resolution case.
152
+ */
153
+ interface Payment {
154
+ /**
155
+ * The unique identifier for the payment.
156
+ */
157
+ id: string;
158
+ /**
159
+ * The datetime the payment was created.
160
+ */
161
+ created_at: string;
162
+ /**
163
+ * The available currencies on the platform
164
+ */
165
+ currency: Shared.Currency | null;
166
+ /**
167
+ * The time at which this payment was successfully collected. Null if the payment
168
+ * has not yet succeeded. As a Unix timestamp.
169
+ */
170
+ paid_at: string | null;
171
+ /**
172
+ * The payment amount before taxes and discounts are applied. In the currency
173
+ * specified by the currency field.
174
+ */
175
+ subtotal: number | null;
176
+ /**
177
+ * The total amount charged to the customer for this payment, including taxes and
178
+ * after any discounts. In the currency specified by the currency field.
179
+ */
180
+ total: number;
181
+ }
182
+ /**
183
+ * A resolution event is a message or action within a resolution case, such as a
184
+ * response, escalation, or status change.
185
+ */
186
+ interface ResolutionEvent {
187
+ /**
188
+ * The unique identifier for the resolution event.
189
+ */
190
+ id: string;
191
+ /**
192
+ * The type of action recorded in this event.
193
+ */
194
+ action: 'created' | 'responded' | 'accepted' | 'denied' | 'appealed' | 'withdrew' | 'requested_more_info' | 'escalated' | 'dispute_opened' | 'dispute_customer_won' | 'dispute_merchant_won';
195
+ /**
196
+ * The datetime the resolution event was created.
197
+ */
198
+ created_at: string;
199
+ /**
200
+ * The message body or additional context provided with this resolution event. Null
201
+ * if no details were included.
202
+ */
203
+ details: string | null;
204
+ /**
205
+ * The party who performed this action.
206
+ */
207
+ reporter_type: 'merchant' | 'customer' | 'platform' | 'system';
208
+ }
209
+ /**
210
+ * The customer (buyer) who filed this resolution case.
211
+ */
212
+ interface User {
213
+ /**
214
+ * The unique identifier for the user.
215
+ */
216
+ id: string;
217
+ /**
218
+ * The user's display name shown on their public profile.
219
+ */
220
+ name: string | null;
221
+ /**
222
+ * The user's unique username shown on their public profile.
223
+ */
224
+ username: string;
225
+ }
226
+ }
227
+ /**
228
+ * A resolution center case is a dispute or support case between a user and a
229
+ * company, tracking the issue, status, and outcome.
230
+ */
231
+ export interface ResolutionCenterCaseListResponse {
232
+ /**
233
+ * The unique identifier for the resolution.
234
+ */
235
+ id: string;
236
+ /**
237
+ * The company involved in this resolution case. Null if the company no longer
238
+ * exists.
239
+ */
240
+ company: ResolutionCenterCaseListResponse.Company | null;
241
+ /**
242
+ * The datetime the resolution was created.
243
+ */
244
+ created_at: string;
245
+ /**
246
+ * Whether the customer has filed an appeal after the initial resolution decision.
247
+ */
248
+ customer_appealed: boolean;
249
+ /**
250
+ * The list of actions currently available to the customer.
251
+ */
252
+ customer_response_actions: Array<ResolutionCenterCaseCustomerResponse>;
253
+ /**
254
+ * The deadline by which the next response is required. Null if no deadline is
255
+ * currently active. As a Unix timestamp.
256
+ */
257
+ due_date: string | null;
258
+ /**
259
+ * The category of the dispute.
260
+ */
261
+ issue: ResolutionCenterCaseIssueType;
262
+ /**
263
+ * Whether the merchant has filed an appeal after the initial resolution decision.
264
+ */
265
+ merchant_appealed: boolean;
266
+ /**
267
+ * The list of actions currently available to the merchant.
268
+ */
269
+ merchant_response_actions: Array<ResolutionCenterCaseMerchantResponse>;
270
+ /**
271
+ * The payment record that is the subject of this resolution case.
272
+ */
273
+ payment: ResolutionCenterCaseListResponse.Payment;
274
+ /**
275
+ * The current status of the resolution case, indicating which party needs to
276
+ * respond or if the case is closed.
277
+ */
278
+ status: ResolutionCenterCaseStatus;
279
+ /**
280
+ * The datetime the resolution was last updated.
281
+ */
282
+ updated_at: string;
283
+ /**
284
+ * The customer (buyer) who filed this resolution case.
285
+ */
286
+ user: ResolutionCenterCaseListResponse.User;
287
+ }
288
+ export declare namespace ResolutionCenterCaseListResponse {
289
+ /**
290
+ * The company involved in this resolution case. Null if the company no longer
291
+ * exists.
292
+ */
293
+ interface Company {
294
+ /**
295
+ * The unique identifier for the company.
296
+ */
297
+ id: string;
298
+ /**
299
+ * The display name of the company shown to customers.
300
+ */
301
+ title: string;
302
+ }
303
+ /**
304
+ * The payment record that is the subject of this resolution case.
305
+ */
306
+ interface Payment {
307
+ /**
308
+ * The unique identifier for the payment.
309
+ */
310
+ id: string;
311
+ }
312
+ /**
313
+ * The customer (buyer) who filed this resolution case.
314
+ */
315
+ interface User {
316
+ /**
317
+ * The unique identifier for the user.
318
+ */
319
+ id: string;
320
+ /**
321
+ * The user's display name shown on their public profile.
322
+ */
323
+ name: string | null;
324
+ /**
325
+ * The user's unique username shown on their public profile.
326
+ */
327
+ username: string;
328
+ }
329
+ }
330
+ export interface ResolutionCenterCaseListParams extends CursorPageParams {
331
+ /**
332
+ * Returns the elements in the list that come before the specified cursor.
333
+ */
334
+ before?: string | null;
335
+ /**
336
+ * The unique identifier of the company to list resolution center cases for.
337
+ */
338
+ company_id?: string | null;
339
+ /**
340
+ * Only return cases created after this timestamp.
341
+ */
342
+ created_after?: string | null;
343
+ /**
344
+ * Only return cases created before this timestamp.
345
+ */
346
+ created_before?: string | null;
347
+ /**
348
+ * The direction of the sort.
349
+ */
350
+ direction?: Shared.Direction | null;
351
+ /**
352
+ * Returns the first _n_ elements from the list.
353
+ */
354
+ first?: number | null;
355
+ /**
356
+ * Returns the last _n_ elements from the list.
357
+ */
358
+ last?: number | null;
359
+ /**
360
+ * Filter by resolution center case status.
361
+ */
362
+ statuses?: Array<ResolutionCenterCaseStatus> | null;
363
+ }
364
+ export declare namespace ResolutionCenterCases {
365
+ export { type ResolutionCenterCaseCustomerResponse as ResolutionCenterCaseCustomerResponse, type ResolutionCenterCaseIssueType as ResolutionCenterCaseIssueType, type ResolutionCenterCaseMerchantResponse as ResolutionCenterCaseMerchantResponse, type ResolutionCenterCasePlatformResponse as ResolutionCenterCasePlatformResponse, type ResolutionCenterCaseStatus as ResolutionCenterCaseStatus, type ResolutionCenterCaseRetrieveResponse as ResolutionCenterCaseRetrieveResponse, type ResolutionCenterCaseListResponse as ResolutionCenterCaseListResponse, type ResolutionCenterCaseListResponsesCursorPage as ResolutionCenterCaseListResponsesCursorPage, type ResolutionCenterCaseListParams as ResolutionCenterCaseListParams, };
366
+ }
367
+ //# sourceMappingURL=resolution-center-cases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-center-cases.d.ts","sourceRoot":"","sources":["../src/resources/resolution-center-cases.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;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A6B,EACnE,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2CAA2C,IAAI,2CAA2C,EAC/F,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ResolutionCenterCases = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ /**
9
+ * Resolution center cases
10
+ */
11
+ class ResolutionCenterCases extends resource_1.APIResource {
12
+ /**
13
+ * Retrieves the details of an existing resolution center case.
14
+ *
15
+ * Required permissions:
16
+ *
17
+ * - `payment:resolution_center_case:read`
18
+ */
19
+ retrieve(id, options) {
20
+ return this._client.get((0, path_1.path) `/resolution_center_cases/${id}`, options);
21
+ }
22
+ /**
23
+ * Returns a paginated list of resolution center cases, with optional filtering by
24
+ * company, status, and creation date.
25
+ *
26
+ * Required permissions:
27
+ *
28
+ * - `payment:resolution_center_case:read`
29
+ */
30
+ list(query = {}, options) {
31
+ return this._client.getAPIList('/resolution_center_cases', (pagination_1.CursorPage), {
32
+ query,
33
+ ...options,
34
+ });
35
+ }
36
+ }
37
+ exports.ResolutionCenterCases = ResolutionCenterCases;
38
+ //# sourceMappingURL=resolution-center-cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-center-cases.js","sourceRoot":"","sources":["../src/resources/resolution-center-cases.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C;;GAEG;AACH,MAAa,qBAAsB,SAAQ,sBAAW;IACpD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAA,uBAA4C,CAAA,EAAE;YACvG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,sDA6BC"}
@@ -0,0 +1,34 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { CursorPage } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ /**
6
+ * Resolution center cases
7
+ */
8
+ export class ResolutionCenterCases extends APIResource {
9
+ /**
10
+ * Retrieves the details of an existing resolution center case.
11
+ *
12
+ * Required permissions:
13
+ *
14
+ * - `payment:resolution_center_case:read`
15
+ */
16
+ retrieve(id, options) {
17
+ return this._client.get(path `/resolution_center_cases/${id}`, options);
18
+ }
19
+ /**
20
+ * Returns a paginated list of resolution center cases, with optional filtering by
21
+ * company, status, and creation date.
22
+ *
23
+ * Required permissions:
24
+ *
25
+ * - `payment:resolution_center_case:read`
26
+ */
27
+ list(query = {}, options) {
28
+ return this._client.getAPIList('/resolution_center_cases', (CursorPage), {
29
+ query,
30
+ ...options,
31
+ });
32
+ }
33
+ }
34
+ //# sourceMappingURL=resolution-center-cases.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-center-cases.mjs","sourceRoot":"","sources":["../src/resources/resolution-center-cases.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IACpD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,4BAA4B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,0BAA0B,EAAE,CAAA,UAA4C,CAAA,EAAE;YACvG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -5,6 +5,7 @@ import * as CompaniesAPI from "./companies.mjs";
5
5
  import * as DisputesAPI from "./disputes.mjs";
6
6
  import * as MembershipsAPI from "./memberships.mjs";
7
7
  import * as PaymentsAPI from "./payments.mjs";
8
+ import * as ResolutionCenterCasesAPI from "./resolution-center-cases.mjs";
8
9
  import { CursorPage } from "../core/pagination.mjs";
9
10
  /**
10
11
  * The access level a given user (or company) has to a product or company.
@@ -2242,8 +2243,8 @@ export declare namespace Payment {
2242
2243
  promo_type: Shared.PromoType;
2243
2244
  }
2244
2245
  /**
2245
- * A resolution is a dispute or support case between a buyer and seller, tracking
2246
- * the issue, status, and outcome.
2246
+ * A resolution center case is a dispute or support case between a user and a
2247
+ * company, tracking the issue, status, and outcome.
2247
2248
  */
2248
2249
  interface Resolution {
2249
2250
  /**
@@ -2257,7 +2258,7 @@ export declare namespace Payment {
2257
2258
  /**
2258
2259
  * The list of actions currently available to the customer.
2259
2260
  */
2260
- customer_response_actions: Array<'respond' | 'appeal' | 'withdraw'>;
2261
+ customer_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseCustomerResponse>;
2261
2262
  /**
2262
2263
  * The deadline by which the next response is required. Null if no deadline is
2263
2264
  * currently active. As a Unix timestamp.
@@ -2266,7 +2267,7 @@ export declare namespace Payment {
2266
2267
  /**
2267
2268
  * The category of the dispute.
2268
2269
  */
2269
- issue: 'forgot_to_cancel' | 'item_not_received' | 'significantly_not_as_described' | 'unauthorized_transaction' | 'product_unacceptable';
2270
+ issue: ResolutionCenterCasesAPI.ResolutionCenterCaseIssueType;
2270
2271
  /**
2271
2272
  * Whether the merchant has filed an appeal after the initial resolution decision.
2272
2273
  */
@@ -2274,17 +2275,17 @@ export declare namespace Payment {
2274
2275
  /**
2275
2276
  * The list of actions currently available to the merchant.
2276
2277
  */
2277
- merchant_response_actions: Array<'accept' | 'deny' | 'request_more_info' | 'appeal' | 'respond'>;
2278
+ merchant_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseMerchantResponse>;
2278
2279
  /**
2279
2280
  * The list of actions currently available to the Whop platform for moderating this
2280
2281
  * resolution.
2281
2282
  */
2282
- platform_response_actions: Array<'request_buyer_info' | 'request_merchant_info' | 'merchant_wins' | 'platform_refund' | 'merchant_refund'>;
2283
+ platform_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCasePlatformResponse>;
2283
2284
  /**
2284
2285
  * The current status of the resolution case, indicating which party needs to
2285
2286
  * respond or if the case is closed.
2286
2287
  */
2287
- status: 'merchant_response_needed' | 'customer_response_needed' | 'merchant_info_needed' | 'customer_info_needed' | 'under_platform_review' | 'customer_won' | 'merchant_won' | 'customer_withdrew';
2288
+ status: ResolutionCenterCasesAPI.ResolutionCenterCaseStatus;
2288
2289
  }
2289
2290
  /**
2290
2291
  * The user that made this payment.