@whop/cli 0.4.0 → 0.5.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.
@@ -6453,12 +6453,12 @@ var native_spec_default = {
6453
6453
  description: "Checkout configuration ID, prefixed `ch_`."
6454
6454
  },
6455
6455
  created_at: {
6456
- type: "integer",
6457
- description: "Unix timestamp when the checkout configuration was created."
6456
+ type: "string",
6457
+ description: "When the checkout configuration was created, as an ISO 8601 timestamp."
6458
6458
  },
6459
6459
  updated_at: {
6460
- type: "integer",
6461
- description: "Unix timestamp when the checkout configuration was last updated."
6460
+ type: "string",
6461
+ description: "When the checkout configuration was last updated, as an ISO 8601 timestamp."
6462
6462
  },
6463
6463
  company_id: {
6464
6464
  type: "string",
@@ -6712,12 +6712,12 @@ var native_spec_default = {
6712
6712
  description: "Checkout configuration ID, prefixed `ch_`."
6713
6713
  },
6714
6714
  created_at: {
6715
- type: "integer",
6716
- description: "Unix timestamp when the checkout configuration was created."
6715
+ type: "string",
6716
+ description: "When the checkout configuration was created, as an ISO 8601 timestamp."
6717
6717
  },
6718
6718
  updated_at: {
6719
- type: "integer",
6720
- description: "Unix timestamp when the checkout configuration was last updated."
6719
+ type: "string",
6720
+ description: "When the checkout configuration was last updated, as an ISO 8601 timestamp."
6721
6721
  },
6722
6722
  company_id: {
6723
6723
  type: "string",
@@ -7181,12 +7181,12 @@ var native_spec_default = {
7181
7181
  description: "Checkout configuration ID, prefixed `ch_`."
7182
7182
  },
7183
7183
  created_at: {
7184
- type: "integer",
7185
- description: "Unix timestamp when the checkout configuration was created."
7184
+ type: "string",
7185
+ description: "When the checkout configuration was created, as an ISO 8601 timestamp."
7186
7186
  },
7187
7187
  updated_at: {
7188
- type: "integer",
7189
- description: "Unix timestamp when the checkout configuration was last updated."
7188
+ type: "string",
7189
+ description: "When the checkout configuration was last updated, as an ISO 8601 timestamp."
7190
7190
  },
7191
7191
  company_id: {
7192
7192
  type: "string",
@@ -7551,7 +7551,7 @@ var native_spec_default = {
7551
7551
  tags: [
7552
7552
  "Deposits"
7553
7553
  ],
7554
- description: "Resolves a deposit destination and returns the on-chain addresses that can fund it. No authentication is required; any business can be resolved by its account ID.",
7554
+ description: "Resolves a deposit destination and returns the on-chain addresses that can fund it. No authentication is required; any business can be resolved by its account ID. A caller authenticated as a user can additionally resolve their own user account.",
7555
7555
  operationId: "create",
7556
7556
  parameters: [],
7557
7557
  responses: {
@@ -9276,6 +9276,214 @@ var native_spec_default = {
9276
9276
  }
9277
9277
  }
9278
9278
  },
9279
+ "/media/generate": {
9280
+ post: {
9281
+ summary: "Generate Media Asset",
9282
+ tags: [
9283
+ "Media"
9284
+ ],
9285
+ security: [
9286
+ {
9287
+ bearerAuth: [
9288
+ "media:generate"
9289
+ ]
9290
+ }
9291
+ ],
9292
+ description: "Starts an AI media generation job billed from the account's balance. Generation is asynchronous \u2014 poll `GET /media/{id}` until the asset is `ready`, then use `file.id` anywhere attachments are accepted.",
9293
+ operationId: "generate",
9294
+ parameters: [],
9295
+ responses: {
9296
+ "201": {
9297
+ description: "Generation started.",
9298
+ content: {
9299
+ "application/json": {
9300
+ schema: {
9301
+ $ref: "#/components/schemas/MediaAsset"
9302
+ }
9303
+ }
9304
+ }
9305
+ },
9306
+ "400": {
9307
+ description: "Invalid generation parameters.",
9308
+ content: {
9309
+ "application/json": {
9310
+ schema: {
9311
+ type: "object",
9312
+ properties: {
9313
+ error: {
9314
+ type: "object",
9315
+ properties: {
9316
+ type: {
9317
+ type: "string"
9318
+ },
9319
+ message: {
9320
+ type: "string"
9321
+ }
9322
+ },
9323
+ required: [
9324
+ "type",
9325
+ "message"
9326
+ ]
9327
+ }
9328
+ },
9329
+ required: [
9330
+ "error"
9331
+ ]
9332
+ }
9333
+ }
9334
+ }
9335
+ },
9336
+ "401": {
9337
+ description: "Missing or invalid authentication.",
9338
+ $ref: "#/components/responses/Unauthorized"
9339
+ },
9340
+ "402": {
9341
+ description: "Insufficient balance.",
9342
+ content: {
9343
+ "application/json": {
9344
+ schema: {
9345
+ type: "object",
9346
+ properties: {
9347
+ error: {
9348
+ type: "object",
9349
+ properties: {
9350
+ type: {
9351
+ type: "string",
9352
+ enum: [
9353
+ "payment_required"
9354
+ ]
9355
+ },
9356
+ message: {
9357
+ type: "string"
9358
+ },
9359
+ deposit_url: {
9360
+ type: "string",
9361
+ description: "Hosted page where the account can deposit funds before retrying."
9362
+ }
9363
+ },
9364
+ required: [
9365
+ "type",
9366
+ "message",
9367
+ "deposit_url"
9368
+ ]
9369
+ }
9370
+ },
9371
+ required: [
9372
+ "error"
9373
+ ]
9374
+ }
9375
+ }
9376
+ }
9377
+ },
9378
+ "403": {
9379
+ description: "Missing the media:generate scope.",
9380
+ $ref: "#/components/responses/Forbidden"
9381
+ }
9382
+ },
9383
+ requestBody: {
9384
+ content: {
9385
+ "application/json": {
9386
+ schema: {
9387
+ type: "object",
9388
+ properties: {
9389
+ account_id: {
9390
+ type: "string",
9391
+ description: "Account ID, prefixed `biz_`. Defaults to the account the API key belongs to."
9392
+ },
9393
+ type: {
9394
+ type: "string",
9395
+ enum: [
9396
+ "video",
9397
+ "image"
9398
+ ],
9399
+ description: "The kind of media to generate."
9400
+ },
9401
+ prompt: {
9402
+ type: "string",
9403
+ description: "What to generate. Up to 2,000 characters."
9404
+ },
9405
+ reference_media: {
9406
+ type: "array",
9407
+ items: {
9408
+ type: "string"
9409
+ },
9410
+ description: "Optional reference image file IDs (`file_` prefixed), up to 4. For video the first reference seeds the opening frame."
9411
+ },
9412
+ duration_seconds: {
9413
+ type: "integer",
9414
+ enum: [
9415
+ 5,
9416
+ 10,
9417
+ 15
9418
+ ],
9419
+ description: "Video length in seconds. Video only; defaults to 5."
9420
+ },
9421
+ resolution: {
9422
+ type: "string",
9423
+ enum: [
9424
+ "480p",
9425
+ "720p",
9426
+ "1080p",
9427
+ "4k"
9428
+ ],
9429
+ description: "Video resolution. Video only; defaults to `1080p`. `1080p` is not supported by Seedance 2.0 Fast or Mini; `4k` is only supported by Seedance 2.0."
9430
+ }
9431
+ },
9432
+ required: [
9433
+ "type",
9434
+ "prompt"
9435
+ ]
9436
+ }
9437
+ }
9438
+ },
9439
+ required: true
9440
+ }
9441
+ }
9442
+ },
9443
+ "/media/{id}": {
9444
+ get: {
9445
+ summary: "Retrieve Media Asset",
9446
+ tags: [
9447
+ "Media"
9448
+ ],
9449
+ security: [
9450
+ {
9451
+ bearerAuth: [
9452
+ "media:read"
9453
+ ]
9454
+ }
9455
+ ],
9456
+ description: "Retrieves a media asset by ID. Poll this while the asset is `processing`.",
9457
+ operationId: "get",
9458
+ parameters: [
9459
+ {
9460
+ name: "id",
9461
+ in: "path",
9462
+ schema: {
9463
+ type: "string"
9464
+ },
9465
+ required: true,
9466
+ description: "Media asset ID, prefixed `media_`."
9467
+ }
9468
+ ],
9469
+ responses: {
9470
+ "200": {
9471
+ description: "Media asset retrieved.",
9472
+ content: {
9473
+ "application/json": {
9474
+ schema: {
9475
+ $ref: "#/components/schemas/MediaAsset"
9476
+ }
9477
+ }
9478
+ }
9479
+ },
9480
+ "404": {
9481
+ description: "Unknown media asset, including generation jobs not created through this API.",
9482
+ $ref: "#/components/responses/NotFound"
9483
+ }
9484
+ }
9485
+ }
9486
+ },
9279
9487
  "/payouts/methods": {
9280
9488
  get: {
9281
9489
  summary: "List Payout Methods",
@@ -15284,13 +15492,6 @@ var native_spec_default = {
15284
15492
  ],
15285
15493
  description: "Hosted verification session URL for the user to complete identity checks. Expires 7 days after creation. Omitted unless this verification's own status is `pending`; `null` if `pending` with no active session."
15286
15494
  },
15287
- access_token: {
15288
- type: [
15289
- "string",
15290
- "null"
15291
- ],
15292
- description: "Token for embedding the verification session directly in your own UI, as an alternative to redirecting to `session_url`. Follows the same presence rules as `session_url`."
15293
- },
15294
15495
  requested_information: {
15295
15496
  type: "array",
15296
15497
  description: "Fields or documents Whop still needs before review can continue. Submit answers with the Update Verification endpoint.",
@@ -15474,13 +15675,6 @@ var native_spec_default = {
15474
15675
  ],
15475
15676
  description: "Hosted verification session URL for the user to complete identity checks. Expires 7 days after creation. Omitted unless this verification's own status is `pending`; `null` if `pending` with no active session."
15476
15677
  },
15477
- access_token: {
15478
- type: [
15479
- "string",
15480
- "null"
15481
- ],
15482
- description: "Token for embedding the verification session directly in your own UI, as an alternative to redirecting to `session_url`. Follows the same presence rules as `session_url`."
15483
- },
15484
15678
  requested_information: {
15485
15679
  type: "array",
15486
15680
  description: "Fields or documents Whop still needs before review can continue. Submit answers with the Update Verification endpoint.",
@@ -15812,13 +16006,6 @@ var native_spec_default = {
15812
16006
  ],
15813
16007
  description: "Hosted verification session URL for the user to complete identity checks. Expires 7 days after creation. Omitted unless this verification's own status is `pending`; `null` if `pending` with no active session."
15814
16008
  },
15815
- access_token: {
15816
- type: [
15817
- "string",
15818
- "null"
15819
- ],
15820
- description: "Token for embedding the verification session directly in your own UI, as an alternative to redirecting to `session_url`. Follows the same presence rules as `session_url`."
15821
- },
15822
16009
  requested_information: {
15823
16010
  type: "array",
15824
16011
  description: "Fields or documents Whop still needs before review can continue. Submit answers with the Update Verification endpoint.",
@@ -16050,13 +16237,6 @@ var native_spec_default = {
16050
16237
  ],
16051
16238
  description: "Hosted verification session URL for the user to complete identity checks. Expires 7 days after creation. Omitted unless this verification's own status is `pending`; `null` if `pending` with no active session."
16052
16239
  },
16053
- access_token: {
16054
- type: [
16055
- "string",
16056
- "null"
16057
- ],
16058
- description: "Token for embedding the verification session directly in your own UI, as an alternative to redirecting to `session_url`. Follows the same presence rules as `session_url`."
16059
- },
16060
16240
  requested_information: {
16061
16241
  type: "array",
16062
16242
  description: "Fields or documents Whop still needs before review can continue. Submit answers with the Update Verification endpoint.",
@@ -16279,13 +16459,6 @@ var native_spec_default = {
16279
16459
  ],
16280
16460
  description: "Hosted verification session URL for the user to complete identity checks. Expires 7 days after creation. Omitted unless this verification's own status is `pending`; `null` if `pending` with no active session."
16281
16461
  },
16282
- access_token: {
16283
- type: [
16284
- "string",
16285
- "null"
16286
- ],
16287
- description: "Token for embedding the verification session directly in your own UI, as an alternative to redirecting to `session_url`. Follows the same presence rules as `session_url`."
16288
- },
16289
16462
  requested_information: {
16290
16463
  type: "array",
16291
16464
  description: "Fields or documents Whop still needs before review can continue. Submit answers with the Update Verification endpoint.",
@@ -16533,67 +16706,6 @@ var native_spec_default = {
16533
16706
  },
16534
16707
  required: true
16535
16708
  }
16536
- },
16537
- delete: {
16538
- summary: "Delete Verification",
16539
- tags: [
16540
- "Verifications"
16541
- ],
16542
- security: [
16543
- {
16544
- bearerAuth: [
16545
- "identity:write"
16546
- ]
16547
- }
16548
- ],
16549
- description: "Unlinks a verification profile from the caller's account or user; provider verification records are not erased.",
16550
- operationId: "delete",
16551
- parameters: [
16552
- {
16553
- $ref: "#/components/parameters/ApiVersionDate"
16554
- },
16555
- {
16556
- name: "verification_id",
16557
- in: "path",
16558
- required: true,
16559
- schema: {
16560
- type: "string"
16561
- },
16562
- description: "Verification profile ID, prefixed `idpf_`."
16563
- }
16564
- ],
16565
- responses: {
16566
- "200": {
16567
- description: "verification deleted",
16568
- content: {
16569
- "application/json": {
16570
- schema: {
16571
- type: "object",
16572
- properties: {
16573
- id: {
16574
- type: "string"
16575
- },
16576
- deleted: {
16577
- type: "boolean"
16578
- }
16579
- }
16580
- }
16581
- }
16582
- }
16583
- },
16584
- "401": {
16585
- description: "missing or invalid authentication",
16586
- $ref: "#/components/responses/Unauthorized"
16587
- },
16588
- "403": {
16589
- description: "credential lacks the required identity-write scope",
16590
- $ref: "#/components/responses/Forbidden"
16591
- },
16592
- "404": {
16593
- description: "no verification with that ID is visible to the credential",
16594
- $ref: "#/components/responses/NotFound"
16595
- }
16596
- }
16597
16709
  }
16598
16710
  }
16599
16711
  },
@@ -18768,10 +18880,12 @@ var native_spec_default = {
18768
18880
  type: "string"
18769
18881
  },
18770
18882
  created_at: {
18771
- type: "number"
18883
+ type: "string",
18884
+ description: "When the checkout configuration was created, as an ISO 8601 timestamp."
18772
18885
  },
18773
18886
  updated_at: {
18774
- type: "number"
18887
+ type: "string",
18888
+ description: "When the checkout configuration was last updated, as an ISO 8601 timestamp."
18775
18889
  },
18776
18890
  company_id: {
18777
18891
  type: "string",
@@ -18854,6 +18968,160 @@ var native_spec_default = {
18854
18968
  "payment_method_configuration"
18855
18969
  ]
18856
18970
  },
18971
+ MediaAssetFile: {
18972
+ type: "object",
18973
+ properties: {
18974
+ id: {
18975
+ type: "string",
18976
+ description: "File ID, prefixed `file_`."
18977
+ },
18978
+ url: {
18979
+ type: "string",
18980
+ description: "CDN URL for downloading the file."
18981
+ }
18982
+ },
18983
+ required: [
18984
+ "id",
18985
+ "url"
18986
+ ]
18987
+ },
18988
+ MediaAssetGeneration: {
18989
+ type: "object",
18990
+ properties: {
18991
+ prompt: {
18992
+ type: "string",
18993
+ description: "What the asset was generated from."
18994
+ },
18995
+ reference_media: {
18996
+ type: "array",
18997
+ items: {
18998
+ type: "string",
18999
+ description: "Reference image file IDs (`file_` prefixed) supplied at generation time."
19000
+ }
19001
+ },
19002
+ duration_seconds: {
19003
+ type: [
19004
+ "number",
19005
+ "null"
19006
+ ],
19007
+ description: "Requested video length in seconds. `null` for images."
19008
+ },
19009
+ resolution: {
19010
+ type: [
19011
+ "string",
19012
+ "null"
19013
+ ],
19014
+ description: "Requested video resolution. `null` for images. `1080p` is not supported by Seedance 2.0 Fast or Mini; `4k` is only supported by Seedance 2.0.",
19015
+ enum: [
19016
+ "480p",
19017
+ "720p",
19018
+ "1080p",
19019
+ "4k",
19020
+ null
19021
+ ],
19022
+ example: "480p"
19023
+ }
19024
+ },
19025
+ required: [
19026
+ "prompt",
19027
+ "reference_media",
19028
+ "duration_seconds",
19029
+ "resolution"
19030
+ ]
19031
+ },
19032
+ MediaAsset: {
19033
+ type: "object",
19034
+ properties: {
19035
+ id: {
19036
+ type: "string",
19037
+ description: "Media asset ID, prefixed `media_`."
19038
+ },
19039
+ media_type: {
19040
+ type: "string",
19041
+ description: "The kind of media this asset holds.",
19042
+ enum: [
19043
+ "video",
19044
+ "image"
19045
+ ],
19046
+ example: "video"
19047
+ },
19048
+ source: {
19049
+ type: "string",
19050
+ description: "How the asset was created. Always `generated`.",
19051
+ enum: [
19052
+ "generated"
19053
+ ],
19054
+ example: "generated"
19055
+ },
19056
+ status: {
19057
+ type: "string",
19058
+ description: "Lifecycle state: `processing` while generation runs, `ready` when the file is available, `failed` when generation failed and the charge was refunded.",
19059
+ enum: [
19060
+ "processing",
19061
+ "ready",
19062
+ "failed"
19063
+ ],
19064
+ example: "processing"
19065
+ },
19066
+ amount_charged: {
19067
+ type: [
19068
+ "number",
19069
+ "null"
19070
+ ],
19071
+ description: "USD amount charged to the account's balance for this generation. `null` if the generation wasn't billed."
19072
+ },
19073
+ currency: {
19074
+ type: "string",
19075
+ description: "Currency of `amount_charged`. Always `usd`."
19076
+ },
19077
+ error_message: {
19078
+ type: [
19079
+ "string",
19080
+ "null"
19081
+ ],
19082
+ description: "Why generation failed. `null` unless status is `failed`."
19083
+ },
19084
+ created_at: {
19085
+ type: "string",
19086
+ description: "ISO 8601 timestamp when the generation was requested."
19087
+ },
19088
+ completed_at: {
19089
+ type: [
19090
+ "string",
19091
+ "null"
19092
+ ],
19093
+ description: "ISO 8601 timestamp when the asset reached a terminal state. `null` while `processing`."
19094
+ },
19095
+ generation: {
19096
+ $ref: "#/components/schemas/MediaAssetGeneration",
19097
+ description: "The inputs the asset was generated from."
19098
+ },
19099
+ file: {
19100
+ description: "The produced file, usable anywhere attachments are accepted. `null` until the asset is `ready`.",
19101
+ oneOf: [
19102
+ {
19103
+ $ref: "#/components/schemas/MediaAssetFile"
19104
+ },
19105
+ {
19106
+ type: "null"
19107
+ }
19108
+ ]
19109
+ }
19110
+ },
19111
+ required: [
19112
+ "id",
19113
+ "media_type",
19114
+ "source",
19115
+ "status",
19116
+ "amount_charged",
19117
+ "currency",
19118
+ "error_message",
19119
+ "created_at",
19120
+ "completed_at",
19121
+ "generation",
19122
+ "file"
19123
+ ]
19124
+ },
18857
19125
  PlanCustomField: {
18858
19126
  type: "object",
18859
19127
  properties: {
@@ -19826,6 +20094,183 @@ var native_spec_default = {
19826
20094
  "scopes"
19827
20095
  ]
19828
20096
  },
20097
+ UserBalanceBusiness: {
20098
+ type: "object",
20099
+ properties: {
20100
+ id: {
20101
+ type: "string",
20102
+ description: "The company ID, which looks like biz_*************."
20103
+ },
20104
+ name: {
20105
+ type: [
20106
+ "string",
20107
+ "null"
20108
+ ],
20109
+ description: "The company's display name."
20110
+ },
20111
+ logo_url: {
20112
+ type: [
20113
+ "string",
20114
+ "null"
20115
+ ],
20116
+ description: "The company's logo URL."
20117
+ },
20118
+ balance_usd: {
20119
+ type: "string",
20120
+ description: "The company's total balance in USD."
20121
+ }
20122
+ },
20123
+ required: [
20124
+ "id",
20125
+ "name",
20126
+ "logo_url",
20127
+ "balance_usd"
20128
+ ]
20129
+ },
20130
+ UserBalanceCash: {
20131
+ type: "object",
20132
+ properties: {
20133
+ currency: {
20134
+ type: "string",
20135
+ description: "Lowercase ISO currency code, such as `usd` or `eur`."
20136
+ },
20137
+ balance: {
20138
+ type: "number",
20139
+ description: "Available balance in the native currency."
20140
+ },
20141
+ balance_usd: {
20142
+ type: "number",
20143
+ description: "Available balance converted to USD."
20144
+ },
20145
+ pending_balance_usd: {
20146
+ type: "number",
20147
+ description: "Pending balance converted to USD."
20148
+ },
20149
+ reserve_balance_usd: {
20150
+ type: "number",
20151
+ description: "Reserved balance converted to USD."
20152
+ },
20153
+ total_withdrawable_balance: {
20154
+ type: "number",
20155
+ description: "Withdrawable amount in the native currency."
20156
+ }
20157
+ },
20158
+ required: [
20159
+ "currency",
20160
+ "balance",
20161
+ "balance_usd",
20162
+ "pending_balance_usd",
20163
+ "reserve_balance_usd",
20164
+ "total_withdrawable_balance"
20165
+ ]
20166
+ },
20167
+ UserBalance: {
20168
+ type: "object",
20169
+ properties: {
20170
+ total_usd: {
20171
+ type: "string",
20172
+ description: "The user's personal balance in USD: cash (available + pending + reserve) + crypto + in-flight treasury deposits. Excludes companies (see businesses_total_usd)."
20173
+ },
20174
+ cash_usd: {
20175
+ type: "string",
20176
+ description: "Fiat cash in USD, including pending and reserve."
20177
+ },
20178
+ crypto_usd: {
20179
+ type: "string",
20180
+ description: "Crypto holdings in USD."
20181
+ },
20182
+ treasury_pending_usd: {
20183
+ type: "string",
20184
+ description: "Balance-to-wallet USDT0 withdrawals still in flight, in USD."
20185
+ },
20186
+ pending_usd: {
20187
+ type: "string",
20188
+ description: "Pending funds in USD: fiat pending + in-flight treasury deposits."
20189
+ },
20190
+ cash: {
20191
+ type: "array",
20192
+ items: {
20193
+ $ref: "#/components/schemas/UserBalanceCash",
20194
+ description: "Per-currency fiat cash balances."
20195
+ }
20196
+ },
20197
+ crypto: {
20198
+ type: "array",
20199
+ items: {
20200
+ $ref: "#/components/schemas/UserBalanceToken",
20201
+ description: "Per-token crypto holdings in the ledger's own wallet."
20202
+ }
20203
+ },
20204
+ businesses_total_usd: {
20205
+ type: "string",
20206
+ description: "Combined USD balance across every company the user owns."
20207
+ },
20208
+ businesses: {
20209
+ type: "array",
20210
+ items: {
20211
+ $ref: "#/components/schemas/UserBalanceBusiness",
20212
+ description: "Per-company balances for companies the user owns, highest balance first. Excludes companies with no balance."
20213
+ }
20214
+ }
20215
+ },
20216
+ required: [
20217
+ "total_usd",
20218
+ "cash_usd",
20219
+ "crypto_usd",
20220
+ "treasury_pending_usd",
20221
+ "pending_usd",
20222
+ "cash",
20223
+ "crypto",
20224
+ "businesses_total_usd",
20225
+ "businesses"
20226
+ ]
20227
+ },
20228
+ UserBalanceToken: {
20229
+ type: "object",
20230
+ properties: {
20231
+ symbol: {
20232
+ type: "string",
20233
+ description: "Token display symbol, such as `USDT`, `XAUT`, or `cbBTC`."
20234
+ },
20235
+ name: {
20236
+ type: [
20237
+ "string",
20238
+ "null"
20239
+ ],
20240
+ description: "The token's display name."
20241
+ },
20242
+ balance: {
20243
+ type: "string",
20244
+ description: "Amount held in native token units, as a decimal string."
20245
+ },
20246
+ value_usd: {
20247
+ type: "number",
20248
+ description: "Holding USD value."
20249
+ },
20250
+ price_usd: {
20251
+ type: [
20252
+ "number",
20253
+ "null"
20254
+ ],
20255
+ description: "USD price per token, or `null` when unknown."
20256
+ },
20257
+ icon_url: {
20258
+ type: [
20259
+ "string",
20260
+ "null"
20261
+ ],
20262
+ description: "Token icon URL."
20263
+ }
20264
+ },
20265
+ required: [
20266
+ "symbol",
20267
+ "name",
20268
+ "balance",
20269
+ "value_usd",
20270
+ "price_usd",
20271
+ "icon_url"
20272
+ ]
20273
+ },
19829
20274
  User: {
19830
20275
  type: "object",
19831
20276
  properties: {
@@ -19862,19 +20307,16 @@ var native_spec_default = {
19862
20307
  ],
19863
20308
  description: "The user's profile picture, an object with a url"
19864
20309
  },
19865
- total_usd: {
19866
- type: [
19867
- "string",
19868
- "null"
19869
- ],
19870
- description: "Total USD value across the user's balances with known exchange rates. Computed only on `GET /users/me` self-view for callers with balance-read scope; `null` otherwise."
19871
- },
19872
- balances: {
19873
- type: "array",
19874
- items: {
19875
- $ref: "#/components/schemas/AccountBalanceToken",
19876
- description: "User holdings (crypto and fiat), each with USD value. Empty when `total_usd` is `null`."
19877
- }
20310
+ balance: {
20311
+ description: "The user's balance: personal cash + crypto + in-flight treasury deposits, plus per-company balances for companies they own. Computed only on `GET /users/me` self-view for callers with balance-read scope; `null` otherwise.",
20312
+ oneOf: [
20313
+ {
20314
+ $ref: "#/components/schemas/UserBalance"
20315
+ },
20316
+ {
20317
+ type: "null"
20318
+ }
20319
+ ]
19878
20320
  },
19879
20321
  verification: {
19880
20322
  type: "object",
@@ -19888,8 +20330,7 @@ var native_spec_default = {
19888
20330
  "bio",
19889
20331
  "created_at",
19890
20332
  "profile_picture",
19891
- "total_usd",
19892
- "balances",
20333
+ "balance",
19893
20334
  "verification"
19894
20335
  ]
19895
20336
  },
@@ -20760,8 +21201,7 @@ var native_spec_default = {
20760
21201
  required: false,
20761
21202
  schema: {
20762
21203
  type: "string",
20763
- format: "date",
20764
- example: "2026-07-01"
21204
+ example: "2026-07-08-1"
20765
21205
  },
20766
21206
  description: "Pins the request to a dated API version."
20767
21207
  }
@@ -20819,7 +21259,7 @@ var apps_spec_default = {
20819
21259
  termsOfService: "https://whop.com/tos-developer-api/",
20820
21260
  title: "Whop API",
20821
21261
  version: "1.0.0",
20822
- "x-api-version-date": "2026-07-01"
21262
+ "x-api-version-date": "2026-07-08-1"
20823
21263
  },
20824
21264
  paths: {
20825
21265
  "/app_builds": {
@@ -23140,7 +23580,7 @@ var apps_spec_default = {
23140
23580
  "x-group-title": "Developer"
23141
23581
  },
23142
23582
  post: {
23143
- description: "Register a new app on the Whop developer platform. Apps provide custom experiences that can be added to products.\n\nRequired permissions:\n - `developer:create_app`\n - `developer:manage_api_key`",
23583
+ description: "Register a new app on the Whop developer platform. Apps provide custom experiences that can be added to products.\n\nRequired permissions:\n - `developer:create_app`\n - `developer:manage_api_key`\n - `developer:update_app`",
23144
23584
  operationId: "create",
23145
23585
  parameters: [],
23146
23586
  requestBody: {
@@ -23572,7 +24012,8 @@ var apps_spec_default = {
23572
24012
  {
23573
24013
  bearerAuth: [
23574
24014
  "developer:create_app",
23575
- "developer:manage_api_key"
24015
+ "developer:manage_api_key",
24016
+ "developer:update_app"
23576
24017
  ]
23577
24018
  }
23578
24019
  ],
@@ -23585,7 +24026,7 @@ var apps_spec_default = {
23585
24026
  },
23586
24027
  "/apps/{id}": {
23587
24028
  get: {
23588
- description: "Retrieves the details of an existing app.\n\nRequired permissions:\n - `developer:manage_api_key`",
24029
+ description: "Retrieves the details of an existing app.\n\nRequired permissions:\n - `developer:manage_api_key`\n - `developer:update_app`",
23589
24030
  operationId: "get",
23590
24031
  parameters: [
23591
24032
  {
@@ -23960,7 +24401,8 @@ var apps_spec_default = {
23960
24401
  security: [
23961
24402
  {
23962
24403
  bearerAuth: [
23963
- "developer:manage_api_key"
24404
+ "developer:manage_api_key",
24405
+ "developer:update_app"
23964
24406
  ]
23965
24407
  }
23966
24408
  ],
@@ -24115,6 +24557,14 @@ var apps_spec_default = {
24115
24557
  "null"
24116
24558
  ]
24117
24559
  },
24560
+ secrets: {
24561
+ additionalProperties: true,
24562
+ description: `Secrets to add or overwrite on the app, as an object of string values (e.g. {"MAIL_API_KEY": "..."}). Keys not included are left untouched. Pass null or an empty string as the value to delete a secret. Secrets are encrypted at rest and injected into the app's hosted server runtime as environment bindings.`,
24563
+ type: [
24564
+ "object",
24565
+ "null"
24566
+ ]
24567
+ },
24118
24568
  skills_path: {
24119
24569
  description: "The URL path to the skills directory of the app, such as '/assets/skills/'.",
24120
24570
  type: [
@@ -25224,6 +25674,14 @@ var apps_spec_default = {
25224
25674
  "null"
25225
25675
  ]
25226
25676
  },
25677
+ secrets: {
25678
+ additionalProperties: true,
25679
+ description: "The app's secrets as an object of string values. Encrypted at rest and injected into the app's hosted server runtime as environment bindings. Requires the 'developer:update_app' permission.",
25680
+ type: [
25681
+ "object",
25682
+ "null"
25683
+ ]
25684
+ },
25227
25685
  skills_path: {
25228
25686
  description: "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
25229
25687
  example: "/experiences/[experienceId]",
@@ -25300,7 +25758,8 @@ var apps_spec_default = {
25300
25758
  "stats",
25301
25759
  "api_key",
25302
25760
  "production_web_build",
25303
- "redirect_uris"
25761
+ "redirect_uris",
25762
+ "secrets"
25304
25763
  ],
25305
25764
  type: "object"
25306
25765
  },
@@ -31621,7 +32080,7 @@ import { createRequire as createRequire2 } from "module";
31621
32080
  // src/lib/build-info.ts
31622
32081
  var buildChannel = true ? "npm" : "dev";
31623
32082
  var buildTarget = typeof WHOP_CLI_TARGET === "string" ? WHOP_CLI_TARGET : null;
31624
- var buildVersion = true ? "0.4.0" : null;
32083
+ var buildVersion = true ? "0.5.0" : null;
31625
32084
  function isHomebrewPath(execPath, env = process.env) {
31626
32085
  if (/[/\\](Cellar|homebrew|linuxbrew)[/\\]/.test(execPath)) return true;
31627
32086
  const prefix = env.HOMEBREW_PREFIX?.trim();
@@ -32702,4 +33161,4 @@ export {
32702
33161
  resolveActiveAccountId,
32703
33162
  createWhopFetch
32704
33163
  };
32705
- //# sourceMappingURL=chunk-2K4WBZA5.js.map
33164
+ //# sourceMappingURL=chunk-X34EUMEM.js.map