@whop/sdk 0.0.35 → 0.0.36

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 (98) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/client.d.mts +4 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/utils/env.js +2 -2
  10. package/internal/utils/env.js.map +1 -1
  11. package/internal/utils/env.mjs +2 -2
  12. package/internal/utils/env.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/affiliates/affiliates.d.mts +20 -12
  15. package/resources/affiliates/affiliates.d.mts.map +1 -1
  16. package/resources/affiliates/affiliates.d.ts +20 -12
  17. package/resources/affiliates/affiliates.d.ts.map +1 -1
  18. package/resources/affiliates/affiliates.js.map +1 -1
  19. package/resources/affiliates/affiliates.mjs.map +1 -1
  20. package/resources/affiliates/overrides.d.mts +16 -8
  21. package/resources/affiliates/overrides.d.mts.map +1 -1
  22. package/resources/affiliates/overrides.d.ts +16 -8
  23. package/resources/affiliates/overrides.d.ts.map +1 -1
  24. package/resources/apps.d.mts +26 -0
  25. package/resources/apps.d.mts.map +1 -1
  26. package/resources/apps.d.ts +26 -0
  27. package/resources/apps.d.ts.map +1 -1
  28. package/resources/checkout-configurations.d.mts +69 -0
  29. package/resources/checkout-configurations.d.mts.map +1 -1
  30. package/resources/checkout-configurations.d.ts +69 -0
  31. package/resources/checkout-configurations.d.ts.map +1 -1
  32. package/resources/companies.d.mts +19 -0
  33. package/resources/companies.d.mts.map +1 -1
  34. package/resources/companies.d.ts +19 -0
  35. package/resources/companies.d.ts.map +1 -1
  36. package/resources/index.d.mts +2 -2
  37. package/resources/index.d.mts.map +1 -1
  38. package/resources/index.d.ts +2 -2
  39. package/resources/index.d.ts.map +1 -1
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs.map +1 -1
  42. package/resources/invoices.d.mts +179 -345
  43. package/resources/invoices.d.mts.map +1 -1
  44. package/resources/invoices.d.ts +179 -345
  45. package/resources/invoices.d.ts.map +1 -1
  46. package/resources/invoices.js +20 -2
  47. package/resources/invoices.js.map +1 -1
  48. package/resources/invoices.mjs +20 -2
  49. package/resources/invoices.mjs.map +1 -1
  50. package/resources/memberships.d.mts +1 -1
  51. package/resources/memberships.d.mts.map +1 -1
  52. package/resources/memberships.d.ts +1 -1
  53. package/resources/memberships.d.ts.map +1 -1
  54. package/resources/payments.d.mts +21 -2
  55. package/resources/payments.d.mts.map +1 -1
  56. package/resources/payments.d.ts +21 -2
  57. package/resources/payments.d.ts.map +1 -1
  58. package/resources/plans.d.mts +46 -0
  59. package/resources/plans.d.mts.map +1 -1
  60. package/resources/plans.d.ts +46 -0
  61. package/resources/plans.d.ts.map +1 -1
  62. package/resources/products.d.mts +2 -2
  63. package/resources/products.d.ts +2 -2
  64. package/resources/refunds.d.mts +1 -1
  65. package/resources/refunds.d.mts.map +1 -1
  66. package/resources/refunds.d.ts +1 -1
  67. package/resources/refunds.d.ts.map +1 -1
  68. package/resources/shared.d.mts +54 -5
  69. package/resources/shared.d.mts.map +1 -1
  70. package/resources/shared.d.ts +54 -5
  71. package/resources/shared.d.ts.map +1 -1
  72. package/resources/webhooks.d.mts +653 -3
  73. package/resources/webhooks.d.mts.map +1 -1
  74. package/resources/webhooks.d.ts +653 -3
  75. package/resources/webhooks.d.ts.map +1 -1
  76. package/resources/webhooks.js.map +1 -1
  77. package/resources/webhooks.mjs.map +1 -1
  78. package/src/client.ts +20 -1
  79. package/src/internal/utils/env.ts +2 -2
  80. package/src/resources/affiliates/affiliates.ts +20 -12
  81. package/src/resources/affiliates/overrides.ts +16 -8
  82. package/src/resources/apps.ts +31 -0
  83. package/src/resources/checkout-configurations.ts +81 -0
  84. package/src/resources/companies.ts +23 -0
  85. package/src/resources/index.ts +7 -0
  86. package/src/resources/invoices.ts +316 -397
  87. package/src/resources/memberships.ts +1 -1
  88. package/src/resources/payments.ts +25 -1
  89. package/src/resources/plans.ts +54 -0
  90. package/src/resources/products.ts +2 -2
  91. package/src/resources/refunds.ts +2 -1
  92. package/src/resources/shared.ts +64 -5
  93. package/src/resources/webhooks.ts +818 -0
  94. package/src/version.ts +1 -1
  95. package/version.d.mts +1 -1
  96. package/version.d.ts +1 -1
  97. package/version.js +1 -1
  98. package/version.mjs +1 -1
