@whop/cli 0.19.0 → 0.20.0

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.
package/dist/index.js CHANGED
@@ -1621,20 +1621,20 @@ var require_parse_async = __commonJS({
1621
1621
  const index2 = 0;
1622
1622
  const blocksize = opts.blocksize || 40960;
1623
1623
  const parser = new TOMLParser();
1624
- return new Promise((resolve9, reject) => {
1625
- setImmediate(parseAsyncNext, index2, blocksize, resolve9, reject);
1624
+ return new Promise((resolve10, reject) => {
1625
+ setImmediate(parseAsyncNext, index2, blocksize, resolve10, reject);
1626
1626
  });
1627
- function parseAsyncNext(index3, blocksize2, resolve9, reject) {
1627
+ function parseAsyncNext(index3, blocksize2, resolve10, reject) {
1628
1628
  if (index3 >= str2.length) {
1629
1629
  try {
1630
- return resolve9(parser.finish());
1630
+ return resolve10(parser.finish());
1631
1631
  } catch (err2) {
1632
1632
  return reject(prettyError(err2, str2));
1633
1633
  }
1634
1634
  }
1635
1635
  try {
1636
1636
  parser.parse(str2.slice(index3, index3 + blocksize2));
1637
- setImmediate(parseAsyncNext, index3 + blocksize2, blocksize2, resolve9, reject);
1637
+ setImmediate(parseAsyncNext, index3 + blocksize2, blocksize2, resolve10, reject);
1638
1638
  } catch (err2) {
1639
1639
  reject(prettyError(err2, str2));
1640
1640
  }
@@ -1660,7 +1660,7 @@ var require_parse_stream = __commonJS({
1660
1660
  function parseReadable(stm) {
1661
1661
  const parser = new TOMLParser();
1662
1662
  stm.setEncoding("utf8");
1663
- return new Promise((resolve9, reject) => {
1663
+ return new Promise((resolve10, reject) => {
1664
1664
  let readable;
1665
1665
  let ended = false;
1666
1666
  let errored = false;
@@ -1668,7 +1668,7 @@ var require_parse_stream = __commonJS({
1668
1668
  ended = true;
1669
1669
  if (readable) return;
1670
1670
  try {
1671
- resolve9(parser.finish());
1671
+ resolve10(parser.finish());
1672
1672
  } catch (err2) {
1673
1673
  reject(err2);
1674
1674
  }
@@ -13597,7 +13597,7 @@ async function waitForMcpDoctorResponses(chunks, finished) {
13597
13597
  while (!finished() && (chunks.join("").match(/\n/g)?.length ?? 0) < 2) {
13598
13598
  if (Date.now() - started >= 1e3)
13599
13599
  return;
13600
- await new Promise((resolve9) => setTimeout(resolve9, 5));
13600
+ await new Promise((resolve10) => setTimeout(resolve10, 5));
13601
13601
  }
13602
13602
  }
13603
13603
  function parseMcpDoctorResponses(chunks) {
@@ -14121,11 +14121,11 @@ function resolveDisplayName(name, aliases) {
14121
14121
  const bin = process.argv[1];
14122
14122
  if (!bin)
14123
14123
  return name;
14124
- const basename3 = path3.basename(bin);
14125
- if (basename3 === name)
14124
+ const basename4 = path3.basename(bin);
14125
+ if (basename4 === name)
14126
14126
  return name;
14127
- if (aliases?.includes(basename3))
14128
- return basename3;
14127
+ if (aliases?.includes(basename4))
14128
+ return basename4;
14129
14129
  return name;
14130
14130
  }
14131
14131
 
@@ -14259,7 +14259,7 @@ var native_spec_default = {
14259
14259
  "x-whop-summary": "Issue cards that spend from a balance."
14260
14260
  },
14261
14261
  {
14262
- description: "Cashback rules designate a funding platform, optional merchant name and category filters, a rate, and an eligibility window. Every supplied merchant filter must match. An account ID limits the rule to one of the platform's direct connected accounts and is required when both merchant filters are omitted or null.\n\nUse the Cashback Rules API to create future-dated rules, update their merchant name, MCC, description, or expiration, and list every rule funded by the authenticated platform, including expired and discarded rules. Discarded rules cannot be updated. Creating or updating a rule does not transfer funds.\n",
14262
+ description: "Cashback rules designate a funding platform, optional merchant name and category filters, a rate, and an eligibility window. Every supplied merchant filter must match. An account ID limits the rule to one of the platform's direct connected accounts and is required when both merchant filters are omitted or null.\n\nUse the Cashback Rules API to create future-dated rules, update their merchant name, MCC, description, or expiration, and list every rule funded by the authenticated platform, including expired and discarded rules. Discarded rules cannot be updated. Creating or updating a rule does not transfer funds.\n\nPay out cashback on demand from the platform's available USD balance with optional rule, account, and transaction filters. Only completed, unpaid, eligible transactions are paid. The response returns status `processing` and echoes supplied filters; `failed` means the queue rejected the request. These statuses describe scheduling, not payment completion.\n",
14263
14263
  name: "Cashback Rules",
14264
14264
  "x-whop-summary": "Configure platform-sponsored card cashback."
14265
14265
  },
@@ -14689,6 +14689,7 @@ var native_spec_default = {
14689
14689
  page_info: {
14690
14690
  properties: {
14691
14691
  end_cursor: {
14692
+ example: null,
14692
14693
  type: ["string", "null"]
14693
14694
  },
14694
14695
  has_next_page: {
@@ -16290,6 +16291,7 @@ var native_spec_default = {
16290
16291
  },
16291
16292
  business_name: {
16292
16293
  description: "The business name on the latest application.",
16294
+ example: null,
16293
16295
  type: ["string", "null"]
16294
16296
  },
16295
16297
  business_type: {
@@ -16318,10 +16320,12 @@ var native_spec_default = {
16318
16320
  },
16319
16321
  denial_reason: {
16320
16322
  description: "Why the latest application was denied. `null` unless `status` is `denied`.",
16323
+ example: null,
16321
16324
  type: ["string", "null"]
16322
16325
  },
16323
16326
  request_id: {
16324
16327
  description: "The latest application's request ID, prefixed `inrq_`. `null` until the account applies.",
16328
+ example: null,
16325
16329
  type: ["string", "null"]
16326
16330
  },
16327
16331
  status: {
@@ -16338,6 +16342,7 @@ var native_spec_default = {
16338
16342
  },
16339
16343
  url: {
16340
16344
  description: "The website on the latest application.",
16345
+ example: null,
16341
16346
  type: ["string", "null"]
16342
16347
  }
16343
16348
  },
@@ -16516,6 +16521,7 @@ var native_spec_default = {
16516
16521
  },
16517
16522
  economic_intelligence_ends_at: {
16518
16523
  description: "When the account's committed Economic Intelligence period ends, as an ISO 8601 timestamp. Economic Intelligence can't be turned off before then. `null` when Economic Intelligence is off or has no end date.",
16524
+ example: null,
16519
16525
  type: ["string", "null"]
16520
16526
  },
16521
16527
  economic_intelligence_offers: {
@@ -16799,6 +16805,7 @@ var native_spec_default = {
16799
16805
  },
16800
16806
  business_name: {
16801
16807
  description: "The business name on the latest application.",
16808
+ example: null,
16802
16809
  type: ["string", "null"]
16803
16810
  },
16804
16811
  business_type: {
@@ -16827,6 +16834,7 @@ var native_spec_default = {
16827
16834
  },
16828
16835
  denial_reason: {
16829
16836
  description: "Why the latest application was denied. `null` unless `status` is `denied`.",
16837
+ example: null,
16830
16838
  type: ["string", "null"]
16831
16839
  },
16832
16840
  request_id: {
@@ -16848,6 +16856,7 @@ var native_spec_default = {
16848
16856
  },
16849
16857
  url: {
16850
16858
  description: "The website on the latest application.",
16859
+ example: null,
16851
16860
  type: ["string", "null"]
16852
16861
  }
16853
16862
  },
@@ -18867,6 +18876,7 @@ var native_spec_default = {
18867
18876
  page_info: {
18868
18877
  properties: {
18869
18878
  end_cursor: {
18879
+ example: null,
18870
18880
  nullable: true,
18871
18881
  type: "string"
18872
18882
  },
@@ -19759,6 +19769,7 @@ var native_spec_default = {
19759
19769
  page_info: {
19760
19770
  properties: {
19761
19771
  end_cursor: {
19772
+ example: null,
19762
19773
  nullable: true,
19763
19774
  type: "string"
19764
19775
  },
@@ -19771,6 +19782,7 @@ var native_spec_default = {
19771
19782
  type: "boolean"
19772
19783
  },
19773
19784
  start_cursor: {
19785
+ example: null,
19774
19786
  nullable: true,
19775
19787
  type: "string"
19776
19788
  }
@@ -20551,6 +20563,7 @@ var native_spec_default = {
20551
20563
  page_info: {
20552
20564
  properties: {
20553
20565
  end_cursor: {
20566
+ example: null,
20554
20567
  nullable: true,
20555
20568
  type: "string"
20556
20569
  },
@@ -21995,6 +22008,7 @@ var native_spec_default = {
21995
22008
  page_info: {
21996
22009
  properties: {
21997
22010
  end_cursor: {
22011
+ example: null,
21998
22012
  nullable: true,
21999
22013
  type: "string"
22000
22014
  },
@@ -23339,6 +23353,7 @@ var native_spec_default = {
23339
23353
  page_info: {
23340
23354
  properties: {
23341
23355
  end_cursor: {
23356
+ example: null,
23342
23357
  type: ["string", "null"]
23343
23358
  },
23344
23359
  has_next_page: {
@@ -23350,6 +23365,7 @@ var native_spec_default = {
23350
23365
  type: "boolean"
23351
23366
  },
23352
23367
  start_cursor: {
23368
+ example: null,
23353
23369
  type: ["string", "null"]
23354
23370
  }
23355
23371
  },
@@ -23591,6 +23607,7 @@ var native_spec_default = {
23591
23607
  page_info: {
23592
23608
  properties: {
23593
23609
  end_cursor: {
23610
+ example: null,
23594
23611
  nullable: true,
23595
23612
  type: "string"
23596
23613
  },
@@ -23603,6 +23620,7 @@ var native_spec_default = {
23603
23620
  type: "boolean"
23604
23621
  },
23605
23622
  start_cursor: {
23623
+ example: null,
23606
23624
  nullable: true,
23607
23625
  type: "string"
23608
23626
  }
@@ -23761,6 +23779,7 @@ var native_spec_default = {
23761
23779
  page_info: {
23762
23780
  properties: {
23763
23781
  end_cursor: {
23782
+ example: null,
23764
23783
  type: ["string", "null"]
23765
23784
  },
23766
23785
  has_next_page: {
@@ -25224,6 +25243,7 @@ var native_spec_default = {
25224
25243
  page_info: {
25225
25244
  properties: {
25226
25245
  end_cursor: {
25246
+ example: null,
25227
25247
  type: ["string", "null"]
25228
25248
  },
25229
25249
  has_next_page: {
@@ -25887,6 +25907,7 @@ var native_spec_default = {
25887
25907
  page_info: {
25888
25908
  properties: {
25889
25909
  end_cursor: {
25910
+ example: null,
25890
25911
  type: ["string", "null"]
25891
25912
  },
25892
25913
  has_next_page: {
@@ -26267,6 +26288,7 @@ var native_spec_default = {
26267
26288
  page_info: {
26268
26289
  properties: {
26269
26290
  end_cursor: {
26291
+ example: null,
26270
26292
  type: ["string", "null"]
26271
26293
  },
26272
26294
  has_next_page: {
@@ -26778,6 +26800,7 @@ var native_spec_default = {
26778
26800
  page_info: {
26779
26801
  properties: {
26780
26802
  end_cursor: {
26803
+ example: null,
26781
26804
  type: ["string", "null"]
26782
26805
  },
26783
26806
  has_next_page: {
@@ -27412,6 +27435,7 @@ var native_spec_default = {
27412
27435
  page_info: {
27413
27436
  properties: {
27414
27437
  end_cursor: {
27438
+ example: null,
27415
27439
  type: ["string", "null"]
27416
27440
  },
27417
27441
  has_next_page: {
@@ -27950,6 +27974,7 @@ var native_spec_default = {
27950
27974
  },
27951
27975
  canceled_at: {
27952
27976
  description: "When the card was canceled.",
27977
+ example: null,
27953
27978
  format: "date-time",
27954
27979
  type: ["string", "null"]
27955
27980
  },
@@ -29055,6 +29080,7 @@ var native_spec_default = {
29055
29080
  page_info: {
29056
29081
  properties: {
29057
29082
  end_cursor: {
29083
+ example: null,
29058
29084
  type: ["string", "null"]
29059
29085
  },
29060
29086
  has_next_page: {
@@ -29066,6 +29092,7 @@ var native_spec_default = {
29066
29092
  type: "boolean"
29067
29093
  },
29068
29094
  start_cursor: {
29095
+ example: null,
29069
29096
  type: ["string", "null"]
29070
29097
  }
29071
29098
  },
@@ -29112,6 +29139,97 @@ var native_spec_default = {
29112
29139
  }
29113
29140
  }
29114
29141
  },
29142
+ "/cashback_rules/payout": {
29143
+ post: {
29144
+ description: "Distributes cashback on demand from the authenticated platform's available USD balance to its direct connected accounts. Requires payout:transfer_funds. Optional filters combine; an empty body includes all eligible transactions. Only completed, unpaid transactions created before this request are considered. The latest matching rule wins; its funding account must be the authenticated platform. Amounts are calculated when processed. Returns status `processing` and echoes supplied filters when background processing is queued. Status `failed` with HTTP 200 means the queue rejected the request. This is not a payment confirmation. Failed transaction jobs retry automatically; insufficient funds requires adding USD to the funding wallet. Supports Idempotency-Key, and overlapping requests cannot pay the same card transaction twice.",
29145
+ operationId: "payout",
29146
+ parameters: [
29147
+ {
29148
+ $ref: "#/components/parameters/ApiVersionDate"
29149
+ },
29150
+ {
29151
+ description: "Client-generated key for replaying the same request safely for 24 hours.",
29152
+ in: "header",
29153
+ name: "Idempotency-Key",
29154
+ required: false,
29155
+ schema: {
29156
+ maxLength: 255,
29157
+ minLength: 1,
29158
+ type: "string"
29159
+ }
29160
+ }
29161
+ ],
29162
+ requestBody: {
29163
+ content: {
29164
+ "application/json": {
29165
+ schema: {
29166
+ additionalProperties: false,
29167
+ properties: {
29168
+ account_id: {
29169
+ description: "Pay only this direct connected account.",
29170
+ pattern: "^biz_",
29171
+ type: ["string", "null"]
29172
+ },
29173
+ cashback_rule_id: {
29174
+ description: "Pay only transactions whose winning cashback rule has this ID and is funded by the authenticated platform.",
29175
+ pattern: "^cicbr_",
29176
+ type: ["string", "null"]
29177
+ },
29178
+ transaction_id: {
29179
+ description: "Pay only this card transaction belonging to a direct connected account.",
29180
+ example: "citx_xxxxxxxxxxxxxx",
29181
+ pattern: "^citx_",
29182
+ type: ["string", "null"]
29183
+ }
29184
+ },
29185
+ type: "object"
29186
+ }
29187
+ }
29188
+ },
29189
+ required: true
29190
+ },
29191
+ responses: {
29192
+ "200": {
29193
+ content: {
29194
+ "application/json": {
29195
+ schema: {
29196
+ $ref: "#/components/schemas/CashbackPayout"
29197
+ }
29198
+ }
29199
+ },
29200
+ description: "queue rejected the request"
29201
+ },
29202
+ "202": {
29203
+ content: {
29204
+ "application/json": {
29205
+ schema: {
29206
+ $ref: "#/components/schemas/CashbackPayout"
29207
+ }
29208
+ }
29209
+ },
29210
+ description: "payout queued"
29211
+ },
29212
+ "400": {
29213
+ $ref: "#/components/responses/InvalidParameters",
29214
+ description: "invalid filter"
29215
+ },
29216
+ "401": {
29217
+ $ref: "#/components/responses/Unauthorized",
29218
+ description: "authentication required"
29219
+ },
29220
+ "409": {
29221
+ $ref: "#/components/responses/Conflict"
29222
+ }
29223
+ },
29224
+ security: [
29225
+ {
29226
+ bearerAuth: []
29227
+ }
29228
+ ],
29229
+ summary: "Pay Out Cashback",
29230
+ tags: ["Cashback Rules"]
29231
+ }
29232
+ },
29115
29233
  "/cashback_rules/{id}": {
29116
29234
  patch: {
29117
29235
  description: "Updates a cashback rule funded by the authenticated platform account. Requires payout:transfer_funds. Only merchant_name, merchant_category_code, description, and expires_at can change; starts_at, rate_bps, funding_account_id, and scoped_account_id are immutable. Omitted fields stay unchanged. Scheduled, active, and expired rules can be updated; discarded rules cannot. Updating a rule does not transfer funds.",
@@ -29535,6 +29653,7 @@ var native_spec_default = {
29535
29653
  page_info: {
29536
29654
  properties: {
29537
29655
  end_cursor: {
29656
+ example: null,
29538
29657
  type: ["string", "null"]
29539
29658
  },
29540
29659
  has_next_page: {
@@ -30905,6 +31024,7 @@ var native_spec_default = {
30905
31024
  page_info: {
30906
31025
  properties: {
30907
31026
  end_cursor: {
31027
+ example: null,
30908
31028
  type: ["string", "null"]
30909
31029
  },
30910
31030
  has_next_page: {
@@ -31172,6 +31292,7 @@ var native_spec_default = {
31172
31292
  page_info: {
31173
31293
  properties: {
31174
31294
  end_cursor: {
31295
+ example: null,
31175
31296
  type: ["string", "null"]
31176
31297
  },
31177
31298
  has_next_page: {
@@ -32228,6 +32349,7 @@ var native_spec_default = {
32228
32349
  page_info: {
32229
32350
  properties: {
32230
32351
  end_cursor: {
32352
+ example: null,
32231
32353
  type: ["string", "null"]
32232
32354
  },
32233
32355
  has_next_page: {
@@ -32602,6 +32724,7 @@ var native_spec_default = {
32602
32724
  page_info: {
32603
32725
  properties: {
32604
32726
  end_cursor: {
32727
+ example: null,
32605
32728
  type: ["string", "null"]
32606
32729
  },
32607
32730
  has_next_page: {
@@ -34354,6 +34477,7 @@ var native_spec_default = {
34354
34477
  page_info: {
34355
34478
  properties: {
34356
34479
  end_cursor: {
34480
+ example: null,
34357
34481
  type: ["string", "null"]
34358
34482
  },
34359
34483
  has_next_page: {
@@ -35279,6 +35403,7 @@ var native_spec_default = {
35279
35403
  page_info: {
35280
35404
  properties: {
35281
35405
  end_cursor: {
35406
+ example: null,
35282
35407
  type: ["string", "null"]
35283
35408
  },
35284
35409
  has_next_page: {
@@ -35948,6 +36073,7 @@ var native_spec_default = {
35948
36073
  page_info: {
35949
36074
  properties: {
35950
36075
  end_cursor: {
36076
+ example: null,
35951
36077
  type: ["string", "null"]
35952
36078
  },
35953
36079
  has_next_page: {
@@ -37650,6 +37776,7 @@ var native_spec_default = {
37650
37776
  $ref: "#/components/schemas/Money"
37651
37777
  },
37652
37778
  {
37779
+ example: null,
37653
37780
  type: "null"
37654
37781
  }
37655
37782
  ]
@@ -38067,6 +38194,7 @@ var native_spec_default = {
38067
38194
  page_info: {
38068
38195
  properties: {
38069
38196
  end_cursor: {
38197
+ example: null,
38070
38198
  type: ["string", "null"]
38071
38199
  },
38072
38200
  has_next_page: {
@@ -38291,6 +38419,7 @@ var native_spec_default = {
38291
38419
  page_info: {
38292
38420
  properties: {
38293
38421
  end_cursor: {
38422
+ example: null,
38294
38423
  type: ["string", "null"]
38295
38424
  },
38296
38425
  has_next_page: {
@@ -38509,6 +38638,7 @@ var native_spec_default = {
38509
38638
  page_info: {
38510
38639
  properties: {
38511
38640
  end_cursor: {
38641
+ example: null,
38512
38642
  type: ["string", "null"]
38513
38643
  },
38514
38644
  has_next_page: {
@@ -39853,6 +39983,7 @@ var native_spec_default = {
39853
39983
  page_info: {
39854
39984
  properties: {
39855
39985
  end_cursor: {
39986
+ example: null,
39856
39987
  type: ["string", "null"]
39857
39988
  },
39858
39989
  has_next_page: {
@@ -40095,6 +40226,7 @@ var native_spec_default = {
40095
40226
  page_info: {
40096
40227
  properties: {
40097
40228
  end_cursor: {
40229
+ example: null,
40098
40230
  type: ["string", "null"]
40099
40231
  },
40100
40232
  has_next_page: {
@@ -41119,6 +41251,7 @@ var native_spec_default = {
41119
41251
  page_info: {
41120
41252
  properties: {
41121
41253
  end_cursor: {
41254
+ example: null,
41122
41255
  type: ["string", "null"]
41123
41256
  },
41124
41257
  has_next_page: {
@@ -42130,6 +42263,7 @@ var native_spec_default = {
42130
42263
  page_info: {
42131
42264
  properties: {
42132
42265
  end_cursor: {
42266
+ example: null,
42133
42267
  type: ["string", "null"]
42134
42268
  },
42135
42269
  has_next_page: {
@@ -42577,6 +42711,7 @@ var native_spec_default = {
42577
42711
  page_info: {
42578
42712
  properties: {
42579
42713
  end_cursor: {
42714
+ example: null,
42580
42715
  type: ["string", "null"]
42581
42716
  },
42582
42717
  has_next_page: {
@@ -42843,6 +42978,7 @@ var native_spec_default = {
42843
42978
  page_info: {
42844
42979
  properties: {
42845
42980
  end_cursor: {
42981
+ example: null,
42846
42982
  type: ["string", "null"]
42847
42983
  },
42848
42984
  has_next_page: {
@@ -43305,6 +43441,7 @@ var native_spec_default = {
43305
43441
  page_info: {
43306
43442
  properties: {
43307
43443
  end_cursor: {
43444
+ example: null,
43308
43445
  type: ["string", "null"]
43309
43446
  },
43310
43447
  has_next_page: {
@@ -43527,6 +43664,7 @@ var native_spec_default = {
43527
43664
  page_info: {
43528
43665
  properties: {
43529
43666
  end_cursor: {
43667
+ example: null,
43530
43668
  type: ["string", "null"]
43531
43669
  },
43532
43670
  has_next_page: {
@@ -44182,6 +44320,7 @@ var native_spec_default = {
44182
44320
  page_info: {
44183
44321
  properties: {
44184
44322
  end_cursor: {
44323
+ example: null,
44185
44324
  type: ["string", "null"]
44186
44325
  },
44187
44326
  has_next_page: {
@@ -44829,6 +44968,7 @@ var native_spec_default = {
44829
44968
  page_info: {
44830
44969
  properties: {
44831
44970
  end_cursor: {
44971
+ example: null,
44832
44972
  type: ["string", "null"]
44833
44973
  },
44834
44974
  has_next_page: {
@@ -44840,6 +44980,7 @@ var native_spec_default = {
44840
44980
  type: "boolean"
44841
44981
  },
44842
44982
  start_cursor: {
44983
+ example: null,
44843
44984
  type: ["string", "null"]
44844
44985
  }
44845
44986
  },
@@ -45896,11 +46037,13 @@ var native_spec_default = {
45896
46037
  },
45897
46038
  destination_amount: {
45898
46039
  description: "The amount delivered in the destination currency, as a decimal string. Null until the payout settles; appears on the payout in GET /payouts once assigned.",
46040
+ example: null,
45899
46041
  format: "decimal",
45900
46042
  type: ["string", "null"]
45901
46043
  },
45902
46044
  destination_currency: {
45903
46045
  description: "Currency the funds are delivered in, taken from the payout method. On a stablecoin payout it follows the settlement payout minted alongside it \u2014 the `GET /payouts` row carrying this payout's id as `payout_request_id` \u2014 and is `null` only when no settlement payout exists.",
46046
+ example: null,
45904
46047
  type: ["string", "null"]
45905
46048
  },
45906
46049
  estimated_arrival: {
@@ -45911,6 +46054,7 @@ var native_spec_default = {
45911
46054
  },
45912
46055
  exchange_rate: {
45913
46056
  description: "Exchange rate from the payout currency to the destination currency. Null until the payout settles; appears on the payout in GET /payouts once assigned.",
46057
+ example: null,
45914
46058
  format: "float",
45915
46059
  type: ["number", "null"]
45916
46060
  },
@@ -46085,6 +46229,7 @@ var native_spec_default = {
46085
46229
  },
46086
46230
  trace_code: {
46087
46231
  description: "ACH trace number the recipient's bank can use to locate this payout. Always `null` here \u2014 it is assigned when the payout is submitted to the bank, and appears on the payout in GET /payouts once it has been sent; payouts not sent over ACH never get one.",
46232
+ example: null,
46088
46233
  type: ["string", "null"]
46089
46234
  }
46090
46235
  },
@@ -46499,6 +46644,7 @@ var native_spec_default = {
46499
46644
  },
46500
46645
  status_reason: {
46501
46646
  description: "Machine-readable code for why the method is `broken` \u2014 the newest disabling failure recorded through it, whether a payout error or a pre-payout rejection. `null` unless the method is broken, or when it was disabled without a recorded failure.",
46647
+ example: null,
46502
46648
  type: ["string", "null"]
46503
46649
  },
46504
46650
  supported_payout_method: {
@@ -46704,6 +46850,7 @@ var native_spec_default = {
46704
46850
  page_info: {
46705
46851
  properties: {
46706
46852
  end_cursor: {
46853
+ example: null,
46707
46854
  type: ["string", "null"]
46708
46855
  },
46709
46856
  has_next_page: {
@@ -46876,10 +47023,12 @@ var native_spec_default = {
46876
47023
  },
46877
47024
  estimated_arrival: {
46878
47025
  description: "Null on create. List payout methods to retrieve arrival estimates.",
47026
+ example: null,
46879
47027
  type: ["object", "null"]
46880
47028
  },
46881
47029
  fee_structure: {
46882
47030
  description: "Null on create. List payout methods to retrieve the configured fee terms.",
47031
+ example: null,
46883
47032
  type: ["object", "null"]
46884
47033
  },
46885
47034
  id: {
@@ -46902,6 +47051,7 @@ var native_spec_default = {
46902
47051
  },
46903
47052
  last_paid_out_at: {
46904
47053
  description: "When the most recent completed payout was delivered to this method, as an ISO 8601 timestamp. `null` when nothing has been paid out to it yet.",
47054
+ example: null,
46905
47055
  format: "date-time",
46906
47056
  type: ["string", "null"]
46907
47057
  },
@@ -46931,6 +47081,7 @@ var native_spec_default = {
46931
47081
  },
46932
47082
  quote: {
46933
47083
  description: "Always null on create.",
47084
+ example: null,
46934
47085
  type: ["object", "null"]
46935
47086
  },
46936
47087
  status: {
@@ -46941,6 +47092,7 @@ var native_spec_default = {
46941
47092
  },
46942
47093
  status_reason: {
46943
47094
  description: "Always `null` on create.",
47095
+ example: null,
46944
47096
  type: ["string", "null"]
46945
47097
  },
46946
47098
  supported_payout_method: {
@@ -47229,10 +47381,12 @@ var native_spec_default = {
47229
47381
  },
47230
47382
  estimated_arrival: {
47231
47383
  description: "`null` after an update. List payout methods to retrieve arrival estimates.",
47384
+ example: null,
47232
47385
  type: ["object", "null"]
47233
47386
  },
47234
47387
  fee_structure: {
47235
47388
  description: "`null` after an update. List payout methods to retrieve the configured fee terms.",
47389
+ example: null,
47236
47390
  type: ["object", "null"]
47237
47391
  },
47238
47392
  id: {
@@ -47255,6 +47409,7 @@ var native_spec_default = {
47255
47409
  },
47256
47410
  last_paid_out_at: {
47257
47411
  description: "When the most recent completed payout was delivered to this method, as an ISO 8601 timestamp. `null` when nothing has been paid out to it yet.",
47412
+ example: null,
47258
47413
  format: "date-time",
47259
47414
  type: ["string", "null"]
47260
47415
  },
@@ -47284,6 +47439,7 @@ var native_spec_default = {
47284
47439
  },
47285
47440
  quote: {
47286
47441
  description: "Always `null` after an update.",
47442
+ example: null,
47287
47443
  type: ["object", "null"]
47288
47444
  },
47289
47445
  status: {
@@ -47294,6 +47450,7 @@ var native_spec_default = {
47294
47450
  },
47295
47451
  status_reason: {
47296
47452
  description: "Machine-readable code for why the method is `broken` \u2014 the newest failure recorded through it, whether a payout error or a pre-payout rejection. `null` unless the method is broken, or when it was disabled without a recorded failure.",
47453
+ example: null,
47297
47454
  type: ["string", "null"]
47298
47455
  },
47299
47456
  supported_payout_method: {
@@ -48458,6 +48615,7 @@ var native_spec_default = {
48458
48615
  },
48459
48616
  funds_returned_at: {
48460
48617
  description: "The effective time of the reversal that put the funds back in the balance \u2014 `null` if they never left it or have not returned yet. Set only once the return is confirmed in the ledger; the ledger posting itself can land moments after this time.",
48618
+ example: null,
48461
48619
  format: "date-time",
48462
48620
  type: ["string", "null"]
48463
48621
  },
@@ -50533,6 +50691,7 @@ var native_spec_default = {
50533
50691
  page_info: {
50534
50692
  properties: {
50535
50693
  end_cursor: {
50694
+ example: null,
50536
50695
  type: ["string", "null"]
50537
50696
  },
50538
50697
  has_next_page: {
@@ -51791,6 +51950,7 @@ var native_spec_default = {
51791
51950
  page_info: {
51792
51951
  properties: {
51793
51952
  end_cursor: {
51953
+ example: null,
51794
51954
  type: ["string", "null"]
51795
51955
  },
51796
51956
  has_next_page: {
@@ -52595,6 +52755,7 @@ var native_spec_default = {
52595
52755
  page_info: {
52596
52756
  properties: {
52597
52757
  end_cursor: {
52758
+ example: null,
52598
52759
  type: ["string", "null"]
52599
52760
  },
52600
52761
  has_next_page: {
@@ -53243,6 +53404,7 @@ var native_spec_default = {
53243
53404
  page_info: {
53244
53405
  properties: {
53245
53406
  end_cursor: {
53407
+ example: null,
53246
53408
  type: ["string", "null"]
53247
53409
  },
53248
53410
  has_next_page: {
@@ -53537,6 +53699,7 @@ var native_spec_default = {
53537
53699
  page_info: {
53538
53700
  properties: {
53539
53701
  end_cursor: {
53702
+ example: null,
53540
53703
  type: ["string", "null"]
53541
53704
  },
53542
53705
  has_next_page: {
@@ -54355,6 +54518,7 @@ var native_spec_default = {
54355
54518
  page_info: {
54356
54519
  properties: {
54357
54520
  end_cursor: {
54521
+ example: null,
54358
54522
  type: ["string", "null"]
54359
54523
  },
54360
54524
  has_next_page: {
@@ -54779,6 +54943,7 @@ var native_spec_default = {
54779
54943
  page_info: {
54780
54944
  properties: {
54781
54945
  end_cursor: {
54946
+ example: null,
54782
54947
  type: ["string", "null"]
54783
54948
  },
54784
54949
  has_next_page: {
@@ -55297,6 +55462,7 @@ var native_spec_default = {
55297
55462
  page_info: {
55298
55463
  properties: {
55299
55464
  end_cursor: {
55465
+ example: null,
55300
55466
  type: ["string", "null"]
55301
55467
  },
55302
55468
  has_next_page: {
@@ -55742,6 +55908,7 @@ var native_spec_default = {
55742
55908
  page_info: {
55743
55909
  properties: {
55744
55910
  end_cursor: {
55911
+ example: null,
55745
55912
  nullable: true,
55746
55913
  type: "string"
55747
55914
  },
@@ -57316,10 +57483,22 @@ var native_spec_default = {
57316
57483
  operationId: "status",
57317
57484
  parameters: [
57318
57485
  {
57319
- description: "Business or user account ID (biz_* / user_*).",
57486
+ $ref: "#/components/parameters/ApiVersionDate"
57487
+ },
57488
+ {
57489
+ description: "Business account whose swaps to list, prefixed `biz_`. Provide this or `user_id`.",
57320
57490
  in: "query",
57321
57491
  name: "account_id",
57322
- required: true,
57492
+ required: false,
57493
+ schema: {
57494
+ type: "string"
57495
+ }
57496
+ },
57497
+ {
57498
+ description: "The caller's own user ID, prefixed `user_`, to list swaps in their personal account. Provide this or `account_id`.",
57499
+ in: "query",
57500
+ name: "user_id",
57501
+ required: false,
57323
57502
  schema: {
57324
57503
  type: "string"
57325
57504
  }
@@ -57336,7 +57515,7 @@ var native_spec_default = {
57336
57515
  items: {
57337
57516
  properties: {
57338
57517
  account_id: {
57339
- description: "Account ID that owns the wallet used for the swap.",
57518
+ description: "Account that owns the swap: a business ID prefixed `biz_`, or the user ID for a personal account.",
57340
57519
  example: "biz_xxxxxxxxxxxxxx",
57341
57520
  type: "string"
57342
57521
  },
@@ -57368,12 +57547,18 @@ var native_spec_default = {
57368
57547
  type: "string"
57369
57548
  },
57370
57549
  type: "array"
57550
+ },
57551
+ user_id: {
57552
+ description: "User whose personal account owns the swap, prefixed `user_`. Null for a business account.",
57553
+ example: null,
57554
+ type: ["string", "null"]
57371
57555
  }
57372
57556
  },
57373
57557
  required: [
57374
57558
  "object",
57375
57559
  "id",
57376
57560
  "account_id",
57561
+ "user_id",
57377
57562
  "status",
57378
57563
  "tx_hashes"
57379
57564
  ],
@@ -57420,6 +57605,9 @@ var native_spec_default = {
57420
57605
  description: "Swaps one token for another from the account's wallet, or converts between fiat currencies in the account's ledger at the mid-market rate. Crypto swaps finish in the background \u2014 check the swap for its status.",
57421
57606
  operationId: "create",
57422
57607
  parameters: [
57608
+ {
57609
+ $ref: "#/components/parameters/ApiVersionDate"
57610
+ },
57423
57611
  {
57424
57612
  $ref: "#/components/parameters/IdempotencyKey"
57425
57613
  }
@@ -57430,7 +57618,7 @@ var native_spec_default = {
57430
57618
  schema: {
57431
57619
  properties: {
57432
57620
  account_id: {
57433
- description: "Business or user account ID (biz_* / user_*).",
57621
+ description: "Business account that makes the swap, prefixed `biz_`. Provide this or `user_id`.",
57434
57622
  example: "biz_xxxxxxxxxxxxxx",
57435
57623
  type: "string"
57436
57624
  },
@@ -57488,9 +57676,13 @@ var native_spec_default = {
57488
57676
  description: 'Destination token contract address or ticker symbol, such as "XAUT".',
57489
57677
  example: "cad",
57490
57678
  type: "string"
57679
+ },
57680
+ user_id: {
57681
+ description: "The caller's own user ID, prefixed `user_`, to swap in their personal account. Provide this or `account_id`.",
57682
+ type: "string"
57491
57683
  }
57492
57684
  },
57493
- required: ["account_id", "from_token", "to_token"],
57685
+ required: ["from_token", "to_token"],
57494
57686
  type: "object"
57495
57687
  }
57496
57688
  }
@@ -57504,7 +57696,7 @@ var native_spec_default = {
57504
57696
  schema: {
57505
57697
  properties: {
57506
57698
  account_id: {
57507
- description: "Account ID that owns the wallet used for the swap.",
57699
+ description: "Account that owns the swap: a business ID prefixed `biz_`, or the user ID for a personal account.",
57508
57700
  example: "biz_xxxxxxxxxxxxxx",
57509
57701
  type: "string"
57510
57702
  },
@@ -57573,9 +57765,14 @@ var native_spec_default = {
57573
57765
  }
57574
57766
  },
57575
57767
  type: ["object", "null"]
57768
+ },
57769
+ user_id: {
57770
+ description: "User whose personal account owns the swap, prefixed `user_`. Null for a business account.",
57771
+ example: null,
57772
+ type: ["string", "null"]
57576
57773
  }
57577
57774
  },
57578
- required: ["object", "account_id", "status"],
57775
+ required: ["object", "account_id", "user_id", "status"],
57579
57776
  type: "object"
57580
57777
  }
57581
57778
  }
@@ -57849,6 +58046,9 @@ var native_spec_default = {
57849
58046
  description: "Retrieves a single swap and its status.",
57850
58047
  operationId: "get",
57851
58048
  parameters: [
58049
+ {
58050
+ $ref: "#/components/parameters/ApiVersionDate"
58051
+ },
57852
58052
  {
57853
58053
  description: "Swap ID returned from POST /swaps.",
57854
58054
  in: "path",
@@ -57866,7 +58066,7 @@ var native_spec_default = {
57866
58066
  schema: {
57867
58067
  properties: {
57868
58068
  account_id: {
57869
- description: "Account ID that owns the wallet used for the swap.",
58069
+ description: "Account that owns the swap: a business ID prefixed `biz_`, or the user ID for a personal account.",
57870
58070
  example: "biz_xxxxxxxxxxxxxx",
57871
58071
  type: "string"
57872
58072
  },
@@ -57898,12 +58098,18 @@ var native_spec_default = {
57898
58098
  type: "string"
57899
58099
  },
57900
58100
  type: "array"
58101
+ },
58102
+ user_id: {
58103
+ description: "User whose personal account owns the swap, prefixed `user_`. Null for a business account.",
58104
+ example: null,
58105
+ type: ["string", "null"]
57901
58106
  }
57902
58107
  },
57903
58108
  required: [
57904
58109
  "object",
57905
58110
  "id",
57906
58111
  "account_id",
58112
+ "user_id",
57907
58113
  "status",
57908
58114
  "tx_hashes"
57909
58115
  ],
@@ -58102,6 +58308,7 @@ var native_spec_default = {
58102
58308
  page_info: {
58103
58309
  properties: {
58104
58310
  end_cursor: {
58311
+ example: null,
58105
58312
  type: ["string", "null"]
58106
58313
  },
58107
58314
  has_next_page: {
@@ -58666,15 +58873,18 @@ var native_spec_default = {
58666
58873
  },
58667
58874
  failed_at: {
58668
58875
  description: "When the transfer failed, as an ISO 8601 timestamp. Null unless the transfer has failed.",
58876
+ example: null,
58669
58877
  format: "date-time",
58670
58878
  type: ["string", "null"]
58671
58879
  },
58672
58880
  failure_code: {
58673
58881
  description: "Machine-readable code for why the transfer failed. Null unless the transfer has failed.",
58882
+ example: null,
58674
58883
  type: ["string", "null"]
58675
58884
  },
58676
58885
  failure_reason: {
58677
58886
  description: "Human-readable explanation of why the transfer failed. Null unless the transfer has failed.",
58887
+ example: null,
58678
58888
  type: ["string", "null"]
58679
58889
  },
58680
58890
  fee_amount: {
@@ -58737,6 +58947,7 @@ var native_spec_default = {
58737
58947
  page_info: {
58738
58948
  properties: {
58739
58949
  end_cursor: {
58950
+ example: null,
58740
58951
  type: ["string", "null"]
58741
58952
  },
58742
58953
  has_next_page: {
@@ -59007,15 +59218,18 @@ var native_spec_default = {
59007
59218
  },
59008
59219
  failed_at: {
59009
59220
  description: "When the transfer failed, as an ISO 8601 timestamp. Null unless the transfer has failed.",
59221
+ example: null,
59010
59222
  format: "date-time",
59011
59223
  type: ["string", "null"]
59012
59224
  },
59013
59225
  failure_code: {
59014
59226
  description: "Machine-readable code for why the transfer failed. Null unless the transfer has failed.",
59227
+ example: null,
59015
59228
  type: ["string", "null"]
59016
59229
  },
59017
59230
  failure_reason: {
59018
59231
  description: "Human-readable explanation of why the transfer failed. Null unless the transfer has failed.",
59232
+ example: null,
59019
59233
  type: ["string", "null"]
59020
59234
  },
59021
59235
  fee_amount: {
@@ -59448,6 +59662,7 @@ var native_spec_default = {
59448
59662
  page_info: {
59449
59663
  properties: {
59450
59664
  end_cursor: {
59665
+ example: null,
59451
59666
  type: ["string", "null"]
59452
59667
  },
59453
59668
  has_next_page: {
@@ -59649,15 +59864,18 @@ var native_spec_default = {
59649
59864
  },
59650
59865
  failed_at: {
59651
59866
  description: "When the transfer failed, as an ISO 8601 timestamp. Null unless the transfer has failed.",
59867
+ example: null,
59652
59868
  format: "date-time",
59653
59869
  type: ["string", "null"]
59654
59870
  },
59655
59871
  failure_code: {
59656
59872
  description: "Machine-readable code for why the transfer failed. Null unless the transfer has failed.",
59873
+ example: null,
59657
59874
  type: ["string", "null"]
59658
59875
  },
59659
59876
  failure_reason: {
59660
59877
  description: "Human-readable explanation of why the transfer failed. Null unless the transfer has failed.",
59878
+ example: null,
59661
59879
  type: ["string", "null"]
59662
59880
  },
59663
59881
  fee_amount: {
@@ -59894,6 +60112,7 @@ var native_spec_default = {
59894
60112
  page_info: {
59895
60113
  properties: {
59896
60114
  end_cursor: {
60115
+ example: null,
59897
60116
  type: ["string", "null"]
59898
60117
  },
59899
60118
  has_next_page: {
@@ -60045,6 +60264,7 @@ var native_spec_default = {
60045
60264
  page_info: {
60046
60265
  properties: {
60047
60266
  end_cursor: {
60267
+ example: null,
60048
60268
  type: ["string", "null"]
60049
60269
  },
60050
60270
  has_next_page: {
@@ -60953,6 +61173,7 @@ var native_spec_default = {
60953
61173
  page_info: {
60954
61174
  properties: {
60955
61175
  end_cursor: {
61176
+ example: null,
60956
61177
  type: ["string", "null"]
60957
61178
  },
60958
61179
  has_next_page: {
@@ -61096,6 +61317,7 @@ var native_spec_default = {
61096
61317
  page_info: {
61097
61318
  properties: {
61098
61319
  end_cursor: {
61320
+ example: null,
61099
61321
  type: ["string", "null"]
61100
61322
  },
61101
61323
  has_next_page: {
@@ -61532,10 +61754,19 @@ var native_spec_default = {
61532
61754
  $ref: "#/components/parameters/ApiVersionDate"
61533
61755
  },
61534
61756
  {
61535
- description: "Account or user ID whose verifications you want to list. Use a `biz_` account ID, or the caller's `user_` ID for personal verifications.",
61757
+ description: "Business account whose verifications you want to list, prefixed `biz_`. Provide this or `user_id`.",
61536
61758
  in: "query",
61537
61759
  name: "account_id",
61538
- required: true,
61760
+ required: false,
61761
+ schema: {
61762
+ type: "string"
61763
+ }
61764
+ },
61765
+ {
61766
+ description: "The caller's own user ID, prefixed `user_`, to list personal verifications. Provide this or `account_id`.",
61767
+ in: "query",
61768
+ name: "user_id",
61769
+ required: false,
61539
61770
  schema: {
61540
61771
  type: "string"
61541
61772
  }
@@ -61893,10 +62124,19 @@ var native_spec_default = {
61893
62124
  $ref: "#/components/parameters/ApiVersionDate"
61894
62125
  },
61895
62126
  {
61896
- description: "Account or user ID whose identity you want to verify. Use a `biz_` account ID for account verifications, or the caller's `user_` ID for personal verification.",
62127
+ description: "Business account whose identity you want to verify, prefixed `biz_`. Provide this or `user_id`.",
61897
62128
  in: "query",
61898
62129
  name: "account_id",
61899
- required: true,
62130
+ required: false,
62131
+ schema: {
62132
+ type: "string"
62133
+ }
62134
+ },
62135
+ {
62136
+ description: "The caller's own user ID, prefixed `user_`, for a personal verification. Provide this or `account_id`.",
62137
+ in: "query",
62138
+ name: "user_id",
62139
+ required: false,
61900
62140
  schema: {
61901
62141
  type: "string"
61902
62142
  }
@@ -64029,6 +64269,7 @@ var native_spec_default = {
64029
64269
  page_info: {
64030
64270
  properties: {
64031
64271
  end_cursor: {
64272
+ example: null,
64032
64273
  type: ["string", "null"]
64033
64274
  },
64034
64275
  has_next_page: {
@@ -64238,6 +64479,7 @@ var native_spec_default = {
64238
64479
  },
64239
64480
  plan_id: {
64240
64481
  description: "The plan the request was narrowed to, prefixed `plan_`, or `null` when every waitlist plan on the account was included.",
64482
+ example: null,
64241
64483
  type: ["string", "null"]
64242
64484
  },
64243
64485
  queued: {
@@ -64618,6 +64860,7 @@ var native_spec_default = {
64618
64860
  page_info: {
64619
64861
  properties: {
64620
64862
  end_cursor: {
64863
+ example: null,
64621
64864
  type: ["string", "null"]
64622
64865
  },
64623
64866
  has_next_page: {
@@ -64811,50 +65054,7 @@ var native_spec_default = {
64811
65054
  "refund.created",
64812
65055
  "refund.updated",
64813
65056
  "dispute_alert.created",
64814
- "membership.cancel_at_period_end_changed",
64815
- "membership_went_valid",
64816
- "membership_went_invalid",
64817
- "membership_metadata_updated",
64818
- "resolution_created",
64819
- "resolution_updated",
64820
- "resolution_decided",
64821
- "payment_affiliate_reward_created",
64822
- "membership_experience_claimed",
64823
- "app_membership_went_valid",
64824
- "app_membership_went_invalid",
64825
- "app_payment_created",
64826
- "app_payment_succeeded",
64827
- "app_payment_failed",
64828
- "app_payment_pending",
64829
- "app_payment_requires_action",
64830
- "app_membership_cancel_at_period_end_changed",
64831
- "payment_created",
64832
- "payment_succeeded",
64833
- "payment_failed",
64834
- "payment_pending",
64835
- "payment_requires_action",
64836
- "dispute_created",
64837
- "dispute_updated",
64838
- "refund_created",
64839
- "refund_updated",
64840
- "dispute_alert_created",
64841
- "membership_cancel_at_period_end_changed",
64842
- "membership.went_valid",
64843
- "membership.went_invalid",
64844
- "membership.metadata_updated",
64845
- "resolution.created",
64846
- "resolution.updated",
64847
- "resolution.decided",
64848
- "payment.affiliate_reward_created",
64849
- "membership.experience_claimed",
64850
- "app_membership.went_valid",
64851
- "app_membership.went_invalid",
64852
- "app_payment.created",
64853
- "app_payment.succeeded",
64854
- "app_payment.failed",
64855
- "app_payment.pending",
64856
- "app_payment.requires_action",
64857
- "app_membership.cancel_at_period_end_changed"
65057
+ "membership.cancel_at_period_end_changed"
64858
65058
  ],
64859
65059
  example: "payment.succeeded",
64860
65060
  type: "string"
@@ -65212,50 +65412,7 @@ var native_spec_default = {
65212
65412
  "refund.created",
65213
65413
  "refund.updated",
65214
65414
  "dispute_alert.created",
65215
- "membership.cancel_at_period_end_changed",
65216
- "membership_went_valid",
65217
- "membership_went_invalid",
65218
- "membership_metadata_updated",
65219
- "resolution_created",
65220
- "resolution_updated",
65221
- "resolution_decided",
65222
- "payment_affiliate_reward_created",
65223
- "membership_experience_claimed",
65224
- "app_membership_went_valid",
65225
- "app_membership_went_invalid",
65226
- "app_payment_created",
65227
- "app_payment_succeeded",
65228
- "app_payment_failed",
65229
- "app_payment_pending",
65230
- "app_payment_requires_action",
65231
- "app_membership_cancel_at_period_end_changed",
65232
- "payment_created",
65233
- "payment_succeeded",
65234
- "payment_failed",
65235
- "payment_pending",
65236
- "payment_requires_action",
65237
- "dispute_created",
65238
- "dispute_updated",
65239
- "refund_created",
65240
- "refund_updated",
65241
- "dispute_alert_created",
65242
- "membership_cancel_at_period_end_changed",
65243
- "membership.went_valid",
65244
- "membership.went_invalid",
65245
- "membership.metadata_updated",
65246
- "resolution.created",
65247
- "resolution.updated",
65248
- "resolution.decided",
65249
- "payment.affiliate_reward_created",
65250
- "membership.experience_claimed",
65251
- "app_membership.went_valid",
65252
- "app_membership.went_invalid",
65253
- "app_payment.created",
65254
- "app_payment.succeeded",
65255
- "app_payment.failed",
65256
- "app_payment.pending",
65257
- "app_payment.requires_action",
65258
- "app_membership.cancel_at_period_end_changed"
65415
+ "membership.cancel_at_period_end_changed"
65259
65416
  ],
65260
65417
  example: "payment.failed",
65261
65418
  type: "string"
@@ -65395,6 +65552,7 @@ var native_spec_default = {
65395
65552
  type: "boolean"
65396
65553
  },
65397
65554
  start_cursor: {
65555
+ example: null,
65398
65556
  type: ["string", "null"]
65399
65557
  }
65400
65558
  },
@@ -67302,6 +67460,14 @@ var native_spec_default = {
67302
67460
  example: "issues",
67303
67461
  type: "string"
67304
67462
  },
67463
+ desired_cost_per_result: {
67464
+ description: "Google only: the target cost per conversion in USD when `bid_type` is `average_target`. `null` otherwise.",
67465
+ type: ["number", "null"]
67466
+ },
67467
+ ends_at: {
67468
+ description: "Google only: when the campaign stops delivering, as an ISO 8601 timestamp. `null` runs it until paused.",
67469
+ type: ["string", "null"]
67470
+ },
67305
67471
  id: {
67306
67472
  description: "Unique identifier for the ad campaign, prefixed `adcamp_`.",
67307
67473
  example: "adcamp_xxxxxxxxxxxxxx",
@@ -67329,6 +67495,7 @@ var native_spec_default = {
67329
67495
  },
67330
67496
  optimization_goal: {
67331
67497
  description: "The event the campaign optimizes for when a single goal is set campaign-wide. `null` when each ad group sets its own optimization_goal.",
67498
+ example: null,
67332
67499
  type: ["string", "null"]
67333
67500
  },
67334
67501
  platform: {
@@ -67351,6 +67518,10 @@ var native_spec_default = {
67351
67518
  },
67352
67519
  type: "array"
67353
67520
  },
67521
+ starts_at: {
67522
+ description: "Google only: when the campaign starts delivering, as an ISO 8601 timestamp. `null` starts it as soon as it launches.",
67523
+ type: ["string", "null"]
67524
+ },
67354
67525
  status: {
67355
67526
  description: "The configured lifecycle status of the ad campaign. Billing failures preserve active or paused here and set delivery_status to payment_failed.",
67356
67527
  enum: [
@@ -67602,6 +67773,14 @@ var native_spec_default = {
67602
67773
  example: "issues",
67603
67774
  type: "string"
67604
67775
  },
67776
+ desired_cost_per_result: {
67777
+ description: "Google only: the target cost per conversion in USD when `bid_type` is `average_target`. `null` otherwise.",
67778
+ type: ["number", "null"]
67779
+ },
67780
+ ends_at: {
67781
+ description: "Google only: when the campaign stops delivering, as an ISO 8601 timestamp. `null` runs it until paused.",
67782
+ type: ["string", "null"]
67783
+ },
67605
67784
  id: {
67606
67785
  description: "Unique identifier for the ad campaign, prefixed `adcamp_`.",
67607
67786
  example: "adcamp_xxxxxxxxxxxxxx",
@@ -67629,6 +67808,7 @@ var native_spec_default = {
67629
67808
  },
67630
67809
  optimization_goal: {
67631
67810
  description: "The event the campaign optimizes for when a single goal is set campaign-wide. `null` when each ad group sets its own optimization_goal.",
67811
+ example: null,
67632
67812
  type: ["string", "null"]
67633
67813
  },
67634
67814
  platform: {
@@ -67651,6 +67831,10 @@ var native_spec_default = {
67651
67831
  },
67652
67832
  type: "array"
67653
67833
  },
67834
+ starts_at: {
67835
+ description: "Google only: when the campaign starts delivering, as an ISO 8601 timestamp. `null` starts it as soon as it launches.",
67836
+ type: ["string", "null"]
67837
+ },
67654
67838
  status: {
67655
67839
  description: "The configured lifecycle status of the ad campaign. Billing failures preserve active or paused here and set delivery_status to payment_failed.",
67656
67840
  enum: [
@@ -70800,6 +70984,7 @@ var native_spec_default = {
70800
70984
  data: {
70801
70985
  account_id: null,
70802
70986
  amount: 25,
70987
+ auto_refunded: false,
70803
70988
  card_brand: "visa",
70804
70989
  created_at: "2026-01-01T12:00:00.000Z",
70805
70990
  currency: "usd",
@@ -75547,6 +75732,7 @@ var native_spec_default = {
75547
75732
  },
75548
75733
  status_reason: {
75549
75734
  description: "Machine-readable code for why the method is `broken` \u2014 the newest disabling failure recorded through it, whether a payout error or a pre-payout rejection. `null` unless the method is broken, or when it was disabled without a recorded failure.",
75735
+ example: null,
75550
75736
  type: ["string", "null"]
75551
75737
  },
75552
75738
  supported_payout_method: {
@@ -78628,7 +78814,7 @@ var native_spec_default = {
78628
78814
  from_amount: "502.51",
78629
78815
  from_currency: "usdt",
78630
78816
  id: "airdrp_xxxxxxxxxxxxxx",
78631
- notes: "some_string",
78817
+ notes: null,
78632
78818
  object: "airdrop_link",
78633
78819
  payer_name: "MassPay",
78634
78820
  payment_amount: {
@@ -78936,15 +79122,18 @@ var native_spec_default = {
78936
79122
  },
78937
79123
  failed_at: {
78938
79124
  description: "When the transfer failed, as an ISO 8601 timestamp. Null unless the transfer has failed.",
79125
+ example: null,
78939
79126
  format: "date-time",
78940
79127
  type: ["string", "null"]
78941
79128
  },
78942
79129
  failure_code: {
78943
79130
  description: "Machine-readable code for why the transfer failed. Null unless the transfer has failed.",
79131
+ example: null,
78944
79132
  type: ["string", "null"]
78945
79133
  },
78946
79134
  failure_reason: {
78947
79135
  description: "Human-readable explanation of why the transfer failed. Null unless the transfer has failed.",
79136
+ example: null,
78948
79137
  type: ["string", "null"]
78949
79138
  },
78950
79139
  fee_amount: {
@@ -79320,15 +79509,18 @@ var native_spec_default = {
79320
79509
  },
79321
79510
  failed_at: {
79322
79511
  description: "When the transfer failed, as an ISO 8601 timestamp. Null unless the transfer has failed.",
79512
+ example: null,
79323
79513
  format: "date-time",
79324
79514
  type: ["string", "null"]
79325
79515
  },
79326
79516
  failure_code: {
79327
79517
  description: "Machine-readable code for why the transfer failed. Null unless the transfer has failed.",
79518
+ example: null,
79328
79519
  type: ["string", "null"]
79329
79520
  },
79330
79521
  failure_reason: {
79331
79522
  description: "Human-readable explanation of why the transfer failed. Null unless the transfer has failed.",
79523
+ example: null,
79332
79524
  type: ["string", "null"]
79333
79525
  },
79334
79526
  fee_amount: {
@@ -79702,15 +79894,18 @@ var native_spec_default = {
79702
79894
  },
79703
79895
  failed_at: {
79704
79896
  description: "When the transfer failed, as an ISO 8601 timestamp. Null unless the transfer has failed.",
79897
+ example: null,
79705
79898
  format: "date-time",
79706
79899
  type: ["string", "null"]
79707
79900
  },
79708
79901
  failure_code: {
79709
79902
  description: "Machine-readable code for why the transfer failed. Null unless the transfer has failed.",
79903
+ example: null,
79710
79904
  type: ["string", "null"]
79711
79905
  },
79712
79906
  failure_reason: {
79713
79907
  description: "Human-readable explanation of why the transfer failed. Null unless the transfer has failed.",
79908
+ example: null,
79714
79909
  type: ["string", "null"]
79715
79910
  },
79716
79911
  fee_amount: {
@@ -84457,6 +84652,7 @@ var native_spec_default = {
84457
84652
  properties: {
84458
84653
  day: {
84459
84654
  description: "Day the automatic withdrawal runs on: 0-6 (Sunday-Saturday) for `weekly`, 1-31 for `monthly`. `null` for `manual` and `daily`.",
84655
+ example: null,
84460
84656
  type: ["integer", "null"]
84461
84657
  },
84462
84658
  frequency: {
@@ -84467,6 +84663,7 @@ var native_spec_default = {
84467
84663
  },
84468
84664
  next_payout_date: {
84469
84665
  description: "Next date the automatic withdrawal is scheduled to run, as an ISO 8601 date. `null` for `manual` and `daily`, where no single next date applies.",
84666
+ example: null,
84470
84667
  type: ["string", "null"]
84471
84668
  }
84472
84669
  },
@@ -84688,6 +84885,7 @@ var native_spec_default = {
84688
84885
  },
84689
84886
  frequency: {
84690
84887
  description: "Platform-reported impressions divided by reach.",
84888
+ example: null,
84691
84889
  type: ["number", "null"]
84692
84890
  },
84693
84891
  headlines: {
@@ -84901,6 +85099,7 @@ var native_spec_default = {
84901
85099
  },
84902
85100
  unique_click_through_rate: {
84903
85101
  description: "Unique clicks divided by impressions, between 0 and 1.",
85102
+ example: null,
84904
85103
  type: ["number", "null"]
84905
85104
  },
84906
85105
  unique_clicks: {
@@ -85186,8 +85385,17 @@ var native_spec_default = {
85186
85385
  example: "issues",
85187
85386
  type: "string"
85188
85387
  },
85388
+ desired_cost_per_result: {
85389
+ description: "Google only: the target cost per conversion in USD when `bid_type` is `average_target`. `null` otherwise.",
85390
+ type: ["number", "null"]
85391
+ },
85392
+ ends_at: {
85393
+ description: "Google only: when the campaign stops delivering, as an ISO 8601 timestamp. `null` runs it until paused.",
85394
+ type: ["string", "null"]
85395
+ },
85189
85396
  frequency: {
85190
85397
  description: "Platform-reported impressions divided by reach.",
85398
+ example: null,
85191
85399
  type: ["number", "null"]
85192
85400
  },
85193
85401
  id: {
@@ -85237,6 +85445,7 @@ var native_spec_default = {
85237
85445
  },
85238
85446
  optimization_goal: {
85239
85447
  description: "The event the campaign optimizes for when a single goal is set campaign-wide. `null` when each ad group sets its own optimization_goal.",
85448
+ example: null,
85240
85449
  type: ["string", "null"]
85241
85450
  },
85242
85451
  platform: {
@@ -85327,6 +85536,10 @@ var native_spec_default = {
85327
85536
  example: "usd",
85328
85537
  type: ["string", "null"]
85329
85538
  },
85539
+ starts_at: {
85540
+ description: "Google only: when the campaign starts delivering, as an ISO 8601 timestamp. `null` starts it as soon as it launches.",
85541
+ type: ["string", "null"]
85542
+ },
85330
85543
  status: {
85331
85544
  description: "The configured lifecycle status of the ad campaign. Billing failures preserve active or paused here and set delivery_status to payment_failed.",
85332
85545
  enum: [
@@ -85363,6 +85576,7 @@ var native_spec_default = {
85363
85576
  },
85364
85577
  unique_click_through_rate: {
85365
85578
  description: "Unique clicks divided by impressions, between 0 and 1.",
85579
+ example: null,
85366
85580
  type: ["number", "null"]
85367
85581
  },
85368
85582
  unique_clicks: {
@@ -85499,6 +85713,7 @@ var native_spec_default = {
85499
85713
  },
85500
85714
  percentage_change: {
85501
85715
  description: "Signed percent change: 20 increases by 20%, negative 20 decreases by 20%. The sent value cannot go below zero. Null for a fixed rule.",
85716
+ example: null,
85502
85717
  type: ["number", "null"]
85503
85718
  },
85504
85719
  status: {
@@ -85539,6 +85754,7 @@ var native_spec_default = {
85539
85754
  properties: {
85540
85755
  custom_name: {
85541
85756
  description: "Exact custom event name. Null for standard events.",
85757
+ example: null,
85542
85758
  type: ["string", "null"]
85543
85759
  },
85544
85760
  event_name: {
@@ -85573,6 +85789,7 @@ var native_spec_default = {
85573
85789
  },
85574
85790
  resource_id: {
85575
85791
  description: "Selected campaign, ad group, or ad ID. Null for a business target.",
85792
+ example: null,
85576
85793
  type: ["string", "null"]
85577
85794
  },
85578
85795
  resource_title: {
@@ -85899,6 +86116,7 @@ var native_spec_default = {
85899
86116
  },
85900
86117
  frequency: {
85901
86118
  description: "Platform-reported impressions divided by reach.",
86119
+ example: null,
85902
86120
  type: ["number", "null"]
85903
86121
  },
85904
86122
  frequency_cap: {
@@ -86105,6 +86323,7 @@ var native_spec_default = {
86105
86323
  },
86106
86324
  unique_click_through_rate: {
86107
86325
  description: "Unique clicks divided by impressions, between 0 and 1.",
86326
+ example: null,
86108
86327
  type: ["number", "null"]
86109
86328
  },
86110
86329
  unique_clicks: {
@@ -86969,6 +87188,7 @@ var native_spec_default = {
86969
87188
  },
86970
87189
  file_url: {
86971
87190
  description: "File the follow-up button opens. Set when `button_type` is `download`.",
87191
+ example: null,
86972
87192
  type: ["string", "null"]
86973
87193
  },
86974
87194
  headline: {
@@ -86978,6 +87198,7 @@ var native_spec_default = {
86978
87198
  },
86979
87199
  phone_number: {
86980
87200
  description: "Number the follow-up button calls. Set when `button_type` is `call`.",
87201
+ example: null,
86981
87202
  type: ["string", "null"]
86982
87203
  },
86983
87204
  url: {
@@ -87498,6 +87719,7 @@ var native_spec_default = {
87498
87719
  type: "string"
87499
87720
  },
87500
87721
  domains: {
87722
+ example: null,
87501
87723
  items: {
87502
87724
  $ref: "#/components/schemas/AppDomain",
87503
87725
  description: "Custom domain claims and assignments for this app, excluding removed domains. Empty when none exist; `null` when the caller lacks the account's `developer:basic:read` permission."
@@ -87912,6 +88134,7 @@ var native_spec_default = {
87912
88134
  },
87913
88135
  build_id: {
87914
88136
  description: "The build the deployment produced, prefixed `abld_`, or `null` until it succeeds.",
88137
+ example: null,
87915
88138
  type: ["string", "null"]
87916
88139
  },
87917
88140
  draft: {
@@ -87921,6 +88144,7 @@ var native_spec_default = {
87921
88144
  },
87922
88145
  error: {
87923
88146
  description: "Why the deployment failed, or `null` when it did not.",
88147
+ example: null,
87924
88148
  type: ["string", "null"]
87925
88149
  },
87926
88150
  estimated_duration_ms: {
@@ -87935,6 +88159,7 @@ var native_spec_default = {
87935
88159
  },
87936
88160
  finished_at: {
87937
88161
  description: "When the deployment ended, in milliseconds since the epoch, or `null` while it is still running.",
88162
+ example: null,
87938
88163
  type: ["integer", "null"]
87939
88164
  },
87940
88165
  phase: {
@@ -87977,6 +88202,7 @@ var native_spec_default = {
87977
88202
  },
87978
88203
  url: {
87979
88204
  description: "Where the deployed site is served, or `null` unless the deployment went live.",
88205
+ example: null,
87980
88206
  type: ["string", "null"]
87981
88207
  }
87982
88208
  },
@@ -88065,6 +88291,7 @@ var native_spec_default = {
88065
88291
  },
88066
88292
  base_url: {
88067
88293
  description: "The production base URL where the app is hosted. `null` if no base URL is configured, if the caller lacks the `developer:basic:read` permission on the app's account, or on list responses, which never expose it.",
88294
+ example: null,
88068
88295
  type: ["string", "null"]
88069
88296
  },
88070
88297
  businesses_created_count: {
@@ -88105,6 +88332,7 @@ var native_spec_default = {
88105
88332
  type: "string"
88106
88333
  },
88107
88334
  domains: {
88335
+ example: null,
88108
88336
  items: {
88109
88337
  $ref: "#/components/schemas/AppDomain",
88110
88338
  description: "Custom domain claims and assignments for this app, excluding removed domains. Empty when none exist; `null` when the caller lacks the account's `developer:basic:read` permission."
@@ -88887,14 +89115,17 @@ var native_spec_default = {
88887
89115
  },
88888
89116
  discussion_experience_id: {
88889
89117
  description: "Experience the bounty's discussion thread lives in, prefixed `exp_`. Read this \u2014 not `experience_id` \u2014 to open the thread: a platform-wide bounty has no hosting experience of its own but its discussion still lives in one.",
89118
+ example: null,
88890
89119
  type: ["string", "null"]
88891
89120
  },
88892
89121
  discussion_feed_id: {
88893
89122
  description: "Forum feed containing the bounty's discussion thread. `null` for a bounty with no forum post.",
89123
+ example: null,
88894
89124
  type: ["string", "null"]
88895
89125
  },
88896
89126
  discussion_post_id: {
88897
89127
  description: "Forum post anchoring the bounty's discussion thread. Read together with `discussion_experience_id` to address the thread. `null` for a bounty with no forum post.",
89128
+ example: null,
88898
89129
  type: ["string", "null"]
88899
89130
  },
88900
89131
  experience_id: {
@@ -89240,14 +89471,17 @@ var native_spec_default = {
89240
89471
  },
89241
89472
  discussion_experience_id: {
89242
89473
  description: "Experience the bounty's discussion thread lives in, prefixed `exp_`. Read this \u2014 not `experience_id` \u2014 to open the thread: a platform-wide bounty has no hosting experience of its own but its discussion still lives in one.",
89474
+ example: null,
89243
89475
  type: ["string", "null"]
89244
89476
  },
89245
89477
  discussion_feed_id: {
89246
89478
  description: "Forum feed containing the bounty's discussion thread. `null` for a bounty with no forum post.",
89479
+ example: null,
89247
89480
  type: ["string", "null"]
89248
89481
  },
89249
89482
  discussion_post_id: {
89250
89483
  description: "Forum post anchoring the bounty's discussion thread. Read together with `discussion_experience_id` to address the thread. `null` for a bounty with no forum post.",
89484
+ example: null,
89251
89485
  type: ["string", "null"]
89252
89486
  },
89253
89487
  experience_id: {
@@ -89294,6 +89528,7 @@ var native_spec_default = {
89294
89528
  },
89295
89529
  min_total_verified_duration_seconds: {
89296
89530
  description: "Total verified footage a submission must accumulate before it can be submitted, in seconds. Always a whole number of hours. Present only on `data_capture` bounties \u2014 it is what `net_reward_amount` pays for, so rate displays divide by it. `null` for every other goal type.",
89531
+ example: null,
89297
89532
  type: ["integer", "null"]
89298
89533
  },
89299
89534
  net_reward_amount: {
@@ -89398,6 +89633,7 @@ var native_spec_default = {
89398
89633
  type: "string"
89399
89634
  },
89400
89635
  capture_clips: {
89636
+ example: null,
89401
89637
  items: {
89402
89638
  $ref: "#/components/schemas/BountyCaptureClip",
89403
89639
  description: "The submission's capture clips in recording order, each carrying its own review `status` and temporary signed artifact URLs. The full deliverable when `deliverable_type` is `data_capture`, populated only on single-submission reads; `null` on list responses (use `captured_clip_count` and `captured_duration_seconds` for the summary) and for other deliverable types. An attempt still in progress lists every clip it has recorded, including failed ones; once submitted, only clips that passed validation are listed, since only those are evidence."
@@ -89966,6 +90202,31 @@ var native_spec_default = {
89966
90202
  ],
89967
90203
  type: "object"
89968
90204
  },
90205
+ CashbackPayout: {
90206
+ properties: {
90207
+ account_id: {
90208
+ description: "Connected account filter from the request, prefixed `biz_`. Omitted when not supplied.",
90209
+ type: ["string", "null"]
90210
+ },
90211
+ cashback_rule_id: {
90212
+ description: "Cashback rule filter from the request, prefixed `cicbr_`. Omitted when not supplied.",
90213
+ type: ["string", "null"]
90214
+ },
90215
+ status: {
90216
+ description: "Request status. `processing` means background processing was queued, not that payment completed. `failed` means the queue rejected the request. Subsequent transaction failures retry automatically.",
90217
+ enum: ["processing", "failed"],
90218
+ example: "failed",
90219
+ type: "string"
90220
+ },
90221
+ transaction_id: {
90222
+ description: "Card transaction filter from the request, prefixed `citx_`. Omitted when not supplied.",
90223
+ example: "citx_xxxxxxxxxxxxxx",
90224
+ type: ["string", "null"]
90225
+ }
90226
+ },
90227
+ required: ["status"],
90228
+ type: "object"
90229
+ },
89969
90230
  CashbackRule: {
89970
90231
  properties: {
89971
90232
  created_at: {
@@ -89980,6 +90241,7 @@ var native_spec_default = {
89980
90241
  },
89981
90242
  discarded_at: {
89982
90243
  description: "When the rule was discarded, as an ISO 8601 timestamp. Null means it has not been discarded.",
90244
+ example: null,
89983
90245
  type: ["string", "null"]
89984
90246
  },
89985
90247
  expires_at: {
@@ -90491,6 +90753,11 @@ var native_spec_default = {
90491
90753
  example: 25,
90492
90754
  type: "number"
90493
90755
  },
90756
+ auto_refunded: {
90757
+ description: "Whether Whop automatically refunded the alerted payment. Reflects the payment, so it can be `true` for a refund issued by another flow (RDR, resolution) on the same payment.",
90758
+ example: false,
90759
+ type: "boolean"
90760
+ },
90494
90761
  card_brand: {
90495
90762
  description: "The card network as reported by the issuer, lowercased, such as `visa` or `mastercard`. `unknown` when the report carries neither a network nor a recognizable BIN.",
90496
90763
  example: "visa",
@@ -90519,6 +90786,7 @@ var native_spec_default = {
90519
90786
  issuer: {
90520
90787
  deprecated: true,
90521
90788
  description: "Deprecated: always `null` outside Whop's own dashboard. Name of the bank that issued the card and filed the report.\nDEPRECATED: Always null outside Whop's own dashboard.",
90789
+ example: null,
90522
90790
  type: ["string", "null"]
90523
90791
  },
90524
90792
  payment_id: {
@@ -90568,6 +90836,7 @@ var native_spec_default = {
90568
90836
  "payment_id",
90569
90837
  "product_id",
90570
90838
  "fee_charged",
90839
+ "auto_refunded",
90571
90840
  "reported_at",
90572
90841
  "transaction_at",
90573
90842
  "created_at",
@@ -90941,6 +91210,7 @@ var native_spec_default = {
90941
91210
  payment_processor: {
90942
91211
  deprecated: true,
90943
91212
  description: "Deprecated: no longer populated. Always `null`.\nDEPRECATED: No longer populated. Always null.",
91213
+ example: null,
90944
91214
  type: ["string", "null"]
90945
91215
  }
90946
91216
  },
@@ -90971,6 +91241,7 @@ var native_spec_default = {
90971
91241
  },
90972
91242
  certificate_status: {
90973
91243
  description: "Cloudflare's latest certificate issuance status.",
91244
+ example: null,
90974
91245
  type: ["string", "null"]
90975
91246
  },
90976
91247
  created_at: {
@@ -90998,6 +91269,7 @@ var native_spec_default = {
90998
91269
  },
90999
91270
  hostname_status: {
91000
91271
  description: "Cloudflare's latest hostname activation status.",
91272
+ example: null,
91001
91273
  type: ["string", "null"]
91002
91274
  },
91003
91275
  id: {
@@ -91014,6 +91286,7 @@ var native_spec_default = {
91014
91286
  },
91015
91287
  last_checked_at: {
91016
91288
  description: "When DNS and provider state were last checked, as an ISO 8601 timestamp.",
91289
+ example: null,
91017
91290
  type: ["string", "null"]
91018
91291
  },
91019
91292
  metadata: {
@@ -91049,6 +91322,7 @@ var native_spec_default = {
91049
91322
  },
91050
91323
  verified_at: {
91051
91324
  description: "When Whop verified the ownership TXT record, as an ISO 8601 timestamp.",
91325
+ example: null,
91052
91326
  type: ["string", "null"]
91053
91327
  }
91054
91328
  },
@@ -91124,6 +91398,7 @@ var native_spec_default = {
91124
91398
  },
91125
91399
  ai_chat_id: {
91126
91400
  description: "The chat to resume after its initial message is accepted, or null before a chat is ready.",
91401
+ example: null,
91127
91402
  type: ["string", "null"]
91128
91403
  },
91129
91404
  created_at: {
@@ -91192,6 +91467,7 @@ var native_spec_default = {
91192
91467
  },
91193
91468
  user_feedback: {
91194
91469
  description: "The user's written feedback, or `null` if they have not provided any.",
91470
+ example: null,
91195
91471
  type: ["string", "null"]
91196
91472
  }
91197
91473
  },
@@ -92874,6 +93150,7 @@ var native_spec_default = {
92874
93150
  },
92875
93151
  notes: {
92876
93152
  description: "Memo attached to the transfer or payout source, or null when none was provided (on payout sources requires payout:withdrawal:read).",
93153
+ example: null,
92877
93154
  type: ["string", "null"]
92878
93155
  },
92879
93156
  object: {
@@ -93889,6 +94166,7 @@ var native_spec_default = {
93889
94166
  },
93890
94167
  whop_partner_verified_at: {
93891
94168
  description: "When the user became a verified Whop Partner, as an ISO 8601 timestamp. `null` if not verified.",
94169
+ example: null,
93892
94170
  type: ["string", "null"]
93893
94171
  }
93894
94172
  },
@@ -93975,6 +94253,7 @@ var native_spec_default = {
93975
94253
  },
93976
94254
  code: {
93977
94255
  description: "Unique referral code, when assigned.",
94256
+ example: null,
93978
94257
  type: ["string", "null"]
93979
94258
  },
93980
94259
  created_at: {
@@ -93989,6 +94268,7 @@ var native_spec_default = {
93989
94268
  },
93990
94269
  max_redemptions: {
93991
94270
  description: "Maximum permitted redemptions, when limited.",
94271
+ example: null,
93992
94272
  type: ["integer", "null"]
93993
94273
  },
93994
94274
  partner: {
@@ -94152,6 +94432,7 @@ var native_spec_default = {
94152
94432
  },
94153
94433
  checkout_configuration_id: {
94154
94434
  description: "The checkout configuration the buyer paid through, prefixed `ch_`, or null.",
94435
+ example: null,
94155
94436
  type: ["string", "null"]
94156
94437
  },
94157
94438
  client_secret: {
@@ -94191,14 +94472,17 @@ var native_spec_default = {
94191
94472
  },
94192
94473
  dispute_alerted_at: {
94193
94474
  description: "When an issuer warned that this payment will be disputed, or null.",
94475
+ example: null,
94194
94476
  type: ["string", "null"]
94195
94477
  },
94196
94478
  failure_message: {
94197
94479
  description: "Why the most recent attempt failed, in plain words, or null.",
94480
+ example: null,
94198
94481
  type: ["string", "null"]
94199
94482
  },
94200
94483
  financing_installments_count: {
94201
94484
  description: "For installment methods, how many payments the charge splits into.",
94485
+ example: null,
94202
94486
  type: ["number", "null"]
94203
94487
  },
94204
94488
  holds: {
@@ -94215,6 +94499,7 @@ var native_spec_default = {
94215
94499
  },
94216
94500
  last_payment_attempt_at: {
94217
94501
  description: "When the most recent charge attempt ran, or null.",
94502
+ example: null,
94218
94503
  type: ["string", "null"]
94219
94504
  },
94220
94505
  line_items: {
@@ -94248,6 +94533,7 @@ var native_spec_default = {
94248
94533
  },
94249
94534
  next_payment_attempt_at: {
94250
94535
  description: "When the next automatic retry is scheduled, or null.",
94536
+ example: null,
94251
94537
  type: ["string", "null"]
94252
94538
  },
94253
94539
  paid_at: {
@@ -94317,10 +94603,12 @@ var native_spec_default = {
94317
94603
  },
94318
94604
  promo_code_id: {
94319
94605
  description: "The promo code applied at checkout, prefixed `promo_`, or null.",
94606
+ example: null,
94320
94607
  type: ["string", "null"]
94321
94608
  },
94322
94609
  recovery_url: {
94323
94610
  description: "Whop-hosted URL where the buyer can sign in and complete 3D Secure for an off-session charge the bank challenged \u2014 a subscription renewal or a saved-card payment. Null when recovery is unavailable, you lack `member:basic:read`, or in list responses. Retrieve the payment for it.",
94611
+ example: null,
94324
94612
  type: ["string", "null"]
94325
94613
  },
94326
94614
  refundable: {
@@ -94341,6 +94629,7 @@ var native_spec_default = {
94341
94629
  },
94342
94630
  refunded_at: {
94343
94631
  description: "When the payment was refunded, or null.",
94632
+ example: null,
94344
94633
  type: ["string", "null"]
94345
94634
  },
94346
94635
  retryable: {
@@ -94350,19 +94639,23 @@ var native_spec_default = {
94350
94639
  },
94351
94640
  risk_score: {
94352
94641
  description: "Whop's published risk index from 0 (lowest) to 100 (highest), including enforced decision floors. This is not a fraud probability. Null when no score is available.",
94642
+ example: null,
94353
94643
  type: ["number", "null"]
94354
94644
  },
94355
94645
  risk_signals: {
94356
94646
  deprecated: true,
94357
94647
  description: "Deprecated. Risk score explanations are no longer provided; always null.\nDEPRECATED: Risk score explanations are no longer provided. Always null.",
94648
+ example: null,
94358
94649
  type: ["object", "null"]
94359
94650
  },
94360
94651
  settlement_time_at: {
94361
94652
  description: "When the portion not listed in `holds` posts to the account's available balance, at midnight UTC. The `financial_activity.funds_available` webhook's `posted_at` carries the same value when the settlement that clears it posts. Null until the payment is paid, and always null in list responses \u2014 retrieve the payment for it.",
94653
+ example: null,
94362
94654
  type: ["string", "null"]
94363
94655
  },
94364
94656
  shipment_id: {
94365
94657
  description: "The shipment fulfilling this payment, prefixed `ship_`. Null when nothing ships or without the shipment:basic:read permission.",
94658
+ example: null,
94366
94659
  type: ["string", "null"]
94367
94660
  },
94368
94661
  shipping_address: {
@@ -94839,6 +95132,7 @@ var native_spec_default = {
94839
95132
  },
94840
95133
  description: {
94841
95134
  description: "A longer explanation of the fee, when there is one.",
95135
+ example: null,
94842
95136
  type: ["string", "null"]
94843
95137
  },
94844
95138
  label: {
@@ -94990,6 +95284,7 @@ var native_spec_default = {
94990
95284
  },
94991
95285
  installment_count: {
94992
95286
  description: "Installment methods only: how many payments the charge splits into. Data, not copy \u2014 compose and translate the label client-side.",
95287
+ example: null,
94993
95288
  type: ["number", "null"]
94994
95289
  },
94995
95290
  payment_method_type: {
@@ -95683,6 +95978,7 @@ var native_spec_default = {
95683
95978
  },
95684
95979
  deleted_at: {
95685
95980
  description: "When the rule was deleted, as an ISO 8601 timestamp. `null` unless `status` is `deleted`.",
95981
+ example: null,
95686
95982
  type: ["string", "null"]
95687
95983
  },
95688
95984
  id: {
@@ -95920,6 +96216,7 @@ var native_spec_default = {
95920
96216
  },
95921
96217
  auto_capture_at: {
95922
96218
  description: "When Whop will capture this authorization automatically, as an ISO 8601 timestamp. `null` when no automatic capture was requested.",
96219
+ example: null,
95923
96220
  type: ["string", "null"]
95924
96221
  },
95925
96222
  capture_expires_at: {
@@ -96132,6 +96429,7 @@ var native_spec_default = {
96132
96429
  },
96133
96430
  category: {
96134
96431
  description: "The category the action is grouped under, or `null` when uncategorized.",
96432
+ example: null,
96135
96433
  type: ["string", "null"]
96136
96434
  },
96137
96435
  description: {
@@ -97934,6 +98232,7 @@ var native_spec_default = {
97934
98232
  },
97935
98233
  expiration_days: {
97936
98234
  description: "Access duration in days for expiration-based plans. `null` for plans without an expiration.",
98235
+ example: null,
97937
98236
  type: ["number", "null"]
97938
98237
  },
97939
98238
  id: {
@@ -97957,6 +98256,7 @@ var native_spec_default = {
97957
98256
  },
97958
98257
  title: {
97959
98258
  description: "Plan display name shown to customers. `null` if no title has been set.",
98259
+ example: null,
97960
98260
  type: ["string", "null"]
97961
98261
  },
97962
98262
  unlimited_stock: {
@@ -98713,6 +99013,7 @@ var native_spec_default = {
98713
99013
  "fraudulent",
98714
99014
  "requested_by_customer",
98715
99015
  "expired_uncaptured_charge",
99016
+ "dispute_alert",
98716
99017
  null
98717
99018
  ],
98718
99019
  example: "duplicate",
@@ -98737,6 +99038,7 @@ var native_spec_default = {
98737
99038
  },
98738
99039
  reference_value: {
98739
99040
  description: "The tracking reference the buyer's bank can trace the refund by.",
99041
+ example: null,
98740
99042
  type: ["string", "null"]
98741
99043
  },
98742
99044
  status: {
@@ -99110,6 +99412,7 @@ var native_spec_default = {
99110
99412
  },
99111
99413
  checkout_configuration_id: {
99112
99414
  description: "The checkout configuration this setup was created through, prefixed `ch_`. Null for a setup created through this API rather than a hosted checkout.",
99415
+ example: null,
99113
99416
  type: ["string", "null"]
99114
99417
  },
99115
99418
  client_secret: {
@@ -100647,6 +100950,7 @@ var native_spec_default = {
100647
100950
  },
100648
100951
  price_usd: {
100649
100952
  description: "USD price per native currency unit, or `null` when no exchange rate is available.",
100953
+ example: null,
100650
100954
  type: ["number", "null"]
100651
100955
  },
100652
100956
  reserve_balance_usd: {
@@ -101131,6 +101435,7 @@ var native_spec_default = {
101131
101435
  },
101132
101436
  buyer_account_id: {
101133
101437
  description: "The account the signup was submitted on behalf of, prefixed `biz_`, or `null` when the user signed up for themselves.",
101438
+ example: null,
101134
101439
  type: ["string", "null"]
101135
101440
  },
101136
101441
  created_at: {
@@ -101152,6 +101457,7 @@ var native_spec_default = {
101152
101457
  },
101153
101458
  membership_id: {
101154
101459
  description: "The membership created for this signup, prefixed `mem_`, or `null` when there is none. Check the membership's status to determine access.",
101460
+ example: null,
101155
101461
  type: ["string", "null"]
101156
101462
  },
101157
101463
  metadata: {
@@ -102047,6 +102353,7 @@ var apps_spec_default = {
102047
102353
  page_info: {
102048
102354
  properties: {
102049
102355
  end_cursor: {
102356
+ example: null,
102050
102357
  type: ["string", "null"]
102051
102358
  },
102052
102359
  has_next_page: {
@@ -103400,6 +103707,7 @@ var apps_spec_default = {
103400
103707
  },
103401
103708
  base_url: {
103402
103709
  description: "The production base URL where the app is hosted. `null` if no base URL is configured, if the caller lacks the `developer:basic:read` permission on the app's account, or on list responses, which never expose it.",
103710
+ example: null,
103403
103711
  type: ["string", "null"]
103404
103712
  },
103405
103713
  businesses_created_count: {
@@ -103440,6 +103748,7 @@ var apps_spec_default = {
103440
103748
  type: "string"
103441
103749
  },
103442
103750
  domains: {
103751
+ example: null,
103443
103752
  items: {
103444
103753
  $ref: "#/components/schemas/AppDomain",
103445
103754
  description: "Custom domain claims and assignments for this app, excluding removed domains. Empty when none exist; `null` when the caller lacks the account's `developer:basic:read` permission."
@@ -103647,6 +103956,7 @@ var apps_spec_default = {
103647
103956
  type: "string"
103648
103957
  },
103649
103958
  domains: {
103959
+ example: null,
103650
103960
  items: {
103651
103961
  $ref: "#/components/schemas/AppDomain",
103652
103962
  description: "Custom domain claims and assignments for this app, excluding removed domains. Empty when none exist; `null` when the caller lacks the account's `developer:basic:read` permission."
@@ -104098,6 +104408,7 @@ var apps_spec_default = {
104098
104408
  },
104099
104409
  build_id: {
104100
104410
  description: "The build the deployment produced, prefixed `abld_`, or `null` until it succeeds.",
104411
+ example: null,
104101
104412
  type: ["string", "null"]
104102
104413
  },
104103
104414
  draft: {
@@ -104107,6 +104418,7 @@ var apps_spec_default = {
104107
104418
  },
104108
104419
  error: {
104109
104420
  description: "Why the deployment failed, or `null` when it did not.",
104421
+ example: null,
104110
104422
  type: ["string", "null"]
104111
104423
  },
104112
104424
  estimated_duration_ms: {
@@ -104121,6 +104433,7 @@ var apps_spec_default = {
104121
104433
  },
104122
104434
  finished_at: {
104123
104435
  description: "When the deployment ended, in milliseconds since the epoch, or `null` while it is still running.",
104436
+ example: null,
104124
104437
  type: ["integer", "null"]
104125
104438
  },
104126
104439
  phase: {
@@ -104163,6 +104476,7 @@ var apps_spec_default = {
104163
104476
  },
104164
104477
  url: {
104165
104478
  description: "Where the deployed site is served, or `null` unless the deployment went live.",
104479
+ example: null,
104166
104480
  type: ["string", "null"]
104167
104481
  }
104168
104482
  },
@@ -104437,6 +104751,7 @@ var files_spec_default = {
104437
104751
  page_info: {
104438
104752
  properties: {
104439
104753
  end_cursor: {
104754
+ example: null,
104440
104755
  type: ["string", "null"]
104441
104756
  },
104442
104757
  has_next_page: {
@@ -105019,7 +105334,7 @@ async function announceActionUrl(url, {
105019
105334
  // package.json
105020
105335
  var package_default = {
105021
105336
  name: "@whop/cli",
105022
- version: "0.19.0",
105337
+ version: "0.20.0",
105023
105338
  description: "The Whop CLI \u2014 build and manage Whop apps from your terminal. Human and agent friendly.",
105024
105339
  keywords: [
105025
105340
  "agent",
@@ -106954,6 +107269,167 @@ function buildFeedbackCommand(kind) {
106954
107269
  };
106955
107270
  }
106956
107271
 
107272
+ // src/files/upload.ts
107273
+ import { closeSync, openSync, readFileSync as readFileSync7, readSync, statSync } from "fs";
107274
+ import { basename as basename2, resolve as resolve4 } from "path";
107275
+
107276
+ // src/journey/client.ts
107277
+ var PLACEHOLDER = "https://api.whop.com";
107278
+ var proxyFetch = createWhopFetch();
107279
+ async function makeWhopRequest(method, path9, body, accessToken) {
107280
+ const init = { method };
107281
+ if (body !== void 0) init.body = JSON.stringify(body);
107282
+ const res = accessToken ? await whopApiFetch(
107283
+ `${apiBaseUrl().replace(/\/$/, "")}${path9}`,
107284
+ accessToken,
107285
+ {
107286
+ ...init,
107287
+ headers: body !== void 0 ? { "Content-Type": "application/json" } : {}
107288
+ }
107289
+ ) : await proxyFetch(new Request(`${PLACEHOLDER}${path9}`, init));
107290
+ if (!res.ok) throw await responseError(res);
107291
+ const text4 = await res.text();
107292
+ return text4 ? JSON.parse(text4) : { success: true };
107293
+ }
107294
+
107295
+ // src/files/upload.ts
107296
+ var MULTIPART_THRESHOLD = 100 * 1024 * 1024;
107297
+ var defaultDependencies = {
107298
+ request: makeWhopRequest,
107299
+ put: (url, init) => fetch(url, init),
107300
+ sleep: (milliseconds) => new Promise((done) => setTimeout(done, milliseconds)),
107301
+ readyTimeoutMs: 12e4,
107302
+ multipartThreshold: MULTIPART_THRESHOLD
107303
+ };
107304
+ async function uploadLocalFile(input, dependencies = defaultDependencies) {
107305
+ const path9 = resolve4(input.filepath);
107306
+ const stats = statSync(path9, { throwIfNoEntry: false });
107307
+ if (!stats?.isFile()) throw new Error(`No file at ${input.filepath}.`);
107308
+ if (stats.size === 0) throw new Error(`${input.filepath} is empty.`);
107309
+ const multipart = stats.size > dependencies.multipartThreshold;
107310
+ const file = await dependencies.request("POST", "/files", {
107311
+ filename: input.filename ?? basename2(path9),
107312
+ ...input.visibility ? { visibility: input.visibility } : {},
107313
+ ...multipart ? { multipart: true, byte_size: stats.size } : {}
107314
+ });
107315
+ if (multipart) await uploadParts(path9, stats.size, file, dependencies);
107316
+ else await uploadWhole(path9, file, dependencies);
107317
+ return waitUntilReady(file.id, dependencies);
107318
+ }
107319
+ async function uploadWhole(path9, file, dependencies) {
107320
+ if (!file.upload_url)
107321
+ throw new Error(`Whop created ${file.id} without an upload URL.`);
107322
+ const response = await dependencies.put(file.upload_url, {
107323
+ method: "PUT",
107324
+ headers: file.upload_headers ?? {},
107325
+ body: new Uint8Array(readFileSync7(path9))
107326
+ });
107327
+ if (!response.ok)
107328
+ throw new Error(
107329
+ `Uploading ${file.id} failed: ${response.status} ${await response.text()}`
107330
+ );
107331
+ }
107332
+ async function uploadParts(path9, size, file, dependencies) {
107333
+ const {
107334
+ multipart_upload_id: uploadID,
107335
+ multipart_chunk_size: chunkSize,
107336
+ multipart_upload_urls: urls
107337
+ } = file;
107338
+ if (!uploadID || !chunkSize || !urls?.length)
107339
+ throw new Error(`Whop created ${file.id} without multipart upload URLs.`);
107340
+ const descriptor2 = openSync(path9, "r");
107341
+ const parts = [];
107342
+ try {
107343
+ for (const part of [...urls].sort(
107344
+ (a, b) => a.part_number - b.part_number
107345
+ )) {
107346
+ const offset = (part.part_number - 1) * chunkSize;
107347
+ const chunk = Buffer.alloc(Math.min(chunkSize, size - offset));
107348
+ readSync(descriptor2, chunk, 0, chunk.length, offset);
107349
+ const response = await dependencies.put(part.url, {
107350
+ method: "PUT",
107351
+ body: new Uint8Array(chunk)
107352
+ });
107353
+ const etag = response.headers.get("ETag");
107354
+ if (!response.ok || !etag)
107355
+ throw new Error(
107356
+ `Uploading part ${part.part_number} of ${file.id} failed: ${response.status}`
107357
+ );
107358
+ parts.push({ part_number: part.part_number, etag });
107359
+ }
107360
+ } finally {
107361
+ closeSync(descriptor2);
107362
+ }
107363
+ await dependencies.request("POST", `/files/${file.id}/complete`, {
107364
+ multipart_upload_id: uploadID,
107365
+ multipart_parts: parts
107366
+ });
107367
+ }
107368
+ async function waitUntilReady(id, dependencies) {
107369
+ const deadline = Date.now() + dependencies.readyTimeoutMs;
107370
+ while (true) {
107371
+ const file = await dependencies.request("GET", `/files/${id}`);
107372
+ if (file.upload_status === "ready") return file;
107373
+ if (file.upload_status === "failed")
107374
+ throw new Error(`Whop could not process ${id}.`);
107375
+ if (Date.now() >= deadline)
107376
+ throw new Error(
107377
+ `${id} was uploaded but is still ${file.upload_status ?? "processing"}. Check it with \`whop files get ${id}\`.`
107378
+ );
107379
+ await dependencies.sleep(1e3);
107380
+ }
107381
+ }
107382
+
107383
+ // src/files/commands.ts
107384
+ async function buildFilesGroup(description) {
107385
+ const files = Cli_exports.create("files", { description });
107386
+ const spec2 = filterSpecByTag(native_spec_default, "Files");
107387
+ const generated = await Openapi_exports.generateCommands(
107388
+ spec2,
107389
+ createWhopFetch(),
107390
+ {
107391
+ config: { security: false }
107392
+ }
107393
+ );
107394
+ for (const [name, entry] of generated) {
107395
+ if (!("run" in entry)) continue;
107396
+ files.command(name, name === "create" ? withLocalUpload(entry) : entry);
107397
+ }
107398
+ return files;
107399
+ }
107400
+ function withLocalUpload(entry) {
107401
+ const options = (entry.options ?? external_exports.object({})).partial({ filename: true }).extend({
107402
+ filepath: external_exports.string().optional().describe(
107403
+ "Path to a local file to upload. Creates the file, uploads its bytes, and returns it once ready. --filename defaults to the file's name."
107404
+ )
107405
+ });
107406
+ return {
107407
+ ...entry,
107408
+ description: "Upload a local file with --filepath, or create a file record and upload its bytes yourself",
107409
+ options,
107410
+ examples: [
107411
+ {
107412
+ options: { filepath: "./ad.mp4", visibility: "public" },
107413
+ description: "Upload a local file and wait until it is ready"
107414
+ }
107415
+ ],
107416
+ run: (context) => {
107417
+ const { filepath, ...rest } = context.options;
107418
+ if (filepath)
107419
+ return uploadLocalFile({
107420
+ filepath,
107421
+ filename: rest.filename,
107422
+ visibility: rest.visibility
107423
+ });
107424
+ if (!rest.filename)
107425
+ throw new Error(
107426
+ "Pass --filepath to upload a local file, or --filename to create a file record."
107427
+ );
107428
+ return entry.run({ ...context, options: rest });
107429
+ }
107430
+ };
107431
+ }
107432
+
106957
107433
  // src/api/groups.json
106958
107434
  var groups_default = [
106959
107435
  {
@@ -107291,30 +107767,11 @@ var API_GROUPS = groups_default.filter(
107291
107767
  // src/apps/commands.ts
107292
107768
  import { spinner as spinner4 } from "@clack/prompts";
107293
107769
  import { createHash as createHash3 } from "crypto";
107294
- import { existsSync as existsSync12, mkdtempSync as mkdtempSync3, readFileSync as readFileSync11, rmSync as rmSync4 } from "fs";
107770
+ import { existsSync as existsSync12, mkdtempSync as mkdtempSync3, readFileSync as readFileSync12, rmSync as rmSync4 } from "fs";
107295
107771
  import { tmpdir as tmpdir3 } from "os";
107296
- import { join as join12, relative as relative3, resolve as resolve8 } from "path";
107772
+ import { join as join12, relative as relative3, resolve as resolve9 } from "path";
107297
107773
  import chalk2 from "chalk";
107298
107774
 
107299
- // src/journey/client.ts
107300
- var PLACEHOLDER = "https://api.whop.com";
107301
- var proxyFetch = createWhopFetch();
107302
- async function makeWhopRequest(method, path9, body, accessToken) {
107303
- const init = { method };
107304
- if (body !== void 0) init.body = JSON.stringify(body);
107305
- const res = accessToken ? await whopApiFetch(
107306
- `${apiBaseUrl().replace(/\/$/, "")}${path9}`,
107307
- accessToken,
107308
- {
107309
- ...init,
107310
- headers: body !== void 0 ? { "Content-Type": "application/json" } : {}
107311
- }
107312
- ) : await proxyFetch(new Request(`${PLACEHOLDER}${path9}`, init));
107313
- if (!res.ok) throw await responseError(res);
107314
- const text4 = await res.text();
107315
- return text4 ? JSON.parse(text4) : { success: true };
107316
- }
107317
-
107318
107775
  // src/apps/api.ts
107319
107776
  async function createApp(input) {
107320
107777
  const company_id = input.company_id ?? await resolveActiveAccountId();
@@ -107411,18 +107868,18 @@ async function waitForBuildPromotion(buildId, timeoutMs = 3e4) {
107411
107868
  return latest;
107412
107869
  }
107413
107870
  function sleep(ms) {
107414
- return new Promise((resolve9) => setTimeout(resolve9, ms));
107871
+ return new Promise((resolve10) => setTimeout(resolve10, ms));
107415
107872
  }
107416
107873
 
107417
107874
  // src/apps/config.ts
107418
- import { existsSync as existsSync8, readFileSync as readFileSync7, writeFileSync as writeFileSync6 } from "fs";
107419
- import { join as join6, resolve as resolve4 } from "path";
107875
+ import { existsSync as existsSync8, readFileSync as readFileSync8, writeFileSync as writeFileSync6 } from "fs";
107876
+ import { join as join6, resolve as resolve5 } from "path";
107420
107877
  var APP_CONFIG_FILENAME = "whop.app.json";
107421
107878
  function findProjectDir(startDir) {
107422
- let dir = resolve4(startDir ?? process.cwd());
107879
+ let dir = resolve5(startDir ?? process.cwd());
107423
107880
  for (let i = 0; i < 25; i++) {
107424
107881
  if (existsSync8(join6(dir, APP_CONFIG_FILENAME))) return dir;
107425
- const parent = resolve4(dir, "..");
107882
+ const parent = resolve5(dir, "..");
107426
107883
  if (parent === dir) break;
107427
107884
  dir = parent;
107428
107885
  }
@@ -107433,7 +107890,7 @@ function readAppConfig(projectDir) {
107433
107890
  if (!existsSync8(path9)) return null;
107434
107891
  try {
107435
107892
  const parsed = JSON.parse(
107436
- readFileSync7(path9, "utf-8")
107893
+ readFileSync8(path9, "utf-8")
107437
107894
  );
107438
107895
  if (typeof parsed.app_id === "string" && typeof parsed.name === "string" && typeof parsed.route === "string") {
107439
107896
  return { app_id: parsed.app_id, name: parsed.name, route: parsed.route };
@@ -107608,7 +108065,7 @@ function stashPop(dir) {
107608
108065
  // src/apps/init.ts
107609
108066
  import { spinner as spinner3 } from "@clack/prompts";
107610
108067
  import { existsSync as existsSync11, readdirSync as readdirSync3 } from "fs";
107611
- import { resolve as resolve6 } from "path";
108068
+ import { resolve as resolve7 } from "path";
107612
108069
  import chalk from "chalk";
107613
108070
 
107614
108071
  // src/apps/source-archive.ts
@@ -107616,11 +108073,11 @@ import { spawnSync as spawnSync2 } from "child_process";
107616
108073
  import {
107617
108074
  mkdirSync as mkdirSync7,
107618
108075
  readdirSync as readdirSync2,
107619
- readFileSync as readFileSync8,
107620
- statSync,
108076
+ readFileSync as readFileSync9,
108077
+ statSync as statSync2,
107621
108078
  writeFileSync as writeFileSync7
107622
108079
  } from "fs";
107623
- import { dirname as dirname8, join as join8, resolve as resolve5, sep as sep2 } from "path";
108080
+ import { dirname as dirname8, join as join8, resolve as resolve6, sep as sep2 } from "path";
107624
108081
 
107625
108082
  // ../../node_modules/.pnpm/fflate@0.8.2/node_modules/fflate/esm/index.mjs
107626
108083
  import { createRequire as createRequire3 } from "module";
@@ -108623,7 +109080,7 @@ function listGitFiles(projectDir) {
108623
109080
  return [...new Set(listed.stdout.split("\0").filter(Boolean))].filter(
108624
109081
  (path9) => {
108625
109082
  try {
108626
- return statSync(join8(projectDir, path9)).isFile();
109083
+ return statSync2(join8(projectDir, path9)).isFile();
108627
109084
  } catch {
108628
109085
  return false;
108629
109086
  }
@@ -108654,7 +109111,7 @@ function packSourceArchive(projectDir) {
108654
109111
  }
108655
109112
  const contents = {};
108656
109113
  for (const path9 of paths) {
108657
- contents[path9] = readFileSync8(join8(projectDir, path9));
109114
+ contents[path9] = readFileSync9(join8(projectDir, path9));
108658
109115
  }
108659
109116
  return {
108660
109117
  zip: zipSync(contents, { level: 9, mem: 12 }),
@@ -108663,11 +109120,11 @@ function packSourceArchive(projectDir) {
108663
109120
  };
108664
109121
  }
108665
109122
  function extractSourceArchive(zip, targetDir) {
108666
- const root = resolve5(targetDir);
109123
+ const root = resolve6(targetDir);
108667
109124
  let count = 0;
108668
109125
  for (const [name, data] of Object.entries(unzipSync(zip))) {
108669
109126
  if (name.endsWith("/")) continue;
108670
- const dest = resolve5(root, name);
109127
+ const dest = resolve6(root, name);
108671
109128
  if (!dest.startsWith(root + sep2)) {
108672
109129
  throw new Error(`Archive entry escapes the target directory: ${name}`);
108673
109130
  }
@@ -108680,8 +109137,8 @@ function extractSourceArchive(zip, targetDir) {
108680
109137
 
108681
109138
  // src/apps/scaffold.ts
108682
109139
  import { spawnSync as spawnSync3 } from "child_process";
108683
- import { existsSync as existsSync9, readFileSync as readFileSync9, writeFileSync as writeFileSync8 } from "fs";
108684
- import { basename as basename2, join as join9 } from "path";
109140
+ import { existsSync as existsSync9, readFileSync as readFileSync10, writeFileSync as writeFileSync8 } from "fs";
109141
+ import { basename as basename3, join as join9 } from "path";
108685
109142
  var SPAWN_VIA_SHELL2 = process.platform === "win32";
108686
109143
  var DLX_RUNNERS = {
108687
109144
  npm: ["npx", "-y"],
@@ -108786,7 +109243,7 @@ function patchPackageJson(dir, manualSteps) {
108786
109243
  let raw;
108787
109244
  let pkg;
108788
109245
  try {
108789
- raw = readFileSync9(file, "utf-8");
109246
+ raw = readFileSync10(file, "utf-8");
108790
109247
  pkg = JSON.parse(raw);
108791
109248
  } catch {
108792
109249
  manualSteps.push(
@@ -108823,13 +109280,13 @@ function patchViteConfig(dir, manualSteps) {
108823
109280
  );
108824
109281
  return;
108825
109282
  }
108826
- let content = readFileSync9(file, "utf-8");
109283
+ let content = readFileSync10(file, "utf-8");
108827
109284
  const hasWhopPlugin = content.includes("@whop/cli/vite");
108828
109285
  if (!hasWhopPlugin) {
108829
109286
  const pluginsOpen = /plugins:\s*\[/;
108830
109287
  if (!pluginsOpen.test(content)) {
108831
109288
  manualSteps.push(
108832
- `Could not find a \`plugins: [...]\` array in ${basename2(file)}. Add \`import { whop } from '@whop/cli/vite'\` and include \`whop()\` in the config's plugins so builds pack dist/whop-build.zip.`
109289
+ `Could not find a \`plugins: [...]\` array in ${basename3(file)}. Add \`import { whop } from '@whop/cli/vite'\` and include \`whop()\` in the config's plugins so builds pack dist/whop-build.zip.`
108833
109290
  );
108834
109291
  } else {
108835
109292
  content = `import { whop } from '@whop/cli/vite'
@@ -108844,7 +109301,7 @@ ${content}`;
108844
109301
  }
108845
109302
  if (!content.includes("@cloudflare/vite-plugin")) {
108846
109303
  manualSteps.push(
108847
- `${basename2(file)} does not use @cloudflare/vite-plugin. Whop hosting runs builds on Cloudflare Workers: install @cloudflare/vite-plugin and wrangler, add \`cloudflare({ viteEnvironment: { name: 'ssr' } })\` to the plugins array (before your framework plugin), and make sure \`vite build\` emits dist/client (static assets) and dist/server (worker modules with an index.js entry).`
109304
+ `${basename3(file)} does not use @cloudflare/vite-plugin. Whop hosting runs builds on Cloudflare Workers: install @cloudflare/vite-plugin and wrangler, add \`cloudflare({ viteEnvironment: { name: 'ssr' } })\` to the plugins array (before your framework plugin), and make sure \`vite build\` emits dist/client (static assets) and dist/server (worker modules with an index.js entry).`
108848
109305
  );
108849
109306
  }
108850
109307
  }
@@ -108858,13 +109315,13 @@ function patchWranglerConfig(dir, route, manualSteps) {
108858
109315
  );
108859
109316
  return;
108860
109317
  }
108861
- const content = readFileSync9(file, "utf-8");
109318
+ const content = readFileSync10(file, "utf-8");
108862
109319
  const updated = replaceTopLevelName(content, route);
108863
109320
  if (updated) {
108864
109321
  writeIfChanged(file, updated, content);
108865
109322
  } else {
108866
109323
  manualSteps.push(
108867
- `Set the top-level "name" in ${basename2(file)} to "${route}" so the worker is named after the app's route.`
109324
+ `Set the top-level "name" in ${basename3(file)} to "${route}" so the worker is named after the app's route.`
108868
109325
  );
108869
109326
  }
108870
109327
  }
@@ -108910,7 +109367,7 @@ function replaceTopLevelName(content, route) {
108910
109367
  // src/apps/shared.ts
108911
109368
  import { isCancel as isCancel4, select as select3, spinner as spinner2, text as text2 } from "@clack/prompts";
108912
109369
  import { spawnSync as spawnSync4 } from "child_process";
108913
- import { existsSync as existsSync10, readFileSync as readFileSync10 } from "fs";
109370
+ import { existsSync as existsSync10, readFileSync as readFileSync11 } from "fs";
108914
109371
  import { join as join10 } from "path";
108915
109372
  var CommandAbort = class extends Error {
108916
109373
  constructor(options) {
@@ -108995,7 +109452,7 @@ function detectProjectPackageManager(projectDir) {
108995
109452
  function hasScript(projectDir, script) {
108996
109453
  try {
108997
109454
  const pkg = JSON.parse(
108998
- readFileSync10(join10(projectDir, "package.json"), "utf-8")
109455
+ readFileSync11(join10(projectDir, "package.json"), "utf-8")
108999
109456
  );
109000
109457
  return Boolean(pkg.scripts?.[script]);
109001
109458
  } catch {
@@ -109187,7 +109644,7 @@ async function runInitFlow(c2, options, pm = ensurePackageManager()) {
109187
109644
  options,
109188
109645
  templateAppType
109189
109646
  );
109190
- const targetDir = resolve6(options.dir ?? `./${route}`);
109647
+ const targetDir = resolve7(options.dir ?? `./${route}`);
109191
109648
  ensureEmptyTarget(targetDir);
109192
109649
  let app;
109193
109650
  try {
@@ -109277,7 +109734,7 @@ function initGitRepo(c2, targetDir) {
109277
109734
  // src/apps/pull.ts
109278
109735
  import { mkdtempSync as mkdtempSync2, mkdirSync as mkdirSync8, rmSync as rmSync3 } from "fs";
109279
109736
  import { tmpdir as tmpdir2 } from "os";
109280
- import { join as join11, resolve as resolve7 } from "path";
109737
+ import { join as join11, resolve as resolve8 } from "path";
109281
109738
  var pullOptions = external_exports.object({
109282
109739
  app: external_exports.string().optional().describe("App id (defaults to the project's linked app)"),
109283
109740
  build: external_exports.string().optional().describe(
@@ -109380,7 +109837,7 @@ async function loadApp(appId) {
109380
109837
  }
109381
109838
  }
109382
109839
  function resolveTargetDir(options, app) {
109383
- if (options.dir) return resolve7(options.dir);
109840
+ if (options.dir) return resolve8(options.dir);
109384
109841
  const projectDir = findProjectDir();
109385
109842
  if (projectDir && readAppConfig(projectDir)?.app_id === app.id) {
109386
109843
  return projectDir;
@@ -109393,7 +109850,7 @@ function resolveTargetDir(options, app) {
109393
109850
  retryable: true
109394
109851
  });
109395
109852
  }
109396
- return resolve7(`./${route}`);
109853
+ return resolve8(`./${route}`);
109397
109854
  }
109398
109855
  function ensureUsableRepo(targetDir) {
109399
109856
  const status = repoStatus(targetDir);
@@ -109559,7 +110016,7 @@ async function registerSpecCommands(group, tag) {
109559
110016
  }
109560
110017
  }
109561
110018
  async function resolveDeployProject(c2, dirOption) {
109562
- const projectDir = dirOption ? resolve8(dirOption) : findProjectDir() ?? process.cwd();
110019
+ const projectDir = dirOption ? resolve9(dirOption) : findProjectDir() ?? process.cwd();
109563
110020
  const isViteApp = existsSync12(join12(projectDir, "package.json")) && findViteConfig(projectDir) !== void 0;
109564
110021
  if (isViteApp) return { projectDir, freshInit: null };
109565
110022
  if (c2.agent) {
@@ -109993,7 +110450,7 @@ async function buildAppGroup() {
109993
110450
  )
109994
110451
  }),
109995
110452
  run: async (c2) => {
109996
- const projectDir = c2.options.dir ? resolve8(c2.options.dir) : findProjectDir();
110453
+ const projectDir = c2.options.dir ? resolve9(c2.options.dir) : findProjectDir();
109997
110454
  const config = projectDir ? readAppConfig(projectDir) : null;
109998
110455
  if (!projectDir || !config) {
109999
110456
  return c2.error({
@@ -110169,7 +110626,7 @@ Then re-run \`whop apps deploy\` \u2014 it re-checks the wiring and applies anyt
110169
110626
  message: `No build archive at ${BUILD_ARCHIVE}. Add the whop() plugin from @whop/cli/vite to your vite config, then build. See https://whop.com/docs/apps/hosting.`
110170
110627
  });
110171
110628
  }
110172
- const zip = readFileSync11(archivePath);
110629
+ const zip = readFileSync12(archivePath);
110173
110630
  const sizeMb = (zip.byteLength / 1024 / 1024).toFixed(1);
110174
110631
  const checksum = createHash3("sha256").update(zip).digest("hex");
110175
110632
  const sourceArchive = packSourceArchive(projectDir);
@@ -111222,7 +111679,7 @@ async function fetchAsset(c2, getEntry, id, progress) {
111222
111679
  }
111223
111680
  }
111224
111681
  function sleep2(ms) {
111225
- return new Promise((resolve9) => setTimeout(resolve9, ms));
111682
+ return new Promise((resolve10) => setTimeout(resolve10, ms));
111226
111683
  }
111227
111684
 
111228
111685
  // src/journey/quickstart.ts
@@ -111261,7 +111718,7 @@ var quickstartOutput = external_exports.object({
111261
111718
  ),
111262
111719
  created: external_exports.boolean().describe("Whether this run created the selected business account")
111263
111720
  });
111264
- var defaultDependencies = {
111721
+ var defaultDependencies2 = {
111265
111722
  getActiveProfile,
111266
111723
  getActiveProfileForRequest,
111267
111724
  getValidAccessToken,
@@ -111288,7 +111745,7 @@ var defaultDependencies = {
111288
111745
  promptBusinessName,
111289
111746
  startSpinner
111290
111747
  };
111291
- async function runQuickstart(ctx, dependencies = defaultDependencies) {
111748
+ async function runQuickstart(ctx, dependencies = defaultDependencies2) {
111292
111749
  const profile = dependencies.getActiveProfileForRequest();
111293
111750
  if (ctx.options.account_id && ctx.options.business_name !== void 0) {
111294
111751
  return ctx.error({
@@ -112423,12 +112880,6 @@ cli.command("quickstart", {
112423
112880
  cli.command("report-feedback", buildFeedbackCommand("report_feedback"));
112424
112881
  cli.command("ask-question", buildFeedbackCommand("ask_question"));
112425
112882
  cli.command(await buildAppGroup());
112426
- cli.command("files", {
112427
- description: "Create file uploads and retrieve uploaded file details.",
112428
- fetch: fetch2,
112429
- openapi: filterSpecByTag(files_spec_default, "Files"),
112430
- openapiConfig: { security: false }
112431
- });
112432
112883
  cli.command("upgrade", {
112433
112884
  description: "Update the whop CLI to the latest version",
112434
112885
  options: upgradeOptions,
@@ -112463,6 +112914,10 @@ for (const { name, tag, description } of API_GROUPS) {
112463
112914
  cli.command(await buildMediaGroup(description));
112464
112915
  continue;
112465
112916
  }
112917
+ if (name === "files") {
112918
+ cli.command(await buildFilesGroup(description));
112919
+ continue;
112920
+ }
112466
112921
  cli.command(name, {
112467
112922
  description,
112468
112923
  fetch: fetch2,