@whop/cli 0.17.0 → 0.18.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/README.md CHANGED
@@ -73,6 +73,8 @@ whop ask-question --content "How do trials interact with an existing subscriptio
73
73
 
74
74
  Both commands submit one observation for Whop's internal review and return a receipt. `ask-question` records an unanswered question; it does not return an answer or start a support conversation. Use a user credential from `whop login` (browser OAuth). Remove secrets, personal data, and payment details from `--content`.
75
75
 
76
+ Use `--account_id biz_...` to identify the account for an affected resource. Both commands default to your active account when available. Account context is optional.
77
+
76
78
  ## Ship apps
77
79
 
78
80
  Hosted web apps (`*.whop.site`) follow a git-shaped lifecycle. Two on-ramps, one loop:
@@ -120,6 +122,14 @@ whop checkout-configurations create --help # shareable, prefilled check
120
122
  whop stats list # financial, audience, and traffic reporting
121
123
  ```
122
124
 
125
+ Set product gallery images or videos with uploaded file IDs:
126
+
127
+ ```bash
128
+ whop products update prod_xxxxxxxx --gallery_images '[{"id":"file_xxxxxxxx"}]'
129
+ ```
130
+
131
+ `products create` accepts the same option. The array replaces the gallery in display order; include every file you want to keep. Pass `'[]'` to clear it. `banner_image` is separate and does not satisfy the marketplace gallery requirement.
132
+
123
133
  Money moves through the same surface: payouts, transfers, deposits, swaps, and cards. Payouts and card issuing require identity verification (`whop verifications`). Steps that need a browser, like KYC, show up as a link to open.
124
134
 
125
135
  ## Serve the customers you have
package/dist/index.js CHANGED
@@ -33084,6 +33084,7 @@ var native_spec_default = {
33084
33084
  schema: {
33085
33085
  items: {
33086
33086
  enum: [
33087
+ "account_settlement",
33087
33088
  "ad_budget_release",
33088
33089
  "ad_campaign_budget",
33089
33090
  "ad_publisher_payout",
@@ -33511,6 +33512,7 @@ var native_spec_default = {
33511
33512
  schema: {
33512
33513
  items: {
33513
33514
  enum: [
33515
+ "account_settlement",
33514
33516
  "ad_budget_release",
33515
33517
  "ad_campaign_budget",
33516
33518
  "ad_publisher_payout",
@@ -41785,6 +41787,7 @@ var native_spec_default = {
41785
41787
  "kyc_completed",
41786
41788
  "rmi_clear",
41787
41789
  "identity_rfi_clear",
41790
+ "guardian_id_clear",
41788
41791
  "ecommerce_fulfillment_connected",
41789
41792
  "block_move_money_out",
41790
41793
  "block_move_money_out_set_by_parent",
@@ -46765,6 +46768,26 @@ var native_spec_default = {
46765
46768
  example: "Full interior extraction, leather conditioning, and an ozone odor treatment.",
46766
46769
  type: ["string", "null"]
46767
46770
  },
46771
+ gallery_images: {
46772
+ description: "Images or videos displayed in the product gallery, in display order. Replaces the existing gallery. Send an empty array to clear it; omit or pass null to leave it unchanged. A banner image does not populate the gallery.",
46773
+ items: {
46774
+ properties: {
46775
+ direct_upload_id: {
46776
+ description: "The signed ID of a completed direct upload, as an alternative to id.",
46777
+ example: "eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
46778
+ type: "string"
46779
+ },
46780
+ id: {
46781
+ description: "The tag of an already-uploaded attachment.",
46782
+ example: "file_xxxxxxxxxxxxxx",
46783
+ type: "string"
46784
+ }
46785
+ },
46786
+ type: "object"
46787
+ },
46788
+ maxItems: 8,
46789
+ type: ["array", "null"]
46790
+ },
46768
46791
  global_affiliate_percentage: {
46769
46792
  description: "The commission rate affiliates earn.",
46770
46793
  example: 10,
@@ -47046,6 +47069,26 @@ var native_spec_default = {
47046
47069
  example: "Full interior extraction, leather conditioning, and an ozone odor treatment.",
47047
47070
  type: ["string", "null"]
47048
47071
  },
47072
+ gallery_images: {
47073
+ description: "Images or videos displayed in the product gallery, in display order. Replaces the existing gallery. Send an empty array to clear it; omit or pass null to leave it unchanged. A banner image does not populate the gallery.",
47074
+ items: {
47075
+ properties: {
47076
+ direct_upload_id: {
47077
+ description: "The signed ID of a completed direct upload, as an alternative to id.",
47078
+ example: "eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
47079
+ type: "string"
47080
+ },
47081
+ id: {
47082
+ description: "The tag of an already-uploaded attachment.",
47083
+ example: "file_xxxxxxxxxxxxxx",
47084
+ type: "string"
47085
+ }
47086
+ },
47087
+ type: "object"
47088
+ },
47089
+ maxItems: 8,
47090
+ type: ["array", "null"]
47091
+ },
47049
47092
  headline: {
47050
47093
  description: "A short marketing headline for the product page.",
47051
47094
  example: "Steam, shampoo, and odor removal in one visit",
@@ -57639,6 +57682,7 @@ var native_spec_default = {
57639
57682
  "ledger_account.funds_available",
57640
57683
  "swap.completed",
57641
57684
  "deposit.succeeded",
57685
+ "financial_activity.funds_available",
57642
57686
  "transfer.created",
57643
57687
  "transfer.completed",
57644
57688
  "transfer.failed",
@@ -58011,6 +58055,7 @@ var native_spec_default = {
58011
58055
  "ledger_account.funds_available",
58012
58056
  "swap.completed",
58013
58057
  "deposit.succeeded",
58058
+ "financial_activity.funds_available",
58014
58059
  "transfer.created",
58015
58060
  "transfer.completed",
58016
58061
  "transfer.failed",
@@ -63878,6 +63923,143 @@ var native_spec_default = {
63878
63923
  tags: ["Exports"]
63879
63924
  }
63880
63925
  },
63926
+ "financial_activity.funds_available": {
63927
+ post: {
63928
+ description: "Sent when a settlement moves one release date's pending funds into the account's available balance \u2014 one event per release date that cleared, carrying that settlement's ledger line. Its posted_at is the release date at midnight UTC, the same value as settlement_time_at on every payment it clears\n\nRequired permissions:\n - `webhook_receive:financial_activity`",
63929
+ parameters: [
63930
+ {
63931
+ in: "header",
63932
+ name: "webhook-id",
63933
+ required: true,
63934
+ schema: {
63935
+ description: "A unique identifier for this webhook request",
63936
+ example: "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
63937
+ type: "string"
63938
+ }
63939
+ },
63940
+ {
63941
+ in: "header",
63942
+ name: "webhook-signature",
63943
+ required: true,
63944
+ schema: {
63945
+ description: "The signature of the webhook request with the webhook version prepended",
63946
+ example: "v1,BASE64ENCODEDSIGNATURE",
63947
+ type: "string"
63948
+ }
63949
+ },
63950
+ {
63951
+ in: "header",
63952
+ name: "webhook-timestamp",
63953
+ required: true,
63954
+ schema: {
63955
+ description: "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
63956
+ example: "1727606400",
63957
+ type: "string"
63958
+ }
63959
+ }
63960
+ ],
63961
+ requestBody: {
63962
+ content: {
63963
+ "application/json": {
63964
+ example: {
63965
+ account_id: "biz_xxxxxxxxxxxxxx",
63966
+ api_version: "v1",
63967
+ api_version_date: "2026-09-11-1",
63968
+ data: {
63969
+ amount: "512345000000",
63970
+ available_at: "2026-01-01T12:00:00.000Z",
63971
+ currency: {
63972
+ code: "usd",
63973
+ precision: "100000000"
63974
+ },
63975
+ id: "line_7",
63976
+ line_type: "account_settlement",
63977
+ object: "ledger_activity",
63978
+ posted_at: "2026-01-02T12:00:00.000Z",
63979
+ resource: null,
63980
+ source: {
63981
+ id: "wallet_release_date_settlement|ldgr_xxxxxxxxxxxxxx|2026-01-01|usd",
63982
+ object: "settlement",
63983
+ release_date: "2026-01-01",
63984
+ settled_at: "2026-01-01T12:00:00.000Z"
63985
+ },
63986
+ usd_amount: "5123.45"
63987
+ },
63988
+ id: "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
63989
+ timestamp: "2025-01-01T00:00:00.000Z",
63990
+ type: "financial_activity.funds_available"
63991
+ },
63992
+ schema: {
63993
+ properties: {
63994
+ account_id: {
63995
+ description: "The account ID that this webhook event is associated with",
63996
+ example: "biz_xxxxxxxxxxxxxx",
63997
+ type: ["string", "null"]
63998
+ },
63999
+ api_version: {
64000
+ const: "v1",
64001
+ description: "The API version for this webhook",
64002
+ example: "v1",
64003
+ type: "string"
64004
+ },
64005
+ api_version_date: {
64006
+ description: "The dated API version (Api-Version-Date) the payload is serialized to",
64007
+ example: "2026-07-20",
64008
+ type: ["string", "null"]
64009
+ },
64010
+ data: {
64011
+ $ref: "#/components/schemas/LedgerActivity"
64012
+ },
64013
+ id: {
64014
+ description: "A unique ID for every single webhook request",
64015
+ example: "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
64016
+ type: "string"
64017
+ },
64018
+ previous_attributes: {
64019
+ description: "For some `.updated` events, the old values of the payload fields that changed, keyed by field name. Omitted when no capture is available for the event",
64020
+ type: "object"
64021
+ },
64022
+ timestamp: {
64023
+ description: "The timestamp in ISO 8601 format that the webhook was sent at on the server",
64024
+ example: "2025-01-01T00:00:00.000Z",
64025
+ format: "date-time",
64026
+ type: "string"
64027
+ },
64028
+ type: {
64029
+ const: "financial_activity.funds_available",
64030
+ description: "The webhook event type",
64031
+ example: "financial_activity.funds_available",
64032
+ type: "string"
64033
+ }
64034
+ },
64035
+ required: [
64036
+ "id",
64037
+ "api_version",
64038
+ "api_version_date",
64039
+ "timestamp",
64040
+ "type",
64041
+ "data"
64042
+ ],
64043
+ type: "object"
64044
+ }
64045
+ }
64046
+ }
64047
+ },
64048
+ responses: {
64049
+ "200": {
64050
+ description: "Return a 200 status to indicate that the data was received successfully"
64051
+ }
64052
+ },
64053
+ summary: "Financial Activity Funds available",
64054
+ tags: ["Ledgers"],
64055
+ "x-mint": {
64056
+ metadata: {
64057
+ title: "Financial Activity Funds Available",
64058
+ sidebarTitle: "Financial Activity Funds Available"
64059
+ }
64060
+ }
64061
+ }
64062
+ },
63881
64063
  "identity_profile.updated": {
63882
64064
  post: {
63883
64065
  description: "Sent whenever an identity profile changes state \u2014 a verification is approved, needs action, or is rejected, or a Whop review opens or clears. Every other identity_profile event is also delivered as an identity_profile.updated, so you can subscribe to this single event and re-fetch the verification to read its current status.\n\nRequired permissions:\n - `identity:read`\n - `webhook_receive:identity_profiles`",
@@ -70318,6 +70500,7 @@ var native_spec_default = {
70318
70500
  claim_url: "https://whop.com/claim",
70319
70501
  created_at: "2026-01-01T12:00:00.000Z",
70320
70502
  estimated_arrival: "2026-01-01T12:00:00.000Z",
70503
+ fee_kind: "swap",
70321
70504
  from_amount: "502.51",
70322
70505
  from_currency: "usdt",
70323
70506
  id: "airdrp_xxxxxxxxxxxxxx",
@@ -79692,12 +79875,6 @@ var native_spec_default = {
79692
79875
  example: "2026-01-01T12:00:00.000Z",
79693
79876
  type: ["string", "null"]
79694
79877
  },
79695
- execution_type: {
79696
- description: "How the card runs. `whop_ai` means `prompt` is sent to Whop AI, which carries out every step.",
79697
- enum: ["whop_ai"],
79698
- example: "whop_ai",
79699
- type: "string"
79700
- },
79701
79878
  id: {
79702
79879
  description: "Economic intelligence ID, prefixed `reca_`",
79703
79880
  example: "reca_xxxxxxxxxxxxxx",
@@ -79745,7 +79922,6 @@ var native_spec_default = {
79745
79922
  "id",
79746
79923
  "account_id",
79747
79924
  "action_type",
79748
- "execution_type",
79749
79925
  "title",
79750
79926
  "prompt",
79751
79927
  "reasoning",
@@ -80437,6 +80613,7 @@ var native_spec_default = {
80437
80613
  line_type: {
80438
80614
  description: "The ledger line category this activity was posted under.",
80439
80615
  enum: [
80616
+ "account_settlement",
80440
80617
  "ad_budget_release",
80441
80618
  "ad_campaign_budget",
80442
80619
  "ad_publisher_payout",
@@ -81162,7 +81339,7 @@ var native_spec_default = {
81162
81339
  },
81163
81340
  source: {
81164
81341
  additionalProperties: true,
81165
- description: "Source of this ledger activity.",
81342
+ description: "Source of this ledger activity. Platform markup fees use object platform_fee and the ledger activity ID.",
81166
81343
  properties: {
81167
81344
  amount_float: {
81168
81345
  description: "Payout amount as a decimal number in the destination currency (payout sources only; requires payout:withdrawal:read).",
@@ -81195,6 +81372,19 @@ var native_spec_default = {
81195
81372
  format: "date-time",
81196
81373
  type: ["string", "null"]
81197
81374
  },
81375
+ fee_kind: {
81376
+ description: "Action that generated a platform markup fee: deposit, swap, transfer, card_spend, or payout. Present for platform_markup_fee and platform_markup_fee_payout, including when include_resource is false. Null when the originating action is unavailable; omitted on other source types.",
81377
+ enum: [
81378
+ "payout",
81379
+ "transfer",
81380
+ "deposit",
81381
+ "swap",
81382
+ "card_spend",
81383
+ null
81384
+ ],
81385
+ example: "swap",
81386
+ type: ["string", "null"]
81387
+ },
81198
81388
  from_amount: {
81199
81389
  description: "Amount converted out of from_currency as a decimal string (swap sources only).",
81200
81390
  example: "502.51",
@@ -82510,7 +82700,7 @@ var native_spec_default = {
82510
82700
  type: ["string", "null"]
82511
82701
  },
82512
82702
  recovery_url: {
82513
- description: "Whop-hosted URL where the buyer can sign in and complete 3D Secure for a failed subscription renewal. Null when recovery is unavailable, you lack `member:basic:read`, or in list responses. Retrieve the payment for it.",
82703
+ 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.",
82514
82704
  type: ["string", "null"]
82515
82705
  },
82516
82706
  refundable: {
@@ -82547,7 +82737,7 @@ var native_spec_default = {
82547
82737
  type: ["object", "null"]
82548
82738
  },
82549
82739
  settlement_time_at: {
82550
- description: "When the funds post to the account's available balance, at midnight UTC. The `ledger_account.funds_available` webhook carries the same value. Null until the payment is paid, and always null in list responses \u2014 retrieve the payment for it.",
82740
+ description: "When the funds post 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.",
82551
82741
  type: ["string", "null"]
82552
82742
  },
82553
82743
  shipment_id: {
@@ -82809,10 +82999,14 @@ var native_spec_default = {
82809
82999
  type: "string"
82810
83000
  },
82811
83001
  bank_code: {
82812
- description: "The receiving bank's code in the local clearing system.",
83002
+ description: "The code that identifies the receiving bank \u2014 its code in the local clearing system, or its SWIFT/BIC on a transfer that crosses borders.",
82813
83003
  example: "684",
82814
83004
  type: "string"
82815
83005
  },
83006
+ bank_code_label: {
83007
+ description: "What to call `bank_code` when showing it, in the scheme's own terms \u2014 `SWIFT / BIC` on an international wire, for example.",
83008
+ type: "string"
83009
+ },
82816
83010
  bank_name: {
82817
83011
  description: "The receiving bank's name.",
82818
83012
  example: "Frost Bank",
@@ -84260,6 +84454,7 @@ var native_spec_default = {
84260
84454
  "webhook_receive:ledger_accounts",
84261
84455
  "webhook_receive:accounts",
84262
84456
  "webhook_receive:deposits",
84457
+ "webhook_receive:financial_activity",
84263
84458
  "webhook_receive:transfers",
84264
84459
  "webhook_receive:card_transactions",
84265
84460
  "webhook_receive:cards",
@@ -84525,6 +84720,7 @@ var native_spec_default = {
84525
84720
  "WebhookReceiveLedgerAccounts",
84526
84721
  "WebhookReceiveAccounts",
84527
84722
  "WebhookReceiveDeposits",
84723
+ "WebhookReceiveFinancialActivity",
84528
84724
  "WebhookReceiveTransfers",
84529
84725
  "WebhookReceiveCardTransactions",
84530
84726
  "WebhookReceiveCards",
@@ -85601,7 +85797,7 @@ var native_spec_default = {
85601
85797
  },
85602
85798
  description: {
85603
85799
  description: "Written description displayed on the product page. `null` if none is set.",
85604
- example: "evolve back-end solutions",
85800
+ example: "aggregate 24/7 ROI",
85605
85801
  type: ["string", "null"]
85606
85802
  },
85607
85803
  external_identifier: {
@@ -85618,7 +85814,7 @@ var native_spec_default = {
85618
85814
  },
85619
85815
  headline: {
85620
85816
  description: "Short marketing headline displayed on product page.",
85621
- example: "impact map",
85817
+ example: "SWAG",
85622
85818
  type: ["string", "null"]
85623
85819
  },
85624
85820
  id: {
@@ -88371,6 +88567,7 @@ var native_spec_default = {
88371
88567
  "ledger_account.funds_available",
88372
88568
  "swap.completed",
88373
88569
  "deposit.succeeded",
88570
+ "financial_activity.funds_available",
88374
88571
  "transfer.created",
88375
88572
  "transfer.completed",
88376
88573
  "transfer.failed",
@@ -88501,6 +88698,7 @@ var native_spec_default = {
88501
88698
  "ledger_account.funds_available",
88502
88699
  "swap.completed",
88503
88700
  "deposit.succeeded",
88701
+ "financial_activity.funds_available",
88504
88702
  "transfer.created",
88505
88703
  "transfer.completed",
88506
88704
  "transfer.failed",
@@ -88761,6 +88959,7 @@ var native_spec_default = {
88761
88959
  "ledger_account.funds_available",
88762
88960
  "swap.completed",
88763
88961
  "deposit.succeeded",
88962
+ "financial_activity.funds_available",
88764
88963
  "transfer.created",
88765
88964
  "transfer.completed",
88766
88965
  "transfer.failed",
@@ -91994,7 +92193,7 @@ async function announceActionUrl(url, {
91994
92193
  // package.json
91995
92194
  var package_default = {
91996
92195
  name: "@whop/cli",
91997
- version: "0.17.0",
92196
+ version: "0.18.0",
91998
92197
  description: "The Whop CLI \u2014 build and manage Whop apps from your terminal. Human and agent friendly.",
91999
92198
  keywords: [
92000
92199
  "agent",
@@ -93854,6 +94053,9 @@ function safeParse(text4) {
93854
94053
 
93855
94054
  // src/feedback.ts
93856
94055
  var feedbackOptions = external_exports.object({
94056
+ account_id: external_exports.string().regex(/^biz_[A-Za-z0-9]+$/).max(255).optional().describe(
94057
+ "Account ID (biz_...) for the affected resource. Defaults to your active account when available."
94058
+ ),
93857
94059
  content: external_exports.string().trim().min(1).max(12e3).describe(
93858
94060
  "Describe the problem or unanswered question and relevant context. Remove credentials, personal data, and payment details."
93859
94061
  )
@@ -93879,7 +94081,11 @@ function buildFeedbackCommand(kind) {
93879
94081
  "Content-Type": "application/json",
93880
94082
  "Idempotency-Key": crypto.randomUUID()
93881
94083
  },
93882
- body: JSON.stringify({ source: `cli_${kind}`, content })
94084
+ body: JSON.stringify({
94085
+ source: `cli_${kind}`,
94086
+ content,
94087
+ account_id: options.account_id ?? await resolveActiveAccountId()
94088
+ })
93883
94089
  })
93884
94090
  );
93885
94091
  if (!response.ok) throw await responseError(response);