@@ -5,6 +5,7 @@ import * as PaymentsAPI from "./payments.mjs";
5
5
  import * as PayoutAccountsAPI from "./payout-accounts.mjs";
6
6
  import * as PayoutMethodsAPI from "./payout-methods.mjs";
7
7
  import * as RefundsAPI from "./refunds.mjs";
8
+ import * as ResolutionCenterCasesAPI from "./resolution-center-cases.mjs";
8
9
  import * as SetupIntentsAPI from "./setup-intents.mjs";
9
10
  import * as Shared from "./shared.mjs";
10
11
  import * as VerificationsAPI from "./verifications.mjs";
@@ -152,7 +153,7 @@ export interface Webhook {
152
153
  /**
153
154
  * The different event types available
154
155
  */
155
- export type WebhookEvent = 'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payout_account.status_updated' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'dispute_alert.created' | 'membership.cancel_at_period_end_changed';
156
+ export type WebhookEvent = 'invoice.created' | 'invoice.marked_uncollectible' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payout_account.status_updated' | 'resolution_center_case.created' | 'resolution_center_case.updated' | 'resolution_center_case.decided' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'dispute_alert.created' | 'membership.cancel_at_period_end_changed';
156
157
  /**
157
158
  * A webhook endpoint that receives event notifications for a company via HTTP
158
159
  * POST.
@@ -270,6 +271,34 @@ export interface InvoiceCreatedWebhookEvent {
270
271
  */
271
272
  company_id?: string | null;
272
273
  }
274
+ export interface InvoiceMarkedUncollectibleWebhookEvent {
275
+ /**
276
+ * A unique ID for every single webhook request
277
+ */
278
+ id: string;
279
+ /**
280
+ * The API version for this webhook
281
+ */
282
+ api_version: 'v1';
283
+ /**
284
+ * An invoice represents an itemized bill sent by a company to a customer for a
285
+ * specific product and plan, tracking the amount owed, due date, and payment
286
+ * status.
287
+ */
288
+ data: Shared.Invoice;
289
+ /**
290
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
291
+ */
292
+ timestamp: string;
293
+ /**
294
+ * The webhook event type
295
+ */
296
+ type: 'invoice.marked_uncollectible';
297
+ /**
298
+ * The company ID that this webhook event is associated with
299
+ */
300
+ company_id?: string | null;
301
+ }
273
302
  export interface InvoicePaidWebhookEvent {
274
303
  /**
275
304
  * A unique ID for every single webhook request
@@ -975,6 +1004,627 @@ export declare namespace PayoutAccountStatusUpdatedWebhookEvent {
975
1004
  }
976
1005
  }
977
1006
  }
1007
+ export interface ResolutionCenterCaseCreatedWebhookEvent {
1008
+ /**
1009
+ * A unique ID for every single webhook request
1010
+ */
1011
+ id: string;
1012
+ /**
1013
+ * The API version for this webhook
1014
+ */
1015
+ api_version: 'v1';
1016
+ /**
1017
+ * A resolution center case is a dispute or support case between a user and a
1018
+ * company, tracking the issue, status, and outcome.
1019
+ */
1020
+ data: ResolutionCenterCaseCreatedWebhookEvent.Data;
1021
+ /**
1022
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
1023
+ */
1024
+ timestamp: string;
1025
+ /**
1026
+ * The webhook event type
1027
+ */
1028
+ type: 'resolution_center_case.created';
1029
+ /**
1030
+ * The company ID that this webhook event is associated with
1031
+ */
1032
+ company_id?: string | null;
1033
+ }
1034
+ export declare namespace ResolutionCenterCaseCreatedWebhookEvent {
1035
+ /**
1036
+ * A resolution center case is a dispute or support case between a user and a
1037
+ * company, tracking the issue, status, and outcome.
1038
+ */
1039
+ interface Data {
1040
+ /**
1041
+ * The unique identifier for the resolution.
1042
+ */
1043
+ id: string;
1044
+ /**
1045
+ * The company involved in this resolution case. Null if the company no longer
1046
+ * exists.
1047
+ */
1048
+ company: Data.Company | null;
1049
+ /**
1050
+ * The datetime the resolution was created.
1051
+ */
1052
+ created_at: string;
1053
+ /**
1054
+ * Whether the customer has filed an appeal after the initial resolution decision.
1055
+ */
1056
+ customer_appealed: boolean;
1057
+ /**
1058
+ * The list of actions currently available to the customer.
1059
+ */
1060
+ customer_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseCustomerResponse>;
1061
+ /**
1062
+ * The deadline by which the next response is required. Null if no deadline is
1063
+ * currently active. As a Unix timestamp.
1064
+ */
1065
+ due_date: string | null;
1066
+ /**
1067
+ * The category of the dispute.
1068
+ */
1069
+ issue: ResolutionCenterCasesAPI.ResolutionCenterCaseIssueType;
1070
+ /**
1071
+ * The membership record associated with the disputed payment. Null if the
1072
+ * membership no longer exists.
1073
+ */
1074
+ member: Data.Member | null;
1075
+ /**
1076
+ * Whether the merchant has filed an appeal after the initial resolution decision.
1077
+ */
1078
+ merchant_appealed: boolean;
1079
+ /**
1080
+ * The list of actions currently available to the merchant.
1081
+ */
1082
+ merchant_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseMerchantResponse>;
1083
+ /**
1084
+ * The payment record that is the subject of this resolution case.
1085
+ */
1086
+ payment: Data.Payment;
1087
+ /**
1088
+ * The list of actions currently available to the Whop platform for moderating this
1089
+ * resolution.
1090
+ */
1091
+ platform_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCasePlatformResponse>;
1092
+ /**
1093
+ * The most recent 50 messages, actions, and status changes that have occurred
1094
+ * during this resolution case.
1095
+ */
1096
+ resolution_events: Array<Data.ResolutionEvent>;
1097
+ /**
1098
+ * The current status of the resolution case, indicating which party needs to
1099
+ * respond or if the case is closed.
1100
+ */
1101
+ status: ResolutionCenterCasesAPI.ResolutionCenterCaseStatus;
1102
+ /**
1103
+ * The datetime the resolution was last updated.
1104
+ */
1105
+ updated_at: string;
1106
+ /**
1107
+ * The customer (buyer) who filed this resolution case.
1108
+ */
1109
+ user: Data.User;
1110
+ }
1111
+ namespace Data {
1112
+ /**
1113
+ * The company involved in this resolution case. Null if the company no longer
1114
+ * exists.
1115
+ */
1116
+ interface Company {
1117
+ /**
1118
+ * The unique identifier for the company.
1119
+ */
1120
+ id: string;
1121
+ /**
1122
+ * The display name of the company shown to customers.
1123
+ */
1124
+ title: string;
1125
+ }
1126
+ /**
1127
+ * The membership record associated with the disputed payment. Null if the
1128
+ * membership no longer exists.
1129
+ */
1130
+ interface Member {
1131
+ /**
1132
+ * The unique identifier for the extra public member.
1133
+ */
1134
+ id: string;
1135
+ }
1136
+ /**
1137
+ * The payment record that is the subject of this resolution case.
1138
+ */
1139
+ interface Payment {
1140
+ /**
1141
+ * The unique identifier for the payment.
1142
+ */
1143
+ id: string;
1144
+ /**
1145
+ * The datetime the payment was created.
1146
+ */
1147
+ created_at: string;
1148
+ /**
1149
+ * The available currencies on the platform
1150
+ */
1151
+ currency: Shared.Currency | null;
1152
+ /**
1153
+ * The time at which this payment was successfully collected. Null if the payment
1154
+ * has not yet succeeded. As a Unix timestamp.
1155
+ */
1156
+ paid_at: string | null;
1157
+ /**
1158
+ * The payment amount before taxes and discounts are applied. In the currency
1159
+ * specified by the currency field.
1160
+ */
1161
+ subtotal: number | null;
1162
+ /**
1163
+ * The total amount charged to the customer for this payment, including taxes and
1164
+ * after any discounts. In the currency specified by the currency field.
1165
+ */
1166
+ total: number;
1167
+ }
1168
+ /**
1169
+ * A resolution event is a message or action within a resolution case, such as a
1170
+ * response, escalation, or status change.
1171
+ */
1172
+ interface ResolutionEvent {
1173
+ /**
1174
+ * The unique identifier for the resolution event.
1175
+ */
1176
+ id: string;
1177
+ /**
1178
+ * The type of action recorded in this event.
1179
+ */
1180
+ action: 'created' | 'responded' | 'accepted' | 'denied' | 'appealed' | 'withdrew' | 'requested_more_info' | 'escalated' | 'dispute_opened' | 'dispute_customer_won' | 'dispute_merchant_won';
1181
+ /**
1182
+ * The datetime the resolution event was created.
1183
+ */
1184
+ created_at: string;
1185
+ /**
1186
+ * The message body or additional context provided with this resolution event. Null
1187
+ * if no details were included.
1188
+ */
1189
+ details: string | null;
1190
+ /**
1191
+ * The party who performed this action.
1192
+ */
1193
+ reporter_type: 'merchant' | 'customer' | 'platform' | 'system';
1194
+ }
1195
+ /**
1196
+ * The customer (buyer) who filed this resolution case.
1197
+ */
1198
+ interface User {
1199
+ /**
1200
+ * The unique identifier for the user.
1201
+ */
1202
+ id: string;
1203
+ /**
1204
+ * The user's display name shown on their public profile.
1205
+ */
1206
+ name: string | null;
1207
+ /**
1208
+ * The user's unique username shown on their public profile.
1209
+ */
1210
+ username: string;
1211
+ }
1212
+ }
1213
+ }
1214
+ export interface ResolutionCenterCaseUpdatedWebhookEvent {
1215
+ /**
1216
+ * A unique ID for every single webhook request
1217
+ */
1218
+ id: string;
1219
+ /**
1220
+ * The API version for this webhook
1221
+ */
1222
+ api_version: 'v1';
1223
+ /**
1224
+ * A resolution center case is a dispute or support case between a user and a
1225
+ * company, tracking the issue, status, and outcome.
1226
+ */
1227
+ data: ResolutionCenterCaseUpdatedWebhookEvent.Data;
1228
+ /**
1229
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
1230
+ */
1231
+ timestamp: string;
1232
+ /**
1233
+ * The webhook event type
1234
+ */
1235
+ type: 'resolution_center_case.updated';
1236
+ /**
1237
+ * The company ID that this webhook event is associated with
1238
+ */
1239
+ company_id?: string | null;
1240
+ }
1241
+ export declare namespace ResolutionCenterCaseUpdatedWebhookEvent {
1242
+ /**
1243
+ * A resolution center case is a dispute or support case between a user and a
1244
+ * company, tracking the issue, status, and outcome.
1245
+ */
1246
+ interface Data {
1247
+ /**
1248
+ * The unique identifier for the resolution.
1249
+ */
1250
+ id: string;
1251
+ /**
1252
+ * The company involved in this resolution case. Null if the company no longer
1253
+ * exists.
1254
+ */
1255
+ company: Data.Company | null;
1256
+ /**
1257
+ * The datetime the resolution was created.
1258
+ */
1259
+ created_at: string;
1260
+ /**
1261
+ * Whether the customer has filed an appeal after the initial resolution decision.
1262
+ */
1263
+ customer_appealed: boolean;
1264
+ /**
1265
+ * The list of actions currently available to the customer.
1266
+ */
1267
+ customer_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseCustomerResponse>;
1268
+ /**
1269
+ * The deadline by which the next response is required. Null if no deadline is
1270
+ * currently active. As a Unix timestamp.
1271
+ */
1272
+ due_date: string | null;
1273
+ /**
1274
+ * The category of the dispute.
1275
+ */
1276
+ issue: ResolutionCenterCasesAPI.ResolutionCenterCaseIssueType;
1277
+ /**
1278
+ * The membership record associated with the disputed payment. Null if the
1279
+ * membership no longer exists.
1280
+ */
1281
+ member: Data.Member | null;
1282
+ /**
1283
+ * Whether the merchant has filed an appeal after the initial resolution decision.
1284
+ */
1285
+ merchant_appealed: boolean;
1286
+ /**
1287
+ * The list of actions currently available to the merchant.
1288
+ */
1289
+ merchant_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseMerchantResponse>;
1290
+ /**
1291
+ * The payment record that is the subject of this resolution case.
1292
+ */
1293
+ payment: Data.Payment;
1294
+ /**
1295
+ * The list of actions currently available to the Whop platform for moderating this
1296
+ * resolution.
1297
+ */
1298
+ platform_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCasePlatformResponse>;
1299
+ /**
1300
+ * The most recent 50 messages, actions, and status changes that have occurred
1301
+ * during this resolution case.
1302
+ */
1303
+ resolution_events: Array<Data.ResolutionEvent>;
1304
+ /**
1305
+ * The current status of the resolution case, indicating which party needs to
1306
+ * respond or if the case is closed.
1307
+ */
1308
+ status: ResolutionCenterCasesAPI.ResolutionCenterCaseStatus;
1309
+ /**
1310
+ * The datetime the resolution was last updated.
1311
+ */
1312
+ updated_at: string;
1313
+ /**
1314
+ * The customer (buyer) who filed this resolution case.
1315
+ */
1316
+ user: Data.User;
1317
+ }
1318
+ namespace Data {
1319
+ /**
1320
+ * The company involved in this resolution case. Null if the company no longer
1321
+ * exists.
1322
+ */
1323
+ interface Company {
1324
+ /**
1325
+ * The unique identifier for the company.
1326
+ */
1327
+ id: string;
1328
+ /**
1329
+ * The display name of the company shown to customers.
1330
+ */
1331
+ title: string;
1332
+ }
1333
+ /**
1334
+ * The membership record associated with the disputed payment. Null if the
1335
+ * membership no longer exists.
1336
+ */
1337
+ interface Member {
1338
+ /**
1339
+ * The unique identifier for the extra public member.
1340
+ */
1341
+ id: string;
1342
+ }
1343
+ /**
1344
+ * The payment record that is the subject of this resolution case.
1345
+ */
1346
+ interface Payment {
1347
+ /**
1348
+ * The unique identifier for the payment.
1349
+ */
1350
+ id: string;
1351
+ /**
1352
+ * The datetime the payment was created.
1353
+ */
1354
+ created_at: string;
1355
+ /**
1356
+ * The available currencies on the platform
1357
+ */
1358
+ currency: Shared.Currency | null;
1359
+ /**
1360
+ * The time at which this payment was successfully collected. Null if the payment
1361
+ * has not yet succeeded. As a Unix timestamp.
1362
+ */
1363
+ paid_at: string | null;
1364
+ /**
1365
+ * The payment amount before taxes and discounts are applied. In the currency
1366
+ * specified by the currency field.
1367
+ */
1368
+ subtotal: number | null;
1369
+ /**
1370
+ * The total amount charged to the customer for this payment, including taxes and
1371
+ * after any discounts. In the currency specified by the currency field.
1372
+ */
1373
+ total: number;
1374
+ }
1375
+ /**
1376
+ * A resolution event is a message or action within a resolution case, such as a
1377
+ * response, escalation, or status change.
1378
+ */
1379
+ interface ResolutionEvent {
1380
+ /**
1381
+ * The unique identifier for the resolution event.
1382
+ */
1383
+ id: string;
1384
+ /**
1385
+ * The type of action recorded in this event.
1386
+ */
1387
+ action: 'created' | 'responded' | 'accepted' | 'denied' | 'appealed' | 'withdrew' | 'requested_more_info' | 'escalated' | 'dispute_opened' | 'dispute_customer_won' | 'dispute_merchant_won';
1388
+ /**
1389
+ * The datetime the resolution event was created.
1390
+ */
1391
+ created_at: string;
1392
+ /**
1393
+ * The message body or additional context provided with this resolution event. Null
1394
+ * if no details were included.
1395
+ */
1396
+ details: string | null;
1397
+ /**
1398
+ * The party who performed this action.
1399
+ */
1400
+ reporter_type: 'merchant' | 'customer' | 'platform' | 'system';
1401
+ }
1402
+ /**
1403
+ * The customer (buyer) who filed this resolution case.
1404
+ */
1405
+ interface User {
1406
+ /**
1407
+ * The unique identifier for the user.
1408
+ */
1409
+ id: string;
1410
+ /**
1411
+ * The user's display name shown on their public profile.
1412
+ */
1413
+ name: string | null;
1414
+ /**
1415
+ * The user's unique username shown on their public profile.
1416
+ */
1417
+ username: string;
1418
+ }
1419
+ }
1420
+ }
1421
+ export interface ResolutionCenterCaseDecidedWebhookEvent {
1422
+ /**
1423
+ * A unique ID for every single webhook request
1424
+ */
1425
+ id: string;
1426
+ /**
1427
+ * The API version for this webhook
1428
+ */
1429
+ api_version: 'v1';
1430
+ /**
1431
+ * A resolution center case is a dispute or support case between a user and a
1432
+ * company, tracking the issue, status, and outcome.
1433
+ */
1434
+ data: ResolutionCenterCaseDecidedWebhookEvent.Data;
1435
+ /**
1436
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
1437
+ */
1438
+ timestamp: string;
1439
+ /**
1440
+ * The webhook event type
1441
+ */
1442
+ type: 'resolution_center_case.decided';
1443
+ /**
1444
+ * The company ID that this webhook event is associated with
1445
+ */
1446
+ company_id?: string | null;
1447
+ }
1448
+ export declare namespace ResolutionCenterCaseDecidedWebhookEvent {
1449
+ /**
1450
+ * A resolution center case is a dispute or support case between a user and a
1451
+ * company, tracking the issue, status, and outcome.
1452
+ */
1453
+ interface Data {
1454
+ /**
1455
+ * The unique identifier for the resolution.
1456
+ */
1457
+ id: string;
1458
+ /**
1459
+ * The company involved in this resolution case. Null if the company no longer
1460
+ * exists.
1461
+ */
1462
+ company: Data.Company | null;
1463
+ /**
1464
+ * The datetime the resolution was created.
1465
+ */
1466
+ created_at: string;
1467
+ /**
1468
+ * Whether the customer has filed an appeal after the initial resolution decision.
1469
+ */
1470
+ customer_appealed: boolean;
1471
+ /**
1472
+ * The list of actions currently available to the customer.
1473
+ */
1474
+ customer_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseCustomerResponse>;
1475
+ /**
1476
+ * The deadline by which the next response is required. Null if no deadline is
1477
+ * currently active. As a Unix timestamp.
1478
+ */
1479
+ due_date: string | null;
1480
+ /**
1481
+ * The category of the dispute.
1482
+ */
1483
+ issue: ResolutionCenterCasesAPI.ResolutionCenterCaseIssueType;
1484
+ /**
1485
+ * The membership record associated with the disputed payment. Null if the
1486
+ * membership no longer exists.
1487
+ */
1488
+ member: Data.Member | null;
1489
+ /**
1490
+ * Whether the merchant has filed an appeal after the initial resolution decision.
1491
+ */
1492
+ merchant_appealed: boolean;
1493
+ /**
1494
+ * The list of actions currently available to the merchant.
1495
+ */
1496
+ merchant_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCaseMerchantResponse>;
1497
+ /**
1498
+ * The payment record that is the subject of this resolution case.
1499
+ */
1500
+ payment: Data.Payment;
1501
+ /**
1502
+ * The list of actions currently available to the Whop platform for moderating this
1503
+ * resolution.
1504
+ */
1505
+ platform_response_actions: Array<ResolutionCenterCasesAPI.ResolutionCenterCasePlatformResponse>;
1506
+ /**
1507
+ * The most recent 50 messages, actions, and status changes that have occurred
1508
+ * during this resolution case.
1509
+ */
1510
+ resolution_events: Array<Data.ResolutionEvent>;
1511
+ /**
1512
+ * The current status of the resolution case, indicating which party needs to
1513
+ * respond or if the case is closed.
1514
+ */
1515
+ status: ResolutionCenterCasesAPI.ResolutionCenterCaseStatus;
1516
+ /**
1517
+ * The datetime the resolution was last updated.
1518
+ */
1519
+ updated_at: string;
1520
+ /**
1521
+ * The customer (buyer) who filed this resolution case.
1522
+ */
1523
+ user: Data.User;
1524
+ }
1525
+ namespace Data {
1526
+ /**
1527
+ * The company involved in this resolution case. Null if the company no longer
1528
+ * exists.
1529
+ */
1530
+ interface Company {
1531
+ /**
1532
+ * The unique identifier for the company.
1533
+ */
1534
+ id: string;
1535
+ /**
1536
+ * The display name of the company shown to customers.
1537
+ */
1538
+ title: string;
1539
+ }
1540
+ /**
1541
+ * The membership record associated with the disputed payment. Null if the
1542
+ * membership no longer exists.
1543
+ */
1544
+ interface Member {
1545
+ /**
1546
+ * The unique identifier for the extra public member.
1547
+ */
1548
+ id: string;
1549
+ }
1550
+ /**
1551
+ * The payment record that is the subject of this resolution case.
1552
+ */
1553
+ interface Payment {
1554
+ /**
1555
+ * The unique identifier for the payment.
1556
+ */
1557
+ id: string;
1558
+ /**
1559
+ * The datetime the payment was created.
1560
+ */
1561
+ created_at: string;
1562
+ /**
1563
+ * The available currencies on the platform
1564
+ */
1565
+ currency: Shared.Currency | null;
1566
+ /**
1567
+ * The time at which this payment was successfully collected. Null if the payment
1568
+ * has not yet succeeded. As a Unix timestamp.
1569
+ */
1570
+ paid_at: string | null;
1571
+ /**
1572
+ * The payment amount before taxes and discounts are applied. In the currency
1573
+ * specified by the currency field.
1574
+ */
1575
+ subtotal: number | null;
1576
+ /**
1577
+ * The total amount charged to the customer for this payment, including taxes and
1578
+ * after any discounts. In the currency specified by the currency field.
1579
+ */
1580
+ total: number;
1581
+ }
1582
+ /**
1583
+ * A resolution event is a message or action within a resolution case, such as a
1584
+ * response, escalation, or status change.
1585
+ */
1586
+ interface ResolutionEvent {
1587
+ /**
1588
+ * The unique identifier for the resolution event.
1589
+ */
1590
+ id: string;
1591
+ /**
1592
+ * The type of action recorded in this event.
1593
+ */
1594
+ action: 'created' | 'responded' | 'accepted' | 'denied' | 'appealed' | 'withdrew' | 'requested_more_info' | 'escalated' | 'dispute_opened' | 'dispute_customer_won' | 'dispute_merchant_won';
1595
+ /**
1596
+ * The datetime the resolution event was created.
1597
+ */
1598
+ created_at: string;
1599
+ /**
1600
+ * The message body or additional context provided with this resolution event. Null
1601
+ * if no details were included.
1602
+ */
1603
+ details: string | null;
1604
+ /**
1605
+ * The party who performed this action.
1606
+ */
1607
+ reporter_type: 'merchant' | 'customer' | 'platform' | 'system';
1608
+ }
1609
+ /**
1610
+ * The customer (buyer) who filed this resolution case.
1611
+ */
1612
+ interface User {
1613
+ /**
1614
+ * The unique identifier for the user.
1615
+ */
1616
+ id: string;
1617
+ /**
1618
+ * The user's display name shown on their public profile.
1619
+ */
1620
+ name: string | null;
1621
+ /**
1622
+ * The user's unique username shown on their public profile.
1623
+ */
1624
+ username: string;
1625
+ }
1626
+ }
1627
+ }
978
1628
  export interface PaymentCreatedWebhookEvent {
979
1629
  /**
980
1630
  * A unique ID for every single webhook request
@@ -1818,7 +2468,7 @@ export interface MembershipCancelAtPeriodEndChangedWebhookEvent {
1818
2468
  */
1819
2469
  company_id?: string | null;
1820
2470
  }
1821
- export type UnwrapWebhookEvent = InvoiceCreatedWebhookEvent | InvoicePaidWebhookEvent | InvoicePastDueWebhookEvent | InvoiceVoidedWebhookEvent | MembershipActivatedWebhookEvent | MembershipDeactivatedWebhookEvent | EntryCreatedWebhookEvent | EntryApprovedWebhookEvent | EntryDeniedWebhookEvent | EntryDeletedWebhookEvent | SetupIntentRequiresActionWebhookEvent | SetupIntentSucceededWebhookEvent | SetupIntentCanceledWebhookEvent | WithdrawalCreatedWebhookEvent | WithdrawalUpdatedWebhookEvent | CourseLessonInteractionCompletedWebhookEvent | PayoutMethodCreatedWebhookEvent | VerificationSucceededWebhookEvent | PayoutAccountStatusUpdatedWebhookEvent | PaymentCreatedWebhookEvent | PaymentSucceededWebhookEvent | PaymentFailedWebhookEvent | PaymentPendingWebhookEvent | DisputeCreatedWebhookEvent | DisputeUpdatedWebhookEvent | RefundCreatedWebhookEvent | RefundUpdatedWebhookEvent | DisputeAlertCreatedWebhookEvent | MembershipCancelAtPeriodEndChangedWebhookEvent;
2471
+ export type UnwrapWebhookEvent = InvoiceCreatedWebhookEvent | InvoiceMarkedUncollectibleWebhookEvent | InvoicePaidWebhookEvent | InvoicePastDueWebhookEvent | InvoiceVoidedWebhookEvent | MembershipActivatedWebhookEvent | MembershipDeactivatedWebhookEvent | EntryCreatedWebhookEvent | EntryApprovedWebhookEvent | EntryDeniedWebhookEvent | EntryDeletedWebhookEvent | SetupIntentRequiresActionWebhookEvent | SetupIntentSucceededWebhookEvent | SetupIntentCanceledWebhookEvent | WithdrawalCreatedWebhookEvent | WithdrawalUpdatedWebhookEvent | CourseLessonInteractionCompletedWebhookEvent | PayoutMethodCreatedWebhookEvent | VerificationSucceededWebhookEvent | PayoutAccountStatusUpdatedWebhookEvent | ResolutionCenterCaseCreatedWebhookEvent | ResolutionCenterCaseUpdatedWebhookEvent | ResolutionCenterCaseDecidedWebhookEvent | PaymentCreatedWebhookEvent | PaymentSucceededWebhookEvent | PaymentFailedWebhookEvent | PaymentPendingWebhookEvent | DisputeCreatedWebhookEvent | DisputeUpdatedWebhookEvent | RefundCreatedWebhookEvent | RefundUpdatedWebhookEvent | DisputeAlertCreatedWebhookEvent | MembershipCancelAtPeriodEndChangedWebhookEvent;
1822
2472
  export interface WebhookCreateParams {
1823
2473
  /**
1824
2474
  * The URL to send the webhook to.
@@ -1888,6 +2538,6 @@ export interface WebhookListParams extends CursorPageParams {
1888
2538
  last?: number | null;
1889
2539
  }
1890
2540
  export declare namespace Webhooks {
1891
- export { type APIVersion as APIVersion, type Webhook as Webhook, type WebhookEvent as WebhookEvent, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent, type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent, type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent, type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent, type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent, type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent, type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent, type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent, type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent, type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent, type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent, type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent, type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent, type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent, type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent, type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent, type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent, type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent, type PayoutAccountStatusUpdatedWebhookEvent as PayoutAccountStatusUpdatedWebhookEvent, type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent, type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent, type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent, type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent, type DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
2541
+ export { type APIVersion as APIVersion, type Webhook as Webhook, type WebhookEvent as WebhookEvent, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent, type InvoiceMarkedUncollectibleWebhookEvent as InvoiceMarkedUncollectibleWebhookEvent, type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent, type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent, type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent, type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent, type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent, type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent, type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent, type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent, type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent, type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent, type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent, type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent, type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent, type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent, type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent, type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent, type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent, type PayoutAccountStatusUpdatedWebhookEvent as PayoutAccountStatusUpdatedWebhookEvent, type ResolutionCenterCaseCreatedWebhookEvent as ResolutionCenterCaseCreatedWebhookEvent, type ResolutionCenterCaseUpdatedWebhookEvent as ResolutionCenterCaseUpdatedWebhookEvent, type ResolutionCenterCaseDecidedWebhookEvent as ResolutionCenterCaseDecidedWebhookEvent, type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent, type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent, type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent, type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent, type DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
1892
2542
  }
1893
2543
  //# sourceMappingURL=webhooks.d.mts.map