@whop/cli 0.0.5 → 0.0.6

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/native-spec.json","../src/auth/client.ts","../src/auth/config.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Cli.ts","../../../node_modules/.pnpm/tokenx@1.3.0/node_modules/tokenx/dist/index.mjs","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/helpers.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Completions.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Errors.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Fetch.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Filter.ts","../../../node_modules/.pnpm/@toon-format+toon@2.3.0/node_modules/@toon-format/toon/dist/index.mjs","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/json.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/yaml.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Formatter.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Parser.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/command.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Help.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/cta.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/pm.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Schema.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Mcp.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/dereference.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Openapi.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/Skill.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/SyncMcp.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/SyncSkills.ts","../../../node_modules/.pnpm/incur@https+++codeload.github.com+whopio+incur+tar.gz+5ca60d5/node_modules/incur/src/internal/agents.ts","../src/auth/types.ts","../src/auth/keyring.ts","../src/auth/oauth.ts","../src/auth/callback-server.ts","../src/auth/callback-html.ts","../src/auth/prompts.ts","../src/auth/scopes.ts","../src/auth/profiles.ts","../src/api/index.ts"],"sourcesContent":["{\n \"openapi\": \"3.1.0\",\n \"info\": {\n \"title\": \"Whop API\",\n \"description\": \"Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema at build time.\",\n \"version\": \"v1\"\n },\n \"servers\": [\n {\n \"url\": \"https://{defaultHost}\",\n \"variables\": {\n \"defaultHost\": {\n \"default\": \"api.whop.com/api/v1\"\n }\n }\n }\n ],\n \"paths\": {\n \"/accounts\": {\n \"get\": {\n \"summary\": \"List Accounts\",\n \"tags\": [\n \"Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"company:balance:read\"\n ]\n }\n ],\n \"description\": \"Lists accounts visible to the credential. User tokens return the user's business accounts; business account API keys return the requesting business account and its connected accounts.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of accounts to return (default 10, max 50).\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns accounts after this position.\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of accounts to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns accounts before this position.\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\"\n ],\n \"default\": \"created_at\"\n },\n \"required\": false,\n \"description\": \"The field to sort accounts by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"desc\"\n },\n \"required\": false,\n \"description\": \"Sort direction.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"accounts listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Account\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"end_cursor\",\n \"start_cursor\",\n \"has_next_page\",\n \"has_previous_page\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required balance-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create Account\",\n \"tags\": [\n \"Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"company:create_child\"\n ]\n }\n ],\n \"description\": \"Creates an account. User tokens create business accounts; business account API keys create connected accounts. Tax fields (`tax_remitted_by`, `product_tax_code_id`, `business_address`, `tax_identifiers`) are configured with Update Account, not at creation.\",\n \"operationId\": \"create\",\n \"parameters\": [],\n \"responses\": {\n \"201\": {\n \"description\": \"account created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Account\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"the request body is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required connected-account creation scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"email\": {\n \"type\": \"string\",\n \"description\": \"The email address of the account owner. Required for business account API key requests.\"\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Arbitrary key/value metadata to store on the account.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/accounts/{account_id}\": {\n \"get\": {\n \"summary\": \"Retrieve Account\",\n \"tags\": [\n \"Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"company:balance:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single account visible to the credential, including its crypto wallet.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"name\": \"account_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Account ID, prefixed `biz_`.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"account retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Account\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required balance-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no account with that ID is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n },\n \"patch\": {\n \"summary\": \"Update Account\",\n \"tags\": [\n \"Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"company:update\"\n ]\n }\n ],\n \"description\": \"Updates an account. User tokens can update business accounts; business account API keys can update connected accounts.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"name\": \"account_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Account ID, prefixed `biz_`.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"account updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Account\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"store page config is not an object\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required update scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no account with that ID is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"affiliate_application_required\": {\n \"type\": \"boolean\",\n \"description\": \"Whether prospective affiliates must submit an application before promoting this account.\"\n },\n \"affiliate_instructions\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Guidelines shown to affiliates promoting this account.\"\n },\n \"banner_image\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Attachment input for the account banner image.\"\n },\n \"business_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"High-level business category for the account.\"\n },\n \"country\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Country where the account is located.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account promotional description.\"\n },\n \"featured_affiliate_product_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ID of the product to feature for affiliates. Pass `null` to clear.\"\n },\n \"home_preferences\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"Public account home page preferences.\"\n },\n \"industry_group\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account industry group.\"\n },\n \"industry_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Specific industry vertical for the account.\"\n },\n \"invoice_prefix\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Prefix used for account invoices.\"\n },\n \"logo\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Attachment input for the account logo.\"\n },\n \"onboarding_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The type of onboarding the account has completed.\"\n },\n \"opengraph_image\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Attachment input for the account Open Graph image.\"\n },\n \"opengraph_image_variant\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The account Open Graph image variant.\"\n },\n \"other_business_description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The description of the business type when business_type is other.\"\n },\n \"other_industry_description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The description of the industry type when industry_type is other.\"\n },\n \"require_2fa\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account requires authorized users to have two-factor authentication enabled.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The unique URL slug for the account.\"\n },\n \"send_customer_emails\": {\n \"type\": \"boolean\",\n \"description\": \"Whether Whop sends transactional emails to customers on behalf of this account.\"\n },\n \"show_joined_whops\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account appears in joined whops on other accounts.\"\n },\n \"show_reviews_dtc\": {\n \"type\": \"boolean\",\n \"description\": \"Whether reviews are displayed on direct-to-consumer product pages.\"\n },\n \"show_user_directory\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account shows users in the user directory.\"\n },\n \"social_links\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n },\n \"description\": \"The full list of social links to display for the account.\"\n },\n \"store_page_config\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Account store page display configuration.\"\n },\n \"target_audience\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The target audience for this account.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display name of the account.\"\n },\n \"use_logo_as_opengraph_image_fallback\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account uses its logo as the fallback Open Graph image.\"\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Arbitrary key/value metadata to store on the account.\"\n },\n \"tax_remitted_by\": {\n \"type\": \"string\",\n \"enum\": [\n \"whop\",\n \"self\",\n \"none\"\n ],\n \"description\": \"Who calculates and remits tax for the account: `whop` (Whop calculates and remits), `self` (Whop calculates; the account collects and remits), or `none` (neither; the account is responsible). `self` requires a `business_address` in a supported country.\"\n },\n \"product_tax_code_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"ID of the tax classification code applied by default to the account's products.\"\n },\n \"business_address\": {\n \"type\": \"object\",\n \"description\": \"Account business address used to calculate tax. A complete address in a supported country is required when `tax_remitted_by` is `self`.\",\n \"properties\": {\n \"line1\": {\n \"type\": \"string\",\n \"description\": \"First line of the street address.\"\n },\n \"line2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Second line of the street address.\"\n },\n \"city\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"City name.\"\n },\n \"state\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"State, province, or region code, for example `CA`.\"\n },\n \"postal_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Postal or ZIP code.\"\n },\n \"country\": {\n \"type\": \"string\",\n \"description\": \"Two-letter ISO 3166-1 country code, for example `US`, `DE`, or `GB`.\"\n }\n }\n },\n \"tax_identifiers\": {\n \"type\": \"array\",\n \"description\": \"Account tax/VAT registrations to add or update. When `tax_remitted_by` is `self`, tax is calculated and collected only in the countries where the account holds a registration.\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"tax_id_type\",\n \"tax_id_value\"\n ],\n \"properties\": {\n \"tax_id_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"ad_nrt\",\n \"ao_tin\",\n \"ar_cuit\",\n \"al_tin\",\n \"am_tin\",\n \"aw_tin\",\n \"au_abn\",\n \"au_arn\",\n \"eu_vat\",\n \"az_tin\",\n \"bs_tin\",\n \"bh_vat\",\n \"bd_bin\",\n \"bb_tin\",\n \"by_tin\",\n \"bj_ifu\",\n \"bo_tin\",\n \"ba_tin\",\n \"br_cnpj\",\n \"br_cpf\",\n \"bg_uic\",\n \"bf_ifu\",\n \"kh_tin\",\n \"cm_niu\",\n \"ca_bn\",\n \"ca_gst_hst\",\n \"ca_pst_bc\",\n \"ca_pst_mb\",\n \"ca_pst_sk\",\n \"ca_qst\",\n \"cv_nif\",\n \"cl_tin\",\n \"cn_tin\",\n \"co_nit\",\n \"cd_nif\",\n \"cr_tin\",\n \"hr_oib\",\n \"do_rcn\",\n \"ec_ruc\",\n \"eg_tin\",\n \"sv_nit\",\n \"et_tin\",\n \"eu_oss_vat\",\n \"ge_vat\",\n \"gh_tin\",\n \"de_stn\",\n \"gb_vat\",\n \"gn_nif\",\n \"hk_br\",\n \"hu_tin\",\n \"is_vat\",\n \"in_gst\",\n \"id_npwp\",\n \"il_vat\",\n \"jp_cn\",\n \"jp_rn\",\n \"jp_trn\",\n \"kz_bin\",\n \"ke_pin\",\n \"kg_tin\",\n \"la_tin\",\n \"li_uid\",\n \"li_vat\",\n \"my_frp\",\n \"my_itn\",\n \"my_sst\",\n \"mr_nif\",\n \"mx_rfc\",\n \"md_vat\",\n \"me_pib\",\n \"ma_vat\",\n \"np_pan\",\n \"nz_gst\",\n \"ng_tin\",\n \"mk_vat\",\n \"no_vat\",\n \"no_voec\",\n \"om_vat\",\n \"pe_ruc\",\n \"ph_tin\",\n \"ro_tin\",\n \"ru_inn\",\n \"ru_kpp\",\n \"sa_vat\",\n \"sn_ninea\",\n \"rs_pib\",\n \"sg_gst\",\n \"sg_uen\",\n \"si_tin\",\n \"za_vat\",\n \"kr_brn\",\n \"es_cif\",\n \"ch_uid\",\n \"ch_vat\",\n \"tw_vat\",\n \"tj_tin\",\n \"tz_vat\",\n \"th_vat\",\n \"tr_tin\",\n \"ug_tin\",\n \"ua_vat\",\n \"ae_trn\",\n \"us_ein\",\n \"uy_ruc\",\n \"uz_tin\",\n \"uz_vat\",\n \"ve_rif\",\n \"vn_tin\",\n \"zm_tin\",\n \"zw_tin\",\n \"sr_fin\"\n ],\n \"description\": \"Tax ID type, for example `eu_vat`, `gb_vat`, or `us_ein`.\"\n },\n \"tax_id_value\": {\n \"type\": \"string\",\n \"description\": \"Tax ID value, for example `DE123456789`.\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/accounts/me\": {\n \"get\": {\n \"summary\": \"Retrieve Requesting Account\",\n \"tags\": [\n \"Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"company:balance:read\"\n ]\n }\n ],\n \"description\": \"Retrieves the business account associated with the current business account API key.\",\n \"operationId\": \"me\",\n \"responses\": {\n \"200\": {\n \"description\": \"requesting account retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Account\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required balance-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n },\n \"parameters\": []\n }\n },\n \"/ad_campaigns\": {\n \"get\": {\n \"summary\": \"List Ad Campaigns\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists the ad campaigns for an account, with stats over the requested window.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The account the campaigns belong to. Defaults to the account-scoped key's own account.\"\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"draft\",\n \"active\",\n \"paused\",\n \"payment_failed\"\n ]\n },\n \"description\": \"Only return campaigns with this status.\"\n },\n {\n \"name\": \"query\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter campaigns by a title or ID substring.\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"updated_at\"\n ]\n },\n \"description\": \"The field to sort by. Defaults to created_at.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ]\n },\n \"description\": \"The sort direction. Defaults to desc.\"\n },\n {\n \"name\": \"created_before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only return campaigns created before this timestamp.\"\n },\n {\n \"name\": \"created_after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only return campaigns created after this timestamp.\"\n },\n {\n \"name\": \"stats_from\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Start of the stats window. Defaults to all-time.\"\n },\n {\n \"name\": \"stats_to\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"End of the stats window. Defaults to now.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n },\n \"description\": \"The number of campaigns to return.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n },\n \"description\": \"The number of campaigns to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page before (from page_info.start_cursor).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaigns listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AdCampaign\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"account_id missing and unresolvable\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create an Ad Campaign\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:create\"\n ]\n }\n ],\n \"description\": \"Creates an ad campaign for an account.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaign created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdCampaign\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"unsupported platform\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The account to create the campaign under. Defaults to the account-scoped key's own account.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The title of the campaign.\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\n \"meta\"\n ],\n \"description\": \"The ad network the campaign runs on.\"\n },\n \"objective\": {\n \"type\": \"string\",\n \"enum\": [\n \"awareness\",\n \"traffic\",\n \"engagement\",\n \"leads\",\n \"sales\"\n ],\n \"description\": \"The goal the campaign optimizes toward.\"\n },\n \"budget_amount\": {\n \"type\": \"number\",\n \"description\": \"The campaign budget, in USD. Required for CBO (budget_optimization: ad_campaign); omit for ABO.\"\n },\n \"budget_optimization\": {\n \"type\": \"string\",\n \"enum\": [\n \"ad_campaign\",\n \"ad_group\"\n ],\n \"description\": \"Which level owns the budget — the campaign (CBO) or each ad group (ABO). Defaults to ad_group.\"\n },\n \"budget_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"daily\",\n \"lifetime\"\n ],\n \"description\": \"Whether the budget is spent per day or over the campaign's lifetime. Defaults to daily.\"\n },\n \"special_ad_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"housing\",\n \"employment\",\n \"financial_products\",\n \"politics\"\n ]\n },\n \"description\": \"Regulated categories the campaign falls under. Ads in these categories are subject to extra targeting restrictions.\"\n },\n \"bid_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"minimum_cost\",\n \"average_target\",\n \"maximum_target\"\n ],\n \"description\": \"CBO bid strategy: minimum_cost (lowest cost), average_target (cost cap), or maximum_target (bid cap). CBO only.\"\n },\n \"desired_cost_per_result\": {\n \"type\": \"number\",\n \"description\": \"Target/cap cost per result in USD for average_target / maximum_target bidding. CBO only.\"\n },\n \"starts_at\": {\n \"type\": \"string\",\n \"description\": \"Campaign schedule start (ISO 8601). CBO only.\"\n },\n \"ends_at\": {\n \"type\": \"string\",\n \"description\": \"Campaign schedule end (ISO 8601). CBO only.\"\n }\n },\n \"required\": [\n \"title\",\n \"platform\",\n \"objective\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/ad_campaigns/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve an Ad Campaign\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:basic:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single ad campaign with stats over the requested window.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad campaign ID.\"\n },\n {\n \"name\": \"stats_from\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Start of the stats window.\"\n },\n {\n \"name\": \"stats_to\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"End of the stats window.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaign retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdCampaign\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad campaign not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n },\n \"patch\": {\n \"summary\": \"Update an Ad Campaign\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Updates an ad campaign's editable fields (title, budget, schedule), and launches a draft campaign by setting status to active. Objective, budget optimization, budget type, special ad categories, bid type and desired cost per result are fixed at creation and cannot be changed.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad campaign ID.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaign updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdCampaign\"\n }\n }\n }\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The name of the campaign.\"\n },\n \"budget_amount\": {\n \"type\": \"number\",\n \"description\": \"The campaign budget, in the account's currency. Interpreted as daily or lifetime per the campaign's existing budget type.\"\n },\n \"starts_at\": {\n \"type\": \"string\",\n \"description\": \"Campaign schedule start (ISO 8601). CBO only.\"\n },\n \"ends_at\": {\n \"type\": \"string\",\n \"description\": \"Campaign schedule end (ISO 8601). CBO only.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\"\n ],\n \"description\": \"Set to active to launch a draft campaign (moderates and pushes it live). Live-campaign pause and resume use the pause and unpause actions.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n },\n \"delete\": {\n \"summary\": \"Delete an Ad Campaign\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Deletes an ad campaign and archives it on the ad platform (cascades to ad groups and ads). Returns true on success.\",\n \"operationId\": \"delete\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaign deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad campaign not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad campaign ID.\"\n }\n ]\n }\n },\n \"/ad_campaigns/{id}/pause\": {\n \"post\": {\n \"summary\": \"Pause an Ad Campaign\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Pauses an active ad campaign.\",\n \"operationId\": \"pause\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaign paused\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdCampaign\"\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad campaign ID.\"\n }\n ]\n }\n },\n \"/ad_campaigns/{id}/unpause\": {\n \"post\": {\n \"summary\": \"Unpause an Ad Campaign\",\n \"tags\": [\n \"Ad Campaigns\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Resumes a paused ad campaign.\",\n \"operationId\": \"unpause\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad campaign unpaused\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdCampaign\"\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad campaign ID.\"\n }\n ]\n }\n },\n \"/ad_groups\": {\n \"get\": {\n \"summary\": \"List Ad Groups\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists ad groups for the account, newest first.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Account whose ad groups to list. Defaults to the authenticated account.\"\n },\n {\n \"name\": \"ad_campaign_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to ad groups in this campaign.\"\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to a status (active, paused, in_review, rejected).\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"updated_at\"\n ]\n },\n \"description\": \"The field to sort by. Defaults to created_at.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ]\n },\n \"description\": \"The sort direction. Defaults to desc.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad groups listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AdGroup\"\n }\n },\n \"page_info\": {\n \"type\": \"object\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"post\": {\n \"summary\": \"Create an Ad Group\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:create\"\n ]\n }\n ],\n \"description\": \"Creates an ad group (ad set) in a campaign.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad group created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdGroup\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad campaign not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ad_campaign_id\": {\n \"type\": \"string\",\n \"description\": \"The ad campaign to create the ad group in.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The display name of the ad group.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\",\n \"paused\"\n ],\n \"description\": \"Initial status (default: active).\"\n },\n \"optimization_goal\": {\n \"type\": \"string\",\n \"description\": \"What the ad group optimizes for (e.g. conversions, link_clicks, reach).\"\n },\n \"conversion_location\": {\n \"type\": \"string\",\n \"enum\": [\n \"website\",\n \"profile\",\n \"messaging\",\n \"on_ad\",\n \"instant_forms\",\n \"instant_forms_and_messenger\",\n \"website_and_instant_forms\"\n ],\n \"description\": \"Where results happen: website (conversions), profile (IG/FB engagement), messaging (DM), on_ad (engagement on the ad, surface follows the optimization goal), or the lead destinations (instant_forms, instant_forms_and_messenger, website_and_instant_forms). The lead form itself is set on the ad.\"\n },\n \"message_apps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"messenger\",\n \"instagram\",\n \"whatsapp\"\n ]\n },\n \"description\": \"Required when conversion_location is messaging: which apps to message on. Combinations map to the matching Meta destination.\"\n },\n \"conversion_event\": {\n \"$ref\": \"#/components/schemas/ConversionEvent\"\n },\n \"budget_amount\": {\n \"type\": \"number\",\n \"description\": \"Ad-set budget in dollars (ABO only; omit under CBO).\"\n },\n \"budget_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"daily\",\n \"lifetime\"\n ],\n \"description\": \"Whether the budget is daily or lifetime.\"\n },\n \"minimum_daily_spend\": {\n \"type\": \"number\",\n \"description\": \"Daily spend floor within the budget.\"\n },\n \"bid_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"minimum_cost\",\n \"average_target\",\n \"maximum_target\"\n ],\n \"description\": \"Bid strategy.\"\n },\n \"desired_cost_per_result\": {\n \"type\": \"number\",\n \"description\": \"Target/cap cost for average_target / maximum_target.\"\n },\n \"starts_at\": {\n \"type\": \"string\",\n \"description\": \"Schedule start, ISO 8601.\"\n },\n \"ends_at\": {\n \"type\": \"string\",\n \"description\": \"Schedule end, ISO 8601.\"\n },\n \"regions\": {\n \"type\": \"object\",\n \"description\": \"Geo targeting: { include / exclude: { countries (ISO 3166-1), regions (states/provinces as ISO 3166-2, e.g. US-CA), cities (keyed), zips } }.\"\n },\n \"demographics\": {\n \"type\": \"object\",\n \"description\": \"Demographic targeting: { automatic, minimum_age, maximum_age, gender }.\"\n },\n \"audiences\": {\n \"type\": \"object\",\n \"description\": \"Saved-audience targeting: { include, exclude } arrays of audience IDs. Incompatible with demographics.automatic (Advantage+).\"\n },\n \"languages\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"Languages to target as ISO 639 codes (e.g. en, es). Empty/omitted = all languages.\"\n },\n \"dynamic_creative\": {\n \"type\": \"boolean\",\n \"description\": \"Run Meta dynamic (Advantage+) creative for this ad set. Set at creation; immutable afterward.\"\n },\n \"devices\": {\n \"type\": \"object\",\n \"description\": \"Device targeting: { platforms, operating_systems: [{ os, minimum_version }] }.\"\n },\n \"frequency_cap\": {\n \"type\": \"object\",\n \"description\": \"{ maximum_impressions, per_days } — only valid for reach optimization.\"\n },\n \"placements\": {\n \"description\": \"'automatic' (Advantage+) or a list of { platform, positions }.\"\n }\n },\n \"required\": [\n \"ad_campaign_id\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/ad_groups/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve an Ad Group\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:basic:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single ad group.\",\n \"operationId\": \"get\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad group retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdGroup\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad group not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad group ID.\"\n }\n ]\n },\n \"patch\": {\n \"summary\": \"Update an Ad Group\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Updates an ad group's editable fields. Only the keys you send are changed.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad group ID.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad group updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdGroup\"\n }\n }\n }\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The display name of the ad group.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\",\n \"paused\"\n ],\n \"description\": \"Initial status (default: active).\"\n },\n \"optimization_goal\": {\n \"type\": \"string\",\n \"description\": \"What the ad group optimizes for (e.g. conversions, link_clicks, reach).\"\n },\n \"conversion_location\": {\n \"type\": \"string\",\n \"enum\": [\n \"website\",\n \"profile\",\n \"messaging\",\n \"on_ad\",\n \"instant_forms\",\n \"instant_forms_and_messenger\",\n \"website_and_instant_forms\"\n ],\n \"description\": \"Where results happen: website (conversions), profile (IG/FB engagement), messaging (DM), on_ad (engagement on the ad, surface follows the optimization goal), or the lead destinations (instant_forms, instant_forms_and_messenger, website_and_instant_forms). The lead form itself is set on the ad.\"\n },\n \"message_apps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"messenger\",\n \"instagram\",\n \"whatsapp\"\n ]\n },\n \"description\": \"Required when conversion_location is messaging: which apps to message on. Combinations map to the matching Meta destination.\"\n },\n \"conversion_event\": {\n \"$ref\": \"#/components/schemas/ConversionEvent\"\n },\n \"budget_amount\": {\n \"type\": \"number\",\n \"description\": \"Ad-set budget in dollars (ABO only; omit under CBO).\"\n },\n \"budget_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"daily\",\n \"lifetime\"\n ],\n \"description\": \"Whether the budget is daily or lifetime.\"\n },\n \"minimum_daily_spend\": {\n \"type\": \"number\",\n \"description\": \"Daily spend floor within the budget.\"\n },\n \"bid_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"minimum_cost\",\n \"average_target\",\n \"maximum_target\"\n ],\n \"description\": \"Bid strategy.\"\n },\n \"desired_cost_per_result\": {\n \"type\": \"number\",\n \"description\": \"Target/cap cost for average_target / maximum_target.\"\n },\n \"starts_at\": {\n \"type\": \"string\",\n \"description\": \"Schedule start, ISO 8601.\"\n },\n \"ends_at\": {\n \"type\": \"string\",\n \"description\": \"Schedule end, ISO 8601.\"\n },\n \"regions\": {\n \"type\": \"object\",\n \"description\": \"Geo targeting: { include / exclude: { countries (ISO 3166-1), regions (states/provinces as ISO 3166-2, e.g. US-CA), cities (keyed), zips } }.\"\n },\n \"demographics\": {\n \"type\": \"object\",\n \"description\": \"Demographic targeting: { automatic, minimum_age, maximum_age, gender }.\"\n },\n \"audiences\": {\n \"type\": \"object\",\n \"description\": \"Saved-audience targeting: { include, exclude } arrays of audience IDs. Incompatible with demographics.automatic (Advantage+).\"\n },\n \"languages\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"Languages to target as ISO 639 codes (e.g. en, es). Empty/omitted = all languages.\"\n },\n \"devices\": {\n \"type\": \"object\",\n \"description\": \"Device targeting: { platforms, operating_systems: [{ os, minimum_version }] }.\"\n },\n \"frequency_cap\": {\n \"type\": \"object\",\n \"description\": \"{ maximum_impressions, per_days } — only valid for reach optimization.\"\n },\n \"placements\": {\n \"description\": \"'automatic' (Advantage+) or a list of { platform, positions }.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n },\n \"delete\": {\n \"summary\": \"Delete an Ad Group\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Deletes an ad group. Returns true on success.\",\n \"operationId\": \"delete\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad group deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad group not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad group ID.\"\n }\n ]\n }\n },\n \"/ad_groups/{id}/pause\": {\n \"post\": {\n \"summary\": \"Pause an Ad Group\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Pauses delivery of an ad group.\",\n \"operationId\": \"pause\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad group paused\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdGroup\"\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad group ID.\"\n }\n ]\n }\n },\n \"/ad_groups/{id}/unpause\": {\n \"post\": {\n \"summary\": \"Unpause an Ad Group\",\n \"tags\": [\n \"Ad Groups\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Resumes delivery of a paused ad group.\",\n \"operationId\": \"unpause\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad group unpaused\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/AdGroup\"\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad group ID.\"\n }\n ]\n }\n },\n \"/ads\": {\n \"get\": {\n \"summary\": \"List Ads\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists the ads for an account, with stats over the requested window.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The account the ads belong to. Defaults to the account-scoped key's own account.\"\n },\n {\n \"name\": \"ad_campaign_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only return ads in this ad campaign.\"\n },\n {\n \"name\": \"ad_group_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only return ads in this ad group.\"\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\",\n \"paused\",\n \"in_review\",\n \"rejected\"\n ]\n },\n \"description\": \"Only return ads with this status.\"\n },\n {\n \"name\": \"query\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter ads by a title or ID substring.\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"updated_at\"\n ]\n },\n \"description\": \"The field to sort by. Defaults to created_at.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ]\n },\n \"description\": \"The sort direction. Defaults to desc.\"\n },\n {\n \"name\": \"created_before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only return ads created before this timestamp.\"\n },\n {\n \"name\": \"created_after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only return ads created after this timestamp.\"\n },\n {\n \"name\": \"stats_from\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Start of the stats window. Defaults to all-time.\"\n },\n {\n \"name\": \"stats_to\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"End of the stats window. Defaults to now.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n },\n \"description\": \"The number of ads to return.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n },\n \"description\": \"The number of ads to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page before (from page_info.start_cursor).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ads listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Ad\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"account_id missing and unresolvable\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create an Ad\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:create\"\n ]\n }\n ],\n \"description\": \"Creates an ad in an ad group.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Ad\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"Whop pixel not installed on the destination\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"404\": {\n \"description\": \"ad group not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ad_group_id\": {\n \"type\": \"string\",\n \"description\": \"The existing ad group to create the ad in. Provide this OR ad_group, not both.\"\n },\n \"ad_group\": {\n \"type\": \"object\",\n \"description\": \"An inline ad group to create (same shape as POST /ad_groups, including ad_campaign_id). Creates the ad group and the ad together. Provide this OR ad_group_id.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The display name of the ad.\"\n },\n \"primary_texts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The primary text variants shown in the ad body.\"\n },\n \"headlines\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The headline variants shown on the ad.\"\n },\n \"descriptions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The description variants shown on the ad.\"\n },\n \"call_to_action\": {\n \"type\": \"string\",\n \"enum\": [\n \"apply_now\",\n \"book_now\",\n \"call_now\",\n \"contact_us\",\n \"download\",\n \"get_directions\",\n \"get_offer\",\n \"get_quote\",\n \"learn_more\",\n \"listen_now\",\n \"message_page\",\n \"no_button\",\n \"open_link\",\n \"order_now\",\n \"request_time\",\n \"see_details\",\n \"see_menu\",\n \"send_updates\",\n \"shop_now\",\n \"sign_up\",\n \"subscribe\",\n \"watch_more\"\n ],\n \"description\": \"The call-to-action button shown on the ad.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The URL the ad links to.\"\n },\n \"url_parameters\": {\n \"type\": \"object\",\n \"description\": \"Query parameters appended to the destination URL, as a string-to-string map.\"\n },\n \"creatives\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"enum\": [\n \"square\",\n \"vertical\",\n \"horizontal\"\n ]\n }\n }\n },\n \"description\": \"The ad's creatives. Each entry is an uploaded file id with an optional format; omit format for the original/uncropped asset.\"\n },\n \"social_accounts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"The social accounts (Facebook page, Instagram profile) the ad runs under.\"\n },\n \"post_id\": {\n \"type\": \"string\",\n \"description\": \"Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives.\"\n },\n \"messaging_config\": {\n \"type\": \"object\",\n \"properties\": {\n \"message\": {\n \"type\": \"string\"\n },\n \"keyword\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).\"\n },\n \"multi_advertiser_ads\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.\"\n },\n \"lead_form\": {\n \"type\": \"object\",\n \"description\": \"Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms).\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Internal name for the form. Auto-generated if omitted.\"\n },\n \"form_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"more_volume\",\n \"higher_intent\"\n ],\n \"description\": \"more_volume (default) is quickest to submit; higher_intent adds a confirmation step.\"\n },\n \"intro\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Optional intro screen shown before the questions.\"\n },\n \"questions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"email\",\n \"phone\",\n \"full_name\",\n \"first_name\",\n \"last_name\",\n \"city\",\n \"state\",\n \"zip\",\n \"country\",\n \"street_address\",\n \"job_title\",\n \"company_name\",\n \"work_email\",\n \"work_phone_number\",\n \"dob\",\n \"gender\",\n \"marital_status\",\n \"relationship_status\",\n \"military_status\",\n \"date_time\",\n \"custom\"\n ]\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"enum\": [\n \"short_answer\",\n \"multiple_choice\",\n \"appointment\"\n ]\n },\n \"options\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"value\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"logic\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\n \"go_to_question\",\n \"submit_form\",\n \"close_form\"\n ]\n },\n \"target_question_index\": {\n \"type\": \"integer\"\n },\n \"target_end_page_index\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"description\": \"The questions on the form. Standard prefill types need only a type; a custom question needs a label and a format (plus options for multiple_choice). Options carry an optional key and answer-routing logic.\"\n },\n \"privacy_policy\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\"\n },\n \"link_text\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Your privacy policy. url is required by Meta.\"\n },\n \"completion\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"button_text\": {\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Optional completion screen shown after submission; url sets the follow-up website button.\"\n },\n \"disclaimer\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"body\": {\n \"type\": \"string\"\n },\n \"checkboxes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"required\": {\n \"type\": \"boolean\"\n },\n \"checked_by_default\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n },\n \"description\": \"Optional custom consent disclaimer with checkboxes.\"\n },\n \"phone_verification\": {\n \"type\": \"boolean\",\n \"description\": \"Require SMS verification of the phone number (higher_intent forms).\"\n }\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/ads/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve an Ad\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:basic:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single ad with stats over the requested window.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad ID.\"\n },\n {\n \"name\": \"stats_from\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Start of the stats window.\"\n },\n {\n \"name\": \"stats_to\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"End of the stats window.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Ad\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n },\n \"patch\": {\n \"summary\": \"Update an Ad\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Updates an ad's editable fields.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad ID.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"ad updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Ad\"\n }\n }\n }\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The display name of the ad.\"\n },\n \"primary_texts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The primary text variants shown in the ad body.\"\n },\n \"headlines\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The headline variants shown on the ad.\"\n },\n \"descriptions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The description variants shown on the ad.\"\n },\n \"call_to_action\": {\n \"type\": \"string\",\n \"enum\": [\n \"apply_now\",\n \"book_now\",\n \"call_now\",\n \"contact_us\",\n \"download\",\n \"get_directions\",\n \"get_offer\",\n \"get_quote\",\n \"learn_more\",\n \"listen_now\",\n \"message_page\",\n \"no_button\",\n \"open_link\",\n \"order_now\",\n \"request_time\",\n \"see_details\",\n \"see_menu\",\n \"send_updates\",\n \"shop_now\",\n \"sign_up\",\n \"subscribe\",\n \"watch_more\"\n ],\n \"description\": \"The call-to-action button shown on the ad.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The URL the ad links to.\"\n },\n \"url_parameters\": {\n \"type\": \"object\",\n \"description\": \"Query parameters appended to the destination URL, as a string-to-string map.\"\n },\n \"creatives\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"enum\": [\n \"square\",\n \"vertical\",\n \"horizontal\"\n ]\n }\n }\n },\n \"description\": \"The ad's creatives. Each entry is an uploaded file id with an optional format; omit format for the original/uncropped asset. Replaces a live ad's creative on the platform.\"\n },\n \"social_accounts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"The social accounts the ad runs under.\"\n },\n \"post_id\": {\n \"type\": \"string\",\n \"description\": \"Promote an existing post instead of uploading creatives — a Facebook post or Instagram media id. Mutually exclusive with creatives.\"\n },\n \"messaging_config\": {\n \"type\": \"object\",\n \"properties\": {\n \"message\": {\n \"type\": \"string\"\n },\n \"keyword\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Click-to-message welcome copy: the greeting (message) and the ice-breaker prompt (keyword).\"\n },\n \"multi_advertiser_ads\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.\"\n },\n \"lead_form\": {\n \"type\": \"object\",\n \"description\": \"Instant lead form for the ad. Only allowed when the ad group's conversion_location is an instant-form destination (instant_forms, instant_forms_and_messenger, website_and_instant_forms).\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Internal name for the form. Auto-generated if omitted.\"\n },\n \"form_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"more_volume\",\n \"higher_intent\"\n ],\n \"description\": \"more_volume (default) is quickest to submit; higher_intent adds a confirmation step.\"\n },\n \"intro\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Optional intro screen shown before the questions.\"\n },\n \"questions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"email\",\n \"phone\",\n \"full_name\",\n \"first_name\",\n \"last_name\",\n \"city\",\n \"state\",\n \"zip\",\n \"country\",\n \"street_address\",\n \"job_title\",\n \"company_name\",\n \"work_email\",\n \"work_phone_number\",\n \"dob\",\n \"gender\",\n \"marital_status\",\n \"relationship_status\",\n \"military_status\",\n \"date_time\",\n \"custom\"\n ]\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"enum\": [\n \"short_answer\",\n \"multiple_choice\",\n \"appointment\"\n ]\n },\n \"options\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"value\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"logic\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\n \"go_to_question\",\n \"submit_form\",\n \"close_form\"\n ]\n },\n \"target_question_index\": {\n \"type\": \"integer\"\n },\n \"target_end_page_index\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"description\": \"The questions on the form. Standard prefill types need only a type; a custom question needs a label and a format (plus options for multiple_choice). Options carry an optional key and answer-routing logic.\"\n },\n \"privacy_policy\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\"\n },\n \"link_text\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Your privacy policy. url is required by Meta.\"\n },\n \"completion\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"button_text\": {\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"Optional completion screen shown after submission; url sets the follow-up website button.\"\n },\n \"disclaimer\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"body\": {\n \"type\": \"string\"\n },\n \"checkboxes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"text\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"required\": {\n \"type\": \"boolean\"\n },\n \"checked_by_default\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n },\n \"description\": \"Optional custom consent disclaimer with checkboxes.\"\n },\n \"phone_verification\": {\n \"type\": \"boolean\",\n \"description\": \"Require SMS verification of the phone number (higher_intent forms).\"\n }\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n },\n \"delete\": {\n \"summary\": \"Delete an Ad\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Deletes an ad. Returns true on success.\",\n \"operationId\": \"delete\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"ad not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad ID.\"\n }\n ]\n }\n },\n \"/ads/{id}/pause\": {\n \"post\": {\n \"summary\": \"Pause an Ad\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Pauses an active ad.\",\n \"operationId\": \"pause\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad paused\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Ad\"\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad ID.\"\n }\n ]\n }\n },\n \"/ads/{id}/unpause\": {\n \"post\": {\n \"summary\": \"Unpause an Ad\",\n \"tags\": [\n \"Ads\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"ad_campaign:update\"\n ]\n }\n ],\n \"description\": \"Resumes a paused ad.\",\n \"operationId\": \"unpause\",\n \"responses\": {\n \"200\": {\n \"description\": \"ad unpaused\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Ad\"\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ad ID.\"\n }\n ]\n }\n },\n \"/audiences\": {\n \"get\": {\n \"summary\": \"List Audiences\",\n \"tags\": [\n \"Audiences\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"audience:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists uploaded customer-list audiences for an account. Pass `audience_id` to return a specific audience.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": true,\n \"description\": \"Account ID, prefixed `biz_`.\"\n },\n {\n \"name\": \"audience_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"Audience ID, prefixed `adaud_`, used to filter the response to one audience.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"Number of audiences to return. Defaults to 20; maximum 100.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"Cursor for the next page of audiences.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Audiences listed.\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/Audience\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"end_cursor\",\n \"start_cursor\",\n \"has_next_page\",\n \"has_previous_page\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Missing or invalid authentication.\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create Audience\",\n \"tags\": [\n \"Audiences\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"audience:update\"\n ]\n }\n ],\n \"description\": \"Creates an audience from an uploaded customer identity CSV file and starts processing it.\",\n \"operationId\": \"create\",\n \"parameters\": [],\n \"responses\": {\n \"201\": {\n \"description\": \"Audience created.\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Audience\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"Missing or invalid authentication.\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Account ID, prefixed `biz_`.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Audience display name.\"\n },\n \"column_mapping\": {\n \"type\": \"object\",\n \"description\": \"Maps supported identity fields to CSV column headers. Map at least one of `email` or `phone`.\",\n \"properties\": {\n \"email\": {\n \"type\": \"string\",\n \"description\": \"CSV header for email addresses.\"\n },\n \"phone\": {\n \"type\": \"string\",\n \"description\": \"CSV header for phone numbers.\"\n },\n \"first_name\": {\n \"type\": \"string\",\n \"description\": \"CSV header for first names.\"\n },\n \"last_name\": {\n \"type\": \"string\",\n \"description\": \"CSV header for last names.\"\n },\n \"country\": {\n \"type\": \"string\",\n \"description\": \"CSV header for ISO 3166-1 alpha-2 country codes, such as `US`.\"\n }\n }\n },\n \"file_id\": {\n \"type\": \"string\",\n \"description\": \"Direct upload ID from the standard media upload endpoint.\"\n }\n },\n \"required\": [\n \"account_id\",\n \"name\",\n \"column_mapping\",\n \"file_id\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/audiences/{audience_id}\": {\n \"delete\": {\n \"summary\": \"Delete Audience\",\n \"tags\": [\n \"Audiences\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"audience:update\"\n ]\n }\n ],\n \"description\": \"Deletes an audience so it is no longer available for targeting.\",\n \"operationId\": \"delete\",\n \"parameters\": [\n {\n \"name\": \"audience_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Audience ID, prefixed `adaud_`.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"Audience deleted.\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"success\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"success\"\n ]\n }\n }\n }\n }\n }\n }\n },\n \"/referrals/businesses\": {\n \"get\": {\n \"summary\": \"List business referrals\",\n \"tags\": [\n \"Referrals\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"referral:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists the businesses the authenticated user referred onto Whop, most recent first.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\",\n \"removed\"\n ]\n },\n \"description\": \"Filter by referral status.\"\n },\n {\n \"name\": \"has_earnings\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"boolean\"\n },\n \"description\": \"When true, only businesses with at least one non-canceled, non-reversed earning paid to the caller.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n },\n \"description\": \"Number of business referrals to return from the start of the window.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n },\n \"description\": \"Number of business referrals to return from the end of the window.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page before (from page_info.start_cursor).\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"referral_started_at\",\n \"referral_expires_at\",\n \"payout_percentage\"\n ],\n \"default\": \"created_at\"\n },\n \"description\": \"The field to sort business referrals by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"desc\"\n },\n \"description\": \"Sort direction.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"business referrals sorted oldest first\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"business_referral\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Business referral ID.\"\n },\n \"account\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Referred account.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Referred account ID.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Referred account display name.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Referred account logo URL.\"\n },\n \"route\": {\n \"type\": \"string\",\n \"description\": \"Referred account route.\"\n }\n },\n \"required\": [\n \"id\",\n \"title\",\n \"logo_url\",\n \"route\"\n ]\n },\n \"user\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Owner of the referred account.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID, prefixed `user_`.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"The user's unique username.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The user's display name.\"\n },\n \"profile_picture\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The user's profile picture URL.\"\n }\n },\n \"required\": [\n \"url\"\n ],\n \"description\": \"The user's profile picture.\"\n }\n },\n \"required\": [\n \"id\",\n \"username\",\n \"name\",\n \"profile_picture\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\",\n \"removed\"\n ],\n \"description\": \"Current referral status.\",\n \"example\": \"active\"\n },\n \"payout_percentage\": {\n \"type\": \"number\",\n \"format\": \"float\",\n \"description\": \"Referrer's share of Whop gross profit, as a fraction (0.3 = 30%).\"\n },\n \"referral_started_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the referral became active.\"\n },\n \"referral_expires_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the referral expires.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the business referral was created.\"\n },\n \"volume_usd\": {\n \"type\": \"object\",\n \"properties\": {\n \"attributed\": {\n \"type\": \"string\",\n \"description\": \"Credited GMV (awaiting_settlement + settled); excludes canceled and reversed, in USD.\"\n },\n \"awaiting_settlement\": {\n \"type\": \"string\",\n \"description\": \"GMV awaiting settlement (commission not yet computed), in USD.\"\n },\n \"settled\": {\n \"type\": \"string\",\n \"description\": \"GMV of pending + completed payments, in USD.\"\n }\n },\n \"required\": [\n \"attributed\",\n \"awaiting_settlement\",\n \"settled\"\n ]\n },\n \"earnings_usd\": {\n \"type\": \"object\",\n \"properties\": {\n \"total\": {\n \"type\": \"string\",\n \"description\": \"Pending + completed commission, in USD.\"\n },\n \"pending\": {\n \"type\": \"string\",\n \"description\": \"Commission scheduled but not yet paid, in USD.\"\n },\n \"completed\": {\n \"type\": \"string\",\n \"description\": \"Commission already paid out, in USD.\"\n }\n },\n \"required\": [\n \"total\",\n \"pending\",\n \"completed\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account\",\n \"user\",\n \"status\",\n \"payout_percentage\",\n \"referral_started_at\",\n \"referral_expires_at\",\n \"created_at\",\n \"volume_usd\",\n \"earnings_usd\"\n ]\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"invalid sort field\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the referral-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n }\n }\n },\n \"/referrals/businesses/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve a business referral\",\n \"tags\": [\n \"Referrals\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"referral:basic:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single referred business and its referral terms.\",\n \"operationId\": \"get\",\n \"responses\": {\n \"200\": {\n \"description\": \"business referral retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"business_referral\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Business referral ID.\"\n },\n \"account\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Referred account.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Referred account ID.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Referred account display name.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Referred account logo URL.\"\n },\n \"route\": {\n \"type\": \"string\",\n \"description\": \"Referred account route.\"\n },\n \"capabilities\": {\n \"$ref\": \"#/components/schemas/AccountCapabilities\",\n \"nullable\": true\n },\n \"required_actions\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountRequiredAction\"\n },\n \"description\": \"Actions the referred account owner must take to unblock capabilities.\"\n },\n \"recommended_actions\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountRecommendedAction\"\n },\n \"description\": \"Optional actions that unlock capabilities or grow the referred account.\"\n }\n },\n \"required\": [\n \"id\",\n \"title\",\n \"logo_url\",\n \"route\",\n \"capabilities\",\n \"required_actions\",\n \"recommended_actions\"\n ]\n },\n \"user\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Owner of the referred account.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID, prefixed `user_`.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"The user's unique username.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The user's display name.\"\n },\n \"profile_picture\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The user's profile picture URL.\"\n }\n },\n \"required\": [\n \"url\"\n ],\n \"description\": \"The user's profile picture.\"\n }\n },\n \"required\": [\n \"id\",\n \"username\",\n \"name\",\n \"profile_picture\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"active\",\n \"removed\"\n ],\n \"description\": \"Current referral status.\"\n },\n \"payout_percentage\": {\n \"type\": \"number\",\n \"format\": \"float\",\n \"description\": \"Referrer's share of Whop gross profit, as a fraction (0.3 = 30%).\"\n },\n \"referral_started_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the referral became active.\"\n },\n \"referral_expires_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the referral expires.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the business referral was created.\"\n },\n \"volume_usd\": {\n \"type\": \"object\",\n \"properties\": {\n \"attributed\": {\n \"type\": \"string\",\n \"description\": \"Credited GMV (awaiting_settlement + settled); excludes canceled and reversed, in USD.\"\n },\n \"awaiting_settlement\": {\n \"type\": \"string\",\n \"description\": \"GMV awaiting settlement (commission not yet computed), in USD.\"\n },\n \"settled\": {\n \"type\": \"string\",\n \"description\": \"GMV of pending + completed payments, in USD.\"\n }\n },\n \"required\": [\n \"attributed\",\n \"awaiting_settlement\",\n \"settled\"\n ]\n },\n \"earnings_usd\": {\n \"type\": \"object\",\n \"properties\": {\n \"total\": {\n \"type\": \"string\",\n \"description\": \"Pending + completed commission, in USD.\"\n },\n \"pending\": {\n \"type\": \"string\",\n \"description\": \"Commission scheduled but not yet paid, in USD.\"\n },\n \"completed\": {\n \"type\": \"string\",\n \"description\": \"Commission already paid out, in USD.\"\n }\n },\n \"required\": [\n \"total\",\n \"pending\",\n \"completed\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account\",\n \"user\",\n \"status\",\n \"payout_percentage\",\n \"referral_started_at\",\n \"referral_expires_at\",\n \"created_at\",\n \"volume_usd\",\n \"earnings_usd\"\n ]\n }\n }\n }\n },\n \"404\": {\n \"description\": \"no such business referral is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The business referral ID (a coma_ identifier).\"\n }\n ]\n }\n },\n \"/referrals/businesses/{id}/earnings\": {\n \"get\": {\n \"summary\": \"List a business referral's earnings\",\n \"tags\": [\n \"Referrals\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"referral:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists the earnings Whop pays out for one referred business's activity, most recent first.\",\n \"operationId\": \"earnings\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The business referral ID (a coma_ identifier).\"\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"awaiting_settlement\",\n \"pending\",\n \"completed\",\n \"canceled\",\n \"reversed\"\n ]\n },\n \"description\": \"Filter by earning status.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n }\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n }\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"commission_amount\",\n \"transaction_amount\",\n \"payout_at\"\n ],\n \"default\": \"created_at\"\n },\n \"description\": \"The field to sort earnings by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"desc\"\n },\n \"description\": \"Sort direction.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"earnings sorted by transaction amount\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"business_referral_earning\"\n ]\n },\n \"id\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"account\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Referred account.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Referred account ID.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Referred account display name.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Referred account logo URL.\"\n },\n \"route\": {\n \"type\": \"string\",\n \"description\": \"Referred account route.\"\n }\n },\n \"required\": [\n \"id\",\n \"title\",\n \"logo_url\",\n \"route\"\n ]\n },\n \"product\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"route\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"title\",\n \"route\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"awaiting_settlement\",\n \"pending\",\n \"completed\",\n \"canceled\",\n \"reversed\"\n ],\n \"example\": \"pending\",\n \"description\": \"Current status of the earning.\"\n },\n \"transaction_amount_usd\": {\n \"type\": \"string\",\n \"description\": \"The sale amount the commission is calculated from, in USD.\"\n },\n \"payout_percentage\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"format\": \"float\",\n \"description\": \"The referrer's share of Whop's gross profit, as a fraction (0.3 = 30%). Null until the earning settles.\"\n },\n \"commission_amount_usd\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"What the referrer earns, in USD. Null until the earning settles.\"\n },\n \"cancelation_reason\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Why the earning was canceled or reversed, if applicable.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"payout_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\"\n },\n \"resource\": {\n \"anyOf\": [\n {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"receipt\"\n ]\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"currency\": {\n \"type\": \"string\"\n },\n \"payment_method_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"processor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"brand\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"alternative_payment_method\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"image_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"name\",\n \"image_url\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"currency\",\n \"payment_method_type\",\n \"processor\",\n \"brand\",\n \"last4\",\n \"created_at\",\n \"alternative_payment_method\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"The resource that generated the affiliate earning.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account\",\n \"product\",\n \"status\",\n \"transaction_amount_usd\",\n \"payout_percentage\",\n \"commission_amount_usd\",\n \"cancelation_reason\",\n \"created_at\",\n \"payout_at\",\n \"resource\"\n ]\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"invalid sort direction\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n }\n }\n },\n \"/referrals/businesses/earnings\": {\n \"get\": {\n \"summary\": \"List all business referral earnings\",\n \"tags\": [\n \"Referrals\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"referral:basic:read\"\n ]\n }\n ],\n \"description\": \"Lists every business referral earning the authenticated user has, most recent first.\",\n \"operationId\": \"all-earnings\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"status\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"awaiting_settlement\",\n \"pending\",\n \"completed\",\n \"canceled\",\n \"reversed\"\n ]\n },\n \"description\": \"Filter by earning status.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n }\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n }\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"commission_amount\",\n \"transaction_amount\",\n \"payout_at\"\n ],\n \"default\": \"created_at\"\n },\n \"description\": \"The field to sort earnings by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"desc\"\n },\n \"description\": \"Sort direction.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"earnings filtered by status\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"business_referral_earning\"\n ]\n },\n \"id\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"account\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Referred account.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Referred account ID.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Referred account display name.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Referred account logo URL.\"\n },\n \"route\": {\n \"type\": \"string\",\n \"description\": \"Referred account route.\"\n }\n },\n \"required\": [\n \"id\",\n \"title\",\n \"logo_url\",\n \"route\"\n ]\n },\n \"product\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"route\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"title\",\n \"route\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"awaiting_settlement\",\n \"pending\",\n \"completed\",\n \"canceled\",\n \"reversed\"\n ],\n \"example\": \"pending\",\n \"description\": \"Current status of the earning.\"\n },\n \"transaction_amount_usd\": {\n \"type\": \"string\",\n \"description\": \"The sale amount the commission is calculated from, in USD.\"\n },\n \"payout_percentage\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"format\": \"float\",\n \"description\": \"The referrer's share of Whop's gross profit, as a fraction (0.3 = 30%). Null until the earning settles.\"\n },\n \"commission_amount_usd\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"What the referrer earns, in USD. Null until the earning settles.\"\n },\n \"cancelation_reason\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Why the earning was canceled or reversed, if applicable.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"payout_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\"\n },\n \"resource\": {\n \"anyOf\": [\n {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"receipt\"\n ]\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"currency\": {\n \"type\": \"string\"\n },\n \"payment_method_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"processor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"brand\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"alternative_payment_method\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"image_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"name\",\n \"image_url\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"currency\",\n \"payment_method_type\",\n \"processor\",\n \"brand\",\n \"last4\",\n \"created_at\",\n \"alternative_payment_method\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"The resource that generated the affiliate earning.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account\",\n \"product\",\n \"status\",\n \"transaction_amount_usd\",\n \"payout_percentage\",\n \"commission_amount_usd\",\n \"cancelation_reason\",\n \"created_at\",\n \"payout_at\",\n \"resource\"\n ]\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"invalid status filter\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n }\n }\n },\n \"/cards\": {\n \"get\": {\n \"summary\": \"List Cards\",\n \"tags\": [\n \"Cards\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:account:read\"\n ]\n }\n ],\n \"description\": \"Lists issued Whop virtual cards for an account or user, including pending invitation cards that have not been issued by the card provider yet. Pass exactly one of account_id (a biz_ identifier) or user_id (a user_ identifier). Non-owner team members only see cards assigned to them. Users without the payout:account:read scope can still list cards assigned to them (for example moderators or external cardholders). Use GET /cards/:card_id to retrieve a single card with its secrets.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning account ID (a biz_ identifier). Provide this or user_id.\"\n },\n {\n \"name\": \"user_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning user ID (a user_ identifier). Provide this or account_id.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"cards listed for an assigned cardholder without the ledger scope\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Card ID, prefixed `icrd_`.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card display name.\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"enum\": [\n null,\n \"virtual\",\n \"physical\"\n ],\n \"description\": \"The card type.\"\n },\n \"status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"enum\": [\n null,\n \"active\",\n \"frozen\",\n \"canceled\",\n \"invited\"\n ],\n \"description\": \"The card status.\"\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Last four digits of the card number. `null` for pending invitation cards.\"\n },\n \"expiration_month\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card expiration month.\"\n },\n \"expiration_year\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card expiration year.\"\n },\n \"user_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cardholder user ID, prefixed `user_`, when assigned.\"\n },\n \"spent_last_month\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Total spend in the last 30 days, in cents.\"\n },\n \"limit\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The spending limit configuration.\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The limit amount in dollars.\"\n },\n \"frequency\": {\n \"type\": \"string\",\n \"description\": \"Limit window, for example `per24HourPeriod` or `perAuthorization`.\"\n }\n },\n \"required\": [\n \"amount\",\n \"frequency\"\n ]\n },\n \"billing\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The billing address.\",\n \"properties\": {\n \"line1\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Street address line 1.\"\n },\n \"line2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Street address line 2.\"\n },\n \"city\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing city.\"\n },\n \"region\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing region or state.\"\n },\n \"postal_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing postal code.\"\n },\n \"country_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing country code.\"\n }\n },\n \"required\": [\n \"line1\",\n \"line2\",\n \"city\",\n \"region\",\n \"postal_code\",\n \"country_code\"\n ]\n },\n \"created_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the card was created.\"\n },\n \"canceled_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the card was canceled.\"\n },\n \"secrets\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Sensitive card details. Present only on `GET /cards/:card_id` for active cards; `null` when the card is inactive or details cannot be retrieved.\",\n \"properties\": {\n \"card_number\": {\n \"type\": \"string\",\n \"description\": \"Full card number.\"\n },\n \"cvc\": {\n \"type\": \"string\",\n \"description\": \"Card verification code.\"\n },\n \"name_on_card\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cardholder name printed on the card.\"\n }\n },\n \"required\": [\n \"card_number\",\n \"cvc\",\n \"name_on_card\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"name\",\n \"type\",\n \"status\",\n \"last4\",\n \"expiration_month\",\n \"expiration_year\",\n \"user_id\",\n \"spent_last_month\",\n \"limit\",\n \"billing\",\n \"created_at\",\n \"canceled_at\"\n ]\n }\n }\n },\n \"required\": [\n \"data\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"neither account_id nor user_id provided\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the payout-account-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no ledger for that owner is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create Card\",\n \"tags\": [\n \"Cards\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:account:update\"\n ]\n }\n ],\n \"description\": \"Issues a virtual card. For an individual (consumer) card issuing account, the card is issued to the account's own cardholder. For a company (business) card issuing account, pass assigned_user_id to issue the card to a company member; if that member is not yet an approved card-issuing user, the card is provisioned asynchronously or an onboarding invitation is sent (HTTP 202). Pass exactly one of account_id (a biz_ identifier) or user_id (a user_ identifier). Returns the newly created card resource.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"201\": {\n \"description\": \"company card created for an assigned member\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Card ID, prefixed `icrd_`.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card display name.\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"enum\": [\n null,\n \"virtual\",\n \"physical\"\n ],\n \"description\": \"The card type.\"\n },\n \"status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"enum\": [\n null,\n \"active\",\n \"frozen\",\n \"canceled\",\n \"invited\"\n ],\n \"description\": \"The card status.\"\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Last four digits of the card number. `null` for pending invitation cards.\"\n },\n \"expiration_month\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card expiration month.\"\n },\n \"expiration_year\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card expiration year.\"\n },\n \"user_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cardholder user ID, prefixed `user_`, when assigned.\"\n },\n \"spent_last_month\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Total spend in the last 30 days, in cents.\"\n },\n \"limit\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The spending limit configuration.\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The limit amount in dollars.\"\n },\n \"frequency\": {\n \"type\": \"string\",\n \"description\": \"Limit window, for example `per24HourPeriod` or `perAuthorization`.\"\n }\n },\n \"required\": [\n \"amount\",\n \"frequency\"\n ]\n },\n \"billing\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The billing address.\",\n \"properties\": {\n \"line1\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Street address line 1.\"\n },\n \"line2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Street address line 2.\"\n },\n \"city\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing city.\"\n },\n \"region\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing region or state.\"\n },\n \"postal_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing postal code.\"\n },\n \"country_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing country code.\"\n }\n },\n \"required\": [\n \"line1\",\n \"line2\",\n \"city\",\n \"region\",\n \"postal_code\",\n \"country_code\"\n ]\n },\n \"created_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the card was created.\"\n },\n \"canceled_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the card was canceled.\"\n },\n \"secrets\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Sensitive card details. Present only on `GET /cards/:card_id` for active cards; `null` when the card is inactive or details cannot be retrieved.\",\n \"properties\": {\n \"card_number\": {\n \"type\": \"string\",\n \"description\": \"Full card number.\"\n },\n \"cvc\": {\n \"type\": \"string\",\n \"description\": \"Card verification code.\"\n },\n \"name_on_card\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cardholder name printed on the card.\"\n }\n },\n \"required\": [\n \"card_number\",\n \"cvc\",\n \"name_on_card\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"name\",\n \"type\",\n \"status\",\n \"last4\",\n \"expiration_month\",\n \"expiration_year\",\n \"user_id\",\n \"spent_last_month\",\n \"limit\",\n \"billing\",\n \"created_at\",\n \"canceled_at\"\n ]\n }\n }\n }\n },\n \"202\": {\n \"description\": \"card not issued synchronously: provisioning started or onboarding invitation sent\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"card_provisioning\"\n ]\n },\n \"provisioning_job_id\": {\n \"type\": \"string\",\n \"description\": \"Background job ID to poll until the card is ready.\"\n }\n },\n \"required\": [\n \"object\",\n \"provisioning_job_id\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"card_invitation\"\n ]\n },\n \"invitation_sent\": {\n \"type\": \"boolean\",\n \"description\": \"Always true; the member must finish onboarding before the card is issued.\"\n }\n },\n \"required\": [\n \"object\",\n \"invitation_sent\"\n ]\n }\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"business card issuing account without an assigned_user_id\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the payout-account-update scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no ledger for that owner is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The owning account ID (a biz_ identifier). Provide this or user_id.\"\n },\n \"user_id\": {\n \"type\": \"string\",\n \"description\": \"The owning user ID (a user_ identifier). Provide this or account_id.\"\n },\n \"assigned_user_id\": {\n \"type\": \"string\",\n \"description\": \"The company member (a user_ identifier) to assign the card to. Required for company (business) card issuing accounts.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"A display name for the card.\"\n },\n \"spend_limit\": {\n \"type\": \"number\",\n \"description\": \"Spending limit amount, in dollars.\"\n },\n \"spend_limit_frequency\": {\n \"type\": \"string\",\n \"enum\": [\n \"daily\",\n \"weekly\",\n \"monthly\",\n \"one_time\"\n ],\n \"description\": \"The spending limit window.\"\n },\n \"transaction_limit\": {\n \"type\": \"number\",\n \"description\": \"Per-transaction limit amount, in dollars.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/cards/{card_id}\": {\n \"get\": {\n \"summary\": \"Retrieve Card\",\n \"tags\": [\n \"Cards\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:account:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single card by its icrd_ identifier, including its secrets (full card number, CVC, and cardholder name) for active cards.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"card_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Card ID to retrieve, prefixed `icrd_`.\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning account ID (a biz_ identifier). Provide this or user_id.\"\n },\n {\n \"name\": \"user_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning user ID (a user_ identifier). Provide this or account_id.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"card retrieved with secrets\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"card\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Card ID, prefixed `icrd_`.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card display name.\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"enum\": [\n null,\n \"virtual\",\n \"physical\"\n ],\n \"description\": \"The card type.\"\n },\n \"status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"enum\": [\n null,\n \"active\",\n \"frozen\",\n \"canceled\",\n \"invited\"\n ],\n \"description\": \"The card status.\"\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Last four digits of the card number. `null` for pending invitation cards.\"\n },\n \"expiration_month\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card expiration month.\"\n },\n \"expiration_year\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card expiration year.\"\n },\n \"user_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cardholder user ID, prefixed `user_`, when assigned.\"\n },\n \"spent_last_month\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Total spend in the last 30 days, in cents.\"\n },\n \"limit\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The spending limit configuration.\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The limit amount in dollars.\"\n },\n \"frequency\": {\n \"type\": \"string\",\n \"description\": \"Limit window, for example `per24HourPeriod` or `perAuthorization`.\"\n }\n },\n \"required\": [\n \"amount\",\n \"frequency\"\n ]\n },\n \"billing\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The billing address.\",\n \"properties\": {\n \"line1\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Street address line 1.\"\n },\n \"line2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Street address line 2.\"\n },\n \"city\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing city.\"\n },\n \"region\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing region or state.\"\n },\n \"postal_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing postal code.\"\n },\n \"country_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Billing country code.\"\n }\n },\n \"required\": [\n \"line1\",\n \"line2\",\n \"city\",\n \"region\",\n \"postal_code\",\n \"country_code\"\n ]\n },\n \"created_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the card was created.\"\n },\n \"canceled_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the card was canceled.\"\n },\n \"secrets\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Sensitive card details. Present only on `GET /cards/:card_id` for active cards; `null` when the card is inactive or details cannot be retrieved.\",\n \"properties\": {\n \"card_number\": {\n \"type\": \"string\",\n \"description\": \"Full card number.\"\n },\n \"cvc\": {\n \"type\": \"string\",\n \"description\": \"Card verification code.\"\n },\n \"name_on_card\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cardholder name printed on the card.\"\n }\n },\n \"required\": [\n \"card_number\",\n \"cvc\",\n \"name_on_card\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"name\",\n \"type\",\n \"status\",\n \"last4\",\n \"expiration_month\",\n \"expiration_year\",\n \"user_id\",\n \"spent_last_month\",\n \"limit\",\n \"billing\",\n \"created_at\",\n \"canceled_at\"\n ]\n }\n }\n }\n },\n \"404\": {\n \"description\": \"card not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/checkout_configurations\": {\n \"get\": {\n \"summary\": \"List checkout configurations\",\n \"tags\": [\n \"Checkout Configurations\"\n ],\n \"operationId\": \"list\",\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Returns a paginated list of checkout configurations for a company.\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"company_id\",\n \"in\": \"query\",\n \"required\": true,\n \"description\": \"The ID of the company to list checkout configurations for.\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"plan_id\",\n \"in\": \"query\",\n \"required\": false,\n \"description\": \"Filter by plan ID.\",\n \"schema\": {\n \"type\": \"string\"\n }\n },\n {\n \"name\": \"created_before\",\n \"in\": \"query\",\n \"required\": false,\n \"description\": \"Filter to configurations created before this Unix timestamp.\",\n \"schema\": {\n \"type\": \"integer\"\n }\n },\n {\n \"name\": \"created_after\",\n \"in\": \"query\",\n \"required\": false,\n \"description\": \"Filter to configurations created after this Unix timestamp.\",\n \"schema\": {\n \"type\": \"integer\"\n }\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\"\n ],\n \"default\": \"created_at\"\n },\n \"description\": \"The field to sort checkout configurations by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"desc\"\n },\n \"description\": \"Sort direction.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"description\": \"Number of results to return (forward pagination).\",\n \"schema\": {\n \"type\": \"integer\"\n }\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"description\": \"Cursor for forward pagination.\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"checkout configurations listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The unique identifier of the checkout configuration.\"\n },\n \"created_at\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp when the checkout configuration was created.\"\n },\n \"updated_at\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp when the checkout configuration was last updated.\"\n },\n \"company_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the company that owns this checkout configuration.\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\n \"payment\",\n \"setup\"\n ],\n \"description\": \"The checkout mode.\"\n },\n \"currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The currency for this checkout configuration.\"\n },\n \"plan\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The plan associated with this checkout configuration.\"\n },\n \"affiliate_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The affiliate code applied at checkout.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Arbitrary key-value metadata. Only returned when caller has checkout_configuration:basic:read scope.\"\n },\n \"redirect_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL to redirect after checkout.\"\n },\n \"purchase_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL for the checkout page.\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The 3D Secure enforcement level.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payment method configuration.\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"company_id\",\n \"mode\"\n ]\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"end_cursor\",\n \"start_cursor\",\n \"has_next_page\",\n \"has_previous_page\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"company_id missing\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create a checkout configuration\",\n \"tags\": [\n \"Checkout Configurations\"\n ],\n \"operationId\": \"create\",\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Creates a checkout configuration for a plan. Mode defaults to 'payment'.\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"checkout configuration created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The unique identifier of the checkout configuration.\"\n },\n \"created_at\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp when the checkout configuration was created.\"\n },\n \"updated_at\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp when the checkout configuration was last updated.\"\n },\n \"company_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the company that owns this checkout configuration.\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\n \"payment\",\n \"setup\"\n ],\n \"description\": \"The checkout mode.\"\n },\n \"currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The currency for this checkout configuration.\"\n },\n \"plan\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The plan associated with this checkout configuration.\"\n },\n \"affiliate_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The affiliate code applied at checkout.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Arbitrary key-value metadata. Only returned when caller has checkout_configuration:basic:read scope.\"\n },\n \"redirect_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL to redirect after checkout.\"\n },\n \"purchase_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL for the checkout page.\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The 3D Secure enforcement level.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payment method configuration.\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"company_id\",\n \"mode\"\n ]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"company_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the company.\"\n },\n \"plan_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ID of an existing plan to attach.\"\n },\n \"plan\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Plan attributes to create a new plan inline for this checkout configuration. Mutually exclusive with plan_id.\",\n \"properties\": {\n \"company_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The company the plan should be created for. Defaults to the company resolved from the request.\"\n },\n \"product_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ID of an existing product (access pass) to attach the plan to.\"\n },\n \"currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The three-letter ISO currency code for the plan's pricing.\"\n },\n \"initial_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The amount charged on the first purchase, in the plan's currency.\"\n },\n \"renewal_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The amount charged each billing period for recurring plans, in the plan's currency.\"\n },\n \"plan_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The billing model for the plan, e.g. 'one_time' or 'renewal'.\"\n },\n \"billing_period\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"The number of days between recurring charges.\"\n },\n \"expiration_days\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"The number of days until the membership expires.\"\n },\n \"trial_period_days\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"The number of free trial days before the first charge.\"\n },\n \"release_method\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"How the plan is sold, e.g. 'buy_now'.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display name of the plan shown to customers.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A text description of the plan displayed to customers.\"\n },\n \"visibility\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Whether the plan is visible to customers or hidden.\"\n },\n \"stock\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"The maximum number of units available for purchase.\"\n },\n \"unlimited_stock\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether the plan has unlimited stock.\"\n },\n \"override_tax_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Override the default tax classification for this plan.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value metadata to store on the plan.\"\n },\n \"force_create_new_plan\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Force creating a new plan even if one with the same attributes already exists.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"enabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"disabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"include_platform_defaults\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n },\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\n \"payment\",\n \"setup\"\n ],\n \"description\": \"Checkout mode. Defaults to 'payment'.\"\n },\n \"currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The currency code.\"\n },\n \"affiliate_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"An affiliate code to apply.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Arbitrary key-value metadata.\"\n },\n \"redirect_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"URL to redirect after checkout.\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"3D Secure enforcement level.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"enabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"disabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"include_platform_defaults\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"/checkout_configurations/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve a checkout configuration\",\n \"tags\": [\n \"Checkout Configurations\"\n ],\n \"operationId\": \"get\",\n \"description\": \"Retrieves a checkout configuration by ID. No authentication required.\",\n \"responses\": {\n \"200\": {\n \"description\": \"checkout configuration found (unauthenticated)\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The unique identifier of the checkout configuration.\"\n },\n \"created_at\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp when the checkout configuration was created.\"\n },\n \"updated_at\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp when the checkout configuration was last updated.\"\n },\n \"company_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the company that owns this checkout configuration.\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"enum\": [\n \"payment\",\n \"setup\"\n ],\n \"description\": \"The checkout mode.\"\n },\n \"currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The currency for this checkout configuration.\"\n },\n \"plan\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The plan associated with this checkout configuration.\"\n },\n \"affiliate_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The affiliate code applied at checkout.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Arbitrary key-value metadata. Only returned when caller has checkout_configuration:basic:read scope.\"\n },\n \"redirect_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL to redirect after checkout.\"\n },\n \"purchase_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL for the checkout page.\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The 3D Secure enforcement level.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payment method configuration.\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"company_id\",\n \"mode\"\n ]\n }\n }\n }\n },\n \"404\": {\n \"description\": \"not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"description\": \"The ID of the checkout configuration.\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ]\n },\n \"delete\": {\n \"summary\": \"Delete a checkout configuration\",\n \"tags\": [\n \"Checkout Configurations\"\n ],\n \"operationId\": \"delete\",\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Deletes a checkout configuration.\",\n \"responses\": {\n \"200\": {\n \"description\": \"checkout configuration deleted\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"404\": {\n \"description\": \"not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"description\": \"The ID of the checkout configuration.\",\n \"schema\": {\n \"type\": \"string\"\n }\n }\n ]\n }\n },\n \"/deposits\": {\n \"get\": {\n \"summary\": \"Retrieve Deposits\",\n \"tags\": [\n \"Deposits\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:account:read\"\n ]\n }\n ],\n \"description\": \"Returns deposit transactions for a business account. Bank deposit transactions are nested under the bank field.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Business account ID (biz_*).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"deposits retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"deposits\"\n ]\n },\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Account ID that owns these deposit transactions.\"\n },\n \"bank\": {\n \"type\": \"array\",\n \"description\": \"Bank deposit transactions for this account.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Bank deposit transaction ID.\"\n },\n \"source_amount\": {\n \"type\": \"string\",\n \"description\": \"Amount sent by the depositor.\"\n },\n \"source_currency\": {\n \"type\": \"string\",\n \"description\": \"Currency sent by the depositor.\"\n },\n \"destination_amount\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Amount credited to the account balance.\"\n },\n \"destination_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Currency credited to the account balance.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Current bank deposit status.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the bank deposit transaction was created.\"\n }\n },\n \"required\": [\n \"id\",\n \"source_amount\",\n \"source_currency\",\n \"destination_amount\",\n \"destination_currency\",\n \"status\",\n \"created_at\"\n ]\n }\n }\n },\n \"required\": [\n \"object\",\n \"account_id\",\n \"bank\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"account ID is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the payout account read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create Deposit\",\n \"tags\": [\n \"Deposits\"\n ],\n \"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.\",\n \"operationId\": \"create\",\n \"parameters\": [],\n \"responses\": {\n \"201\": {\n \"description\": \"deposit created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"deposit\"\n ]\n },\n \"amount\": {\n \"type\": \"string\",\n \"description\": \"Requested deposit amount.\"\n },\n \"account_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account ID of the destination owner. Null for raw wallet address destinations.\"\n },\n \"hosted_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"URL of the hosted deposit page. Only present for business destinations.\"\n },\n \"methods\": {\n \"type\": \"object\",\n \"description\": \"Available deposit methods for destination.\",\n \"properties\": {\n \"bank\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Bank deposit details. Only present when bank deposits are active for the destination account.\",\n \"properties\": {\n \"currencies\": {\n \"type\": \"array\",\n \"description\": \"Bank transfer currencies available for this deposit.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Currency supported by these bank instructions.\"\n },\n \"account_number\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Bank account number for deposits in this currency.\"\n },\n \"routing_number\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Bank routing number for deposits in this currency.\"\n },\n \"deposit_bank_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Receiving bank name.\"\n },\n \"deposit_beneficiary_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Beneficiary name to use for transfer.\"\n },\n \"deposit_reference\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Reference to include with bank transfer.\"\n },\n \"rails\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"Active deposit rails for this currency, such as `ach`, `wire`, or `sepa`.\"\n }\n },\n \"required\": [\n \"currency\",\n \"account_number\",\n \"routing_number\",\n \"deposit_bank_name\",\n \"deposit_beneficiary_name\",\n \"deposit_reference\",\n \"rails\"\n ]\n }\n }\n },\n \"required\": [\n \"currencies\"\n ]\n },\n \"crypto\": {\n \"type\": \"array\",\n \"description\": \"Crypto networks available for this deposit, each with its on-chain deposit address and the tokens accepted on that network.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Network display name, such as `Ethereum` or `Solana`.\"\n },\n \"deposit_address\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Address to send funds to on this network. Null when the provider has not issued one yet.\"\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Network icon URL.\"\n },\n \"supported_currencies\": {\n \"type\": \"array\",\n \"description\": \"Tokens accepted for deposit on this network.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Token symbol, such as `USDC`.\"\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Token icon URL. Null when no icon is available.\"\n }\n },\n \"required\": [\n \"name\",\n \"icon_url\"\n ]\n }\n }\n },\n \"required\": [\n \"name\",\n \"deposit_address\",\n \"icon_url\",\n \"supported_currencies\"\n ]\n }\n }\n },\n \"required\": [\n \"bank\",\n \"crypto\"\n ]\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Metadata from the request.\"\n }\n },\n \"required\": [\n \"object\",\n \"account_id\",\n \"hosted_url\",\n \"methods\",\n \"metadata\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"request is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"Amount to prefill on hosted deposit page.\"\n },\n \"destination\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Destination account ID.\"\n },\n \"address\": {\n \"type\": \"string\",\n \"description\": \"Destination wallet address.\"\n },\n \"network\": {\n \"type\": \"string\",\n \"description\": \"Destination wallet network.\"\n }\n }\n }\n ],\n \"description\": \"Destination account ID or wallet address. Object form is supported for compatibility.\"\n },\n \"network\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Destination network override.\"\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Metadata to include with the deposit response.\"\n }\n },\n \"required\": [\n \"destination\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/financial-activity\": {\n \"get\": {\n \"summary\": \"List Financial Activity\",\n \"tags\": [\n \"Ledgers\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"company:balance:read\"\n ]\n }\n ],\n \"description\": \"Returns a paginated activity feed for one account or user, derived from ledger lines with typed resource and source objects for presentation. Pass exactly one of `account_id` (a `biz_` identifier) or `user_id` (a `user_` identifier). Filter by line type, currency, posted timestamp, or settlement date to reconcile a specific window.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning account ID (a biz_ identifier). Provide this or user_id.\"\n },\n {\n \"name\": \"user_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning user ID (a user_ identifier). Provide this or account_id.\"\n },\n {\n \"name\": \"line_types\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"style\": \"form\",\n \"explode\": true,\n \"description\": \"Optional ledger line categories to include. Some categories (for example `onchain_deposit`, which covers inbound crypto deposits such as MoonPay onramps) are only returned when explicitly requested here.\"\n },\n {\n \"name\": \"currency\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Optional currency code filter, for example `usd`.\"\n },\n {\n \"name\": \"posted_after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"description\": \"Only include rows posted after this ISO 8601 timestamp.\"\n },\n {\n \"name\": \"posted_before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"description\": \"Only include rows posted before this ISO 8601 timestamp.\"\n },\n {\n \"name\": \"available_after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"description\": \"Only include rows whose funds became withdrawable on or after this `YYYY-MM-DD` settlement date (UTC), distinct from posted_at. Requires currency.\"\n },\n {\n \"name\": \"available_before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"description\": \"Only include rows whose funds became withdrawable on or before this `YYYY-MM-DD` settlement date (UTC). Set equal to available_after for a single day. Requires currency.\"\n },\n {\n \"name\": \"limit\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n },\n \"description\": \"Maximum number of rows to return.\"\n },\n {\n \"name\": \"cursor\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor returned by the previous page.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"activities listed for a user\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/LedgerActivity\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"neither account_id nor user_id provided\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required balance-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no ledger for that owner is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/payouts\": {\n \"get\": {\n \"summary\": \"List Payouts\",\n \"tags\": [\n \"Payouts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:withdrawal:read\"\n ]\n }\n ],\n \"description\": \"Lists payouts (withdrawal requests) for an account or user, most recent first. Pass exactly one of account_id (a biz_ identifier) or user_id (a user_ identifier). The saved payout method on each payout additionally requires the payout:destination:read scope and is null without it.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning account ID (a biz_ identifier). Provide this or user_id.\"\n },\n {\n \"name\": \"user_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The owning user ID (a user_ identifier). Provide this or account_id.\"\n },\n {\n \"name\": \"currency\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Optional currency code filter, for example `usd`.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n },\n \"description\": \"Number of payouts to return from the start of the window.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n },\n \"description\": \"Number of payouts to return from the end of the window.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page before (from page_info.start_cursor).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"payout method nulled without the destination-read scope\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"payout\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Payout ID.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"requested\",\n \"awaiting_payment\",\n \"in_transit\",\n \"completed\",\n \"failed\",\n \"canceled\",\n \"denied\"\n ],\n \"description\": \"Current payout status.\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"format\": \"float\",\n \"description\": \"The payout amount in whole currency units.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Payout currency.\"\n },\n \"fee_amount\": {\n \"type\": \"number\",\n \"format\": \"float\",\n \"description\": \"The fee charged for the payout, in the payout currency.\"\n },\n \"speed\": {\n \"type\": \"string\",\n \"enum\": [\n \"standard\",\n \"instant\"\n ],\n \"description\": \"Payout delivery speed.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the payout was created.\"\n },\n \"estimated_arrival\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"Estimated time the funds become available in the destination account.\"\n },\n \"payer_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Name of the entity processing the payout.\"\n },\n \"payout_token\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The saved payout method used. Requires payout:destination:read; null without it.\",\n \"properties\": {\n \"nickname\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Saved payout method nickname.\"\n },\n \"payout_destination\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payout destination display details.\",\n \"properties\": {\n \"payer_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payout destination display name.\"\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payout destination icon URL.\"\n }\n },\n \"required\": [\n \"payer_name\",\n \"icon_url\"\n ]\n }\n },\n \"required\": [\n \"nickname\",\n \"payout_destination\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"status\",\n \"amount\",\n \"currency\",\n \"fee_amount\",\n \"speed\",\n \"created_at\",\n \"estimated_arrival\",\n \"payer_name\",\n \"payout_token\"\n ]\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"neither account_id nor user_id provided\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the withdrawal-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no ledger for that owner is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/plans/{id}/calculate_tax\": {\n \"post\": {\n \"summary\": \"Calculate Tax\",\n \"tags\": [\n \"Plans\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"plan:basic:read\"\n ]\n }\n ],\n \"description\": \"Calculates the tax owed on a plan based on the buyer's location.\",\n \"operationId\": \"calculate_tax\",\n \"parameters\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Plan ID, prefixed `plan_`.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"tax calculated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"The three-letter ISO 4217 currency code of the amounts.\"\n },\n \"tax_behavior\": {\n \"type\": \"string\",\n \"enum\": [\n \"exclusive\",\n \"inclusive\"\n ],\n \"description\": \"Whether tax is added on top of the price (exclusive) or already included in it (inclusive).\"\n },\n \"subtotal\": {\n \"type\": \"integer\",\n \"description\": \"The plan price in the currency's smallest unit, for example cents. For exclusive tax this is the pre-tax amount; for inclusive tax it already contains the tax and equals the total.\"\n },\n \"tax_amount\": {\n \"type\": \"integer\",\n \"description\": \"The tax owed, in the currency's smallest unit. For exclusive tax it is added on top of the subtotal; for inclusive tax it is the portion already contained in the subtotal.\"\n },\n \"total\": {\n \"type\": \"integer\",\n \"description\": \"The total amount the buyer pays, in the currency's smallest unit.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"calculated\",\n \"not_calculated\"\n ],\n \"description\": \"Whether tax was successfully calculated. Returns not_calculated when tax could not be determined.\"\n }\n },\n \"required\": [\n \"currency\",\n \"tax_behavior\",\n \"subtotal\",\n \"tax_amount\",\n \"total\",\n \"status\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"request is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the plan read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"plan not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The buyer's billing address. Provide this or ip_address.\",\n \"properties\": {\n \"country\": {\n \"type\": \"string\",\n \"description\": \"The two-letter ISO 3166-1 country code, for example `US`, `DE`, or `GB`.\"\n },\n \"state\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The state, province, or region code, for example `CA`.\"\n },\n \"postal_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The postal or ZIP code.\"\n },\n \"city\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The city name.\"\n },\n \"line1\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The first line of the street address.\"\n },\n \"line2\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The second line of the street address.\"\n }\n },\n \"required\": [\n \"country\"\n ]\n },\n \"ip_address\": {\n \"type\": \"string\",\n \"description\": \"The buyer's IP address, used to resolve their location when no address is provided.\"\n },\n \"tax_ids\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"maxItems\": 1,\n \"description\": \"The buyer's tax IDs, such as a VAT number, used to apply B2B reverse-charge exemptions.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"ad_nrt\",\n \"ao_tin\",\n \"ar_cuit\",\n \"al_tin\",\n \"am_tin\",\n \"aw_tin\",\n \"au_abn\",\n \"au_arn\",\n \"eu_vat\",\n \"az_tin\",\n \"bs_tin\",\n \"bh_vat\",\n \"bd_bin\",\n \"bb_tin\",\n \"by_tin\",\n \"bj_ifu\",\n \"bo_tin\",\n \"ba_tin\",\n \"br_cnpj\",\n \"br_cpf\",\n \"bg_uic\",\n \"bf_ifu\",\n \"kh_tin\",\n \"cm_niu\",\n \"ca_bn\",\n \"ca_gst_hst\",\n \"ca_pst_bc\",\n \"ca_pst_mb\",\n \"ca_pst_sk\",\n \"ca_qst\",\n \"cv_nif\",\n \"cl_tin\",\n \"cn_tin\",\n \"co_nit\",\n \"cd_nif\",\n \"cr_tin\",\n \"hr_oib\",\n \"do_rcn\",\n \"ec_ruc\",\n \"eg_tin\",\n \"sv_nit\",\n \"et_tin\",\n \"eu_oss_vat\",\n \"ge_vat\",\n \"gh_tin\",\n \"de_stn\",\n \"gb_vat\",\n \"gn_nif\",\n \"hk_br\",\n \"hu_tin\",\n \"is_vat\",\n \"in_gst\",\n \"id_npwp\",\n \"il_vat\",\n \"jp_cn\",\n \"jp_rn\",\n \"jp_trn\",\n \"kz_bin\",\n \"ke_pin\",\n \"kg_tin\",\n \"la_tin\",\n \"li_uid\",\n \"li_vat\",\n \"my_frp\",\n \"my_itn\",\n \"my_sst\",\n \"mr_nif\",\n \"mx_rfc\",\n \"md_vat\",\n \"me_pib\",\n \"ma_vat\",\n \"np_pan\",\n \"nz_gst\",\n \"ng_tin\",\n \"mk_vat\",\n \"no_vat\",\n \"no_voec\",\n \"om_vat\",\n \"pe_ruc\",\n \"ph_tin\",\n \"ro_tin\",\n \"ru_inn\",\n \"ru_kpp\",\n \"sa_vat\",\n \"sn_ninea\",\n \"rs_pib\",\n \"sg_gst\",\n \"sg_uen\",\n \"si_tin\",\n \"za_vat\",\n \"kr_brn\",\n \"es_cif\",\n \"ch_uid\",\n \"ch_vat\",\n \"tw_vat\",\n \"tj_tin\",\n \"tz_vat\",\n \"th_vat\",\n \"tr_tin\",\n \"ug_tin\",\n \"ua_vat\",\n \"ae_trn\",\n \"us_ein\",\n \"uy_ruc\",\n \"uz_tin\",\n \"uz_vat\",\n \"ve_rif\",\n \"vn_tin\",\n \"zm_tin\",\n \"zw_tin\",\n \"sr_fin\"\n ],\n \"description\": \"Tax ID type, for example `eu_vat`.\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"Tax ID number, for example `DE123456789`.\"\n }\n }\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/plans\": {\n \"get\": {\n \"summary\": \"List Plans\",\n \"tags\": [\n \"Plans\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"plan:basic:read\"\n ]\n }\n ],\n \"description\": \"Returns a paginated list of plans belonging to an account, with optional filtering by visibility, type, release method, and product.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": true,\n \"description\": \"The unique identifier of the account to list plans for.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ]\n },\n \"required\": false,\n \"description\": \"The sort direction for results. Defaults to descending.\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"id\",\n \"active_members_count\",\n \"created_at\",\n \"internal_notes\",\n \"expiration_days\"\n ]\n },\n \"required\": false,\n \"description\": \"The field to sort results by. Defaults to created_at.\"\n },\n {\n \"name\": \"release_methods\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"required\": false,\n \"description\": \"Filter to only plans matching these release methods.\"\n },\n {\n \"name\": \"visibilities\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"required\": false,\n \"description\": \"Filter to only plans matching these visibility states.\"\n },\n {\n \"name\": \"plan_types\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"required\": false,\n \"description\": \"Filter to only plans matching these billing types.\"\n },\n {\n \"name\": \"product_ids\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"required\": false,\n \"description\": \"Filter to only plans belonging to these product identifiers.\"\n },\n {\n \"name\": \"created_before\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"Only return plans created before this timestamp.\"\n },\n {\n \"name\": \"created_after\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"Only return plans created after this timestamp.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of plans to return (default and max 100).\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns plans after this position.\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of plans to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns plans before this position.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"plans listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/PlanListItem\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"end_cursor\",\n \"start_cursor\",\n \"has_next_page\",\n \"has_previous_page\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"missing account_id\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create Plan\",\n \"tags\": [\n \"Plans\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"plan:create\"\n ]\n }\n ],\n \"description\": \"Create a new pricing plan for a product. The plan defines the billing interval, price, and availability for customers.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"plan created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Plan\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"invalid parameters\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The unique identifier of the account to create this plan for. Defaults to the caller's account.\"\n },\n \"product_id\": {\n \"type\": \"string\",\n \"description\": \"The unique identifier of the product to attach this plan to.\"\n },\n \"plan_type\": {\n \"type\": \"string\",\n \"description\": \"Plan billing type, such as `one_time` or `renewal`.\"\n },\n \"release_method\": {\n \"type\": \"string\",\n \"description\": \"Sales method for this plan, such as `buy_now` or `waitlist`.\"\n },\n \"split_pay_required_payments\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Installment payments required before the subscription pauses.\"\n },\n \"adaptive_pricing_enabled\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether this plan accepts local currency payments via adaptive pricing.\"\n },\n \"billing_period\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Recurring billing interval in days, such as 30 for monthly or 365 for annual.\"\n },\n \"checkout_styling\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Checkout styling overrides for this plan.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"The three-letter ISO currency code for the plan's pricing. Defaults to USD.\"\n },\n \"custom_fields\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the custom field (if being updated).\"\n },\n \"field_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\"\n ],\n \"description\": \"The type of the custom field.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the custom field.\"\n },\n \"order\": {\n \"type\": \"integer\",\n \"description\": \"The order of the field.\"\n },\n \"placeholder\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"An example response displayed in the input field.\"\n },\n \"required\": {\n \"type\": \"boolean\",\n \"description\": \"Whether or not the field is required.\"\n }\n }\n },\n \"description\": \"An array of custom field definitions to collect from customers at checkout. Omitting this field clears existing custom fields.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A text description of the plan displayed to customers on the product page.\"\n },\n \"expiration_days\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Access duration in days before the membership expires.\"\n },\n \"image\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"direct_upload_id\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"An image displayed on the product page to represent this plan.\"\n },\n \"initial_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Initial amount charged in the plan's currency, e.g. 10.43 for $10.43.\"\n },\n \"internal_notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Private notes visible only to the account owner. Not shown to customers.\"\n },\n \"legacy_payment_method_controls\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether this plan uses legacy payment method controls.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs to store on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.\"\n },\n \"override_tax_type\": {\n \"type\": \"string\",\n \"description\": \"Override the default tax classification for this specific plan.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Explicit payment method configuration for the plan. When not provided, the account's defaults apply.\",\n \"properties\": {\n \"enabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"disabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"include_platform_defaults\": {\n \"type\": \"boolean\"\n }\n }\n },\n \"renewal_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The amount charged each billing period for recurring plans, in the plan's currency.\"\n },\n \"stock\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"The maximum number of units available for purchase. Ignored when unlimited_stock is true.\"\n },\n \"three_ds_level\": {\n \"type\": \"string\",\n \"enum\": [\n \"mandate_challenge\",\n \"frictionless\"\n ],\n \"description\": \"3D Secure behavior for this plan. Send `null` to inherit the account default.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display name of the plan shown to customers on the product page.\"\n },\n \"trial_period_days\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Free trial duration before the first recurring charge.\"\n },\n \"unlimited_stock\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether the plan has unlimited stock. When true, the stock field is ignored.\"\n },\n \"visibility\": {\n \"type\": \"string\",\n \"description\": \"Whether the plan is visible to customers or hidden from public view.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/plans/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve Plan\",\n \"tags\": [\n \"Plans\"\n ],\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Retrieves the details of an existing plan.\",\n \"operationId\": \"get\",\n \"responses\": {\n \"200\": {\n \"description\": \"plan retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Plan\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"no plan with that id\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Plan ID, prefixed `plan_`.\"\n }\n ]\n },\n \"patch\": {\n \"summary\": \"Update Plan\",\n \"tags\": [\n \"Plans\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"plan:update\"\n ]\n }\n ],\n \"description\": \"Update a plan's pricing, billing interval, visibility, stock, and other settings.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Plan ID, prefixed `plan_`.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"plan updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Plan\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"offer_cancel_discount\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether to offer a retention discount when a customer attempts to cancel.\"\n },\n \"strike_through_initial_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"A comparison price displayed with a strikethrough for the initial price.\"\n },\n \"strike_through_renewal_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"A comparison price displayed with a strikethrough for the renewal price.\"\n },\n \"adaptive_pricing_enabled\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether this plan accepts local currency payments via adaptive pricing.\"\n },\n \"billing_period\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Recurring billing interval in days, such as 30 for monthly or 365 for annual.\"\n },\n \"checkout_styling\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Checkout styling overrides for this plan.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"The three-letter ISO currency code for the plan's pricing. Defaults to USD.\"\n },\n \"custom_fields\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the custom field (if being updated).\"\n },\n \"field_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"text\"\n ],\n \"description\": \"The type of the custom field.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the custom field.\"\n },\n \"order\": {\n \"type\": \"integer\",\n \"description\": \"The order of the field.\"\n },\n \"placeholder\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"An example response displayed in the input field.\"\n },\n \"required\": {\n \"type\": \"boolean\",\n \"description\": \"Whether or not the field is required.\"\n }\n }\n },\n \"description\": \"An array of custom field definitions to collect from customers at checkout. Omitting this field clears existing custom fields.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A text description of the plan displayed to customers on the product page.\"\n },\n \"expiration_days\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Access duration in days before the membership expires.\"\n },\n \"image\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"direct_upload_id\": {\n \"type\": \"string\"\n }\n },\n \"description\": \"An image displayed on the product page to represent this plan.\"\n },\n \"initial_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Initial amount charged in the plan's currency, e.g. 10.43 for $10.43.\"\n },\n \"internal_notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Private notes visible only to the account owner. Not shown to customers.\"\n },\n \"legacy_payment_method_controls\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether this plan uses legacy payment method controls.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs to store on the plan. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.\"\n },\n \"override_tax_type\": {\n \"type\": \"string\",\n \"description\": \"Override the default tax classification for this specific plan.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Explicit payment method configuration for the plan. When not provided, the account's defaults apply.\",\n \"properties\": {\n \"enabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"disabled\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"include_platform_defaults\": {\n \"type\": \"boolean\"\n }\n }\n },\n \"renewal_price\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The amount charged each billing period for recurring plans, in the plan's currency.\"\n },\n \"stock\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"The maximum number of units available for purchase. Ignored when unlimited_stock is true.\"\n },\n \"three_ds_level\": {\n \"type\": \"string\",\n \"enum\": [\n \"mandate_challenge\",\n \"frictionless\"\n ],\n \"description\": \"3D Secure behavior for this plan. Send `null` to inherit the account default.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display name of the plan shown to customers on the product page.\"\n },\n \"trial_period_days\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Free trial duration before the first recurring charge.\"\n },\n \"unlimited_stock\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether the plan has unlimited stock. When true, the stock field is ignored.\"\n },\n \"visibility\": {\n \"type\": \"string\",\n \"description\": \"Whether the plan is visible to customers or hidden from public view.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n },\n \"delete\": {\n \"summary\": \"Delete Plan\",\n \"tags\": [\n \"Plans\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"plan:delete\"\n ]\n }\n ],\n \"description\": \"Permanently delete a plan from a product. Existing memberships on this plan will not be affected.\",\n \"operationId\": \"delete\",\n \"responses\": {\n \"200\": {\n \"description\": \"plan deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"boolean\",\n \"description\": \"Always true on success.\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"no plan with that id\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Plan ID, prefixed `plan_`.\"\n }\n ]\n }\n },\n \"/products\": {\n \"get\": {\n \"summary\": \"List Products\",\n \"tags\": [\n \"Products\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"product:basic:read\"\n ]\n }\n ],\n \"description\": \"Returns a paginated list of products belonging to a company.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"company_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": true,\n \"description\": \"The unique identifier of the company to list products for.\"\n },\n {\n \"name\": \"visibilities\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"required\": false,\n \"description\": \"Filter to only products matching these visibility states.\"\n },\n {\n \"name\": \"access_pass_types\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"required\": false,\n \"description\": \"Filter to only products matching these types.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ]\n },\n \"required\": false,\n \"description\": \"The sort direction for results. Defaults to descending.\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"The field to sort results by. Defaults to created_at.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of products to return (default and max 100).\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns products after this position.\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of products to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns products before this position.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"products listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ProductListItem\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"end_cursor\",\n \"start_cursor\",\n \"has_next_page\",\n \"has_previous_page\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"missing company_id\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Create Product\",\n \"tags\": [\n \"Products\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"product:create\"\n ]\n }\n ],\n \"description\": \"Creates a new product for a company.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"product created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Product\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"company_id\": {\n \"type\": \"string\",\n \"description\": \"The unique identifier of the company to create this product for.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The display name of the product. Maximum 80 characters.\"\n },\n \"visibility\": {\n \"type\": \"string\",\n \"description\": \"Whether the product is visible to customers.\"\n },\n \"headline\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A short marketing headline for the product page.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A written description displayed on the product page.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs to store on the product.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL slug for the product's public link.\"\n },\n \"global_affiliate_percentage\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The commission rate affiliates earn.\"\n },\n \"global_affiliate_status\": {\n \"type\": \"string\",\n \"description\": \"The enrollment status in the global affiliate program.\"\n },\n \"member_affiliate_percentage\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The commission rate members earn.\"\n },\n \"member_affiliate_status\": {\n \"type\": \"string\",\n \"description\": \"The enrollment status in the member affiliate program.\"\n },\n \"custom_cta\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The call-to-action button label.\"\n },\n \"custom_cta_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A URL the call-to-action button links to.\"\n },\n \"custom_statement_descriptor\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Custom bank statement descriptor. Must start with WHOP*.\"\n },\n \"product_tax_code_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The unique identifier of the tax classification code.\"\n },\n \"redirect_purchase_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A URL to redirect the customer to after purchase.\"\n },\n \"collect_shipping_address\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether to collect a shipping address at checkout.\"\n }\n },\n \"required\": [\n \"title\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/products/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve Product\",\n \"tags\": [\n \"Products\"\n ],\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Retrieves the details of an existing product. This endpoint is publicly accessible.\",\n \"operationId\": \"get\",\n \"responses\": {\n \"200\": {\n \"description\": \"product retrieved without authentication\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Product\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"product not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The unique identifier of the product.\"\n }\n ]\n },\n \"patch\": {\n \"summary\": \"Update Product\",\n \"tags\": [\n \"Products\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"product:update\"\n ]\n }\n ],\n \"description\": \"Updates an existing product.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The unique identifier of the product.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"product tax code updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/Product\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"404\": {\n \"description\": \"product not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The display name of the product.\"\n },\n \"visibility\": {\n \"type\": \"string\",\n \"description\": \"Whether the product is visible to customers.\"\n },\n \"headline\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A short marketing headline for the product page.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"A written description displayed on the product page.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs to store on the product.\"\n },\n \"product_tax_code_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The unique identifier of the tax classification code.\"\n }\n }\n }\n }\n },\n \"required\": true\n }\n },\n \"delete\": {\n \"summary\": \"Delete Product\",\n \"tags\": [\n \"Products\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"product:delete\"\n ]\n }\n ],\n \"description\": \"Deletes a product. Only products with no memberships, entries, reviews, or invoices can be deleted.\",\n \"operationId\": \"delete\",\n \"responses\": {\n \"200\": {\n \"description\": \"product deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"boolean\"\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"404\": {\n \"description\": \"product not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The unique identifier of the product.\"\n }\n ]\n }\n },\n \"/social_accounts/{id}\": {\n \"delete\": {\n \"summary\": \"Delete a Social Account\",\n \"tags\": [\n \"Social Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"social_account:delete\"\n ]\n }\n ],\n \"description\": \"Disconnects a social account from an account or user by discarding the link record. The underlying social account record is retained.\",\n \"operationId\": \"delete\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ID of the social account to disconnect.\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The Account that the social account is connected to. Provide either this or user_id.\"\n },\n {\n \"name\": \"user_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The User that the social account is connected to. Provide either this or account_id.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"user social account disconnected\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"boolean\",\n \"description\": \"Always true on success.\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"account_id and user_id both provided\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"caller lacks delete permission\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"link already disconnected\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/social_accounts/{id}/posts\": {\n \"get\": {\n \"summary\": \"List Social Account Posts\",\n \"tags\": [\n \"Social Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"social_account:read\"\n ]\n }\n ],\n \"description\": \"Lists the existing posts of a connected social account. Supported for Facebook pages and Instagram accounts. Pass post_id to return only that single post. The owning account is passed as account_id (a biz_ identifier).\",\n \"operationId\": \"posts\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The social account (a sacc_ identifier) whose posts to list.\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The Account (a biz_ identifier) the social account is connected to.\"\n },\n {\n \"name\": \"post_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Return only the single post with this platform id, instead of the full list.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 25,\n \"maximum\": 100\n },\n \"description\": \"The number of posts to return.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"single post returned when post_id is given\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/SocialAccountPost\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"account_id is missing\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"404\": {\n \"description\": \"social account is not linked to the account\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/social_accounts\": {\n \"get\": {\n \"summary\": \"List Social Accounts\",\n \"tags\": [\n \"Social Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"social_account:read\"\n ]\n }\n ],\n \"description\": \"Lists the social accounts linked to an account or user. The owner is passed as exactly one of account_id (a biz_ identifier) or user_id (a user_ identifier); an account-scoped API key defaults to its own account when neither is given.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The Account that the social accounts are connected to. Provide either this or user_id.\"\n },\n {\n \"name\": \"user_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The User that the social accounts are connected to. Provide either this or account_id.\"\n },\n {\n \"name\": \"platform\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"x\",\n \"instagram\",\n \"youtube\",\n \"tiktok\",\n \"facebook\"\n ]\n },\n \"description\": \"Only return social accounts for the platform that is specified.\"\n },\n {\n \"name\": \"verified\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"boolean\"\n },\n \"description\": \"Only return social accounts that are verified on the platform.\"\n },\n {\n \"name\": \"scopes\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"advertise\"\n ]\n }\n },\n \"description\": \"Only return social accounts that have these scopes.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 20,\n \"maximum\": 100\n },\n \"description\": \"The number of social accounts to return.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 100\n },\n \"description\": \"The number of social accounts to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page before (from page_info.start_cursor).\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"display_order\",\n \"created_at\"\n ],\n \"default\": \"display_order\"\n },\n \"description\": \"The field to sort social accounts by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"asc\"\n },\n \"description\": \"Sort direction.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"filtered to accounts holding the requested scope\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/SocialAccount\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"end_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": \"string\",\n \"nullable\": true\n }\n },\n \"required\": [\n \"has_next_page\",\n \"end_cursor\",\n \"has_previous_page\",\n \"start_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"neither account_id nor user_id resolvable\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n },\n \"post\": {\n \"summary\": \"Connect a Social Account\",\n \"tags\": [\n \"Social Accounts\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"social_account:create\"\n ]\n }\n ],\n \"description\": \"Starts an OAuth connection flow for a social account and returns an authorize_url to redirect the user to. Today the only supported platform is meta_business, which grants the advertise scope so the connected Facebook page and Instagram account can run ads. The required permission follows the requested capability: the advertise scope requires ad_campaign:create (so advertiser roles can connect), other scopes require social_account:create. The connection is authorized against the account given by account_id (a biz_ identifier); an account-scoped API key may omit it to default to its own account.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"authorize url returned\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"authorize_url\": {\n \"type\": \"string\",\n \"description\": \"The OAuth authorization URL to redirect the user to.\"\n }\n },\n \"required\": [\n \"authorize_url\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"unsupported platform\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"redirect_url\": {\n \"type\": \"string\",\n \"description\": \"The Whop URL to redirect the user to after they finish connecting.\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"enum\": [\n \"meta_business\"\n ],\n \"description\": \"The platform to connect the social account on.\"\n },\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"The Account (biz_ identifier) to connect the social account for. An account-scoped API key may omit this to default to its own account.\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"advertise\"\n ]\n },\n \"description\": \"Capabilities to grant for the connected social account, for example `advertise`.\"\n }\n },\n \"required\": [\n \"redirect_url\",\n \"platform\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/stats\": {\n \"get\": {\n \"summary\": \"List Metrics\",\n \"tags\": [\n \"Stats\"\n ],\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Lists every metric you can query, with its unit and the properties you can filter or break it down by.\",\n \"operationId\": \"list\",\n \"responses\": {\n \"200\": {\n \"description\": \"metric catalog\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"description\": \"The available metrics.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\",\n \"description\": \"The metric's key. Pass it to GET /stats/{metric} to query its values.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Human-readable display name for the metric.\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\n \"count\",\n \"currency\",\n \"percent\"\n ],\n \"description\": \"How to read the metric's values: count is an integer, currency is a decimal amount, and percent is a number where 1.6 means 1.6%.\"\n },\n \"properties\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"The properties you can use with this metric — pass one as a filter (property=value) to narrow the series, or as breakdown_by=property to split it.\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"A short description of what the metric measures.\"\n },\n \"windows\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"Snapshot metrics only: the trailing windows you can pass as snapshot_window, for example 30d. Absent on live metrics, which use from/to instead.\"\n }\n },\n \"required\": [\n \"key\",\n \"name\",\n \"unit\",\n \"properties\",\n \"description\"\n ]\n }\n }\n },\n \"required\": [\n \"data\"\n ]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ]\n }\n },\n \"/stats/{metric}\": {\n \"get\": {\n \"summary\": \"Retrieve Metric\",\n \"tags\": [\n \"Stats\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"stats:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a metric as a time series of points for an account over a date range.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"name\": \"metric\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The metric to retrieve, for example net_revenue. Use GET /stats to see every metric key. The metric sets the unit and the properties you can filter or break down by.\"\n },\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The account to measure, for example biz_AbC123.\"\n },\n {\n \"name\": \"from\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"description\": \"Start of the date range (YYYY-MM-DD).\"\n },\n {\n \"name\": \"to\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"description\": \"End of the date range (YYYY-MM-DD).\"\n },\n {\n \"name\": \"interval\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"hour\",\n \"day\",\n \"week\",\n \"month\"\n ]\n },\n \"description\": \"How wide each point is. Defaults to day. Snapshot metrics are day-only.\"\n },\n {\n \"name\": \"breakdown_by\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Split the metric out by one of its properties — each point gets a breakdown array. For example breakdown_by=currency returns an entry for usd, an entry for eur, and so on.\"\n },\n {\n \"name\": \"convert_to\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Display currency for money metrics — every amount is converted into this ISO currency using the exchange rate on each period's date. Defaults to usd. Ignored when you filter or break down by currency (those report the original transaction currency, unconverted).\"\n },\n {\n \"name\": \"currency\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to transactions made in this original ISO currency, for example eur — reported in that currency, not converted. Pair with breakdown_by=currency to split a metric by currency. Available on metrics that list currency.\"\n },\n {\n \"name\": \"time_zone\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"IANA time zone to bucket the series in, for example America/New_York. Defaults to UTC. Not accepted by snapshot metrics, which are UTC only.\"\n },\n {\n \"name\": \"payment_method\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to a single payment method, for example card or crypto. Available on metrics that list payment_method.\"\n },\n {\n \"name\": \"card_network\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to a single card brand, for example visa. A refinement of payment_method=card. Available on metrics that list card_network.\"\n },\n {\n \"name\": \"snapshot_window\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"30d\"\n ]\n },\n \"description\": \"Trailing window for snapshot metrics. Only accepted by snapshot metrics (each lists its allowed windows in the catalog); defaults to the metric's first supported window. Only 30d today.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"split into one segment per property value\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"object\",\n \"properties\": {\n \"points\": {\n \"type\": \"array\",\n \"description\": \"One entry per period, oldest first.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"timestamp\": {\n \"type\": \"integer\",\n \"description\": \"Unix timestamp (seconds) of the period start.\"\n },\n \"value\": {\n \"type\": \"number\",\n \"nullable\": true,\n \"description\": \"The metric's value for this period, in the metric's unit.\"\n },\n \"breakdown\": {\n \"type\": \"array\",\n \"description\": \"Present only when broken down: one entry per property value in this period.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The property value, for example usd or visa.\"\n },\n \"value\": {\n \"type\": \"number\",\n \"nullable\": true,\n \"description\": \"The metric's value for this entry.\"\n }\n },\n \"required\": [\n \"name\",\n \"value\"\n ]\n }\n }\n },\n \"required\": [\n \"timestamp\",\n \"value\"\n ]\n }\n }\n },\n \"required\": [\n \"points\"\n ]\n }\n },\n \"required\": [\n \"data\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"subject tag type mismatch\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"404\": {\n \"description\": \"unknown account\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/swaps/quote\": {\n \"post\": {\n \"summary\": \"Create Swap Quote\",\n \"tags\": [\n \"Swaps\"\n ],\n \"security\": [],\n \"description\": \"Returns a stateless swap price preview. No funds move and nothing is persisted.\",\n \"operationId\": \"quote\",\n \"parameters\": [],\n \"responses\": {\n \"200\": {\n \"description\": \"swap quote created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"swap_quote\"\n ]\n },\n \"amount_in\": {\n \"type\": \"string\",\n \"description\": \"Source token amount used for the quote.\"\n },\n \"amount_out\": {\n \"type\": \"string\",\n \"description\": \"Estimated destination token amount.\"\n },\n \"amount_out_min\": {\n \"type\": \"string\",\n \"description\": \"Minimum destination amount after slippage.\"\n },\n \"rate\": {\n \"type\": \"string\",\n \"description\": \"Quoted exchange rate.\"\n },\n \"fee_bps\": {\n \"type\": \"integer\",\n \"description\": \"Whop fee in basis points.\"\n },\n \"bridge_fee\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Estimated bridge fee for cross-chain swaps.\"\n },\n \"estimated_duration_seconds\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Estimated time for the swap to complete.\"\n },\n \"requires_token_approval\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"description\": \"Whether the source token needs approval before swapping.\"\n },\n \"from_address\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Source wallet address used for the quote.\"\n },\n \"to_address\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Destination wallet address used for the quote.\"\n },\n \"from_token\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Resolved source token details.\"\n },\n \"to_token\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Resolved destination token details.\"\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Metadata from the request.\"\n }\n },\n \"required\": [\n \"object\",\n \"amount_in\",\n \"amount_out\",\n \"rate\",\n \"fee_bps\",\n \"from_token\",\n \"to_token\",\n \"metadata\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"request is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"amount\": {\n \"type\": \"string\",\n \"description\": \"Source token amount.\"\n },\n \"from_token\": {\n \"type\": \"string\",\n \"description\": \"Source token contract address or ticker symbol, such as \\\"USDT\\\".\"\n },\n \"to_token\": {\n \"type\": \"string\",\n \"description\": \"Destination token contract address or ticker symbol, such as \\\"XAUT\\\".\"\n },\n \"from_chain\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"integer\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Source chain name or chain ID. Defaults to the source token's chain when omitted.\"\n },\n \"to_chain\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"integer\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Destination chain name or chain ID. Defaults to the destination token's chain when omitted.\"\n },\n \"from_address\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Source wallet address used for the quote.\"\n },\n \"to_address\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Destination wallet address used for the quote.\"\n },\n \"slippage_bps\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Maximum slippage tolerance in basis points.\"\n },\n \"metadata\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Metadata to include with the quote response.\"\n }\n },\n \"required\": [\n \"amount\",\n \"from_token\",\n \"to_token\"\n ]\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/swaps\": {\n \"post\": {\n \"summary\": \"Create Swap\",\n \"tags\": [\n \"Swaps\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"crypto_wallet:swap\"\n ]\n }\n ],\n \"description\": \"Executes a swap from the account's wallet. Runs asynchronously; poll GET /swaps/{id} for status.\",\n \"operationId\": \"create\",\n \"parameters\": [],\n \"responses\": {\n \"201\": {\n \"description\": \"swap created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"swap\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Swap ID. Poll `GET /swaps/:id` for status.\"\n },\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Account ID that owns the wallet used for the swap.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Initial swap status.\"\n },\n \"to_chain\": {\n \"type\": \"string\",\n \"description\": \"Destination chain for the swap.\"\n },\n \"amount_out_expected\": {\n \"type\": \"string\",\n \"description\": \"Expected destination token amount.\"\n },\n \"amount_out_min\": {\n \"type\": \"string\",\n \"description\": \"Minimum destination amount after slippage.\"\n },\n \"rate\": {\n \"type\": \"string\",\n \"description\": \"Quoted exchange rate used to create the swap.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account_id\",\n \"status\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"request is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"403\": {\n \"description\": \"credential lacks the crypto-wallet scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Business or user account ID (biz_* / user_*).\"\n },\n \"amount\": {\n \"type\": \"string\",\n \"description\": \"Source token amount.\"\n },\n \"from_token\": {\n \"type\": \"string\",\n \"description\": \"Source token contract address or ticker symbol, such as \\\"USDT\\\".\"\n },\n \"to_token\": {\n \"type\": \"string\",\n \"description\": \"Destination token contract address or ticker symbol, such as \\\"XAUT\\\".\"\n },\n \"from_chain\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"integer\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Source chain name or chain ID. Defaults to the source token's chain when omitted.\"\n },\n \"to_chain\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"integer\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Destination chain name or chain ID. Defaults to the destination token's chain when omitted.\"\n },\n \"slippage_bps\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Maximum slippage tolerance in basis points.\"\n }\n },\n \"required\": [\n \"account_id\",\n \"amount\",\n \"from_token\",\n \"to_token\"\n ]\n }\n }\n },\n \"required\": true\n }\n },\n \"get\": {\n \"summary\": \"List Swaps\",\n \"tags\": [\n \"Swaps\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"crypto_wallet:swap\"\n ]\n }\n ],\n \"description\": \"Lists the account's swaps. Currently returns the in-flight or most recent swap, so zero or one rows.\",\n \"operationId\": \"status\",\n \"parameters\": [\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Business or user account ID (biz_* / user_*).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"swaps listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"description\": \"Swaps returned for this account.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"swap\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Swap ID.\"\n },\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Account ID that owns the wallet used for the swap.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Current swap status.\"\n },\n \"tx_hashes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"On-chain transaction hashes produced by the swap.\"\n },\n \"error\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Latest error returned for a failed swap.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account_id\",\n \"status\",\n \"tx_hashes\"\n ]\n }\n }\n },\n \"required\": [\n \"data\"\n ]\n }\n }\n }\n },\n \"403\": {\n \"description\": \"credential lacks the crypto-wallet scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n }\n }\n },\n \"/swaps/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve Swap\",\n \"tags\": [\n \"Swaps\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"crypto_wallet:swap\"\n ]\n }\n ],\n \"description\": \"Returns the status of a specific swap, by the id returned from POST /swaps.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Swap ID returned from POST /swaps.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"swap status retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"swap\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Swap ID.\"\n },\n \"account_id\": {\n \"type\": \"string\",\n \"description\": \"Account ID that owns the wallet used for the swap.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Current swap status.\"\n },\n \"tx_hashes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"On-chain transaction hashes produced by the swap.\"\n },\n \"error\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Latest error returned for a failed swap.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"account_id\",\n \"status\",\n \"tx_hashes\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"swap id is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"403\": {\n \"description\": \"credential lacks the crypto-wallet scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"swap does not exist\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n },\n \"/transfers\": {\n \"post\": {\n \"summary\": \"Create Transfer\",\n \"tags\": [\n \"Transfers\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:transfer_funds\"\n ]\n },\n {\n \"bearerAuth\": [\n \"payout:withdraw_funds\"\n ]\n },\n {\n \"bearerAuth\": [\n \"airdrop_link:manage\"\n ]\n }\n ],\n \"description\": \"Moves funds out of an account. `type` selects the kind of movement (default `ledger`): `ledger` transfers credit between two ledger accounts and returns a Transfer; `wallet_send` sends USDT from the origin account's Ethereum wallet to a recipient; `claim_link` funds a shareable claim link anyone with the URL can redeem.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n }\n ],\n \"responses\": {\n \"201\": {\n \"description\": \"money movement created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"title\": \"Transfer\",\n \"description\": \"A transfer of credit between two ledger accounts.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Transfer ID.\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"Transfer amount.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Transfer currency.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the transfer was created.\"\n },\n \"fee_amount\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Fee charged for the transfer.\"\n },\n \"notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Transfer note.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Custom metadata attached to the transfer.\"\n },\n \"origin_ledger_account_id\": {\n \"type\": \"string\",\n \"description\": \"Source ledger account ID.\"\n },\n \"destination_ledger_account_id\": {\n \"type\": \"string\",\n \"description\": \"Destination ledger account ID.\"\n },\n \"origin\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"title\": \"Company\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"Company\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account route.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account display name.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n },\n {\n \"type\": \"object\",\n \"title\": \"User\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"User\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User display name.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"User's username.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"typename\"\n },\n \"description\": \"Account or user sending funds.\"\n },\n \"destination\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"title\": \"Company\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"Company\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account route.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account display name.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n },\n {\n \"type\": \"object\",\n \"title\": \"User\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"User\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User display name.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"User's username.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"typename\"\n },\n \"description\": \"Account or user receiving funds.\"\n }\n },\n \"required\": [\n \"id\",\n \"amount\",\n \"currency\",\n \"created_at\",\n \"origin_ledger_account_id\",\n \"destination_ledger_account_id\",\n \"origin\",\n \"destination\"\n ]\n },\n {\n \"type\": \"object\",\n \"title\": \"Send\",\n \"description\": \"Returned for a wallet_send: an onchain USDT send to a recipient.\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"send\"\n ]\n },\n \"tx_hash\": {\n \"type\": \"string\"\n },\n \"amount\": {\n \"type\": \"string\"\n },\n \"currency\": {\n \"type\": \"string\"\n },\n \"source\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\"\n },\n \"address\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"account_id\",\n \"address\"\n ]\n },\n \"destination\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\"\n },\n \"address\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"account_id\",\n \"address\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"tx_hash\",\n \"amount\",\n \"currency\",\n \"source\",\n \"destination\"\n ]\n },\n {\n \"type\": \"object\",\n \"title\": \"ClaimLink\",\n \"description\": \"Returned for a claim_link: a shareable URL anyone can open to claim the funds.\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"claim_link\"\n ]\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"claim_url\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": \"string\"\n },\n \"amount\": {\n \"type\": \"string\"\n },\n \"currency\": {\n \"type\": \"string\"\n },\n \"redeemable_count\": {\n \"type\": \"integer\"\n },\n \"expires_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\"\n },\n \"source\": {\n \"type\": \"object\",\n \"properties\": {\n \"account_id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"account_id\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"claim_url\",\n \"status\",\n \"amount\",\n \"currency\",\n \"redeemable_count\",\n \"expires_at\",\n \"source\"\n ]\n }\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"request is invalid\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"ledger\",\n \"wallet_send\",\n \"claim_link\"\n ],\n \"description\": \"The kind of money movement. Defaults to ledger.\"\n },\n \"origin_id\": {\n \"type\": \"string\",\n \"description\": \"The account sending the funds. A user ID (user_xxx), account ID (biz_xxx), or ledger account ID (ldgr_xxx).\"\n },\n \"destination_id\": {\n \"type\": \"string\",\n \"description\": \"The recipient. Required for ledger and wallet_send (a user_/biz_/ldgr_ ID, or — for sends — an email). Omit for claim_link.\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"The amount to move, in the transfer currency. For example 25.00.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Currency, such as `usd`. Required for ledger transfers.\",\n \"example\": \"usd\"\n },\n \"idempotence_key\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Ledger transfers only. A unique key to prevent duplicate transfers.\"\n },\n \"notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Ledger transfers only. A short note describing the transfer.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Ledger transfers only. Custom key-value pairs attached to the transfer. Max 50 keys, 100 chars per key, 500 chars per string value.\"\n },\n \"expires_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"claim_link only. Link expiry as an ISO 8601 timestamp. Defaults to 24 hours from creation.\"\n },\n \"redeemable_count\": {\n \"type\": \"integer\",\n \"description\": \"claim_link only. How many different users can claim the link. Defaults to 1.\"\n }\n },\n \"required\": [\n \"origin_id\",\n \"amount\"\n ]\n }\n }\n },\n \"required\": true\n }\n },\n \"get\": {\n \"summary\": \"List Transfers\",\n \"tags\": [\n \"Transfers\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:transfer:read\"\n ]\n }\n ],\n \"description\": \"Lists ledger transfers for an account. You must specify an origin_id or a destination_id.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"origin_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to transfers sent from this account.\"\n },\n {\n \"name\": \"destination_id\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Filter to transfers received by this account.\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"created_at\",\n \"amount\"\n ]\n },\n \"description\": \"Sort column. Defaults to created_at.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ]\n },\n \"description\": \"Sort direction. Defaults to desc.\"\n },\n {\n \"name\": \"created_before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only transfers created strictly before this ISO 8601 timestamp.\"\n },\n {\n \"name\": \"created_after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Only transfers created strictly after this ISO 8601 timestamp.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"default\": 50,\n \"maximum\": 50\n },\n \"description\": \"Number of transfers to return from the start of the window.\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page after (from page_info.end_cursor).\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"integer\",\n \"maximum\": 50\n },\n \"description\": \"Number of transfers to return from the end of the window.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"Cursor to fetch the page before (from page_info.start_cursor).\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"transfers listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"title\": \"TransferListItem\",\n \"description\": \"A transfer of credit between two ledger accounts.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Transfer ID.\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"Transfer amount.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Transfer currency.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the transfer was created.\"\n },\n \"fee_amount\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Fee charged for the transfer.\"\n },\n \"notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Transfer note.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Custom metadata attached to the transfer.\"\n },\n \"origin_ledger_account_id\": {\n \"type\": \"string\",\n \"description\": \"Source ledger account ID.\"\n },\n \"destination_ledger_account_id\": {\n \"type\": \"string\",\n \"description\": \"Destination ledger account ID.\"\n }\n },\n \"required\": [\n \"id\",\n \"amount\",\n \"currency\",\n \"created_at\",\n \"origin_ledger_account_id\",\n \"destination_ledger_account_id\"\n ]\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"required\": [\n \"has_next_page\",\n \"has_previous_page\",\n \"start_cursor\",\n \"end_cursor\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"400\": {\n \"description\": \"neither origin_id nor destination_id given\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n }\n }\n },\n \"/transfers/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve Transfer\",\n \"tags\": [\n \"Transfers\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"payout:transfer:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a ledger transfer by ID.\",\n \"operationId\": \"get\",\n \"responses\": {\n \"200\": {\n \"description\": \"transfer retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"title\": \"Transfer\",\n \"description\": \"A transfer of credit between two ledger accounts.\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Transfer ID.\"\n },\n \"amount\": {\n \"type\": \"number\",\n \"description\": \"Transfer amount.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Transfer currency.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the transfer was created.\"\n },\n \"fee_amount\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Fee charged for the transfer.\"\n },\n \"notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Transfer note.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Custom metadata attached to the transfer.\"\n },\n \"origin_ledger_account_id\": {\n \"type\": \"string\",\n \"description\": \"Source ledger account ID.\"\n },\n \"destination_ledger_account_id\": {\n \"type\": \"string\",\n \"description\": \"Destination ledger account ID.\"\n },\n \"origin\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"title\": \"Company\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"Company\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account route.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account display name.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n },\n {\n \"type\": \"object\",\n \"title\": \"User\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"User\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User display name.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"User's username.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"typename\"\n },\n \"description\": \"Account or user sending funds.\"\n },\n \"destination\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"title\": \"Company\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"Company\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account route.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account display name.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n },\n {\n \"type\": \"object\",\n \"title\": \"User\",\n \"properties\": {\n \"typename\": {\n \"type\": \"string\",\n \"enum\": [\n \"User\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User display name.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"User's username.\"\n }\n },\n \"required\": [\n \"typename\",\n \"id\"\n ]\n }\n ],\n \"discriminator\": {\n \"propertyName\": \"typename\"\n },\n \"description\": \"Account or user receiving funds.\"\n }\n },\n \"required\": [\n \"id\",\n \"amount\",\n \"currency\",\n \"created_at\",\n \"origin_ledger_account_id\",\n \"destination_ledger_account_id\",\n \"origin\",\n \"destination\"\n ]\n }\n }\n }\n },\n \"404\": {\n \"description\": \"transfer not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The transfer ID.\"\n }\n ]\n }\n },\n \"/users\": {\n \"get\": {\n \"summary\": \"List Users\",\n \"tags\": [\n \"Users\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"dms:read\"\n ]\n }\n ],\n \"description\": \"Search for users by name or username, ranked by social proximity to the authenticated user. Returns the user's most recently followed users when no query is given.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"query\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A search term to filter users by name or username.\"\n },\n {\n \"name\": \"first\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of users to return (max 50).\"\n },\n {\n \"name\": \"after\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns users after this position.\"\n },\n {\n \"name\": \"last\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"integer\"\n },\n \"required\": false,\n \"description\": \"The number of users to return from the end of the range.\"\n },\n {\n \"name\": \"before\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"A cursor; returns users before this position.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"users listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/User\"\n }\n },\n \"page_info\": {\n \"type\": \"object\",\n \"properties\": {\n \"end_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"start_cursor\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"has_next_page\": {\n \"type\": \"boolean\"\n },\n \"has_previous_page\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"end_cursor\",\n \"start_cursor\",\n \"has_next_page\",\n \"has_previous_page\"\n ]\n }\n },\n \"required\": [\n \"data\",\n \"page_info\"\n ]\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n }\n }\n }\n },\n \"/users/me\": {\n \"patch\": {\n \"summary\": \"Update Current User\",\n \"tags\": [\n \"Users\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"user:profile:update\"\n ]\n }\n ],\n \"description\": \"Updates the authenticated user's global profile, or their profile override for an account when account_id is given. Not available to API keys.\",\n \"operationId\": \"me\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"When set, updates the authenticated user's profile override for this account instead of their global profile.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"current user updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/User\"\n }\n }\n }\n },\n \"400\": {\n \"description\": \"API keys cannot update a global profile\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"bio\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"profile_picture\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"direct_upload_id\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/users/{id}\": {\n \"get\": {\n \"summary\": \"Retrieve User\",\n \"tags\": [\n \"Users\"\n ],\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Retrieves a user's public profile by user_ tag, username, or 'me'.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"User ID (prefixed `user_`), username, or `me`.\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"When set, returns the user's account-specific profile overrides for this account.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"user retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/User\"\n }\n }\n }\n },\n \"404\": {\n \"description\": \"no user with that id\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n },\n \"patch\": {\n \"summary\": \"Update User\",\n \"tags\": [\n \"Users\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"user:profile:update\"\n ]\n }\n ],\n \"description\": \"Updates a user. A user token updates their own global profile; an API key updates the user's account-specific profile override (account_id required).\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"User ID (prefixed `user_`), username, or `me`.\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": false,\n \"description\": \"The account whose profile override to update. Required for API key callers.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"user updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/User\"\n }\n }\n }\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"bio\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"profile_picture\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"direct_upload_id\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n }\n },\n \"/users/{id}/access/{resource_id}\": {\n \"get\": {\n \"summary\": \"Check User Access\",\n \"tags\": [\n \"Users\"\n ],\n \"security\": [\n {\n \"bearerAuth\": []\n }\n ],\n \"description\": \"Checks whether a user has access to an account, product, or experience the caller can reach.\",\n \"operationId\": \"access\",\n \"responses\": {\n \"200\": {\n \"description\": \"access checked\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"has_access\": {\n \"type\": \"boolean\"\n },\n \"access_level\": {\n \"type\": \"string\",\n \"enum\": [\n \"no_access\",\n \"admin\",\n \"customer\"\n ]\n }\n },\n \"required\": [\n \"has_access\",\n \"access_level\"\n ]\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The user_ tag or username to check access for.\"\n },\n {\n \"name\": \"resource_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"An account (biz_), product (prod_), or experience (exp_) ID.\"\n }\n ]\n }\n },\n \"/verifications\": {\n \"post\": {\n \"summary\": \"Create Verification\",\n \"tags\": [\n \"Verifications\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"identity:write\"\n ]\n }\n ],\n \"description\": \"Creates or resumes a verification session for an account.\",\n \"operationId\": \"create\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"schema\": {\n \"type\": \"string\"\n },\n \"required\": true,\n \"description\": \"The account ID to verify (biz_ tag).\"\n }\n ],\n \"responses\": {\n \"201\": {\n \"description\": \"verification created\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The verification ID, e.g. idpf_*\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"individual\",\n \"business\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"not_started\",\n \"pending\",\n \"approved\",\n \"rejected\",\n \"action_required\"\n ]\n },\n \"first_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"last_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"date_of_birth\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_structure\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"country\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"ISO 3166-1 alpha-2 country code (e.g. `US`, `GB`). For individuals this is the country of citizenship or residence reported by the identity provider; for businesses this is the country of incorporation.\"\n },\n \"address\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"session_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"requested_information\": {\n \"type\": \"array\",\n \"description\": \"The outstanding information this verification still needs — payout RFIs and audit RMIs, one uniform shape.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The requested information item id (inrqi_*). Use this when answering.\"\n },\n \"field\": {\n \"type\": \"string\",\n \"description\": \"Stable snake_case key for the field (e.g. ssn, business_description).\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"How to render the input: text, date, phone, address, files, or select.\"\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Human-readable label for the field (e.g. \\\"Social Security Number\\\").\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Additional guidance for the field beyond the label.\"\n },\n \"requested_files\": {\n \"type\": \"array\",\n \"description\": \"Upload slots for a files item — always at least one when type is `files`, empty otherwise.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Label for this upload slot (e.g. \\\"Front of ID Document\\\").\"\n },\n \"category\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Identifier to send back with the uploaded file so it routes correctly; null for a generic upload.\"\n },\n \"kind\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Provider-specific document kind, when applicable.\"\n },\n \"is_optional\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot can be left empty.\"\n },\n \"multiple\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot accepts more than one file.\"\n }\n }\n }\n },\n \"options\": {\n \"type\": \"array\",\n \"description\": \"Allowed values for a `select` field (e.g. account_type, business_structure) — the submitted value must be one of these; empty for other types.\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"error_message\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The reason a previously submitted value was rejected, or null.\"\n }\n }\n }\n },\n \"created_at\": {\n \"type\": \"string\"\n },\n \"updated_at\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n },\n \"400\": {\n \"description\": \"missing account_id\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required identity-write scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"account not found\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"individual\",\n \"business\"\n ],\n \"description\": \"The verification type. Defaults to individual.\"\n },\n \"restart\": {\n \"type\": \"boolean\",\n \"description\": \"Whether to restart an in-flight verification.\"\n },\n \"tax_identification_number\": {\n \"type\": \"string\",\n \"description\": \"Optional. Tax identification number — SSN for individuals, EIN for businesses. Tokenized in transit, never stored raw; stored on the profile so the payout account, provisioned on approval, doesn't raise a tax-id RFI.\"\n },\n \"first_name\": {\n \"type\": \"string\",\n \"description\": \"Optional pre-fill claim. Seeds the Sumsub session; attested values come from Sumsub on approval.\"\n },\n \"last_name\": {\n \"type\": \"string\",\n \"description\": \"Optional pre-fill claim. Seeds the Sumsub session; attested values come from Sumsub on approval.\"\n },\n \"date_of_birth\": {\n \"type\": \"string\",\n \"description\": \"Optional pre-fill claim. Seeds the Sumsub session; attested values come from Sumsub on approval.\"\n },\n \"business_name\": {\n \"type\": \"string\",\n \"description\": \"Optional pre-fill claim for businesses.\"\n },\n \"business_structure\": {\n \"type\": \"string\",\n \"description\": \"Optional. Business structure (e.g. llc, corporation).\"\n },\n \"place_of_incorporation\": {\n \"type\": \"string\",\n \"description\": \"Optional. Place of incorporation (state/region); maps to the business address state.\"\n },\n \"business_website\": {\n \"type\": \"string\",\n \"description\": \"Optional. Business website URL. Accepted for both individual and business verifications on company accounts; persisted to the account's metadata and used to provision the payout account on approval. Whop store pages are rejected.\"\n },\n \"phone\": {\n \"type\": \"string\",\n \"description\": \"Optional pre-fill claim — phone number.\"\n },\n \"country\": {\n \"type\": \"string\",\n \"description\": \"Optional pre-fill claim. Country code; for businesses, the country of incorporation.\"\n },\n \"address\": {\n \"type\": \"object\",\n \"description\": \"Optional pre-fill claim. Address (line1, city, state, postal_code).\",\n \"additionalProperties\": true\n }\n }\n }\n }\n }\n }\n },\n \"get\": {\n \"summary\": \"List Verifications for Account\",\n \"tags\": [\n \"Verifications\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"identity:read\"\n ]\n }\n ],\n \"description\": \"Lists identity verification profiles for an account.\",\n \"operationId\": \"list\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"account_id\",\n \"in\": \"query\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The account ID to list verifications for (biz_ tag).\"\n },\n {\n \"name\": \"order\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"updated_at\",\n \"created_at\"\n ],\n \"default\": \"updated_at\"\n },\n \"description\": \"The field to sort verifications by.\"\n },\n {\n \"name\": \"direction\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"enum\": [\n \"asc\",\n \"desc\"\n ],\n \"default\": \"desc\"\n },\n \"description\": \"Sort direction.\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"verifications listed\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"data\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The verification ID, e.g. idpf_*\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"individual\",\n \"business\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"not_started\",\n \"pending\",\n \"approved\",\n \"rejected\",\n \"action_required\"\n ]\n },\n \"first_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"last_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"date_of_birth\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_structure\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"country\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"ISO 3166-1 alpha-2 country code (e.g. `US`, `GB`). For individuals this is the country of citizenship or residence reported by the identity provider; for businesses this is the country of incorporation.\"\n },\n \"address\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"session_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"requested_information\": {\n \"type\": \"array\",\n \"description\": \"The outstanding information this verification still needs — payout RFIs and audit RMIs, one uniform shape.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The requested information item id (inrqi_*). Use this when answering.\"\n },\n \"field\": {\n \"type\": \"string\",\n \"description\": \"Stable snake_case key for the field (e.g. ssn, business_description).\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"How to render the input: text, date, phone, address, files, or select.\"\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Human-readable label for the field (e.g. \\\"Social Security Number\\\").\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Additional guidance for the field beyond the label.\"\n },\n \"requested_files\": {\n \"type\": \"array\",\n \"description\": \"Upload slots for a files item — always at least one when type is `files`, empty otherwise.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Label for this upload slot (e.g. \\\"Front of ID Document\\\").\"\n },\n \"category\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Identifier to send back with the uploaded file so it routes correctly; null for a generic upload.\"\n },\n \"kind\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Provider-specific document kind, when applicable.\"\n },\n \"is_optional\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot can be left empty.\"\n },\n \"multiple\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot accepts more than one file.\"\n }\n }\n }\n },\n \"options\": {\n \"type\": \"array\",\n \"description\": \"Allowed values for a `select` field (e.g. account_type, business_structure) — the submitted value must be one of these; empty for other types.\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"error_message\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The reason a previously submitted value was rejected, or null.\"\n }\n }\n }\n },\n \"created_at\": {\n \"type\": \"string\"\n },\n \"updated_at\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n }\n }\n },\n \"400\": {\n \"description\": \"missing account_id\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required identity-read scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n }\n }\n }\n },\n \"/verifications/{verification_id}\": {\n \"get\": {\n \"summary\": \"Retrieve Verification\",\n \"tags\": [\n \"Verifications\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"identity:read\"\n ]\n }\n ],\n \"description\": \"Retrieves a single identity verification profile by its idpf_ tag.\",\n \"operationId\": \"get\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"verification_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ID of the verification, which will look like idpf_*************\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"verification retrieved\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The verification ID, e.g. idpf_*\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"individual\",\n \"business\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"not_started\",\n \"pending\",\n \"approved\",\n \"rejected\",\n \"action_required\"\n ]\n },\n \"first_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"last_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"date_of_birth\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_structure\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"country\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"ISO 3166-1 alpha-2 country code (e.g. `US`, `GB`). For individuals this is the country of citizenship or residence reported by the identity provider; for businesses this is the country of incorporation.\"\n },\n \"address\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"session_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"requested_information\": {\n \"type\": \"array\",\n \"description\": \"The outstanding information this verification still needs — payout RFIs and audit RMIs, one uniform shape.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The requested information item id (inrqi_*). Use this when answering.\"\n },\n \"field\": {\n \"type\": \"string\",\n \"description\": \"Stable snake_case key for the field (e.g. ssn, business_description).\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"How to render the input: text, date, phone, address, files, or select.\"\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Human-readable label for the field (e.g. \\\"Social Security Number\\\").\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Additional guidance for the field beyond the label.\"\n },\n \"requested_files\": {\n \"type\": \"array\",\n \"description\": \"Upload slots for a files item — always at least one when type is `files`, empty otherwise.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Label for this upload slot (e.g. \\\"Front of ID Document\\\").\"\n },\n \"category\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Identifier to send back with the uploaded file so it routes correctly; null for a generic upload.\"\n },\n \"kind\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Provider-specific document kind, when applicable.\"\n },\n \"is_optional\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot can be left empty.\"\n },\n \"multiple\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot accepts more than one file.\"\n }\n }\n }\n },\n \"options\": {\n \"type\": \"array\",\n \"description\": \"Allowed values for a `select` field (e.g. account_type, business_structure) — the submitted value must be one of these; empty for other types.\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"error_message\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The reason a previously submitted value was rejected, or null.\"\n }\n }\n }\n },\n \"created_at\": {\n \"type\": \"string\"\n },\n \"updated_at\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"404\": {\n \"description\": \"no verification with that ID is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n },\n \"patch\": {\n \"summary\": \"Update Verification\",\n \"tags\": [\n \"Verifications\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"identity:write\"\n ]\n }\n ],\n \"description\": \"Updates fields on an identity verification profile, or responds to outstanding RFIs.\",\n \"operationId\": \"update\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"verification_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ID of the verification, which will look like idpf_*************\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"verification updated\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The verification ID, e.g. idpf_*\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"enum\": [\n \"individual\",\n \"business\"\n ]\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"not_started\",\n \"pending\",\n \"approved\",\n \"rejected\",\n \"action_required\"\n ]\n },\n \"first_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"last_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"date_of_birth\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"business_structure\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"country\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"ISO 3166-1 alpha-2 country code (e.g. `US`, `GB`). For individuals this is the country of citizenship or residence reported by the identity provider; for businesses this is the country of incorporation.\"\n },\n \"address\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"session_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"requested_information\": {\n \"type\": \"array\",\n \"description\": \"The outstanding information this verification still needs — payout RFIs and audit RMIs, one uniform shape.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The requested information item id (inrqi_*). Use this when answering.\"\n },\n \"field\": {\n \"type\": \"string\",\n \"description\": \"Stable snake_case key for the field (e.g. ssn, business_description).\"\n },\n \"type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"How to render the input: text, date, phone, address, files, or select.\"\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Human-readable label for the field (e.g. \\\"Social Security Number\\\").\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Additional guidance for the field beyond the label.\"\n },\n \"requested_files\": {\n \"type\": \"array\",\n \"description\": \"Upload slots for a files item — always at least one when type is `files`, empty otherwise.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\",\n \"description\": \"Label for this upload slot (e.g. \\\"Front of ID Document\\\").\"\n },\n \"category\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Identifier to send back with the uploaded file so it routes correctly; null for a generic upload.\"\n },\n \"kind\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Provider-specific document kind, when applicable.\"\n },\n \"is_optional\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot can be left empty.\"\n },\n \"multiple\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this slot accepts more than one file.\"\n }\n }\n }\n },\n \"options\": {\n \"type\": \"array\",\n \"description\": \"Allowed values for a `select` field (e.g. account_type, business_structure) — the submitted value must be one of these; empty for other types.\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"error_message\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The reason a previously submitted value was rejected, or null.\"\n }\n }\n }\n },\n \"created_at\": {\n \"type\": \"string\"\n },\n \"updated_at\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n },\n \"400\": {\n \"description\": \"the request body has unsupported fields\",\n \"$ref\": \"#/components/responses/InvalidParameters\"\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required identity-write scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no verification with that ID is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n },\n \"requestBody\": {\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"first_name\": {\n \"type\": \"string\",\n \"description\": \"The first name on the verification.\"\n },\n \"last_name\": {\n \"type\": \"string\",\n \"description\": \"The last name on the verification.\"\n },\n \"date_of_birth\": {\n \"type\": \"string\",\n \"description\": \"The date of birth.\"\n },\n \"country\": {\n \"type\": \"string\",\n \"description\": \"The country code.\"\n },\n \"personal_address\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"The personal address.\"\n },\n \"business_name\": {\n \"type\": \"string\",\n \"description\": \"The business name.\"\n },\n \"business_address\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"The business address.\"\n },\n \"business_structure\": {\n \"type\": \"string\",\n \"description\": \"The business structure.\"\n },\n \"requested_information\": {\n \"type\": \"array\",\n \"description\": \"Answers to requested information. Each entry must include id and a value, address, or files payload.\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The requested information item id (inrqi_*).\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"The value for text/date/phone items.\"\n },\n \"value_type\": {\n \"type\": \"string\",\n \"enum\": [\n \"raw\",\n \"vault_token\"\n ],\n \"description\": \"Defaults to the field's configured type.\"\n },\n \"address\": {\n \"type\": \"object\",\n \"additionalProperties\": true,\n \"description\": \"Address payload for address items.\"\n },\n \"files\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n },\n \"description\": \"File upload payload for document items.\"\n }\n },\n \"required\": [\n \"id\"\n ]\n }\n }\n }\n }\n }\n },\n \"required\": true\n }\n },\n \"delete\": {\n \"summary\": \"Delete Verification\",\n \"tags\": [\n \"Verifications\"\n ],\n \"security\": [\n {\n \"bearerAuth\": [\n \"identity:write\"\n ]\n }\n ],\n \"description\": \"Unlinks a verification from the caller's accounts.\",\n \"operationId\": \"delete\",\n \"parameters\": [\n {\n \"$ref\": \"#/components/parameters/ApiVersionDate\"\n },\n {\n \"name\": \"verification_id\",\n \"in\": \"path\",\n \"required\": true,\n \"schema\": {\n \"type\": \"string\"\n },\n \"description\": \"The ID of the verification, which will look like idpf_*************\"\n }\n ],\n \"responses\": {\n \"200\": {\n \"description\": \"verification deleted\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"deleted\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n }\n },\n \"401\": {\n \"description\": \"missing or invalid authentication\",\n \"$ref\": \"#/components/responses/Unauthorized\"\n },\n \"403\": {\n \"description\": \"credential lacks the required identity-write scope\",\n \"$ref\": \"#/components/responses/Forbidden\"\n },\n \"404\": {\n \"description\": \"no verification with that ID is visible to the credential\",\n \"$ref\": \"#/components/responses/NotFound\"\n }\n }\n }\n }\n },\n \"components\": {\n \"securitySchemes\": {\n \"bearerAuth\": {\n \"type\": \"http\",\n \"scheme\": \"bearer\",\n \"bearerFormat\": \"auth-scheme\",\n \"description\": \"An account API key, account scoped JWT, app API key, or user OAuth token.\"\n }\n },\n \"schemas\": {\n \"AccountBalanceToken\": {\n \"type\": \"object\",\n \"properties\": {\n \"symbol\": {\n \"type\": \"string\",\n \"description\": \"Holding display symbol, such as `USDT`, `cbBTC`, or `EUR`.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The holding's display name\"\n },\n \"balance\": {\n \"type\": \"string\",\n \"description\": \"Total amount held in native units, as a decimal string.\"\n },\n \"value_usd\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Holding USD value, or `null` when no exchange rate is available.\"\n },\n \"price_usd\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"USD price per unit, or `null` when no exchange rate is available.\"\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Holding icon URL.\"\n },\n \"breakdown\": {\n \"type\": \"object\",\n \"description\": \"Balance split into available, pending, and reserve amounts, as native-unit decimal strings. On-chain crypto is entirely available; good_funds and fiat cash can have pending or reserve portions.\"\n }\n },\n \"required\": [\n \"symbol\",\n \"name\",\n \"balance\",\n \"value_usd\",\n \"price_usd\",\n \"icon_url\",\n \"breakdown\"\n ]\n },\n \"AccountCapabilities\": {\n \"type\": \"object\",\n \"properties\": {\n \"accept_card_payments\": {\n \"type\": \"string\",\n \"description\": \"Card payins, including Apple Pay and Google Pay\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"accept_bank_payments\": {\n \"type\": \"string\",\n \"description\": \"Bank payins: debits, transfers, and local bank rails\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"accept_bnpl_payments\": {\n \"type\": \"string\",\n \"description\": \"Buy-now-pay-later payins; requires approval\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"standard_payout\": {\n \"type\": \"string\",\n \"description\": \"Standard payouts to an external payout destination\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"instant_payout\": {\n \"type\": \"string\",\n \"description\": \"Instant payouts to an eligible payout destination\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"crypto_payout\": {\n \"type\": \"string\",\n \"description\": \"On-chain payouts to a crypto wallet\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"transfer\": {\n \"type\": \"string\",\n \"description\": \"Transfers to other accounts\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"bank_deposit\": {\n \"type\": \"string\",\n \"description\": \"Deposits by bank wire or ACH to the account's virtual bank account\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"crypto_deposit\": {\n \"type\": \"string\",\n \"description\": \"On-chain deposits to the account's crypto wallet\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"card_deposit\": {\n \"type\": \"string\",\n \"description\": \"Balance top-ups by charging a stored payment method\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n },\n \"card_issuing\": {\n \"type\": \"string\",\n \"description\": \"Issuing Whop cards; requires card application approval\",\n \"enum\": [\n \"active\",\n \"inactive\",\n \"pending\"\n ],\n \"example\": \"active\"\n }\n },\n \"required\": [\n \"accept_card_payments\",\n \"accept_bank_payments\",\n \"accept_bnpl_payments\",\n \"standard_payout\",\n \"instant_payout\",\n \"crypto_payout\",\n \"transfer\",\n \"bank_deposit\",\n \"crypto_deposit\",\n \"card_deposit\",\n \"card_issuing\"\n ]\n },\n \"AccountRecommendedAction\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"The recommendation; new values may be added, so handle unknown actions gracefully\",\n \"enum\": [\n \"apply_for_financing\",\n \"migrate_from_stripe\",\n \"accept_first_payment\",\n \"join_whop_university\"\n ],\n \"example\": \"apply_for_financing\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Always optional — never blocking\",\n \"enum\": [\n \"optional\"\n ],\n \"example\": \"optional\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Headline for the recommendation\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Supporting copy, or empty\"\n },\n \"cta_label\": {\n \"type\": \"string\",\n \"description\": \"Button label\"\n },\n \"cta\": {\n \"type\": \"string\",\n \"description\": \"The URL the call-to-action links to\"\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Illustration icon URL, or `null`\"\n },\n \"blocked_capabilities\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"Capabilities this would unlock, or empty\"\n }\n }\n },\n \"required\": [\n \"action\",\n \"status\",\n \"title\",\n \"description\",\n \"cta_label\",\n \"cta\",\n \"icon_url\",\n \"blocked_capabilities\"\n ]\n },\n \"AccountRequiredAction\": {\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\",\n \"description\": \"What the holder must do; new values may be added, so handle unknown actions gracefully\",\n \"enum\": [\n \"deposit_funds\",\n \"submit_information_request\",\n \"verify_identity\",\n \"connect_fulfillment_tracker\"\n ],\n \"example\": \"deposit_funds\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"required (act now) or pending (under review)\",\n \"enum\": [\n \"required\",\n \"pending\"\n ],\n \"example\": \"required\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Headline for the action\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Supporting copy, or empty\"\n },\n \"cta_label\": {\n \"type\": \"string\",\n \"description\": \"Button label, or empty when there is no button\"\n },\n \"cta\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL the call-to-action links to, or null when there is no button\"\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL of the action's illustration icon, or null if it has none\"\n },\n \"blocked_capabilities\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"Capabilities gated until this is resolved\"\n }\n }\n },\n \"required\": [\n \"action\",\n \"status\",\n \"title\",\n \"description\",\n \"cta_label\",\n \"cta\",\n \"icon_url\",\n \"blocked_capabilities\"\n ]\n },\n \"Account\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID, prefixed `biz_`.\"\n },\n \"email\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account owner email address.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Account display name.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account promotional description.\"\n },\n \"route\": {\n \"type\": \"string\",\n \"description\": \"Account public route identifier.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account logo image URL.\"\n },\n \"banner_image_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account banner image URL.\"\n },\n \"business_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"High-level business category for the account.\"\n },\n \"country\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Country where the account is located.\"\n },\n \"home_preferences\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"Public account home page preferences.\"\n }\n },\n \"industry_group\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account industry group.\"\n },\n \"industry_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Specific industry vertical for the account.\"\n },\n \"invoice_prefix\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Prefix used for account invoices.\"\n },\n \"onboarding_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Type of onboarding the account has completed.\"\n },\n \"opengraph_image_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account Open Graph image URL.\"\n },\n \"opengraph_image_variant\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account Open Graph image variant.\"\n },\n \"other_business_description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Business type details when business_type is `other`.\"\n },\n \"other_industry_description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Industry details when industry_type is `other`.\"\n },\n \"require_2fa\": {\n \"type\": \"boolean\",\n \"description\": \"Whether authorized users must enable two-factor authentication.\"\n },\n \"target_audience\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Target audience for this account.\"\n },\n \"send_customer_emails\": {\n \"type\": \"boolean\",\n \"description\": \"Whether Whop sends transactional emails to customers on behalf of this account.\"\n },\n \"show_joined_whops\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account appears in joined whops on other accounts.\"\n },\n \"show_reviews_dtc\": {\n \"type\": \"boolean\",\n \"description\": \"Whether reviews are displayed on direct-to-consumer product pages.\"\n },\n \"show_user_directory\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account shows users in the user directory.\"\n },\n \"store_page_config\": {\n \"type\": \"object\",\n \"description\": \"Account store page display configuration.\"\n },\n \"parent_account_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Parent account ID for connected accounts.\"\n },\n \"metadata\": {\n \"type\": \"object\",\n \"description\": \"Arbitrary key/value metadata supplied at account creation.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the account was created, as an ISO 8601 timestamp.\"\n },\n \"use_logo_as_opengraph_image_fallback\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the account uses its logo as the fallback Open Graph image.\"\n },\n \"total_earned_usd\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Account lifetime sales, normalized to USD. Computed only on `retrieve` and `me` for callers with `stats:read` scope; `null` otherwise.\"\n },\n \"status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Whether the account can operate on Whop: `active` or `suspended`. Computed only on `retrieve` and `me`; `null` otherwise.\"\n },\n \"capabilities\": {\n \"description\": \"Payment rails enabled for this account, each `active`, `inactive`, or `pending` (onboarding or review in progress). Computed only on `retrieve` and `me` for callers with `company:balance:read` scope; `null` otherwise.\",\n \"oneOf\": [\n {\n \"$ref\": \"#/components/schemas/AccountCapabilities\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"required_actions\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountRequiredAction\",\n \"description\": \"Actions the account owner must take to unblock capabilities like payouts and card spend, ordered by display priority. Computed only on `retrieve` and `me` for callers with `company:balance:read` scope; `null` otherwise.\"\n }\n },\n \"recommended_actions\": {\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountRecommendedAction\",\n \"description\": \"Optional actions that unlock capabilities or grow the account, same shape as `required_actions`. Computed only on `retrieve` and `me`; `null` otherwise.\"\n }\n },\n \"tax_remitted_by\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Who calculates and remits tax for the account: `whop` (Whop calculates and remits), `self` (Whop calculates; the account collects and remits), or `none` (neither; the account is responsible). `null` until the account enrolls in the Whop tax service.\"\n },\n \"product_tax_code\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Tax classification code applied by default to the account's products, with `id`, `name`, and `product_type`. `null` when no default is set.\"\n },\n \"business_address\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Account business address used to calculate tax, with `line1`, `line2`, `city`, `state`, `postal_code`, and `country`. `null` when no address is set.\"\n },\n \"tax_identifiers\": {\n \"type\": \"array\",\n \"description\": \"Account tax/VAT registrations, each with `id`, `tax_id_type`, and `tax_id_value`. Empty when none are set.\"\n },\n \"total_usd\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Total USD value across balances with known exchange rates. Computed only on single-account reads (`retrieve` and `me`); `null` on list responses, writes, missing balance-read permission, or unavailable balance source.\"\n },\n \"balances\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountBalanceToken\",\n \"description\": \"Account holdings, each with USD value. Empty when `total_usd` is `null`.\"\n }\n },\n \"verification\": {\n \"type\": \"object\",\n \"description\": \"Account identity verification status for the `individual` (KYC) and `business` (KYB) profiles. Each is `null` until created, otherwise a `status` of `not_started`, `pending`, `approved`, or `rejected`.\"\n },\n \"wallet\": {\n \"description\": \"Account primary crypto wallet, or `null` if none has been provisioned.\",\n \"oneOf\": [\n {\n \"$ref\": \"#/components/schemas/AccountWallet\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"social_links\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountSocialLink\",\n \"description\": \"Account social links.\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"email\",\n \"title\",\n \"description\",\n \"route\",\n \"logo_url\",\n \"banner_image_url\",\n \"business_type\",\n \"country\",\n \"home_preferences\",\n \"industry_group\",\n \"industry_type\",\n \"invoice_prefix\",\n \"onboarding_type\",\n \"opengraph_image_url\",\n \"opengraph_image_variant\",\n \"other_business_description\",\n \"other_industry_description\",\n \"require_2fa\",\n \"target_audience\",\n \"send_customer_emails\",\n \"show_joined_whops\",\n \"show_reviews_dtc\",\n \"show_user_directory\",\n \"store_page_config\",\n \"parent_account_id\",\n \"metadata\",\n \"created_at\",\n \"use_logo_as_opengraph_image_fallback\",\n \"total_earned_usd\",\n \"status\",\n \"capabilities\",\n \"required_actions\",\n \"recommended_actions\",\n \"tax_remitted_by\",\n \"product_tax_code\",\n \"business_address\",\n \"tax_identifiers\",\n \"total_usd\",\n \"balances\",\n \"verification\",\n \"wallet\",\n \"social_links\"\n ]\n },\n \"AccountSocialLink\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the social link\"\n },\n \"website\": {\n \"type\": \"string\",\n \"description\": \"The social platform for this link\",\n \"enum\": [\n \"x\",\n \"instagram\",\n \"facebook\",\n \"tiktok\",\n \"youtube\",\n \"linkedin\",\n \"twitch\",\n \"website\",\n \"custom\"\n ],\n \"example\": \"x\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The social link URL\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The optional display title for the social link\"\n }\n },\n \"required\": [\n \"id\",\n \"website\",\n \"url\",\n \"title\"\n ]\n },\n \"AccountWallet\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Wallet ID, prefixed `wallet_`.\"\n },\n \"address\": {\n \"type\": \"string\",\n \"description\": \"The on-chain address of the wallet\"\n },\n \"network\": {\n \"type\": \"string\",\n \"description\": \"The blockchain network the wallet lives on\",\n \"enum\": [\n \"solana\",\n \"ethereum\",\n \"bitcoin\"\n ],\n \"example\": \"solana\"\n }\n },\n \"required\": [\n \"id\",\n \"address\",\n \"network\"\n ]\n },\n \"AdCampaign\": {\n \"type\": \"object\",\n \"properties\": {\n \"click_through_rate\": {\n \"type\": \"number\",\n \"description\": \"Clicks divided by impressions, between 0 and 1.\"\n },\n \"clicks\": {\n \"type\": \"number\",\n \"description\": \"The number of clicks.\"\n },\n \"cost_per_click\": {\n \"type\": \"number\",\n \"description\": \"Spend divided by clicks; 0 when there are no clicks.\"\n },\n \"cost_per_lead\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed leads; null when leads are not a goal and none are attributed.\"\n },\n \"cost_per_mille\": {\n \"type\": \"number\",\n \"description\": \"Spend per 1,000 impressions; 0 when there are no impressions.\"\n },\n \"cost_per_purchase\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed purchases; null when purchases are not a goal and none are attributed.\"\n },\n \"cost_per_schedule\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed.\"\n },\n \"cost_per_submitted_application\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed submit-application events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_contact\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed contact events; null when contacts are not the goal and none are attributed.\"\n },\n \"cost_per_completed_registration\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_viewed_content\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed view-content events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_added_to_cart\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed.\"\n },\n \"frequency\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Platform-reported impressions divided by reach.\"\n },\n \"impressions\": {\n \"type\": \"number\",\n \"description\": \"The number of impressions.\"\n },\n \"leads\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed leads, last-click.\"\n },\n \"purchase_value\": {\n \"type\": \"number\",\n \"description\": \"USD value of pixel-attributed purchases.\"\n },\n \"purchases\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed purchases, last-click.\"\n },\n \"reach\": {\n \"type\": \"number\",\n \"description\": \"The number of unique people who saw this.\"\n },\n \"return_on_ad_spend\": {\n \"type\": \"number\",\n \"description\": \"Purchase value divided by spend; 0 when there is no spend.\"\n },\n \"spend\": {\n \"type\": \"number\",\n \"description\": \"The amount charged, in spend_currency.\"\n },\n \"spend_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ISO 4217 currency code of all monetary metrics.\"\n },\n \"unique_click_through_rate\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Unique clicks divided by impressions, between 0 and 1.\"\n },\n \"unique_clicks\": {\n \"type\": \"number\",\n \"description\": \"The number of unique clicks.\"\n },\n \"schedules\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed schedule events, last-click.\"\n },\n \"submitted_applications\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed submit-application events, last-click.\"\n },\n \"contacts\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed contact events, last-click.\"\n },\n \"completed_registrations\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed complete-registration events, last-click.\"\n },\n \"viewed_contents\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed view-content events, last-click.\"\n },\n \"added_to_carts\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed add-to-cart events, last-click.\"\n },\n \"custom_conversions\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.\"\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the ad campaign.\"\n },\n \"title\": {\n \"type\": \"string\",\n \"description\": \"The title of the ad campaign.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"The lifecycle status of the ad campaign.\",\n \"enum\": [\n \"draft\",\n \"active\",\n \"paused\",\n \"payment_failed\"\n ],\n \"example\": \"draft\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"description\": \"The ad network the campaign runs on.\",\n \"enum\": [\n \"meta\"\n ],\n \"example\": \"meta\"\n },\n \"objective\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The goal the campaign optimizes toward.\",\n \"enum\": [\n \"awareness\",\n \"traffic\",\n \"engagement\",\n \"leads\",\n \"sales\",\n null\n ],\n \"example\": \"awareness\"\n },\n \"special_ad_categories\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"Regulated categories the campaign is declared under. Ads in these categories are subject to extra targeting restrictions. Empty when none apply.\",\n \"enum\": [\n \"housing\",\n \"employment\",\n \"financial_products\",\n \"politics\"\n ],\n \"example\": \"housing\"\n }\n },\n \"optimization_goal\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The specific event the campaign optimizes for. If the campaign is CBO, then all ad groups will have the same optimization goal, which will be returned here.\"\n },\n \"budget_amount\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"The campaign budget in USD. Null when budget is set at the ad group level (ABO).\"\n },\n \"budget_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Whether the budget is spent per day or over the campaign's lifetime.\",\n \"enum\": [\n \"daily\",\n \"lifetime\",\n null\n ],\n \"example\": \"daily\"\n },\n \"budget_optimization\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Which level owns the budget — the campaign (CBO) or each ad group (ABO).\",\n \"enum\": [\n \"ad_campaign\",\n \"ad_group\",\n null\n ],\n \"example\": \"ad_campaign\"\n },\n \"bid_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The bidding strategy the campaign uses.\",\n \"enum\": [\n \"minimum_cost\",\n \"average_target\",\n \"maximum_target\",\n null\n ],\n \"example\": \"minimum_cost\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the campaign was created, as an ISO 8601 timestamp.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the campaign was last updated, as an ISO 8601 timestamp.\"\n },\n \"cost_per_result\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by Whop pixel-attributed results; null when nothing Whop-attributable is being optimized for.\"\n },\n \"issues\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AdPlatformIssue\",\n \"description\": \"Open issues affecting the campaign and its descendant ad groups and ads.\"\n }\n }\n },\n \"required\": [\n \"click_through_rate\",\n \"clicks\",\n \"cost_per_click\",\n \"cost_per_lead\",\n \"cost_per_mille\",\n \"cost_per_purchase\",\n \"cost_per_schedule\",\n \"cost_per_submitted_application\",\n \"cost_per_contact\",\n \"cost_per_completed_registration\",\n \"cost_per_viewed_content\",\n \"cost_per_added_to_cart\",\n \"frequency\",\n \"impressions\",\n \"leads\",\n \"purchase_value\",\n \"purchases\",\n \"reach\",\n \"return_on_ad_spend\",\n \"spend\",\n \"spend_currency\",\n \"unique_click_through_rate\",\n \"unique_clicks\",\n \"schedules\",\n \"submitted_applications\",\n \"contacts\",\n \"completed_registrations\",\n \"viewed_contents\",\n \"added_to_carts\",\n \"custom_conversions\",\n \"id\",\n \"title\",\n \"status\",\n \"platform\",\n \"objective\",\n \"special_ad_categories\",\n \"optimization_goal\",\n \"budget_amount\",\n \"budget_type\",\n \"budget_optimization\",\n \"bid_type\",\n \"created_at\",\n \"updated_at\",\n \"cost_per_result\",\n \"issues\"\n ]\n },\n \"AdGroup\": {\n \"type\": \"object\",\n \"properties\": {\n \"click_through_rate\": {\n \"type\": \"number\",\n \"description\": \"Clicks divided by impressions, between 0 and 1.\"\n },\n \"clicks\": {\n \"type\": \"number\",\n \"description\": \"The number of clicks.\"\n },\n \"cost_per_click\": {\n \"type\": \"number\",\n \"description\": \"Spend divided by clicks; 0 when there are no clicks.\"\n },\n \"cost_per_lead\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed leads; null when leads are not a goal and none are attributed.\"\n },\n \"cost_per_mille\": {\n \"type\": \"number\",\n \"description\": \"Spend per 1,000 impressions; 0 when there are no impressions.\"\n },\n \"cost_per_purchase\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed purchases; null when purchases are not a goal and none are attributed.\"\n },\n \"cost_per_schedule\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed.\"\n },\n \"cost_per_submitted_application\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed submit-application events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_contact\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed contact events; null when contacts are not the goal and none are attributed.\"\n },\n \"cost_per_completed_registration\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_viewed_content\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed view-content events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_added_to_cart\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed.\"\n },\n \"frequency\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Platform-reported impressions divided by reach.\"\n },\n \"impressions\": {\n \"type\": \"number\",\n \"description\": \"The number of impressions.\"\n },\n \"leads\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed leads, last-click.\"\n },\n \"purchase_value\": {\n \"type\": \"number\",\n \"description\": \"USD value of pixel-attributed purchases.\"\n },\n \"purchases\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed purchases, last-click.\"\n },\n \"reach\": {\n \"type\": \"number\",\n \"description\": \"The number of unique people who saw this.\"\n },\n \"return_on_ad_spend\": {\n \"type\": \"number\",\n \"description\": \"Purchase value divided by spend; 0 when there is no spend.\"\n },\n \"spend\": {\n \"type\": \"number\",\n \"description\": \"The amount charged, in spend_currency.\"\n },\n \"spend_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ISO 4217 currency code of all monetary metrics.\"\n },\n \"unique_click_through_rate\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Unique clicks divided by impressions, between 0 and 1.\"\n },\n \"unique_clicks\": {\n \"type\": \"number\",\n \"description\": \"The number of unique clicks.\"\n },\n \"schedules\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed schedule events, last-click.\"\n },\n \"submitted_applications\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed submit-application events, last-click.\"\n },\n \"contacts\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed contact events, last-click.\"\n },\n \"completed_registrations\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed complete-registration events, last-click.\"\n },\n \"viewed_contents\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed view-content events, last-click.\"\n },\n \"added_to_carts\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed add-to-cart events, last-click.\"\n },\n \"custom_conversions\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.\"\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the ad group.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display title of the ad group.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Delivery status of the ad group.\",\n \"enum\": [\n \"active\",\n \"paused\",\n \"rejected\"\n ],\n \"example\": \"active\"\n },\n \"optimization_goal\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"What the ad group optimizes for.\"\n },\n \"conversion_location\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Where results happen: website, profile (IG/FB), messaging (DM), on_ad (engagement), or the lead destinations (instant_forms, instant_forms_and_messenger, website_and_instant_forms).\",\n \"enum\": [\n \"website\",\n \"profile\",\n \"messaging\",\n \"on_ad\",\n \"instant_forms\",\n \"instant_forms_and_messenger\",\n \"website_and_instant_forms\",\n null\n ],\n \"example\": \"website\"\n },\n \"message_apps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"For messaging destinations: the apps to message on (messenger, instagram, whatsapp). Empty otherwise.\"\n }\n },\n \"conversion_event\": {\n \"$ref\": \"#/components/schemas/ConversionEvent\"\n },\n \"budget_amount\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Ad-set budget; null when the campaign owns budget (CBO).\"\n },\n \"budget_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Whether the budget is daily or lifetime.\",\n \"enum\": [\n \"daily\",\n \"lifetime\",\n null\n ],\n \"example\": \"daily\"\n },\n \"minimum_daily_spend\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Daily spend floor within the budget.\"\n },\n \"bid_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Bid strategy.\",\n \"enum\": [\n \"minimum_cost\",\n \"average_target\",\n \"maximum_target\",\n null\n ],\n \"example\": \"minimum_cost\"\n },\n \"desired_cost_per_result\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Target/cap cost for average_target / maximum_target.\"\n },\n \"starts_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Schedule start, ISO 8601.\"\n },\n \"ends_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Schedule end, ISO 8601.\"\n },\n \"regions\": {\n \"type\": \"object\",\n \"description\": \"Geo targeting: include/exclude countries, regions (ISO 3166-2 states, e.g. US-CA), cities, zips.\"\n },\n \"demographics\": {\n \"type\": \"object\",\n \"description\": \"Demographic targeting: automatic (Advantage+), age range, gender.\"\n },\n \"audiences\": {\n \"type\": \"object\",\n \"description\": \"Saved-audience targeting: { include, exclude } arrays of audience IDs.\"\n },\n \"languages\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"Targeted languages as ISO 639 codes (e.g. en, es). Region-specific Meta locales without an ISO mapping appear as their numeric Meta locale key. Empty = all languages.\"\n }\n },\n \"dynamic_creative\": {\n \"type\": \"boolean\",\n \"description\": \"Whether ads within this ad group have their creatives and copy dynamically AB tested.\"\n },\n \"devices\": {\n \"type\": \"object\",\n \"description\": \"Device targeting: platforms and operating systems.\"\n },\n \"frequency_cap\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Impression cap; only valid for reach optimization.\"\n },\n \"placements\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"description\": \"Targeted placements as { platform, positions }. Empty = automatic (Advantage+) placements.\"\n }\n },\n \"ad_campaign\": {\n \"type\": \"object\",\n \"description\": \"The ad campaign this ad group belongs to, an object with an id.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the ad group was created, ISO 8601.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the ad group was last updated, ISO 8601.\"\n },\n \"issues\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AdPlatformIssue\",\n \"description\": \"Open issues affecting this ad group. Empty when there are none.\"\n }\n }\n },\n \"required\": [\n \"click_through_rate\",\n \"clicks\",\n \"cost_per_click\",\n \"cost_per_lead\",\n \"cost_per_mille\",\n \"cost_per_purchase\",\n \"cost_per_schedule\",\n \"cost_per_submitted_application\",\n \"cost_per_contact\",\n \"cost_per_completed_registration\",\n \"cost_per_viewed_content\",\n \"cost_per_added_to_cart\",\n \"frequency\",\n \"impressions\",\n \"leads\",\n \"purchase_value\",\n \"purchases\",\n \"reach\",\n \"return_on_ad_spend\",\n \"spend\",\n \"spend_currency\",\n \"unique_click_through_rate\",\n \"unique_clicks\",\n \"schedules\",\n \"submitted_applications\",\n \"contacts\",\n \"completed_registrations\",\n \"viewed_contents\",\n \"added_to_carts\",\n \"custom_conversions\",\n \"id\",\n \"title\",\n \"status\",\n \"optimization_goal\",\n \"conversion_location\",\n \"message_apps\",\n \"conversion_event\",\n \"budget_amount\",\n \"budget_type\",\n \"minimum_daily_spend\",\n \"bid_type\",\n \"desired_cost_per_result\",\n \"starts_at\",\n \"ends_at\",\n \"regions\",\n \"demographics\",\n \"audiences\",\n \"languages\",\n \"dynamic_creative\",\n \"devices\",\n \"frequency_cap\",\n \"placements\",\n \"ad_campaign\",\n \"created_at\",\n \"updated_at\",\n \"issues\"\n ]\n },\n \"AdPlatformIssue\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the issue.\"\n },\n \"category\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The kind of problem the issue represents.\",\n \"enum\": [\n \"policy_rejection\",\n \"creative_media\",\n \"audience_targeting\",\n \"ad_volume_limit\",\n null\n ],\n \"example\": \"policy_rejection\"\n },\n \"resource_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ID of the campaign, ad group, or ad the issue is attached to.\"\n },\n \"resource_type\": {\n \"type\": \"string\",\n \"description\": \"The type of resource the issue is attached to.\",\n \"enum\": [\n \"ad_campaign\",\n \"ad_group\",\n \"ad\"\n ],\n \"example\": \"ad_campaign\"\n }\n },\n \"required\": [\n \"id\",\n \"category\",\n \"resource_id\",\n \"resource_type\"\n ]\n },\n \"Ad\": {\n \"type\": \"object\",\n \"properties\": {\n \"click_through_rate\": {\n \"type\": \"number\",\n \"description\": \"Clicks divided by impressions, between 0 and 1.\"\n },\n \"clicks\": {\n \"type\": \"number\",\n \"description\": \"The number of clicks.\"\n },\n \"cost_per_click\": {\n \"type\": \"number\",\n \"description\": \"Spend divided by clicks; 0 when there are no clicks.\"\n },\n \"cost_per_lead\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed leads; null when leads are not a goal and none are attributed.\"\n },\n \"cost_per_mille\": {\n \"type\": \"number\",\n \"description\": \"Spend per 1,000 impressions; 0 when there are no impressions.\"\n },\n \"cost_per_purchase\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed purchases; null when purchases are not a goal and none are attributed.\"\n },\n \"cost_per_schedule\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed schedule events; null when schedules are not the goal and none are attributed.\"\n },\n \"cost_per_submitted_application\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed submit-application events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_contact\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed contact events; null when contacts are not the goal and none are attributed.\"\n },\n \"cost_per_completed_registration\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed complete-registration events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_viewed_content\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed view-content events; null when they are not the goal and none are attributed.\"\n },\n \"cost_per_added_to_cart\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Spend divided by attributed add-to-cart events; null when they are not the goal and none are attributed.\"\n },\n \"frequency\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Platform-reported impressions divided by reach.\"\n },\n \"impressions\": {\n \"type\": \"number\",\n \"description\": \"The number of impressions.\"\n },\n \"leads\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed leads, last-click.\"\n },\n \"purchase_value\": {\n \"type\": \"number\",\n \"description\": \"USD value of pixel-attributed purchases.\"\n },\n \"purchases\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed purchases, last-click.\"\n },\n \"reach\": {\n \"type\": \"number\",\n \"description\": \"The number of unique people who saw this.\"\n },\n \"return_on_ad_spend\": {\n \"type\": \"number\",\n \"description\": \"Purchase value divided by spend; 0 when there is no spend.\"\n },\n \"spend\": {\n \"type\": \"number\",\n \"description\": \"The amount charged, in spend_currency.\"\n },\n \"spend_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The ISO 4217 currency code of all monetary metrics.\"\n },\n \"unique_click_through_rate\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Unique clicks divided by impressions, between 0 and 1.\"\n },\n \"unique_clicks\": {\n \"type\": \"number\",\n \"description\": \"The number of unique clicks.\"\n },\n \"schedules\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed schedule events, last-click.\"\n },\n \"submitted_applications\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed submit-application events, last-click.\"\n },\n \"contacts\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed contact events, last-click.\"\n },\n \"completed_registrations\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed complete-registration events, last-click.\"\n },\n \"viewed_contents\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed view-content events, last-click.\"\n },\n \"added_to_carts\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed add-to-cart events, last-click.\"\n },\n \"custom_conversions\": {\n \"type\": \"number\",\n \"description\": \"Whop pixel-attributed custom (merchant-defined) conversion events, last-click, across all custom event names.\"\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the ad.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display title of the ad. Falls back to the creative set caption when unset.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"The delivery status of the ad.\",\n \"enum\": [\n \"active\",\n \"paused\",\n \"in_review\",\n \"rejected\"\n ],\n \"example\": \"active\"\n },\n \"primary_texts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"The primary text variants shown in the ad body.\"\n }\n },\n \"headlines\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"The headline variants shown on the ad.\"\n }\n },\n \"descriptions\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"The description variants shown on the ad.\"\n }\n },\n \"call_to_action\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The call-to-action button shown on the ad.\",\n \"enum\": [\n \"learn_more\",\n \"shop_now\",\n \"sign_up\",\n \"subscribe\",\n \"get_started\",\n \"book_now\",\n \"apply_now\",\n \"contact_us\",\n \"download\",\n \"order_now\",\n \"buy_now\",\n \"get_quote\",\n \"message_page\",\n \"whatsapp_message\",\n \"instagram_message\",\n \"call_now\",\n \"get_directions\",\n \"send_updates\",\n \"get_offer\",\n \"watch_more\",\n \"listen_now\",\n \"play_game\",\n \"open_link\",\n \"no_button\",\n \"get_offer_view\",\n \"get_event_tickets\",\n \"see_menu\",\n \"request_time\",\n \"event_rsvp\",\n \"see_details\",\n \"view_instagram_profile\",\n null\n ],\n \"example\": \"learn_more\"\n },\n \"url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL the ad links to.\"\n },\n \"url_parameters\": {\n \"type\": \"object\",\n \"description\": \"Query parameters appended to the URL, as a string-to-string map.\"\n },\n \"post_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The existing post this ad promotes (a Facebook post or Instagram media), or null when it uses uploaded creatives.\"\n },\n \"messaging_config\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The click-to-message welcome copy, an object with message and keyword, or null when the ad has none.\"\n },\n \"multi_advertiser_ads\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the ad can appear alongside other advertisers' ads in the same unit. Defaults to true.\"\n },\n \"ad_group\": {\n \"type\": \"object\",\n \"description\": \"The ad group this ad belongs to, an object with an id.\"\n },\n \"ad_campaign\": {\n \"type\": \"object\",\n \"description\": \"The ad campaign this ad belongs to, an object with an id.\"\n },\n \"creatives\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"description\": \"The creatives used by this ad. Each entry has the creative's file id, its format (square, vertical, horizontal) or null for the original/uncropped asset, the asset url, and its media_type (image or video).\"\n }\n },\n \"lead_form\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The instant lead form on the ad (Meta lead ads), or null when the ad group's conversion_location is not an instant-form destination. An object with name, form_type (more_volume or higher_intent), an optional intro, questions, a privacy_policy, an optional completion screen, and phone_verification.\"\n },\n \"social_accounts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"description\": \"The social accounts (Facebook page, Instagram profile) the ad runs under, each an object with an id.\"\n }\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the ad was created, as an ISO 8601 timestamp.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the ad was last updated, as an ISO 8601 timestamp.\"\n },\n \"issues\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AdPlatformIssue\",\n \"description\": \"Open issues affecting this ad. Empty when there are none.\"\n }\n }\n },\n \"required\": [\n \"click_through_rate\",\n \"clicks\",\n \"cost_per_click\",\n \"cost_per_lead\",\n \"cost_per_mille\",\n \"cost_per_purchase\",\n \"cost_per_schedule\",\n \"cost_per_submitted_application\",\n \"cost_per_contact\",\n \"cost_per_completed_registration\",\n \"cost_per_viewed_content\",\n \"cost_per_added_to_cart\",\n \"frequency\",\n \"impressions\",\n \"leads\",\n \"purchase_value\",\n \"purchases\",\n \"reach\",\n \"return_on_ad_spend\",\n \"spend\",\n \"spend_currency\",\n \"unique_click_through_rate\",\n \"unique_clicks\",\n \"schedules\",\n \"submitted_applications\",\n \"contacts\",\n \"completed_registrations\",\n \"viewed_contents\",\n \"added_to_carts\",\n \"custom_conversions\",\n \"id\",\n \"title\",\n \"status\",\n \"primary_texts\",\n \"headlines\",\n \"descriptions\",\n \"call_to_action\",\n \"url\",\n \"url_parameters\",\n \"post_id\",\n \"messaging_config\",\n \"multi_advertiser_ads\",\n \"ad_group\",\n \"ad_campaign\",\n \"creatives\",\n \"lead_form\",\n \"social_accounts\",\n \"created_at\",\n \"updated_at\",\n \"issues\"\n ]\n },\n \"Audience\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Audience ID, prefixed `adaud_`.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Audience display name.\"\n },\n \"status\": {\n \"type\": \"string\",\n \"description\": \"Current state of the audience import. `syncing` means Whop is sending matched rows to connected ad accounts. When status is `partial` or `failed`, `error_message` explains what went wrong.\",\n \"enum\": [\n \"pending\",\n \"processing\",\n \"syncing\",\n \"ready\",\n \"partial\",\n \"failed\"\n ]\n },\n \"total_rows\": {\n \"type\": \"number\",\n \"description\": \"Total rows detected in the uploaded CSV.\"\n },\n \"processed_rows\": {\n \"type\": \"number\",\n \"description\": \"Rows processed from the uploaded CSV.\"\n },\n \"matched_rows\": {\n \"type\": \"number\",\n \"description\": \"Rows successfully uploaded to connected ad accounts.\"\n },\n \"progress_percent\": {\n \"type\": \"number\",\n \"description\": \"Processing progress from 0 to 100.\"\n },\n \"error_message\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Processing error message. `null` unless processing is partial or failed.\"\n },\n \"platform_audience_ids\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"External audience IDs created on connected ad platforms, such as Meta.\"\n }\n },\n \"created_at\": {\n \"type\": \"number\",\n \"description\": \"Unix timestamp when the audience was created.\"\n },\n \"updated_at\": {\n \"type\": \"number\",\n \"description\": \"Unix timestamp when the audience was last updated.\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"status\",\n \"total_rows\",\n \"processed_rows\",\n \"matched_rows\",\n \"progress_percent\",\n \"error_message\",\n \"platform_audience_ids\",\n \"created_at\",\n \"updated_at\"\n ]\n },\n \"CheckoutConfiguration\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"created_at\": {\n \"type\": \"number\"\n },\n \"updated_at\": {\n \"type\": \"number\"\n },\n \"company_id\": {\n \"type\": \"string\",\n \"description\": \"The ID of the company that owns this checkout configuration\"\n },\n \"mode\": {\n \"type\": \"string\",\n \"description\": \"The checkout mode: payment or setup\"\n },\n \"currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The currency for this checkout configuration\"\n },\n \"plan\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The plan associated with this checkout configuration\"\n },\n \"affiliate_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The affiliate code applied to this checkout configuration\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Arbitrary key-value metadata attached to this checkout configuration\"\n },\n \"redirect_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL to redirect the user to after checkout\"\n },\n \"purchase_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL to use for the checkout page\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The 3D Secure enforcement level\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Configuration for which payment methods are enabled or disabled\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"company_id\",\n \"mode\",\n \"currency\",\n \"plan\",\n \"affiliate_code\",\n \"metadata\",\n \"redirect_url\",\n \"purchase_url\",\n \"three_ds_level\",\n \"payment_method_configuration\"\n ]\n },\n \"PlanCustomField\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Custom field ID.\"\n },\n \"field_type\": {\n \"type\": \"string\",\n \"description\": \"Custom field input type.\",\n \"enum\": [\n \"text\"\n ],\n \"example\": \"text\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"Field label shown to customer at checkout.\"\n },\n \"order\": {\n \"type\": \"number\",\n \"description\": \"Field position on checkout form.\"\n },\n \"placeholder\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Placeholder text shown in empty field.\"\n },\n \"required\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the customer must complete this field to check out.\"\n }\n },\n \"required\": [\n \"id\",\n \"field_type\",\n \"name\",\n \"order\",\n \"placeholder\",\n \"required\"\n ]\n },\n \"PlanListItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Plan ID, prefixed `plan_`.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the plan was created, as an ISO 8601 timestamp.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the plan was last updated, as an ISO 8601 timestamp.\"\n },\n \"visibility\": {\n \"type\": \"string\",\n \"description\": \"Whether the plan is visible to customers or hidden from public view.\"\n },\n \"plan_type\": {\n \"type\": \"string\",\n \"description\": \"Billing model for this plan: `renewal` (recurring) or `one_time` (single payment).\"\n },\n \"release_method\": {\n \"type\": \"string\",\n \"description\": \"Sales method for this plan, such as `buy_now` or `waitlist`.\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Three-letter ISO currency code for this plan's prices.\"\n },\n \"account\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Account that sells this plan; `null` for standalone invoice plans.\"\n },\n \"product\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Product this plan belongs to; `null` for standalone plans.\"\n },\n \"invoice\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Invoice this plan was generated for; `null` unless created for an invoice.\"\n },\n \"billing_period\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Recurring billing interval in days, such as 30 for monthly or 365 for annual. `null` for one-time plans.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Plan display name shown to customers.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Customer-visible plan description.\"\n },\n \"purchase_url\": {\n \"type\": \"string\",\n \"description\": \"URL where customers can purchase this plan directly.\"\n },\n \"expiration_days\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Access duration in days for expiration-based plans.\"\n },\n \"initial_price\": {\n \"type\": \"number\",\n \"description\": \"Initial purchase price in plan currency.\"\n },\n \"renewal_price\": {\n \"type\": \"number\",\n \"description\": \"Recurring price charged every billing period.\"\n },\n \"trial_period_days\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Free trial days before the first renewal charge. `null` if no trial is configured or the user has already used a trial for this plan.\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"3D Secure behavior for this plan; `null` inherits account default.\"\n },\n \"member_count\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Active memberships through this plan, when visible to the requester.\"\n },\n \"internal_notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Private notes visible only to authorized team members.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs stored on the plan.\"\n },\n \"stock\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Units available for purchase, when visible to the requester.\"\n },\n \"unlimited_stock\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the plan has unlimited stock.\"\n },\n \"split_pay_required_payments\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Installment payments required before the subscription pauses.\"\n },\n \"adaptive_pricing_enabled\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this plan accepts local currency payments via adaptive pricing.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payment method configuration (`enabled`, `disabled`, `include_platform_defaults`); `null` when plan uses default settings.\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"visibility\",\n \"plan_type\",\n \"release_method\",\n \"currency\",\n \"account\",\n \"product\",\n \"invoice\",\n \"billing_period\",\n \"title\",\n \"description\",\n \"purchase_url\",\n \"expiration_days\",\n \"initial_price\",\n \"renewal_price\",\n \"trial_period_days\",\n \"three_ds_level\",\n \"member_count\",\n \"internal_notes\",\n \"metadata\",\n \"stock\",\n \"unlimited_stock\",\n \"split_pay_required_payments\",\n \"adaptive_pricing_enabled\",\n \"payment_method_configuration\"\n ]\n },\n \"Plan\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Plan ID, prefixed `plan_`.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the plan was created, as an ISO 8601 timestamp.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the plan was last updated, as an ISO 8601 timestamp.\"\n },\n \"visibility\": {\n \"type\": \"string\",\n \"description\": \"Whether the plan is visible to customers or hidden from public view.\",\n \"enum\": [\n \"visible\",\n \"hidden\",\n \"archived\",\n \"quick_link\"\n ],\n \"example\": \"visible\"\n },\n \"plan_type\": {\n \"type\": \"string\",\n \"description\": \"Billing model for this plan: `renewal` (recurring) or `one_time` (single payment).\",\n \"enum\": [\n \"renewal\",\n \"one_time\"\n ],\n \"example\": \"renewal\"\n },\n \"release_method\": {\n \"type\": \"string\",\n \"description\": \"Sales method for this plan, such as `buy_now` or `waitlist`.\",\n \"enum\": [\n \"buy_now\",\n \"waitlist\"\n ],\n \"example\": \"buy_now\"\n },\n \"currency\": {\n \"type\": \"string\",\n \"description\": \"Three-letter ISO currency code for this plan's prices.\",\n \"enum\": [\n \"usd\",\n \"sgd\",\n \"inr\",\n \"aud\",\n \"brl\",\n \"cad\",\n \"dkk\",\n \"eur\",\n \"nok\",\n \"gbp\",\n \"sek\",\n \"chf\",\n \"hkd\",\n \"huf\",\n \"jpy\",\n \"mxn\",\n \"myr\",\n \"pln\",\n \"czk\",\n \"nzd\",\n \"aed\",\n \"eth\",\n \"ape\",\n \"cop\",\n \"ron\",\n \"thb\",\n \"bgn\",\n \"idr\",\n \"dop\",\n \"php\",\n \"try\",\n \"krw\",\n \"twd\",\n \"vnd\",\n \"pkr\",\n \"clp\",\n \"uyu\",\n \"ars\",\n \"zar\",\n \"dzd\",\n \"tnd\",\n \"mad\",\n \"kes\",\n \"kwd\",\n \"jod\",\n \"all\",\n \"xcd\",\n \"amd\",\n \"bsd\",\n \"bhd\",\n \"bob\",\n \"bam\",\n \"khr\",\n \"crc\",\n \"xof\",\n \"egp\",\n \"etb\",\n \"gmd\",\n \"ghs\",\n \"gtq\",\n \"gyd\",\n \"ils\",\n \"jmd\",\n \"mop\",\n \"mga\",\n \"mur\",\n \"mdl\",\n \"mnt\",\n \"nad\",\n \"ngn\",\n \"mkd\",\n \"omr\",\n \"pyg\",\n \"pen\",\n \"qar\",\n \"rwf\",\n \"sar\",\n \"rsd\",\n \"lkr\",\n \"tzs\",\n \"ttd\",\n \"uzs\",\n \"rub\",\n \"btc\",\n \"cny\",\n \"usdt\",\n \"kzt\",\n \"awg\",\n \"whop_usd\",\n \"xau\"\n ],\n \"example\": \"usd\"\n },\n \"account\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Account that sells this plan; `null` for standalone invoice plans.\"\n },\n \"product\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Product this plan belongs to; `null` for standalone plans.\"\n },\n \"invoice\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Invoice this plan was generated for; `null` unless created for an invoice.\"\n },\n \"billing_period\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Recurring billing interval in days, such as 30 for monthly or 365 for annual. `null` for one-time plans.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Plan display name shown to customers.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Customer-visible plan description.\"\n },\n \"purchase_url\": {\n \"type\": \"string\",\n \"description\": \"URL where customers can purchase this plan directly.\"\n },\n \"expiration_days\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Access duration in days for expiration-based plans.\"\n },\n \"initial_price\": {\n \"type\": \"number\",\n \"description\": \"Initial purchase price in plan currency.\"\n },\n \"renewal_price\": {\n \"type\": \"number\",\n \"description\": \"Recurring price charged every billing period.\"\n },\n \"trial_period_days\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Free trial days before the first renewal charge. `null` if no trial is configured or the user has already used a trial for this plan.\"\n },\n \"three_ds_level\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"3D Secure behavior for this plan; `null` inherits account default.\",\n \"enum\": [\n \"mandate_challenge\",\n \"frictionless\",\n null\n ],\n \"example\": \"mandate_challenge\"\n },\n \"member_count\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Active memberships through this plan, when visible to the requester.\"\n },\n \"internal_notes\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Private notes visible only to authorized team members.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs stored on the plan.\"\n },\n \"stock\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Units available for purchase, when visible to the requester.\"\n },\n \"unlimited_stock\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the plan has unlimited stock.\"\n },\n \"split_pay_required_payments\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Installment payments required before the subscription pauses.\"\n },\n \"adaptive_pricing_enabled\": {\n \"type\": \"boolean\",\n \"description\": \"Whether this plan accepts local currency payments via adaptive pricing.\"\n },\n \"payment_method_configuration\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payment method configuration (`enabled`, `disabled`, `include_platform_defaults`); `null` when plan uses default settings.\"\n },\n \"tax_type\": {\n \"type\": \"string\",\n \"description\": \"How tax is handled for this plan.\",\n \"enum\": [\n \"inclusive\",\n \"exclusive\",\n \"unspecified\"\n ],\n \"example\": \"inclusive\"\n },\n \"collect_tax\": {\n \"type\": \"boolean\",\n \"description\": \"Whether tax is collected on purchases of this plan.\"\n },\n \"custom_fields\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/PlanCustomField\",\n \"description\": \"Custom input fields collected on the checkout form.\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"visibility\",\n \"plan_type\",\n \"release_method\",\n \"currency\",\n \"account\",\n \"product\",\n \"invoice\",\n \"billing_period\",\n \"title\",\n \"description\",\n \"purchase_url\",\n \"expiration_days\",\n \"initial_price\",\n \"renewal_price\",\n \"trial_period_days\",\n \"three_ds_level\",\n \"member_count\",\n \"internal_notes\",\n \"metadata\",\n \"stock\",\n \"unlimited_stock\",\n \"split_pay_required_payments\",\n \"adaptive_pricing_enabled\",\n \"payment_method_configuration\",\n \"tax_type\",\n \"collect_tax\",\n \"custom_fields\"\n ]\n },\n \"ProductListItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Product ID, prefixed `prod_`.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the product was created, as an ISO 8601 timestamp.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the product was last updated, as an ISO 8601 timestamp.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Product display name shown to customers.\"\n },\n \"visibility\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Whether the product is publicly visible, hidden, or archived.\"\n },\n \"headline\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Short marketing headline displayed on product page.\"\n },\n \"verified\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the product has been verified by Whop.\"\n },\n \"member_count\": {\n \"type\": \"number\",\n \"description\": \"Active memberships for this product; 0 if public member counts are disabled.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"URL slug for the product's public link.\"\n },\n \"published_reviews_count\": {\n \"type\": \"number\",\n \"description\": \"Published customer reviews for this product.\"\n },\n \"external_identifier\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"External identifier stored on the product for your own reference.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs stored on the product.\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"title\",\n \"visibility\",\n \"headline\",\n \"verified\",\n \"member_count\",\n \"route\",\n \"published_reviews_count\",\n \"external_identifier\",\n \"metadata\"\n ]\n },\n \"Product\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Product ID, prefixed `prod_`.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the product was created, as an ISO 8601 timestamp.\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"description\": \"When the product was last updated, as an ISO 8601 timestamp.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Product display name shown to customers.\"\n },\n \"visibility\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Whether the product is publicly visible, hidden, or archived.\"\n },\n \"headline\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Short marketing headline displayed on product page.\"\n },\n \"verified\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the product has been verified by Whop.\"\n },\n \"member_count\": {\n \"type\": \"number\",\n \"description\": \"Active memberships for this product; 0 if public member counts are disabled.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"URL slug for the product's public link.\"\n },\n \"published_reviews_count\": {\n \"type\": \"number\",\n \"description\": \"Published customer reviews for this product.\"\n },\n \"external_identifier\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"External identifier stored on the product for your own reference.\"\n },\n \"metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Custom key-value pairs stored on the product.\"\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Written description displayed on product page.\"\n },\n \"custom_cta\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Call-to-action button label shown on the product purchase page.\"\n },\n \"custom_cta_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"URL the call-to-action button links to instead of checkout.\"\n },\n \"custom_statement_descriptor\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Custom text label on customer's bank statement.\"\n },\n \"global_affiliate_percentage\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Commission rate affiliates earn through the global affiliate program.\"\n },\n \"global_affiliate_status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Enrollment status in the global affiliate program.\"\n },\n \"member_affiliate_percentage\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Commission rate members earn through the member affiliate program.\"\n },\n \"member_affiliate_status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Enrollment status in the member affiliate program.\"\n },\n \"gallery_images\": {\n \"type\": \"array\",\n \"description\": \"Gallery images for this product.\"\n },\n \"product_tax_code\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Tax classification code for this product, or `null` if no tax code is set.\"\n },\n \"owner_user\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"User who owns the account selling this product.\"\n },\n \"company\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Account that sells this product.\"\n }\n },\n \"required\": [\n \"id\",\n \"created_at\",\n \"updated_at\",\n \"title\",\n \"visibility\",\n \"headline\",\n \"verified\",\n \"member_count\",\n \"route\",\n \"published_reviews_count\",\n \"external_identifier\",\n \"metadata\",\n \"description\",\n \"custom_cta\",\n \"custom_cta_url\",\n \"custom_statement_descriptor\",\n \"global_affiliate_percentage\",\n \"global_affiliate_status\",\n \"member_affiliate_percentage\",\n \"member_affiliate_status\",\n \"gallery_images\",\n \"product_tax_code\",\n \"owner_user\",\n \"company\"\n ]\n },\n \"SocialAccountPost\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"The platform's own identifier for the post or media. Use it to reference the post on an ad.\"\n },\n \"media_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL of the post's media — the image for image posts, the playable video file for video posts. Meta signs these and they expire after roughly 24 hours, so don't store them.\"\n },\n \"thumbnail_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Poster image for video posts; null for image posts, where media_url is already the image. Signed and short-lived like media_url.\"\n },\n \"call_to_action\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The post's call-to-action button, for example shop_now (Facebook only; null for Instagram).\",\n \"enum\": [\n \"learn_more\",\n \"shop_now\",\n \"sign_up\",\n \"subscribe\",\n \"get_started\",\n \"book_now\",\n \"apply_now\",\n \"contact_us\",\n \"download\",\n \"order_now\",\n \"buy_now\",\n \"get_quote\",\n \"message_page\",\n \"whatsapp_message\",\n \"instagram_message\",\n \"call_now\",\n \"get_directions\",\n \"send_updates\",\n \"get_offer\",\n \"watch_more\",\n \"listen_now\",\n \"play_game\",\n \"open_link\",\n \"no_button\",\n \"get_offer_view\",\n \"get_event_tickets\",\n \"see_menu\",\n \"request_time\",\n \"event_rsvp\",\n \"see_details\",\n \"view_instagram_profile\",\n null\n ],\n \"example\": \"learn_more\"\n },\n \"destination_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL the post's call-to-action drives to (Facebook only; null for Instagram).\"\n }\n },\n \"required\": [\n \"id\",\n \"media_url\",\n \"thumbnail_url\",\n \"call_to_action\",\n \"destination_url\"\n ]\n },\n \"SocialAccount\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Unique identifier for the social account.\"\n },\n \"platform\": {\n \"type\": \"string\",\n \"description\": \"The platform the social account exists on.\",\n \"enum\": [\n \"x\",\n \"instagram\",\n \"youtube\",\n \"tiktok\",\n \"facebook\"\n ],\n \"example\": \"x\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"The username of the social account on the platform.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The display name of the social account on the platform.\"\n },\n \"url\": {\n \"type\": \"string\",\n \"description\": \"The URL where the social account can be accessed on the platform.\"\n },\n \"profile_picture_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The URL where the profile picture of the social account can be accessed.\"\n },\n \"verified\": {\n \"type\": \"boolean\",\n \"description\": \"Whether the social account is verified on the platform.\"\n },\n \"external_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The platform-specific ID for this social account.\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"description\": \"Capabilities Whop retains specific to this social account. For example, Whop may request the ability to run advertisements that use this social account's identity, reflected by the presence of `advertise` in this value.\"\n }\n }\n },\n \"required\": [\n \"id\",\n \"platform\",\n \"username\",\n \"name\",\n \"url\",\n \"profile_picture_url\",\n \"verified\",\n \"external_id\",\n \"scopes\"\n ]\n },\n \"User\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID, prefixed `user_`.\"\n },\n \"username\": {\n \"type\": \"string\",\n \"description\": \"The user's unique username\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The user's display name\"\n },\n \"bio\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The user's biography\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"description\": \"When the user was created, as an ISO 8601 timestamp\"\n },\n \"profile_picture\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"The user's profile picture, an object with a url\"\n },\n \"total_usd\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"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.\"\n },\n \"balances\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/AccountBalanceToken\",\n \"description\": \"User holdings (crypto and fiat), each with USD value. Empty when `total_usd` is `null`.\"\n }\n },\n \"verification\": {\n \"type\": \"object\",\n \"description\": \"Identity verification status for the user's `individual` (KYC) and `business` (KYB) profiles. Each is `null` until created, otherwise a `status` of `not_started`, `pending`, `approved`, or `rejected`.\"\n }\n },\n \"required\": [\n \"id\",\n \"username\",\n \"name\",\n \"bio\",\n \"created_at\",\n \"profile_picture\",\n \"total_usd\",\n \"balances\",\n \"verification\"\n ]\n },\n \"V1ErrorResponse\": {\n \"type\": \"object\",\n \"properties\": {\n \"error\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"description\": \"Machine-readable error code.\"\n },\n \"message\": {\n \"type\": \"string\",\n \"description\": \"Human-readable error message.\"\n }\n },\n \"required\": [\n \"type\",\n \"message\"\n ]\n }\n },\n \"required\": [\n \"error\"\n ]\n },\n \"ConversionEvent\": {\n \"description\": \"The pixel event optimized for. A standard event, or any custom pixel event name.\",\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"enum\": [\n \"purchase\",\n \"add_to_cart\",\n \"initiated_checkout\",\n \"add_payment_info\",\n \"complete_registration\",\n \"lead\",\n \"content_view\",\n \"search\",\n \"contact\",\n \"customize_product\",\n \"donate\",\n \"find_location\",\n \"schedule\",\n \"start_trial\",\n \"submit_application\",\n \"subscribe\"\n ]\n },\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"LedgerActivity\": {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"ledger_activity\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Ledger activity ID.\"\n },\n \"line_type\": {\n \"type\": \"string\",\n \"description\": \"Type of ledger activity.\"\n },\n \"amount\": {\n \"type\": \"string\",\n \"description\": \"Signed amount in the currency's smallest precision units.\"\n },\n \"currency\": {\n \"type\": \"object\",\n \"description\": \"Currency for this ledger activity.\",\n \"properties\": {\n \"code\": {\n \"type\": \"string\",\n \"description\": \"Currency code.\"\n },\n \"precision\": {\n \"type\": \"string\",\n \"description\": \"Precision factor for the currency, for example `100000000` for USD.\"\n }\n },\n \"required\": [\n \"code\",\n \"precision\"\n ]\n },\n \"posted_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"When the activity posted to the ledger.\"\n },\n \"available_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"ISO 8601 timestamp these funds became (or are scheduled to become) withdrawable: the posted time for already-settled funds, or 00:00:00 UTC on the scheduled release date for pending funds. Present only on inflows entering the balance (payments, top-ups, incoming transfers/affiliate); null on withdrawals, refunds, disputes and on-chain rows. The available_after/before filters window on its UTC settlement date.\"\n },\n \"created_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"When the activity record was created.\"\n },\n \"resource\": {\n \"description\": \"Resource associated with this ledger activity.\",\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"account\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account display name.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account route.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account logo URL.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"title\",\n \"route\",\n \"logo_url\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"user\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User display name.\"\n },\n \"username\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User's username.\"\n },\n \"profile_picture_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User profile image URL.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"name\",\n \"username\",\n \"profile_picture_url\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"ledger_account\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Ledger account ID.\"\n },\n \"owner\": {\n \"oneOf\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"account\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Account ID.\"\n },\n \"title\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account display name.\"\n },\n \"route\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account route.\"\n },\n \"logo_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Account logo URL.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"title\",\n \"route\",\n \"logo_url\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"user\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"User ID.\"\n },\n \"name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User display name.\"\n },\n \"username\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User's username.\"\n },\n \"profile_picture_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"User profile image URL.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"name\",\n \"username\",\n \"profile_picture_url\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"owner\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"payment_method\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Payment method ID.\"\n },\n \"payment_method_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payment method type.\"\n },\n \"gateway_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payment gateway type.\"\n },\n \"card\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"brand\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Card brand.\"\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Last four digits of the card.\"\n },\n \"exp_month\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Card expiration month.\"\n },\n \"exp_year\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"description\": \"Card expiration year.\"\n }\n },\n \"required\": [\n \"brand\",\n \"last4\",\n \"exp_month\",\n \"exp_year\"\n ]\n },\n \"bank\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"properties\": {\n \"bank_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Bank name.\"\n },\n \"account_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Bank account holder name.\"\n },\n \"last4\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Last four digits of the bank account.\"\n },\n \"account_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Bank account type.\"\n }\n },\n \"required\": [\n \"bank_name\",\n \"account_name\",\n \"last4\",\n \"account_type\"\n ]\n },\n \"email_identifier\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Email identifier for email-based payment methods.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"payment_method_type\",\n \"gateway_type\",\n \"card\",\n \"bank\",\n \"email_identifier\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"payout_method\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Payout method ID.\"\n },\n \"nickname\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payout method nickname.\"\n },\n \"institution_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payout institution name.\"\n },\n \"account_reference\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Masked account reference.\"\n },\n \"provider\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Payout provider.\"\n },\n \"destination_currency_code\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Destination currency code.\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"nickname\",\n \"institution_name\",\n \"account_reference\",\n \"provider\",\n \"destination_currency_code\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\",\n \"enum\": [\n \"card_transaction\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"description\": \"Card transaction ID.\"\n },\n \"card_id\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Identifier of the card that the transaction was charged to.\"\n },\n \"merchant_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Merchant display name.\"\n },\n \"merchant_icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Merchant icon URL.\"\n },\n \"merchant_category\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Merchant category.\"\n },\n \"status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Current card transaction status.\"\n },\n \"usd_amount\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The processor-settled USD amount as a decimal string. The ledger's USDT leg is posted 1:1 from this value.\"\n },\n \"local_amount\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Amount the merchant charged in their local currency, as a decimal string. Pair with local_currency.\"\n },\n \"local_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"ISO 4217 currency code of the merchant-charged amount in local_amount.\"\n },\n \"cashback_usd\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Cashback earned on this transaction as a USD decimal string. Zero for declined or ineligible transactions; null when cashback has not been computed yet.\"\n },\n \"authorized_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"ISO 8601 timestamp the transaction was authorized.\"\n },\n \"posted_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"ISO 8601 timestamp the transaction was settled by the card network.\"\n },\n \"declined_reason\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Reason the transaction was declined (when status is declined).\"\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"card_id\",\n \"merchant_name\",\n \"merchant_icon_url\",\n \"merchant_category\",\n \"status\",\n \"usd_amount\",\n \"local_amount\",\n \"local_currency\",\n \"cashback_usd\",\n \"authorized_at\",\n \"posted_at\",\n \"declined_reason\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"source\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": true,\n \"description\": \"Source of this ledger activity.\",\n \"properties\": {\n \"object\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Lifecycle status. On withdrawal sources this is the withdrawal status (requires payout:withdrawal:read); on airdrop_link sources it is the claim-link status (ungated); on payment and top-up sources it is the friendly payment status such as succeeded/pending/failed (ungated).\"\n },\n \"claim_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Public claim URL for the airdrop link (airdrop_link sources only).\"\n },\n \"amount_float\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Withdrawal amount as a decimal number in the destination currency (withdrawal sources only; requires payout:withdrawal:read).\"\n },\n \"created_at\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"Withdrawal creation time as an ISO 8601 timestamp (withdrawal sources only; requires payout:withdrawal:read).\"\n },\n \"estimated_arrival\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"format\": \"date-time\",\n \"description\": \"Estimated arrival as an ISO 8601 timestamp (withdrawal sources only; requires payout:withdrawal:read).\"\n },\n \"payer_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Name of the entity processing the payout (withdrawal sources only; requires payout:withdrawal:read).\"\n },\n \"payout_token_nickname\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Saved payout destination nickname (withdrawal sources only).\"\n },\n \"tx_hash\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"On-chain transaction hash (onchain_transaction and swap sources only).\"\n },\n \"sender_address\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Sender wallet address or onramp provider identifier (onchain_transaction sources only).\"\n },\n \"chain\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Chain the deposit landed on, for example plasma (onchain_transaction sources only).\"\n },\n \"from_amount\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Amount converted out of from_currency as a decimal string (swap sources only).\"\n },\n \"from_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Lowercase currency code converted from (swap sources only).\"\n },\n \"to_amount\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Amount received in to_currency as a decimal string (swap sources only).\"\n },\n \"to_currency\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"Lowercase currency code converted to (swap sources only).\"\n },\n \"payout_destination\": {\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"description\": \"Payout destination display info (withdrawal sources only).\",\n \"properties\": {\n \"payer_name\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"icon_url\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n }\n },\n \"required\": [\n \"object\",\n \"id\"\n ]\n }\n },\n \"required\": [\n \"object\",\n \"id\",\n \"line_type\",\n \"amount\",\n \"currency\",\n \"posted_at\",\n \"available_at\",\n \"created_at\",\n \"resource\",\n \"source\"\n ]\n },\n \"Pagination\": {\n \"type\": \"object\",\n \"properties\": {\n \"current_page\": {\n \"type\": \"number\",\n \"description\": \"Current page number\"\n },\n \"total_pages\": {\n \"type\": \"number\",\n \"description\": \"Total number of pages\"\n },\n \"next_page\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Next page number\"\n },\n \"prev_page\": {\n \"type\": [\n \"number\",\n \"null\"\n ],\n \"description\": \"Previous page number\"\n },\n \"total_count\": {\n \"type\": \"number\",\n \"description\": \"Total number of records\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"current_page\",\n \"total_pages\",\n \"next_page\",\n \"prev_page\",\n \"total_count\"\n ]\n }\n },\n \"parameters\": {\n \"ApiVersionDate\": {\n \"name\": \"Api-Version-Date\",\n \"in\": \"header\",\n \"required\": false,\n \"schema\": {\n \"type\": \"string\",\n \"format\": \"date\",\n \"example\": \"2026-07-01\"\n },\n \"description\": \"Pins the request to a dated API version. When omitted, the request uses the original (2025-01-01) request/response shapes, so existing unversioned callers are never broken. Generated SDKs always send the latest version they were built against. An unrecognized value is rejected with a 400. The schemas documented here always describe the latest version.\"\n }\n },\n \"responses\": {\n \"NotFound\": {\n \"description\": \"Resource not found\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/V1ErrorResponse\"\n }\n }\n }\n },\n \"Forbidden\": {\n \"description\": \"Forbidden\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/V1ErrorResponse\"\n }\n }\n }\n },\n \"Unauthorized\": {\n \"description\": \"Unauthorized\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/V1ErrorResponse\"\n }\n }\n }\n },\n \"InvalidParameters\": {\n \"description\": \"Invalid Parameters\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/V1ErrorResponse\"\n }\n }\n }\n }\n }\n }\n}\n","import { AuthenticationError, PermissionDeniedError, Whop } from \"@whop/sdk\";\nimport type { Identity } from \"./types\";\n\n/**\n * Whop API boundary for authentication.\n *\n * Validates a key by calling the requesting-account endpoint through the SDK.\n * The SDK adds the `Bearer ` prefix itself, so we pass the raw token. The SDK\n * throws typed errors we map to a discriminated result:\n * - `AuthenticationError` (401) → the key is invalid → reject login.\n * - `PermissionDeniedError` (403) → the key is valid but missing the\n * required scope → accept login with best-effort identity.\n */\n\nconst DEFAULT_BASE_URL = \"https://api.whop.com/api/v1\";\n\nexport function apiBaseUrl(env: NodeJS.ProcessEnv = process.env): string {\n\treturn env.WHOP_API_BASE_URL?.trim() || DEFAULT_BASE_URL;\n}\n\n/**\n * Base URL for the OAuth endpoints (`/oauth/authorize`, `/oauth/token`,\n * `/oauth/userinfo`), which live at the API host root rather than under\n * `/api/v1`. Tolerates a base URL with or without the `/api/v1` suffix and a\n * trailing slash.\n */\nexport function oauthBaseUrl(env: NodeJS.ProcessEnv = process.env): string {\n\treturn apiBaseUrl(env)\n\t\t.replace(/\\/+$/, \"\")\n\t\t.replace(/\\/api\\/v1$/, \"\");\n}\n\nexport type ValidateResult =\n\t| { status: \"valid\"; identity: Identity }\n\t| { status: \"underscoped\"; identity: Identity }\n\t| { status: \"invalid\" }\n\t| { status: \"error\"; message: string };\n\nexport async function validateApiKey(\n\tapiKey: string,\n\tbaseUrl: string = apiBaseUrl(),\n): Promise<ValidateResult> {\n\tconst whop = new Whop({ apiKey, baseURL: baseUrl });\n\ttry {\n\t\tconst account = await whop.accounts.me();\n\t\treturn {\n\t\t\tstatus: \"valid\",\n\t\t\tidentity: { id: account.id, title: account.title, route: account.route },\n\t\t};\n\t} catch (error) {\n\t\tif (error instanceof AuthenticationError) return { status: \"invalid\" };\n\t\tif (error instanceof PermissionDeniedError)\n\t\t\treturn { status: \"underscoped\", identity: {} };\n\t\treturn {\n\t\t\tstatus: \"error\",\n\t\t\tmessage: error instanceof Error ? error.message : String(error),\n\t\t};\n\t}\n}\n","import fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { z } from \"incur\";\nimport { Profile } from \"./types\";\n\n/**\n * Plaintext metadata store at `~/.config/whop/config.json`.\n *\n * Holds the profile list and the active profile — never secrets, which live in\n * the OS keychain (see `keyring.ts`). Reads are corruption-tolerant: a missing\n * or invalid file resolves to an empty config rather than throwing, so the CLI\n * is never bricked by a bad file. Valid profiles are kept even if another\n * profile entry is malformed.\n */\n\nexport const Config = z.object({\n\tversion: z.literal(1).default(1),\n\tactiveProfile: z.string().optional(),\n\tprofiles: z.array(Profile).default([]),\n});\nexport type Config = z.infer<typeof Config>;\n\n/** Resolves the config directory, honoring `WHOP_CONFIG_DIR` and `XDG_CONFIG_HOME` overrides. */\nexport function configDir(env: NodeJS.ProcessEnv = process.env): string {\n\tconst override = env.WHOP_CONFIG_DIR?.trim();\n\tif (override) return override;\n\tconst xdg = env.XDG_CONFIG_HOME?.trim();\n\tconst base = xdg ? xdg : path.join(os.homedir(), \".config\");\n\treturn path.join(base, \"whop\");\n}\n\nexport function configPath(env: NodeJS.ProcessEnv = process.env): string {\n\treturn path.join(configDir(env), \"config.json\");\n}\n\nexport function readConfig(env: NodeJS.ProcessEnv = process.env): Config {\n\tlet raw: string;\n\ttry {\n\t\traw = fs.readFileSync(configPath(env), \"utf8\");\n\t} catch {\n\t\treturn Config.parse({});\n\t}\n\tlet config: Config;\n\ttry {\n\t\tconfig = parseConfig(JSON.parse(raw));\n\t} catch {\n\t\treturn Config.parse({});\n\t}\n\n\treturn config;\n}\n\nfunction parseConfig(value: unknown): Config {\n\tconst parsed = Config.safeParse(value);\n\tif (parsed.success) return parsed.data;\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) {\n\t\treturn Config.parse({});\n\t}\n\n\tconst raw = value as { activeProfile?: unknown; profiles?: unknown };\n\tconst profiles: Profile[] = [];\n\tif (Array.isArray(raw.profiles)) {\n\t\tfor (const profile of raw.profiles) {\n\t\t\tconst parsed = Profile.safeParse(profile);\n\t\t\tif (parsed.success) profiles.push(parsed.data);\n\t\t}\n\t}\n\tconst activeProfile =\n\t\ttypeof raw.activeProfile === \"string\" &&\n\t\t\tprofiles.some((profile) => profile.name === raw.activeProfile)\n\t\t\t? raw.activeProfile\n\t\t\t: undefined;\n\n\treturn Config.parse({ activeProfile, profiles });\n}\n\nexport function writeConfig(\n\tconfig: Config,\n\tenv: NodeJS.ProcessEnv = process.env,\n): void {\n\tconst dir = configDir(env);\n\tfs.mkdirSync(dir, { recursive: true, mode: 0o700 });\n\tconst file = configPath(env);\n\tconst tmp = `${file}.${process.pid}.tmp`;\n\tfs.writeFileSync(tmp, `${JSON.stringify(config, null, 2)}\\n`, {\n\t\tmode: 0o600,\n\t});\n\tfs.renameSync(tmp, file);\n\ttry {\n\t\tfs.chmodSync(file, 0o600);\n\t} catch {\n\t\t// best effort — chmod is a no-op on some platforms (e.g. Windows)\n\t}\n}\n","import * as fs from 'node:fs/promises'\nimport * as os from 'node:os'\nimport * as path from 'node:path'\nimport { PassThrough } from 'node:stream'\nimport { estimateTokenCount, sliceByTokens } from 'tokenx'\nimport { z } from 'zod'\n\nimport * as Completions from './Completions.js'\nimport type { FieldError } from './Errors.js'\nimport { IncurError, ParseError, ValidationError } from './Errors.js'\nimport * as Fetch from './Fetch.js'\nimport * as Filter from './Filter.js'\nimport * as Formatter from './Formatter.js'\nimport * as Help from './Help.js'\nimport {\n builtinCommands,\n type CommandMeta,\n findBuiltin,\n findBuiltinSubcommand,\n type Shell,\n shells,\n} from './internal/command.js'\nimport * as Command from './internal/command.js'\nimport { formatCtaBlock, type FormattedCta, type FormattedCtaBlock } from './internal/cta.js'\nimport { isRecord, suggest, toKebab } from './internal/helpers.js'\nimport * as Json from './internal/json.js'\nimport { detectRunner } from './internal/pm.js'\nimport type { OneOf } from './internal/types.js'\nimport * as Yaml from './internal/yaml.js'\nimport * as Mcp from './Mcp.js'\nimport type { Context as MiddlewareContext, Handler as MiddlewareHandler } from './middleware.js'\nimport * as Openapi from './Openapi.js'\nexport type { MiddlewareHandler }\nimport * as Parser from './Parser.js'\nimport type { Register } from './Register.js'\nimport * as Schema from './Schema.js'\nimport * as Skill from './Skill.js'\nimport * as SyncMcp from './SyncMcp.js'\nimport * as SyncSkills from './SyncSkills.js'\n\nconst destructiveCommandHint = 'Confirm with the user before executing this destructive command.'\n\n/** A CLI application instance. Also used as a command group when mounted on a parent CLI. */\nexport type Cli<\n commands extends CommandsMap = {},\n vars extends z.ZodObject<any> | undefined = undefined,\n env extends z.ZodObject<any> | undefined = undefined,\n globals extends z.ZodObject<any> | undefined = undefined,\n> = {\n /** Registers a root command or mounts a sub-CLI as a command group. */\n command: {\n /** Registers a command. Returns the CLI instance for chaining. */\n <\n const name extends string,\n const args extends z.ZodObject<any> | undefined = undefined,\n const cmdEnv extends z.ZodObject<any> | undefined = undefined,\n const options extends z.ZodObject<any> | undefined = undefined,\n const output extends z.ZodType | undefined = undefined,\n >(\n name: name,\n definition: CommandDefinition<args, cmdEnv, options, output, vars, env>,\n ): Cli<\n commands & { [key in name]: { args: InferOutput<args>; options: InferOutput<options> } },\n vars,\n env,\n globals\n >\n /** Mounts a sub-CLI as a command group. */\n <const name extends string, const sub extends CommandsMap>(\n cli: Cli<sub, any, any, any> & { name: name },\n ): Cli<\n commands & { [key in keyof sub & string as `${name} ${key}`]: sub[key] },\n vars,\n env,\n globals\n >\n /** Mounts a root CLI as a single command. */\n <\n const name extends string,\n const args extends z.ZodObject<any> | undefined,\n const opts extends z.ZodObject<any> | undefined,\n >(\n cli: Root<args, opts> & { name: name },\n ): Cli<\n commands & { [key in name]: { args: InferOutput<args>; options: InferOutput<opts> } },\n vars,\n env,\n globals\n >\n /** Mounts a fetch handler as a command, optionally with OpenAPI spec for typed subcommands. */\n <const name extends string>(\n name: name,\n definition: {\n basePath?: string | undefined\n description?: string | undefined\n fetch: FetchSource\n openapi?: Openapi.OpenAPISource | undefined\n openapiConfig?: Openapi.Config | undefined\n outputPolicy?: OutputPolicy | undefined\n },\n ): Cli<commands, vars, env, globals>\n }\n /** A short description of the CLI. */\n description?: string | undefined\n /** The env schema, if declared. Use `typeof cli.env` with `middleware<vars, env>()` for typed middleware. */\n env: env\n /** The name of the CLI application. */\n name: string\n /** Handles an incoming HTTP request, resolves the matching command, and returns a JSON Response. */\n fetch(req: Request): Promise<Response>\n /** Parses argv, runs the matched command, and writes the output envelope to stdout. */\n serve(argv?: string[], options?: serve.Options): Promise<void>\n /** Registers middleware that runs around every command. */\n use(handler: MiddlewareHandler<vars, env, globals>): Cli<commands, vars, env, globals>\n /** The vars schema, if declared. Use `typeof cli.vars` with `middleware<vars, env>()` for typed middleware. */\n vars: vars\n}\n\n/** Root CLI — a single command with no subcommands. Carries phantom generics for mounting inference. */\nexport type Root<\n _args extends z.ZodObject<any> | undefined = undefined,\n _options extends z.ZodObject<any> | undefined = undefined,\n> = Omit<Cli, 'command'>\n\n/** Extracts the commands map from the registered type. */\nexport type Commands = Register extends { commands: infer commands extends CommandsMap }\n ? commands\n : {}\n\n/** Call to action. */\nexport type Cta<commands extends CommandsMap = Commands> =\n | ([keyof commands] extends [never] ? string : (keyof commands & string) | (string & {}))\n | ([keyof commands] extends [never]\n ? {\n /** Positional arguments appended as bare values. */\n args?: Record<string, unknown> | undefined\n /** The command name to run. */\n command: string\n /** A short description of what the command does. */\n description?: string | undefined\n /** Named options formatted as `--key value` flags. */\n options?: Record<string, unknown> | undefined\n }\n :\n | {\n [name in keyof commands & string]: {\n /** Positional arguments appended as bare values. */\n args?:\n | { [key in keyof commands[name]['args']]?: commands[name]['args'][key] | true }\n | undefined\n /** The command name to run. */\n command: name\n /** A short description of what the command does. */\n description?: string | undefined\n /** Named options formatted as `--key value` flags. */\n options?:\n | {\n [key in keyof commands[name]['options']]?:\n | commands[name]['options'][key]\n | true\n }\n | undefined\n }\n }[keyof commands & string]\n | {\n /** The command name to run. */\n command: string & {}\n /** A short description of what the command does. */\n description?: string | undefined\n })\n\n/** Creates a CLI with a root handler. Can still register subcommands which take precedence. */\nexport function create<\n const args extends z.ZodObject<any> | undefined = undefined,\n const env extends z.ZodObject<any> | undefined = undefined,\n const opts extends z.ZodObject<any> | undefined = undefined,\n const output extends z.ZodType | undefined = undefined,\n const vars extends z.ZodObject<any> | undefined = undefined,\n const globals extends z.ZodObject<any> | undefined = undefined,\n>(\n name: string,\n definition: create.Options<args, env, opts, output, vars, globals> & { run: Function },\n): Cli<\n { [key in typeof name]: { args: InferOutput<args>; options: InferOutput<opts> } },\n vars,\n env,\n globals\n>\n/** Creates a router CLI that registers subcommands. */\nexport function create<\n const args extends z.ZodObject<any> | undefined = undefined,\n const env extends z.ZodObject<any> | undefined = undefined,\n const opts extends z.ZodObject<any> | undefined = undefined,\n const output extends z.ZodType | undefined = undefined,\n const vars extends z.ZodObject<any> | undefined = undefined,\n const globals extends z.ZodObject<any> | undefined = undefined,\n>(\n name: string,\n definition?: create.Options<args, env, opts, output, vars, globals>,\n): Cli<{}, vars, env, globals>\n/** Creates a CLI with a root handler from a single options object. Can still register subcommands. */\nexport function create<\n const args extends z.ZodObject<any> | undefined = undefined,\n const env extends z.ZodObject<any> | undefined = undefined,\n const opts extends z.ZodObject<any> | undefined = undefined,\n const output extends z.ZodType | undefined = undefined,\n const vars extends z.ZodObject<any> | undefined = undefined,\n const globals extends z.ZodObject<any> | undefined = undefined,\n>(\n definition: create.Options<args, env, opts, output, vars, globals> & {\n name: string\n run: Function\n },\n): Cli<\n {\n [key in (typeof definition)['name']]: { args: InferOutput<args>; options: InferOutput<opts> }\n },\n vars,\n env,\n globals\n>\n/** Creates a router CLI from a single options object (e.g. package.json). */\nexport function create<\n const args extends z.ZodObject<any> | undefined = undefined,\n const env extends z.ZodObject<any> | undefined = undefined,\n const opts extends z.ZodObject<any> | undefined = undefined,\n const output extends z.ZodType | undefined = undefined,\n const vars extends z.ZodObject<any> | undefined = undefined,\n const globals extends z.ZodObject<any> | undefined = undefined,\n>(\n definition: create.Options<args, env, opts, output, vars, globals> & { name: string },\n): Cli<{}, vars, env, globals>\nexport function create(\n nameOrDefinition: string | (any & { name: string }),\n definition?: any,\n): Cli | Root {\n const name = typeof nameOrDefinition === 'string' ? nameOrDefinition : nameOrDefinition.name\n const def = typeof nameOrDefinition === 'string' ? (definition ?? {}) : nameOrDefinition\n const rootDef = 'run' in def ? (def as CommandDefinition<any, any, any>) : undefined\n const rootFetchSource =\n 'fetch' in def && def.fetch !== undefined ? (def.fetch as FetchSource) : undefined\n const rootFetch = rootFetchSource === undefined ? undefined : resolveFetch(rootFetchSource)\n const rootFetchBaseUrl = rootFetchSource === undefined ? undefined : fetchBaseUrl(rootFetchSource)\n\n const commands = new Map<string, CommandEntry>()\n const middlewares: MiddlewareHandler[] = []\n const pending: Promise<void>[] = []\n const mcpHandler = createMcpHttpHandler(name, def.version ?? '0.0.0', {\n stateless: def.mcp?.stateless,\n })\n\n if (def.openapi && rootFetch) {\n pending.push(\n (async () => {\n const spec = await Openapi.resolve(def.openapi, { baseUrl: rootFetchBaseUrl })\n const generated = await Openapi.generateCommands(spec, rootFetch, {\n config: def.openapiConfig,\n })\n for (const [name, command] of generated) commands.set(name, command)\n })(),\n )\n }\n\n const cli: Cli = {\n name,\n description: def.description,\n env: def.env,\n vars: def.vars,\n\n command(nameOrCli: any, def?: any): any {\n if (typeof nameOrCli === 'string') {\n if (def && 'fetch' in def && isFetchSource(def.fetch)) {\n const fetch = resolveFetch(def.fetch)\n // OpenAPI + fetch → generate typed command group (async, resolved before serve)\n if (def.openapi) {\n pending.push(\n (async () => {\n const spec = await Openapi.resolve(def.openapi, {\n baseUrl: fetchBaseUrl(def.fetch),\n })\n const generated = await Openapi.generateCommands(spec, fetch, {\n basePath: def.basePath,\n config: def.openapiConfig,\n })\n const entry = {\n _group: true,\n description: def.description,\n commands: generated as Map<string, CommandEntry>,\n ...(def.outputPolicy ? { outputPolicy: def.outputPolicy } : undefined),\n } as InternalGroup\n assertNoGlobalOptionConflicts(nameOrCli, entry, toGlobals.get(cli))\n commands.set(nameOrCli, entry)\n })(),\n )\n return cli\n }\n commands.set(nameOrCli, {\n _fetch: true,\n basePath: def.basePath,\n description: def.description,\n fetch,\n ...(def.outputPolicy ? { outputPolicy: def.outputPolicy } : undefined),\n } as InternalFetchGateway)\n return cli\n }\n assertNoGlobalOptionConflicts(nameOrCli, def, toGlobals.get(cli))\n commands.set(nameOrCli, def)\n if (def.aliases)\n for (const a of def.aliases) commands.set(a, { _alias: true, target: nameOrCli })\n return cli\n }\n const mountedRootDef = toRootDefinition.get(nameOrCli)\n if (mountedRootDef) {\n assertNoGlobalOptionConflicts(nameOrCli.name, mountedRootDef, toGlobals.get(cli))\n commands.set(nameOrCli.name, mountedRootDef)\n const rootAliases = toRootAliases.get(nameOrCli)\n if (rootAliases)\n for (const a of rootAliases) commands.set(a, { _alias: true, target: nameOrCli.name })\n return cli\n }\n const sub = nameOrCli as Cli\n const subCommands = toCommands.get(sub)!\n const subOutputPolicy = toOutputPolicy.get(sub)\n const subMiddlewares = toMiddlewares.get(sub)\n const entry = {\n _group: true,\n description: sub.description,\n commands: subCommands,\n ...(subOutputPolicy ? { outputPolicy: subOutputPolicy } : undefined),\n ...(subMiddlewares?.length ? { middlewares: subMiddlewares } : undefined),\n } as InternalGroup\n assertNoGlobalOptionConflicts(sub.name, entry, toGlobals.get(cli))\n commands.set(sub.name, entry)\n return cli\n },\n\n async fetch(req: Request) {\n if (pending.length > 0) await Promise.all(pending)\n const globalsDesc = toGlobals.get(cli)\n return fetchImpl(name, commands, req, {\n description: def.description,\n envSchema: def.env,\n globals: globalsDesc,\n mcpHandler,\n middlewares,\n name,\n rootCommand: rootDef,\n vars: def.vars,\n version: def.version,\n })\n },\n\n async serve(argv = process.argv.slice(2), serveOptions: serve.Options = {}) {\n if (pending.length > 0) await Promise.all(pending)\n const globalsDesc = toGlobals.get(cli)\n return serveImpl(name, commands, argv, {\n ...serveOptions,\n aliases: def.aliases,\n banner: def.banner,\n config: def.config,\n description: def.description,\n envSchema: def.env,\n format: def.format,\n globals: globalsDesc,\n mcp: def.mcp,\n middlewares,\n outputPolicy: def.outputPolicy,\n renderer: def.renderer,\n rootCommand: rootDef,\n rootFetch,\n sync: def.sync,\n vars: def.vars,\n version: def.version,\n })\n },\n\n use(handler: MiddlewareHandler): any {\n middlewares.push(handler)\n return cli\n },\n }\n\n if (rootDef) toRootDefinition.set(cli as unknown as Root, rootDef)\n if (rootDef && def.aliases) toRootAliases.set(cli as unknown as Root, def.aliases)\n if (def.options) toRootOptions.set(cli, def.options)\n if (def.config !== undefined) toConfigEnabled.set(cli, true)\n if (def.outputPolicy) toOutputPolicy.set(cli, def.outputPolicy)\n if (def.globals) {\n toGlobals.set(cli, { schema: def.globals, alias: def.globalAlias as any })\n const builtinNames = [\n 'verbose',\n 'format',\n 'json',\n 'llms',\n 'llmsFull',\n 'mcp',\n 'help',\n 'version',\n 'schema',\n 'filterOutput',\n 'tokenLimit',\n 'tokenOffset',\n 'tokenCount',\n ...(def.config?.flag\n ? [def.config.flag, `no${def.config.flag[0].toUpperCase()}${def.config.flag.slice(1)}`]\n : []),\n ]\n const globalKeys = Object.keys(def.globals.shape)\n for (const key of globalKeys) {\n if (builtinNames.includes(key))\n throw new Error(\n `Global option '${key}' conflicts with a built-in flag. Choose a different name.`,\n )\n }\n // Check globalAlias values against reserved short aliases\n const reservedShorts = new Set(['h'])\n if (def.globalAlias) {\n for (const [name, short] of Object.entries(def.globalAlias as Record<string, string>)) {\n if (reservedShorts.has(short))\n throw new Error(\n `Global alias '-${short}' for '${name}' conflicts with a built-in short flag. Choose a different alias.`,\n )\n }\n }\n }\n toMiddlewares.set(cli, middlewares)\n toCommands.set(cli, commands)\n return cli\n}\n\nexport declare namespace create {\n /** Options for creating a CLI. Provide `run` for a leaf CLI, omit it for a router. */\n type Options<\n args extends z.ZodObject<any> | undefined = undefined,\n env extends z.ZodObject<any> | undefined = undefined,\n options extends z.ZodObject<any> | undefined = undefined,\n output extends z.ZodType | undefined = undefined,\n vars extends z.ZodObject<any> | undefined = undefined,\n globals extends z.ZodObject<any> | undefined = undefined,\n > = {\n /** Map of option names to single-char aliases. */\n alias?: options extends z.ZodObject<any>\n ? Partial<Record<keyof z.output<options>, string>>\n : Record<string, string> | undefined\n /** Alternative binary names for this CLI (e.g. shorter aliases in package.json `bin`). Shell completions are registered for all names. */\n aliases?: string[] | undefined\n /**\n * Text to display above root help output (e.g. branding, live status). Only called when the CLI is invoked with no subcommand. Errors are silently swallowed.\n *\n * Pass a function for all consumers, or an object with `mode` to target `'human'`, `'agent'`, or `'all'` (default).\n */\n banner?:\n | (() => string | undefined | Promise<string | undefined>)\n | {\n render: () => string | undefined | Promise<string | undefined>\n /** @default 'all' */\n mode?: 'all' | 'human' | 'agent' | undefined\n }\n | undefined\n /** Zod schema for positional arguments. */\n args?: args | undefined\n /** Enable config-file defaults for command options. */\n config?:\n | {\n /** Global flag name for specifying a config file path (e.g. `'config'` → `--config <path>`). Omit to auto-load only, with no CLI flag. */\n flag?: string | undefined\n /** Ordered list of file paths to search. First existing file wins. Supports `~` for home dir. Defaults to `['<cli>.json']` relative to cwd. */\n files?: string[] | undefined\n /** Custom config loader. Receives the resolved file path (or `undefined` if no file was found). Returns the parsed config tree, or `undefined` for no defaults. When omitted, the framework reads and parses JSON. */\n loader?:\n | ((\n path: string | undefined,\n ) =>\n | Record<string, unknown>\n | undefined\n | Promise<Record<string, unknown> | undefined>)\n | undefined\n }\n | undefined\n /** A short description of what the CLI does. */\n description?: string | undefined\n /** Marks the root command as destructive when generating agent skills. */\n destructive?: boolean | undefined\n /** Zod schema for environment variables. Keys are the variable names (e.g. `NPM_TOKEN`). */\n env?: env | undefined\n /** Usage examples for this command. */\n examples?: Example<args, options>[] | undefined\n /** A fetch handler or hosted fetch source to use as the root command. All argv tokens are interpreted as path segments and curl-style flags. */\n fetch?: FetchSource | undefined\n /** OpenAPI spec source used to generate typed root commands for the root fetch handler. */\n openapi?: Openapi.OpenAPISource | undefined\n /** Configuration for generated OpenAPI commands. */\n openapiConfig?: Openapi.Config | undefined\n /** Default output format. Overridden by `--format` or `--json`. */\n format?: Formatter.Format | undefined\n /** Plain text hint displayed after examples and before global options. */\n hint?: string | undefined\n /** Map of global option names to single-char aliases. */\n globalAlias?: globals extends z.ZodObject<any>\n ? Partial<Record<keyof z.output<globals>, string>>\n : Record<string, string> | undefined\n /** Zod schema for global options available to all commands. Parsed before command resolution and passed to middleware and command handlers. */\n globals?: globals | undefined\n /** Zod schema for named options/flags. */\n options?: options | undefined\n /** Zod schema for the return value. */\n output?: output | undefined\n /**\n * Controls when output data is displayed. Inherited by child commands when set on a group or root CLI.\n *\n * - `'all'` — displays to both humans and agents.\n * - `'agent-only'` — suppresses data output in human/TTY mode while still returning it to agents.\n *\n * @default 'all'\n */\n outputPolicy?: OutputPolicy | undefined\n /**\n * Custom renderer for human/TTY output mode.\n * Called with the raw output data when no explicit `--format` flag was passed.\n * Return a string to display it, or `null` to fall back to the default TOON formatter.\n * Has no effect in agent/piped mode or when `--format` is set explicitly.\n */\n renderer?: ((data: unknown) => string | null) | undefined\n /** Alternative usage patterns shown in help output. */\n usage?: Usage<args, options>[] | undefined\n /** Zod schema for middleware variables. Keys define variable names, schemas define types and defaults. */\n vars?: vars | undefined\n /** The root command handler. When provided, creates a leaf CLI with no subcommands. */\n run?:\n | ((context: {\n /** Whether the consumer is an agent (stdout is not a TTY). */\n agent: boolean\n /** Positional arguments. */\n args: InferOutput<args>\n /** The binary name the user invoked (e.g. an alias). Falls back to `name` when not resolvable. */\n displayName: string\n /** Parsed environment variables. */\n env: InferOutput<env>\n /** Return an error result with optional CTAs. */\n error: (options: {\n code: string\n cta?: CtaBlock | undefined\n exitCode?: number | undefined\n message: string\n retryable?: boolean | undefined\n }) => never\n /** The resolved output format (e.g. `'toon'`, `'json'`, `'jsonl'`). */\n format: Formatter.Format\n /** Whether the user explicitly passed `--format` or `--json`. */\n formatExplicit: boolean\n /** The CLI name. */\n name: string\n /** Return a success result with optional metadata (e.g. CTAs). */\n ok: (data: InferReturn<output>, meta?: { cta?: CtaBlock | undefined }) => never\n options: InferOutput<options>\n /** Variables set by middleware. */\n var: InferVars<vars>\n }) =>\n | InferReturn<output>\n | Promise<InferReturn<output>>\n | AsyncGenerator<InferReturn<output>, unknown, unknown>)\n | undefined\n /** Options for MCP integration. */\n mcp?:\n | {\n /** Target specific agents by default (e.g. `['claude-code', 'cursor']`). */\n agents?: string[] | undefined\n /** Override the command agents will run to start the MCP server. Auto-detected if omitted. */\n command?: string | undefined\n /** Instructions describing how to use the server and its features. */\n instructions?: string | undefined\n /** Disable HTTP MCP session management. Defaults to `true`. */\n stateless?: boolean | undefined\n }\n | undefined\n /** Options for the built-in `skills add` command. */\n sync?:\n | {\n /** Working directory for resolving `include` globs. Pass `import.meta.dirname` when running from a bin entry. Defaults to `process.cwd()`. */\n cwd?: string | undefined\n /** Default grouping depth for skill files. Overridden by `--depth`. Defaults to `1`. */\n depth?: number | undefined\n /** Glob patterns for directories containing SKILL.md files to include (e.g. `\"skills/*\"`, `\"my-skill\"`). */\n include?: string[] | undefined\n /** Example prompts shown after sync to help users get started. */\n suggestions?: string[] | undefined\n }\n | undefined\n /** The CLI version string. */\n version?: string | undefined\n }\n}\n\nexport declare namespace serve {\n /** Options for `serve()`, primarily used for testing. */\n type Options = {\n /** Override environment variable source. Defaults to `process.env`. */\n env?: Record<string, string | undefined> | undefined\n /** Override exit handler. Defaults to `process.exit`. */\n exit?: ((code: number) => void) | undefined\n /** Override stdout writer. Defaults to `process.stdout.write`. */\n stdout?: ((s: string) => void) | undefined\n }\n}\n\n/** @internal Shared serve implementation for both router and leaf CLIs. */\n// biome-ignore lint/correctness/noUnusedVariables: _\nasync function serveImpl(\n name: string,\n commands: Map<string, CommandEntry>,\n argv: string[],\n options: serveImpl.Options = {},\n) {\n const stdout = options.stdout ?? ((s: string) => process.stdout.write(s))\n const exit = options.exit ?? ((code: number) => process.exit(code))\n const human = process.stdout.isTTY === true\n const configEnabled = options.config !== undefined\n const configFlag = options.config?.flag\n const displayName = resolveDisplayName(name, options.aliases)\n\n function writeln(s: string) {\n stdout(s.endsWith('\\n') ? s : `${s}\\n`)\n }\n\n async function writeBanner() {\n if (!options.banner || help) return\n const banner =\n typeof options.banner === 'function'\n ? { render: options.banner, mode: 'all' as const }\n : options.banner\n const mode = banner.mode ?? 'all'\n if (mode !== 'all' && mode !== (human ? 'human' : 'agent')) return\n try {\n const text = await banner.render()\n if (text) writeln(text)\n } catch {}\n }\n\n let builtinFlags: ReturnType<typeof extractBuiltinFlags>\n try {\n builtinFlags = extractBuiltinFlags(argv, { configFlag })\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n if (human) writeln(formatHumanError({ code: 'UNKNOWN', message }))\n else writeln(Formatter.format({ code: 'UNKNOWN', message }, 'toon'))\n exit(1)\n return\n }\n\n const {\n fullOutput,\n format: formatFlag,\n formatExplicit,\n filterOutput,\n tokenLimit,\n tokenOffset,\n tokenCount,\n llms,\n llmsFull,\n mcp: mcpFlag,\n help,\n version,\n schema,\n configPath,\n configDisabled,\n rest,\n } = builtinFlags\n\n let globals: Record<string, unknown> = {}\n let filtered = rest\n\n function parseGlobalOptions(validate: boolean) {\n if (!options.globals) return true\n try {\n const result = Parser.parseGlobals(rest, options.globals.schema, options.globals.alias, {\n validate,\n })\n if (validate) globals = result.parsed\n filtered = result.rest\n return true\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n if (human) writeln(formatHumanError({ code: 'UNKNOWN', message }))\n else writeln(Formatter.format({ code: 'UNKNOWN', message }, 'toon'))\n exit(1)\n return false\n }\n }\n\n if (!parseGlobalOptions(false)) return\n\n // Pre-load yaml for the sync formatting paths below (yaml is loaded lazily -- see internal/yaml.ts).\n if (formatFlag === 'yaml') await Yaml.load()\n\n // --mcp: start as MCP stdio server\n if (mcpFlag) {\n await Mcp.serve(name, options.version ?? '0.0.0', commands, {\n middlewares: options.middlewares,\n env: options.envSchema,\n vars: options.vars,\n version: options.version,\n ...(options.mcp?.instructions ? { instructions: options.mcp.instructions } : undefined),\n })\n return\n }\n\n // COMPLETE: dynamic shell completions (called by shell hook at tab-press)\n const completeShell = process.env.COMPLETE as Shell | undefined\n if (completeShell) {\n // Remove separator `--` from argv\n const sepIdx = argv.indexOf('--')\n const words = sepIdx !== -1 ? argv.slice(sepIdx + 1) : argv\n if (words.length === 0) {\n // Registration mode: print shell hook script for primary name + aliases\n const names = [name, ...(options.aliases ?? [])]\n stdout(names.map((n) => Completions.register(completeShell, n)).join('\\n'))\n } else {\n const index = Number(process.env._COMPLETE_INDEX ?? words.length - 1)\n const candidates = Completions.complete(\n commands,\n options.rootCommand,\n words,\n index,\n options.globals\n ? { schema: options.globals.schema, alias: options.globals.alias }\n : undefined,\n )\n // Add built-in commands (completions, mcp, skills) to completions\n const current = words[index] ?? ''\n const nonFlags = words.slice(0, index).filter((w) => !w.startsWith('-'))\n if (nonFlags.length <= 1) {\n for (const b of builtinCommands) {\n if (b.name.startsWith(current) && !candidates.some((c) => c.value === b.name))\n candidates.push({\n value: b.name,\n description: b.description,\n ...(b.subcommands ? { noSpace: true } : undefined),\n })\n }\n } else if (nonFlags.length === 2) {\n const parent = nonFlags[nonFlags.length - 1]!\n const builtin = findBuiltin(parent)\n if (builtin?.subcommands)\n for (const sub of builtin.subcommands)\n for (const value of [sub.name, ...(sub.aliases ?? [])])\n if (value.startsWith(current) && !candidates.some((c) => c.value === value))\n candidates.push({ value, description: sub.description })\n }\n const out = Completions.format(completeShell, candidates)\n if (out) stdout(out)\n }\n return\n }\n\n // Skills staleness check (skip for built-in commands)\n let skillsCta: FormattedCtaBlock | undefined\n if (!llms && !llmsFull && !schema && !help && !version) {\n const isSkillsAdd = builtinIdx(filtered, name, 'skills') !== -1\n const isMcpAdd = builtinIdx(filtered, name, 'mcp') !== -1\n if (!isSkillsAdd && !isMcpAdd) {\n const stored = SyncSkills.readHash(name)\n if (stored && SyncSkills.hasInstalledSkills(name, { cwd: options.sync?.cwd })) {\n const groups = new Map<string, string>()\n const entries = collectSkillCommands(commands, [], groups, options.rootCommand)\n if (Skill.hash(entries) !== stored) {\n const command =\n process.env.npm_config_user_agent || process.env.npm_execpath\n ? `${detectRunner()} ${SyncMcp.detectPackageSpecifier(name)} skills add`\n : `${displayName} skills add`\n skillsCta = {\n description: 'Skills are out of date:',\n commands: [{ command, description: 'sync outdated skills' }],\n }\n }\n }\n }\n }\n\n if (llms || llmsFull) {\n // Scope to a subtree if command tokens are provided\n let scopedCommands = commands\n const prefix: string[] = []\n let scopedDescription: string | undefined = options.description\n for (const token of filtered) {\n const rawEntry = scopedCommands.get(token)\n if (!rawEntry) break\n const entry = resolveAlias(scopedCommands, rawEntry)\n if (isGroup(entry)) {\n scopedCommands = entry.commands\n scopedDescription = entry.description\n prefix.push(token)\n } else {\n // Leaf command — scope to just this command\n scopedCommands = new Map([[token, entry]])\n break\n }\n }\n\n const scopedRoot = prefix.length === 0 ? options.rootCommand : undefined\n // Markdown skill output renders scopedName separately. Passing prefix again\n // to those collect helpers would double the group segment in command names\n // (e.g. \"cli auth auth login\" instead of \"cli auth login\").\n const collectPrefix = prefix.length > 0 ? ([] as string[]) : prefix\n\n if (llmsFull) {\n if (!formatExplicit || formatFlag === 'md') {\n const groups = new Map<string, string>()\n const cmds = collectSkillCommands(scopedCommands, collectPrefix, groups, scopedRoot)\n const scopedName = prefix.length > 0 ? `${name} ${prefix.join(' ')}` : name\n writeln(Skill.generate(scopedName, cmds, groups))\n return\n }\n writeln(\n Formatter.format(\n buildManifest(scopedCommands, prefix, options.globals?.schema),\n formatFlag,\n ),\n )\n return\n }\n\n if (!formatExplicit || formatFlag === 'md') {\n const groups = new Map<string, string>()\n const cmds = collectSkillCommands(scopedCommands, collectPrefix, groups, scopedRoot)\n const scopedName = prefix.length > 0 ? `${name} ${prefix.join(' ')}` : name\n writeln(Skill.index(scopedName, cmds, scopedDescription))\n return\n }\n writeln(\n Formatter.format(\n buildIndexManifest(scopedCommands, prefix, options.globals?.schema),\n formatFlag,\n ),\n )\n return\n }\n\n // completions <shell>: print shell hook script to stdout\n const completionsIdx = builtinIdx(filtered, name, 'completions')\n if (completionsIdx !== -1) {\n const shell = filtered[completionsIdx + 1]\n if (help || !shell) {\n const b = findBuiltin('completions')!\n writeln(\n Help.formatCommand(`${name} completions`, {\n args: b.args,\n description: b.description,\n hideGlobalOptions: true,\n hint: b.hint?.(name),\n }),\n )\n return\n }\n if (!shells.includes(shell as any)) {\n writeln(\n formatHumanError({\n code: 'INVALID_SHELL',\n message: `Unknown shell '${shell}'. Supported: ${shells.join(', ')}`,\n }),\n )\n exit(1)\n return\n }\n const names = [name, ...(options.aliases ?? [])]\n writeln(names.map((n) => Completions.register(shell as Shell, n)).join('\\n'))\n return\n }\n\n // skills add: generate skill files and install via `<pm>x skills add` (only when sync is configured)\n const skillsIdx = builtinIdx(filtered, name, 'skills')\n if (skillsIdx !== -1) {\n const builtin = findBuiltin('skills')!\n const skillsSub = filtered[skillsIdx + 1]\n const sub = skillsSub ? findBuiltinSubcommand(builtin, skillsSub) : undefined\n if (skillsSub && !sub) {\n const candidates =\n builtin.subcommands?.flatMap((sub) => [sub.name, ...(sub.aliases ?? [])]) ?? []\n const suggestion = suggest(skillsSub, candidates)\n const didYouMean = suggestion ? ` Did you mean '${suggestion}'?` : ''\n const message = `'${skillsSub}' is not a command for '${name} skills'.${didYouMean}`\n const ctaCommands: FormattedCta[] = []\n if (suggestion) {\n const corrected = argv.map((t) => (t === skillsSub ? suggestion : t))\n ctaCommands.push({ command: `${name} ${corrected.join(' ')}` })\n }\n ctaCommands.push({\n command: `${name} skills --help`,\n description: 'see all available commands',\n })\n const cta: FormattedCtaBlock = {\n description: ctaCommands.length === 1 ? 'Suggested command:' : 'Suggested commands:',\n commands: ctaCommands,\n }\n if (human) {\n writeln(formatHumanError({ code: 'COMMAND_NOT_FOUND', message }))\n writeln(formatHumanCta(cta))\n } else writeln(Formatter.format({ code: 'COMMAND_NOT_FOUND', message, cta }, 'toon'))\n exit(1)\n return\n }\n if (!skillsSub) {\n writeln(formatBuiltinHelp(name, builtin))\n return\n }\n if (sub?.name === 'list') {\n if (help) {\n writeln(formatBuiltinSubcommandHelp(name, builtin, 'list'))\n return\n }\n try {\n const result = await SyncSkills.list(name, commands, {\n cwd: options.sync?.cwd,\n depth: options.sync?.depth ?? 1,\n description: options.description,\n include: options.sync?.include,\n rootCommand: options.rootCommand,\n })\n if (result.length === 0) {\n writeln('No skills found.')\n return\n }\n const lines: string[] = []\n const maxLen = Math.max(...result.map((s) => s.name.length))\n for (const s of result) {\n const icon = s.installed ? '✓' : '✗'\n const padding = s.description\n ? `${' '.repeat(maxLen - s.name.length)} ${s.description}`\n : ''\n lines.push(` ${icon} ${s.name}${padding}`)\n }\n const installedCount = result.filter((s) => s.installed).length\n lines.push('')\n lines.push(\n `${result.length} skill${result.length === 1 ? '' : 's'} (${installedCount} installed)`,\n )\n writeln(lines.join('\\n'))\n } catch (err) {\n writeln(\n Formatter.format(\n {\n code: 'LIST_SKILLS_FAILED',\n message: err instanceof Error ? err.message : String(err),\n },\n formatExplicit ? formatFlag : 'toon',\n ),\n )\n exit(1)\n }\n return\n }\n if (help) {\n writeln(formatBuiltinSubcommandHelp(name, builtin, 'add'))\n return\n }\n const rest = filtered.slice(skillsIdx + 2)\n const depthArg = rest.indexOf('--depth')\n const depthEq = rest.find((t) => t.startsWith('--depth='))\n const depth =\n depthArg !== -1\n ? Number(rest[depthArg + 1])\n : depthEq\n ? Number(depthEq.split('=')[1])\n : (options.sync?.depth ?? 1)\n const global = rest.includes('--no-global') ? false : undefined\n try {\n stdout('Syncing...')\n const result = await SyncSkills.sync(name, commands, {\n cwd: options.sync?.cwd,\n depth,\n description: options.description,\n global,\n include: options.sync?.include,\n rootCommand: options.rootCommand,\n })\n stdout('\\r\\x1b[K')\n const lines: string[] = []\n const skillLabel = (s: (typeof result.skills)[number]) => s.name\n const maxLen = Math.max(...result.skills.map((s) => skillLabel(s).length))\n for (const s of result.skills) {\n const label = skillLabel(s)\n const padding = s.description\n ? `${' '.repeat(maxLen - label.length)} ${s.description}`\n : ''\n lines.push(` ✓ ${label}${padding}`)\n }\n lines.push('')\n lines.push(`${result.skills.length} skill${result.skills.length === 1 ? '' : 's'} synced`)\n const suggestions = options.sync?.suggestions\n if (suggestions && suggestions.length > 0) {\n lines.push('')\n lines.push(`Your agent can now use ${name}. Try asking:`)\n for (const s of suggestions) lines.push(` \"${s}\"`)\n }\n lines.push('')\n lines.push(`Run \\`${name} --help\\` to see the full command reference.`)\n writeln(lines.join('\\n'))\n if (fullOutput || formatExplicit) {\n const output: Record<string, unknown> = { skills: result.paths }\n if (fullOutput && result.agents.length > 0) output.agents = result.agents\n writeln(Formatter.format(output, formatExplicit ? formatFlag : 'toon'))\n }\n } catch (err) {\n writeln(\n Formatter.format(\n { code: 'SYNC_SKILLS_FAILED', message: err instanceof Error ? err.message : String(err) },\n formatExplicit ? formatFlag : 'toon',\n ),\n )\n exit(1)\n }\n return\n }\n\n // mcp add/doctor: register or smoke-test CLI MCP server integration.\n const mcpIdx = builtinIdx(filtered, name, 'mcp')\n if (mcpIdx !== -1) {\n const builtin = findBuiltin('mcp')!\n const mcpSub = filtered[mcpIdx + 1]\n const sub = mcpSub ? findBuiltinSubcommand(builtin, mcpSub) : undefined\n if (mcpSub && !sub) {\n const candidates =\n builtin.subcommands?.flatMap((sub) => [sub.name, ...(sub.aliases ?? [])]) ?? []\n const suggestion = suggest(mcpSub, candidates)\n const didYouMean = suggestion ? ` Did you mean '${suggestion}'?` : ''\n const message = `'${mcpSub}' is not a command for '${name} mcp'.${didYouMean}`\n const ctaCommands: FormattedCta[] = []\n if (suggestion) {\n const corrected = argv.map((t) => (t === mcpSub ? suggestion : t))\n ctaCommands.push({ command: `${name} ${corrected.join(' ')}` })\n }\n ctaCommands.push({ command: `${name} mcp --help`, description: 'see all available commands' })\n const cta: FormattedCtaBlock = {\n description: ctaCommands.length === 1 ? 'Suggested command:' : 'Suggested commands:',\n commands: ctaCommands,\n }\n if (human) {\n writeln(formatHumanError({ code: 'COMMAND_NOT_FOUND', message }))\n writeln(formatHumanCta(cta))\n } else writeln(Formatter.format({ code: 'COMMAND_NOT_FOUND', message, cta }, 'toon'))\n exit(1)\n return\n }\n if (!mcpSub) {\n writeln(formatBuiltinHelp(name, builtin))\n return\n }\n if (help) {\n writeln(formatBuiltinSubcommandHelp(name, builtin, sub!.name))\n return\n }\n if (sub!.name === 'doctor') {\n const result = await runMcpDoctor(name, commands, options)\n writeln(Formatter.format(result, formatExplicit ? formatFlag : 'toon'))\n if (!result.ok) exit(1)\n return\n }\n const rest = filtered.slice(mcpIdx + 2)\n const global = rest.includes('--no-global') ? false : true\n\n // Parse --command / -c and --agent flags from argv\n let command = options.mcp?.command\n const agents: string[] = [...(options.mcp?.agents ?? [])]\n for (let i = 0; i < rest.length; i++) {\n if ((rest[i] === '--command' || rest[i] === '-c') && rest[i + 1]) command = rest[++i]!\n else if (rest[i] === '--agent' && rest[i + 1]) agents.push(rest[++i]!)\n }\n\n try {\n stdout('Registering MCP server...')\n const result = await SyncMcp.register(name, {\n command,\n global,\n agents,\n })\n stdout('\\r\\x1b[K')\n const lines: string[] = []\n lines.push(`✓ Registered ${name} as MCP server`)\n if (result.agents.length > 0) lines.push(` Agents: ${result.agents.join(', ')}`)\n lines.push('')\n lines.push(`Agents can now use ${name} tools.`)\n const suggestions = options.sync?.suggestions\n if (suggestions && suggestions.length > 0) {\n lines.push('')\n lines.push('Try asking:')\n for (const s of suggestions) lines.push(` \"${s}\"`)\n }\n writeln(lines.join('\\n'))\n if (fullOutput || formatExplicit)\n writeln(\n Formatter.format(\n { name, command: result.command, agents: result.agents },\n formatExplicit ? formatFlag : 'toon',\n ),\n )\n } catch (err) {\n writeln(\n Formatter.format(\n { code: 'MCP_ADD_FAILED', message: err instanceof Error ? err.message : String(err) },\n formatExplicit ? formatFlag : 'toon',\n ),\n )\n exit(1)\n }\n return\n }\n\n // --help takes precedence over --version\n if (version && !help && options.version) {\n writeln(options.version)\n return\n }\n\n if (filtered.length === 0) {\n if (\n options.rootCommand &&\n human &&\n options.rootCommand.args &&\n hasRequiredArgs(options.rootCommand.args)\n ) {\n // Root command with args but none provided (human mode) — show help\n const cmd = options.rootCommand\n await writeBanner()\n writeln(\n Help.formatCommand(name, {\n alias: cmd.alias as Record<string, string> | undefined,\n aliases: options.aliases,\n configFlag,\n description: cmd.description ?? options.description,\n globals: options.globals,\n version: options.version,\n args: cmd.args,\n env: cmd.env,\n envSource: options.env,\n hint: cmd.hint,\n options: cmd.options,\n examples: formatExamples(cmd.examples),\n usage: cmd.usage,\n commands: commands.size > 0 ? collectHelpCommands(commands) : undefined,\n root: true,\n }),\n )\n return\n }\n if (options.rootCommand || options.rootFetch) {\n // Root command/fetch with no args — treat as root invocation\n } else {\n await writeBanner()\n writeln(\n Help.formatRoot(name, {\n aliases: options.aliases,\n configFlag,\n description: options.description,\n globals: options.globals,\n version: options.version,\n commands: collectHelpCommands(commands),\n root: true,\n }),\n )\n return\n }\n }\n\n const resolved =\n filtered.length === 0 && options.rootCommand\n ? { command: options.rootCommand, path: name, rest: [] as string[] }\n : filtered.length === 0 && options.rootFetch\n ? {\n fetchGateway: {\n _fetch: true as const,\n fetch: options.rootFetch,\n description: options.description,\n },\n middlewares: [] as MiddlewareHandler[],\n path: name,\n rest: [] as string[],\n }\n : resolveCommand(commands, filtered)\n\n // --help on a fetch gateway → show fetch-specific help\n if (help && 'fetchGateway' in resolved) {\n const commandName = resolved.path === name ? name : `${name} ${resolved.path}`\n if (resolved.path === name && commands.size > 0)\n writeln(\n Help.formatRoot(name, {\n aliases: options.aliases,\n configFlag,\n description: options.description,\n version: options.version,\n commands: collectHelpCommands(commands),\n root: true,\n }),\n )\n else writeln(formatFetchHelp(commandName, resolved.fetchGateway.description))\n return\n }\n\n // --help after a command → show help for that command\n if (help) {\n if ('help' in resolved || 'error' in resolved) {\n // group or unknown → show root help for that path\n const helpName = 'help' in resolved ? `${name} ${resolved.path}` : name\n const helpDesc = 'help' in resolved ? resolved.description : options.description\n const helpCmds = 'help' in resolved ? resolved.commands : commands\n const isRoot = helpName === name\n // Root with both a handler and subcommands → show command help with subcommands\n if (isRoot && options.rootCommand && helpCmds.size > 0) {\n const cmd = options.rootCommand\n writeln(\n Help.formatCommand(name, {\n alias: cmd.alias as Record<string, string> | undefined,\n aliases: options.aliases,\n configFlag,\n description: cmd.description ?? options.description,\n globals: options.globals,\n version: options.version,\n args: cmd.args,\n env: cmd.env,\n envSource: options.env,\n hint: cmd.hint,\n options: cmd.options,\n examples: formatExamples(cmd.examples),\n usage: cmd.usage,\n commands: collectHelpCommands(helpCmds),\n root: true,\n }),\n )\n } else {\n writeln(\n Help.formatRoot(helpName, {\n aliases: isRoot ? options.aliases : undefined,\n configFlag,\n description: helpDesc,\n globals: options.globals,\n version: isRoot ? options.version : undefined,\n commands: collectHelpCommands(helpCmds),\n root: isRoot,\n }),\n )\n }\n } else if ('command' in resolved) {\n const cmd = resolved.command\n const isRootCmd = resolved.path === name\n const commandName = isRootCmd ? name : `${name} ${resolved.path}`\n const helpSubcommands =\n isRootCmd && options.rootCommand && commands.size > 0\n ? collectHelpCommands(commands)\n : undefined\n writeln(\n Help.formatCommand(commandName, {\n alias: cmd.alias as Record<string, string> | undefined,\n aliases: isRootCmd ? options.aliases : cmd.aliases,\n configFlag,\n description: cmd.description,\n globals: options.globals,\n version: isRootCmd ? options.version : undefined,\n args: cmd.args,\n env: cmd.env,\n envSource: options.env,\n hint: cmd.hint,\n options: cmd.options,\n examples: formatExamples(cmd.examples),\n usage: cmd.usage,\n commands: helpSubcommands,\n root: isRootCmd,\n }),\n )\n }\n return\n }\n\n // --schema: output JSON Schema for a command's args, env, options, output\n if (schema) {\n if ('help' in resolved) {\n writeln(\n Help.formatRoot(`${name} ${resolved.path}`, {\n configFlag,\n description: resolved.description,\n globals: options.globals,\n commands: collectHelpCommands(resolved.commands),\n }),\n )\n return\n }\n if ('error' in resolved) {\n const parent = resolved.path ? `${name} ${resolved.path}` : name\n const suggestion = suggest(resolved.error, resolved.commands.keys())\n const didYouMean = suggestion ? ` Did you mean '${suggestion}'?` : ''\n writeln(`Error: '${resolved.error}' is not a command for '${parent}'.${didYouMean}`)\n exit(1)\n return\n }\n if ('fetchGateway' in resolved) {\n writeln('--schema is not supported for fetch commands.')\n exit(1)\n return\n }\n const cmd = resolved.command\n const format = formatExplicit ? formatFlag : 'toon'\n const result: Record<string, unknown> = {}\n if (cmd.args) result.args = Schema.toJsonSchema(cmd.args)\n if (cmd.env) result.env = Schema.toJsonSchema(cmd.env)\n if (cmd.options) result.options = Schema.toJsonSchema(cmd.options)\n if (cmd.output) result.output = Schema.toJsonSchema(cmd.output)\n if (options.globals?.schema) result.globals = Schema.toJsonSchema(options.globals.schema)\n writeln(Formatter.format(result, format))\n return\n }\n\n if ('help' in resolved) {\n writeln(\n Help.formatRoot(`${name} ${resolved.path}`, {\n configFlag,\n description: resolved.description,\n globals: options.globals,\n commands: collectHelpCommands(resolved.commands),\n }),\n )\n return\n }\n\n const start = performance.now()\n\n // Resolve effective format: explicit --format/--json → command default → CLI default → toon\n const resolvedFormat = 'command' in resolved && (resolved as any).command.format\n const format = formatExplicit ? formatFlag : resolvedFormat || options.format || 'toon'\n if (format === 'yaml') await Yaml.load()\n\n // Fall back to root fetch/command when no subcommand matches,\n // but only if the token doesn't look like a typo of a known command.\n const rootFallbackBlocked =\n 'error' in resolved &&\n !resolved.path &&\n (() => {\n const candidates = [...resolved.commands.keys()]\n for (const b of builtinCommands) candidates.push(b.name)\n return suggest(resolved.error, candidates) !== undefined\n })()\n const effective =\n 'error' in resolved && options.rootFetch && !resolved.path && !rootFallbackBlocked\n ? {\n fetchGateway: {\n _fetch: true as const,\n fetch: options.rootFetch,\n description: options.description,\n },\n middlewares: [] as MiddlewareHandler[],\n path: name,\n rest: filtered,\n }\n : 'error' in resolved && options.rootCommand && !resolved.path && !rootFallbackBlocked\n ? { command: options.rootCommand, path: name, rest: filtered }\n : resolved\n\n // Resolve outputPolicy: command/group → CLI-level → default ('all')\n const effectiveOutputPolicy =\n ('outputPolicy' in resolved && resolved.outputPolicy) || options.outputPolicy\n const renderOutput = !(human && !formatExplicit && effectiveOutputPolicy === 'agent-only')\n\n const filterPaths = filterOutput ? Filter.parse(filterOutput) : undefined\n\n function truncate(s: string): {\n text: string\n truncated: boolean\n nextOffset?: number | undefined\n } {\n if (tokenLimit == null && tokenOffset == null) return { text: s, truncated: false }\n const total = estimateTokenCount(s)\n const offset = tokenOffset ?? 0\n const end = tokenLimit != null ? offset + tokenLimit : total\n if (offset === 0 && end >= total) return { text: s, truncated: false }\n const sliced = sliceByTokens(s, offset, end)\n const actualEnd = Math.min(end, total)\n const nextOffset = actualEnd < total ? actualEnd : undefined\n return {\n text: `${sliced}\\n[truncated: showing tokens ${offset}–${actualEnd} of ${total}]`,\n truncated: true,\n nextOffset,\n }\n }\n\n function write(output: Output) {\n if (filterPaths && output.ok && output.data != null)\n output = { ...output, data: Filter.apply(output.data, filterPaths) }\n if (skillsCta) {\n const existing = output.meta.cta\n output = {\n ...output,\n meta: {\n ...output.meta,\n cta: existing\n ? {\n description: existing.description,\n commands: [...existing.commands, ...skillsCta.commands],\n }\n : skillsCta,\n },\n }\n }\n if (tokenCount) {\n const base = output.ok ? output.data : output.error\n const formatted = base != null ? Formatter.format(base, format) : ''\n return writeln(String(estimateTokenCount(formatted)))\n }\n const cta = output.meta.cta\n // Human/TTY mode: write readable output directly, skip the structured envelope.\n if (human && !fullOutput) {\n if (output.ok && output.data != null && renderOutput) {\n // Give the CLI's custom renderer first crack; fall back to the default formatter.\n const custom =\n !formatExplicit && options.renderer != null\n ? options.renderer(output.data)\n : null\n const rendered = custom ?? Formatter.format(output.data, format)\n const t = truncate(rendered)\n writeln(t.text)\n } else if (!output.ok) writeln(formatHumanError(output.error))\n // Always show the call-to-action if present, regardless of output policy.\n if (cta) writeln(formatHumanCta(cta))\n return\n }\n if (fullOutput) {\n if (tokenLimit != null || tokenOffset != null) {\n // Truncate data separately so meta (including nextOffset) is always visible\n const dataFormatted =\n output.ok && output.data != null\n ? Formatter.format(output.data, format)\n : !output.ok\n ? Formatter.format(output.error, format)\n : ''\n const t = truncate(dataFormatted)\n if (t.truncated) {\n const envelope: Record<string, unknown> = output.ok\n ? { ok: true, data: t.text }\n : { ok: false, error: t.text }\n const meta: Record<string, unknown> = { ...output.meta }\n if (t.nextOffset != null) meta.nextOffset = t.nextOffset\n envelope.meta = meta\n return writeln(Formatter.format(envelope, format))\n }\n }\n return writeln(Formatter.format(output, format))\n }\n const base = output.ok ? output.data : output.error\n const formatted = Formatter.format(base, format)\n if (!cta) {\n if (formatted) writeln(truncate(formatted).text)\n return\n }\n const payload =\n typeof base === 'object' && base !== null ? { ...base, cta } : { data: base, cta }\n writeln(truncate(Formatter.format(payload, format)).text)\n }\n\n if ('error' in effective) {\n const helpCmd = effective.path ? `${name} ${effective.path} --help` : `${name} --help`\n const parent = effective.path ? `${name} ${effective.path}` : name\n const candidates = 'commands' in effective ? [...effective.commands.keys()] : []\n if (!effective.path) for (const b of builtinCommands) candidates.push(b.name)\n const suggestion = suggest(effective.error, candidates)\n const didYouMean = suggestion ? ` Did you mean '${suggestion}'?` : ''\n const message = `'${effective.error}' is not a command for '${parent}'.${didYouMean}`\n const ctaCommands: FormattedCta[] = []\n if (suggestion) {\n const corrected = argv.map((t) => (t === effective.error ? suggestion : t))\n ctaCommands.push({ command: `${name} ${corrected.join(' ')}` })\n }\n ctaCommands.push({ command: helpCmd, description: 'see all available commands' })\n const cta: FormattedCtaBlock = {\n description: ctaCommands.length === 1 ? 'Suggested command:' : 'Suggested commands:',\n commands: ctaCommands,\n }\n if (human && !fullOutput) {\n writeln(formatHumanError({ code: 'COMMAND_NOT_FOUND', message }))\n const mergedCta = skillsCta\n ? { ...cta, commands: [...cta.commands, ...skillsCta.commands] }\n : cta\n writeln(formatHumanCta(mergedCta))\n exit(1)\n return\n }\n write({\n ok: false,\n error: { code: 'COMMAND_NOT_FOUND', message },\n meta: {\n command: effective.error,\n cta,\n duration: `${Math.round(performance.now() - start)}ms`,\n },\n })\n exit(1)\n return\n }\n\n // Fetch gateway execution path\n if ('fetchGateway' in effective) {\n if (!parseGlobalOptions(true)) return\n const { fetchGateway, path, rest: fetchRest } = effective\n const fetchMiddleware = [\n ...(options.middlewares ?? []),\n ...((effective as any).middlewares ?? []),\n ]\n\n const runFetch = async () => {\n const input = Fetch.parseArgv(fetchRest)\n if (fetchGateway.basePath) input.path = fetchGateway.basePath + input.path\n const request = Fetch.buildRequest(input)\n const response = await fetchGateway.fetch(request)\n\n // Streaming path — NDJSON responses pipe through handleStreaming\n if (Fetch.isStreamingResponse(response)) {\n const generator = Fetch.parseStreamingResponse(response)\n await handleStreaming(generator, {\n name,\n path,\n start,\n format,\n formatExplicit,\n human,\n renderOutput,\n fullOutput,\n truncate,\n write,\n writeln,\n exit,\n })\n return\n }\n\n const output = await Fetch.parseResponse(response)\n\n if (output.ok) {\n write({\n ok: true,\n data: output.data,\n meta: {\n command: path,\n duration: `${Math.round(performance.now() - start)}ms`,\n },\n })\n } else {\n write({\n ok: false,\n error: {\n code: `HTTP_${output.status}`,\n message:\n typeof output.data === 'object' && output.data !== null && 'message' in output.data\n ? String((output.data as any).message)\n : typeof output.data === 'string'\n ? output.data\n : `HTTP ${output.status}`,\n },\n meta: {\n command: path,\n duration: `${Math.round(performance.now() - start)}ms`,\n },\n })\n exit(1)\n }\n }\n\n try {\n const cliEnv = options.envSchema\n ? Parser.parseEnv(options.envSchema, options.env ?? process.env)\n : {}\n if (fetchMiddleware.length > 0) {\n const varsMap: Record<string, unknown> = options.vars ? options.vars.parse({}) : {}\n const errorFn = (opts: {\n code: string\n exitCode?: number | undefined\n message: string\n retryable?: boolean | undefined\n cta?: CtaBlock | undefined\n }): never => ({ [sentinel]: 'error', ...opts }) as never\n const mwCtx: MiddlewareContext = {\n agent: !human,\n command: path,\n displayName,\n env: cliEnv,\n error: errorFn,\n format,\n formatExplicit,\n globals,\n name,\n set(key: string, value: unknown) {\n varsMap[key] = value\n },\n var: varsMap,\n version: options.version,\n }\n const handleMwSentinel = (result: unknown) => {\n if (!isSentinel(result) || result[sentinel] !== 'error') return\n const err = result as ErrorResult\n const cta = formatCtaBlock(displayName, err.cta)\n write({\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n ...(err.retryable !== undefined ? { retryable: err.retryable } : undefined),\n },\n meta: {\n command: path,\n duration: `${Math.round(performance.now() - start)}ms`,\n ...(cta ? { cta } : undefined),\n },\n })\n exit(err.exitCode ?? 1)\n }\n const composed = fetchMiddleware.reduceRight(\n (next: () => Promise<void>, mw) => async () => {\n handleMwSentinel(await mw(mwCtx, next))\n },\n runFetch,\n )\n await composed()\n } else {\n await runFetch()\n }\n } catch (error) {\n write({\n ok: false,\n error: {\n code: error instanceof IncurError ? error.code : 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n },\n meta: { command: path, duration: `${Math.round(performance.now() - start)}ms` },\n })\n exit(error instanceof IncurError ? (error.exitCode ?? 1) : 1)\n }\n return\n }\n\n const { command, path, rest: commandRest } = effective\n\n if (!parseGlobalOptions(true)) return\n\n // Collect middleware: root CLI + groups traversed + per-command\n const allMiddleware = [\n ...(options.middlewares ?? []),\n ...('middlewares' in resolved\n ? (((resolved as any).middlewares as MiddlewareHandler[]) ?? [])\n : []),\n ...((command.middleware as MiddlewareHandler[] | undefined) ?? []),\n ]\n\n if (human)\n emitDeprecationWarnings(\n commandRest,\n command.options,\n command.alias as Record<string, string> | undefined,\n )\n\n let defaults: Record<string, unknown> | undefined\n if (configEnabled) {\n try {\n defaults = await loadCommandOptionDefaults(name, path, {\n configDisabled,\n configPath,\n files: options.config?.files,\n loader: options.config?.loader,\n })\n } catch (error) {\n write({\n ok: false,\n error: {\n code: error instanceof IncurError ? error.code : 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n },\n meta: { command: path, duration: `${Math.round(performance.now() - start)}ms` },\n })\n exit(error instanceof IncurError ? (error.exitCode ?? 1) : 1)\n return\n }\n }\n\n const result = await Command.execute(command, {\n agent: !human,\n argv: commandRest,\n defaults,\n displayName,\n env: options.envSchema,\n envSource: options.env,\n format,\n formatExplicit,\n globals,\n inputOptions: {},\n middlewares: allMiddleware,\n name,\n path,\n vars: options.vars,\n version: options.version,\n })\n\n const duration = `${Math.round(performance.now() - start)}ms`\n\n // Streaming path — async generator\n if ('stream' in result) {\n await handleStreaming(result.stream, {\n name: displayName,\n path,\n start,\n format,\n formatExplicit,\n human,\n renderOutput,\n fullOutput,\n truncate,\n write,\n writeln,\n exit,\n })\n return\n }\n\n if (result.ok) {\n const cta = formatCtaBlock(displayName, result.cta as CtaBlock | undefined)\n write({\n ok: true,\n data: result.data,\n meta: {\n command: path,\n duration,\n ...(cta ? { cta } : undefined),\n },\n })\n } else {\n const cta = formatCtaBlock(displayName, result.cta as CtaBlock | undefined)\n\n if (human && !formatExplicit && result.error.fieldErrors) {\n writeln(\n formatHumanValidationError(\n displayName,\n path,\n command,\n new ValidationError({\n message: result.error.message,\n fieldErrors: result.error.fieldErrors,\n }),\n options.env,\n configFlag,\n ),\n )\n exit(1)\n return\n }\n\n write({\n ok: false,\n error: {\n code: result.error.code,\n message: result.error.message,\n ...(result.error.retryable !== undefined\n ? { retryable: result.error.retryable }\n : undefined),\n ...(result.error.fieldErrors ? { fieldErrors: result.error.fieldErrors } : undefined),\n },\n meta: {\n command: path,\n duration,\n ...(cta ? { cta } : undefined),\n },\n })\n exit(result.exitCode ?? 1)\n }\n}\n\n/** @internal Options for fetchImpl. */\ndeclare namespace fetchImpl {\n type Options = {\n /** CLI description. */\n description?: string | undefined\n /** CLI-level env schema. */\n envSchema?: z.ZodObject<any> | undefined\n /** Global options schema and alias map. */\n globals?: GlobalsDescriptor | undefined\n /** Group-level middleware collected during command resolution. */\n groupMiddlewares?: MiddlewareHandler[] | undefined\n mcpHandler?:\n | ((\n req: Request,\n commands: Map<string, CommandEntry>,\n mcpOptions?: {\n middlewares?: MiddlewareHandler[] | undefined\n env?: z.ZodObject<any> | undefined\n vars?: z.ZodObject<any> | undefined\n },\n ) => Promise<Response>)\n | undefined\n middlewares?: MiddlewareHandler[] | undefined\n /** CLI name. */\n name?: string | undefined\n rootCommand?: CommandDefinition<any, any, any> | undefined\n vars?: z.ZodObject<any> | undefined\n /** CLI version string. */\n version?: string | undefined\n }\n}\n\n/** @internal Creates a lazy MCP HTTP handler scoped to a CLI instance. */\nfunction createMcpHttpHandler(\n name: string,\n version: string,\n options: createMcpHttpHandler.Options = {},\n) {\n let transport: any\n\n return async (\n req: Request,\n commands: Map<string, CommandEntry>,\n mcpOptions?: {\n middlewares?: MiddlewareHandler[] | undefined\n env?: z.ZodObject<any> | undefined\n vars?: z.ZodObject<any> | undefined\n },\n ): Promise<Response> => {\n const stateless = options.stateless ?? true\n if (stateless && req.method !== 'POST')\n return new Response(null, { status: 405, headers: { Allow: 'POST' } })\n\n if (!transport) {\n const { fromJsonSchema, McpServer, WebStandardStreamableHTTPServerTransport } =\n await import('@modelcontextprotocol/server')\n\n const server = new McpServer({ name, version })\n\n for (const tool of Mcp.collectTools(commands, [])) {\n const mergedShape: Record<string, any> = {\n ...tool.command.args?.shape,\n ...tool.command.options?.shape,\n }\n const hasInput = Object.keys(mergedShape).length > 0\n\n server.registerTool(\n tool.name,\n {\n ...(tool.description ? { description: tool.description } : undefined),\n ...(hasInput ? { inputSchema: z.object(mergedShape) } : undefined),\n ...(tool.outputSchema\n ? { outputSchema: fromJsonSchema(tool.outputSchema) }\n : undefined),\n },\n async (...callArgs: any[]) => {\n const params = hasInput ? (callArgs[0] as Record<string, unknown>) : {}\n return Mcp.callTool(tool, params, {\n name,\n version,\n middlewares: mcpOptions?.middlewares,\n env: mcpOptions?.env,\n vars: mcpOptions?.vars,\n })\n },\n )\n }\n\n const transportOptions = stateless\n ? { enableJsonResponse: true }\n : {\n sessionIdGenerator: () => crypto.randomUUID(),\n enableJsonResponse: true,\n }\n transport = new WebStandardStreamableHTTPServerTransport(transportOptions)\n await server.connect(transport)\n }\n return transport.handleRequest(req)\n }\n}\n\ndeclare namespace createMcpHttpHandler {\n type Options = {\n /** Disable HTTP MCP session management. Defaults to `true`. */\n stateless?: boolean | undefined\n }\n}\n\nfunction isOpenapiRoute(segments: string[]) {\n if (segments.length === 1)\n return (\n segments[0] === 'openapi.json' ||\n segments[0] === 'openapi.yml' ||\n segments[0] === 'openapi.yaml'\n )\n return segments[0] === '.well-known' && segments[1] === 'openapi.json' && segments.length === 2\n}\n\nfunction generatedOpenapi(\n name: string,\n commands: Map<string, CommandEntry>,\n options: fetchImpl.Options,\n) {\n const openapiCli = { name, description: options.description } as Cli\n toCommands.set(openapiCli, commands)\n if (options.rootCommand) toRootDefinition.set(openapiCli as unknown as Root, options.rootCommand)\n return Openapi.fromCli(openapiCli, {\n title: name,\n ...(options.version ? { version: options.version } : undefined),\n ...(options.description ? { description: options.description } : undefined),\n })\n}\n\n/** @internal Handles an HTTP request by resolving a command and returning a JSON Response. */\nasync function fetchImpl(\n name: string,\n commands: Map<string, CommandEntry>,\n req: Request,\n options: fetchImpl.Options = {},\n): Promise<Response> {\n const start = performance.now()\n\n const url = new URL(req.url)\n const segments = url.pathname.split('/').filter(Boolean)\n\n // OpenAPI discovery: route /openapi.json, /openapi.yml, /openapi.yaml, and /.well-known/openapi.json\n if (req.method === 'GET' && isOpenapiRoute(segments)) {\n const spec = generatedOpenapi(name, commands, options)\n const yaml = segments[0] === 'openapi.yml' || segments[0] === 'openapi.yaml'\n return new Response(yaml ? (await Yaml.load()).stringify(spec) : JSON.stringify(spec), {\n status: 200,\n headers: {\n 'content-type': yaml ? 'application/yaml' : 'application/json',\n 'cache-control': 'public, max-age=300',\n },\n })\n }\n\n // MCP over HTTP: route /mcp to the MCP transport\n if (segments[0] === 'mcp' && segments.length === 1 && options.mcpHandler)\n return options.mcpHandler(req, commands, {\n middlewares: options.middlewares,\n env: options.envSchema,\n vars: options.vars,\n })\n\n // .well-known/skills/ — Agent Skills Discovery (RFC)\n if (\n segments[0] === '.well-known' &&\n segments[1] === 'skills' &&\n segments.length >= 3 &&\n req.method === 'GET'\n ) {\n // Pre-load yaml for the sync call paths below (`Skill.split`, frontmatter parsing).\n await Yaml.load()\n const groups = new Map<string, string>()\n const cmds = collectSkillCommands(commands, [], groups, options.rootCommand)\n\n // GET /.well-known/skills/index.json\n if (segments[2] === 'index.json' && segments.length === 3) {\n const files = Skill.split(name, cmds, 1, groups)\n const skills = files.map((f) => {\n const fmMatch = f.content.match(/^---\\n([\\s\\S]*?)\\n---/)\n const meta = fmMatch ? (Yaml.loadSync().parse(fmMatch[1]!) as Record<string, string>) : {}\n return {\n name: f.dir || name,\n description: meta.description ?? '',\n files: ['SKILL.md'],\n }\n })\n return new Response(JSON.stringify({ skills }), {\n status: 200,\n headers: { 'content-type': 'application/json', 'cache-control': 'public, max-age=300' },\n })\n }\n\n // GET /.well-known/skills/{skill-name}/SKILL.md\n if (segments.length === 4 && segments[3] === 'SKILL.md') {\n const skillName = segments[2]!\n const files = Skill.split(name, cmds, 1, groups)\n const file = files.find((f) => (f.dir || name) === skillName)\n if (file)\n return new Response(file.content, {\n status: 200,\n headers: { 'content-type': 'text/markdown', 'cache-control': 'public, max-age=300' },\n })\n return new Response('Not Found', { status: 404 })\n }\n\n return new Response('Not Found', { status: 404 })\n }\n\n // Parse options from search params (GET) or body (non-GET)\n let inputOptions: Record<string, unknown> = {}\n if (req.method === 'GET') for (const [key, value] of url.searchParams) inputOptions[key] = value\n else {\n try {\n const contentType = req.headers.get('content-type') ?? ''\n if (contentType.includes('application/json'))\n inputOptions = (await req.json()) as Record<string, unknown>\n } catch {}\n }\n\n function jsonResponse(body: unknown, status: number) {\n return new Response(Json.stringify(body), {\n status,\n headers: { 'content-type': 'application/json' },\n })\n }\n\n // Resolve command from path segments\n if (segments.length === 0) {\n // Root path\n if (options.rootCommand)\n return executeCommand(name, options.rootCommand, [], inputOptions, start, options)\n return jsonResponse(\n {\n ok: false,\n error: { code: 'COMMAND_NOT_FOUND', message: 'No root command defined.' },\n meta: { command: '/', duration: `${Math.round(performance.now() - start)}ms` },\n },\n 404,\n )\n }\n\n const resolved = resolveCommand(commands, segments)\n\n if ('error' in resolved) {\n const parent = resolved.path ? `${name} ${resolved.path}` : name\n const suggestion = suggest(resolved.error, resolved.commands.keys())\n const didYouMean = suggestion ? ` Did you mean '${suggestion}'?` : ''\n return jsonResponse(\n {\n ok: false,\n error: {\n code: 'COMMAND_NOT_FOUND',\n message: `'${resolved.error}' is not a command for '${parent}'.${didYouMean}`,\n },\n meta: { command: resolved.error, duration: `${Math.round(performance.now() - start)}ms` },\n },\n 404,\n )\n }\n\n if ('help' in resolved)\n return jsonResponse(\n {\n ok: false,\n error: {\n code: 'COMMAND_NOT_FOUND',\n message: `'${resolved.path}' is a command group. Specify a subcommand.`,\n },\n meta: { command: resolved.path, duration: `${Math.round(performance.now() - start)}ms` },\n },\n 404,\n )\n\n if ('fetchGateway' in resolved) return resolved.fetchGateway.fetch(req)\n\n const { command, path, rest } = resolved\n const groupMiddlewares = 'middlewares' in resolved ? resolved.middlewares : []\n return executeCommand(path, command, rest, inputOptions, start, {\n ...options,\n groupMiddlewares,\n })\n}\n\n/** @internal Executes a resolved command for the fetch handler and returns a JSON Response. */\nasync function executeCommand(\n path: string,\n command: CommandDefinition<any, any, any>,\n rest: string[],\n inputOptions: Record<string, unknown>,\n start: number,\n options: fetchImpl.Options,\n): Promise<Response> {\n function jsonResponse(body: unknown, status: number) {\n return new Response(Json.stringify(body), {\n status,\n headers: { 'content-type': 'application/json' },\n })\n }\n\n const allMiddleware = [\n ...(options.middlewares ?? []),\n ...((options.groupMiddlewares as MiddlewareHandler[] | undefined) ?? []),\n ...((command.middleware as MiddlewareHandler[] | undefined) ?? []),\n ]\n\n let globals: Record<string, unknown> = {}\n let commandInputOptions = inputOptions\n if (options.globals) {\n const globalKeys = new Set(Object.keys(options.globals.schema.shape))\n const rawGlobals: Record<string, unknown> = {}\n commandInputOptions = {}\n for (const [key, value] of Object.entries(inputOptions)) {\n if (globalKeys.has(key)) rawGlobals[key] = value\n else commandInputOptions[key] = value\n }\n try {\n globals = options.globals.schema.parse(rawGlobals)\n } catch (error: any) {\n const issues: any[] = error?.issues ?? error?.error?.issues ?? []\n const message = issues.map((i: any) => i.message).join('; ') || 'Validation failed'\n return jsonResponse(\n {\n ok: false,\n error: { code: 'VALIDATION_ERROR', message },\n meta: { command: path, duration: `${Math.round(performance.now() - start)}ms` },\n },\n 400,\n )\n }\n }\n\n const result = await Command.execute(command, {\n agent: true,\n argv: rest,\n env: options.envSchema,\n format: 'json',\n formatExplicit: true,\n globals,\n inputOptions: commandInputOptions,\n middlewares: allMiddleware,\n name: options.name ?? path,\n parseMode: 'split',\n path,\n vars: options.vars,\n version: options.version,\n })\n\n const duration = `${Math.round(performance.now() - start)}ms`\n\n // Streaming path — async generator → NDJSON response\n if ('stream' in result) {\n const iterator = result.stream\n const encoder = new TextEncoder()\n const meta = (cta?: FormattedCtaBlock | undefined) => ({\n command: path,\n duration: `${Math.round(performance.now() - start)}ms`,\n ...(cta ? { cta } : undefined),\n })\n const errorRecord = (err: ErrorResult) => ({\n type: 'error',\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n ...(err.retryable !== undefined ? { retryable: err.retryable } : undefined),\n },\n meta: meta(formatCtaBlock(options.name ?? path, err.cta)),\n })\n const stream = new ReadableStream({\n async cancel() {\n await iterator.return(undefined)\n },\n async pull(controller) {\n try {\n const { value, done } = await iterator.next()\n if (done) {\n if (isSentinel(value) && value[sentinel] === 'error') {\n controller.enqueue(encoder.encode(Json.stringify(errorRecord(value)) + '\\n'))\n controller.close()\n return\n }\n const cta =\n isSentinel(value) && value[sentinel] === 'ok'\n ? formatCtaBlock(options.name ?? path, value.cta)\n : undefined\n controller.enqueue(\n encoder.encode(\n Json.stringify({\n type: 'done',\n ok: true,\n meta: meta(cta),\n }) + '\\n',\n ),\n )\n controller.close()\n return\n }\n\n if (isSentinel(value) && value[sentinel] === 'error') {\n controller.enqueue(encoder.encode(Json.stringify(errorRecord(value)) + '\\n'))\n await iterator.return(undefined)\n controller.close()\n return\n }\n\n controller.enqueue(encoder.encode(Json.stringify({ type: 'chunk', data: value }) + '\\n'))\n } catch (error) {\n controller.enqueue(\n encoder.encode(\n Json.stringify({\n type: 'error',\n ok: false,\n error: {\n code: error instanceof IncurError ? error.code : 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n ...(error instanceof IncurError ? { retryable: error.retryable } : undefined),\n },\n meta: meta(),\n }) + '\\n',\n ),\n )\n controller.close()\n }\n },\n })\n return new Response(stream, {\n status: 200,\n headers: { 'content-type': 'application/x-ndjson' },\n })\n }\n\n if (!result.ok) {\n const cta = formatCtaBlock(options.name ?? path, result.cta as CtaBlock | undefined)\n return jsonResponse(\n {\n ok: false,\n error: {\n code: result.error.code,\n message: result.error.message,\n ...(result.error.retryable !== undefined\n ? { retryable: result.error.retryable }\n : undefined),\n ...(result.error.fieldErrors ? { fieldErrors: result.error.fieldErrors } : undefined),\n },\n meta: {\n command: path,\n duration,\n ...(cta ? { cta } : undefined),\n },\n },\n result.error.code === 'VALIDATION_ERROR' ? 400 : 500,\n )\n }\n\n const cta = formatCtaBlock(options.name ?? path, result.cta as CtaBlock | undefined)\n return jsonResponse(\n {\n ok: true,\n data: result.data,\n meta: {\n command: path,\n duration,\n ...(cta ? { cta } : undefined),\n },\n },\n 200,\n )\n}\n\n/** @internal Formats a validation error for TTY with usage hint. */\nfunction formatHumanValidationError(\n cli: string,\n path: string,\n command: CommandDefinition<any, any, any>,\n error: ValidationError,\n envSource?: Record<string, string | undefined>,\n configFlag?: string,\n): string {\n const lines: string[] = []\n for (const fe of error.fieldErrors) {\n const line = (() => {\n const target = formatValidationTarget(command, fe.path)\n if (fe.missing) return `Error: missing required ${target.kind} ${target.label}`\n if (target.kind === 'environment variable')\n return `Error: invalid value for environment variable ${target.label}: ${fe.message}`\n return `Error: invalid value for ${target.label}: ${fe.message}`\n })()\n lines.push(line)\n }\n lines.push('See below for usage.')\n lines.push('')\n lines.push(\n Help.formatCommand(path === cli ? cli : `${cli} ${path}`, {\n alias: command.alias as Record<string, string> | undefined,\n configFlag,\n description: command.description,\n args: command.args,\n env: command.env,\n envSource,\n hint: command.hint,\n options: command.options,\n examples: formatExamples(command.examples),\n usage: command.usage,\n }),\n )\n return lines.join('\\n')\n}\n\n/** @internal Formats a field path as an option flag, env name, or positional placeholder. */\nfunction formatValidationTarget(command: CommandDefinition<any, any, any>, path: string) {\n const [head, ...tail] = path.split('.')\n if (!head) return { kind: 'argument', label: 'input' } as const\n if (command.options?.shape[head]) {\n const suffix = tail.length > 0 ? `.${tail.join('.')}` : ''\n return { kind: 'option', label: `--${toKebab(head)}${suffix}` } as const\n }\n if (command.env?.shape[head]) {\n const suffix = tail.length > 0 ? `.${tail.join('.')}` : ''\n return { kind: 'environment variable', label: `${head}${suffix}` } as const\n }\n return { kind: 'argument', label: `<${path}>` } as const\n}\n\n/** @internal Resolves a command from the tree by walking tokens until a leaf is found. */\nfunction resolveCommand(\n commands: Map<string, CommandEntry>,\n tokens: string[],\n):\n | {\n command: CommandDefinition<any, any, any>\n middlewares: MiddlewareHandler[]\n outputPolicy?: OutputPolicy | undefined\n path: string\n rest: string[]\n }\n | {\n fetchGateway: InternalFetchGateway\n middlewares: MiddlewareHandler[]\n outputPolicy?: OutputPolicy | undefined\n path: string\n rest: string[]\n }\n | {\n help: true\n path: string\n description?: string | undefined\n commands: Map<string, CommandEntry>\n }\n | { error: string; path: string; commands: Map<string, CommandEntry>; rest: string[] } {\n const [first, ...rest] = tokens\n\n if (!first || !commands.has(first)) return { error: first ?? '(none)', path: '', commands, rest }\n\n let entry = resolveAlias(commands, commands.get(first)!)\n const path = [first]\n let remaining = rest\n let inheritedOutputPolicy: OutputPolicy | undefined\n const collectedMiddlewares: MiddlewareHandler[] = []\n\n // Fetch gateway — all remaining tokens go to the fetch handler\n if (isFetchGateway(entry)) {\n const outputPolicy = entry.outputPolicy ?? inheritedOutputPolicy\n return {\n fetchGateway: entry,\n middlewares: collectedMiddlewares,\n path: path.join(' '),\n rest: remaining,\n ...(outputPolicy ? { outputPolicy } : undefined),\n }\n }\n\n while (isGroup(entry)) {\n if (entry.outputPolicy) inheritedOutputPolicy = entry.outputPolicy\n if (entry.middlewares) collectedMiddlewares.push(...entry.middlewares)\n const next = remaining[0]\n if (!next)\n return {\n help: true,\n path: path.join(' '),\n description: entry.description,\n commands: entry.commands,\n }\n\n const rawChild = entry.commands.get(next)\n if (!rawChild) {\n return {\n error: next,\n path: path.join(' '),\n commands: entry.commands,\n rest: remaining.slice(1),\n }\n }\n let child = resolveAlias(entry.commands, rawChild)\n\n path.push(next)\n remaining = remaining.slice(1)\n entry = child\n\n if (isFetchGateway(entry)) {\n const outputPolicy = entry.outputPolicy ?? inheritedOutputPolicy\n return {\n fetchGateway: entry,\n middlewares: collectedMiddlewares,\n path: path.join(' '),\n rest: remaining,\n ...(outputPolicy ? { outputPolicy } : undefined),\n }\n }\n }\n\n const outputPolicy = entry.outputPolicy ?? inheritedOutputPolicy\n return {\n command: entry,\n middlewares: collectedMiddlewares,\n path: path.join(' '),\n rest: remaining,\n ...(outputPolicy ? { outputPolicy } : undefined),\n }\n}\n\n/** @internal Options for serveImpl, extending public serve.Options with internal metadata. */\ndeclare namespace serveImpl {\n type Options = serve.Options & {\n /** Alternative binary names for this CLI. */\n aliases?: string[] | undefined\n config?:\n | {\n flag?: string | undefined\n files?: string[] | undefined\n loader?:\n | ((\n path: string | undefined,\n ) =>\n | Record<string, unknown>\n | undefined\n | Promise<Record<string, unknown> | undefined>)\n | undefined\n }\n | undefined\n description?: string | undefined\n /** CLI-level env schema. Parsed before middleware runs. */\n envSchema?: z.ZodObject<any> | undefined\n /** CLI-level default output format. */\n format?: Formatter.Format | undefined\n /** Global options schema and alias map. */\n globals?: GlobalsDescriptor | undefined\n /** Middleware handlers registered on the root CLI. */\n middlewares?: MiddlewareHandler[] | undefined\n /** CLI-level default output policy. */\n outputPolicy?: OutputPolicy | undefined\n /** Custom renderer for human/TTY output mode. Return null to fall back to default formatting. */\n renderer?: ((data: unknown) => string | null) | undefined\n mcp?:\n | {\n agents?: string[] | undefined\n command?: string | undefined\n instructions?: string | undefined\n stateless?: boolean | undefined\n }\n | undefined\n /** Banner config, called before root help. */\n banner?:\n | (() => string | undefined | Promise<string | undefined>)\n | {\n render: () => string | undefined | Promise<string | undefined>\n mode?: 'all' | 'human' | 'agent' | undefined\n }\n | undefined\n /** Root command handler, invoked when no subcommand matches. */\n rootCommand?: CommandDefinition<any, any, any> | undefined\n /** Root fetch handler, invoked when no subcommand matches and no rootCommand is set. */\n rootFetch?: FetchHandler | undefined\n sync?:\n | {\n cwd?: string | undefined\n depth?: number | undefined\n include?: string[] | undefined\n suggestions?: string[] | undefined\n }\n | undefined\n /** Zod schema for middleware variables. */\n vars?: z.ZodObject<any> | undefined\n version?: string | undefined\n }\n}\n\n/** @internal Extracts built-in flags (--full-output, --format, --json, --llms, --help, --version) from argv. */\nconst validFormats = new Set(['toon', 'json', 'yaml', 'md', 'jsonl'] as const)\n\nfunction extractBuiltinFlags(argv: string[], options: extractBuiltinFlags.Options = {}) {\n let fullOutput = false\n let llms = false\n let llmsFull = false\n let mcp = false\n let help = false\n let version = false\n let schema = false\n let format: Formatter.Format = 'toon'\n let formatExplicit = false\n let configPath: string | undefined\n let configDisabled = false\n let filterOutput: string | undefined\n let tokenLimit: number | undefined\n let tokenOffset: number | undefined\n let tokenCount = false\n const rest: string[] = []\n\n const cfgFlag = options.configFlag ? `--${options.configFlag}` : undefined\n const cfgFlagEq = options.configFlag ? `--${options.configFlag}=` : undefined\n const noCfgFlag = options.configFlag ? `--no-${options.configFlag}` : undefined\n\n for (let i = 0; i < argv.length; i++) {\n const token = argv[i]!\n if (token === '--full-output') fullOutput = true\n else if (token === '--llms') llms = true\n else if (token === '--llms-full') llmsFull = true\n else if (token === '--mcp') mcp = true\n else if (token === '--help' || token === '-h') help = true\n else if (token === '--version') version = true\n else if (token === '--schema') schema = true\n else if (token === '--json') {\n format = 'json'\n formatExplicit = true\n } else if (token === '--format' && argv[i + 1]) {\n if (!validFormats.has(argv[i + 1]! as any))\n throw new ParseError({\n message: `Invalid format: \"${argv[i + 1]}\". Expected one of: ${[...validFormats].join(', ')}`,\n })\n format = argv[i + 1] as Formatter.Format\n formatExplicit = true\n i++\n } else if (cfgFlag && token === cfgFlag) {\n const value = argv[i + 1]\n if (value === undefined)\n throw new ParseError({ message: `Missing value for flag: ${cfgFlag}` })\n configPath = value\n configDisabled = false\n i++\n } else if (cfgFlagEq && token.startsWith(cfgFlagEq)) {\n const value = token.slice(cfgFlagEq.length)\n if (value.length === 0)\n throw new ParseError({ message: `Missing value for flag: ${cfgFlag}` })\n configPath = value\n configDisabled = false\n } else if (noCfgFlag && token === noCfgFlag) {\n configPath = undefined\n configDisabled = true\n } else if (token === '--filter-output' && argv[i + 1]) {\n filterOutput = argv[i + 1]!\n i++\n } else if (token === '--token-limit' && argv[i + 1]) {\n const n = Number(argv[i + 1])\n if (!Number.isFinite(n) || argv[i + 1]!.trim() === '')\n throw new ParseError({ message: `Invalid value for --token-limit: \"${argv[i + 1]}\"` })\n tokenLimit = n\n i++\n } else if (token === '--token-offset' && argv[i + 1]) {\n const n = Number(argv[i + 1])\n if (!Number.isFinite(n) || argv[i + 1]!.trim() === '')\n throw new ParseError({ message: `Invalid value for --token-offset: \"${argv[i + 1]}\"` })\n tokenOffset = n\n i++\n } else if (token === '--token-count') tokenCount = true\n else rest.push(token)\n }\n\n return {\n fullOutput,\n format,\n formatExplicit,\n configPath,\n configDisabled,\n filterOutput,\n tokenLimit,\n tokenOffset,\n tokenCount,\n llms,\n llmsFull,\n mcp,\n help,\n version,\n schema,\n rest,\n }\n}\n\ndeclare namespace extractBuiltinFlags {\n type Options = {\n configFlag?: string | undefined\n }\n}\n\n/** @internal Loads config-backed option defaults for the active command. */\nasync function loadCommandOptionDefaults(\n cli: string,\n path: string,\n options: loadCommandOptionDefaults.Options = {},\n): Promise<Record<string, unknown> | undefined> {\n if (options.configDisabled) return undefined\n\n const { loader } = options\n\n // Resolve the target file path\n let targetPath: string | undefined\n if (options.configPath) {\n targetPath = resolveConfigPath(options.configPath)\n } else {\n const searchPaths = options.files ?? [`${cli}.json`]\n targetPath = await findFirstExisting(searchPaths)\n }\n\n // Load and parse the config\n let parsed: Record<string, unknown>\n if (loader) {\n const result = await loader(targetPath)\n if (result === undefined) return undefined\n if (!isRecord(result))\n throw new ParseError({ message: 'Config loader must return a plain object or undefined' })\n parsed = result\n } else {\n if (!targetPath) return undefined\n const result = await readJsonConfig(targetPath, !!options.configPath)\n if (!result) return undefined\n parsed = result\n }\n\n // Extract the command section from the config tree\n return extractCommandSection(parsed, cli, path)\n}\n\ndeclare namespace loadCommandOptionDefaults {\n type Options = {\n configDisabled?: boolean | undefined\n configPath?: string | undefined\n files?: string[] | undefined\n loader?:\n | ((\n path: string | undefined,\n ) => Record<string, unknown> | undefined | Promise<Record<string, unknown> | undefined>)\n | undefined\n }\n}\n\n/** @internal Resolves a config file path, expanding `~` to home dir. */\nfunction resolveConfigPath(filePath: string): string {\n if (filePath.startsWith('~/') || filePath === '~') {\n return path.join(os.homedir(), filePath.slice(1))\n }\n return path.resolve(process.cwd(), filePath)\n}\n\n/** @internal Returns the first readable file from a list of paths, or `undefined`. */\nasync function findFirstExisting(paths: string[]): Promise<string | undefined> {\n for (const p of paths) {\n const resolved = resolveConfigPath(p)\n try {\n await fs.access(resolved, fs.constants.R_OK)\n return resolved\n } catch {}\n }\n return undefined\n}\n\n/** @internal Reads and parses a JSON config file. */\nasync function readJsonConfig(\n targetPath: string,\n explicit: boolean,\n): Promise<Record<string, unknown> | undefined> {\n let raw: string\n try {\n raw = await fs.readFile(targetPath, 'utf8')\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') {\n if (explicit) throw new ParseError({ message: `Config file not found: ${targetPath}` })\n return undefined\n }\n throw error\n }\n\n let parsed: unknown\n try {\n parsed = JSON.parse(raw)\n } catch (error) {\n throw new ParseError({\n message: `Invalid JSON config file: ${targetPath}`,\n cause: error instanceof Error ? error : undefined,\n })\n }\n\n if (!isRecord(parsed))\n throw new ParseError({\n message: `Invalid config file: expected a top-level object in ${targetPath}`,\n })\n return parsed\n}\n\n/** @internal Walks the nested config tree to extract option defaults for a command path. */\nfunction extractCommandSection(\n parsed: Record<string, unknown>,\n cli: string,\n path: string,\n): Record<string, unknown> | undefined {\n const segments = path === cli ? [] : path.split(' ')\n let node: unknown = parsed\n for (const seg of segments) {\n if (!isRecord(node)) return undefined\n const commands = node.commands\n if (!isRecord(commands)) return undefined\n node = commands[seg]\n if (node === undefined) return undefined\n }\n if (!isRecord(node))\n throw new ParseError({\n message: `Invalid config section for '${path}': expected an object`,\n })\n\n const options = node.options\n if (options === undefined) return undefined\n if (!isRecord(options))\n throw new ParseError({\n message: `Invalid config 'options' for '${path}': expected an object`,\n })\n return Object.keys(options).length > 0 ? options : undefined\n}\n\n/** @internal Collects immediate child commands/groups for help output. */\nfunction collectHelpCommands(\n commands: Map<string, CommandEntry>,\n): { name: string; description?: string | undefined }[] {\n const result: { name: string; description?: string | undefined }[] = []\n for (const [name, entry] of commands) {\n if (isAlias(entry)) continue\n result.push({ name, description: entry.description })\n }\n return result.sort((a, b) => a.name.localeCompare(b.name))\n}\n\n/** @internal Finds the index of a builtin command token in the filtered argv. Returns -1 if not found. */\nfunction builtinIdx(filtered: string[], cliName: string, builtin: string): number {\n // e.g. `skills add` or `skill add`\n if (findBuiltin(filtered[0]!)?.name === builtin) return 0\n // e.g. `my-cli skills add`\n if (filtered[0] === cliName && findBuiltin(filtered[1]!)?.name === builtin) return 1\n // not a match\n return -1\n}\n\n/** @internal Formats group-level help for a built-in command (e.g. `cli skills`). */\nfunction formatBuiltinHelp(cli: string, builtin: (typeof builtinCommands)[number]): string {\n return Help.formatRoot(`${cli} ${builtin.name}`, {\n aliases: builtin.aliases,\n description: builtin.description,\n commands: builtin.subcommands?.map((s) => ({ name: s.name, description: s.description })),\n })\n}\n\n/** @internal Formats subcommand-level help for a built-in command (e.g. `cli skills add --help`). */\nfunction formatBuiltinSubcommandHelp(\n cli: string,\n builtin: (typeof builtinCommands)[number],\n subName: string,\n): string {\n const sub = findBuiltinSubcommand(builtin, subName)\n return Help.formatCommand(`${cli} ${builtin.name} ${subName}`, {\n alias: sub?.alias,\n aliases: sub?.aliases,\n description: sub?.description,\n hideGlobalOptions: true,\n options: sub?.options,\n })\n}\n\ntype McpDoctorResult = {\n ok: boolean\n toolCount: number\n tools: { name: string; description?: string | undefined }[]\n warnings: string[]\n errors: { code: string; message: string }[]\n}\n\nasync function runMcpDoctor(\n name: string,\n commands: Map<string, CommandEntry>,\n options: serveImpl.Options,\n): Promise<McpDoctorResult> {\n const warnings: string[] = []\n const errors: McpDoctorResult['errors'] = []\n const input = new PassThrough()\n const output = new PassThrough()\n const chunks: string[] = []\n output.on('data', (chunk) => chunks.push(chunk.toString()))\n\n let serveError: unknown\n const done = Mcp.serve(name, options.version ?? '0.0.0', commands, {\n input,\n output,\n middlewares: options.middlewares,\n env: options.envSchema,\n vars: options.vars,\n version: options.version,\n ...(options.mcp?.instructions ? { instructions: options.mcp.instructions } : undefined),\n }).catch((error) => {\n serveError = error\n })\n\n input.write(\n `${Json.stringify({\n jsonrpc: '2.0',\n id: 1,\n method: 'initialize',\n params: {\n protocolVersion: '2024-11-05',\n capabilities: {},\n clientInfo: { name: 'incur-doctor', version: '1.0.0' },\n },\n })}\\n`,\n )\n input.write(`${Json.stringify({ jsonrpc: '2.0', id: 2, method: 'tools/list', params: {} })}\\n`)\n await new Promise((resolve) => setTimeout(resolve, 20))\n input.end()\n await done\n\n if (serveError)\n return {\n ok: false,\n toolCount: 0,\n tools: [],\n warnings,\n errors: [{ code: 'MCP_SERVER_FAILED', message: errorMessage(serveError) }],\n }\n\n let responses: Record<string, unknown>[]\n try {\n responses = parseMcpDoctorResponses(chunks)\n } catch (error) {\n return {\n ok: false,\n toolCount: 0,\n tools: [],\n warnings,\n errors: [{ code: 'MCP_RESPONSE_PARSE_FAILED', message: errorMessage(error) }],\n }\n }\n\n const initialize = responses.find((response) => response.id === 1)\n if (!initialize)\n errors.push({ code: 'MCP_INITIALIZE_MISSING', message: 'Missing initialize response.' })\n else if (initialize.error)\n errors.push({ code: 'MCP_INITIALIZE_FAILED', message: mcpErrorMessage(initialize.error) })\n\n const toolsList = responses.find((response) => response.id === 2)\n let tools: McpDoctorResult['tools'] = []\n if (!toolsList)\n errors.push({ code: 'MCP_TOOLS_LIST_MISSING', message: 'Missing tools/list response.' })\n else if (toolsList.error)\n errors.push({ code: 'MCP_TOOLS_LIST_FAILED', message: mcpErrorMessage(toolsList.error) })\n else if (!isRecord(toolsList.result) || !Array.isArray(toolsList.result.tools))\n errors.push({\n code: 'MCP_TOOLS_LIST_INVALID',\n message: 'tools/list did not return a tools array.',\n })\n else\n tools = toolsList.result.tools\n .filter(isRecord)\n .map((tool) => ({\n name: typeof tool.name === 'string' ? tool.name : '',\n ...(typeof tool.description === 'string' ? { description: tool.description } : undefined),\n }))\n .filter((tool) => tool.name)\n\n if (errors.length === 0 && tools.length === 0) warnings.push('No MCP tools exposed.')\n\n return {\n ok: errors.length === 0,\n toolCount: tools.length,\n tools,\n warnings,\n errors,\n }\n}\n\nfunction parseMcpDoctorResponses(chunks: string[]): Record<string, unknown>[] {\n const responses: Record<string, unknown>[] = []\n for (const line of chunks.join('').split(/\\r?\\n/)) {\n const trimmed = line.trim()\n if (!trimmed) continue\n const parsed = JSON.parse(trimmed)\n if (!isRecord(parsed)) throw new Error('Expected JSON-RPC response object.')\n responses.push(parsed)\n }\n return responses\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error)\n}\n\nfunction mcpErrorMessage(error: unknown): string {\n if (isRecord(error) && typeof error.message === 'string') return error.message\n return Json.stringify(error)\n}\n\n/** @internal Formats help text for a fetch gateway command. */\nfunction formatFetchHelp(name: string, description?: string): string {\n const lines: string[] = []\n if (description) lines.push(`${name} — ${description}`)\n else lines.push(name)\n lines.push('')\n lines.push(`Usage: ${name} <path> [options]`)\n lines.push('')\n lines.push('Path segments are joined into the request URL path.')\n lines.push('')\n lines.push('Options:')\n lines.push(' -X, --method <METHOD> HTTP method (default: GET, POST if body present)')\n lines.push(' -H, --header \"Key: Val\" Set a request header (repeatable)')\n lines.push(' -d, --data <json> Request body (implies POST)')\n lines.push(' --body <json> Request body (implies POST)')\n lines.push(' --<key> <value> Query string parameter')\n return lines.join('\\n')\n}\n\n/** Shape of the commands map accumulated through `.command()` chains. */\nexport type CommandsMap = Record<\n string,\n { args: Record<string, unknown>; options: Record<string, unknown> }\n>\n\n/** @internal Entry stored in a command map — either a leaf definition, a group, or a fetch gateway. */\ntype CommandEntry =\n | CommandDefinition<any, any, any>\n | InternalGroup\n | InternalFetchGateway\n | InternalAlias\n\n/** Controls when output data is displayed. `'all'` displays to both humans and agents. `'agent-only'` suppresses data output in human/TTY mode. */\nexport type OutputPolicy = 'agent-only' | 'all'\n\n/** A standard Fetch API handler. */\nexport type FetchHandler = Fetch.Handler\n\n/** Fetch handler or hosted source used by fetch-backed commands. */\nexport type FetchSource = Fetch.Source\n\n/** @internal A command group's internal storage. */\ntype InternalGroup = {\n _group: true\n description?: string | undefined\n middlewares?: MiddlewareHandler[] | undefined\n outputPolicy?: OutputPolicy | undefined\n commands: Map<string, CommandEntry>\n}\n\n/** @internal A fetch gateway entry. */\ntype InternalFetchGateway = {\n _fetch: true\n basePath?: string | undefined\n description?: string | undefined\n fetch: FetchHandler\n outputPolicy?: OutputPolicy | undefined\n}\n\nfunction isFetchSource(value: unknown): value is FetchSource {\n if (typeof value === 'function') return true\n if (typeof value !== 'object' || value === null) return false\n\n const source = value as { fetch?: unknown; url?: unknown }\n return typeof source.fetch === 'function' && source.url instanceof URL\n}\n\nfunction resolveFetch(source: FetchSource): FetchHandler {\n if (typeof source === 'function') return source\n return source.fetch\n}\n\nfunction fetchBaseUrl(source: FetchSource) {\n return typeof source === 'function' ? undefined : source.url\n}\n\n/** @internal Type guard for command groups. */\nfunction isGroup(entry: CommandEntry): entry is InternalGroup {\n return '_group' in entry\n}\n\n/** @internal Type guard for fetch gateways. */\nfunction isFetchGateway(entry: CommandEntry): entry is InternalFetchGateway {\n return '_fetch' in entry\n}\n\n/** @internal An alias entry that points to another command by name. */\ntype InternalAlias = {\n _alias: true\n /** The canonical command name this alias resolves to. */\n target: string\n}\n\n/** @internal Type guard for alias entries. */\nfunction isAlias(entry: CommandEntry): entry is InternalAlias {\n return '_alias' in entry\n}\n\n/** @internal Follows an alias entry to its canonical target. Returns the entry unchanged if not an alias. */\nfunction resolveAlias(\n commands: Map<string, CommandEntry>,\n entry: CommandEntry,\n): Exclude<CommandEntry, InternalAlias> {\n if (isAlias(entry)) return commands.get(entry.target)! as Exclude<CommandEntry, InternalAlias>\n return entry\n}\n\n/** @internal Validates command options against CLI-level global options. */\nfunction assertNoGlobalOptionConflicts(\n path: string,\n entry: CommandEntry,\n globals: GlobalsDescriptor | undefined,\n) {\n if (!globals || isFetchGateway(entry) || isAlias(entry)) return\n if (isGroup(entry)) {\n for (const [name, child] of entry.commands)\n assertNoGlobalOptionConflicts(`${path} ${name}`, child, globals)\n return\n }\n\n if (entry.options) {\n const globalKeys = Object.keys(globals.schema.shape)\n const optionKeys = Object.keys(entry.options.shape)\n for (const key of optionKeys) {\n if (globalKeys.includes(key))\n throw new Error(\n `Command '${path}' option '${key}' conflicts with a global option. Choose a different name.`,\n )\n }\n }\n\n if (globals.alias && entry.alias) {\n const globalAliasValues = new Set(Object.values(globals.alias))\n for (const [name, short] of Object.entries(entry.alias)) {\n if (short && globalAliasValues.has(short))\n throw new Error(\n `Command '${path}' alias '-${short}' for '${name}' conflicts with a global alias. Choose a different alias.`,\n )\n }\n }\n}\n\n/** @internal Maps CLI instances to their command maps. */\nexport const toCommands = new WeakMap<Cli, Map<string, CommandEntry>>()\n\n/** @internal Maps CLI instances to their middleware arrays. */\nconst toMiddlewares = new WeakMap<Cli, MiddlewareHandler[]>()\n\n/** @internal Maps root CLI instances to their command definitions. */\nexport const toRootDefinition = new WeakMap<Root, CommandDefinition<any, any, any>>()\n\n/** @internal Maps CLI instances to their root options schema. */\nexport const toRootOptions = new WeakMap<Cli, z.ZodObject<any>>()\n\n/** @internal Maps CLI instances to whether config file loading is enabled. */\nexport const toConfigEnabled = new WeakMap<Cli, boolean>()\n\n/** @internal Maps CLI instances to their output policy. */\nconst toOutputPolicy = new WeakMap<Cli, OutputPolicy>()\n\n/** Descriptor for a CLI's custom global options schema and aliases. */\nexport type GlobalsDescriptor = {\n schema: z.ZodObject<any>\n alias?: Record<string, string> | undefined\n}\n\n/** @internal Maps CLI instances to their globals schema and alias map. */\nconst toGlobals = new WeakMap<Cli, GlobalsDescriptor>()\n\n/** @internal Maps root CLI instances to their command aliases. */\nconst toRootAliases = new WeakMap<Root, string[]>()\n\n/** @internal Sentinel symbol for `ok()` and `error()` return values. */\nconst sentinel = Symbol.for('incur.sentinel')\n\n/** @internal A tagged ok result returned by the `ok` context helper. */\ntype OkResult = {\n [sentinel]: 'ok'\n data: unknown\n cta?: CtaBlock | undefined\n}\n\n/** @internal A tagged error result returned by the `error` context helper. */\ntype ErrorResult = {\n [sentinel]: 'error'\n code: string\n message: string\n retryable?: boolean | undefined\n exitCode?: number | undefined\n cta?: CtaBlock | undefined\n}\n\n/** @internal A CTA block with a description and list of suggested commands. */\ntype CtaBlock<commands extends CommandsMap = Commands> = {\n /** Commands to suggest. */\n commands: Cta<commands>[]\n /** Human-readable label. Defaults to `\"Suggested command:\"` or `\"Suggested commands:\"` based on count. */\n description?: string | undefined\n}\n\n/** @internal Formats an error for human-readable TTY output. */\nfunction formatHumanError(error: {\n code: string\n message: string\n fieldErrors?: FieldError[] | undefined\n}): string {\n const prefix =\n error.code === 'UNKNOWN' || error.code === 'COMMAND_NOT_FOUND'\n ? 'Error'\n : `Error (${error.code})`\n let out = `${prefix}: ${error.message}`\n if (error.fieldErrors) for (const fe of error.fieldErrors) out += `\\n ${fe.path}: ${fe.message}`\n return out\n}\n\n/** @internal Formats a CTA block for human-readable TTY output. */\nfunction formatHumanCta(cta: FormattedCtaBlock): string {\n const lines: string[] = ['', cta.description]\n const maxLen = Math.max(...cta.commands.map((c) => c.command.length))\n for (const c of cta.commands) {\n const desc = c.description ? ` ${''.padEnd(maxLen - c.command.length)}# ${c.description}` : ''\n lines.push(` ${c.command}${desc}`)\n }\n return lines.join('\\n')\n}\n\n/** @internal Type guard for sentinel results. */\nfunction hasRequiredArgs(args: z.ZodObject<z.ZodRawShape>): boolean {\n return Object.values(args.shape).some((field) => field._zod.optout !== 'optional')\n}\n\nfunction isSentinel(value: unknown): value is OkResult | ErrorResult {\n return typeof value === 'object' && value !== null && sentinel in value\n}\n\n/** @internal Handles streaming output from an async generator `run` handler. */\nasync function handleStreaming(\n generator: AsyncGenerator<unknown, unknown, unknown>,\n ctx: {\n name: string\n path: string\n start: number\n format: Formatter.Format\n formatExplicit: boolean\n human: boolean\n renderOutput: boolean\n fullOutput: boolean\n truncate: (s: string) => { text: string; truncated: boolean; nextOffset?: number | undefined }\n write: (output: Output) => void\n writeln: (s: string) => void\n exit: (code: number) => void\n },\n) {\n // Incremental: no explicit format (default toon), or explicit jsonl\n // Buffered: explicit json/yaml/toon/md\n const useJsonl = ctx.format === 'jsonl'\n const incremental = useJsonl || (!ctx.formatExplicit && ctx.format === 'toon')\n\n if (incremental) {\n // Incremental output: write each chunk as it arrives\n try {\n let returnValue: unknown\n while (true) {\n const { value, done } = await generator.next()\n if (done) {\n returnValue = value\n break\n }\n if (isSentinel(value)) {\n const tagged = value as any\n if (tagged[sentinel] === 'error') {\n if (useJsonl)\n ctx.writeln(\n JSON.stringify({\n type: 'error',\n ok: false,\n error: {\n code: tagged.code,\n message: tagged.message,\n ...(tagged.retryable !== undefined\n ? { retryable: tagged.retryable }\n : undefined),\n },\n }),\n )\n else ctx.writeln(formatHumanError({ code: tagged.code, message: tagged.message }))\n ctx.exit(tagged.exitCode ?? 1)\n return\n }\n }\n if (useJsonl) ctx.writeln(Json.stringify({ type: 'chunk', data: value }))\n else if (ctx.renderOutput)\n ctx.writeln(ctx.truncate(Formatter.format(value, ctx.format)).text)\n }\n\n // Handle return value — error() or ok() sentinel\n if (isSentinel(returnValue) && returnValue[sentinel] === 'error') {\n const err = returnValue as ErrorResult\n if (useJsonl)\n ctx.writeln(\n JSON.stringify({\n type: 'error',\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n ...(err.retryable !== undefined ? { retryable: err.retryable } : undefined),\n },\n }),\n )\n else ctx.writeln(formatHumanError({ code: err.code, message: err.message }))\n ctx.exit(err.exitCode ?? 1)\n return\n }\n\n const cta =\n isSentinel(returnValue) && returnValue[sentinel] === 'ok'\n ? formatCtaBlock(ctx.name, (returnValue as OkResult).cta)\n : undefined\n\n if (useJsonl)\n ctx.writeln(\n JSON.stringify({\n type: 'done',\n ok: true,\n meta: {\n command: ctx.path,\n duration: `${Math.round(performance.now() - ctx.start)}ms`,\n ...(cta ? { cta } : undefined),\n },\n }),\n )\n else if (cta) ctx.writeln(formatHumanCta(cta))\n } catch (error) {\n if (useJsonl)\n ctx.writeln(\n JSON.stringify({\n type: 'error',\n ok: false,\n error: {\n code: error instanceof IncurError ? error.code : 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n ...(error instanceof IncurError ? { retryable: error.retryable } : undefined),\n },\n }),\n )\n else\n ctx.writeln(\n formatHumanError({\n code: 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n }),\n )\n ctx.exit(error instanceof IncurError ? (error.exitCode ?? 1) : 1)\n }\n } else {\n // Buffered output: collect all chunks, write as single value\n const chunks: unknown[] = []\n try {\n let returnValue: unknown\n while (true) {\n const { value, done } = await generator.next()\n if (done) {\n returnValue = value\n break\n }\n if (isSentinel(value)) {\n const tagged = value as any\n if (tagged[sentinel] === 'error') {\n ctx.write({\n ok: false,\n error: {\n code: tagged.code,\n message: tagged.message,\n ...(tagged.retryable !== undefined ? { retryable: tagged.retryable } : undefined),\n },\n meta: {\n command: ctx.path,\n duration: `${Math.round(performance.now() - ctx.start)}ms`,\n },\n })\n ctx.exit(tagged.exitCode ?? 1)\n return\n }\n }\n chunks.push(value)\n }\n\n if (isSentinel(returnValue) && returnValue[sentinel] === 'error') {\n const err = returnValue as ErrorResult\n ctx.write({\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n ...(err.retryable !== undefined ? { retryable: err.retryable } : undefined),\n },\n meta: {\n command: ctx.path,\n duration: `${Math.round(performance.now() - ctx.start)}ms`,\n },\n })\n ctx.exit(err.exitCode ?? 1)\n return\n }\n\n const cta =\n isSentinel(returnValue) && returnValue[sentinel] === 'ok'\n ? formatCtaBlock(ctx.name, (returnValue as OkResult).cta)\n : undefined\n\n ctx.write({\n ok: true,\n data: chunks,\n meta: {\n command: ctx.path,\n duration: `${Math.round(performance.now() - ctx.start)}ms`,\n ...(cta ? { cta } : undefined),\n },\n })\n } catch (error) {\n ctx.write({\n ok: false,\n error: {\n code: error instanceof IncurError ? error.code : 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n ...(error instanceof IncurError ? { retryable: error.retryable } : undefined),\n },\n meta: {\n command: ctx.path,\n duration: `${Math.round(performance.now() - ctx.start)}ms`,\n },\n })\n ctx.exit(error instanceof IncurError ? (error.exitCode ?? 1) : 1)\n }\n }\n}\n\n/** @internal Builds the `--llms` index manifest (name + description only) from the command tree. */\nfunction buildIndexManifest(\n commands: Map<string, CommandEntry>,\n prefix: string[] = [],\n globalsSchema?: z.ZodObject<any>,\n) {\n return {\n version: 'incur.v1',\n commands: collectIndexCommands(commands, prefix).sort((a, b) => a.name.localeCompare(b.name)),\n ...(globalsSchema ? { globals: Schema.toJsonSchema(globalsSchema) } : undefined),\n }\n}\n\n/** @internal Recursively collects leaf commands with name + description only. */\nfunction collectIndexCommands(\n commands: Map<string, CommandEntry>,\n prefix: string[],\n): { name: string; description?: string | undefined }[] {\n const result: { name: string; description?: string | undefined }[] = []\n for (const [name, entry] of commands) {\n if (isAlias(entry)) continue\n const path = [...prefix, name]\n if (isGroup(entry)) {\n result.push(...collectIndexCommands(entry.commands, path))\n } else {\n const cmd: (typeof result)[number] = { name: path.join(' ') }\n if (isFetchGateway(entry)) {\n if (entry.description) cmd.description = entry.description\n } else if (entry.description) cmd.description = entry.description\n result.push(cmd)\n }\n }\n return result\n}\n\n/** @internal Builds the `--llms` manifest from the command tree. */\nfunction buildManifest(\n commands: Map<string, CommandEntry>,\n prefix: string[] = [],\n globalsSchema?: z.ZodObject<any>,\n) {\n return {\n version: 'incur.v1',\n commands: collectCommands(commands, prefix).sort((a, b) => a.name.localeCompare(b.name)),\n ...(globalsSchema ? { globals: Schema.toJsonSchema(globalsSchema) } : undefined),\n }\n}\n\n/** @internal Recursively collects leaf commands with their full paths. */\nfunction collectCommands(\n commands: Map<string, CommandEntry>,\n prefix: string[],\n): {\n name: string\n description?: string | undefined\n schema?: Record<string, unknown> | undefined\n examples?: { command: string; description?: string | undefined }[] | undefined\n}[] {\n const result: ReturnType<typeof collectCommands> = []\n for (const [name, entry] of commands) {\n if (isAlias(entry)) continue\n const path = [...prefix, name]\n if (isFetchGateway(entry)) {\n const cmd: (typeof result)[number] = { name: path.join(' ') }\n if (entry.description) cmd.description = entry.description\n result.push(cmd)\n } else if (isGroup(entry)) {\n result.push(...collectCommands(entry.commands, path))\n } else {\n const cmd: (typeof result)[number] = { name: path.join(' ') }\n if (entry.description) cmd.description = entry.description\n\n const inputSchema = buildInputSchema(entry.args, entry.env, entry.options)\n const outputSchema = entry.output ? Schema.toJsonSchema(entry.output) : undefined\n if (inputSchema || outputSchema) {\n cmd.schema = {}\n if (inputSchema?.args) cmd.schema.args = inputSchema.args\n if (inputSchema?.env) cmd.schema.env = inputSchema.env\n if (inputSchema?.options) cmd.schema.options = inputSchema.options\n if (outputSchema) cmd.schema.output = outputSchema\n }\n\n const examples = formatExamples(entry.examples)\n if (examples) {\n const cmdName = path.join(' ')\n cmd.examples = examples.map((e) => ({\n ...e,\n command: e.command ? `${cmdName} ${e.command}` : cmdName,\n }))\n }\n result.push(cmd)\n }\n }\n return result\n}\n\n/** @internal Recursively collects leaf commands as `Skill.CommandInfo` for `--llms --format md`. */\nexport function collectSkillCommands(\n commands: Map<string, CommandEntry>,\n prefix: string[],\n groups: Map<string, string>,\n rootCommand?: SkillCommandSource | undefined,\n): Skill.CommandInfo[] {\n const result: Skill.CommandInfo[] = []\n if (rootCommand) {\n const cmd: Skill.CommandInfo = {}\n if (rootCommand.description) cmd.description = rootCommand.description\n if (rootCommand.args) cmd.args = rootCommand.args\n if (rootCommand.env) cmd.env = rootCommand.env\n if (rootCommand.hint) cmd.hint = rootCommand.hint\n if (isDestructive(rootCommand)) cmd.hint = appendDestructiveHint(cmd.hint)\n if (rootCommand.options) cmd.options = rootCommand.options\n if (rootCommand.output) cmd.output = rootCommand.output\n const examples = formatExamples(rootCommand.examples)\n if (examples) cmd.examples = examples\n result.push(cmd)\n }\n for (const [name, entry] of commands) {\n if (isAlias(entry)) continue\n const path = [...prefix, name]\n if (isFetchGateway(entry)) {\n const cmd: Skill.CommandInfo = { name: path.join(' ') }\n if (entry.description) cmd.description = entry.description\n cmd.hint = 'Fetch gateway. Pass path segments and curl-style flags (-X, -H, -d, --key value).'\n result.push(cmd)\n } else if (isGroup(entry)) {\n if (entry.description) groups.set(path.join(' '), entry.description)\n result.push(...collectSkillCommands(entry.commands, path, groups))\n } else {\n const cmd: Skill.CommandInfo = { name: path.join(' ') }\n if (entry.description) cmd.description = entry.description\n if (entry.args) cmd.args = entry.args\n if (entry.env) cmd.env = entry.env\n if (entry.hint) cmd.hint = entry.hint\n if (isDestructive(entry)) cmd.hint = appendDestructiveHint(cmd.hint)\n if (entry.options) cmd.options = entry.options\n if (entry.output) cmd.output = entry.output\n const examples = formatExamples(entry.examples)\n if (examples) {\n const cmdName = path.join(' ')\n cmd.examples = examples.map((e) => ({\n ...e,\n command: e.command ? `${cmdName} ${e.command}` : cmdName,\n }))\n }\n result.push(cmd)\n }\n }\n return result.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? ''))\n}\n\ntype SkillCommandSource = Pick<\n CommandDefinition<any, any, any, any, any, any>,\n | 'args'\n | 'description'\n | 'destructive'\n | 'env'\n | 'examples'\n | 'hint'\n | 'mcp'\n | 'options'\n | 'output'\n>\n\nfunction isDestructive(command: SkillCommandSource): boolean {\n return command.destructive === true || command.mcp?.annotations?.destructiveHint === true\n}\n\nfunction appendDestructiveHint(hint: string | undefined): string {\n if (!hint) return destructiveCommandHint\n if (hint.includes(destructiveCommandHint)) return hint\n return `${hint} ${destructiveCommandHint}`\n}\n\n/** @internal Formats examples into `{ command, description }` objects. `command` is the args/options suffix only. */\nexport function formatExamples(\n examples: Example<any, any>[] | undefined,\n): { command: string; description?: string }[] | undefined {\n if (!examples || examples.length === 0) return undefined\n return examples.map((ex) => {\n const parts: string[] = []\n if (ex.args) for (const value of Object.values(ex.args)) parts.push(String(value))\n if (ex.options)\n for (const [key, value] of Object.entries(ex.options)) parts.push(`--${key} ${value}`)\n const result: { command: string; description?: string } = { command: parts.join(' ') }\n if (ex.description) result.description = ex.description\n return result\n })\n}\n\n/** @internal Parses YAML frontmatter from generated skill Markdown. */\nexport function parseSkillFrontmatter(content: string): {\n description?: string | undefined\n name?: string | undefined\n} {\n const match = content.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---/)\n if (!match) return {}\n const meta = Yaml.loadSync().parse(match[1]!)\n if (!meta || typeof meta !== 'object') return {}\n return meta as { description?: string | undefined; name?: string | undefined }\n}\n\n/** @internal Builds separate args, env, and options JSON Schemas. */\nfunction buildInputSchema(\n args: z.ZodObject<any> | undefined,\n env: z.ZodObject<any> | undefined,\n options: z.ZodObject<any> | undefined,\n):\n | {\n args?: Record<string, unknown> | undefined\n env?: Record<string, unknown> | undefined\n options?: Record<string, unknown> | undefined\n }\n | undefined {\n if (!args && !env && !options) return undefined\n const result: {\n args?: Record<string, unknown> | undefined\n env?: Record<string, unknown> | undefined\n options?: Record<string, unknown> | undefined\n } = {}\n if (args) result.args = Schema.toJsonSchema(args)\n if (env) result.env = Schema.toJsonSchema(env)\n if (options) result.options = Schema.toJsonSchema(options)\n return result\n}\n\n/** @internal A usage example for a command, typed against its args and options schemas. */\ntype Example<\n args extends z.ZodObject<any> | undefined,\n options extends z.ZodObject<any> | undefined,\n> = {\n /** Positional arguments for this example. */\n args?: args extends z.ZodObject<any> ? Partial<z.output<args>> | undefined : undefined\n /** A short description of what this example demonstrates. */\n description?: string | undefined\n /** Named options for this example. */\n options?: options extends z.ZodObject<any> ? Partial<z.output<options>> | undefined : undefined\n}\n\n/** @internal A usage pattern shown in help output. */\ntype Usage<\n args extends z.ZodObject<any> | undefined,\n options extends z.ZodObject<any> | undefined,\n> = {\n /** Positional arguments to include. Use `true` to show as `<name>`. */\n args?: args extends z.ZodObject<any>\n ? Partial<Record<keyof z.output<args>, true>> | undefined\n : undefined\n /** Named options to include. Use `true` to show as `--name <name>`. */\n options?: options extends z.ZodObject<any>\n ? Partial<Record<keyof z.output<options>, true>> | undefined\n : undefined\n /** Text prepended before the command (e.g. `\"cat file.txt |\"`). */\n prefix?: string | undefined\n /** Text appended after the command (e.g. `\"| head\"`). */\n suffix?: string | undefined\n}\n\n/** @internal Inferred output type of a Zod schema, or `{}` when the schema is not provided. */\ntype InferOutput<schema extends z.ZodObject<any> | undefined> =\n schema extends z.ZodObject<any> ? z.output<schema> : {}\n\n/** @internal Inferred return type for a command handler. */\ntype InferReturn<output extends z.ZodType | undefined> = output extends z.ZodType\n ? z.output<output>\n : unknown\n\n/** @internal Inferred vars type from a Zod schema, or `{}` when no schema is provided. */\ntype InferVars<vars extends z.ZodObject<any> | undefined> =\n vars extends z.ZodObject<any> ? z.output<vars> : {}\n\n/** @internal The output envelope written to stdout. */\ntype Output = OneOf<\n | {\n /** The command's return data. */\n data: unknown\n /** Request metadata. */\n meta: Output.Meta\n /** Whether the command succeeded. */\n ok: true\n }\n | {\n /** Error details. */\n error: {\n /** Machine-readable error code. */\n code: string\n /** Per-field validation errors. */\n fieldErrors?: FieldError[] | undefined\n /** Human-readable error message. */\n message: string\n /** Whether the operation can be retried. */\n retryable?: boolean | undefined\n }\n /** Request metadata. */\n meta: Output.Meta\n /** Whether the command succeeded. */\n ok: false\n }\n>\n\n/** @internal */\ndeclare namespace Output {\n /** Shared metadata included in every envelope. */\n type Meta = {\n /** The command that was invoked. */\n command: string\n /** Suggested next commands. */\n cta?: FormattedCtaBlock | undefined\n /** Wall-clock duration of the command. */\n duration: string\n /** Offset to pass as `--token-offset` to fetch the next page of truncated output. */\n nextOffset?: number | undefined\n }\n}\n\n/** @internal Defines a command's schema, handler, and metadata. */\ntype CommandDefinition<\n args extends z.ZodObject<any> | undefined = undefined,\n env extends z.ZodObject<any> | undefined = undefined,\n options extends z.ZodObject<any> | undefined = undefined,\n output extends z.ZodType | undefined = undefined,\n vars extends z.ZodObject<any> | undefined = undefined,\n cliEnv extends z.ZodObject<any> | undefined = undefined,\n> = CommandMeta<options> & {\n /** Alternative names for this command (e.g. `['extensions', 'ext']` for an `extension` command). */\n aliases?: string[] | undefined\n /** Zod schema for positional arguments. */\n args?: args | undefined\n /** Zod schema for environment variables. Keys are the variable names (e.g. `NPM_TOKEN`). */\n env?: env | undefined\n /** Marks this command as destructive when generating agent skills. */\n destructive?: boolean | undefined\n /** Usage examples for this command. */\n examples?: Example<args, options>[] | undefined\n /** Default output format. Overridden by `--format` or `--json`. */\n format?: Formatter.Format | undefined\n /** Plain text hint displayed after examples and before global options. */\n hint?: string | undefined\n /** MCP-specific metadata exposed when this command is served as a tool. */\n mcp?:\n | {\n /** Override the command name exposed to MCP clients. */\n name?: string | undefined\n /** Override the command description exposed to MCP clients. */\n description?: string | undefined\n /** MCP tool annotations that describe tool behavior to clients. */\n annotations?: Mcp.ToolAnnotations | undefined\n /** Tool-specific instructions surfaced to MCP clients. */\n instructions?: string | undefined\n }\n | undefined\n /** Zod schema for the command's return value. */\n output?: output | undefined\n /**\n * Controls when output data is displayed. Inherited by child commands when set on a group.\n *\n * - `'all'` — displays to both humans and agents.\n * - `'agent-only'` — suppresses data output in human/TTY mode while still returning it to agents.\n *\n * @default 'all'\n */\n outputPolicy?: OutputPolicy | undefined\n /** Middleware that runs only for this command, after root and group middleware. */\n middleware?: MiddlewareHandler<vars, cliEnv>[] | undefined\n /** Alternative usage patterns shown in help output. */\n usage?: Usage<args, options>[] | undefined\n /** The command handler. Return a value for single-return, or use `async *run` to stream chunks. */\n run(context: {\n /** Whether the consumer is an agent (stdout is not a TTY). */\n agent: boolean\n /** Positional arguments. */\n args: InferOutput<args>\n /** The binary name the user invoked (e.g. an alias). Falls back to `name` when not resolvable. */\n displayName: string\n /** Parsed environment variables. */\n env: InferOutput<env>\n /** Return an error result with optional CTAs. */\n error: (options: {\n code: string\n cta?: CtaBlock | undefined\n exitCode?: number | undefined\n message: string\n retryable?: boolean | undefined\n }) => never\n /** The resolved output format (e.g. `'toon'`, `'json'`, `'jsonl'`). */\n format: Formatter.Format\n /** Whether the user explicitly passed `--format` or `--json`. */\n formatExplicit: boolean\n /** The CLI name. */\n name: string\n /** Return a success result with optional metadata (e.g. CTAs). */\n ok: (data: InferReturn<output>, meta?: { cta?: CtaBlock | undefined }) => never\n options: InferOutput<options>\n /** Variables set by middleware. */\n var: InferVars<vars>\n /** The CLI version string. */\n version: string | undefined\n }):\n | InferReturn<output>\n | Promise<InferReturn<output>>\n | AsyncGenerator<InferReturn<output>, unknown, unknown>\n}\n\n/** @internal Scans argv for deprecated flags and writes warnings to stderr. */\nfunction emitDeprecationWarnings(\n argv: string[],\n optionsSchema: z.ZodObject<any> | undefined,\n alias?: Record<string, string> | undefined,\n) {\n if (!optionsSchema) return\n const shape = optionsSchema.shape as Record<string, any>\n const deprecatedFlags = new Set<string>()\n const deprecatedShorts = new Map<string, string>()\n for (const key of Object.keys(shape)) {\n const meta = shape[key]?.meta?.()\n if (meta?.deprecated) {\n const kebab = key.replace(/[A-Z]/g, (c: string) => `-${c.toLowerCase()}`)\n deprecatedFlags.add(kebab)\n if (alias?.[key]) deprecatedShorts.set(alias[key]!, kebab)\n }\n }\n if (deprecatedFlags.size === 0) return\n for (const token of argv) {\n if (token.startsWith('--')) {\n const stripped = token.split('=')[0]!.slice(2)\n const raw =\n !deprecatedFlags.has(stripped) && stripped.startsWith('no-') ? stripped.slice(3) : stripped\n if (deprecatedFlags.has(raw)) process.stderr.write(`Warning: --${raw} is deprecated\\n`)\n } else if (token.startsWith('-') && token.length >= 2) {\n for (const ch of token.slice(1))\n if (deprecatedShorts.has(ch))\n process.stderr.write(`Warning: --${deprecatedShorts.get(ch)} is deprecated\\n`)\n }\n }\n}\n\n/** @internal Resolves the display name from `process.argv[1]` basename. Returns the basename if it matches `name` or one of the `aliases`, otherwise falls back to `name`. */\nfunction resolveDisplayName(name: string, aliases?: string[]): string {\n const bin = process.argv[1]\n if (!bin) return name\n const basename = path.basename(bin)\n if (basename === name) return name\n if (aliases?.includes(basename)) return basename\n return name\n}\n","//#region src/index.ts\nconst PATTERNS = {\n\twhitespace: /^\\s+$/,\n\tcjk: /[\\u4E00-\\u9FFF\\u3400-\\u4DBF\\u3000-\\u303F\\uFF00-\\uFFEF\\u30A0-\\u30FF\\u2E80-\\u2EFF\\u31C0-\\u31EF\\u3200-\\u32FF\\u3300-\\u33FF\\uAC00-\\uD7AF\\u1100-\\u11FF\\u3130-\\u318F\\uA960-\\uA97F\\uD7B0-\\uD7FF]/,\n\tnumeric: /^\\d+(?:[.,]\\d+)*$/,\n\tpunctuation: /[.,!?;(){}[\\]<>:/\\\\|@#$%^&*+=`~_-]/,\n\talphanumeric: /^[a-zA-Z0-9\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u00FF]+$/\n};\nconst TOKEN_SPLIT_PATTERN = /* @__PURE__ */ new RegExp(`(\\\\s+|${PATTERNS.punctuation.source}+)`);\nconst DEFAULT_CHARS_PER_TOKEN = 6;\nconst SHORT_TOKEN_THRESHOLD = 3;\nconst DEFAULT_LANGUAGE_CONFIGS = [\n\t{\n\t\tpattern: /[äöüßẞ]/i,\n\t\taverageCharsPerToken: 3\n\t},\n\t{\n\t\tpattern: /[éèêëàâîïôûùüÿçœæáíóúñ]/i,\n\t\taverageCharsPerToken: 3\n\t},\n\t{\n\t\tpattern: /[ąćęłńóśźżěščřžýůúďťň]/i,\n\t\taverageCharsPerToken: 3.5\n\t}\n];\n/**\n* Checks if a text string is within a specified token limit\n*/\nfunction isWithinTokenLimit(text, tokenLimit, options) {\n\treturn estimateTokenCount(text, options) <= tokenLimit;\n}\n/** @deprecated Use `estimateTokenCount` instead */\nconst approximateTokenSize = estimateTokenCount;\n/**\n* Estimates the number of tokens in a text string using heuristic rules.\n*/\nfunction estimateTokenCount(text, options = {}) {\n\tif (!text) return 0;\n\tconst { defaultCharsPerToken = DEFAULT_CHARS_PER_TOKEN, languageConfigs = DEFAULT_LANGUAGE_CONFIGS } = options;\n\tconst segments = text.split(TOKEN_SPLIT_PATTERN).filter(Boolean);\n\tlet tokenCount = 0;\n\tfor (const segment of segments) tokenCount += estimateSegmentTokens(segment, languageConfigs, defaultCharsPerToken);\n\treturn tokenCount;\n}\n/**\n* Extracts a portion of text based on token positions, similar to Array.prototype.slice().\n*/\nfunction sliceByTokens(text, start = 0, end, options = {}) {\n\tif (!text) return \"\";\n\tconst { defaultCharsPerToken = DEFAULT_CHARS_PER_TOKEN, languageConfigs = DEFAULT_LANGUAGE_CONFIGS } = options;\n\tlet totalTokens = 0;\n\tif (start < 0 || end !== void 0 && end < 0) totalTokens = estimateTokenCount(text, options);\n\tconst normalizedStart = start < 0 ? Math.max(0, totalTokens + start) : Math.max(0, start);\n\tconst normalizedEnd = end === void 0 ? Infinity : end < 0 ? Math.max(0, totalTokens + end) : end;\n\tif (normalizedStart >= normalizedEnd) return \"\";\n\tconst segments = text.split(TOKEN_SPLIT_PATTERN).filter(Boolean);\n\tconst parts = [];\n\tlet currentTokenPos = 0;\n\tfor (const segment of segments) {\n\t\tif (currentTokenPos >= normalizedEnd) break;\n\t\tconst tokenCount = estimateSegmentTokens(segment, languageConfigs, defaultCharsPerToken);\n\t\tconst extracted = extractSegmentPart(segment, currentTokenPos, tokenCount, normalizedStart, normalizedEnd);\n\t\tif (extracted) parts.push(extracted);\n\t\tcurrentTokenPos += tokenCount;\n\t}\n\treturn parts.join(\"\");\n}\n/**\n* Splits text into chunks based on token count.\n*/\nfunction splitByTokens(text, tokensPerChunk, options = {}) {\n\tif (!text || tokensPerChunk <= 0) return [];\n\tconst { defaultCharsPerToken = DEFAULT_CHARS_PER_TOKEN, languageConfigs = DEFAULT_LANGUAGE_CONFIGS, overlap = 0 } = options;\n\tconst segments = text.split(TOKEN_SPLIT_PATTERN).filter(Boolean);\n\tconst chunks = [];\n\tlet currentChunk = [];\n\tlet currentTokenCount = 0;\n\tfor (const segment of segments) {\n\t\tconst tokenCount = estimateSegmentTokens(segment, languageConfigs, defaultCharsPerToken);\n\t\tcurrentChunk.push(segment);\n\t\tcurrentTokenCount += tokenCount;\n\t\tif (currentTokenCount >= tokensPerChunk) {\n\t\t\tchunks.push(currentChunk.join(\"\"));\n\t\t\tif (overlap > 0) {\n\t\t\t\tconst overlapSegments = [];\n\t\t\t\tlet overlapTokenCount = 0;\n\t\t\t\tfor (let i = currentChunk.length - 1; i >= 0 && overlapTokenCount < overlap; i--) {\n\t\t\t\t\tconst segmentValue = currentChunk[i];\n\t\t\t\t\tconst tokCount = estimateSegmentTokens(segmentValue, languageConfigs, defaultCharsPerToken);\n\t\t\t\t\toverlapSegments.unshift(segmentValue);\n\t\t\t\t\toverlapTokenCount += tokCount;\n\t\t\t\t}\n\t\t\t\tcurrentChunk = overlapSegments;\n\t\t\t\tcurrentTokenCount = overlapTokenCount;\n\t\t\t} else {\n\t\t\t\tcurrentChunk = [];\n\t\t\t\tcurrentTokenCount = 0;\n\t\t\t}\n\t\t}\n\t}\n\tif (currentChunk.length > 0) chunks.push(currentChunk.join(\"\"));\n\treturn chunks;\n}\nfunction estimateSegmentTokens(segment, languageConfigs, defaultCharsPerToken) {\n\tif (PATTERNS.whitespace.test(segment)) return 0;\n\tif (PATTERNS.cjk.test(segment)) return getCharacterCount(segment);\n\tif (PATTERNS.numeric.test(segment)) return 1;\n\tif (segment.length <= SHORT_TOKEN_THRESHOLD) return 1;\n\tif (PATTERNS.punctuation.test(segment)) return segment.length > 1 ? Math.ceil(segment.length / 2) : 1;\n\tif (PATTERNS.alphanumeric.test(segment)) {\n\t\tconst charsPerToken$1 = getLanguageSpecificCharsPerToken(segment, languageConfigs) ?? defaultCharsPerToken;\n\t\treturn Math.ceil(segment.length / charsPerToken$1);\n\t}\n\tconst charsPerToken = getLanguageSpecificCharsPerToken(segment, languageConfigs) ?? defaultCharsPerToken;\n\treturn Math.ceil(segment.length / charsPerToken);\n}\nfunction getLanguageSpecificCharsPerToken(segment, languageConfigs) {\n\tfor (const config of languageConfigs) if (config.pattern.test(segment)) return config.averageCharsPerToken;\n}\nfunction getCharacterCount(text) {\n\treturn Array.from(text).length;\n}\nfunction extractSegmentPart(segment, segmentTokenStart, segmentTokenCount, targetStart, targetEnd) {\n\tif (segmentTokenCount === 0) return segmentTokenStart >= targetStart && segmentTokenStart < targetEnd ? segment : \"\";\n\tconst segmentTokenEnd = segmentTokenStart + segmentTokenCount;\n\tif (segmentTokenStart >= targetEnd || segmentTokenEnd <= targetStart) return \"\";\n\tconst overlapStart = Math.max(0, targetStart - segmentTokenStart);\n\tconst overlapEnd = Math.min(segmentTokenCount, targetEnd - segmentTokenStart);\n\tif (overlapStart === 0 && overlapEnd === segmentTokenCount) return segment;\n\tconst charStart = Math.floor(overlapStart / segmentTokenCount * segment.length);\n\tconst charEnd = Math.ceil(overlapEnd / segmentTokenCount * segment.length);\n\treturn segment.slice(charStart, charEnd);\n}\n\n//#endregion\nexport { approximateTokenSize, estimateTokenCount, isWithinTokenLimit, sliceByTokens, splitByTokens };","/** Checks whether a value is a plain object record. */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\n/** Converts a camelCase string to kebab-case. */\nexport function toKebab(value: string): string {\n return value.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)\n}\n\n/** Computes the Levenshtein edit distance between two strings. */\nexport function levenshtein(a: string, b: string): number {\n const m = a.length\n const n = b.length\n const dp: number[] = Array.from({ length: n + 1 }, (_, i) => i)\n for (let i = 1; i <= m; i++) {\n let prev = dp[0]!\n dp[0] = i\n for (let j = 1; j <= n; j++) {\n const tmp = dp[j]!\n dp[j] = a[i - 1] === b[j - 1] ? prev : 1 + Math.min(prev, dp[j]!, dp[j - 1]!)\n prev = tmp\n }\n }\n return dp[n]!\n}\n\n/** Suggests the closest command name from a set, returning it if within a reasonable edit distance. */\nexport function suggest(input: string, candidates: Iterable<string>): string | undefined {\n const threshold = input.length <= 4 ? 2 : Math.floor(input.length / 2)\n const lower = input.toLowerCase()\n const all = Array.isArray(candidates) ? candidates : [...candidates]\n\n let best: string | undefined\n let bestScore = Infinity\n\n for (const c of all) {\n const lc = c.toLowerCase()\n const dist = levenshtein(lower, lc)\n\n let score: number\n if (lc.startsWith(lower) && lc !== lower)\n // prefix match — best tier\n score = dist\n else if (lc.includes(lower))\n // contains match — middle tier\n score = 100 + dist\n else if (dist <= threshold)\n // fuzzy match — last tier\n score = 200 + dist\n else continue\n\n if (score < bestScore) {\n bestScore = score\n best = c\n }\n }\n return best\n}\n","import type { z } from 'zod'\n\nimport type { GlobalsDescriptor } from './Cli.js'\nimport type { Shell } from './internal/command.js'\nimport { toKebab } from './internal/helpers.js'\n\n/** A completion candidate with an optional description. */\nexport type Candidate = {\n /** Optional description shown alongside the candidate. */\n description?: string | undefined\n /** When true, the shell should not append a trailing space after this candidate. */\n noSpace?: boolean | undefined\n /** The completion value. */\n value: string\n}\n\n/** @internal Entry stored in a command map — either a leaf definition, a group, or an alias. */\ntype CommandEntry = {\n _alias?: true | undefined\n _group?: true | undefined\n alias?: Record<string, string | undefined> | undefined\n args?: z.ZodObject<any> | undefined\n commands?: Map<string, CommandEntry> | undefined\n description?: string | undefined\n options?: z.ZodObject<any> | undefined\n target?: string | undefined\n}\n\n/**\n * Generates a shell hook script that registers dynamic completions for the CLI.\n * The hook calls back into the binary with `COMPLETE=<shell>` at every tab press.\n */\nexport function register(shell: Shell, name: string): string {\n switch (shell) {\n case 'bash':\n return bashRegister(name)\n case 'zsh':\n return zshRegister(name)\n case 'fish':\n return fishRegister(name)\n case 'nushell':\n return nushellRegister(name)\n }\n}\n\n\n/**\n * Computes completion candidates for the given argv words and cursor index.\n * Walks the command tree to resolve the active command, then suggests\n * subcommands, options, or positional argument hints.\n */\nexport function complete(\n commands: Map<string, CommandEntry>,\n rootCommand: CommandEntry | undefined,\n argv: string[],\n index: number,\n globals?: GlobalsDescriptor | undefined,\n): Candidate[] {\n const current = argv[index] ?? ''\n\n // Walk argv tokens up to (but not including) the cursor word to resolve the active scope\n let scope: { commands: Map<string, CommandEntry>; leaf?: CommandEntry | undefined } = {\n commands,\n leaf: rootCommand,\n }\n\n for (let i = 0; i < index; i++) {\n const token = argv[i]!\n if (token.startsWith('-')) continue\n let entry = scope.commands.get(token)\n if (!entry) continue\n // Follow alias to canonical entry\n if (entry._alias && entry.target) entry = scope.commands.get(entry.target)\n if (!entry) continue\n if (entry._group && entry.commands) {\n scope = { commands: entry.commands }\n } else {\n scope = { commands: new Map(), leaf: entry }\n break\n }\n }\n\n const candidates: Candidate[] = []\n\n // If cursor word starts with '-', suggest options from the active leaf command\n if (current.startsWith('-')) {\n const leaf = scope.leaf\n if (leaf?.options) {\n const shape = leaf.options.shape as Record<string, any>\n for (const key of Object.keys(shape)) {\n const kebab = toKebab(key)\n const flag = `--${kebab}`\n if (flag.startsWith(current))\n candidates.push({ value: flag, description: descriptionOf(shape[key]) })\n }\n // Short aliases\n if (leaf.alias)\n for (const [name, short] of Object.entries(leaf.alias)) {\n const flag = `-${short}`\n if (flag.startsWith(current)) {\n const desc = descriptionOf(shape[name])\n candidates.push({ value: flag, description: desc })\n }\n }\n }\n // Global options\n if (globals) {\n const globalShape = globals.schema.shape as Record<string, any>\n for (const key of Object.keys(globalShape)) {\n const kebab = toKebab(key)\n const flag = `--${kebab}`\n if (flag.startsWith(current) && !candidates.some((c) => c.value === flag))\n candidates.push({ value: flag, description: descriptionOf(globalShape[key]) })\n }\n // Global short aliases\n if (globals.alias)\n for (const [name, short] of Object.entries(globals.alias)) {\n const flag = `-${short}`\n if (flag.startsWith(current) && !candidates.some((c) => c.value === flag)) {\n const desc = descriptionOf(globalShape[name])\n candidates.push({ value: flag, description: desc })\n }\n }\n }\n return candidates\n }\n\n // Check if previous token is a non-boolean option expecting a value\n if (index > 0) {\n const prev = argv[index - 1]!\n const leaf = scope.leaf\n if (prev.startsWith('-')) {\n // Try command-specific options first\n if (leaf?.options) {\n const name = resolveOptionName(prev, leaf)\n if (name) {\n const values = possibleValues(name, leaf.options)\n if (values) {\n for (const v of values) if (v.startsWith(current)) candidates.push({ value: v })\n return candidates\n }\n if (!isBooleanOption(name, leaf.options)) return candidates\n }\n }\n // Try global options\n if (globals) {\n const globalEntry: CommandEntry = { options: globals.schema, alias: globals.alias }\n const name = resolveOptionName(prev, globalEntry)\n if (name) {\n const values = possibleValues(name, globals.schema)\n if (values) {\n for (const v of values) if (v.startsWith(current)) candidates.push({ value: v })\n return candidates\n }\n if (!isBooleanOption(name, globals.schema)) return candidates\n }\n }\n }\n }\n\n // Suggest subcommands (groups get noSpace so user can keep typing subcommand)\n for (const [name, entry] of scope.commands) {\n if (entry._alias) continue\n if (name.startsWith(current))\n candidates.push({\n value: name,\n description: entry.description,\n ...(entry._group ? { noSpace: true } : undefined),\n })\n }\n\n return candidates\n}\n\n/**\n * Formats completion candidates into shell-specific output.\n * - bash: `\\013`-separated values (noSpace candidates end with `\\001`)\n * - zsh: `value:description` newline-separated (`:` escaped in values)\n * - fish: `value\\tdescription` newline-separated\n * - nushell: JSON array of `{value, description}` records\n */\nexport function format(shell: Shell, candidates: Candidate[]): string {\n switch (shell) {\n case 'bash': {\n return candidates.map((c) => (c.noSpace ? `${c.value}\\x01` : c.value)).join('\\v')\n }\n case 'zsh': {\n return candidates\n .map((c) => {\n const escaped = c.value.replaceAll(':', '\\\\:')\n return c.description ? `${escaped}:${c.description}` : escaped\n })\n .join('\\n')\n }\n case 'fish': {\n return candidates\n .map((c) => (c.description ? `${c.value}\\t${c.description}` : c.value))\n .join('\\n')\n }\n case 'nushell': {\n const records = candidates.map((c) => {\n const record: { value: string; description?: string } = { value: c.value }\n if (c.description) record.description = c.description\n return record\n })\n return JSON.stringify(records)\n }\n }\n}\n\n/** @internal Resolves a flag token (e.g. `--foo-bar` or `-f`) to its camelCase option name. */\nfunction resolveOptionName(token: string, entry: CommandEntry): string | undefined {\n if (!entry.options) return undefined\n const known = new Set(Object.keys(entry.options.shape))\n const kebabToCamel = new Map<string, string>()\n for (const name of known) {\n const kebab = name.replace(/[A-Z]/g, (c: string) => `-${c.toLowerCase()}`)\n if (kebab !== name) kebabToCamel.set(kebab, name)\n }\n\n if (token.startsWith('--')) {\n const raw = token.slice(2)\n const name = kebabToCamel.get(raw) ?? raw\n return known.has(name) ? name : undefined\n }\n if (token.startsWith('-') && token.length === 2 && entry.alias) {\n const short = token.slice(1)\n for (const [name, alias] of Object.entries(entry.alias)) if (alias === short) return name\n }\n return undefined\n}\n\n/** @internal Checks if an option's inner type is boolean or count. */\nfunction isBooleanOption(name: string, schema: z.ZodObject<any>): boolean {\n const field = schema.shape[name]\n if (!field) return false\n if (typeof field.meta === 'function' && field.meta()?.count === true) return true\n return unwrap(field).constructor.name === 'ZodBoolean'\n}\n\n/** @internal Extracts possible values from enum schemas. */\nfunction possibleValues(name: string, schema: z.ZodObject<any>): string[] | undefined {\n const field = schema.shape[name]\n if (!field) return undefined\n const inner = unwrap(field)\n if (inner.constructor.name === 'ZodEnum') return Object.values((inner as any)._zod.def.entries)\n if (inner.constructor.name === 'ZodNativeEnum') return Object.keys((inner as any)._zod.def.values)\n return undefined\n}\n\n/** @internal Unwraps ZodDefault/ZodOptional to get the inner type. */\nfunction unwrap(schema: z.ZodType): z.ZodType {\n let s = schema as any\n while (s._zod?.def?.innerType) s = s._zod.def.innerType\n return s\n}\n\n/** @internal Extracts a description from a Zod schema's metadata. */\nfunction descriptionOf(schema: z.ZodType | undefined): string | undefined {\n if (!schema) return undefined\n return (schema as any).description\n}\n\n// ---------------------------------------------------------------------------\n// Shell registration scripts\n// ---------------------------------------------------------------------------\n\n/** @internal Sanitizes a CLI name into a valid shell identifier. */\nfunction ident(name: string): string {\n return name.replace(/[^a-zA-Z0-9_]/g, '_')\n}\n\nfunction bashRegister(name: string): string {\n const id = ident(name)\n return `_incur_complete_${id}() {\n local IFS=$'\\\\013'\n local _COMPLETE_INDEX=\\${COMP_CWORD}\n local _completions\n _completions=( $(\n export COMPLETE=\"bash\"\n export _COMPLETE_INDEX=\"$_COMPLETE_INDEX\"\n \"${name}\" -- \"\\${COMP_WORDS[@]}\"\n ) )\n if [[ $? != 0 ]]; then\n unset COMPREPLY\n return\n fi\n local _nospace=false\n COMPREPLY=()\n for _c in \"\\${_completions[@]}\"; do\n if [[ \"$_c\" == *$'\\\\001' ]]; then\n _nospace=true\n COMPREPLY+=(\"\\${_c%$'\\\\001'}\")\n else\n COMPREPLY+=(\"$_c\")\n fi\n done\n if [[ $_nospace == true ]]; then\n compopt -o nospace\n fi\n}\ncomplete -o default -o bashdefault -o nosort -F _incur_complete_${id} ${name}`\n}\n\nfunction zshRegister(name: string): string {\n const id = ident(name)\n return `#compdef ${name}\n_incur_complete_${id}() {\n local completions=(\"\\${(@f)$(\n export _COMPLETE_INDEX=$(( CURRENT - 1 ))\n export COMPLETE=\"zsh\"\n \"${name}\" -- \"\\${words[@]}\" 2>/dev/null\n )}\")\n if [[ -n $completions ]]; then\n _describe 'values' completions -S ''\n fi\n}\ncompdef _incur_complete_${id} ${name}`\n}\n\nfunction fishRegister(name: string): string {\n return `complete --keep-order --exclusive --command ${name} \\\\\n --arguments \"(COMPLETE=fish ${name} -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))\"`\n}\n\nfunction nushellRegister(name: string): string {\n const id = ident(name)\n return `# External completer for ${name}\n# Add to $env.config.completions.external.completer or use in a dispatch completer.\nlet _incur_complete_${id} = {|spans|\n COMPLETE=nushell ${name} -- ...$spans | from json\n}`\n}\n","/** Base error with shortMessage, details from cause chain, and walk(). */\nexport class BaseError extends Error {\n override name = 'Incur.BaseError'\n /** The short, human-readable error message (without details). */\n shortMessage: string\n /** Details extracted from the cause's message, if any. */\n details: string | undefined\n\n constructor(shortMessage: string, options: BaseError.Options = {}) {\n const details = options.cause instanceof Error ? options.cause.message : undefined\n const message = details ? `${shortMessage}\\n\\nDetails: ${details}` : shortMessage\n super(message, options.cause ? { cause: options.cause } : undefined)\n this.shortMessage = shortMessage\n this.details = details\n }\n\n /**\n * Traverses the cause chain.\n * Without a callback, returns the deepest cause.\n * With a callback, returns the first cause where `fn` returns `true`.\n */\n walk(fn?: ((error: unknown) => boolean) | undefined): unknown {\n return walk(this, fn)\n }\n}\n\nexport declare namespace BaseError {\n /** Options for constructing a BaseError. */\n type Options = {\n /** The underlying cause of this error. */\n cause?: Error | undefined\n }\n}\n\n/** CLI error with code, hint, and retryable flag. */\nexport class IncurError extends BaseError {\n override name = 'Incur.IncurError'\n /** Machine-readable error code (e.g. `'NOT_AUTHENTICATED'`). */\n code: string\n /** Actionable hint for the user. */\n hint: string | undefined\n /** Whether the operation can be retried. */\n retryable: boolean\n /** Process exit code. When set, `serve()` uses this instead of `1`. */\n exitCode: number | undefined\n\n constructor(options: IncurError.Options) {\n super(options.message, options.cause ? { cause: options.cause } : undefined)\n this.code = options.code\n this.hint = options.hint\n this.retryable = options.retryable ?? false\n this.exitCode = options.exitCode\n }\n}\n\nexport declare namespace IncurError {\n /** Options for constructing a IncurError. */\n type Options = {\n /** Machine-readable error code. */\n code: string\n /** Human-readable error message. */\n message: string\n /** Actionable hint for the user. */\n hint?: string | undefined\n /** Whether the operation can be retried. Defaults to `false`. */\n retryable?: boolean | undefined\n /** Process exit code. When set, `serve()` uses this instead of `1`. */\n exitCode?: number | undefined\n /** The underlying cause. */\n cause?: Error | undefined\n }\n}\n\n/** A field-level validation error detail. */\nexport type FieldError = {\n /** The Zod issue code. */\n code?: string | undefined\n /** Whether the input was missing entirely. */\n missing?: boolean | undefined\n /** The field path that failed validation. */\n path: string\n /** The expected value or type. */\n expected: string\n /** The value that was received. */\n received: string\n /** Human-readable validation message. */\n message: string\n}\n\n/** Validation error with per-field error details. */\nexport class ValidationError extends BaseError {\n override name = 'Incur.ValidationError'\n /** Per-field validation errors. */\n fieldErrors: FieldError[]\n\n constructor(options: ValidationError.Options) {\n super(options.message, options.cause ? { cause: options.cause } : undefined)\n this.fieldErrors = options.fieldErrors ?? []\n }\n}\n\nexport declare namespace ValidationError {\n /** Options for constructing a ValidationError. */\n type Options = {\n /** Human-readable error message. */\n message: string\n /** Per-field validation errors. */\n fieldErrors?: FieldError[] | undefined\n /** The underlying cause. */\n cause?: Error | undefined\n }\n}\n\n/** Error thrown when argument parsing fails (unknown flags, missing values). */\nexport class ParseError extends BaseError {\n override name = 'Incur.ParseError'\n\n constructor(options: ParseError.Options) {\n super(options.message, options.cause ? { cause: options.cause } : undefined)\n }\n}\n\nexport declare namespace ParseError {\n /** Options for constructing a ParseError. */\n type Options = {\n /** Human-readable error message. */\n message: string\n /** The underlying cause. */\n cause?: Error | undefined\n }\n}\n\n/** Walks the cause chain, returning the deepest cause or the first matching cause. */\nfunction walk(error: unknown, fn?: ((error: unknown) => boolean) | undefined): unknown {\n if (fn) {\n // Find first matching cause (not self)\n let current = (error as any)?.cause\n while (current) {\n if (fn(current)) return current\n current = (current as any)?.cause\n }\n return undefined\n }\n // Return deepest cause\n let current = error\n while ((current as any)?.cause) current = (current as any).cause\n return current\n}\n","/** Structured input parsed from curl-style argv. */\nexport type FetchInput = {\n body: string | undefined\n headers: Headers\n method: string\n path: string\n query: URLSearchParams\n}\n\n/** Structured output from a fetch Response. */\nexport type FetchOutput = {\n data: unknown\n headers: Headers\n ok: boolean\n status: number\n}\n\n/** A standard Fetch API handler. */\nexport type Handler = (req: Request) => Response | Promise<Response>\n\n/** Fetch source accepted by fetch-backed CLI commands. */\nexport type Source = Handler | RequestSource\n\n/** Hosted request source created from a base URL. */\nexport type RequestSource = {\n /** Handles a forwarded request. */\n fetch: Handler\n /** Base URL used to resolve relative OpenAPI documents. */\n url: URL\n}\n\n/** Reserved flags consumed by the fetch gateway (not forwarded as query params). */\nconst reservedFlags = new Set(['method', 'body', 'data', 'header'])\nconst reservedShort: Record<string, string> = { X: 'method', d: 'data', H: 'header' }\n\n/** Creates a hosted fetch source from a base request URL and shared request options. */\nexport function fromRequest(url: string | URL, options: fromRequest.Options = {}): RequestSource {\n const base = new URL(url)\n const { headers: defaultHeaders, ...init } = options\n\n return {\n url: base,\n fetch(request) {\n const incoming = new URL(request.url)\n const target = new URL(base)\n target.pathname = joinPath(base.pathname, incoming.pathname)\n target.search = incoming.search\n\n const headers = new Headers(defaultHeaders)\n request.headers.forEach((value, key) => headers.set(key, value))\n\n return fetch(new Request(new Request(target, request), { ...init, headers }))\n },\n }\n}\n\nexport declare namespace fromRequest {\n /** Request options applied to every forwarded request. */\n type Options = Omit<RequestInit, 'body' | 'headers' | 'method'> & {\n /** Headers merged into every forwarded request. Per-request headers take precedence. */\n headers?: HeadersInit | undefined\n }\n}\n\nfunction joinPath(basePath: string, path: string) {\n const prefix = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath\n const suffix = path.startsWith('/') ? path : `/${path}`\n return `${prefix}${suffix}` || '/'\n}\n\n/** Parses curl-style argv into a structured fetch input. */\nexport function parseArgv(argv: string[]): FetchInput {\n const segments: string[] = []\n const headers = new Headers()\n const query = new URLSearchParams()\n let method: string | undefined\n let body: string | undefined\n\n let i = 0\n while (i < argv.length) {\n const token = argv[i]!\n\n if (token.startsWith('--')) {\n const eqIdx = token.indexOf('=')\n if (eqIdx !== -1) {\n // --key=value\n const key = token.slice(2, eqIdx)\n const value = token.slice(eqIdx + 1)\n if (reservedFlags.has(key)) handleReserved(key, value)\n else query.set(key, value)\n i++\n } else {\n const key = token.slice(2)\n const value = argv[i + 1]\n if (value === undefined) throw new Error(`Missing value for --${key}`)\n if (reservedFlags.has(key)) handleReserved(key, value)\n else query.set(key, value)\n i += 2\n }\n } else if (token.startsWith('-') && token.length === 2) {\n const short = token[1]!\n const mapped = reservedShort[short]\n if (mapped) {\n const value = argv[i + 1]\n if (value === undefined) throw new Error(`Missing value for -${short}`)\n handleReserved(mapped, value)\n i += 2\n } else {\n // Unknown short flag — treat as single token, don't consume next\n i++\n }\n } else {\n segments.push(token)\n i++\n }\n }\n\n function handleReserved(key: string, value: string) {\n if (key === 'method') method = value.toUpperCase()\n else if (key === 'body' || key === 'data') body = value\n else if (key === 'header') {\n const colonIdx = value.indexOf(':')\n if (colonIdx !== -1) {\n const name = value.slice(0, colonIdx).trim()\n const val = value.slice(colonIdx + 1).trim()\n headers.set(name, val)\n }\n }\n }\n\n return {\n path: segments.length > 0 ? `/${segments.join('/')}` : '/',\n method: method ?? (body !== undefined ? 'POST' : 'GET'),\n headers,\n body,\n query,\n }\n}\n\n/** Constructs a standard Request from a FetchInput. */\nexport function buildRequest(input: FetchInput): Request {\n const url = new URL(input.path, 'http://localhost')\n input.query.forEach((value, key) => url.searchParams.set(key, value))\n\n const init: RequestInit = {\n method: input.method,\n headers: input.headers,\n }\n\n if (input.body !== undefined) {\n init.body = input.body\n if (!input.headers.has('content-type')) input.headers.set('content-type', 'application/json')\n }\n\n return new Request(url.toString(), init)\n}\n\n/** Returns true if the response body is a stream that should be consumed incrementally. */\nexport function isStreamingResponse(response: Response): boolean {\n return response.body !== null && response.headers.get('content-type') === 'application/x-ndjson'\n}\n\n/** Parses a streaming response body as an async generator of parsed NDJSON chunks. */\nexport async function* parseStreamingResponse(\n response: Response,\n): AsyncGenerator<unknown, void, unknown> {\n const reader = response.body!.getReader()\n const decoder = new TextDecoder()\n let buffer = ''\n\n while (true) {\n const { value, done } = await reader.read()\n if (done) break\n buffer += decoder.decode(value, { stream: true })\n\n let newlineIdx: number\n while ((newlineIdx = buffer.indexOf('\\n')) !== -1) {\n const line = buffer.slice(0, newlineIdx).trim()\n buffer = buffer.slice(newlineIdx + 1)\n if (line.length === 0) continue\n try {\n yield JSON.parse(line)\n } catch {\n yield line\n }\n }\n }\n\n // flush remaining buffer\n const remaining = buffer.trim()\n if (remaining.length > 0) {\n try {\n yield JSON.parse(remaining)\n } catch {\n yield remaining\n }\n }\n}\n\n/** Parses a fetch Response into structured output. */\nexport async function parseResponse(response: Response): Promise<FetchOutput> {\n const text = await response.text()\n let data: unknown\n try {\n data = JSON.parse(text)\n } catch {\n data = text\n }\n\n return {\n ok: response.ok,\n status: response.status,\n data,\n headers: response.headers,\n }\n}\n","/** A single segment in a filter path: either a string key or an array slice. */\nexport type Segment = { key: string } | { start: number; end: number }\n\n/** A filter path is an ordered list of segments to traverse. */\nexport type FilterPath = Segment[]\n\n/** Parses a filter expression string into structured filter paths. */\nexport function parse(expression: string): FilterPath[] {\n const paths: FilterPath[] = []\n const tokens: string[] = []\n let current = ''\n let depth = 0\n\n // Split on commas, but commas inside [...] are part of a slice\n for (let i = 0; i < expression.length; i++) {\n const ch = expression[i]!\n if (ch === '[') depth++\n else if (ch === ']') depth--\n\n if (ch === ',' && depth === 0) {\n tokens.push(current)\n current = ''\n } else current += ch\n }\n if (current) tokens.push(current)\n\n for (const token of tokens) {\n const path: FilterPath = []\n let remaining = token\n\n while (remaining.length > 0) {\n const bracketIdx = remaining.indexOf('[')\n\n if (bracketIdx === -1) {\n // No more slices — split remaining by dots\n for (const part of remaining.split('.')) if (part) path.push({ key: part })\n break\n }\n\n // Parse dot-separated keys before the bracket\n const before = remaining.slice(0, bracketIdx)\n for (const part of before.split('.')) if (part) path.push({ key: part })\n\n // Parse the slice [start,end]\n const closeBracket = remaining.indexOf(']', bracketIdx)\n const inner = remaining.slice(bracketIdx + 1, closeBracket)\n const [startStr, endStr] = inner.split(',')\n path.push({ start: Number(startStr), end: Number(endStr) })\n\n remaining = remaining.slice(closeBracket + 1)\n if (remaining.startsWith('.')) remaining = remaining.slice(1)\n }\n\n paths.push(path)\n }\n\n return paths\n}\n\n/** Applies parsed filter paths to a data value, returning a filtered copy. */\nexport function apply(data: unknown, paths: FilterPath[]): unknown {\n if (paths.length === 0) return data\n\n // Single key selecting a scalar → return the scalar directly\n if (paths.length === 1 && paths[0]!.length === 1 && 'key' in paths[0]![0]!) {\n const key = paths[0]![0]!.key\n if (Array.isArray(data)) return data.map((item) => apply(item, paths))\n if (typeof data === 'object' && data !== null) {\n const val = (data as Record<string, unknown>)[key]\n if (typeof val !== 'object' || val === null) return val\n return { [key]: val }\n }\n return undefined\n }\n\n if (Array.isArray(data)) return data.map((item) => apply(item, paths))\n\n const result: Record<string, unknown> = {}\n for (const path of paths) merge(result, data, path, 0)\n return result\n}\n\nfunction merge(\n target: Record<string, unknown>,\n data: unknown,\n segments: Segment[],\n index: number,\n): void {\n if (index >= segments.length || typeof data !== 'object' || data === null) return\n const segment = segments[index]!\n\n if ('key' in segment) {\n const val = (data as Record<string, unknown>)[segment.key]\n if (val === undefined) return\n\n if (index + 1 >= segments.length) {\n target[segment.key] = val\n return\n }\n\n const next = segments[index + 1]!\n if ('start' in next) {\n // Next segment is a slice\n if (!Array.isArray(val)) return\n const sliced = val.slice(next.start, next.end)\n if (index + 2 >= segments.length) {\n target[segment.key] = sliced\n return\n }\n target[segment.key] = sliced.map((item) => {\n const sub: Record<string, unknown> = {}\n merge(sub, item, segments, index + 2)\n return sub\n })\n return\n }\n\n // Next segment is a key — recurse into nested object\n if (typeof val !== 'object' || val === null) return\n if (!target[segment.key] || typeof target[segment.key] !== 'object') target[segment.key] = {}\n merge(target[segment.key] as Record<string, unknown>, val, segments, index + 1)\n return\n }\n\n // slice at root level — shouldn't happen in merge (merge starts from object keys)\n}\n","const NULL_LITERAL = \"null\";\nconst DELIMITERS = {\n\tcomma: \",\",\n\ttab: \"\t\",\n\tpipe: \"|\"\n};\nconst DEFAULT_DELIMITER = DELIMITERS.comma;\n//#endregion\n//#region src/shared/string-utils.ts\n/**\n* Escapes special characters in a string for encoding.\n*\n* @remarks\n* Handles backslashes, quotes, newlines, carriage returns, and tabs.\n* Other U+0000–U+001F control characters are emitted as `\\uXXXX`.\n*/\nfunction escapeString(value) {\n\treturn value.replace(/\\\\/g, `\\\\\\\\`).replace(/\"/g, `\\\\\"`).replace(/\\n/g, `\\\\n`).replace(/\\r/g, `\\\\r`).replace(/\\t/g, `\\\\t`).replace(/[\\u0000-\\u001F]/g, (c) => `\\\\u${c.charCodeAt(0).toString(16).padStart(4, \"0\")}`);\n}\n/**\n* Unescapes a string by processing escape sequences.\n*\n* @remarks\n* Handles `\\n`, `\\t`, `\\r`, `\\\\`, `\\\"`, and `\\uXXXX` escape sequences.\n* Lone surrogates in `\\uXXXX` are rejected.\n*/\nfunction unescapeString(value) {\n\tlet unescaped = \"\";\n\tlet i = 0;\n\twhile (i < value.length) {\n\t\tif (value[i] === \"\\\\\") {\n\t\t\tif (i + 1 >= value.length) throw new SyntaxError(\"Invalid escape sequence: backslash at end of string\");\n\t\t\tconst next = value[i + 1];\n\t\t\tif (next === \"n\") {\n\t\t\t\tunescaped += \"\\n\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (next === \"t\") {\n\t\t\t\tunescaped += \"\t\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (next === \"r\") {\n\t\t\t\tunescaped += \"\\r\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (next === \"\\\\\") {\n\t\t\t\tunescaped += \"\\\\\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (next === \"\\\"\") {\n\t\t\t\tunescaped += \"\\\"\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (next === \"u\") {\n\t\t\t\tif (i + 6 > value.length) throw new SyntaxError(`Invalid escape sequence: truncated \\\\u escape at \"${value.slice(i, i + 6)}\"`);\n\t\t\t\tconst hex = value.slice(i + 2, i + 6);\n\t\t\t\tif (!/^[0-9a-f]{4}$/i.test(hex)) throw new SyntaxError(`Invalid escape sequence: \\\\u must be followed by 4 hex digits, got \"${hex}\"`);\n\t\t\t\tconst codeUnit = Number.parseInt(hex, 16);\n\t\t\t\tif (codeUnit >= 55296 && codeUnit <= 57343) throw new SyntaxError(`Invalid escape sequence: \\\\u${hex} is a lone surrogate; supplementary code points MUST appear as literal UTF-8`);\n\t\t\t\tunescaped += String.fromCodePoint(codeUnit);\n\t\t\t\ti += 6;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthrow new SyntaxError(`Invalid escape sequence: \\\\${next}`);\n\t\t}\n\t\tunescaped += value[i];\n\t\ti++;\n\t}\n\treturn unescaped;\n}\n/**\n* Finds the index of the closing double quote, accounting for escape sequences.\n*/\nfunction findClosingQuote(content, start) {\n\tlet i = start + 1;\n\twhile (i < content.length) {\n\t\tif (content[i] === \"\\\\\" && i + 1 < content.length) {\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (content[i] === \"\\\"\") return i;\n\t\ti++;\n\t}\n\treturn -1;\n}\n/**\n* Finds the index of a character outside of quoted sections.\n*/\nfunction findUnquotedChar(content, char, start = 0) {\n\tlet inQuotes = false;\n\tlet i = start;\n\twhile (i < content.length) {\n\t\tif (content[i] === \"\\\\\" && i + 1 < content.length && inQuotes) {\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (content[i] === \"\\\"\") {\n\t\t\tinQuotes = !inQuotes;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (content[i] === char && !inQuotes) return i;\n\t\ti++;\n\t}\n\treturn -1;\n}\n//#endregion\n//#region src/decode/errors.ts\n/**\n* Error thrown by the TOON decoder when input cannot be parsed.\n*\n* Extends `SyntaxError` so existing `instanceof SyntaxError` checks keep working.\n* Adds structured location fields for programmatic consumers and richer CLI output.\n*/\nvar ToonDecodeError = class extends SyntaxError {\n\tconstructor(message, context) {\n\t\tconst prefix = context?.line !== void 0 ? `Line ${context.line}: ` : \"\";\n\t\tsuper(prefix + message, context?.cause !== void 0 ? { cause: context.cause } : void 0);\n\t\tthis.name = \"ToonDecodeError\";\n\t\tthis.line = context?.line;\n\t\tthis.source = context?.source;\n\t}\n};\n/**\n* Runs `fn` and re-throws any non-`ToonDecodeError` `Error` as a `ToonDecodeError`\n* with line context attached and the original error preserved as `cause`.\n*\n* Pure parser helpers (parser.ts, string-utils.ts) don't know which line they're\n* parsing; this wrapper is how the streaming decoder enriches their errors.\n*/\nfunction withLine(line, fn) {\n\ttry {\n\t\treturn fn();\n\t} catch (error) {\n\t\tif (error instanceof ToonDecodeError) throw error;\n\t\tif (error instanceof Error) throw new ToonDecodeError(error.message, {\n\t\t\tline: line.lineNumber,\n\t\t\tsource: line.raw,\n\t\t\tcause: error\n\t\t});\n\t\tthrow error;\n\t}\n}\n//#endregion\n//#region src/shared/literal-utils.ts\nconst NUMERIC_LITERAL_PATTERN = /^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:e[+-]?\\d+)?$/i;\nfunction isBooleanOrNullLiteral(token) {\n\treturn token === \"true\" || token === \"false\" || token === \"null\";\n}\n/**\n* Checks if a token represents a valid numeric literal.\n*\n* @remarks\n* Rejects numbers with leading zeros (except `\"0\"` itself or decimals like `\"0.5\"`).\n*/\nfunction isNumericLiteral(token) {\n\tif (!token) return false;\n\tif (!NUMERIC_LITERAL_PATTERN.test(token)) return false;\n\tconst numericValue = Number(token);\n\treturn !Number.isNaN(numericValue) && Number.isFinite(numericValue);\n}\n//#endregion\n//#region src/decode/parser.ts\nfunction parseArrayHeaderLine(content, defaultDelimiter, strict = false) {\n\tconst trimmedToken = content.trimStart();\n\tlet bracketStart = -1;\n\tif (trimmedToken.startsWith(\"\\\"\")) {\n\t\tconst closingQuoteIndex = findClosingQuote(trimmedToken, 0);\n\t\tif (closingQuoteIndex === -1) return;\n\t\tif (!trimmedToken.slice(closingQuoteIndex + 1).startsWith(\"[\")) return;\n\t\tconst keyEndIndex = content.length - trimmedToken.length + closingQuoteIndex + 1;\n\t\tbracketStart = content.indexOf(\"[\", keyEndIndex);\n\t} else bracketStart = content.indexOf(\"[\");\n\tif (bracketStart === -1) return;\n\tconst bracketEnd = content.indexOf(\"]\", bracketStart);\n\tif (bracketEnd === -1) return;\n\tlet colonIndex = bracketEnd + 1;\n\tlet braceEnd = colonIndex;\n\tconst braceStart = content.indexOf(\"{\", bracketEnd);\n\tif (braceStart !== -1 && braceStart < content.indexOf(\":\", bracketEnd)) {\n\t\tconst gapBeforeBrace = content.slice(bracketEnd + 1, braceStart);\n\t\tif (gapBeforeBrace !== \"\") {\n\t\t\tif (strict) {\n\t\t\t\tconst trimmedGap = gapBeforeBrace.trim();\n\t\t\t\tthrow new SyntaxError(trimmedGap === \"\" ? `Unexpected whitespace between bracket and fields segment` : `Unexpected content \"${trimmedGap}\" between bracket and fields segment`);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst foundBraceEnd = content.indexOf(\"}\", braceStart);\n\t\tif (foundBraceEnd !== -1) braceEnd = foundBraceEnd + 1;\n\t}\n\tcolonIndex = content.indexOf(\":\", Math.max(bracketEnd, braceEnd));\n\tif (colonIndex === -1) return;\n\tconst gapStart = Math.max(bracketEnd + 1, braceEnd);\n\tconst gapBeforeColon = content.slice(gapStart, colonIndex);\n\tif (gapBeforeColon !== \"\") {\n\t\tif (strict) {\n\t\t\tconst trimmedGap = gapBeforeColon.trim();\n\t\t\tthrow new SyntaxError(trimmedGap === \"\" ? `Unexpected whitespace between bracket segment and colon` : `Unexpected content \"${trimmedGap}\" between bracket segment and colon`);\n\t\t}\n\t\treturn;\n\t}\n\tlet key;\n\tif (bracketStart > 0) {\n\t\tconst rawKey = content.slice(0, bracketStart).trim();\n\t\tkey = rawKey.startsWith(\"\\\"\") ? parseStringLiteral(rawKey) : rawKey;\n\t}\n\tconst afterColon = content.slice(colonIndex + 1).trim();\n\tconst bracketContent = content.slice(bracketStart + 1, bracketEnd);\n\tlet parsedBracket;\n\ttry {\n\t\tparsedBracket = parseBracketSegment(bracketContent, defaultDelimiter);\n\t} catch (error) {\n\t\tif (strict) throw error;\n\t\treturn;\n\t}\n\tconst { length, delimiter } = parsedBracket;\n\tlet fields;\n\tif (braceStart !== -1 && braceStart < colonIndex) {\n\t\tconst foundBraceEnd = content.indexOf(\"}\", braceStart);\n\t\tif (foundBraceEnd !== -1 && foundBraceEnd < colonIndex) {\n\t\t\tconst fieldsContent = content.slice(braceStart + 1, foundBraceEnd);\n\t\t\tconst mismatchedDelimiter = findUnquotedMismatchedDelimiter(fieldsContent, delimiter);\n\t\t\tif (mismatchedDelimiter !== void 0) {\n\t\t\t\tif (strict) throw new SyntaxError(`Header delimiter mismatch: bracket declares \"${formatDelimiter(delimiter)}\" but fields segment contains unquoted \"${formatDelimiter(mismatchedDelimiter)}\"`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfields = parseDelimitedValues(fieldsContent, delimiter).map((field) => parseStringLiteral(field.trim()));\n\t\t}\n\t}\n\treturn {\n\t\theader: {\n\t\t\tkey,\n\t\t\tlength,\n\t\t\tdelimiter,\n\t\t\tfields\n\t\t},\n\t\tinlineValues: afterColon || void 0\n\t};\n}\nconst BRACKET_LENGTH_PATTERN = /^(?:0|[1-9]\\d*)$/;\nfunction parseBracketSegment(seg, defaultDelimiter) {\n\tlet content = seg;\n\tlet delimiter = defaultDelimiter;\n\tif (content.endsWith(\"\t\")) {\n\t\tdelimiter = DELIMITERS.tab;\n\t\tcontent = content.slice(0, -1);\n\t} else if (content.endsWith(\"|\")) {\n\t\tdelimiter = DELIMITERS.pipe;\n\t\tcontent = content.slice(0, -1);\n\t}\n\tif (!BRACKET_LENGTH_PATTERN.test(content)) throw new SyntaxError(`Invalid array length: \"${seg}\" (expected non-negative integer with no leading zeros)`);\n\treturn {\n\t\tlength: Number.parseInt(content, 10),\n\t\tdelimiter\n\t};\n}\nconst DELIMITER_CANDIDATES = [\n\t\",\",\n\t\"\t\",\n\t\"|\"\n];\nfunction findUnquotedMismatchedDelimiter(content, activeDelimiter) {\n\tfor (const candidate of DELIMITER_CANDIDATES) {\n\t\tif (candidate === activeDelimiter) continue;\n\t\tif (findUnquotedChar(content, candidate) !== -1) return candidate;\n\t}\n}\nfunction formatDelimiter(delimiter) {\n\tif (delimiter === \"\t\") return \"\\\\t\";\n\treturn delimiter;\n}\n/**\n* Parses a delimited string into values, respecting quoted strings and escape sequences.\n*\n* @remarks\n* Uses a state machine that tracks:\n* - `inQuotes`: Whether we're inside a quoted string (to ignore delimiters)\n* - `valueBuffer`: Accumulates characters for the current value\n* - Escape sequences: Handled within quoted strings\n*/\nfunction parseDelimitedValues(input, delimiter) {\n\tconst values = [];\n\tlet valueBuffer = \"\";\n\tlet inQuotes = false;\n\tlet i = 0;\n\twhile (i < input.length) {\n\t\tconst char = input[i];\n\t\tif (char === \"\\\\\" && i + 1 < input.length && inQuotes) {\n\t\t\tvalueBuffer += char + input[i + 1];\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === \"\\\"\") {\n\t\t\tinQuotes = !inQuotes;\n\t\t\tvalueBuffer += char;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (char === delimiter && !inQuotes) {\n\t\t\tvalues.push(valueBuffer.trim());\n\t\t\tvalueBuffer = \"\";\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tvalueBuffer += char;\n\t\ti++;\n\t}\n\tif (valueBuffer || values.length > 0) values.push(valueBuffer.trim());\n\treturn values;\n}\nfunction mapRowValuesToPrimitives(values) {\n\treturn values.map((v) => parsePrimitiveToken(v));\n}\nfunction parsePrimitiveToken(token) {\n\tconst trimmedToken = token.trim();\n\tif (!trimmedToken) return \"\";\n\tif (trimmedToken.startsWith(\"\\\"\")) return parseStringLiteral(trimmedToken);\n\tif (isBooleanOrNullLiteral(trimmedToken)) {\n\t\tif (trimmedToken === \"true\") return true;\n\t\tif (trimmedToken === \"false\") return false;\n\t\tif (trimmedToken === \"null\") return null;\n\t}\n\tif (isNumericLiteral(trimmedToken)) {\n\t\tconst parsedNumber = Number.parseFloat(trimmedToken);\n\t\treturn Object.is(parsedNumber, -0) ? 0 : parsedNumber;\n\t}\n\treturn trimmedToken;\n}\nfunction parseStringLiteral(token) {\n\tconst trimmedToken = token.trim();\n\tif (trimmedToken.startsWith(\"\\\"\")) {\n\t\tconst closingQuoteIndex = findClosingQuote(trimmedToken, 0);\n\t\tif (closingQuoteIndex === -1) throw new SyntaxError(\"Unterminated string: missing closing quote\");\n\t\tif (closingQuoteIndex !== trimmedToken.length - 1) throw new SyntaxError(\"Unexpected characters after closing quote\");\n\t\treturn unescapeString(trimmedToken.slice(1, closingQuoteIndex));\n\t}\n\treturn trimmedToken;\n}\nfunction parseUnquotedKey(content, start) {\n\tlet parsePosition = start;\n\twhile (parsePosition < content.length && content[parsePosition] !== \":\") parsePosition++;\n\tif (parsePosition >= content.length || content[parsePosition] !== \":\") throw new SyntaxError(\"Missing colon after key\");\n\tconst key = content.slice(start, parsePosition).trim();\n\tparsePosition++;\n\treturn {\n\t\tkey,\n\t\tend: parsePosition\n\t};\n}\nfunction parseQuotedKey(content, start) {\n\tconst closingQuoteIndex = findClosingQuote(content, start);\n\tif (closingQuoteIndex === -1) throw new SyntaxError(\"Unterminated quoted key\");\n\tconst key = unescapeString(content.slice(start + 1, closingQuoteIndex));\n\tlet parsePosition = closingQuoteIndex + 1;\n\tif (parsePosition >= content.length || content[parsePosition] !== \":\") throw new SyntaxError(\"Missing colon after key\");\n\tparsePosition++;\n\treturn {\n\t\tkey,\n\t\tend: parsePosition\n\t};\n}\nfunction parseKeyToken(content, start) {\n\tconst isQuoted = content[start] === \"\\\"\";\n\treturn {\n\t\t...isQuoted ? parseQuotedKey(content, start) : parseUnquotedKey(content, start),\n\t\tisQuoted\n\t};\n}\nfunction isArrayHeaderContent(content) {\n\treturn content.trim().startsWith(\"[\") && findUnquotedChar(content, \":\") !== -1;\n}\nfunction isKeyValueContent(content) {\n\treturn findUnquotedChar(content, \":\") !== -1;\n}\n//#endregion\n//#region src/decode/scanner.ts\nfunction createScanState() {\n\treturn {\n\t\tlineNumber: 0,\n\t\tblankLines: []\n\t};\n}\nfunction parseLineIncremental(raw, state, indentSize, strict) {\n\tstate.lineNumber++;\n\tconst lineNumber = state.lineNumber;\n\tlet indent = 0;\n\twhile (indent < raw.length && raw[indent] === \" \") indent++;\n\tconst content = raw.slice(indent);\n\tif (!content.trim()) {\n\t\tconst depth = computeDepthFromIndent(indent, indentSize);\n\t\tstate.blankLines.push({\n\t\t\tlineNumber,\n\t\t\tindent,\n\t\t\tdepth\n\t\t});\n\t\treturn;\n\t}\n\tconst depth = computeDepthFromIndent(indent, indentSize);\n\tif (strict) {\n\t\tlet whitespaceEndIndex = 0;\n\t\twhile (whitespaceEndIndex < raw.length && (raw[whitespaceEndIndex] === \" \" || raw[whitespaceEndIndex] === \"\t\")) whitespaceEndIndex++;\n\t\tif (raw.slice(0, whitespaceEndIndex).includes(\"\t\")) throw new ToonDecodeError(\"Tabs are not allowed in indentation in strict mode\", {\n\t\t\tline: lineNumber,\n\t\t\tsource: raw\n\t\t});\n\t\tif (indent > 0 && indent % indentSize !== 0) throw new ToonDecodeError(`Indentation must be exact multiple of ${indentSize}, but found ${indent} spaces`, {\n\t\t\tline: lineNumber,\n\t\t\tsource: raw\n\t\t});\n\t}\n\treturn {\n\t\traw,\n\t\tindent,\n\t\tcontent,\n\t\tdepth,\n\t\tlineNumber\n\t};\n}\nfunction* parseLinesSync(source, indentSize, strict, state) {\n\tfor (const raw of source) {\n\t\tconst parsedLine = parseLineIncremental(raw, state, indentSize, strict);\n\t\tif (parsedLine !== void 0) yield parsedLine;\n\t}\n}\nasync function* parseLinesAsync(source, indentSize, strict, state) {\n\tfor await (const raw of source) {\n\t\tconst parsedLine = parseLineIncremental(raw, state, indentSize, strict);\n\t\tif (parsedLine !== void 0) yield parsedLine;\n\t}\n}\nfunction computeDepthFromIndent(indentSpaces, indentSize) {\n\treturn Math.floor(indentSpaces / indentSize);\n}\n//#endregion\n//#region src/decode/validation.ts\n/**\n* Asserts that the actual count matches the expected count in strict mode.\n*/\nfunction assertExpectedCount(actual, expected, itemType, options, line) {\n\tif (options.strict && actual !== expected) throw new ToonDecodeError(`Expected ${expected} ${itemType}, but got ${actual}`, {\n\t\tline: line.lineNumber,\n\t\tsource: line.raw\n\t});\n}\n/**\n* Validates that there are no extra list items beyond the expected count.\n*/\nfunction validateNoExtraListItems(nextLine, itemDepth, expectedCount) {\n\tif (nextLine?.depth === itemDepth && nextLine.content.startsWith(\"- \")) throw new ToonDecodeError(`Expected ${expectedCount} list array items, but found more`, {\n\t\tline: nextLine.lineNumber,\n\t\tsource: nextLine.raw\n\t});\n}\n/**\n* Validates that there are no extra tabular rows beyond the expected count.\n*/\nfunction validateNoExtraTabularRows(nextLine, rowDepth, header) {\n\tif (nextLine?.depth === rowDepth && !nextLine.content.startsWith(\"- \") && isDataRow(nextLine.content, header.delimiter)) throw new ToonDecodeError(`Expected ${header.length} tabular rows, but found more`, {\n\t\tline: nextLine.lineNumber,\n\t\tsource: nextLine.raw\n\t});\n}\n/**\n* Validates that there are no blank lines within a specific line range in strict mode.\n*/\nfunction validateNoBlankLinesInRange(startLine, endLine, blankLines, strict, context) {\n\tif (!strict) return;\n\tconst firstBlank = blankLines.find((blank) => blank.lineNumber > startLine && blank.lineNumber < endLine);\n\tif (firstBlank) throw new ToonDecodeError(`Blank lines inside ${context} are not allowed in strict mode`, { line: firstBlank.lineNumber });\n}\n/**\n* Checks if a line is a data row (vs a key-value pair) in a tabular array.\n*/\nfunction isDataRow(content, delimiter) {\n\tconst colonPos = content.indexOf(\":\");\n\tconst delimiterPos = content.indexOf(delimiter);\n\tif (colonPos === -1) return true;\n\tif (delimiterPos !== -1 && delimiterPos < colonPos) return true;\n\treturn false;\n}\n//#endregion\n//#region src/decode/decoders.ts\nvar StreamingLineCursor = class {\n\tconstructor(generator, scanState) {\n\t\tthis.buffer = [];\n\t\tthis.done = false;\n\t\tthis.generator = generator;\n\t\tthis.scanState = scanState;\n\t}\n\tgetBlankLines() {\n\t\treturn this.scanState.blankLines;\n\t}\n\tasync peek() {\n\t\tif (this.buffer.length > 0) return this.buffer[0];\n\t\tif (this.done) return;\n\t\tconst result = await this.generator.next();\n\t\tif (result.done) {\n\t\t\tthis.done = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.buffer.push(result.value);\n\t\treturn result.value;\n\t}\n\tasync next() {\n\t\tconst line = await this.peek();\n\t\tif (line !== void 0) {\n\t\t\tthis.buffer.shift();\n\t\t\tthis.lastLine = line;\n\t\t}\n\t\treturn line;\n\t}\n\tasync advance() {\n\t\tawait this.next();\n\t}\n\tcurrent() {\n\t\treturn this.lastLine;\n\t}\n\tasync atEnd() {\n\t\treturn await this.peek() === void 0;\n\t}\n\tpeekSync() {\n\t\tif (this.buffer.length > 0) return this.buffer[0];\n\t\tif (this.done) return;\n\t\tconst result = this.generator.next();\n\t\tif (result.done) {\n\t\t\tthis.done = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.buffer.push(result.value);\n\t\treturn result.value;\n\t}\n\tnextSync() {\n\t\tconst line = this.peekSync();\n\t\tif (line !== void 0) {\n\t\t\tthis.buffer.shift();\n\t\t\tthis.lastLine = line;\n\t\t}\n\t\treturn line;\n\t}\n\tadvanceSync() {\n\t\tthis.nextSync();\n\t}\n\tatEndSync() {\n\t\treturn this.peekSync() === void 0;\n\t}\n};\nfunction* decodeStreamSync$1(source, options) {\n\tif (options?.expandPaths !== void 0) throw new Error(\"expandPaths is not supported in streaming decode\");\n\tconst resolvedOptions = {\n\t\tindent: options?.indent ?? 2,\n\t\tstrict: options?.strict ?? true\n\t};\n\tconst scanState = createScanState();\n\tconst cursor = new StreamingLineCursor(parseLinesSync(source, resolvedOptions.indent, resolvedOptions.strict, scanState), scanState);\n\tconst first = cursor.peekSync();\n\tif (!first) {\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (first.content.trim() === \"[]\") {\n\t\tcursor.advanceSync();\n\t\tyield {\n\t\t\ttype: \"startArray\",\n\t\t\tlength: 0\n\t\t};\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tif (isArrayHeaderContent(first.content)) {\n\t\tconst headerInfo = withLine(first, () => parseArrayHeaderLine(first.content, DEFAULT_DELIMITER, resolvedOptions.strict));\n\t\tif (headerInfo) {\n\t\t\tcursor.advanceSync();\n\t\t\tyield* decodeArrayFromHeaderSync(headerInfo.header, headerInfo.inlineValues, cursor, 0, resolvedOptions, first);\n\t\t\treturn;\n\t\t}\n\t}\n\tcursor.advanceSync();\n\tif (!!cursor.atEndSync() && !isKeyValueLineSync(first)) {\n\t\tyield {\n\t\t\ttype: \"primitive\",\n\t\t\tvalue: withLine(first, () => parsePrimitiveToken(first.content.trim()))\n\t\t};\n\t\treturn;\n\t}\n\tif (!isKeyValueLineSync(first) && cursor.peekSync()?.depth === 0) throw new ToonDecodeError(\"Top-level document must start with a key-value or array-header line\", {\n\t\tline: first.lineNumber,\n\t\tsource: first.raw\n\t});\n\tconst rootSeenKeys = resolvedOptions.strict ? /* @__PURE__ */ new Set() : void 0;\n\tyield { type: \"startObject\" };\n\tyield* decodeKeyValueSync(first, cursor, 0, resolvedOptions, rootSeenKeys);\n\twhile (!cursor.atEndSync()) {\n\t\tconst line = cursor.peekSync();\n\t\tif (!line || line.depth !== 0) break;\n\t\tcursor.advanceSync();\n\t\tyield* decodeKeyValueSync(line, cursor, 0, resolvedOptions, rootSeenKeys);\n\t}\n\tyield { type: \"endObject\" };\n}\nfunction assertNoDuplicateKey(key, line, seenKeys) {\n\tif (!seenKeys) return;\n\tif (seenKeys.has(key)) throw new ToonDecodeError(`Duplicate sibling key \"${key}\"`, {\n\t\tline: line.lineNumber,\n\t\tsource: line.raw\n\t});\n\tseenKeys.add(key);\n}\nfunction* decodeKeyValueSync(line, cursor, baseDepth, options, seenKeys) {\n\tconst content = line.content;\n\tconst arrayHeader = withLine(line, () => parseArrayHeaderLine(content, DEFAULT_DELIMITER, options.strict));\n\tif (arrayHeader && arrayHeader.header.key !== void 0) {\n\t\tassertNoDuplicateKey(arrayHeader.header.key, line, seenKeys);\n\t\tyield {\n\t\t\ttype: \"key\",\n\t\t\tkey: arrayHeader.header.key\n\t\t};\n\t\tyield* decodeArrayFromHeaderSync(arrayHeader.header, arrayHeader.inlineValues, cursor, baseDepth, options, line);\n\t\treturn;\n\t}\n\tconst { key, isQuoted } = withLine(line, () => parseKeyToken(content, 0));\n\tconst colonIndex = content.indexOf(\":\", key.length);\n\tconst rest = colonIndex >= 0 ? content.slice(colonIndex + 1).trim() : \"\";\n\tassertNoDuplicateKey(key, line, seenKeys);\n\tyield isQuoted ? {\n\t\ttype: \"key\",\n\t\tkey,\n\t\twasQuoted: true\n\t} : {\n\t\ttype: \"key\",\n\t\tkey\n\t};\n\tif (!rest) {\n\t\tconst nextLine = cursor.peekSync();\n\t\tif (nextLine && nextLine.depth > baseDepth) {\n\t\t\tyield { type: \"startObject\" };\n\t\t\tyield* decodeObjectFieldsSync(cursor, baseDepth + 1, options);\n\t\t\tyield { type: \"endObject\" };\n\t\t\treturn;\n\t\t}\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (rest === \"[]\") {\n\t\tyield {\n\t\t\ttype: \"startArray\",\n\t\t\tlength: 0\n\t\t};\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tyield {\n\t\ttype: \"primitive\",\n\t\tvalue: withLine(line, () => parsePrimitiveToken(rest))\n\t};\n}\nfunction* decodeObjectFieldsSync(cursor, baseDepth, options) {\n\tlet computedDepth;\n\tconst seenKeys = options.strict ? /* @__PURE__ */ new Set() : void 0;\n\twhile (!cursor.atEndSync()) {\n\t\tconst line = cursor.peekSync();\n\t\tif (!line || line.depth < baseDepth) break;\n\t\tif (computedDepth === void 0 && line.depth >= baseDepth) computedDepth = line.depth;\n\t\tif (line.depth === computedDepth) {\n\t\t\tcursor.advanceSync();\n\t\t\tyield* decodeKeyValueSync(line, cursor, computedDepth, options, seenKeys);\n\t\t} else break;\n\t}\n}\nfunction* decodeArrayFromHeaderSync(header, inlineValues, cursor, baseDepth, options, headerLine) {\n\tyield {\n\t\ttype: \"startArray\",\n\t\tlength: header.length\n\t};\n\tif (inlineValues) {\n\t\tyield* decodeInlinePrimitiveArraySync(header, inlineValues, options, headerLine);\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tif (header.fields && header.fields.length > 0) {\n\t\tyield* decodeTabularArraySync(header, cursor, baseDepth, options, headerLine);\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tyield* decodeListArraySync(header, cursor, baseDepth, options, headerLine);\n\tyield { type: \"endArray\" };\n}\nfunction* decodeInlinePrimitiveArraySync(header, inlineValues, options, headerLine) {\n\tif (!inlineValues.trim()) {\n\t\tassertExpectedCount(0, header.length, \"inline array items\", options, headerLine);\n\t\treturn;\n\t}\n\tconst values = withLine(headerLine, () => parseDelimitedValues(inlineValues, header.delimiter));\n\tconst primitives = withLine(headerLine, () => mapRowValuesToPrimitives(values));\n\tassertExpectedCount(primitives.length, header.length, \"inline array items\", options, headerLine);\n\tfor (const primitive of primitives) yield {\n\t\ttype: \"primitive\",\n\t\tvalue: primitive\n\t};\n}\nfunction* decodeTabularArraySync(header, cursor, baseDepth, options, headerLine) {\n\tconst rowDepth = baseDepth + 1;\n\tlet rowCount = 0;\n\tlet startLine;\n\tlet endLine;\n\tlet lastRowLine = headerLine;\n\twhile (!cursor.atEndSync() && rowCount < header.length) {\n\t\tconst line = cursor.peekSync();\n\t\tif (!line || line.depth < rowDepth) break;\n\t\tif (line.depth === rowDepth) {\n\t\t\tif (startLine === void 0) startLine = line.lineNumber;\n\t\t\tendLine = line.lineNumber;\n\t\t\tlastRowLine = line;\n\t\t\tcursor.advanceSync();\n\t\t\tconst values = withLine(line, () => parseDelimitedValues(line.content, header.delimiter));\n\t\t\tassertExpectedCount(values.length, header.fields.length, \"tabular row values\", options, line);\n\t\t\tconst primitives = withLine(line, () => mapRowValuesToPrimitives(values));\n\t\t\tyield* yieldObjectFromFields(header.fields, primitives);\n\t\t\trowCount++;\n\t\t} else break;\n\t}\n\tassertExpectedCount(rowCount, header.length, \"tabular rows\", options, lastRowLine);\n\tif (options.strict && startLine !== void 0 && endLine !== void 0) validateNoBlankLinesInRange(startLine, endLine, cursor.getBlankLines(), options.strict, \"tabular array\");\n\tif (options.strict) validateNoExtraTabularRows(cursor.peekSync(), rowDepth, header);\n}\nfunction* decodeListArraySync(header, cursor, baseDepth, options, headerLine) {\n\tconst itemDepth = baseDepth + 1;\n\tlet itemCount = 0;\n\tlet startLine;\n\tlet endLine;\n\tlet lastItemLine = headerLine;\n\twhile (!cursor.atEndSync() && itemCount < header.length) {\n\t\tconst line = cursor.peekSync();\n\t\tif (!line || line.depth < itemDepth) break;\n\t\tconst isListItem = line.content.startsWith(\"- \") || line.content === \"-\";\n\t\tif (line.depth === itemDepth && isListItem) {\n\t\t\tif (startLine === void 0) startLine = line.lineNumber;\n\t\t\tendLine = line.lineNumber;\n\t\t\tlastItemLine = line;\n\t\t\tyield* decodeListItemSync(cursor, itemDepth, options);\n\t\t\tconst currentLine = cursor.current();\n\t\t\tif (currentLine) {\n\t\t\t\tendLine = currentLine.lineNumber;\n\t\t\t\tlastItemLine = currentLine;\n\t\t\t}\n\t\t\titemCount++;\n\t\t} else break;\n\t}\n\tassertExpectedCount(itemCount, header.length, \"list array items\", options, lastItemLine);\n\tif (options.strict && startLine !== void 0 && endLine !== void 0) validateNoBlankLinesInRange(startLine, endLine, cursor.getBlankLines(), options.strict, \"list array\");\n\tif (options.strict) validateNoExtraListItems(cursor.peekSync(), itemDepth, header.length);\n}\nfunction* decodeListItemSync(cursor, baseDepth, options) {\n\tconst line = cursor.nextSync();\n\tif (!line) throw new ReferenceError(\"Expected list item\");\n\tlet afterHyphen;\n\tif (line.content === \"-\") {\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t} else if (line.content.startsWith(\"- \")) afterHyphen = line.content.slice(2);\n\telse throw new ToonDecodeError(`Expected list item to start with \"- \"`, {\n\t\tline: line.lineNumber,\n\t\tsource: line.raw\n\t});\n\tif (!afterHyphen.trim()) {\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (afterHyphen.trim() === \"[]\") {\n\t\tyield {\n\t\t\ttype: \"startArray\",\n\t\t\tlength: 0\n\t\t};\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tconst itemLine = {\n\t\t...line,\n\t\tcontent: afterHyphen\n\t};\n\tif (isArrayHeaderContent(afterHyphen)) {\n\t\tconst arrayHeader = withLine(itemLine, () => parseArrayHeaderLine(afterHyphen, DEFAULT_DELIMITER, options.strict));\n\t\tif (arrayHeader) {\n\t\t\tyield* decodeArrayFromHeaderSync(arrayHeader.header, arrayHeader.inlineValues, cursor, baseDepth, options, itemLine);\n\t\t\treturn;\n\t\t}\n\t}\n\tconst headerInfo = withLine(itemLine, () => parseArrayHeaderLine(afterHyphen, DEFAULT_DELIMITER, options.strict));\n\tif (headerInfo && headerInfo.header.key !== void 0 && headerInfo.header.fields !== void 0) {\n\t\tconst header = headerInfo.header;\n\t\tconst seenKeys = options.strict ? new Set([header.key]) : void 0;\n\t\tyield { type: \"startObject\" };\n\t\tyield {\n\t\t\ttype: \"key\",\n\t\t\tkey: header.key\n\t\t};\n\t\tyield* decodeArrayFromHeaderSync(header, headerInfo.inlineValues, cursor, baseDepth + 1, options, itemLine);\n\t\tconst followDepth = baseDepth + 1;\n\t\twhile (!cursor.atEndSync()) {\n\t\t\tconst nextLine = cursor.peekSync();\n\t\t\tif (!nextLine || nextLine.depth < followDepth) break;\n\t\t\tif (nextLine.depth === followDepth && !nextLine.content.startsWith(\"- \")) {\n\t\t\t\tcursor.advanceSync();\n\t\t\t\tyield* decodeKeyValueSync(nextLine, cursor, followDepth, options, seenKeys);\n\t\t\t} else break;\n\t\t}\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (isKeyValueContent(afterHyphen)) {\n\t\tconst seenKeys = options.strict ? /* @__PURE__ */ new Set() : void 0;\n\t\tyield { type: \"startObject\" };\n\t\tyield* decodeKeyValueSync(itemLine, cursor, baseDepth + 1, options, seenKeys);\n\t\tconst followDepth = baseDepth + 1;\n\t\twhile (!cursor.atEndSync()) {\n\t\t\tconst nextLine = cursor.peekSync();\n\t\t\tif (!nextLine || nextLine.depth < followDepth) break;\n\t\t\tif (nextLine.depth === followDepth && !nextLine.content.startsWith(\"- \")) {\n\t\t\t\tcursor.advanceSync();\n\t\t\t\tyield* decodeKeyValueSync(nextLine, cursor, followDepth, options, seenKeys);\n\t\t\t} else break;\n\t\t}\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tyield {\n\t\ttype: \"primitive\",\n\t\tvalue: withLine(itemLine, () => parsePrimitiveToken(afterHyphen))\n\t};\n}\nfunction isKeyValueLineSync(line) {\n\tconst content = line.content;\n\tif (content.startsWith(\"\\\"\")) {\n\t\tconst closingQuoteIndex = findClosingQuote(content, 0);\n\t\tif (closingQuoteIndex === -1) return false;\n\t\treturn content.slice(closingQuoteIndex + 1).includes(\":\");\n\t} else return content.includes(\":\");\n}\nasync function* decodeStream$1(source, options) {\n\tif (options?.expandPaths !== void 0) throw new Error(\"expandPaths is not supported in streaming decode\");\n\tconst resolvedOptions = {\n\t\tindent: options?.indent ?? 2,\n\t\tstrict: options?.strict ?? true\n\t};\n\tconst scanState = createScanState();\n\tif (Symbol.asyncIterator in source) {\n\t\tconst cursor = new StreamingLineCursor(parseLinesAsync(source, resolvedOptions.indent, resolvedOptions.strict, scanState), scanState);\n\t\tconst first = await cursor.peek();\n\t\tif (!first) {\n\t\t\tyield { type: \"startObject\" };\n\t\t\tyield { type: \"endObject\" };\n\t\t\treturn;\n\t\t}\n\t\tif (first.content.trim() === \"[]\") {\n\t\t\tawait cursor.advance();\n\t\t\tyield {\n\t\t\t\ttype: \"startArray\",\n\t\t\t\tlength: 0\n\t\t\t};\n\t\t\tyield { type: \"endArray\" };\n\t\t\treturn;\n\t\t}\n\t\tif (isArrayHeaderContent(first.content)) {\n\t\t\tconst headerInfo = withLine(first, () => parseArrayHeaderLine(first.content, DEFAULT_DELIMITER, resolvedOptions.strict));\n\t\t\tif (headerInfo) {\n\t\t\t\tawait cursor.advance();\n\t\t\t\tyield* decodeArrayFromHeaderAsync(headerInfo.header, headerInfo.inlineValues, cursor, 0, resolvedOptions, first);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tawait cursor.advance();\n\t\tif (!!await cursor.atEnd() && !isKeyValueLineSync(first)) {\n\t\t\tyield {\n\t\t\t\ttype: \"primitive\",\n\t\t\t\tvalue: withLine(first, () => parsePrimitiveToken(first.content.trim()))\n\t\t\t};\n\t\t\treturn;\n\t\t}\n\t\tif (!isKeyValueLineSync(first) && (await cursor.peek())?.depth === 0) throw new ToonDecodeError(\"Top-level document must start with a key-value or array-header line\", {\n\t\t\tline: first.lineNumber,\n\t\t\tsource: first.raw\n\t\t});\n\t\tconst rootSeenKeys = resolvedOptions.strict ? /* @__PURE__ */ new Set() : void 0;\n\t\tyield { type: \"startObject\" };\n\t\tyield* decodeKeyValueAsync(first, cursor, 0, resolvedOptions, rootSeenKeys);\n\t\twhile (!await cursor.atEnd()) {\n\t\t\tconst line = await cursor.peek();\n\t\t\tif (!line || line.depth !== 0) break;\n\t\t\tawait cursor.advance();\n\t\t\tyield* decodeKeyValueAsync(line, cursor, 0, resolvedOptions, rootSeenKeys);\n\t\t}\n\t\tyield { type: \"endObject\" };\n\t} else yield* decodeStreamSync$1(source, options);\n}\nasync function* decodeKeyValueAsync(line, cursor, baseDepth, options, seenKeys) {\n\tconst content = line.content;\n\tconst arrayHeader = withLine(line, () => parseArrayHeaderLine(content, DEFAULT_DELIMITER, options.strict));\n\tif (arrayHeader && arrayHeader.header.key !== void 0) {\n\t\tassertNoDuplicateKey(arrayHeader.header.key, line, seenKeys);\n\t\tyield {\n\t\t\ttype: \"key\",\n\t\t\tkey: arrayHeader.header.key\n\t\t};\n\t\tyield* decodeArrayFromHeaderAsync(arrayHeader.header, arrayHeader.inlineValues, cursor, baseDepth, options, line);\n\t\treturn;\n\t}\n\tconst { key, isQuoted } = withLine(line, () => parseKeyToken(content, 0));\n\tconst colonIndex = content.indexOf(\":\", key.length);\n\tconst rest = colonIndex >= 0 ? content.slice(colonIndex + 1).trim() : \"\";\n\tassertNoDuplicateKey(key, line, seenKeys);\n\tyield isQuoted ? {\n\t\ttype: \"key\",\n\t\tkey,\n\t\twasQuoted: true\n\t} : {\n\t\ttype: \"key\",\n\t\tkey\n\t};\n\tif (!rest) {\n\t\tconst nextLine = await cursor.peek();\n\t\tif (nextLine && nextLine.depth > baseDepth) {\n\t\t\tyield { type: \"startObject\" };\n\t\t\tyield* decodeObjectFieldsAsync(cursor, baseDepth + 1, options);\n\t\t\tyield { type: \"endObject\" };\n\t\t\treturn;\n\t\t}\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (rest === \"[]\") {\n\t\tyield {\n\t\t\ttype: \"startArray\",\n\t\t\tlength: 0\n\t\t};\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tyield {\n\t\ttype: \"primitive\",\n\t\tvalue: withLine(line, () => parsePrimitiveToken(rest))\n\t};\n}\nasync function* decodeObjectFieldsAsync(cursor, baseDepth, options) {\n\tlet computedDepth;\n\tconst seenKeys = options.strict ? /* @__PURE__ */ new Set() : void 0;\n\twhile (!await cursor.atEnd()) {\n\t\tconst line = await cursor.peek();\n\t\tif (!line || line.depth < baseDepth) break;\n\t\tif (computedDepth === void 0 && line.depth >= baseDepth) computedDepth = line.depth;\n\t\tif (line.depth === computedDepth) {\n\t\t\tawait cursor.advance();\n\t\t\tyield* decodeKeyValueAsync(line, cursor, computedDepth, options, seenKeys);\n\t\t} else break;\n\t}\n}\nasync function* decodeArrayFromHeaderAsync(header, inlineValues, cursor, baseDepth, options, headerLine) {\n\tyield {\n\t\ttype: \"startArray\",\n\t\tlength: header.length\n\t};\n\tif (inlineValues) {\n\t\tyield* decodeInlinePrimitiveArraySync(header, inlineValues, options, headerLine);\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tif (header.fields && header.fields.length > 0) {\n\t\tyield* decodeTabularArrayAsync(header, cursor, baseDepth, options, headerLine);\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tyield* decodeListArrayAsync(header, cursor, baseDepth, options, headerLine);\n\tyield { type: \"endArray\" };\n}\nasync function* decodeTabularArrayAsync(header, cursor, baseDepth, options, headerLine) {\n\tconst rowDepth = baseDepth + 1;\n\tlet rowCount = 0;\n\tlet startLine;\n\tlet endLine;\n\tlet lastRowLine = headerLine;\n\twhile (!await cursor.atEnd() && rowCount < header.length) {\n\t\tconst line = await cursor.peek();\n\t\tif (!line || line.depth < rowDepth) break;\n\t\tif (line.depth === rowDepth) {\n\t\t\tif (startLine === void 0) startLine = line.lineNumber;\n\t\t\tendLine = line.lineNumber;\n\t\t\tlastRowLine = line;\n\t\t\tawait cursor.advance();\n\t\t\tconst values = withLine(line, () => parseDelimitedValues(line.content, header.delimiter));\n\t\t\tassertExpectedCount(values.length, header.fields.length, \"tabular row values\", options, line);\n\t\t\tconst primitives = withLine(line, () => mapRowValuesToPrimitives(values));\n\t\t\tyield* yieldObjectFromFields(header.fields, primitives);\n\t\t\trowCount++;\n\t\t} else break;\n\t}\n\tassertExpectedCount(rowCount, header.length, \"tabular rows\", options, lastRowLine);\n\tif (options.strict && startLine !== void 0 && endLine !== void 0) validateNoBlankLinesInRange(startLine, endLine, cursor.getBlankLines(), options.strict, \"tabular array\");\n\tif (options.strict) validateNoExtraTabularRows(await cursor.peek(), rowDepth, header);\n}\nasync function* decodeListArrayAsync(header, cursor, baseDepth, options, headerLine) {\n\tconst itemDepth = baseDepth + 1;\n\tlet itemCount = 0;\n\tlet startLine;\n\tlet endLine;\n\tlet lastItemLine = headerLine;\n\twhile (!await cursor.atEnd() && itemCount < header.length) {\n\t\tconst line = await cursor.peek();\n\t\tif (!line || line.depth < itemDepth) break;\n\t\tconst isListItem = line.content.startsWith(\"- \") || line.content === \"-\";\n\t\tif (line.depth === itemDepth && isListItem) {\n\t\t\tif (startLine === void 0) startLine = line.lineNumber;\n\t\t\tendLine = line.lineNumber;\n\t\t\tlastItemLine = line;\n\t\t\tyield* decodeListItemAsync(cursor, itemDepth, options);\n\t\t\tconst currentLine = cursor.current();\n\t\t\tif (currentLine) {\n\t\t\t\tendLine = currentLine.lineNumber;\n\t\t\t\tlastItemLine = currentLine;\n\t\t\t}\n\t\t\titemCount++;\n\t\t} else break;\n\t}\n\tassertExpectedCount(itemCount, header.length, \"list array items\", options, lastItemLine);\n\tif (options.strict && startLine !== void 0 && endLine !== void 0) validateNoBlankLinesInRange(startLine, endLine, cursor.getBlankLines(), options.strict, \"list array\");\n\tif (options.strict) validateNoExtraListItems(await cursor.peek(), itemDepth, header.length);\n}\nasync function* decodeListItemAsync(cursor, baseDepth, options) {\n\tconst line = await cursor.next();\n\tif (!line) throw new ReferenceError(\"Expected list item\");\n\tlet afterHyphen;\n\tif (line.content === \"-\") {\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t} else if (line.content.startsWith(\"- \")) afterHyphen = line.content.slice(2);\n\telse throw new ToonDecodeError(`Expected list item to start with \"- \"`, {\n\t\tline: line.lineNumber,\n\t\tsource: line.raw\n\t});\n\tif (!afterHyphen.trim()) {\n\t\tyield { type: \"startObject\" };\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (afterHyphen.trim() === \"[]\") {\n\t\tyield {\n\t\t\ttype: \"startArray\",\n\t\t\tlength: 0\n\t\t};\n\t\tyield { type: \"endArray\" };\n\t\treturn;\n\t}\n\tconst itemLine = {\n\t\t...line,\n\t\tcontent: afterHyphen\n\t};\n\tif (isArrayHeaderContent(afterHyphen)) {\n\t\tconst arrayHeader = withLine(itemLine, () => parseArrayHeaderLine(afterHyphen, DEFAULT_DELIMITER, options.strict));\n\t\tif (arrayHeader) {\n\t\t\tyield* decodeArrayFromHeaderAsync(arrayHeader.header, arrayHeader.inlineValues, cursor, baseDepth, options, itemLine);\n\t\t\treturn;\n\t\t}\n\t}\n\tconst headerInfo = withLine(itemLine, () => parseArrayHeaderLine(afterHyphen, DEFAULT_DELIMITER, options.strict));\n\tif (headerInfo && headerInfo.header.key !== void 0 && headerInfo.header.fields !== void 0) {\n\t\tconst header = headerInfo.header;\n\t\tconst seenKeys = options.strict ? new Set([header.key]) : void 0;\n\t\tyield { type: \"startObject\" };\n\t\tyield {\n\t\t\ttype: \"key\",\n\t\t\tkey: header.key\n\t\t};\n\t\tyield* decodeArrayFromHeaderAsync(header, headerInfo.inlineValues, cursor, baseDepth + 1, options, itemLine);\n\t\tconst followDepth = baseDepth + 1;\n\t\twhile (!await cursor.atEnd()) {\n\t\t\tconst nextLine = await cursor.peek();\n\t\t\tif (!nextLine || nextLine.depth < followDepth) break;\n\t\t\tif (nextLine.depth === followDepth && !nextLine.content.startsWith(\"- \")) {\n\t\t\t\tawait cursor.advance();\n\t\t\t\tyield* decodeKeyValueAsync(nextLine, cursor, followDepth, options, seenKeys);\n\t\t\t} else break;\n\t\t}\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tif (isKeyValueContent(afterHyphen)) {\n\t\tconst seenKeys = options.strict ? /* @__PURE__ */ new Set() : void 0;\n\t\tyield { type: \"startObject\" };\n\t\tyield* decodeKeyValueAsync(itemLine, cursor, baseDepth + 1, options, seenKeys);\n\t\tconst followDepth = baseDepth + 1;\n\t\twhile (!await cursor.atEnd()) {\n\t\t\tconst nextLine = await cursor.peek();\n\t\t\tif (!nextLine || nextLine.depth < followDepth) break;\n\t\t\tif (nextLine.depth === followDepth && !nextLine.content.startsWith(\"- \")) {\n\t\t\t\tawait cursor.advance();\n\t\t\t\tyield* decodeKeyValueAsync(nextLine, cursor, followDepth, options, seenKeys);\n\t\t\t} else break;\n\t\t}\n\t\tyield { type: \"endObject\" };\n\t\treturn;\n\t}\n\tyield {\n\t\ttype: \"primitive\",\n\t\tvalue: withLine(itemLine, () => parsePrimitiveToken(afterHyphen))\n\t};\n}\nfunction* yieldObjectFromFields(fields, primitives) {\n\tyield { type: \"startObject\" };\n\tfor (let i = 0; i < fields.length; i++) {\n\t\tyield {\n\t\t\ttype: \"key\",\n\t\t\tkey: fields[i]\n\t\t};\n\t\tyield {\n\t\t\ttype: \"primitive\",\n\t\t\tvalue: primitives[i]\n\t\t};\n\t}\n\tyield { type: \"endObject\" };\n}\n//#endregion\n//#region src/encode/normalize.ts\nfunction normalizeValue(value) {\n\tif (value === null) return null;\n\tif (typeof value === \"object\" && value !== null && \"toJSON\" in value && typeof value.toJSON === \"function\") {\n\t\tconst next = value.toJSON();\n\t\tif (next !== value) return normalizeValue(next);\n\t}\n\tif (typeof value === \"string\" || typeof value === \"boolean\") return value;\n\tif (typeof value === \"number\") {\n\t\tif (Object.is(value, -0)) return 0;\n\t\tif (!Number.isFinite(value)) return null;\n\t\treturn value;\n\t}\n\tif (typeof value === \"bigint\") {\n\t\tif (value >= Number.MIN_SAFE_INTEGER && value <= Number.MAX_SAFE_INTEGER) return Number(value);\n\t\treturn value.toString();\n\t}\n\tif (value instanceof Date) return value.toISOString();\n\tif (Array.isArray(value)) return value.map(normalizeValue);\n\tif (value instanceof Set) return Array.from(value).map(normalizeValue);\n\tif (value instanceof Map) return Object.fromEntries(Array.from(value, ([k, v]) => [String(k), normalizeValue(v)]));\n\tif (isPlainObject(value)) {\n\t\tconst encodedValues = {};\n\t\tfor (const key in value) if (Object.hasOwn(value, key)) encodedValues[key] = normalizeValue(value[key]);\n\t\treturn encodedValues;\n\t}\n\treturn null;\n}\nfunction isJsonPrimitive(value) {\n\treturn value === null || typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction isJsonArray(value) {\n\treturn Array.isArray(value);\n}\nfunction isJsonObject(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\nfunction isEmptyObject(value) {\n\treturn Object.keys(value).length === 0;\n}\nfunction isPlainObject(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n}\nfunction isArrayOfPrimitives(value) {\n\treturn value.length === 0 || value.every((item) => isJsonPrimitive(item));\n}\nfunction isArrayOfArrays(value) {\n\treturn value.length === 0 || value.every((item) => isJsonArray(item));\n}\nfunction isArrayOfObjects(value) {\n\treturn value.length === 0 || value.every((item) => isJsonObject(item));\n}\n//#endregion\n//#region src/shared/validation.ts\nconst NUMERIC_LIKE_PATTERN = /^-?\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?$/i;\nconst LEADING_ZERO_PATTERN = /^0\\d+$/;\n/**\n* Checks if a key can be used without quotes.\n*\n* @remarks\n* Valid unquoted keys must start with a letter or underscore,\n* followed by letters, digits, underscores, or dots.\n*/\nfunction isValidUnquotedKey(key) {\n\treturn /^[A-Z_][\\w.]*$/i.test(key);\n}\n/**\n* Checks if a key segment is a valid identifier for safe folding/expansion.\n*\n* @remarks\n* Identifier segments are more restrictive than unquoted keys:\n* - Must start with a letter or underscore\n* - Followed only by letters, digits, or underscores (no dots)\n* - Used for safe key folding and path expansion\n*/\nfunction isIdentifierSegment(key) {\n\treturn /^[A-Z_]\\w*$/i.test(key);\n}\n/**\n* Determines if a string value can be safely encoded without quotes.\n*\n* @remarks\n* A string needs quoting if it:\n* - Is empty\n* - Has leading or trailing whitespace\n* - Could be confused with a literal (boolean, null, number)\n* - Contains structural characters (colons, brackets, braces)\n* - Contains quotes or backslashes (need escaping)\n* - Contains control characters (newlines, tabs, etc.)\n* - Contains the active delimiter\n* - Starts with a list marker (hyphen)\n*/\nfunction isSafeUnquoted(value, delimiter = DEFAULT_DELIMITER) {\n\tif (!value) return false;\n\tif (value !== value.trim()) return false;\n\tif (isBooleanOrNullLiteral(value) || isNumericLike(value)) return false;\n\tif (value.includes(\":\")) return false;\n\tif (value.includes(\"\\\"\") || value.includes(\"\\\\\")) return false;\n\tif (/[[\\]{}]/.test(value)) return false;\n\tif (/[\\u0000-\\u001F]/.test(value)) return false;\n\tif (value.includes(delimiter)) return false;\n\tif (value.startsWith(\"-\")) return false;\n\treturn true;\n}\n/**\n* Checks if a string looks like a number.\n*\n* @remarks\n* Match numbers like `42`, `-3.14`, `1e-6`, `05`, etc.\n*/\nfunction isNumericLike(value) {\n\treturn NUMERIC_LIKE_PATTERN.test(value) || LEADING_ZERO_PATTERN.test(value);\n}\n//#endregion\n//#region src/decode/expand.ts\n/**\n* Symbol used to mark object keys that were originally quoted in the TOON source.\n* Quoted dotted keys should not be expanded, even if they meet expansion criteria.\n*/\nconst QUOTED_KEY_MARKER = Symbol(\"quotedKey\");\n/**\n* Expands dotted keys into nested objects in safe mode.\n*\n* @remarks\n* This function recursively traverses a decoded TOON value and expands any keys\n* containing dots (`.`) into nested object structures, provided all segments\n* are valid identifiers.\n*\n* Expansion rules:\n* - Keys containing dots are split into segments\n* - All segments must pass `isIdentifierSegment` validation\n* - Non-eligible keys (with special characters) are left as literal dotted keys\n* - Deep merge: When multiple dotted keys expand to the same path, their values are merged if both are objects\n* - Conflict handling:\n* - `strict=true`: Throws TypeError on conflicts (non-object collision)\n* - `strict=false`: LWW (silent overwrite)\n*\n* @param value - The decoded value to expand\n* @param strict - Whether to throw errors on conflicts\n* @returns The expanded value with dotted keys reconstructed as nested objects\n* @throws TypeError if conflicts occur in strict mode\n*/\nfunction expandPathsSafe(value, strict) {\n\tif (Array.isArray(value)) return value.map((item) => expandPathsSafe(item, strict));\n\tif (isJsonObject(value)) {\n\t\tconst expandedObject = {};\n\t\tconst quotedKeys = value[QUOTED_KEY_MARKER];\n\t\tfor (const [key, keyValue] of Object.entries(value)) {\n\t\t\tconst isQuoted = quotedKeys?.has(key);\n\t\t\tif (key.includes(\".\") && !isQuoted) {\n\t\t\t\tconst segments = key.split(\".\");\n\t\t\t\tif (segments.every((seg) => isIdentifierSegment(seg))) {\n\t\t\t\t\tinsertPathSafe(expandedObject, segments, expandPathsSafe(keyValue, strict), strict);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst expandedValue = expandPathsSafe(keyValue, strict);\n\t\t\tif (key in expandedObject) {\n\t\t\t\tconst conflictingValue = expandedObject[key];\n\t\t\t\tif (canMerge(conflictingValue, expandedValue)) mergeObjects(conflictingValue, expandedValue, strict);\n\t\t\t\telse {\n\t\t\t\t\tif (strict) throw new TypeError(`Path expansion conflict at key \"${key}\": cannot merge ${typeof conflictingValue} with ${typeof expandedValue}`);\n\t\t\t\t\texpandedObject[key] = expandedValue;\n\t\t\t\t}\n\t\t\t} else expandedObject[key] = expandedValue;\n\t\t}\n\t\treturn expandedObject;\n\t}\n\treturn value;\n}\n/**\n* Inserts a value at a nested path, creating intermediate objects as needed.\n*\n* @remarks\n* This function walks the segment path, creating nested objects as needed.\n* When an existing value is encountered:\n* - If both are objects: deep merge (continue insertion)\n* - If values differ: conflict\n* - strict=true: throw TypeError\n* - strict=false: overwrite with new value (LWW)\n*\n* @param target - The object to insert into\n* @param segments - Array of path segments (e.g., ['data', 'metadata', 'items'])\n* @param value - The value to insert at the end of the path\n* @param strict - Whether to throw on conflicts\n* @throws TypeError if a conflict occurs in strict mode\n*/\nfunction insertPathSafe(target, segments, value, strict) {\n\tlet currentNode = target;\n\tfor (let i = 0; i < segments.length - 1; i++) {\n\t\tconst currentSegment = segments[i];\n\t\tconst segmentValue = currentNode[currentSegment];\n\t\tif (segmentValue === void 0) {\n\t\t\tconst newObj = {};\n\t\t\tcurrentNode[currentSegment] = newObj;\n\t\t\tcurrentNode = newObj;\n\t\t} else if (isJsonObject(segmentValue)) currentNode = segmentValue;\n\t\telse {\n\t\t\tif (strict) throw new TypeError(`Path expansion conflict at segment \"${currentSegment}\": expected object but found ${typeof segmentValue}`);\n\t\t\tconst newObj = {};\n\t\t\tcurrentNode[currentSegment] = newObj;\n\t\t\tcurrentNode = newObj;\n\t\t}\n\t}\n\tconst lastSeg = segments[segments.length - 1];\n\tconst destinationValue = currentNode[lastSeg];\n\tif (destinationValue === void 0) currentNode[lastSeg] = value;\n\telse if (canMerge(destinationValue, value)) mergeObjects(destinationValue, value, strict);\n\telse {\n\t\tif (strict) throw new TypeError(`Path expansion conflict at key \"${lastSeg}\": cannot merge ${typeof destinationValue} with ${typeof value}`);\n\t\tcurrentNode[lastSeg] = value;\n\t}\n}\n/**\n* Deep merges properties from source into target.\n*\n* @remarks\n* For each key in source:\n* - If key doesn't exist in target: copy it\n* - If both values are objects: recursively merge\n* - Otherwise: conflict (strict throws, non-strict overwrites)\n*\n* @param target - The target object to merge into\n* @param source - The source object to merge from\n* @param strict - Whether to throw on conflicts\n* @throws TypeError if a conflict occurs in strict mode\n*/\nfunction mergeObjects(target, source, strict) {\n\tfor (const [key, sourceValue] of Object.entries(source)) {\n\t\tconst targetValue = target[key];\n\t\tif (targetValue === void 0) target[key] = sourceValue;\n\t\telse if (canMerge(targetValue, sourceValue)) mergeObjects(targetValue, sourceValue, strict);\n\t\telse {\n\t\t\tif (strict) throw new TypeError(`Path expansion conflict at key \"${key}\": cannot merge ${typeof targetValue} with ${typeof sourceValue}`);\n\t\t\ttarget[key] = sourceValue;\n\t\t}\n\t}\n}\nfunction canMerge(a, b) {\n\treturn isJsonObject(a) && isJsonObject(b);\n}\n//#endregion\n//#region src/decode/event-builder.ts\nfunction buildValueFromEvents(events) {\n\tconst state = {\n\t\tstack: [],\n\t\troot: void 0\n\t};\n\tfor (const event of events) applyEvent(state, event);\n\treturn finalizeState(state);\n}\nfunction applyEvent(state, event) {\n\tconst { stack } = state;\n\tswitch (event.type) {\n\t\tcase \"startObject\": {\n\t\t\tconst obj = {};\n\t\t\tconst quotedKeys = /* @__PURE__ */ new Set();\n\t\t\tif (stack.length === 0) stack.push({\n\t\t\t\ttype: \"object\",\n\t\t\t\tobj,\n\t\t\t\tquotedKeys\n\t\t\t});\n\t\t\telse {\n\t\t\t\tconst parent = stack[stack.length - 1];\n\t\t\t\tif (parent.type === \"object\") {\n\t\t\t\t\tif (parent.currentKey === void 0) throw new Error(\"Object startObject event without preceding key\");\n\t\t\t\t\tparent.obj[parent.currentKey] = obj;\n\t\t\t\t\tparent.currentKey = void 0;\n\t\t\t\t} else if (parent.type === \"array\") parent.arr.push(obj);\n\t\t\t\tstack.push({\n\t\t\t\t\ttype: \"object\",\n\t\t\t\t\tobj,\n\t\t\t\t\tquotedKeys\n\t\t\t\t});\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"endObject\": {\n\t\t\tif (stack.length === 0) throw new Error(\"Unexpected endObject event\");\n\t\t\tconst context = stack.pop();\n\t\t\tif (context.type !== \"object\") throw new Error(\"Mismatched endObject event\");\n\t\t\tif (context.quotedKeys.size > 0) Object.defineProperty(context.obj, QUOTED_KEY_MARKER, {\n\t\t\t\tvalue: context.quotedKeys,\n\t\t\t\tenumerable: false,\n\t\t\t\twritable: false,\n\t\t\t\tconfigurable: false\n\t\t\t});\n\t\t\tif (stack.length === 0) state.root = context.obj;\n\t\t\tbreak;\n\t\t}\n\t\tcase \"startArray\": {\n\t\t\tconst arr = [];\n\t\t\tif (stack.length === 0) stack.push({\n\t\t\t\ttype: \"array\",\n\t\t\t\tarr\n\t\t\t});\n\t\t\telse {\n\t\t\t\tconst parent = stack[stack.length - 1];\n\t\t\t\tif (parent.type === \"object\") {\n\t\t\t\t\tif (parent.currentKey === void 0) throw new Error(\"Array startArray event without preceding key\");\n\t\t\t\t\tparent.obj[parent.currentKey] = arr;\n\t\t\t\t\tparent.currentKey = void 0;\n\t\t\t\t} else if (parent.type === \"array\") parent.arr.push(arr);\n\t\t\t\tstack.push({\n\t\t\t\t\ttype: \"array\",\n\t\t\t\t\tarr\n\t\t\t\t});\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase \"endArray\": {\n\t\t\tif (stack.length === 0) throw new Error(\"Unexpected endArray event\");\n\t\t\tconst context = stack.pop();\n\t\t\tif (context.type !== \"array\") throw new Error(\"Mismatched endArray event\");\n\t\t\tif (stack.length === 0) state.root = context.arr;\n\t\t\tbreak;\n\t\t}\n\t\tcase \"key\": {\n\t\t\tif (stack.length === 0) throw new Error(\"Key event outside of object context\");\n\t\t\tconst parent = stack[stack.length - 1];\n\t\t\tif (parent.type !== \"object\") throw new Error(\"Key event in non-object context\");\n\t\t\tparent.currentKey = event.key;\n\t\t\tif (event.wasQuoted) parent.quotedKeys.add(event.key);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"primitive\":\n\t\t\tif (stack.length === 0) state.root = event.value;\n\t\t\telse {\n\t\t\t\tconst parent = stack[stack.length - 1];\n\t\t\t\tif (parent.type === \"object\") {\n\t\t\t\t\tif (parent.currentKey === void 0) throw new Error(\"Primitive event without preceding key in object\");\n\t\t\t\t\tparent.obj[parent.currentKey] = event.value;\n\t\t\t\t\tparent.currentKey = void 0;\n\t\t\t\t} else if (parent.type === \"array\") parent.arr.push(event.value);\n\t\t\t}\n\t\t\tbreak;\n\t}\n}\nfunction finalizeState(state) {\n\tif (state.stack.length !== 0) throw new Error(\"Incomplete event stream: stack not empty at end\");\n\tif (state.root === void 0) throw new Error(\"No root value built from events\");\n\treturn state.root;\n}\n//#endregion\n//#region src/encode/folding.ts\n/**\n* Attempts to fold a single-key object chain into a dotted path.\n*\n* @remarks\n* Folding traverses nested objects with single keys, collapsing them into a dotted path.\n* It stops when:\n* - A non-single-key object is encountered\n* - An array is encountered (arrays are not \"single-key objects\")\n* - A primitive value is reached\n* - The flatten depth limit is reached\n* - Any segment fails safe mode validation\n*\n* Safe mode requirements:\n* - `options.keyFolding` must be `'safe'`\n* - Every segment must be a valid identifier (no dots, no special chars)\n* - The folded key must not collide with existing sibling keys\n* - No segment should require quoting\n*\n* @param key - The starting key to fold\n* @param value - The value associated with the key\n* @param siblings - Array of all sibling keys at this level (for collision detection)\n* @param options - Resolved encoding options\n* @returns A FoldResult if folding is possible, undefined otherwise\n*/\nfunction tryFoldKeyChain(key, value, siblings, options, rootLiteralKeys, pathPrefix, flattenDepth) {\n\tif (options.keyFolding !== \"safe\") return;\n\tif (!isJsonObject(value)) return;\n\tconst { segments, tail, leafValue } = collectSingleKeyChain(key, value, flattenDepth ?? options.flattenDepth);\n\tif (segments.length < 2) return;\n\tif (!segments.every((seg) => isIdentifierSegment(seg))) return;\n\tconst foldedKey = buildFoldedKey(segments);\n\tconst absolutePath = pathPrefix ? `${pathPrefix}.${foldedKey}` : foldedKey;\n\tif (siblings.includes(foldedKey)) return;\n\tif (rootLiteralKeys && rootLiteralKeys.has(absolutePath)) return;\n\treturn {\n\t\tfoldedKey,\n\t\tremainder: tail,\n\t\tleafValue,\n\t\tsegmentCount: segments.length\n\t};\n}\n/**\n* Collects a chain of single-key objects into segments.\n*\n* @remarks\n* Traverses nested objects, collecting keys until:\n* - A non-single-key object is found\n* - An array is encountered\n* - A primitive is reached\n* - An empty object is reached\n* - The depth limit is reached\n*\n* @param startKey - The initial key to start the chain\n* @param startValue - The value to traverse\n* @param maxDepth - Maximum number of segments to collect\n* @returns Object containing segments array, tail value, and leaf value\n*/\nfunction collectSingleKeyChain(startKey, startValue, maxDepth) {\n\tconst segments = [startKey];\n\tlet currentValue = startValue;\n\twhile (segments.length < maxDepth) {\n\t\tif (!isJsonObject(currentValue)) break;\n\t\tconst keys = Object.keys(currentValue);\n\t\tif (keys.length !== 1) break;\n\t\tconst nextKey = keys[0];\n\t\tconst nextValue = currentValue[nextKey];\n\t\tsegments.push(nextKey);\n\t\tcurrentValue = nextValue;\n\t}\n\tif (!isJsonObject(currentValue) || isEmptyObject(currentValue)) return {\n\t\tsegments,\n\t\ttail: void 0,\n\t\tleafValue: currentValue\n\t};\n\treturn {\n\t\tsegments,\n\t\ttail: currentValue,\n\t\tleafValue: currentValue\n\t};\n}\nfunction buildFoldedKey(segments) {\n\treturn segments.join(\".\");\n}\n//#endregion\n//#region src/encode/primitives.ts\nfunction encodePrimitive(value, delimiter) {\n\tif (value === null) return NULL_LITERAL;\n\tif (typeof value === \"boolean\") return String(value);\n\tif (typeof value === \"number\") return String(value);\n\treturn encodeStringLiteral(value, delimiter);\n}\nfunction encodeStringLiteral(value, delimiter = DEFAULT_DELIMITER) {\n\tif (isSafeUnquoted(value, delimiter)) return value;\n\treturn `\"${escapeString(value)}\"`;\n}\nfunction encodeKey(key) {\n\tif (isValidUnquotedKey(key)) return key;\n\treturn `\"${escapeString(key)}\"`;\n}\nfunction encodeAndJoinPrimitives(values, delimiter = DEFAULT_DELIMITER) {\n\treturn values.map((v) => encodePrimitive(v, delimiter)).join(delimiter);\n}\nfunction formatHeader(length, options) {\n\tconst key = options?.key;\n\tconst fields = options?.fields;\n\tconst delimiter = options?.delimiter ?? \",\";\n\tlet header = \"\";\n\tif (key != null) header += encodeKey(key);\n\theader += `[${length}${delimiter !== DEFAULT_DELIMITER ? delimiter : \"\"}]`;\n\tif (fields) {\n\t\tconst quotedFields = fields.map((f) => encodeKey(f));\n\t\theader += `{${quotedFields.join(delimiter)}}`;\n\t}\n\theader += \":\";\n\treturn header;\n}\n//#endregion\n//#region src/encode/encoders.ts\nfunction* encodeJsonValue(value, options, depth) {\n\tif (isJsonPrimitive(value)) {\n\t\tconst encodedPrimitive = encodePrimitive(value, options.delimiter);\n\t\tif (encodedPrimitive !== \"\") yield encodedPrimitive;\n\t\treturn;\n\t}\n\tif (isJsonArray(value)) yield* encodeArrayLines(void 0, value, depth, options);\n\telse if (isJsonObject(value)) yield* encodeObjectLines(value, depth, options);\n}\nfunction* encodeObjectLines(value, depth, options, rootLiteralKeys, pathPrefix, remainingDepth) {\n\tconst keys = Object.keys(value);\n\tif (depth === 0 && !rootLiteralKeys) rootLiteralKeys = new Set(keys.filter((k) => k.includes(\".\")));\n\tconst effectiveFlattenDepth = remainingDepth ?? options.flattenDepth;\n\tfor (const [key, val] of Object.entries(value)) yield* encodeKeyValuePairLines(key, val, depth, options, keys, rootLiteralKeys, pathPrefix, effectiveFlattenDepth);\n}\nfunction* encodeKeyValuePairLines(key, value, depth, options, siblings, rootLiteralKeys, pathPrefix, flattenDepth) {\n\tconst currentPath = pathPrefix ? `${pathPrefix}.${key}` : key;\n\tconst effectiveFlattenDepth = flattenDepth ?? options.flattenDepth;\n\tif (options.keyFolding === \"safe\" && siblings) {\n\t\tconst foldResult = tryFoldKeyChain(key, value, siblings, options, rootLiteralKeys, pathPrefix, effectiveFlattenDepth);\n\t\tif (foldResult) {\n\t\t\tconst { foldedKey, remainder, leafValue, segmentCount } = foldResult;\n\t\t\tconst encodedFoldedKey = encodeKey(foldedKey);\n\t\t\tif (remainder === void 0) {\n\t\t\t\tif (isJsonPrimitive(leafValue)) {\n\t\t\t\t\tyield indentedLine(depth, `${encodedFoldedKey}: ${encodePrimitive(leafValue, options.delimiter)}`, options.indent);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (isJsonArray(leafValue)) {\n\t\t\t\t\tyield* encodeArrayLines(foldedKey, leafValue, depth, options);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (isJsonObject(leafValue) && isEmptyObject(leafValue)) {\n\t\t\t\t\tyield indentedLine(depth, `${encodedFoldedKey}:`, options.indent);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isJsonObject(remainder)) {\n\t\t\t\tyield indentedLine(depth, `${encodedFoldedKey}:`, options.indent);\n\t\t\t\tconst remainingDepth = effectiveFlattenDepth - segmentCount;\n\t\t\t\tconst foldedPath = pathPrefix ? `${pathPrefix}.${foldedKey}` : foldedKey;\n\t\t\t\tyield* encodeObjectLines(remainder, depth + 1, options, rootLiteralKeys, foldedPath, remainingDepth);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\tconst encodedKey = encodeKey(key);\n\tif (isJsonPrimitive(value)) yield indentedLine(depth, `${encodedKey}: ${encodePrimitive(value, options.delimiter)}`, options.indent);\n\telse if (isJsonArray(value)) yield* encodeArrayLines(key, value, depth, options);\n\telse if (isJsonObject(value)) {\n\t\tyield indentedLine(depth, `${encodedKey}:`, options.indent);\n\t\tif (!isEmptyObject(value)) yield* encodeObjectLines(value, depth + 1, options, rootLiteralKeys, currentPath, effectiveFlattenDepth);\n\t}\n}\nfunction* encodeArrayLines(key, value, depth, options) {\n\tif (value.length === 0) {\n\t\tyield indentedLine(depth, key != null ? `${encodeKey(key)}: []` : \"[]\", options.indent);\n\t\treturn;\n\t}\n\tif (isArrayOfPrimitives(value)) {\n\t\tyield indentedLine(depth, encodeInlineArrayLine(value, options.delimiter, key), options.indent);\n\t\treturn;\n\t}\n\tif (isArrayOfArrays(value)) {\n\t\tif (value.every((arr) => isArrayOfPrimitives(arr))) {\n\t\t\tyield* encodeArrayOfArraysAsListItemsLines(key, value, depth, options);\n\t\t\treturn;\n\t\t}\n\t}\n\tif (isArrayOfObjects(value)) {\n\t\tconst header = extractTabularHeader(value);\n\t\tif (header) yield* encodeArrayOfObjectsAsTabularLines(key, value, header, depth, options);\n\t\telse yield* encodeMixedArrayAsListItemsLines(key, value, depth, options);\n\t\treturn;\n\t}\n\tyield* encodeMixedArrayAsListItemsLines(key, value, depth, options);\n}\nfunction* encodeArrayOfArraysAsListItemsLines(prefix, values, depth, options) {\n\tyield indentedLine(depth, formatHeader(values.length, {\n\t\tkey: prefix,\n\t\tdelimiter: options.delimiter\n\t}), options.indent);\n\tfor (const arr of values) if (isArrayOfPrimitives(arr)) {\n\t\tconst arrayLine = encodeInlineArrayLine(arr, options.delimiter);\n\t\tyield indentedListItem(depth + 1, arrayLine, options.indent);\n\t}\n}\nfunction encodeInlineArrayLine(values, delimiter, prefix) {\n\tconst header = formatHeader(values.length, {\n\t\tkey: prefix,\n\t\tdelimiter\n\t});\n\tconst joinedValue = encodeAndJoinPrimitives(values, delimiter);\n\tif (values.length === 0) return header;\n\treturn `${header} ${joinedValue}`;\n}\nfunction* encodeArrayOfObjectsAsTabularLines(prefix, rows, header, depth, options) {\n\tyield indentedLine(depth, formatHeader(rows.length, {\n\t\tkey: prefix,\n\t\tfields: header,\n\t\tdelimiter: options.delimiter\n\t}), options.indent);\n\tyield* writeTabularRowsLines(rows, header, depth + 1, options);\n}\nfunction extractTabularHeader(rows) {\n\tif (rows.length === 0) return;\n\tconst firstRow = rows[0];\n\tconst firstKeys = Object.keys(firstRow);\n\tif (firstKeys.length === 0) return;\n\tif (isTabularArray(rows, firstKeys)) return firstKeys;\n}\nfunction isTabularArray(rows, header) {\n\tfor (const row of rows) {\n\t\tif (Object.keys(row).length !== header.length) return false;\n\t\tfor (const key of header) {\n\t\t\tif (!(key in row)) return false;\n\t\t\tif (!isJsonPrimitive(row[key])) return false;\n\t\t}\n\t}\n\treturn true;\n}\nfunction* writeTabularRowsLines(rows, header, depth, options) {\n\tfor (const row of rows) yield indentedLine(depth, encodeAndJoinPrimitives(header.map((key) => row[key]), options.delimiter), options.indent);\n}\nfunction* encodeMixedArrayAsListItemsLines(prefix, items, depth, options) {\n\tyield indentedLine(depth, formatHeader(items.length, {\n\t\tkey: prefix,\n\t\tdelimiter: options.delimiter\n\t}), options.indent);\n\tfor (const item of items) yield* encodeListItemValueLines(item, depth + 1, options);\n}\nfunction* encodeObjectAsListItemLines(obj, depth, options) {\n\tif (isEmptyObject(obj)) {\n\t\tyield indentedLine(depth, \"-\", options.indent);\n\t\treturn;\n\t}\n\tconst entries = Object.entries(obj);\n\tconst [firstKey, firstValue] = entries[0];\n\tconst restEntries = entries.slice(1);\n\tif (isJsonArray(firstValue) && isArrayOfObjects(firstValue)) {\n\t\tconst header = extractTabularHeader(firstValue);\n\t\tif (header) {\n\t\t\tyield indentedListItem(depth, formatHeader(firstValue.length, {\n\t\t\t\tkey: firstKey,\n\t\t\t\tfields: header,\n\t\t\t\tdelimiter: options.delimiter\n\t\t\t}), options.indent);\n\t\t\tyield* writeTabularRowsLines(firstValue, header, depth + 2, options);\n\t\t\tif (restEntries.length > 0) yield* encodeObjectLines(Object.fromEntries(restEntries), depth + 1, options);\n\t\t\treturn;\n\t\t}\n\t}\n\tconst encodedKey = encodeKey(firstKey);\n\tif (isJsonPrimitive(firstValue)) yield indentedListItem(depth, `${encodedKey}: ${encodePrimitive(firstValue, options.delimiter)}`, options.indent);\n\telse if (isJsonArray(firstValue)) if (firstValue.length === 0) yield indentedListItem(depth, `${encodedKey}: []`, options.indent);\n\telse if (isArrayOfPrimitives(firstValue)) yield indentedListItem(depth, `${encodedKey}${encodeInlineArrayLine(firstValue, options.delimiter)}`, options.indent);\n\telse {\n\t\tyield indentedListItem(depth, `${encodedKey}${formatHeader(firstValue.length, { delimiter: options.delimiter })}`, options.indent);\n\t\tfor (const item of firstValue) yield* encodeListItemValueLines(item, depth + 2, options);\n\t}\n\telse if (isJsonObject(firstValue)) {\n\t\tyield indentedListItem(depth, `${encodedKey}:`, options.indent);\n\t\tif (!isEmptyObject(firstValue)) yield* encodeObjectLines(firstValue, depth + 2, options);\n\t}\n\tif (restEntries.length > 0) yield* encodeObjectLines(Object.fromEntries(restEntries), depth + 1, options);\n}\nfunction* encodeListItemValueLines(value, depth, options) {\n\tif (isJsonPrimitive(value)) yield indentedListItem(depth, encodePrimitive(value, options.delimiter), options.indent);\n\telse if (isJsonArray(value)) if (isArrayOfPrimitives(value)) yield indentedListItem(depth, encodeInlineArrayLine(value, options.delimiter), options.indent);\n\telse {\n\t\tyield indentedListItem(depth, formatHeader(value.length, { delimiter: options.delimiter }), options.indent);\n\t\tfor (const item of value) yield* encodeListItemValueLines(item, depth + 1, options);\n\t}\n\telse if (isJsonObject(value)) yield* encodeObjectAsListItemLines(value, depth, options);\n}\nfunction indentedLine(depth, content, indentSize) {\n\treturn \" \".repeat(indentSize * depth) + content;\n}\nfunction indentedListItem(depth, content, indentSize) {\n\treturn indentedLine(depth, \"- \" + content, indentSize);\n}\n//#endregion\n//#region src/encode/replacer.ts\n/**\n* Applies a replacer function to a `JsonValue` and all its descendants.\n*\n* The replacer is called for:\n* - The root value (with key='', path=[])\n* - Every object property (with the property name as key)\n* - Every array element (with the string index as key: '0', '1', etc.)\n*\n* @param root - The normalized `JsonValue` to transform\n* @param replacer - The replacer function to apply\n* @returns The transformed `JsonValue`\n*/\nfunction applyReplacer(root, replacer) {\n\tconst replacedRoot = replacer(\"\", root, []);\n\tif (replacedRoot === void 0) return transformChildren(root, replacer, []);\n\treturn transformChildren(normalizeValue(replacedRoot), replacer, []);\n}\n/**\n* Recursively transforms the children of a `JsonValue` using the replacer.\n*\n* @param value - The value whose children should be transformed\n* @param replacer - The replacer function to apply\n* @param path - Current path from root\n* @returns The value with transformed children\n*/\nfunction transformChildren(value, replacer, path) {\n\tif (isJsonObject(value)) return transformObject(value, replacer, path);\n\tif (isJsonArray(value)) return transformArray(value, replacer, path);\n\treturn value;\n}\n/**\n* Transforms an object by applying the replacer to each property.\n*\n* @param obj - The object to transform\n* @param replacer - The replacer function to apply\n* @param path - Current path from root\n* @returns A new object with transformed properties\n*/\nfunction transformObject(obj, replacer, path) {\n\tconst result = {};\n\tfor (const [key, value] of Object.entries(obj)) {\n\t\tconst childPath = [...path, key];\n\t\tconst replacedValue = replacer(key, value, childPath);\n\t\tif (replacedValue === void 0) continue;\n\t\tresult[key] = transformChildren(normalizeValue(replacedValue), replacer, childPath);\n\t}\n\treturn result;\n}\n/**\n* Transforms an array by applying the replacer to each element.\n*\n* @param arr - The array to transform\n* @param replacer - The replacer function to apply\n* @param path - Current path from root\n* @returns A new array with transformed elements\n*/\nfunction transformArray(arr, replacer, path) {\n\tconst result = [];\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tconst value = arr[i];\n\t\tconst childPath = [...path, i];\n\t\tconst replacedValue = replacer(String(i), value, childPath);\n\t\tif (replacedValue === void 0) continue;\n\t\tconst normalizedValue = normalizeValue(replacedValue);\n\t\tresult.push(transformChildren(normalizedValue, replacer, childPath));\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/index.ts\n/**\n* Encodes a JavaScript value into TOON format string.\n*\n* @param input - Any JavaScript value (objects, arrays, primitives)\n* @param options - Optional encoding configuration\n* @returns TOON formatted string\n*\n* @example\n* ```ts\n* encode({ name: 'Alice', age: 30 })\n* // name: Alice\n* // age: 30\n*\n* encode({ users: [{ id: 1 }, { id: 2 }] })\n* // users[2]{id}:\n* // 1\n* // 2\n*\n* encode({ tags: [] })\n* // tags: []\n*\n* encode(data, { indent: 4, keyFolding: 'safe' })\n* ```\n*/\nfunction encode(input, options) {\n\treturn Array.from(encodeLines(input, options)).join(\"\\n\");\n}\n/**\n* Decodes a TOON format string into a JavaScript value.\n*\n* @param input - TOON formatted string\n* @param options - Optional decoding configuration\n* @returns Parsed JavaScript value (object, array, or primitive)\n*\n* @example\n* ```ts\n* decode('name: Alice\\nage: 30')\n* // { name: 'Alice', age: 30 }\n*\n* decode('users[2]:\\n - id: 1\\n - id: 2')\n* // { users: [{ id: 1 }, { id: 2 }] }\n*\n* decode('tags: []')\n* // { tags: [] }\n*\n* decode(toonString, { strict: false, expandPaths: 'safe' })\n* ```\n*/\nfunction decode(input, options) {\n\treturn decodeFromLines(input.split(\"\\n\"), options);\n}\n/**\n* Encodes a JavaScript value into TOON format as a sequence of lines.\n*\n* This function yields TOON lines one at a time without building the full string,\n* making it suitable for streaming large outputs to files, HTTP responses, or process stdout.\n*\n* @param input - Any JavaScript value (objects, arrays, primitives)\n* @param options - Optional encoding configuration\n* @returns Iterable of TOON lines (without trailing newlines)\n*\n* @example\n* ```ts\n* // Stream to stdout\n* for (const line of encodeLines({ name: 'Alice', age: 30 })) {\n* console.log(line)\n* }\n*\n* // Collect to array\n* const lines = Array.from(encodeLines(data))\n*\n* // Equivalent to encode()\n* const toonString = Array.from(encodeLines(data, options)).join('\\n')\n* ```\n*/\nfunction encodeLines(input, options) {\n\tconst normalizedValue = normalizeValue(input);\n\tconst resolvedOptions = resolveOptions(options);\n\treturn encodeJsonValue(resolvedOptions.replacer ? applyReplacer(normalizedValue, resolvedOptions.replacer) : normalizedValue, resolvedOptions, 0);\n}\n/**\n* Decodes TOON format from pre-split lines into a JavaScript value.\n*\n* This is a convenience wrapper around the streaming decoder that builds\n* the full value in memory. Useful when you already have lines as an array\n* or iterable and want the standard decode behavior with path expansion support.\n*\n* @param lines - Iterable of TOON lines (without newlines)\n* @param options - Optional decoding configuration (supports expandPaths)\n* @returns Parsed JavaScript value (object, array, or primitive)\n*\n* @example\n* ```ts\n* const lines = ['name: Alice', 'age: 30']\n* decodeFromLines(lines)\n* // { name: 'Alice', age: 30 }\n* ```\n*/\nfunction decodeFromLines(lines, options) {\n\tconst resolvedOptions = resolveDecodeOptions(options);\n\tconst decodedValue = buildValueFromEvents(decodeStreamSync$1(lines, {\n\t\tindent: resolvedOptions.indent,\n\t\tstrict: resolvedOptions.strict\n\t}));\n\tif (resolvedOptions.expandPaths === \"safe\") return expandPathsSafe(decodedValue, resolvedOptions.strict);\n\treturn decodedValue;\n}\n/**\n* Synchronously decodes TOON lines into a stream of JSON events.\n*\n* This function yields structured events (startObject, endObject, startArray, endArray,\n* key, primitive) that represent the JSON data model without building the full value tree.\n* Useful for streaming processing, custom transformations, or memory-efficient parsing.\n*\n* @remarks\n* Path expansion (`expandPaths: 'safe'`) is not supported in streaming mode.\n*\n* @param lines - Iterable of TOON lines (without newlines)\n* @param options - Optional decoding configuration (expandPaths not supported)\n* @returns Iterable of JSON stream events\n*\n* @example\n* ```ts\n* const lines = ['name: Alice', 'age: 30']\n* for (const event of decodeStreamSync(lines)) {\n* console.log(event)\n* // { type: 'startObject' }\n* // { type: 'key', key: 'name' }\n* // { type: 'primitive', value: 'Alice' }\n* // ...\n* }\n* ```\n*/\nfunction decodeStreamSync(lines, options) {\n\treturn decodeStreamSync$1(lines, options);\n}\n/**\n* Asynchronously decodes TOON lines into a stream of JSON events.\n*\n* This function yields structured events (startObject, endObject, startArray, endArray,\n* key, primitive) that represent the JSON data model without building the full value tree.\n* Supports both sync and async iterables for maximum flexibility with file streams,\n* network responses, or other async sources.\n*\n* @remarks\n* Path expansion (`expandPaths: 'safe'`) is not supported in streaming mode.\n*\n* @param source - Async or sync iterable of TOON lines (without newlines)\n* @param options - Optional decoding configuration (expandPaths not supported)\n* @returns Async iterable of JSON stream events\n*\n* @example\n* ```ts\n* const fileStream = createReadStream('data.toon', 'utf-8')\n* const lines = splitLines(fileStream) // Async iterable of lines\n*\n* for await (const event of decodeStream(lines)) {\n* console.log(event)\n* // { type: 'startObject' }\n* // { type: 'key', key: 'name' }\n* // { type: 'primitive', value: 'Alice' }\n* // ...\n* }\n* ```\n*/\nfunction decodeStream(source, options) {\n\treturn decodeStream$1(source, options);\n}\nfunction resolveOptions(options) {\n\treturn {\n\t\tindent: options?.indent ?? 2,\n\t\tdelimiter: options?.delimiter ?? DEFAULT_DELIMITER,\n\t\tkeyFolding: options?.keyFolding ?? \"off\",\n\t\tflattenDepth: options?.flattenDepth ?? Number.POSITIVE_INFINITY,\n\t\treplacer: options?.replacer\n\t};\n}\nfunction resolveDecodeOptions(options) {\n\treturn {\n\t\tindent: options?.indent ?? 2,\n\t\tstrict: options?.strict ?? true,\n\t\texpandPaths: options?.expandPaths ?? \"off\"\n\t};\n}\n//#endregion\nexport { DEFAULT_DELIMITER, DELIMITERS, ToonDecodeError, decode, decodeFromLines, decodeStream, decodeStreamSync, encode, encodeLines };\n","/** Serializes JSON with BigInt values represented as decimal strings. */\nexport function stringify(value: unknown, space?: number): string {\n return JSON.stringify(\n value,\n (_key, value) => {\n if (typeof value === 'bigint') return value.toString()\n return value\n },\n space,\n )\n}\n\n/** Converts a value to JSON-compatible data. */\nexport function normalize(value: unknown): unknown {\n return JSON.parse(stringify(value))\n}\n","import { createRequire } from 'node:module'\nimport type * as yaml from 'yaml'\n\n/** @internal Cached `yaml` module, shared by `load()` and `loadSync()`. */\nlet cached: typeof yaml | undefined\n\n/** Loads the `yaml` module on demand, so runs that never touch YAML don't pay its startup cost. */\nexport async function load(): Promise<typeof yaml> {\n cached ??= await import('yaml')\n return cached\n}\n\n/**\n * Synchronous variant of `load()` for sync call paths (e.g. `Formatter.format`).\n *\n * Falls back to `require` when `load()` hasn't run yet. Async paths should call `load()`\n * first so environments without synchronous module resolution (e.g. compiled binaries,\n * bundled workers) never hit the fallback.\n */\nexport function loadSync(): typeof yaml {\n cached ??= createRequire(import.meta.url)('yaml') as typeof yaml\n return cached\n}\n","import { encode } from '@toon-format/toon'\n\nimport * as Json from './internal/json.js'\nimport * as Yaml from './internal/yaml.js'\n\n/** Supported output formats. */\nexport type Format = 'toon' | 'json' | 'yaml' | 'md' | 'jsonl'\n\n/** Serializes a value to the specified format. Defaults to TOON. */\nexport function format(value: unknown, fmt: Format = 'toon'): string {\n if (value == null) return ''\n if (fmt === 'json') {\n if (typeof value === 'string') {\n const trimmed = value.trim()\n if (trimmed.startsWith('{') || trimmed.startsWith('[')) {\n try {\n return JSON.stringify(JSON.parse(value), null, 2)\n } catch {}\n }\n }\n return Json.stringify(value, 2)\n }\n if (fmt === 'yaml') return Yaml.loadSync().stringify(value)\n if (fmt === 'md') return formatMarkdown(value)\n if (fmt === 'jsonl') {\n if (Array.isArray(value)) return value.map((v) => Json.stringify(v)).join('\\n')\n return Json.stringify(value)\n }\n // toon (default)\n if (isScalar(value)) return String(value)\n return encode(value as Record<string, unknown>)\n}\n\n/** Whether a value is a scalar (string, number, boolean, null, undefined). */\nfunction isScalar(value: unknown): boolean {\n return value === null || value === undefined || typeof value !== 'object'\n}\n\n/** Whether all values in an object are scalars. */\nfunction isFlat(obj: Record<string, unknown>): boolean {\n return Object.values(obj).every(isScalar)\n}\n\n/** Whether a value is an array of plain objects. */\nfunction isArrayOfObjects(value: unknown): value is Record<string, unknown>[] {\n return (\n Array.isArray(value) &&\n value.length > 0 &&\n value.every((v) => typeof v === 'object' && v !== null && !Array.isArray(v))\n )\n}\n\n/** Renders an aligned markdown table from headers and rows. */\nfunction table(headers: string[], rows: string[][]): string {\n const widths = headers.map((h, i) => Math.max(h.length, ...rows.map((r) => (r[i] ?? '').length)))\n const pad = (s: string, i: number) => s.padEnd(widths[i]!)\n const headerRow = `| ${headers.map(pad).join(' | ')} |`\n const sep = `|${widths.map((w) => '-'.repeat(w + 2)).join('|')}|`\n const body = rows.map((r) => `| ${headers.map((_, i) => pad(r[i] ?? '', i)).join(' | ')} |`)\n return `${headerRow}\\n${sep}\\n${body.join('\\n')}`\n}\n\n/** Renders a key-value table from a flat object. */\nfunction kvTable(obj: Record<string, unknown>): string {\n const entries = Object.entries(obj)\n return table(\n ['Key', 'Value'],\n entries.map(([k, v]) => [k, String(v)]),\n )\n}\n\n/** Renders a columnar table from an array of objects. */\nfunction columnarTable(items: Record<string, unknown>[]): string {\n const keys = [...new Set(items.flatMap(Object.keys))]\n return table(\n keys,\n items.map((item) => keys.map((k) => String(item[k] ?? ''))),\n )\n}\n\n/** Formats a value as Markdown, recursing into nested objects. */\nfunction formatMarkdown(value: unknown, path: string[] = []): string {\n if (isScalar(value)) {\n if (path.length === 0) return String(value)\n return `## ${path.join('.')}\\n\\n${String(value)}`\n }\n\n if (Array.isArray(value)) {\n if (isArrayOfObjects(value)) {\n const table = columnarTable(value)\n if (path.length === 0) return table\n return `## ${path.join('.')}\\n\\n${table}`\n }\n return formatMarkdown(String(value), path)\n }\n\n const obj = value as Record<string, unknown>\n const entries = Object.entries(obj)\n\n // Single flat object at root — no headings needed\n if (path.length === 0 && isFlat(obj)) return kvTable(obj)\n\n // Check if we need headings (mixed types or nested at root)\n const needsHeadings =\n path.length > 0 || entries.length > 1 || entries.some(([, v]) => !isScalar(v))\n\n if (needsHeadings) {\n const sections = entries.map(([key, val]) => {\n const childPath = [...path, key]\n if (isScalar(val)) return `## ${childPath.join('.')}\\n\\n${String(val)}`\n if (isArrayOfObjects(val)) return `## ${childPath.join('.')}\\n\\n${columnarTable(val)}`\n if (typeof val === 'object' && val !== null && !Array.isArray(val)) {\n const nested = val as Record<string, unknown>\n if (isFlat(nested)) return `## ${childPath.join('.')}\\n\\n${kvTable(nested)}`\n return formatMarkdown(nested, childPath)\n }\n return `## ${childPath.join('.')}\\n\\n${String(val)}`\n })\n return sections.join('\\n\\n')\n }\n\n return kvTable(obj)\n}\n","import type { z } from 'zod'\n\nimport type { FieldError } from './Errors.js'\nimport { ParseError, ValidationError } from './Errors.js'\nimport { isRecord, toKebab } from './internal/helpers.js'\n\n/** Parses raw argv tokens against Zod schemas for args and options. */\nexport function parse<\n const args extends z.ZodObject<any> | undefined = undefined,\n const options extends z.ZodObject<any> | undefined = undefined,\n>(argv: string[], options: parse.Options<args, options> = {}): parse.ReturnType<args, options> {\n const { args: argsSchema, options: optionsSchema, alias, defaults } = options\n\n const optionNames = createOptionNames(optionsSchema, alias)\n\n // First pass: split argv into positional tokens and raw option values\n const positionals: string[] = []\n const rawArgvOptions: Record<string, unknown> = {}\n\n let i = 0\n while (i < argv.length) {\n const token = argv[i]!\n\n if (token.startsWith('--no-') && token.length > 5) {\n // --no-flag negation\n const name = normalizeOptionName(token.slice(5), optionNames)\n if (!name) throw new ParseError({ message: `Unknown flag: ${token}` })\n rawArgvOptions[name] = false\n i++\n } else if (token.startsWith('--')) {\n const eqIdx = token.indexOf('=')\n if (eqIdx !== -1) {\n // --flag=value\n const raw = token.slice(2, eqIdx)\n const name = normalizeOptionName(raw, optionNames)\n if (!name) throw new ParseError({ message: `Unknown flag: --${raw}` })\n setOption(rawArgvOptions, name, token.slice(eqIdx + 1), optionsSchema)\n i++\n } else {\n // --flag [value]\n const name = normalizeOptionName(token.slice(2), optionNames)\n if (!name) throw new ParseError({ message: `Unknown flag: ${token}` })\n if (isCountOption(name, optionsSchema)) {\n rawArgvOptions[name] = ((rawArgvOptions[name] as number) ?? 0) + 1\n i++\n } else if (isBooleanOption(name, optionsSchema)) {\n rawArgvOptions[name] = true\n i++\n } else {\n const value = argv[i + 1]\n if (value === undefined)\n throw new ParseError({ message: `Missing value for flag: ${token}` })\n setOption(rawArgvOptions, name, value, optionsSchema)\n i += 2\n }\n }\n } else if (token.startsWith('-') && !token.startsWith('--') && token.length >= 2) {\n // -f or -abc (stacked short aliases)\n const chars = token.slice(1)\n for (let j = 0; j < chars.length; j++) {\n const short = chars[j]!\n const name = optionNames.aliasToName.get(short)\n if (!name) throw new ParseError({ message: `Unknown flag: -${short}` })\n const isLast = j === chars.length - 1\n if (!isLast) {\n if (isCountOption(name, optionsSchema)) {\n rawArgvOptions[name] = ((rawArgvOptions[name] as number) ?? 0) + 1\n } else if (isBooleanOption(name, optionsSchema)) {\n rawArgvOptions[name] = true\n } else {\n throw new ParseError({\n message: `Non-boolean flag -${short} must be last in a stacked alias`,\n })\n }\n } else if (isCountOption(name, optionsSchema)) {\n rawArgvOptions[name] = ((rawArgvOptions[name] as number) ?? 0) + 1\n } else if (isBooleanOption(name, optionsSchema)) {\n rawArgvOptions[name] = true\n } else {\n const value = argv[i + 1]\n if (value === undefined)\n throw new ParseError({ message: `Missing value for flag: -${short}` })\n setOption(rawArgvOptions, name, value, optionsSchema)\n i++\n }\n }\n i++\n } else {\n positionals.push(token)\n i++\n }\n }\n\n // Assign positionals to args schema keys in order\n const rawArgs: Record<string, string> = {}\n if (argsSchema) {\n const keys = Object.keys(argsSchema.shape)\n for (let j = 0; j < keys.length; j++) {\n const key = keys[j]!\n if (positionals[j] !== undefined) {\n rawArgs[key] = positionals[j]!\n }\n }\n }\n\n // Validate args through zod\n const args = argsSchema ? zodParse(argsSchema, rawArgs) : {}\n\n const rawDefaults = normalizeOptionDefaults(defaults, optionsSchema, optionNames)\n\n // Coerce raw option values before zod validation\n if (optionsSchema) {\n for (const [name, value] of Object.entries(rawArgvOptions)) {\n rawArgvOptions[name] = coerce(value, name, optionsSchema)\n }\n }\n\n const mergedOptions = { ...rawDefaults, ...rawArgvOptions }\n\n // Validate options through zod\n const parsedOptions = optionsSchema ? zodParse(optionsSchema, mergedOptions) : {}\n\n return { args, options: parsedOptions } as parse.ReturnType<args, options>\n}\n\nexport declare namespace parse {\n /** Options for parsing. */\n type Options<\n args extends z.ZodObject<any> | undefined = undefined,\n options extends z.ZodObject<any> | undefined = undefined,\n > = {\n /** Zod schema for positional arguments. Keys define order. */\n args?: args\n /** Config-backed option defaults merged before argv parsing. */\n defaults?: options extends z.ZodObject<any> ? Partial<z.input<options>> | undefined : undefined\n /** Zod schema for named options/flags. */\n options?: options\n /** Map of option names to single-char aliases. */\n alias?: Record<string, string> | undefined\n }\n /** Parsed result with args and options. */\n type ReturnType<\n args extends z.ZodObject<any> | undefined = undefined,\n options extends z.ZodObject<any> | undefined = undefined,\n > = {\n /** Parsed positional arguments. */\n args: args extends z.ZodObject<any> ? z.output<args> : {}\n /** Parsed named options. */\n options: options extends z.ZodObject<any> ? z.output<options> : {}\n }\n}\n\ntype OptionNames = {\n aliasToName: Map<string, string>\n kebabToCamel: Map<string, string>\n knownOptions: Set<string>\n}\n\n/** Builds lookup tables for option names and short aliases. */\nfunction createOptionNames(\n schema: z.ZodObject<any> | undefined,\n alias: Record<string, string> | undefined,\n): OptionNames {\n const aliasToName = new Map<string, string>()\n if (alias) for (const [name, short] of Object.entries(alias)) aliasToName.set(short, name)\n\n const knownOptions = new Set(schema ? Object.keys(schema.shape) : [])\n const kebabToCamel = new Map<string, string>()\n for (const name of knownOptions) {\n const kebab = toKebab(name)\n if (kebab !== name) kebabToCamel.set(kebab, name)\n }\n\n return { aliasToName, kebabToCamel, knownOptions }\n}\n\n/** Normalizes a long option name, accepting kebab-case aliases for camelCase schema keys. */\nfunction normalizeOptionName(raw: string, options: OptionNames): string | undefined {\n const name = options.kebabToCamel.get(raw) ?? raw\n return options.knownOptions.has(name) ? name : undefined\n}\n\n/** Normalizes config-backed defaults and validates config structure/key names. */\nfunction normalizeOptionDefaults(\n defaults: unknown,\n schema: z.ZodObject<any> | undefined,\n optionNames: OptionNames,\n): Record<string, unknown> {\n if (defaults === undefined) return {}\n if (!isRecord(defaults))\n throw new ParseError({\n message: 'Invalid config section: expected an object of option defaults',\n })\n if (!schema) {\n const [first] = Object.keys(defaults)\n if (first) throw new ParseError({ message: `Unknown config option: ${first}` })\n return {}\n }\n\n const normalized: Record<string, unknown> = {}\n for (const [rawName, value] of Object.entries(defaults)) {\n const name = normalizeOptionName(rawName, optionNames)\n if (!name) throw new ParseError({ message: `Unknown config option: ${rawName}` })\n normalized[name] = value\n }\n return normalized\n}\n\n/** Unwraps ZodDefault/ZodOptional to get the inner type. */\nfunction unwrap(schema: z.ZodType): z.ZodType {\n let s = schema as any\n while (s.def?.innerType) s = s.def.innerType\n return s\n}\n\n/** Checks if an option's inner type is boolean. */\nfunction isBooleanOption(name: string, schema: z.ZodObject<any> | undefined): boolean {\n if (!schema) return false\n const field = schema.shape[name]\n if (!field) return false\n return unwrap(field).constructor.name === 'ZodBoolean'\n}\n\n/** Checks if an option is a count type (z.count()). */\nfunction isCountOption(name: string, schema: z.ZodObject<any> | undefined): boolean {\n if (!schema) return false\n const field = schema.shape[name]\n if (!field) return false\n return typeof field.meta === 'function' && field.meta()?.count === true\n}\n\n/** Checks if an option's inner type is an array. */\nfunction isArrayOption(name: string, schema: z.ZodObject<any> | undefined): boolean {\n if (!schema) return false\n const field = schema.shape[name]\n if (!field) return false\n return unwrap(field).constructor.name === 'ZodArray'\n}\n\n/** Sets an option value, collecting into arrays for array schemas. */\nfunction setOption(\n raw: Record<string, unknown>,\n name: string,\n value: string,\n schema: z.ZodObject<any> | undefined,\n) {\n if (isArrayOption(name, schema)) {\n const existing = raw[name]\n if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n raw[name] = [value]\n }\n } else {\n raw[name] = value\n }\n}\n\n/** Wraps zod schema.parse(), converting ZodError to ValidationError. */\nexport function zodParse(schema: z.ZodObject<any>, data: Record<string, unknown>) {\n try {\n return schema.parse(data)\n } catch (err: any) {\n const issues: any[] = err?.issues ?? err?.error?.issues ?? []\n const fieldErrors: FieldError[] = issues.map((issue: any) => ({\n code: issue.code,\n missing: !hasPath(data, issue.path ?? []),\n path: (issue.path ?? []).join('.'),\n expected: issue.expected ?? '',\n received: issue.received ?? '',\n message: issue.message ?? '',\n }))\n throw new ValidationError({\n message: issues.map((i: any) => i.message).join('; ') || 'Validation failed',\n fieldErrors,\n cause: err instanceof Error ? err : undefined,\n })\n }\n}\n\n/** Checks whether the raw input contains the full issue path. */\nfunction hasPath(data: Record<string, unknown>, path: PropertyKey[]): boolean {\n if (path.length === 0) return true\n\n let current: unknown = data\n for (const part of path) {\n if (!isRecord(current) && !Array.isArray(current)) return false\n if (!(part in current)) return false\n current = (current as any)[part]\n }\n\n return true\n}\n\n/** Parses environment variables against a Zod schema. Falls back to `process.env` → `Deno.env` when no source is provided. */\nexport function parseEnv<const env extends z.ZodObject<any>>(\n schema: env,\n source: Record<string, string | undefined> = defaultEnvSource(),\n): z.output<env> {\n const raw: Record<string, unknown> = {}\n for (const [key, field] of Object.entries(schema.shape)) {\n const value = source[key]\n if (value !== undefined) raw[key] = coerceEnv(value, field as z.ZodType)\n }\n return zodParse(schema, raw) as z.output<env>\n}\n\n/** Coerces an env var string to the type expected by the schema field. */\nfunction coerceEnv(value: string, field: z.ZodType): unknown {\n const inner = unwrap(field)\n const typeName = inner.constructor.name\n if (typeName === 'ZodNumber') return Number(value)\n if (typeName === 'ZodBoolean') return value === 'true' || value === '1'\n return value\n}\n\n/** Coerces a raw string value to the type expected by the schema. */\nfunction coerce(value: unknown, name: string, schema: z.ZodObject<any>): unknown {\n const field = schema.shape[name]\n if (!field) return value\n const inner = unwrap(field)\n const typeName = inner.constructor.name\n\n if (typeName === 'ZodNumber' && typeof value === 'string') {\n return Number(value)\n }\n if (typeName === 'ZodBoolean' && typeof value === 'string') {\n return value === 'true'\n }\n return value\n}\n\n/** Parses known global options from argv, passing unknown flags and positionals through to `rest`. */\nexport function parseGlobals<const globals extends z.ZodObject<any>>(\n argv: string[],\n schema: globals,\n alias?: Record<string, string>,\n options: parseGlobals.Options = {},\n): { parsed: z.output<globals>; rest: string[] } {\n const optionNames = createOptionNames(schema, alias)\n\n const rest: string[] = []\n const rawOptions: Record<string, unknown> = {}\n\n let i = 0\n while (i < argv.length) {\n const token = argv[i]!\n\n if (token === '--') {\n for (let j = i; j < argv.length; j++) rest.push(argv[j]!)\n break\n }\n\n if (token.startsWith('--no-') && token.length > 5) {\n const name = normalizeOptionName(token.slice(5), optionNames)\n if (!name) {\n rest.push(token)\n } else {\n rawOptions[name] = false\n }\n i++\n } else if (token.startsWith('--')) {\n const eqIdx = token.indexOf('=')\n if (eqIdx !== -1) {\n // --flag=value\n const raw = token.slice(2, eqIdx)\n const name = normalizeOptionName(raw, optionNames)\n if (!name) {\n rest.push(token)\n } else {\n setOption(rawOptions, name, token.slice(eqIdx + 1), schema)\n }\n i++\n } else {\n // --flag [value]\n const name = normalizeOptionName(token.slice(2), optionNames)\n if (!name) {\n // Unknown flag — pass through as-is\n rest.push(token)\n i++\n } else if (isCountOption(name, schema)) {\n rawOptions[name] = ((rawOptions[name] as number) ?? 0) + 1\n i++\n } else if (isBooleanOption(name, schema)) {\n rawOptions[name] = true\n i++\n } else {\n const value = argv[i + 1]\n if (value === undefined)\n throw new ParseError({ message: `Missing value for flag: ${token}` })\n setOption(rawOptions, name, value, schema)\n i += 2\n }\n }\n } else if (token.startsWith('-') && !token.startsWith('--') && token.length >= 2) {\n // Short flag(s)\n const chars = token.slice(1)\n let allKnown = true\n for (let j = 0; j < chars.length; j++) {\n if (!optionNames.aliasToName.has(chars[j]!)) {\n allKnown = false\n break\n }\n }\n\n if (!allKnown) {\n // Unknown short flag — pass through as-is\n rest.push(token)\n i++\n } else {\n for (let j = 0; j < chars.length; j++) {\n const short = chars[j]!\n const name = optionNames.aliasToName.get(short)!\n const isLast = j === chars.length - 1\n if (!isLast) {\n if (isCountOption(name, schema)) {\n rawOptions[name] = ((rawOptions[name] as number) ?? 0) + 1\n } else if (isBooleanOption(name, schema)) {\n rawOptions[name] = true\n } else {\n throw new ParseError({\n message: `Non-boolean flag -${short} must be last in a stacked alias`,\n })\n }\n } else if (isCountOption(name, schema)) {\n rawOptions[name] = ((rawOptions[name] as number) ?? 0) + 1\n } else if (isBooleanOption(name, schema)) {\n rawOptions[name] = true\n } else {\n const value = argv[i + 1]\n if (value === undefined)\n throw new ParseError({ message: `Missing value for flag: -${short}` })\n setOption(rawOptions, name, value, schema)\n i++\n }\n }\n i++\n }\n } else {\n // Positional — pass through\n rest.push(token)\n i++\n }\n }\n\n if (options.validate === false) return { parsed: rawOptions as z.output<globals>, rest }\n\n // Coerce raw option values before zod validation\n for (const [name, value] of Object.entries(rawOptions))\n rawOptions[name] = coerce(value, name, schema)\n\n const parsed = zodParse(schema, rawOptions) as z.output<globals>\n return { parsed, rest }\n}\n\nexport declare namespace parseGlobals {\n /** Options for parsing global flags. */\n type Options = {\n /** Whether to validate parsed globals against the schema. */\n validate?: boolean | undefined\n }\n}\n\n/** Returns the best available env source for the current runtime. */\nexport function defaultEnvSource(): Record<string, string | undefined> {\n if (typeof globalThis !== 'undefined') {\n const g = globalThis as any\n if (g.process?.env) return g.process.env\n if (g.Deno?.env) return new Proxy({}, { get: (_, key) => g.Deno.env.get(key) }) as any\n }\n return {}\n}\n","import { z } from 'zod'\n\nimport type { FieldError } from '../Errors.js'\nimport { IncurError, ValidationError } from '../Errors.js'\nimport type { Context as MiddlewareContext, Handler as MiddlewareHandler } from '../middleware.js'\nimport * as Parser from '../Parser.js'\n\n/** @internal Sentinel symbol for `ok()` and `error()` return values. */\nconst sentinel = Symbol.for('incur.sentinel')\n\n/** @internal CTA block for command output. */\nexport type CtaBlock = {\n commands: unknown[]\n description?: string | undefined\n}\n\n/** @internal A tagged ok result. */\ntype OkResult = {\n [sentinel]: 'ok'\n data: unknown\n cta?: CtaBlock | undefined\n}\n\n/** @internal A tagged error result. */\ntype ErrorResult = {\n [sentinel]: 'error'\n code: string\n message: string\n retryable?: boolean | undefined\n exitCode?: number | undefined\n cta?: CtaBlock | undefined\n}\n\n/** @internal Unified command execution used by CLI, HTTP, and MCP transports. */\nexport async function execute(command: any, options: execute.Options): Promise<execute.Result> {\n const {\n argv,\n inputOptions,\n agent,\n format,\n formatExplicit,\n name,\n path,\n version,\n envSource = process.env,\n env: envSchema,\n globals = {},\n vars: varsSchema,\n middlewares = [],\n } = options\n const displayName = options.displayName ?? name\n const parseMode = options.parseMode ?? 'argv'\n\n const varsMap: Record<string, unknown> = varsSchema ? varsSchema.parse({}) : {}\n let result: execute.Result | undefined\n // For streaming with middleware: runCommand suspends on streamConsumed so middleware \"after\"\n // runs after the stream is consumed. The wrapped generator resolves it in its finally block.\n // resultReady signals that result has been set (for streams, before the chain finishes).\n let streamConsumed: Promise<void> | undefined\n let resolveStreamConsumed: (() => void) | undefined\n let resolveResultReady: (() => void) | undefined\n const resultReady = new Promise<void>((r) => {\n resolveResultReady = r\n })\n\n const runCommand = async () => {\n // Parse args and options\n let args: Record<string, unknown>\n let parsedOptions: Record<string, unknown>\n\n if (parseMode === 'argv') {\n // CLI mode: parse both args and options from argv tokens\n const parsed = Parser.parse(argv, {\n alias: command.alias as Record<string, string> | undefined,\n args: command.args,\n defaults: options.defaults,\n options: command.options,\n })\n args = parsed.args\n parsedOptions = parsed.options\n } else if (parseMode === 'split') {\n // HTTP mode: positional args from URL path segments, options from body/query\n const parsed = Parser.parse(argv, { args: command.args })\n args = parsed.args\n parsedOptions = command.options ? Parser.zodParse(command.options, inputOptions) : {}\n } else {\n // MCP mode: all params come from inputOptions, split into args vs options\n const split = splitParams(inputOptions, command)\n args = command.args ? Parser.zodParse(command.args, split.args) : {}\n parsedOptions = command.options ? Parser.zodParse(command.options, split.options) : {}\n }\n\n // Parse env\n const commandEnv = command.env ? Parser.parseEnv(command.env, envSource) : {}\n\n // Build sentinel helpers\n const okFn = (data: unknown, meta: { cta?: CtaBlock | undefined } = {}): never =>\n ({ [sentinel]: 'ok', data, cta: meta.cta }) as never\n const errorFn = (opts: {\n code: string\n cta?: CtaBlock | undefined\n exitCode?: number | undefined\n message: string\n retryable?: boolean | undefined\n }): never => ({ [sentinel]: 'error', ...opts }) as never\n\n const raw = command.run({\n agent,\n args,\n displayName,\n env: commandEnv,\n error: errorFn,\n format,\n formatExplicit,\n name,\n ok: okFn,\n options: parsedOptions,\n var: varsMap,\n version,\n })\n\n // Streaming: wrap the generator so middleware \"after\" runs after consumption.\n // When middleware is active, runCommand suspends until the stream is fully consumed,\n // keeping the middleware chain alive around the stream's lifetime.\n if (isAsyncGenerator(raw)) {\n if (middlewares.length > 0) {\n streamConsumed = new Promise<void>((r) => {\n resolveStreamConsumed = r\n })\n async function* wrapped() {\n try {\n return yield* raw as AsyncGenerator<unknown, unknown, unknown>\n } finally {\n resolveStreamConsumed!()\n }\n }\n result = { stream: wrapped() }\n resolveResultReady!()\n await streamConsumed\n } else {\n result = { stream: raw }\n }\n return\n }\n\n const awaited = await raw\n\n if (isSentinel(awaited)) {\n if (awaited[sentinel] === 'ok') {\n const ok = awaited as OkResult\n result = { ok: true, data: ok.data, ...(ok.cta ? { cta: ok.cta } : undefined) }\n } else {\n const err = awaited as ErrorResult\n result = {\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n ...(err.retryable !== undefined ? { retryable: err.retryable } : undefined),\n },\n ...(err.cta ? { cta: err.cta } : undefined),\n ...(err.exitCode !== undefined ? { exitCode: err.exitCode } : undefined),\n }\n }\n return\n }\n\n result = { ok: true, data: awaited }\n }\n\n try {\n // Parse CLI-level env\n const cliEnv = envSchema ? Parser.parseEnv(envSchema, envSource) : {}\n\n if (middlewares.length > 0) {\n const errorFn = (opts: {\n code: string\n cta?: CtaBlock | undefined\n exitCode?: number | undefined\n message: string\n retryable?: boolean | undefined\n }): never => {\n // Side-effect: set result directly (handles both `return c.error()` and bare `c.error()`)\n result = {\n ok: false,\n error: {\n code: opts.code,\n message: opts.message,\n ...(opts.retryable !== undefined ? { retryable: opts.retryable } : undefined),\n },\n ...(opts.cta ? { cta: opts.cta } : undefined),\n ...(opts.exitCode !== undefined ? { exitCode: opts.exitCode } : undefined),\n }\n return undefined as never\n }\n\n const mwCtx: MiddlewareContext = {\n agent,\n command: path,\n displayName,\n env: cliEnv,\n error: errorFn,\n format: format as any,\n formatExplicit,\n globals,\n name,\n set(key: string, value: unknown) {\n varsMap[key] = value\n },\n var: varsMap,\n version,\n }\n\n const composed = middlewares.reduceRight(\n (next: () => Promise<void>, mw) => async () => {\n await mw(mwCtx, next)\n },\n runCommand,\n )\n // Start the chain and race against resultReady. For streams with middleware,\n // runCommand suspends on streamConsumed (keeping middleware \"after\" deferred)\n // but signals resultReady so we can return the stream immediately. The transport\n // consumes the stream, which resolves streamConsumed, letting middleware \"after\" run.\n const chainPromise = composed()\n await Promise.race([chainPromise, resultReady])\n if (streamConsumed) return result!\n await chainPromise\n } else {\n await runCommand()\n }\n } catch (error) {\n if (error instanceof ValidationError)\n return {\n ok: false,\n error: {\n code: 'VALIDATION_ERROR',\n message: error.message,\n fieldErrors: error.fieldErrors,\n },\n }\n return {\n ok: false,\n error: {\n code: error instanceof IncurError ? error.code : 'UNKNOWN',\n message: error instanceof Error ? error.message : String(error),\n ...(error instanceof IncurError ? { retryable: error.retryable } : undefined),\n },\n ...(error instanceof IncurError && error.exitCode !== undefined\n ? { exitCode: error.exitCode }\n : undefined),\n }\n }\n\n return result ?? { ok: true, data: undefined }\n}\n\n/** @internal Splits flat params into args vs options using schema shapes. */\nfunction splitParams(\n params: Record<string, unknown>,\n command: any,\n): { args: Record<string, unknown>; options: Record<string, unknown> } {\n const argKeys = new Set(command.args ? Object.keys(command.args.shape) : [])\n const a: Record<string, unknown> = {}\n const o: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(params))\n if (argKeys.has(key)) a[key] = value\n else o[key] = value\n return { args: a, options: o }\n}\n\nexport declare namespace execute {\n /** Options for the unified execute function. */\n type Options = {\n /** Whether the consumer is an agent. */\n agent: boolean\n /** Raw positional tokens (already separated from flags). For HTTP/MCP, pass `[]`. */\n argv: string[]\n /** Default option values from config file. */\n defaults?: Record<string, unknown> | undefined\n /** The resolved binary name the user invoked (e.g. an alias). Falls back to `name`. */\n displayName?: string | undefined\n /** CLI-level env schema. */\n env?: z.ZodObject<any> | undefined\n /** Source for environment variables. Defaults to `process.env`. */\n envSource?: Record<string, string | undefined> | undefined\n /** The resolved output format. */\n format: string\n /** Whether the format was explicitly requested. */\n formatExplicit: boolean\n /** Parsed global options. Defaults to `{}` when not provided. */\n globals?: Record<string, unknown> | undefined\n /** Raw parsed options (from query params, JSON body, or MCP params). For CLI, pass `{}`. */\n inputOptions: Record<string, unknown>\n /** Middleware handlers (root + group + command, already collected). */\n middlewares?: MiddlewareHandler[] | undefined\n /** The CLI name. */\n name: string\n /**\n * How to parse input:\n * - `'argv'` (default): parse both args and options from argv tokens (CLI mode)\n * - `'split'`: args from argv, options from inputOptions (HTTP mode)\n * - `'flat'`: all params from inputOptions, split by schema shapes (MCP mode)\n */\n parseMode?: 'argv' | 'split' | 'flat' | undefined\n /** The resolved command path. */\n path: string\n /** Vars schema for middleware variables. */\n vars?: z.ZodObject<any> | undefined\n /** CLI version string. */\n version: string | undefined\n }\n\n /** Result of executing a command. */\n type Result =\n | { ok: true; data: unknown; cta?: CtaBlock | undefined }\n | {\n ok: false\n error: {\n code: string\n message: string\n retryable?: boolean | undefined\n fieldErrors?: FieldError[] | undefined\n }\n cta?: CtaBlock | undefined\n exitCode?: number | undefined\n }\n | { stream: AsyncGenerator<unknown, unknown, unknown> }\n}\n\n/** @internal Type guard for sentinel results. */\nfunction isSentinel(value: unknown): value is OkResult | ErrorResult {\n return typeof value === 'object' && value !== null && sentinel in value\n}\n\n/** @internal Type guard for async generators. */\nfunction isAsyncGenerator(value: unknown): value is AsyncGenerator<unknown, unknown, unknown> {\n return (\n typeof value === 'object' &&\n value !== null &&\n Symbol.asyncIterator in value &&\n typeof (value as any).next === 'function'\n )\n}\n\n/** Common metadata shared by command definitions and built-in commands. */\nexport type CommandMeta<options extends z.ZodObject<any> | undefined = undefined> = {\n /** Map of option names to single-char aliases. */\n alias?: options extends z.ZodObject<any>\n ? Partial<Record<keyof z.output<options>, string>>\n : Record<string, string> | undefined\n /** A short description of what the command does. */\n description?: string | undefined\n /** Zod schema for named options/flags. */\n options?: options | undefined\n}\n\n/** @internal Metadata for a built-in subcommand. */\ntype BuiltinSubcommandMeta<options extends z.ZodObject<any> | undefined = undefined> =\n CommandMeta<options> & {\n /** Alternative names for this built-in subcommand. */\n aliases?: string[] | undefined\n }\n\n/** @internal Creates a builtin subcommand with typesafe alias inference. */\nfunction subcommand<const options extends z.ZodObject<any> | undefined = undefined>(\n def: BuiltinSubcommandMeta<options> & { name: string },\n) {\n return def\n}\n\n/** Supported shell names for completions. */\nexport const shells = ['bash', 'fish', 'nushell', 'zsh'] as const\n\n/** A supported shell name. */\nexport type Shell = (typeof shells)[number]\n\n/** Built-in command metadata shared by help, completions, and handler logic. */\nexport const builtinCommands = [\n {\n name: 'completions',\n description: 'Generate shell completion script',\n args: z.object({\n shell: z.enum(shells).describe('Shell to generate completions for'),\n }),\n hint(name) {\n const rows = [\n ['bash', `eval \"$(${name} completions bash)\"`, '# add to ~/.bashrc'],\n ['fish', `${name} completions fish | source`, '# add to ~/.config/fish/config.fish'],\n ['nushell', `see \\`${name} completions nushell\\``, '# add to config.nu'],\n ['zsh', `eval \"$(${name} completions zsh)\"`, '# add to ~/.zshrc'],\n ] as const\n const shellW = Math.max(...rows.map((r) => r[0].length))\n const cmdW = Math.max(...rows.map((r) => r[1].length))\n return (\n 'Setup:\\n' +\n rows\n .map(([s, cmd, comment]) => ` ${s.padEnd(shellW)} ${cmd.padEnd(cmdW)} ${comment}`)\n .join('\\n')\n )\n },\n },\n {\n name: 'mcp',\n description: 'Register as MCP server',\n subcommands: [\n subcommand({\n name: 'add',\n description: 'Register as MCP server',\n alias: { command: 'c' },\n options: z.object({\n agent: z\n .string()\n .optional()\n .describe('Target a specific agent (e.g. claude-code, cursor)'),\n command: z\n .string()\n .optional()\n .describe('Override the command agents will run (e.g. \"pnpm my-cli --mcp\")'),\n noGlobal: z.boolean().optional().describe('Install to project instead of globally'),\n }),\n }),\n subcommand({\n name: 'doctor',\n description: 'Validate MCP server startup and tool listing',\n }),\n ],\n },\n {\n name: 'skills',\n aliases: ['skill'],\n description: 'Sync skill files to agents',\n subcommands: [\n subcommand({\n name: 'add',\n description: 'Sync skill files to agents',\n options: z.object({\n depth: z.number().optional().describe('Grouping depth for skill files (default: 1)'),\n noGlobal: z.boolean().optional().describe('Install to project instead of globally'),\n }),\n }),\n subcommand({\n name: 'list',\n aliases: ['ls'],\n description: 'List skills',\n }),\n ],\n },\n] satisfies {\n name: string\n aliases?: string[] | undefined\n args?: z.ZodObject<any> | undefined\n description: string\n hint?: ((name: string) => string) | undefined\n subcommands?: (BuiltinSubcommandMeta<z.ZodObject<any>> & { name: string })[] | undefined\n}[]\n\n/** @internal Finds a builtin command by its name or alias. */\nexport function findBuiltin(token: string) {\n return builtinCommands.find((b) => b.name === token || b.aliases?.includes(token))\n}\n\n/** @internal Finds a builtin subcommand by its name or alias. */\nexport function findBuiltinSubcommand(builtin: (typeof builtinCommands)[number], token: string) {\n return builtin.subcommands?.find((sub) => sub.name === token || sub.aliases?.includes(token))\n}\n\n/** @internal Checks if a token matches a builtin command by name or alias. */\nexport function isBuiltin(token: string) {\n return builtinCommands.some((b) => b.name === token || b.aliases?.includes(token))\n}\n","import { z } from 'zod'\n\nimport type { GlobalsDescriptor } from './Cli.js'\nimport { builtinCommands } from './internal/command.js'\nimport { toKebab } from './internal/helpers.js'\nimport { defaultEnvSource } from './Parser.js'\n\n/** Formats help text for a router CLI or command group. */\nexport function formatRoot(name: string, options: formatRoot.Options = {}): string {\n const {\n aliases,\n configFlag,\n description,\n globals,\n version,\n commands = [],\n root = false,\n } = options\n const lines: string[] = []\n\n // Header\n const title = version ? `${name}@${version}` : name\n lines.push(description ? `${title} \\u2014 ${description}` : title)\n lines.push('')\n\n // Synopsis\n lines.push(`Usage: ${name} <command>`)\n if (aliases?.length) lines.push(`Aliases: ${aliases.join(', ')}`)\n\n // Commands\n if (commands.length > 0) {\n lines.push('')\n lines.push('Commands:')\n const maxLen = Math.max(...commands.map((c) => c.name.length))\n for (const cmd of commands) {\n if (cmd.description) {\n const padding = ' '.repeat(maxLen - cmd.name.length)\n lines.push(` ${cmd.name}${padding} ${cmd.description}`)\n } else lines.push(` ${cmd.name}`)\n }\n }\n\n lines.push(...globalOptionsLines(root, configFlag, globals))\n\n return lines.join('\\n')\n}\n\nexport declare namespace formatRoot {\n type Options = {\n /** Alternative binary names for this CLI. */\n aliases?: string[] | undefined\n /** Flag name for config file path (e.g. `'config'` renders `--config <path>`). */\n configFlag?: string | undefined\n /** Commands to list. */\n commands?: { name: string; description?: string | undefined }[] | undefined\n /** A short description of the CLI or group. */\n description?: string | undefined\n /** Custom global options schema and alias map. */\n globals?: GlobalsDescriptor | undefined\n /** Show root-level built-in commands and flags. */\n root?: boolean | undefined\n /** CLI version string. */\n version?: string | undefined\n }\n}\n\nexport declare namespace formatCommand {\n type Options = {\n /** Map of option names to single-char aliases. */\n alias?: Partial<Record<string, string>> | undefined\n /** Alternative binary names for this CLI. */\n aliases?: string[] | undefined\n /** Zod schema for positional arguments. */\n args?: z.ZodObject<any> | undefined\n /** Flag name for config file path (e.g. `'config'` renders `--config <path>`). */\n configFlag?: string | undefined\n /** Subcommands to list (for CLIs with both a root handler and subcommands). */\n commands?: { name: string; description?: string | undefined }[] | undefined\n /** A short description of what the command does. */\n description?: string | undefined\n /** Zod schema for environment variables. */\n env?: z.ZodObject<any> | undefined\n /** Override environment variable source for \"set:\" display. Defaults to `process.env`. */\n envSource?: Record<string, string | undefined> | undefined\n /** Custom global options schema and alias map. */\n globals?: GlobalsDescriptor | undefined\n /** Formatted usage examples. */\n examples?: { command: string; description?: string }[] | undefined\n /** Plain text hint displayed after examples and before global options. */\n hint?: string | undefined\n /** Hide global options section. */\n hideGlobalOptions?: boolean | undefined\n /** Zod schema for named options/flags. */\n options?: z.ZodObject<any> | undefined\n /** Show root-level built-in commands and flags. */\n root?: boolean | undefined\n /** Alternative usage patterns. */\n usage?:\n | {\n args?: Partial<Record<string, true>> | undefined\n options?: Partial<Record<string, true>> | undefined\n prefix?: string | undefined\n suffix?: string | undefined\n }[]\n | undefined\n /** CLI version string. */\n version?: string | undefined\n }\n}\n\n/** Formats help text for a leaf command. */\nexport function formatCommand(name: string, options: formatCommand.Options = {}): string {\n const {\n alias,\n aliases,\n configFlag,\n description,\n globals,\n version,\n args,\n env,\n envSource,\n hint,\n root = false,\n options: opts,\n examples,\n } = options\n const lines: string[] = []\n\n // Header\n const title = version ? `${name}@${version}` : name\n lines.push(description ? `${title} \\u2014 ${description}` : title)\n lines.push('')\n\n // Synopsis\n const { usage } = options\n if (usage && usage.length > 0) {\n const usageLines = usage.map((u) => {\n const parts: string[] = []\n if (u.prefix) parts.push(u.prefix)\n parts.push(name)\n if (u.args) for (const key of Object.keys(u.args)) parts.push(`<${key}>`)\n if (u.options) for (const key of Object.keys(u.options)) parts.push(`--${key} <${key}>`)\n if (u.suffix) parts.push(u.suffix)\n return parts.join(' ')\n })\n const pad = ' '.repeat('Usage: '.length)\n lines.push(`Usage: ${usageLines[0]}`)\n for (const line of usageLines.slice(1)) lines.push(`${pad}${line}`)\n } else {\n const synopsis = buildSynopsis(name, args)\n const commandSuffix = options.commands && options.commands.length > 0 ? ' | <command>' : ''\n lines.push(`Usage: ${synopsis}${opts ? ' [options]' : ''}${commandSuffix}`)\n }\n if (aliases?.length) lines.push(`Aliases: ${aliases.join(', ')}`)\n\n // Arguments\n if (args) {\n const entries = argsEntries(args)\n if (entries.length > 0) {\n lines.push('')\n lines.push('Arguments:')\n const maxLen = Math.max(...entries.map((e) => e.name.length))\n for (const entry of entries)\n lines.push(` ${entry.name}${' '.repeat(maxLen - entry.name.length)} ${entry.description}`)\n }\n }\n\n // Options\n if (opts) {\n const entries = optionEntries(opts, alias)\n if (entries.length > 0) {\n lines.push('')\n lines.push('Options:')\n const maxLen = Math.max(...entries.map((e) => e.flag.length))\n for (const entry of entries) {\n const padding = ' '.repeat(maxLen - entry.flag.length)\n const prefix = entry.deprecated ? '[deprecated] ' : ''\n const desc =\n entry.defaultValue !== undefined\n ? `${prefix}${entry.description} (default: ${entry.defaultValue})`\n : `${prefix}${entry.description}`\n lines.push(` ${entry.flag}${padding} ${desc}`)\n }\n }\n }\n\n // Examples\n if (examples && examples.length > 0) {\n lines.push('')\n lines.push('Examples:')\n const maxLen = Math.max(\n ...examples.map((e) => (e.command ? `${name} ${e.command}` : name).length),\n )\n for (const ex of examples) {\n const cmd = ex.command ? `${name} ${ex.command}` : name\n if (ex.description)\n lines.push(` ${cmd}${' '.repeat(maxLen - cmd.length)} # ${ex.description}`)\n else lines.push(` ${cmd}`)\n }\n }\n\n // Hint\n if (hint) {\n lines.push('')\n lines.push(hint)\n }\n\n // Subcommands (for CLIs with both a root handler and subcommands)\n const { commands } = options\n if (commands && commands.length > 0) {\n lines.push('')\n lines.push('Commands:')\n const maxLen = Math.max(...commands.map((c) => c.name.length))\n for (const cmd of commands) {\n if (cmd.description) {\n const padding = ' '.repeat(maxLen - cmd.name.length)\n lines.push(` ${cmd.name}${padding} ${cmd.description}`)\n } else lines.push(` ${cmd.name}`)\n }\n }\n\n if (!options.hideGlobalOptions) lines.push(...globalOptionsLines(root, configFlag, globals))\n\n // Environment Variables\n if (env) {\n const entries = envEntries(env)\n if (entries.length > 0) {\n lines.push('')\n lines.push('Environment Variables:')\n const maxLen = Math.max(...entries.map((e) => e.name.length))\n for (const entry of entries) {\n const padding = ' '.repeat(maxLen - entry.name.length)\n const parts: string[] = [entry.description]\n const source = envSource ?? defaultEnvSource()\n if (entry.name in source) parts.push(`set: ${redact(source[entry.name]!)}`)\n if (entry.defaultValue !== undefined) parts.push(`default: ${entry.defaultValue}`)\n const desc = parts.length > 1 ? `${parts[0]} (${parts.slice(1).join(', ')})` : parts[0]\n lines.push(` ${entry.name}${padding} ${desc}`)\n }\n }\n }\n\n return lines.join('\\n')\n}\n\n/** Builds the synopsis string with `<required>` and `[optional]` placeholders. */\nfunction buildSynopsis(name: string, args?: z.ZodObject<any>): string {\n if (!args) return name\n const parts = [name]\n for (const [key, schema] of Object.entries(args.shape)) {\n const type = resolveTypeName(schema)\n const label = type.includes('|') ? type : key\n parts.push((schema as z.ZodType)._zod.optout === 'optional' ? `[${label}]` : `<${label}>`)\n }\n return parts.join(' ')\n}\n\n/** Extracts arg entries from a Zod object schema. */\nfunction argsEntries(schema: z.ZodObject<any>) {\n const entries: { name: string; description: string }[] = []\n for (const [key, field] of Object.entries(schema.shape))\n entries.push({ name: key, description: (field as any).description ?? '' })\n return entries\n}\n\n/** Extracts env var entries from a Zod object schema. */\nfunction envEntries(schema: z.ZodObject<any>) {\n const entries: { name: string; description: string; defaultValue?: unknown }[] = []\n for (const [key, field] of Object.entries(schema.shape)) {\n const defaultValue = extractDefault(field)\n entries.push({ name: key, description: (field as any).description ?? '', defaultValue })\n }\n return entries\n}\n\n/** Extracts option entries from a Zod object schema. */\nfunction optionEntries(\n schema: z.ZodObject<any>,\n alias?: Partial<Record<string, string>> | undefined,\n) {\n const entries: {\n flag: string\n description: string\n defaultValue?: unknown\n deprecated?: boolean | undefined\n }[] = []\n for (const [key, field] of Object.entries(schema.shape)) {\n const type = resolveTypeName(field)\n const short = alias?.[key]\n const kebab = toKebab(key)\n const valueHint = type === 'boolean' ? '' : ` <${type}>`\n const flag = short ? `--${kebab}, -${short}${valueHint}` : `--${kebab}${valueHint}`\n let defaultValue = extractDefault(field)\n if (type === 'boolean' && defaultValue === false) defaultValue = undefined\n const deprecated = extractDeprecated(field)\n entries.push({ flag, description: (field as any).description ?? '', defaultValue, deprecated })\n }\n return entries\n}\n\n/** Resolves a human-readable type name from a Zod schema. */\nfunction resolveTypeName(schema: unknown): string {\n if (isCountSchema(schema)) return 'count'\n const unwrapped = unwrap(schema)\n if (unwrapped instanceof z.ZodString) return 'string'\n if (unwrapped instanceof z.ZodNumber) return 'number'\n if (unwrapped instanceof z.ZodBoolean) return 'boolean'\n if (unwrapped instanceof z.ZodArray) return 'array'\n if (unwrapped instanceof z.ZodEnum) {\n const values = Object.values((unwrapped as any)._zod.def.entries) as string[]\n return values.join('|')\n }\n if (unwrapped instanceof z.ZodUnion) {\n const options = (unwrapped as any)._zod?.def?.options as z.ZodType[] | undefined\n if (options?.every((o: z.ZodType) => o instanceof z.ZodLiteral)) {\n const values = options.map((o: z.ZodType) => String((o as any)._zod.def.values[0]))\n return values.join('|')\n }\n }\n return 'value'\n}\n\n/** Checks if a schema is a count type (`.meta({ count: true })`). */\nfunction isCountSchema(schema: unknown): boolean {\n const s = schema as any\n return typeof s?.meta === 'function' && s.meta()?.count === true\n}\n\n/** Unwraps optional/default/nullable wrappers to get the inner type. */\nfunction unwrap(schema: unknown): unknown {\n if (schema instanceof z.ZodOptional) return unwrap(schema.unwrap())\n if (schema instanceof z.ZodDefault) return unwrap(schema.removeDefault())\n if (schema instanceof z.ZodNullable) return unwrap(schema.unwrap())\n return schema\n}\n\n/** Extracts the default value from a Zod schema, if any. */\nfunction extractDefault(schema: unknown): unknown {\n if (schema instanceof z.ZodDefault) {\n const raw = schema._def.defaultValue\n const value = typeof raw === 'function' ? raw() : raw\n if (Array.isArray(value) && value.length === 0) return undefined\n return value\n }\n if (schema instanceof z.ZodOptional) return extractDefault(schema.unwrap())\n return undefined\n}\n\n/** Reads the `deprecated` flag from a Zod schema's `.meta()`. */\nfunction extractDeprecated(schema: unknown): boolean | undefined {\n const meta = (schema as any)?.meta?.()\n return meta?.deprecated === true ? true : undefined\n}\n\n/** Renders the built-in commands and global options block. Root-only items are hidden for subcommands. */\nfunction globalOptionsLines(\n root = false,\n configFlag?: string,\n globals?: GlobalsDescriptor,\n): string[] {\n const lines: string[] = []\n\n if (root) {\n const builtins = builtinCommands.flatMap((b) => {\n if (!b.subcommands) return [{ name: b.name, desc: b.description }]\n if (b.subcommands.length === 1)\n return [\n { name: `${b.name} ${b.subcommands[0]!.name}`, desc: b.subcommands[0]!.description },\n ]\n const names = b.subcommands.map((s) => s.name).join(', ')\n return [{ name: b.name, desc: `${b.description} (${names})` }]\n })\n const maxCmd = Math.max(...builtins.map((b) => b.name.length))\n lines.push(\n '',\n 'Integrations:',\n ...builtins.map((b) => ` ${b.name}${' '.repeat(maxCmd - b.name.length)} ${b.desc}`),\n )\n }\n\n if (globals) {\n const entries = optionEntries(globals.schema, globals.alias)\n if (entries.length > 0) {\n const maxLen = Math.max(...entries.map((e) => e.flag.length))\n lines.push(\n '',\n 'Custom Global Options:',\n ...entries.map((entry) => {\n const padding = ' '.repeat(maxLen - entry.flag.length)\n const prefix = entry.deprecated ? '[deprecated] ' : ''\n const desc =\n entry.defaultValue !== undefined\n ? `${prefix}${entry.description} (default: ${entry.defaultValue})`\n : `${prefix}${entry.description}`\n return ` ${entry.flag}${padding} ${desc}`\n }),\n )\n }\n }\n\n const flags = [\n ...(configFlag\n ? [{ flag: `--${configFlag} <path>`, desc: 'Load JSON option defaults from a file' }]\n : []),\n {\n flag: '--filter-output <keys>',\n desc: 'Filter output by key paths (e.g. foo,bar.baz,a[0,3])',\n },\n { flag: '--format <toon|json|yaml|md|jsonl>', desc: 'Output format' },\n { flag: '--help', desc: 'Show help' },\n { flag: '--llms, --llms-full', desc: 'Print LLM-readable manifest' },\n ...(root ? [{ flag: '--mcp', desc: 'Start as MCP stdio server' }] : []),\n ...(configFlag\n ? [{ flag: `--no-${configFlag}`, desc: 'Disable JSON option defaults for this run' }]\n : []),\n { flag: '--schema', desc: 'Show JSON Schema for command' },\n { flag: '--token-count', desc: 'Print token count of output (instead of output)' },\n { flag: '--token-limit <n>', desc: 'Limit output to n tokens' },\n { flag: '--token-offset <n>', desc: 'Skip first n tokens of output' },\n { flag: '--full-output', desc: 'Show full output envelope' },\n ...(root ? [{ flag: '--version', desc: 'Show version' }] : []),\n ].sort((a, b) => a.flag.localeCompare(b.flag))\n const maxLen = Math.max(...flags.map((f) => f.flag.length))\n lines.push(\n '',\n 'Global Options:',\n ...flags.map((f) => ` ${f.flag}${' '.repeat(maxLen - f.flag.length)} ${f.desc}`),\n )\n\n return lines\n}\n\n/** Redacts a value, showing only the last 4 characters for long values. */\nfunction redact(value: string): string {\n if (value.length <= 4) return '****'\n return `****${value.slice(-4)}`\n}\n","/** @internal A CTA block before command names are expanded. */\nexport type CtaBlock = {\n commands: unknown[]\n description?: string | undefined\n}\n\n/** @internal A formatted CTA block as it appears in output metadata. */\nexport type FormattedCtaBlock = {\n /** Formatted command suggestions. */\n commands: FormattedCta[]\n /** Human-readable label for the CTA block. */\n description: string\n}\n\n/** @internal A formatted CTA as it appears in output metadata. */\nexport type FormattedCta = {\n /** The full command string with args and options folded in. */\n command: string\n /** A short description of what the command does. */\n description?: string | undefined\n}\n\ntype Cta =\n | string\n | {\n args?: Record<string, unknown> | undefined\n command: string\n description?: string | undefined\n options?: Record<string, unknown> | undefined\n }\n\n/** @internal Formats a CTA block into the output metadata shape. */\nexport function formatCtaBlock(\n name: string,\n block: CtaBlock | undefined,\n): FormattedCtaBlock | undefined {\n if (!block || block.commands.length === 0) return undefined\n return {\n description:\n block.description ??\n (block.commands.length === 1 ? 'Suggested command:' : 'Suggested commands:'),\n commands: block.commands.map((c) => formatCta(name, c as Cta)),\n }\n}\n\n/** @internal Formats a CTA by prefixing the CLI name. */\nfunction formatCta(name: string, cta: Cta): FormattedCta {\n if (typeof cta === 'string') return { command: `${name} ${cta}` }\n const prefix = cta.command === name || cta.command.startsWith(`${name} `) ? '' : `${name} `\n let cmd = `${prefix}${cta.command}`\n if (cta.args)\n for (const [key, value] of Object.entries(cta.args))\n cmd += value === true ? ` <${key}>` : ` ${value}`\n if (cta.options)\n for (const [key, value] of Object.entries(cta.options))\n cmd += value === true ? ` --${key} <${key}>` : ` --${key} ${value}`\n return { command: cmd, ...(cta.description ? { description: cta.description } : undefined) }\n}\n","/** Detects the package manager runner (`npx`, `pnpx`, `bunx`) from the current process environment. */\nexport function detectRunner(): string {\n const userAgent = process.env.npm_config_user_agent ?? ''\n const execPath = process.env.npm_execpath ?? ''\n if (userAgent.includes('pnpm') || execPath.includes('pnpm')) return 'pnpx'\n if (userAgent.includes('bun') || execPath.includes('bun')) return 'bunx'\n return 'npx'\n}\n","import { z } from 'zod'\n\n/**\n * Converts a Zod schema to a JSON Schema object. Strips the `$schema`\n * meta-property. Represents bigints and dates as `{ type: \"string\" }`\n * since JSON lacks native types for them.\n */\nexport function toJsonSchema(schema: z.ZodType): Record<string, unknown> {\n const result = z.toJSONSchema(schema, {\n unrepresentable: 'any',\n override: (ctx) => {\n const type = ctx.zodSchema._zod?.def?.type\n if (type === 'bigint' || type === 'date') ctx.jsonSchema.type = 'string'\n },\n }) as Record<string, unknown>\n delete result.$schema\n return result\n}\n","import type { Transport } from '@modelcontextprotocol/server'\nimport type { Readable, Writable } from 'node:stream'\nimport { z } from 'zod'\n\nimport * as Command from './internal/command.js'\nimport { formatCtaBlock, type FormattedCtaBlock } from './internal/cta.js'\nimport * as Json from './internal/json.js'\nimport type { Handler as MiddlewareHandler } from './middleware.js'\nimport * as Schema from './Schema.js'\n\n/** Starts a stdio MCP server that exposes commands as tools. */\nexport async function serve(\n name: string,\n version: string,\n commands: Map<string, any>,\n options: serve.Options = {},\n): Promise<void> {\n // Lazy: only runs when actually serving MCP, so plain command runs don't pay for the SDK import.\n const stdio = importStdioModule()\n const mcp = await import('@modelcontextprotocol/server')\n const { fromJsonSchema, McpServer } = mcp\n const StdioServerTransport = await importStdioServerTransport(mcp, stdio)\n\n const server = new McpServer(\n { name, version },\n options.instructions ? { instructions: options.instructions } : undefined,\n )\n\n for (const tool of collectTools(commands, [])) {\n const mergedShape: Record<string, any> = {\n ...tool.command.args?.shape,\n ...tool.command.options?.shape,\n }\n const hasInput = Object.keys(mergedShape).length > 0\n\n server.registerTool(\n tool.name,\n {\n ...(tool.description ? { description: tool.description } : undefined),\n ...(hasInput ? { inputSchema: z.object(mergedShape) } : undefined),\n ...(tool.outputSchema ? { outputSchema: fromJsonSchema(tool.outputSchema) } : undefined),\n ...(tool.annotations ? { annotations: tool.annotations } : undefined),\n ...(tool.instructions ? { _meta: { instructions: tool.instructions } } : undefined),\n } as never,\n async (...callArgs: any[]) => {\n // registerTool passes (args, extra) when inputSchema is set, (extra) when not\n const params = hasInput ? (callArgs[0] as Record<string, unknown>) : {}\n const extra = hasInput ? callArgs[1] : callArgs[0]\n return callTool(tool, params, {\n extra,\n sendNotification: (n) => server.server.notification(n),\n name,\n version,\n middlewares: options.middlewares,\n env: options.env,\n vars: options.vars,\n })\n },\n )\n }\n\n const input = options.input ?? process.stdin\n const output = options.output ?? process.stdout\n const transport = new StdioServerTransport(input as any, output as any)\n await server.connect(transport)\n}\n\ntype StdioServerTransport = new (\n input?: Readable,\n output?: Writable,\n options?: { maxBufferSize?: number | undefined },\n) => Transport\n\ntype StdioModule = {\n StdioServerTransport: StdioServerTransport\n}\n\ntype StdioImportResult =\n | { module: unknown; error?: undefined }\n | { module?: undefined; error: unknown }\n\nasync function importStdioServerTransport(\n mcp: unknown,\n stdio: Promise<StdioImportResult>,\n): Promise<StdioServerTransport> {\n const transport = (mcp as Partial<StdioModule>).StdioServerTransport\n if (transport) return transport\n\n const result = await stdio\n if (result.error) throw result.error\n return (result.module as StdioModule).StdioServerTransport\n}\n\nfunction importStdioModule(): Promise<StdioImportResult> {\n return importModule('@modelcontextprotocol/server/stdio')\n .then((module) => ({ module }))\n .catch((error: unknown) => ({ error }))\n}\n\nconst importModule = (specifier: string): Promise<unknown> => import(specifier)\n\nexport declare namespace serve {\n /** Options for the MCP server. */\n type Options = {\n /** CLI-level env schema. */\n env?: z.ZodObject<any> | undefined\n /** Override input stream. Defaults to `process.stdin`. */\n input?: Readable | undefined\n /** Middleware handlers registered on the root CLI. */\n middlewares?: MiddlewareHandler[] | undefined\n /** Override output stream. Defaults to `process.stdout`. */\n output?: Writable | undefined\n /** Vars schema for middleware variables. */\n vars?: z.ZodObject<any> | undefined\n /** CLI version string. */\n version?: string | undefined\n /** Instructions describing how to use the server and its features. */\n instructions?: string | undefined\n }\n}\n\n/** @internal Executes a tool call and returns a CallToolResult. */\nexport async function callTool(\n tool: ToolEntry,\n params: Record<string, unknown>,\n options: {\n extra?: {\n mcpReq?: { _meta?: { progressToken?: string | number } }\n }\n sendNotification?: (n: ProgressNotification) => Promise<void>\n name?: string | undefined\n version?: string | undefined\n middlewares?: MiddlewareHandler[] | undefined\n env?: z.ZodObject<any> | undefined\n vars?: z.ZodObject<any> | undefined\n } = {},\n): Promise<{\n content: { type: 'text'; text: string }[]\n structuredContent?: Record<string, unknown>\n _meta?: { cta: FormattedCtaBlock } | undefined\n isError?: boolean\n}> {\n const allMiddleware = [\n ...(options.middlewares ?? []),\n ...((tool.middlewares as MiddlewareHandler[] | undefined) ?? []),\n ...((tool.command.middleware as MiddlewareHandler[] | undefined) ?? []),\n ]\n\n const result = await Command.execute(tool.command, {\n agent: true,\n argv: [],\n env: options.env,\n format: 'json',\n formatExplicit: true,\n inputOptions: params,\n middlewares: allMiddleware,\n name: options.name ?? tool.name,\n parseMode: 'flat',\n path: tool.name,\n vars: options.vars,\n version: options.version,\n })\n\n if ('stream' in result) {\n // Streaming: send progress notifications per chunk, then return buffered result\n const chunks: unknown[] = []\n const progressToken = options.extra?.mcpReq?._meta?.progressToken\n let i = 0\n try {\n for await (const chunk of result.stream) {\n chunks.push(chunk)\n if (progressToken !== undefined && options.sendNotification)\n await options.sendNotification({\n method: 'notifications/progress' as const,\n params: { progressToken, progress: ++i, message: Json.stringify(chunk) },\n })\n }\n } catch (err) {\n return {\n content: [{ type: 'text', text: err instanceof Error ? err.message : String(err) }],\n isError: true,\n }\n }\n return { content: [{ type: 'text', text: Json.stringify(chunks) }] }\n }\n\n if (!result.ok)\n return {\n content: [\n {\n type: 'text',\n text: result.error.fieldErrors\n ? JSON.stringify(result.error)\n : (result.error.message ?? 'Command failed'),\n },\n ],\n isError: true,\n }\n\n const data = result.data ?? null\n const jsonData = Json.normalize(data)\n const cta = formatCtaBlock(options.name ?? tool.name, result.cta as Command.CtaBlock | undefined)\n return {\n content: [{ type: 'text', text: Json.stringify(jsonData) }],\n ...(data !== null && tool.outputSchema\n ? { structuredContent: jsonData as Record<string, unknown> }\n : undefined),\n ...(cta ? { _meta: { cta } } : undefined),\n }\n}\n\n/** @internal A progress notification sent during streaming tool calls. */\ntype ProgressNotification = {\n method: 'notifications/progress'\n params: { progressToken: string | number; progress: number; message: string }\n}\n\n/** @internal A resolved tool entry from the command tree. */\nexport type ToolEntry = {\n name: string\n description?: string | undefined\n inputSchema: { type: 'object'; properties: Record<string, unknown>; required?: string[] }\n outputSchema?: Record<string, unknown> | undefined\n annotations?: ToolAnnotations | undefined\n instructions?: string | undefined\n command: any\n middlewares?: MiddlewareHandler[] | undefined\n}\n\n/** MCP tool annotations that describe tool behavior to clients. */\nexport type ToolAnnotations = {\n /** A human-readable title for the tool. */\n title?: string | undefined\n /** If true, the tool does not modify its environment. Default: false. */\n readOnlyHint?: boolean | undefined\n /** If true, the tool may perform destructive updates to its environment. Meaningful only when readOnlyHint is false. Default: true. */\n destructiveHint?: boolean | undefined\n /** If true, calling the tool repeatedly with the same arguments has no additional effect. Meaningful only when readOnlyHint is false. Default: false. */\n idempotentHint?: boolean | undefined\n /** If true, the tool may interact with an open world of external entities. Default: true. */\n openWorldHint?: boolean | undefined\n}\n\n/** @internal Recursively collects leaf commands as tool entries. */\nexport function collectTools(\n commands: Map<string, any>,\n prefix: string[],\n parentMiddlewares: MiddlewareHandler[] = [],\n): ToolEntry[] {\n const result: ToolEntry[] = []\n for (const [name, entry] of commands) {\n if ('_alias' in entry) continue\n const path = [...prefix, name]\n if ('_group' in entry && entry._group) {\n const groupMw = [\n ...parentMiddlewares,\n ...((entry.middlewares as MiddlewareHandler[] | undefined) ?? []),\n ]\n result.push(...collectTools(entry.commands, path, groupMw))\n } else {\n const outputSchema = entry.output ? mcpOutputSchema(entry.output) : undefined\n result.push({\n name: entry.mcp?.name ?? path.join('_'),\n description: entry.mcp?.description ?? entry.description,\n inputSchema: buildToolSchema(entry.args, entry.options),\n ...(outputSchema ? { outputSchema } : undefined),\n ...(entry.mcp?.annotations ? { annotations: entry.mcp.annotations } : undefined),\n ...(entry.mcp?.instructions ? { instructions: entry.mcp.instructions } : undefined),\n command: entry,\n ...(parentMiddlewares.length > 0 ? { middlewares: parentMiddlewares } : undefined),\n })\n }\n }\n assertUniqueToolNames(result)\n return result.sort((a, b) => a.name.localeCompare(b.name))\n}\n\nfunction assertUniqueToolNames(tools: ToolEntry[]) {\n const seen = new Set<string>()\n for (const tool of tools) {\n if (seen.has(tool.name)) throw new Error(`Duplicate MCP tool name: ${tool.name}`)\n seen.add(tool.name)\n }\n}\n\nfunction mcpOutputSchema(output: any): Record<string, unknown> | undefined {\n const schema = Schema.toJsonSchema(output) as Record<string, unknown>\n if (schema.type === 'object') return schema\n return undefined\n}\n\n/** @internal Builds a merged JSON Schema from args and options Zod schemas. */\nfunction buildToolSchema(\n args: any | undefined,\n options: any | undefined,\n): { type: 'object'; properties: Record<string, unknown>; required?: string[] } {\n const properties: Record<string, unknown> = {}\n const required: string[] = []\n\n for (const schema of [args, options]) {\n if (!schema) continue\n const json = Schema.toJsonSchema(schema)\n Object.assign(properties, (json.properties as Record<string, unknown>) ?? {})\n required.push(...((json.required as string[]) ?? []))\n }\n\n if (required.length > 0) return { type: 'object', properties, required }\n return { type: 'object', properties }\n}\n","/**\n * Dereferences all local `$ref` pointers in a JSON object (e.g. `{\"$ref\": \"#/components/schemas/User\"}`),\n * replacing them inline with the resolved values. Only handles local (`#/...`) references.\n *\n * Handles circular references by caching a mutable placeholder before recursing.\n *\n * Minimal reimplementation of the dereferencing behavior from `@apidevtools/json-schema-ref-parser`\n * (https://github.com/APIDevTools/json-schema-ref-parser). Only supports in-memory, local-pointer\n * resolution — no file/URL resolution, no `$id` scoping.\n */\nexport function dereference<value>(root: value): value {\n const cache = new Map<string, unknown>()\n return walk(root, root, cache) as value\n}\n\nfunction walk(node: unknown, root: unknown, cache: Map<string, unknown>): unknown {\n if (Array.isArray(node)) return node.map((item) => walk(item, root, cache))\n\n if (typeof node !== 'object' || node === null) return node\n\n const obj = node as Record<string, unknown>\n\n // Resolve $ref pointer\n if (typeof obj.$ref === 'string' && obj.$ref.startsWith('#')) {\n const ref = obj.$ref\n if (cache.has(ref)) return cache.get(ref)\n\n const resolved = resolvePointer(root, ref)\n\n // Non-object targets (primitives, arrays) can't be circular — resolve directly\n if (typeof resolved !== 'object' || resolved === null || Array.isArray(resolved)) {\n const dereferenced = walk(resolved, root, cache)\n cache.set(ref, dereferenced)\n return dereferenced\n }\n\n // Use a mutable placeholder so circular refs resolve to the same object.\n // If the walked result is not a plain object (e.g. chained ref to primitive/array),\n // skip the placeholder and cache directly.\n const placeholder: Record<string, unknown> = {}\n cache.set(ref, placeholder)\n const dereferenced = walk(resolved, root, cache)\n if (typeof dereferenced !== 'object' || dereferenced === null || Array.isArray(dereferenced)) {\n cache.set(ref, dereferenced)\n return dereferenced\n }\n Object.assign(placeholder, dereferenced)\n return placeholder\n }\n\n const result: Record<string, unknown> = {}\n for (const key of Object.keys(obj)) result[key] = walk(obj[key], root, cache)\n return result\n}\n\n/** Resolves a JSON Pointer (e.g. `#/components/schemas/User`) against a root object. */\nfunction resolvePointer(root: unknown, pointer: string): unknown {\n // \"#\" or \"#/\" → root\n const fragment = pointer.slice(1)\n if (fragment === '' || fragment === '/') return root\n\n const parts = fragment\n .slice(1)\n .split('/')\n .map((p) => p.replace(/~1/g, '/').replace(/~0/g, '~'))\n\n let current: unknown = root\n for (const part of parts) {\n if (typeof current !== 'object' || current === null)\n throw new Error(`Cannot resolve $ref \"${pointer}\": path segment \"${part}\" not found`)\n current = (current as Record<string, unknown>)[part]\n if (current === undefined)\n throw new Error(`Cannot resolve $ref \"${pointer}\": \"${part}\" not found`)\n }\n return current\n}\n","import type {\n Document,\n OperationObject,\n ParameterObject,\n PathItemObject,\n} from '@scalar/openapi-types/3.2'\nimport { z } from 'zod'\n\nimport * as Cli from './Cli.js'\nimport * as Fetch from './Fetch.js'\nimport { dereference } from './internal/dereference.js'\nimport * as Schema from './Schema.js'\n\n/** A minimal OpenAPI 3.x spec shape. Accepts both hand-written specs and generated ones (e.g. from `@hono/zod-openapi`). */\nexport type OpenAPISpec = {\n components?:\n | {\n securitySchemes?: Record<string, SecurityScheme> | undefined\n }\n | undefined\n info?: Record<string, unknown> | undefined\n openapi?: string | undefined\n paths?: {} | undefined\n security?: readonly SecurityRequirement[] | undefined\n}\n\n/** OpenAPI document source accepted by fetch-backed CLI commands. */\nexport type OpenAPISource = OpenAPISpec | string | URL\n\n/** Strategy used to name commands generated from OpenAPI operations. */\nexport type Mode = 'namespace' | 'operation'\n\n/** Configuration for generating commands from an OpenAPI document. */\nexport type Config = {\n /** Command naming strategy. Defaults to `'operation'`. */\n mode?: Mode | undefined\n}\n\n/** Options for generating an OpenAPI document from an incur CLI. */\nexport type GenerateOptions = {\n /** API description. Defaults to the CLI description. */\n description?: string | undefined\n /** Server URLs to advertise in the generated document. */\n servers?: { url: string; description?: string | undefined }[] | undefined\n /** API title. Defaults to the CLI name. */\n title?: string | undefined\n /** API version. Defaults to `0.0.0`. */\n version?: string | undefined\n}\n\n/** HTTP methods generated for commands. */\ntype HttpMethod = 'delete' | 'get' | 'patch' | 'post'\n\n/** Generates an OpenAPI 3.2 document from an incur CLI's command tree. */\nexport function fromCli(cli: Cli.Cli, options: GenerateOptions = {}): Document {\n const commands = Cli.toCommands.get(cli)\n if (!commands) throw new Error('No commands registered on this CLI instance')\n\n const paths: NonNullable<Document['paths']> = {}\n const root = Cli.toRootDefinition.get(cli as unknown as Cli.Root)\n if (root) addCommand(paths, [], root)\n for (const [name, entry] of commands) addEntry(paths, splitCommandName(name), entry)\n\n return {\n openapi: '3.2.0',\n info: {\n title: options.title ?? cli.name,\n version: options.version ?? '0.0.0',\n ...((options.description ?? cli.description)\n ? { description: options.description ?? cli.description }\n : undefined),\n },\n ...(options.servers ? { servers: options.servers } : undefined),\n paths,\n }\n}\n\n/** Internal operation shape after casting. */\ntype Operation = {\n description?: string | undefined\n operationId?: string | undefined\n parameters?: readonly Parameter[] | undefined\n requestBody?: RequestBody | undefined\n responses?: Record<string, unknown> | undefined\n security?: readonly SecurityRequirement[] | undefined\n summary?: string | undefined\n}\n\ntype Parameter = {\n description?: string | undefined\n in: 'cookie' | 'header' | 'path' | 'query'\n name: string\n required?: boolean | undefined\n schema?: Record<string, unknown> | undefined\n}\n\ntype RequestBody = {\n content?: Record<string, { schema?: Record<string, unknown> | undefined }> | undefined\n required?: boolean | undefined\n}\n\ntype SecurityRequirement = Record<string, readonly string[]>\n\ntype SecurityScheme = {\n description?: string | undefined\n in?: 'cookie' | 'header' | 'query' | undefined\n name?: string | undefined\n scheme?: string | undefined\n type?: string | undefined\n}\n\ntype HeaderParameter = Parameter & {\n optionName: string\n}\n\n/** A fetch handler. */\ntype FetchHandler = (req: Request) => Response | Promise<Response>\n\n/** A generated command entry compatible with incur's internal CommandEntry. */\ntype GeneratedCommand = {\n args?: z.ZodObject<any> | undefined\n description?: string | undefined\n options?: z.ZodObject<any> | undefined\n run: (context: any) => any\n}\n\ntype GeneratedEntry = GeneratedCommand | GeneratedGroup\n\ntype GeneratedGroup = {\n _group: true\n description?: string | undefined\n commands: Map<string, GeneratedEntry>\n}\n\ntype CommandSegment = {\n description?: string | undefined\n name: string\n}\n\ntype OperationEntry = {\n method: string\n operation: Operation\n path: string\n}\n\nfunction addEntry(paths: NonNullable<Document['paths']>, segments: string[], entry: any) {\n if ('_alias' in entry) return\n if ('_fetch' in entry) return\n if ('_group' in entry) {\n for (const [name, child] of entry.commands)\n addEntry(paths, [...segments, ...splitCommandName(name)], child)\n return\n }\n addCommand(paths, segments, entry)\n}\n\nfunction splitCommandName(name: string) {\n return name.split(/\\s+/).filter(Boolean)\n}\n\nfunction addCommand(paths: NonNullable<Document['paths']>, segments: string[], command: any) {\n const argsSchema = command.args ? Schema.toJsonSchema(command.args) : undefined\n const optionsSchema = command.options ? Schema.toJsonSchema(command.options) : undefined\n const outputSchema = command.output ? Schema.toJsonSchema(command.output) : undefined\n const args = objectProperties(argsSchema)\n const requiredArgs = new Set(requiredProperties(argsSchema))\n const method = inferMethod(segments)\n const pathVariants = createPathVariants(segments, args, requiredArgs)\n\n for (const variant of pathVariants) {\n const parameters: ParameterObject[] = []\n for (const name of variant.args) {\n const schema = args[name] ?? { type: 'string' }\n parameters.push({ name, in: 'path', required: true, schema })\n }\n if (method === 'get' || method === 'delete')\n for (const [name, schema] of Object.entries(objectProperties(optionsSchema)))\n parameters.push({\n name,\n in: 'query',\n ...(requiredProperties(optionsSchema).includes(name) ? { required: true } : undefined),\n schema,\n })\n\n const operation: OperationObject = {\n operationId: operationId(segments, method, variant.args),\n ...(command.description ? { summary: command.description } : undefined),\n ...(parameters.length ? { parameters } : undefined),\n ...requestBody(method, optionsSchema),\n responses: responses(outputSchema),\n }\n\n const item = (paths[variant.path] ?? {}) as PathItemObject\n ;(item as any)[method] = operation\n paths[variant.path] = item\n }\n}\n\nfunction createPathVariants(\n segments: string[],\n args: Record<string, Record<string, unknown>>,\n requiredArgs: Set<string>,\n) {\n const names = Object.keys(args)\n const requiredCount = names.findIndex((name) => !requiredArgs.has(name))\n const baseCount = requiredCount === -1 ? names.length : requiredCount\n const variants: { args: string[]; path: `/${string}` }[] = []\n for (let count = baseCount; count <= names.length; count++) {\n const included = names.slice(0, count)\n const suffix = included.map((name) => `{${name}}`)\n variants.push({\n args: included,\n path: `/${[...segments, ...suffix].map(encodePathSegment).join('/')}`,\n })\n }\n if (variants.length === 0)\n variants.push({ args: [], path: `/${segments.map(encodePathSegment).join('/')}` })\n return variants\n}\n\nfunction inferMethod(segments: string[]): HttpMethod {\n const text = segments.map(splitCamelCase).join(' ').toLowerCase()\n if (/\\b(delete|remove|rm|destroy|clear)\\b/.test(text)) return 'delete'\n if (/\\b(update|edit|modify|set|enable|disable|rename|patch)\\b/.test(text)) return 'patch'\n if (/\\b(get|list|show|read|search|find|status|describe|info|health|check)\\b/.test(text))\n return 'get'\n return 'post'\n}\n\nfunction splitCamelCase(value: string) {\n return value.replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n}\n\nfunction requestBody(method: HttpMethod, schema?: Record<string, unknown> | undefined) {\n if (!schema || method === 'get' || method === 'delete') return {}\n return {\n requestBody: {\n required: requiredProperties(schema).length > 0,\n content: { 'application/json': { schema } },\n },\n }\n}\n\nfunction responses(schema?: Record<string, unknown> | undefined) {\n return {\n '200': {\n description: 'Command completed successfully.',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n required: ['ok', 'data', 'meta'],\n properties: {\n ok: { const: true },\n data: schema ?? {},\n meta: metaSchema(),\n },\n },\n },\n },\n },\n '400': errorResponse('Validation error.'),\n '500': errorResponse('Command failed.'),\n }\n}\n\nfunction errorResponse(description: string) {\n return {\n description,\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n required: ['ok', 'error', 'meta'],\n properties: {\n ok: { const: false },\n error: {\n type: 'object',\n required: ['code', 'message'],\n properties: {\n code: { type: 'string' },\n message: { type: 'string' },\n retryable: { type: 'boolean' },\n },\n },\n meta: metaSchema(),\n },\n },\n },\n },\n }\n}\n\nfunction metaSchema() {\n return {\n type: 'object',\n required: ['command', 'duration'],\n properties: {\n command: { type: 'string' },\n duration: { type: 'string' },\n },\n }\n}\n\nfunction objectProperties(schema: Record<string, unknown> | undefined) {\n return (schema?.properties ?? {}) as Record<string, Record<string, unknown>>\n}\n\nfunction requiredProperties(schema: Record<string, unknown> | undefined) {\n return (schema?.required ?? []) as string[]\n}\n\nfunction operationId(segments: string[], method: HttpMethod, args: string[]) {\n const raw = [...segments, ...(args.length ? [args.join(' ')] : [])].join(' ')\n const pascal = raw.replace(/(?:^|[\\s_-]+)(\\w)/g, (_, char: string) => char.toUpperCase())\n return `${method}${pascal}`\n}\n\nfunction encodePathSegment(segment: string) {\n if (segment.startsWith('{') && segment.endsWith('}')) return segment\n return encodeURIComponent(segment)\n}\n\n/** Resolves an OpenAPI document from a JSON object or JSON URL. */\nexport async function resolve(\n source: OpenAPISource,\n options: resolve.Options = {},\n): Promise<OpenAPISpec> {\n if (typeof source !== 'string' && !(source instanceof URL)) return source\n\n const response = await fetch(resolveUrl(source, options.baseUrl))\n if (!response.ok)\n throw new Error(`Failed to fetch OpenAPI spec from ${source}: ${response.status}`)\n return (await response.json()) as OpenAPISpec\n}\n\nexport declare namespace resolve {\n /** Options for resolving an OpenAPI document source. */\n type Options = {\n /** Base URL used to resolve relative OpenAPI document paths. */\n baseUrl?: string | URL | undefined\n }\n}\n\nfunction resolveUrl(source: string | URL, baseUrl: string | URL | undefined) {\n if (source instanceof URL) return source\n\n try {\n return new URL(source)\n } catch {\n if (baseUrl === undefined)\n throw new Error(`Relative OpenAPI spec URL requires a fetch URL base: ${source}`)\n const base = new URL(baseUrl)\n if (!base.pathname.endsWith('/')) base.pathname = `${base.pathname}/`\n return new URL(source, base)\n }\n}\n\n/** Generates incur command entries from an OpenAPI spec. Resolves all `$ref` pointers. */\nexport async function generateCommands(\n spec: OpenAPISpec,\n fetch: FetchHandler,\n options: generateCommands.Options = {},\n): Promise<Map<string, GeneratedEntry>> {\n const resolved = dereference(structuredClone(spec)) as OpenAPISpec\n const commands = new Map<string, GeneratedEntry>()\n const paths = (resolved.paths ?? {}) as Record<string, Record<string, unknown>>\n const operations = openapiOperations(paths)\n const namespaceInfo = getNamespaceInfo(operations)\n const { config } = options\n\n for (const { method, operation: op, path } of operations) {\n const segments = commandSegments({\n method,\n mode: config?.mode ?? 'operation',\n namespaceInfo,\n operation: op,\n path,\n })\n const httpMethod = method.toUpperCase()\n\n const pathParams = (op.parameters ?? []).filter((p) => p.in === 'path')\n const queryParams = (op.parameters ?? []).filter((p) => p.in === 'query')\n const headerParams = headerOptions([\n ...(op.parameters ?? []).filter((p) => p.in === 'header'),\n ...securityHeaderParams(resolved, op),\n ])\n\n const bodySchema = op.requestBody?.content?.['application/json']?.schema\n const bodyProps = (bodySchema?.properties ?? {}) as Record<string, Record<string, unknown>>\n const bodyRequired = new Set((bodySchema?.required as string[]) ?? [])\n\n // Build args Zod schema from path params\n let argsSchema: z.ZodObject<any> | undefined\n if (pathParams.length > 0) {\n const shape: Record<string, z.ZodType> = {}\n for (const p of pathParams) {\n let zodType = p.schema ? toZod(p.schema) : z.string()\n if (p.description) zodType = zodType.describe(p.description)\n // Path params need coercion from string argv\n shape[p.name] = coerceIfNeeded(zodType)\n }\n argsSchema = z.object(shape)\n }\n\n // Build options Zod schema from query params + body properties\n const optShape: Record<string, z.ZodType> = {}\n const usedOptionNames = new Set<string>()\n for (const p of queryParams) {\n let zodType = p.schema ? toZod(p.schema) : z.string()\n if (!p.required) zodType = zodType.optional()\n if (p.description) zodType = zodType.describe(p.description)\n optShape[p.name] = coerceIfNeeded(zodType)\n usedOptionNames.add(p.name)\n }\n for (const [key, schema] of Object.entries(bodyProps)) {\n let zodType = toZod(schema)\n if (!bodyRequired.has(key)) zodType = zodType.optional()\n optShape[key] = coerceIfNeeded(zodType)\n usedOptionNames.add(key)\n }\n for (const p of headerParams) {\n const optionName = resolveHeaderOptionName(p.optionName, usedOptionNames)\n p.optionName = optionName\n let zodType = p.schema ? toZod(p.schema) : z.string()\n if (!p.required) zodType = zodType.optional()\n zodType = zodType.describe(p.description ?? `${p.name} header`)\n optShape[optionName] = coerceIfNeeded(zodType)\n usedOptionNames.add(optionName)\n }\n const optionsSchema = Object.keys(optShape).length > 0 ? z.object(optShape) : undefined\n\n setCommand(commands, segments, {\n description: op.summary ?? op.description,\n args: argsSchema,\n options: optionsSchema,\n run: createHandler({\n basePath: options.basePath,\n fetch,\n httpMethod,\n path,\n headerParams,\n pathParams,\n queryParams,\n bodyProps,\n }),\n })\n }\n\n return commands\n}\n\nexport declare namespace generateCommands {\n /** Options for generating incur commands from an OpenAPI spec. */\n type Options = {\n /** Base path prepended to generated request paths. */\n basePath?: string | undefined\n /** Configuration for generated OpenAPI commands. */\n config?: Config | undefined\n }\n}\n\nconst openapiMethods = new Set([\n 'delete',\n 'get',\n 'head',\n 'options',\n 'patch',\n 'post',\n 'put',\n 'trace',\n])\n\nfunction openapiOperations(paths: Record<string, Record<string, unknown>>) {\n const operations: OperationEntry[] = []\n for (const [path, methods] of Object.entries(paths))\n for (const [method, operation] of Object.entries(methods))\n if (openapiMethods.has(method))\n operations.push({ method, operation: operation as Operation, path })\n return operations\n}\n\nfunction securityHeaderParams(spec: OpenAPISpec, operation: Operation): Parameter[] {\n const schemes = spec.components?.securitySchemes ?? {}\n const requirements = operation.security ?? spec.security ?? []\n const headers: Parameter[] = []\n\n for (const requirement of requirements)\n for (const name of Object.keys(requirement)) {\n const scheme = schemes[name]\n const parameter = securityHeaderParam(name, scheme)\n if (parameter) headers.push(parameter)\n }\n\n return headers\n}\n\nfunction securityHeaderParam(\n name: string,\n scheme: SecurityScheme | undefined,\n): Parameter | undefined {\n if (!scheme) return undefined\n // `apiKey` is OpenAPI's generic name for a credential carried in a\n // header/query/cookie, not an incur- or Cadent-specific API key concept.\n if (scheme.type === 'apiKey' && scheme.in === 'header' && scheme.name)\n return {\n description: scheme.description ?? `${scheme.name} header`,\n in: 'header',\n name: scheme.name,\n required: false,\n schema: { type: 'string' },\n }\n\n if (scheme.type === 'http' && authorizationSchemes.has(scheme.scheme?.toLowerCase() ?? ''))\n return {\n description: scheme.description ?? `${name} authorization header`,\n in: 'header',\n name: 'authorization',\n required: false,\n schema: { type: 'string' },\n }\n\n return undefined\n}\n\nconst authorizationSchemes = new Set(['basic', 'bearer'])\n\nfunction headerOptions(parameters: Parameter[]): HeaderParameter[] {\n const seen = new Set<string>()\n const headers: HeaderParameter[] = []\n\n for (const parameter of parameters) {\n const normalized = parameter.name.toLowerCase()\n if (seen.has(normalized)) continue\n seen.add(normalized)\n headers.push({ ...parameter, optionName: normalized })\n }\n\n return headers\n}\n\nfunction resolveHeaderOptionName(optionName: string, used: Set<string>) {\n if (!used.has(optionName)) return optionName\n\n const prefix = `header-${optionName}`\n if (!used.has(prefix)) return prefix\n\n for (let index = 2; ; index++) {\n const candidate = `${prefix}-${index}`\n if (!used.has(candidate)) return candidate\n }\n}\n\nfunction getNamespaceInfo(operations: OperationEntry[]) {\n const pathOperations = new Map<string, number>()\n const parentPaths = new Set<string>()\n\n for (const { path } of operations) {\n pathOperations.set(path, (pathOperations.get(path) ?? 0) + 1)\n\n const segments = namespaceNames(path)\n for (let i = 1; i < segments.length; i++) parentPaths.add(`/${segments.slice(0, i).join('/')}`)\n }\n\n return { parentPaths, pathOperations }\n}\n\nfunction commandSegments(options: commandSegments.Options): CommandSegment[] {\n const { method, mode, namespaceInfo, operation, path } = options\n if (mode === 'operation')\n return [{ name: operation.operationId ?? `${method}_${path.replace(/[/{}]/g, '_')}` }]\n\n const segments = namespaceSegments(path, operation)\n const needsMethod =\n segments.length === 0 ||\n namespaceInfo.parentPaths.has(namespacePath(path)) ||\n (namespaceInfo.pathOperations.get(path) ?? 0) > 1\n const describedSegments = describeNamespaceLeaf(\n segments,\n operation.summary ?? operation.description,\n )\n return [\n ...(describedSegments.length > 0 ? describedSegments : [{ name: 'root' }]),\n ...(needsMethod ? [{ name: method }] : []),\n ]\n}\n\ndeclare namespace commandSegments {\n type Options = {\n method: string\n mode: Mode\n namespaceInfo: {\n parentPaths: Set<string>\n pathOperations: Map<string, number>\n }\n operation: Operation\n path: string\n }\n}\n\nfunction namespaceSegments(path: string, operation?: Operation | undefined): CommandSegment[] {\n return path\n .split('/')\n .map((segment) => namespaceSegment(segment, operation))\n .filter(isCommandSegment)\n}\n\nfunction namespaceNames(path: string) {\n return namespaceSegments(path).map((segment) => segment.name)\n}\n\nfunction namespacePath(path: string) {\n return `/${namespaceNames(path).join('/')}`\n}\n\nfunction namespaceSegment(\n segment: string,\n operation?: Operation | undefined,\n): CommandSegment | undefined {\n if (!segment) return undefined\n const name = segment.startsWith('{') && segment.endsWith('}') ? segment.slice(1, -1) : segment\n const description = operation?.parameters?.find(\n (parameter) => parameter.in === 'path' && parameter.name === name,\n )?.description\n return {\n ...(description ? { description } : undefined),\n name: name.replace(/[^\\w.-]+/g, '-'),\n }\n}\n\nfunction isCommandSegment(segment: CommandSegment | undefined): segment is CommandSegment {\n return segment !== undefined\n}\n\nfunction describeNamespaceLeaf(\n segments: CommandSegment[],\n description: string | undefined,\n): CommandSegment[] {\n if (!description || segments.length === 0) return segments\n return segments.map((segment, index) =>\n index === segments.length - 1 && !segment.description ? { ...segment, description } : segment,\n )\n}\n\nfunction setCommand(\n commands: Map<string, GeneratedEntry>,\n segments: CommandSegment[],\n command: GeneratedCommand,\n) {\n const [head, ...tail] = segments\n if (!head) return\n if (tail.length === 0) {\n commands.set(head.name, command)\n return\n }\n\n const group = getGroup(commands, head)\n setCommand(group.commands, tail, command)\n}\n\nfunction getGroup(commands: Map<string, GeneratedEntry>, segment: CommandSegment) {\n const existing = commands.get(segment.name)\n if (existing && '_group' in existing) {\n if (!existing.description && segment.description) existing.description = segment.description\n return existing\n }\n\n const group: GeneratedGroup = {\n _group: true,\n commands: new Map(),\n ...(segment.description ? { description: segment.description } : undefined),\n }\n commands.set(segment.name, group)\n return group\n}\n\nfunction createHandler(config: {\n basePath?: string | undefined\n bodyProps: Record<string, Record<string, unknown>>\n fetch: FetchHandler\n headerParams: HeaderParameter[]\n httpMethod: string\n path: string\n pathParams: Parameter[]\n queryParams: Parameter[]\n}) {\n return async (context: any) => {\n const { args = {}, options = {} } = context\n\n // Build URL path with interpolated path params\n let urlPath = (config.basePath ?? '') + config.path\n for (const p of config.pathParams) {\n const value = args[p.name]\n if (value !== undefined) urlPath = urlPath.replace(`{${p.name}}`, String(value))\n }\n\n // Build query string from query params\n const query = new URLSearchParams()\n for (const p of config.queryParams) {\n const value = options[p.name]\n if (value !== undefined) query.set(p.name, String(value))\n }\n\n // Build body from body properties\n let body: string | undefined\n const bodyKeys = Object.keys(config.bodyProps)\n if (bodyKeys.length > 0) {\n const bodyObj: Record<string, unknown> = {}\n for (const key of bodyKeys) if (options[key] !== undefined) bodyObj[key] = options[key]\n if (Object.keys(bodyObj).length > 0) body = JSON.stringify(bodyObj)\n }\n\n const input: Fetch.FetchInput = {\n path: urlPath,\n method: config.httpMethod,\n headers: new Headers(),\n body,\n query,\n }\n\n for (const p of config.headerParams) {\n const value = options[p.optionName]\n if (value !== undefined) input.headers.set(p.name, String(value))\n }\n\n if (body && !input.headers.has('content-type'))\n input.headers.set('content-type', 'application/json')\n\n const request = Fetch.buildRequest(input)\n const response = await config.fetch(request)\n const output = await Fetch.parseResponse(response)\n\n if (!output.ok)\n return context.error({\n code: `HTTP_${output.status}`,\n message:\n typeof output.data === 'object' && output.data !== null && 'message' in output.data\n ? String((output.data as any).message)\n : typeof output.data === 'string'\n ? output.data\n : `HTTP ${output.status}`,\n })\n\n return output.data\n }\n}\n\n/** Converts a JSON Schema object to a Zod schema. */\nfunction toZod(schema: Record<string, unknown>): z.ZodType {\n return z.fromJSONSchema(schema)\n}\n\n/** Wraps a Zod schema with coercion if the base type is number or boolean (argv is always strings). */\nfunction coerceIfNeeded(schema: z.ZodType): z.ZodType {\n const isOptional = schema instanceof z.ZodOptional\n const inner = isOptional ? schema.unwrap() : schema\n\n const coerced = (() => {\n // Direct number\n if (inner instanceof z.ZodNumber)\n return isOptional ? z.coerce.number().optional() : z.coerce.number()\n // Direct boolean\n if (inner instanceof z.ZodBoolean)\n return isOptional ? z.coerce.boolean().optional() : z.coerce.boolean()\n // Union containing number or boolean (e.g. type: [\"number\", \"null\"] from OpenAPI 3.1)\n if (inner instanceof z.ZodUnion) {\n const options = (inner as any)._zod?.def?.options as z.ZodType[] | undefined\n if (options?.some((o: z.ZodType) => o instanceof z.ZodNumber))\n return isOptional ? z.coerce.number().optional() : z.coerce.number()\n if (options?.some((o: z.ZodType) => o instanceof z.ZodBoolean))\n return isOptional ? z.coerce.boolean().optional() : z.coerce.boolean()\n }\n // No coercion needed\n return undefined\n })()\n\n if (!coerced) return schema\n const desc = (schema as any).description ?? (inner as any).description\n return desc ? coerced.describe(desc) : coerced\n}\n","import { createHash } from 'node:crypto'\nimport type { z } from 'zod'\n\nimport * as Yaml from './internal/yaml.js'\nimport * as Schema from './Schema.js'\n\n/** Information about a single command, passed to `generate()`. */\nexport type CommandInfo = {\n /** Command name (subcommand path). Omit for root commands. */\n name?: string | undefined\n description?: string | undefined\n args?: z.ZodObject<any> | undefined\n env?: z.ZodObject<any> | undefined\n hint?: string | undefined\n options?: z.ZodObject<any> | undefined\n output?: z.ZodType | undefined\n examples?: { command: string; description?: string }[] | undefined\n}\n\n/** A skill file entry with its directory name and content. */\nexport type File = {\n /** Directory name relative to output root (empty string for depth 0). */\n dir: string\n /** Markdown content. */\n content: string\n}\n\n/** Generates a compact Markdown command index for `--llms`. */\nexport function index(\n name: string,\n commands: CommandInfo[],\n description?: string | undefined,\n): string {\n const lines: string[] = [`# ${name}`]\n if (description) lines.push('', description)\n lines.push('')\n lines.push('| Command | Description |')\n lines.push('|---------|-------------|')\n for (const cmd of commands) {\n const signature = buildSignature(name, cmd)\n const desc = cmd.description ?? ''\n lines.push(`| \\`${signature}\\` | ${desc} |`)\n }\n lines.push(\n '',\n `Run \\`${name} --llms-full\\` for full manifest. Run \\`${name} <command> --schema\\` for argument details.`,\n )\n return lines.join('\\n')\n}\n\n/** @internal Builds a command signature with arg placeholders. */\nfunction buildSignature(cli: string, cmd: CommandInfo): string {\n const base = !cmd.name ? cli : `${cli} ${cmd.name}`\n if (!cmd.args) return base\n const shape = cmd.args.shape as Record<string, z.ZodType>\n const json = Schema.toJsonSchema(cmd.args)\n const required = new Set((json.required as string[] | undefined) ?? [])\n const argNames = Object.keys(shape).map((k) => (required.has(k) ? `<${k}>` : `[${k}]`))\n return `${base} ${argNames.join(' ')}`\n}\n\n/** Generates a Markdown skill file from a CLI name and collected command data. */\nexport function generate(\n name: string,\n commands: CommandInfo[],\n groups: Map<string, string> = new Map(),\n): string {\n const hasGroups = groups.size > 0\n if (!hasGroups) return commands.map((cmd) => renderCommandBody(name, cmd)).join('\\n\\n')\n\n const sections: string[] = [`# ${name}`]\n let lastGroup: string | undefined\n\n for (const cmd of commands) {\n const segment = !cmd.name ? '' : cmd.name.split(' ')[0]!\n if (segment !== lastGroup) {\n lastGroup = segment\n if (segment) {\n const desc = groups.get(segment)\n const heading = desc ? `## ${name} ${segment}\\n\\n${desc}` : `## ${name} ${segment}`\n sections.push(heading)\n }\n }\n sections.push(renderCommandBody(name, cmd, segment ? 3 : 2))\n }\n\n return sections.join('\\n\\n')\n}\n\n/** Splits commands into skill files grouped by depth. */\nexport function split(\n name: string,\n commands: CommandInfo[],\n depth: number,\n groups: Map<string, string> = new Map(),\n): File[] {\n if (depth === 0) return [{ dir: '', content: renderGroup(name, name, commands, groups, name) }]\n\n const buckets = new Map<string, CommandInfo[]>()\n for (const cmd of commands) {\n if (!cmd.name) {\n const key = slugify(name)\n const bucket = buckets.get(key) ?? []\n bucket.push(cmd)\n buckets.set(key, bucket)\n continue\n }\n const segments = cmd.name.split(' ')\n const key = segments.slice(0, depth).join('-')\n const bucket = buckets.get(key) ?? []\n bucket.push(cmd)\n buckets.set(key, bucket)\n }\n\n return [...buckets.entries()]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([dir, cmds]) => {\n const first = cmds[0]!\n const prefix = !first.name ? '' : first.name.split(' ').slice(0, depth).join(' ')\n const title = prefix ? `${name} ${prefix}` : name\n return { dir, content: renderGroup(name, title, cmds, groups, prefix || undefined) }\n })\n}\n\n/** @internal Renders a group-level frontmatter + command bodies. */\nfunction renderGroup(\n cli: string,\n title: string,\n cmds: CommandInfo[],\n groups: Map<string, string>,\n prefix?: string | undefined,\n): string {\n const groupDesc = prefix ? groups.get(prefix) : undefined\n const fallbackDesc = cmds.length === 1 && cmds[0]!.description ? cmds[0]!.description : undefined\n const desc = groupDesc ?? fallbackDesc\n const description = desc\n ? `${desc.replace(/\\.$/, '')}. Run \\`${title} --help\\` for usage details.`\n : `Run \\`${title} --help\\` for usage details.`\n\n const fm = Yaml.loadSync()\n .stringify(\n { name: slugify(title), description, requires_bin: cli, command: title },\n { lineWidth: 0 },\n )\n .trimEnd()\n const fmBlock = `---\\n${fm}\\n---`\n\n const body = cmds.map((cmd) => renderCommandBody(cli, cmd)).join('\\n\\n---\\n\\n')\n return `${fmBlock}\\n\\n${body}`\n}\n\n/** @internal Renders a command's heading and sections without frontmatter. */\nfunction renderCommandBody(cli: string, cmd: CommandInfo, level = 1): string {\n const fullName = !cmd.name ? cli : `${cli} ${cmd.name}`\n const sections: string[] = []\n const h = (n: number) => '#'.repeat(n)\n\n let heading = `${h(level)} ${fullName}`\n if (cmd.description) heading += `\\n\\n${cmd.description}`\n sections.push(heading)\n\n const sub = h(level + 1)\n\n // Arguments table\n if (cmd.args) {\n const shape = cmd.args.shape as Record<string, z.ZodType>\n const json = Schema.toJsonSchema(cmd.args)\n const required = new Set((json.required as string[] | undefined) ?? [])\n const properties = json.properties as Record<string, Record<string, unknown>> | undefined\n const rows = Object.entries(shape).map(([key, field]) => {\n const prop = properties?.[key]\n const type = resolveTypeName(prop)\n const req = required.has(key) ? 'yes' : 'no'\n const desc = field.description ?? ''\n return `| \\`${key}\\` | \\`${type}\\` | ${req} | ${desc} |`\n })\n sections.push(\n `${sub} Arguments\\n\\n| Name | Type | Required | Description |\\n|------|------|----------|-------------|\\n${rows.join('\\n')}`,\n )\n }\n\n // Environment Variables table\n if (cmd.env) {\n const shape = cmd.env.shape as Record<string, z.ZodType>\n const json = Schema.toJsonSchema(cmd.env)\n const required = new Set((json.required as string[] | undefined) ?? [])\n const properties = json.properties as Record<string, Record<string, unknown>> | undefined\n const rows = Object.entries(shape).map(([key, field]) => {\n const prop = properties?.[key]\n const type = resolveTypeName(prop)\n const def = prop?.default !== undefined ? String(prop.default) : ''\n const req = required.has(key) ? 'yes' : 'no'\n const desc = field.description ?? ''\n return `| \\`${key}\\` | \\`${type}\\` | ${req} | ${def ? `\\`${def}\\`` : ''} | ${desc} |`\n })\n sections.push(\n `${sub} Environment Variables\\n\\n| Name | Type | Required | Default | Description |\\n|------|------|----------|---------|-------------|\\n${rows.join('\\n')}`,\n )\n }\n\n // Options table\n if (cmd.options) {\n const shape = cmd.options.shape as Record<string, z.ZodType>\n const json = Schema.toJsonSchema(cmd.options)\n const properties = json.properties as Record<string, Record<string, unknown>> | undefined\n const rows = Object.entries(shape).map(([key, field]) => {\n const prop = properties?.[key]\n const type = resolveTypeName(prop)\n const def = prop?.default !== undefined ? String(prop.default) : ''\n const rawDesc = field.description ?? ''\n const desc = prop?.deprecated ? `**Deprecated.** ${rawDesc}` : rawDesc\n return `| \\`--${key}\\` | \\`${type}\\` | ${def ? `\\`${def}\\`` : ''} | ${desc} |`\n })\n sections.push(\n `${sub} Options\\n\\n| Flag | Type | Default | Description |\\n|------|------|---------|-------------|\\n${rows.join('\\n')}`,\n )\n }\n\n // Output table\n if (cmd.output) {\n const outputSchema = Schema.toJsonSchema(cmd.output)\n const table = schemaToTable(outputSchema)\n if (table) sections.push(`${sub} Output\\n\\n${table}`)\n else {\n const type = resolveTypeName(outputSchema)\n sections.push(`${sub} Output\\n\\nType: \\`${type}\\``)\n }\n }\n\n // Examples\n if (cmd.examples && cmd.examples.length > 0) {\n const lines = cmd.examples.map((ex) => {\n const comment = ex.description ? `# ${ex.description}\\n` : ''\n return `${comment}${cli} ${ex.command}`\n })\n sections.push(`${sub} Examples\\n\\n\\`\\`\\`sh\\n${lines.join('\\n\\n')}\\n\\`\\`\\``)\n }\n\n // Hint\n if (cmd.hint) sections.push(`> ${cmd.hint}`)\n\n return sections.join('\\n\\n')\n}\n\n/** Computes a deterministic hash of command structure for staleness detection. */\nexport function hash(commands: CommandInfo[]): string {\n const data = commands.map((cmd) => ({\n name: cmd.name,\n description: cmd.description,\n hint: cmd.hint,\n args: cmd.args ? Schema.toJsonSchema(cmd.args) : undefined,\n env: cmd.env ? Schema.toJsonSchema(cmd.env) : undefined,\n options: cmd.options ? Schema.toJsonSchema(cmd.options) : undefined,\n output: cmd.output ? Schema.toJsonSchema(cmd.output) : undefined,\n }))\n return createHash('sha256').update(JSON.stringify(data)).digest('hex').slice(0, 16)\n}\n\n/** @internal Renders a JSON Schema object as a Markdown table. Returns `undefined` for non-object schemas. */\nfunction schemaToTable(schema: Record<string, unknown>, prefix = ''): string | undefined {\n if (schema.type !== 'object') return undefined\n const properties = schema.properties as Record<string, Record<string, unknown>> | undefined\n if (!properties || Object.keys(properties).length === 0) return undefined\n const required = new Set((schema.required as string[] | undefined) ?? [])\n\n const rows: string[] = []\n for (const [key, prop] of Object.entries(properties)) {\n const name = prefix ? `${prefix}.${key}` : key\n const type = resolveTypeName(prop)\n const req = required.has(key) ? 'yes' : 'no'\n const desc = (prop.description as string) ?? ''\n rows.push(`| \\`${name}\\` | \\`${type}\\` | ${req} | ${desc} |`)\n\n // Expand nested objects inline\n if (prop.type === 'object' && prop.properties) {\n const nested = schemaToTable(prop, name)\n if (nested) {\n const lines = nested.split('\\n')\n rows.push(...lines.slice(2)) // skip header + separator\n }\n }\n\n // Expand array item objects inline\n if (prop.type === 'array' && prop.items) {\n const items = prop.items as Record<string, unknown>\n if (items.type === 'object' && items.properties) {\n const nested = schemaToTable(items, `${name}[]`)\n if (nested) {\n const lines = nested.split('\\n')\n rows.push(...lines.slice(2))\n }\n }\n }\n }\n\n return `| Field | Type | Required | Description |\\n|-------|------|----------|-------------|\\n${rows.join('\\n')}`\n}\n\n/** @internal Converts a string to a lowercase slug (e.g. `\"my-cli\"` → `\"my-cli\"`, `\"My Tool\"` → `\"my-tool\"`). */\nfunction slugify(s: string): string {\n return s\n .toLowerCase()\n .replace(/[^a-z0-9-]+/g, '-')\n .replace(/-{2,}/g, '-')\n .replace(/^-|-$/g, '')\n}\n\n/** @internal Resolves a simple type name from a JSON Schema property. */\nfunction resolveTypeName(prop: Record<string, unknown> | undefined): string {\n if (!prop) return 'unknown'\n const type = prop.type as string | undefined\n if (type) return type === 'integer' ? 'number' : type\n return 'unknown'\n}\n","import { execFile } from 'node:child_process'\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'\nimport { homedir } from 'node:os'\nimport { dirname, join } from 'node:path'\n\nimport { detectRunner } from './internal/pm.js'\n\n/** Registers the CLI as an MCP server via `npx add-mcp` and direct config writes for unsupported agents. */\nexport async function register(\n name: string,\n options: register.Options = {},\n): Promise<register.Result> {\n const runner = detectRunner()\n const command = options.command ?? defaultCommand(name, runner)\n const targetAgents = options.agents ?? []\n const ampOnly = targetAgents.length === 1 && targetAgents[0] === 'amp'\n\n const agents: string[] = []\n\n // Run add-mcp for agents it supports (skip if only targeting Amp)\n if (!ampOnly) {\n const args = [command, '--name', name, '-y']\n if (options.global !== false) args.push('-g')\n for (const agent of targetAgents.filter((a) => a !== 'amp')) args.push('-a', agent)\n\n const [cmd, ...prefix] = runner.split(' ')\n const { stdout } = await exec(cmd!, [...prefix, 'add-mcp', ...args])\n\n // Extract agent names from add-mcp output (lines like \"│ ✓ Claude Code: ~/.claude.json │\")\n agents.push(\n ...stdout\n .split('\\n')\n .filter((l) => l.includes('✓') || l.includes('✔'))\n .map((l) =>\n l\n .replace(/[│┃|]/g, '')\n .replace(/.*[✓✔]\\s*/, '')\n .replace(/:.*/, '')\n .trim(),\n )\n .filter(Boolean),\n )\n }\n\n // Register with Amp directly (add-mcp doesn't support it)\n if (targetAgents.length === 0 || targetAgents.includes('amp')) {\n const registered = registerAmp(name, command)\n if (registered) agents.push('Amp')\n }\n\n return { command, agents }\n}\n\n/** @internal Registers an MCP server in Amp's settings.json. */\nfunction registerAmp(name: string, command: string): boolean {\n const configPath = join(homedir(), '.config', 'amp', 'settings.json')\n\n let config: Record<string, any> = {}\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, 'utf-8'))\n } catch {\n return false\n }\n }\n\n const [cmd, ...args] = splitCommand(command)\n if (!cmd) return false\n\n const servers: Record<string, any> = config['amp.mcpServers'] ?? {}\n servers[name] = { command: cmd, args }\n config['amp.mcpServers'] = servers\n\n const dir = dirname(configPath)\n if (!existsSync(dir)) mkdirSync(dir, { recursive: true })\n writeFileSync(configPath, JSON.stringify(config, null, 2) + '\\n')\n\n return true\n}\n\nexport declare namespace register {\n /** Options for registering an MCP server. */\n type Options = {\n /** Target specific agents (e.g. `'claude-code'`, `'cursor'`). */\n agents?: string[] | undefined\n /** Override the command agents will run. Defaults to `<runner> <name> --mcp`. */\n command?: string | undefined\n /** Install globally. Defaults to `true`. */\n global?: boolean | undefined\n }\n\n /** Result of a register operation. */\n type Result = {\n /** Agents the server was registered with. */\n agents: string[]\n /** The command registered. */\n command: string\n }\n}\n\n/** @internal Builds the default MCP command for the current launch mode. */\nfunction defaultCommand(name: string, runner: string): string {\n return shouldUseBareCommand(name)\n ? `${name} --mcp`\n : `${runner} ${detectPackageSpecifier(name)} --mcp`\n}\n\n/** @internal Returns node_modules path details for the current entrypoint. */\nfunction nodeModulesInfo(): { entry: string; root: string } | null {\n const normalized = process.argv[1]?.replace(/\\\\/g, '/')\n const match = normalized?.match(/^(.+)\\/node_modules\\/(.+)$/)\n if (!match) return null\n return { root: match[1]!, entry: match[2]! }\n}\n\n/** @internal Uses the bare command only when the binary is expected on PATH. */\nfunction shouldUseBareCommand(name: string): boolean {\n const bin = process.argv[1]\n if (!bin) return false\n\n const info = nodeModulesInfo()\n if (info) return !info.entry.startsWith('.bin/') && !packageDependsOn(info.root, name)\n\n const file = bin.replace(/\\\\/g, '/').split('/').pop()\n return file === name || file === `${name}.cmd` || file === `${name}.ps1`\n}\n\n/** @internal Checks whether the entrypoint came from a project dependency install. */\nfunction packageDependsOn(root: string, name: string): boolean {\n try {\n const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf-8'))\n const dependencyFields = [\n pkg.dependencies,\n pkg.devDependencies,\n pkg.optionalDependencies,\n pkg.peerDependencies,\n ]\n return dependencyFields.some((dependencies) => name in (dependencies ?? {}))\n } catch {\n return false\n }\n}\n\n/** @internal Detects the package specifier used to run this CLI (handles dlx/npx URL and version installs). */\nexport function detectPackageSpecifier(name: string): string {\n const info = nodeModulesInfo()\n if (!info) return name\n\n try {\n const pkg = JSON.parse(readFileSync(join(info.root, 'package.json'), 'utf-8'))\n const deps = pkg.dependencies ?? {}\n const spec = deps[name]\n if (!spec || Object.keys(deps).length !== 1) return name\n\n if (/^https?:\\/\\//.test(spec) || spec.startsWith('file:')) return spec\n if (/^\\d/.test(spec)) return `${name}@${spec}`\n } catch {}\n\n return name\n}\n\n/** Splits a command string into tokens, respecting single and double quotes. */\nfunction splitCommand(input: string): string[] {\n const tokens: string[] = []\n let current = ''\n let quote: string | null = null\n\n for (let i = 0; i < input.length; i++) {\n const ch = input[i]!\n if (quote) {\n if (ch === quote) quote = null\n else current += ch\n } else if (ch === '\"' || ch === \"'\") {\n quote = ch\n } else if (ch === ' ') {\n if (current) tokens.push(current)\n current = ''\n } else {\n current += ch\n }\n }\n if (current) tokens.push(current)\n return tokens\n}\n\n/** Promisified execFile with stderr in error message. */\nfunction exec(cmd: string, args: string[]): Promise<{ stdout: string; stderr: string }> {\n return new Promise((resolve, reject) => {\n execFile(cmd, args, (error, stdout, stderr) => {\n if (error) {\n const msg = stderr?.trim() || stdout?.trim() || error.message\n reject(new Error(msg))\n } else resolve({ stdout, stderr })\n })\n })\n}\n","import fsSync from 'node:fs'\nimport fs from 'node:fs/promises'\nimport os from 'node:os'\nimport path from 'node:path'\n\nimport { collectSkillCommands, parseSkillFrontmatter } from './Cli.js'\nimport * as Agents from './internal/agents.js'\nimport * as Yaml from './internal/yaml.js'\nimport type * as Mcp from './Mcp.js'\nimport * as Skill from './Skill.js'\n\n/** Generates skill files from a command map and installs them natively. */\nexport async function sync(\n name: string,\n commands: Map<string, any>,\n options: sync.Options = {},\n): Promise<sync.Result> {\n const { depth = 1, description, global = true } = options\n const cwd = options.cwd ?? (global ? resolvePackageRoot() : process.cwd())\n\n // Pre-load yaml for the sync call paths below (`Skill.split`, `parseFrontmatter`).\n await Yaml.load()\n\n const groups = new Map<string, string>()\n if (description) groups.set(name, description)\n const entries = collectSkillCommands(commands, [], groups, options.rootCommand)\n const files = Skill.split(name, entries, depth, groups)\n\n const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), `incur-skills-${name}-`))\n try {\n const skills: sync.Skill[] = []\n for (const file of files) {\n const filePath = file.dir\n ? path.join(tmpDir, file.dir, 'SKILL.md')\n : path.join(tmpDir, 'SKILL.md')\n await fs.mkdir(path.dirname(filePath), { recursive: true })\n await fs.writeFile(filePath, `${file.content}\\n`)\n const meta = parseSkillFrontmatter(file.content)\n skills.push({ name: meta.name ?? (file.dir || name), description: meta.description })\n }\n\n // Include additional SKILL.md files matched by glob patterns\n if (options.include) {\n for (const pattern of options.include) {\n const globPattern = pattern === '_root' ? 'SKILL.md' : path.join(pattern, 'SKILL.md')\n for await (const match of fs.glob(globPattern, { cwd })) {\n try {\n const content = await fs.readFile(path.resolve(cwd, match), 'utf8')\n const meta = parseSkillFrontmatter(content)\n const skillName =\n pattern === '_root' ? (meta.name ?? name) : path.basename(path.dirname(match))\n const dest = path.join(tmpDir, skillName, 'SKILL.md')\n await fs.mkdir(path.dirname(dest), { recursive: true })\n await fs.writeFile(dest, content)\n if (!skills.some((s) => s.name === skillName))\n skills.push({ name: skillName, description: meta.description, external: true })\n } catch {}\n }\n }\n }\n\n const { paths, agents } = Agents.install(tmpDir, { global, cwd })\n\n // Remove stale skills from previous installs\n const currentNames = new Set(paths.map((p) => path.basename(p)))\n const prev = readMeta(name)\n if (prev?.skills) {\n for (const old of prev.skills) {\n if (currentNames.has(old)) continue\n Agents.remove(old, { global, cwd })\n }\n }\n\n // Write skills hash + names for staleness detection\n const hashEntries = collectSkillCommands(commands, [], new Map(), options.rootCommand)\n writeMeta(\n name,\n Skill.hash(hashEntries),\n [...currentNames],\n [...paths, ...agents.map((agent) => agent.path)],\n )\n\n return { skills: skills.sort((a, b) => a.name.localeCompare(b.name)), paths, agents }\n } finally {\n await fs.rm(tmpDir, { recursive: true, force: true })\n }\n}\n\nexport declare namespace sync {\n /** Options for syncing skills. */\n type Options = {\n /** Working directory for resolving `include` globs. Defaults to `process.cwd()`. */\n cwd?: string | undefined\n /** Grouping depth for skill files. Defaults to `1`. */\n depth?: number | undefined\n /** CLI description, used as the top-level group description. */\n description?: string | undefined\n /** Install globally (`~/.config/agents/skills/`) instead of project-local. Defaults to `true`. */\n global?: boolean | undefined\n /** Glob patterns for directories containing SKILL.md files to include (e.g. `\"skills/*\"`, `\"my-skill\"`). Skill name is the parent directory name. */\n include?: string[] | undefined\n /** Root command definition (when the CLI itself has a `run` handler). */\n rootCommand?:\n | {\n description?: string | undefined\n args?: any\n destructive?: boolean | undefined\n env?: any\n hint?: string | undefined\n mcp?: { annotations?: Mcp.ToolAnnotations | undefined } | undefined\n options?: any\n output?: any\n examples?: any[] | undefined\n }\n | undefined\n }\n /** Result of a sync operation. */\n type Result = {\n /** Per-agent install details (non-universal agents only). */\n agents: import('./internal/agents.js').install.AgentInstall[]\n /** Canonical install paths. */\n paths: string[]\n /** Synced skills with metadata. */\n skills: Skill[]\n }\n /** A synced skill entry. */\n type Skill = {\n /** Description extracted from the skill frontmatter. */\n description?: string | undefined\n /** Whether this skill was included from a local file (not generated from commands). */\n external?: boolean | undefined\n /** Skill directory name. */\n name: string\n }\n}\n\n/** Lists skills derived from a CLI's command map with install status. */\nexport async function list(\n name: string,\n commands: Map<string, any>,\n options: list.Options = {},\n): Promise<list.Skill[]> {\n const { depth = 1, description } = options\n const cwd = options.cwd ?? process.cwd()\n\n // Pre-load yaml for the sync call paths below (`Skill.split`, `parseFrontmatter`).\n await Yaml.load()\n\n const groups = new Map<string, string>()\n if (description) groups.set(name, description)\n const entries = collectSkillCommands(commands, [], groups, options.rootCommand)\n const files = Skill.split(name, entries, depth, groups)\n\n const skills: list.Skill[] = []\n const installed = readInstalledSkills(name, { cwd })\n\n for (const file of files) {\n const meta = parseSkillFrontmatter(file.content)\n const skillName = meta.name ?? (file.dir || name)\n skills.push({\n name: skillName,\n description: meta.description,\n installed: installed.has(skillName),\n })\n }\n\n // Include additional SKILL.md files matched by glob patterns\n if (options.include) {\n for (const pattern of options.include) {\n const globPattern = pattern === '_root' ? 'SKILL.md' : path.join(pattern, 'SKILL.md')\n for await (const match of fs.glob(globPattern, { cwd })) {\n try {\n const content = await fs.readFile(path.resolve(cwd, match), 'utf8')\n const meta = parseSkillFrontmatter(content)\n const skillName =\n pattern === '_root' ? (meta.name ?? name) : path.basename(path.dirname(match))\n if (!skills.some((s) => s.name === skillName)) {\n skills.push({\n name: skillName,\n description: meta.description,\n installed: installed.has(skillName),\n })\n }\n } catch {}\n }\n }\n }\n\n return skills.sort((a, b) => a.name.localeCompare(b.name))\n}\n\n/** Returns whether any previously synced skills are still installed on disk. */\nexport function hasInstalledSkills(\n name: string,\n options: { cwd?: string | undefined } = {},\n): boolean {\n return readInstalledSkills(name, options).size > 0\n}\n\nexport declare namespace list {\n /** Options for listing skills. */\n type Options = {\n /** Working directory for resolving `include` globs. Defaults to `process.cwd()`. */\n cwd?: string | undefined\n /** Grouping depth for skill files. Defaults to `1`. */\n depth?: number | undefined\n /** CLI description, used as the top-level group description. */\n description?: string | undefined\n /** Glob patterns for directories containing SKILL.md files to include. */\n include?: string[] | undefined\n /** Root command definition (when the CLI itself is a command). */\n rootCommand?:\n | {\n description?: string | undefined\n args?: any\n destructive?: boolean | undefined\n env?: any\n hint?: string | undefined\n mcp?: { annotations?: Mcp.ToolAnnotations | undefined } | undefined\n options?: any\n output?: any\n examples?: any[] | undefined\n }\n | undefined\n }\n /** A skill entry with install status. */\n type Skill = {\n /** Description extracted from the skill frontmatter. */\n description?: string | undefined\n /** Whether this skill is currently installed. */\n installed: boolean\n /** Skill name. */\n name: string\n }\n}\n\n/** Resolves the package root from the executing bin script (`process.argv[1]`). Walks up from the bin's directory looking for `package.json`. Falls back to `process.cwd()`. */\nfunction resolvePackageRoot(): string {\n const bin = process.argv[1]\n if (!bin) return process.cwd()\n let dir = path.dirname(\n (() => {\n try {\n // resolve symlinks for normal bin scripts\n return fsSync.realpathSync(bin)\n } catch {\n // Bun compiled binaries use a virtual `/$bunfs/` path for argv[1]\n return process.execPath\n }\n })(),\n )\n const root = path.parse(dir).root\n while (dir !== root) {\n try {\n fsSync.accessSync(path.join(dir, 'package.json'))\n return dir\n } catch {}\n dir = path.dirname(dir)\n }\n return process.cwd()\n}\n\n/** Returns the hash file path for a CLI. */\nfunction hashPath(name: string): string {\n const dir = process.env.XDG_DATA_HOME || path.join(os.homedir(), '.local', 'share')\n return path.join(dir, 'incur', `${name}.json`)\n}\n\n/** @internal Writes the skills metadata for staleness detection and cleanup. */\nfunction writeMeta(name: string, hash: string, skills: string[], paths: string[]) {\n const file = hashPath(name)\n const dir = path.dirname(file)\n if (!fsSync.existsSync(dir)) fsSync.mkdirSync(dir, { recursive: true })\n fsSync.writeFileSync(\n file,\n JSON.stringify({ hash, skills, paths, at: new Date().toISOString() }) + '\\n',\n )\n}\n\n/** @internal Reads the stored metadata for a CLI. */\nfunction readMeta(\n name: string,\n): { hash: string; paths?: string[] | undefined; skills?: string[] | undefined } | undefined {\n try {\n return JSON.parse(fsSync.readFileSync(hashPath(name), 'utf-8'))\n } catch {\n return undefined\n }\n}\n\n/** Reads the names of previously synced skills that are still installed on disk. */\nfunction readInstalledSkills(\n name: string,\n options: { cwd?: string | undefined } = {},\n): Set<string> {\n const meta = readMeta(name)\n if (!meta?.skills?.length) return new Set()\n\n if (meta.paths?.length) {\n const installed = meta.paths\n .filter((skillPath) => isInstalledSkillPath(skillPath))\n .map((skillPath) => path.basename(skillPath))\n return new Set(installed)\n }\n\n const cwd = options.cwd ?? process.cwd()\n const bases = [path.join(os.homedir(), '.agents', 'skills'), path.join(cwd, '.agents', 'skills')]\n const installed = meta.skills.filter((skill) =>\n bases.some((base) => isInstalledSkillPath(path.join(base, skill))),\n )\n return new Set(installed)\n}\n\n/** Returns whether a skill directory currently contains a skill file. */\nfunction isInstalledSkillPath(skillPath: string): boolean {\n return fsSync.existsSync(path.join(skillPath, 'SKILL.md'))\n}\n\n/** Reads the stored skills hash for a CLI. Returns `undefined` if no hash exists. */\nexport function readHash(name: string): string | undefined {\n return readMeta(name)?.hash\n}\n","import * as fs from 'node:fs'\nimport * as os from 'node:os'\nimport * as path from 'node:path'\n\n/** Agent configuration for skill installation. */\nexport type Agent = {\n /** Display name. */\n name: string\n /** Absolute path to the global skills directory. */\n globalSkillsDir: string\n /** Project-relative skills directory path. */\n projectSkillsDir: string\n /** Whether this agent uses the canonical `.agents/skills` path. */\n universal: boolean\n /** Checks if the agent is installed on the system. */\n detect(): boolean\n}\n\nconst home = os.homedir()\nconst configHome = process.env.XDG_CONFIG_HOME || path.join(home, '.config')\nconst claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || path.join(home, '.claude')\nconst codexHome = process.env.CODEX_HOME?.trim() || path.join(home, '.codex')\n\n/** All known agent definitions. */\nexport const all: Agent[] = [\n // Universal agents (project skillsDir = .agents/skills)\n {\n name: 'Amp',\n globalSkillsDir: path.join(configHome, 'agents', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(configHome, 'amp')),\n },\n {\n name: 'Cline',\n globalSkillsDir: path.join(home, '.agents', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(home, '.cline')),\n },\n {\n name: 'Codex',\n globalSkillsDir: path.join(codexHome, 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(codexHome),\n },\n {\n name: 'Cursor',\n globalSkillsDir: path.join(home, '.cursor', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(home, '.cursor')),\n },\n {\n name: 'Gemini CLI',\n globalSkillsDir: path.join(home, '.gemini', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(home, '.gemini')),\n },\n {\n name: 'GitHub Copilot',\n globalSkillsDir: path.join(home, '.copilot', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(home, '.copilot')),\n },\n {\n name: 'Kimi CLI',\n globalSkillsDir: path.join(configHome, 'agents', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(home, '.kimi')),\n },\n {\n name: 'OpenCode',\n globalSkillsDir: path.join(configHome, 'opencode', 'skills'),\n projectSkillsDir: '.agents/skills',\n universal: true,\n detect: () => fs.existsSync(path.join(configHome, 'opencode')),\n },\n\n // Non-universal agents (need symlink from their skills dir to canonical)\n {\n name: 'Claude Code',\n globalSkillsDir: path.join(claudeHome, 'skills'),\n projectSkillsDir: '.claude/skills',\n universal: false,\n detect: () => fs.existsSync(claudeHome),\n },\n {\n name: 'Windsurf',\n globalSkillsDir: path.join(home, '.codeium', 'windsurf', 'skills'),\n projectSkillsDir: '.windsurf/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.codeium', 'windsurf')),\n },\n {\n name: 'Continue',\n globalSkillsDir: path.join(home, '.continue', 'skills'),\n projectSkillsDir: '.continue/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.continue')),\n },\n {\n name: 'Roo',\n globalSkillsDir: path.join(home, '.roo', 'skills'),\n projectSkillsDir: '.roo/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.roo')),\n },\n {\n name: 'Kilo',\n globalSkillsDir: path.join(home, '.kilocode', 'skills'),\n projectSkillsDir: '.kilocode/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.kilocode')),\n },\n {\n name: 'Goose',\n globalSkillsDir: path.join(configHome, 'goose', 'skills'),\n projectSkillsDir: '.goose/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(configHome, 'goose')),\n },\n {\n name: 'Augment',\n globalSkillsDir: path.join(home, '.augment', 'skills'),\n projectSkillsDir: '.augment/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.augment')),\n },\n {\n name: 'Trae',\n globalSkillsDir: path.join(home, '.trae', 'skills'),\n projectSkillsDir: '.trae/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.trae')),\n },\n {\n name: 'Junie',\n globalSkillsDir: path.join(home, '.junie', 'skills'),\n projectSkillsDir: '.junie/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.junie')),\n },\n {\n name: 'Crush',\n globalSkillsDir: path.join(configHome, 'crush', 'skills'),\n projectSkillsDir: '.crush/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(configHome, 'crush')),\n },\n {\n name: 'Kiro CLI',\n globalSkillsDir: path.join(home, '.kiro', 'skills'),\n projectSkillsDir: '.kiro/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.kiro')),\n },\n {\n name: 'Qwen Code',\n globalSkillsDir: path.join(home, '.qwen', 'skills'),\n projectSkillsDir: '.qwen/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.qwen')),\n },\n {\n name: 'OpenHands',\n globalSkillsDir: path.join(home, '.openhands', 'skills'),\n projectSkillsDir: '.openhands/skills',\n universal: false,\n detect: () => fs.existsSync(path.join(home, '.openhands')),\n },\n]\n\n/** Detects which agents are installed on the system. */\nexport function detect(): Agent[] {\n return all.filter((a) => a.detect())\n}\n\n/**\n * Installs skill directories to the canonical location and creates symlinks for\n * detected non-universal agents.\n *\n * @param sourceDir - Directory containing skill subdirectories (each with a `SKILL.md`).\n * @param options - Installation options.\n * @returns Installed canonical paths.\n */\nexport function install(sourceDir: string, options: install.Options = {}): install.Result {\n const isGlobal = options.global !== false\n const cwd = options.cwd || process.cwd()\n const base = isGlobal ? home : cwd\n const canonicalBase = path.join(base, '.agents', 'skills')\n const detected = options.agents ?? detect()\n\n const paths: string[] = []\n const agents: install.AgentInstall[] = []\n\n for (const skill of discoverSkills(sourceDir)) {\n const canonicalDir = path.join(canonicalBase, skill.name)\n\n // Copy to canonical location\n rmForce(canonicalDir)\n fs.mkdirSync(canonicalDir, { recursive: true })\n if (skill.root)\n fs.copyFileSync(path.join(skill.dir, 'SKILL.md'), path.join(canonicalDir, 'SKILL.md'))\n else fs.cpSync(skill.dir, canonicalDir, { recursive: true })\n paths.push(canonicalDir)\n\n // Create symlinks for non-universal agents\n for (const agent of detected) {\n if (agent.universal) continue\n const agentSkillsDir = isGlobal\n ? agent.globalSkillsDir\n : path.join(cwd, agent.projectSkillsDir)\n const agentDir = path.join(agentSkillsDir, skill.name)\n\n // Skip if agent dir resolves to canonical (no symlink needed)\n if (agentDir === canonicalDir) continue\n\n try {\n rmForce(agentDir)\n fs.mkdirSync(path.dirname(agentDir), { recursive: true })\n // Resolve through any existing symlinks in parent directories\n const realLinkDir = resolveParent(path.dirname(agentDir))\n const realTarget = resolveParent(canonicalDir)\n const rel = path.relative(realLinkDir, realTarget)\n fs.symlinkSync(rel, agentDir)\n agents.push({ agent: agent.name, path: agentDir, mode: 'symlink' })\n } catch {\n // Fallback to copy if symlink fails (e.g. Windows without permissions)\n try {\n fs.cpSync(canonicalDir, agentDir, { recursive: true })\n agents.push({ agent: agent.name, path: agentDir, mode: 'copy' })\n } catch {}\n }\n }\n }\n\n return { paths, agents }\n}\n\nexport declare namespace install {\n type Options = {\n /** Override detected agents. */\n agents?: Agent[] | undefined\n /** Working directory for project-local installs. */\n cwd?: string | undefined\n /** Install globally. Defaults to `true`. */\n global?: boolean | undefined\n }\n type Result = {\n /** Canonical install paths. */\n paths: string[]\n /** Per-agent install details (non-universal agents only). */\n agents: AgentInstall[]\n }\n type AgentInstall = {\n /** Agent display name. */\n agent: string\n /** Installed path. */\n path: string\n /** Whether it was symlinked or copied. */\n mode: 'symlink' | 'copy'\n }\n}\n\n/**\n * Removes a skill by name from the canonical location and all detected agent directories.\n */\nexport function remove(\n skillName: string,\n options: { global?: boolean | undefined; cwd?: string | undefined } = {},\n) {\n const isGlobal = options.global !== false\n const cwd = options.cwd || process.cwd()\n const base = isGlobal ? home : cwd\n const canonicalDir = path.join(base, '.agents', 'skills', skillName)\n rmForce(canonicalDir)\n\n for (const agent of detect()) {\n if (agent.universal) continue\n const agentSkillsDir = isGlobal ? agent.globalSkillsDir : path.join(cwd, agent.projectSkillsDir)\n const agentDir = path.join(agentSkillsDir, skillName)\n rmForce(agentDir)\n }\n}\n\n/** Recursively discovers skill directories (those containing a `SKILL.md`). */\nfunction discoverSkills(rootDir: string): { name: string; dir: string; root?: boolean }[] {\n const results: { name: string; dir: string; root?: boolean }[] = []\n\n function visit(dir: string) {\n let entries: fs.Dirent[]\n try {\n entries = fs.readdirSync(dir, { withFileTypes: true })\n } catch {\n return\n }\n for (const entry of entries) {\n if (!entry.isDirectory()) continue\n const subDir = path.join(dir, entry.name)\n const skillPath = path.join(subDir, 'SKILL.md')\n if (fs.existsSync(skillPath)) {\n const content = fs.readFileSync(skillPath, 'utf8')\n const nameMatch = content.match(/^name:\\s*(.+)$/m)\n results.push({ name: sanitizeName(nameMatch?.[1] ?? entry.name), dir: subDir })\n }\n visit(subDir)\n }\n }\n\n visit(rootDir)\n\n // Root-level SKILL.md (e.g. depth=0)\n const rootSkill = path.join(rootDir, 'SKILL.md')\n if (fs.existsSync(rootSkill)) {\n const content = fs.readFileSync(rootSkill, 'utf8')\n const nameMatch = content.match(/^name:\\s*(.+)$/m)\n const name = sanitizeName(nameMatch?.[1] ?? 'skill')\n if (!results.some((r) => r.name === name)) results.push({ name, dir: rootDir, root: true })\n }\n\n return results\n}\n\n/** Sanitizes a skill name for use as a directory name. */\nfunction sanitizeName(name: string): string {\n return name.trim().replace(/[/\\\\]/g, '-').replace(/\\.\\./g, '').slice(0, 255)\n}\n\n/** Removes a file, directory, or symlink (including broken symlinks). */\nfunction rmForce(target: string) {\n try {\n const stat = fs.lstatSync(target)\n if (stat.isSymbolicLink()) fs.unlinkSync(target)\n else fs.rmSync(target, { recursive: true, force: true })\n } catch {}\n}\n\n/** Resolves parent directories through symlinks. */\nfunction resolveParent(dir: string): string {\n try {\n return fs.realpathSync(dir)\n } catch {\n const parent = path.dirname(dir)\n if (parent === dir) return dir\n try {\n return path.join(fs.realpathSync(parent), path.relative(parent, dir))\n } catch {\n return dir\n }\n }\n}\n","import { z } from \"incur\";\n\nexport const AuthMethod = z.enum([\"api_key\", \"oauth\"]);\nexport type AuthMethod = z.infer<typeof AuthMethod>;\n\nexport const Identity = z.object({\n\tid: z.string().optional().describe(\"Account or user id\"),\n\ttitle: z.string().optional().describe(\"Account display name or user name\"),\n\troute: z.string().optional().describe(\"The account's public route\"),\n\temail: z.string().optional().describe(\"User email address (oauth only)\"),\n});\nexport type Identity = z.infer<typeof Identity>;\n\nexport const Profile = z.preprocess(\n\t(value) => {\n\t\tif (!value || typeof value !== \"object\" || Array.isArray(value))\n\t\t\treturn value;\n\t\tconst profile = value as Record<string, unknown>;\n\t\treturn {\n\t\t\t...profile,\n\t\t\taccountId: profile.accountId ?? profile.companyId,\n\t\t\taccountTitle: profile.accountTitle ?? profile.companyTitle,\n\t\t\taccountRoute: profile.accountRoute ?? profile.companyRoute,\n\t\t\tcompanyId: profile.accountId ?? profile.companyId,\n\t\t\tcompanyTitle: profile.accountTitle ?? profile.companyTitle,\n\t\t\tcompanyRoute: profile.accountRoute ?? profile.companyRoute,\n\t\t};\n\t},\n\tz.object({\n\t\tname: z.string().describe(\"The local profile name\"),\n\t\tmethod: AuthMethod,\n\t\taccountId: z.string().optional(),\n\t\taccountTitle: z.string().optional(),\n\t\taccountRoute: z.string().optional(),\n\t\tcompanyId: z.string().optional(),\n\t\tcompanyTitle: z.string().optional(),\n\t\tcompanyRoute: z.string().optional(),\n\t\tuserId: z.string().optional(),\n\t\tuserEmail: z.string().optional(),\n\t\tcreatedAt: z\n\t\t\t.string()\n\t\t\t.describe(\"ISO timestamp of when the profile was first created\"),\n\t}),\n);\nexport type Profile = z.infer<typeof Profile>;\n","import { Entry } from \"@napi-rs/keyring\";\n\n/**\n * OS-native keychain wrapper (macOS Keychain, Windows Credential Manager,\n * libsecret on Linux) via `@napi-rs/keyring`.\n *\n * One credential per profile: service `whop-cli`, account = profile name.\n * `getSecret` returns `null` (rather than throwing) when the entry is missing or\n * the keychain is locked, so callers can treat \"no secret\" as a normal state.\n */\n\nconst SERVICE = \"whop-cli\";\n\nfunction entry(profileName: string): Entry {\n\treturn new Entry(SERVICE, profileName);\n}\n\nexport function setSecret(profileName: string, secret: string): void {\n\tentry(profileName).setPassword(secret);\n}\n\nexport function getSecret(profileName: string): string | null {\n\ttry {\n\t\treturn entry(profileName).getPassword();\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport function deleteSecret(profileName: string): void {\n\ttry {\n\t\tentry(profileName).deletePassword();\n\t} catch {\n\t\t// nothing to delete (or keychain unavailable) — treat as already gone\n\t}\n}\n","import { createHash, randomBytes } from \"node:crypto\";\nimport { execFile } from \"node:child_process\";\nimport { Whop } from \"@whop/sdk\";\nimport { oauthBaseUrl, apiBaseUrl } from \"./client\";\nimport { startCallbackServer } from \"./callback-server\";\nimport { deriveProfileName, listProfiles, upsertProfile } from \"./profiles\";\nimport {\n\ttype CompanyChoice,\n\tprintInfo,\n\tselectCompany,\n\tstartSpinner,\n} from \"./prompts\";\nimport type { Identity } from \"./types\";\n\n/** The registered public OAuth client for the Whop CLI. */\nexport const CLI_CLIENT_ID = \"app_IoPWUwtO8c2gGA\";\n\n/** Fixed local callback port — must match the redirect_uri registered on the OAuth app. */\nexport const CLI_REDIRECT_URI = \"http://localhost:13337/callback\";\n\nimport { WHOP_SCOPES, type WhopScope } from \"./scopes\";\n\nexport { WHOP_SCOPES, type WhopScope };\n\n/** Scopes requested by the CLI during OAuth login. */\nexport const CLI_SCOPES: WhopScope[] = [...WHOP_SCOPES];\n\n// --- PKCE ---\n\nexport function generatePKCE(): { verifier: string; challenge: string } {\n\tconst verifier = randomBytes(32).toString(\"base64url\");\n\tconst challenge = createHash(\"sha256\").update(verifier).digest(\"base64url\");\n\treturn { verifier, challenge };\n}\n\nexport function generateState(): string {\n\treturn randomBytes(16).toString(\"base64url\");\n}\n\nexport function generateNonce(): string {\n\treturn randomBytes(16).toString(\"base64url\");\n}\n\n// --- Browser opening ---\n\nexport function openBrowser(url: string): void {\n\t// Launching is best-effort — the URL is also printed as a manual fallback —\n\t// so pass a no-op callback to swallow ENOENT/spawn errors instead of leaving\n\t// them unhandled.\n\tconst ignore = (): void => {};\n\tif (process.platform === \"darwin\") {\n\t\texecFile(\"open\", [url], ignore);\n\t} else if (process.platform === \"win32\") {\n\t\texecFile(\"cmd.exe\", [\"/c\", \"start\", \"\", url], ignore);\n\t} else {\n\t\texecFile(\"xdg-open\", [url], ignore);\n\t}\n}\n\n// --- Token exchange ---\n\nexport interface OAuthTokens {\n\taccessToken: string;\n\trefreshToken: string;\n\texpiresIn: number;\n}\n\nasync function requestToken(\n\tparams: Record<string, string>,\n): Promise<OAuthTokens> {\n\tconst res = await fetch(`${oauthBaseUrl()}/oauth/token`, {\n\t\tmethod: \"POST\",\n\t\theaders: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\n\t\tbody: new URLSearchParams(params).toString(),\n\t});\n\n\tif (!res.ok) {\n\t\tconst body = await res.text();\n\t\tthrow new Error(`OAuth token request failed (${res.status}): ${body}`);\n\t}\n\n\tconst json = (await res.json()) as {\n\t\taccess_token: string;\n\t\trefresh_token: string;\n\t\texpires_in: number;\n\t};\n\n\treturn {\n\t\taccessToken: json.access_token,\n\t\trefreshToken: json.refresh_token,\n\t\texpiresIn: json.expires_in,\n\t};\n}\n\nexport function exchangeCode(\n\tcode: string,\n\tverifier: string,\n): Promise<OAuthTokens> {\n\treturn requestToken({\n\t\tgrant_type: \"authorization_code\",\n\t\tclient_id: CLI_CLIENT_ID,\n\t\tcode,\n\t\tredirect_uri: CLI_REDIRECT_URI,\n\t\tcode_verifier: verifier,\n\t});\n}\n\nexport function refreshAccessToken(refreshToken: string): Promise<OAuthTokens> {\n\treturn requestToken({\n\t\tgrant_type: \"refresh_token\",\n\t\tclient_id: CLI_CLIENT_ID,\n\t\trefresh_token: refreshToken,\n\t});\n}\n\n// --- Authorization URL ---\n\nexport function buildAuthUrl(\n\tchallenge: string,\n\tstate: string,\n\tnonce: string,\n): string {\n\tconst base = oauthBaseUrl();\n\tconst params = new URLSearchParams({\n\t\tclient_id: CLI_CLIENT_ID,\n\t\tresponse_type: \"code\",\n\t\tredirect_uri: CLI_REDIRECT_URI,\n\t\tcode_challenge: challenge,\n\t\tcode_challenge_method: \"S256\",\n\t\tscope: CLI_SCOPES.join(\" \"),\n\t\tstate,\n\t\tnonce,\n\t});\n\treturn `${base}/oauth/authorize?${params.toString()}`;\n}\n\n// --- Full OAuth login flow ---\n\nexport class OAuthError extends Error {\n\tconstructor(\n\t\tpublic readonly code: string,\n\t\tmessage: string,\n\t) {\n\t\tsuper(message);\n\t\tthis.name = \"OAuthError\";\n\t}\n}\n\nexport interface OAuthLoginResult {\n\tprofileName: string;\n\tidentity: Identity;\n\texisted: boolean;\n}\n\n/**\n * Resolves which business account an OAuth user acts on behalf of.\n *\n * OAuth tokens are user-scoped (`user_xxx`), so list the business accounts the\n * user can manage (`GET /companies`) and pick one:\n * - 0 business accounts → null (the user hasn't created one yet)\n * - 1 business account → use it\n * - >1 → use --company-id if given, else prompt (TTY) / error (agent)\n */\nasync function resolveOAuthCompany(\n\taccessToken: string,\n\topts: { agent: boolean; companyId?: string | undefined },\n): Promise<Identity | null> {\n\tconst whop = new Whop({ apiKey: accessToken, baseURL: apiBaseUrl() });\n\n\t// The spinner covers only the network fetch — it must stop before any prompt,\n\t// otherwise it renders on top of (and underneath) the business account picker.\n\tconst s = opts.agent ? null : startSpinner(\"Loading your business accounts…\");\n\t// Auto-paginate so a user with more than one page of business accounts can still be\n\t// resolved. When a specific --company-id is requested, stop as soon as it's\n\t// found; otherwise cap the scan so the picker can't grow unbounded.\n\tconst MAX_COMPANIES = 1000;\n\tconst companies: CompanyChoice[] = [];\n\ttry {\n\t\tfor await (const company of whop.companies.list({ first: 100 })) {\n\t\t\tcompanies.push({\n\t\t\t\tid: company.id,\n\t\t\t\ttitle: company.title,\n\t\t\t\troute: company.route,\n\t\t\t});\n\t\t\tif (opts.companyId && company.id === opts.companyId) break;\n\t\t\tif (companies.length >= MAX_COMPANIES) break;\n\t\t}\n\t} catch {\n\t\ts?.stop(\"Couldn't load your business accounts.\");\n\t\t// An explicit --company-id can't be silently dropped: if the list failed to\n\t\t// load we can't verify it, so surface the error instead of logging in\n\t\t// without a business account. Without an explicit choice, stay non-fatal — commerce\n\t\t// commands will give a clear error rather than the login crashing.\n\t\tif (opts.companyId) {\n\t\t\tthrow new OAuthError(\n\t\t\t\t\"COMPANY_LOOKUP_FAILED\",\n\t\t\t\t`Couldn't load your business accounts to verify \"${opts.companyId}\". Please try again.`,\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\n\t// An explicit --company-id is a hard request: verify it before the no-account\n\t// early return below, so an empty list errors (COMPANY_NOT_FOUND) rather than\n\t// silently logging the user in without the business account they asked for.\n\tif (opts.companyId) {\n\t\tconst match = companies.find((company) => company.id === opts.companyId);\n\t\tif (!match) {\n\t\t\ts?.stop(\"\");\n\t\t\tconst available = companies.length\n\t\t\t\t? companies.map((company) => company.id).join(\", \")\n\t\t\t\t: \"none — this user has no business accounts yet\";\n\t\t\tthrow new OAuthError(\n\t\t\t\t\"COMPANY_NOT_FOUND\",\n\t\t\t\t`No business account \"${opts.companyId}\" for this user. Available: ${available}.`,\n\t\t\t);\n\t\t}\n\t\ts?.stop(`Using ${match.title}.`);\n\t\treturn match;\n\t}\n\n\tif (companies.length === 0) {\n\t\ts?.stop(\"No business account found on your account.\");\n\t\treturn null;\n\t}\n\n\tif (companies.length === 1) {\n\t\ts?.stop(`Using ${companies[0].title}.`);\n\t\treturn companies[0];\n\t}\n\n\tif (opts.agent) {\n\t\ts?.stop(\"\");\n\t\tthrow new OAuthError(\n\t\t\t\"MULTIPLE_COMPANIES\",\n\t\t\t`You can manage ${companies.length} business accounts — pass --company-id to choose one: ${companies\n\t\t\t\t.map((company) => `${company.id} (${company.title})`)\n\t\t\t\t.join(\", \")}.`,\n\t\t);\n\t}\n\n\t// Stop the spinner before prompting so the picker is the only live UI.\n\ts?.stop(`Found ${companies.length} business accounts.`);\n\treturn selectCompany(companies);\n}\n\nexport async function performOAuthLogin(input: {\n\tprofile?: string | undefined;\n\tagent?: boolean | undefined;\n\tcompanyId?: string | undefined;\n}): Promise<OAuthLoginResult> {\n\tconst { verifier, challenge } = generatePKCE();\n\tconst state = generateState();\n\tconst nonce = generateNonce();\n\tconst authUrl = buildAuthUrl(challenge, state, nonce);\n\n\tconst s = startSpinner(\"Opening browser…\");\n\topenBrowser(authUrl);\n\ts.stop(\"Waiting for authorization in your browser…\");\n\tprintInfo(`If your browser didn't open, visit:\\n${authUrl}`);\n\n\tlet code: string;\n\ttry {\n\t\tcode = await startCallbackServer(state);\n\t} catch (err) {\n\t\tthrow new OAuthError(\n\t\t\t\"OAUTH_CALLBACK_FAILED\",\n\t\t\terr instanceof Error ? err.message : \"OAuth callback failed.\",\n\t\t);\n\t}\n\n\tconst s2 = startSpinner(\"Exchanging authorization code…\");\n\tlet tokens: OAuthTokens;\n\ttry {\n\t\ttokens = await exchangeCode(code, verifier);\n\t\ts2.stop(\"Authorized.\");\n\t} catch (err) {\n\t\ts2.stop(\"Token exchange failed.\");\n\t\tthrow new OAuthError(\n\t\t\t\"TOKEN_EXCHANGE_FAILED\",\n\t\t\terr instanceof Error ? err.message : \"Token exchange failed.\",\n\t\t);\n\t}\n\n\tconst base = oauthBaseUrl();\n\tlet identity: Identity = {};\n\tlet companyIdentity: Identity | null = null;\n\ttry {\n\t\tconst res = await fetch(`${base}/oauth/userinfo`, {\n\t\t\theaders: { Authorization: `Bearer ${tokens.accessToken}` },\n\t\t});\n\t\tif (res.ok) {\n\t\t\tconst info = (await res.json()) as {\n\t\t\t\tsub?: string;\n\t\t\t\tname?: string;\n\t\t\t\temail?: string;\n\t\t\t};\n\t\t\tidentity = { id: info.sub, title: info.name, email: info.email };\n\t\t}\n\t} catch {\n\t\t// Non-fatal — profile name falls back to \"default\"\n\t}\n\n\t// Resolve the business account so scoped API calls work. OAuth tokens are\n\t// user-scoped, so we list the user's business accounts and pick one. The\n\t// spinner and picker are managed inside resolveOAuthCompany so they don't overlap.\n\tcompanyIdentity = await resolveOAuthCompany(tokens.accessToken, {\n\t\tagent: input.agent ?? false,\n\t\tcompanyId: input.companyId,\n\t});\n\n\tconst name = input.profile ?? deriveProfileName(identity);\n\tconst existed = listProfiles().some((p) => p.name === name);\n\tconst tokenExpiresAt = new Date(\n\t\tDate.now() + tokens.expiresIn * 1000,\n\t).toISOString();\n\n\tconst profile = upsertProfile({\n\t\tname,\n\t\tmethod: \"oauth\",\n\t\tsecret: tokens.refreshToken,\n\t\tidentity,\n\t\tcompanyIdentity: companyIdentity ?? undefined,\n\t\taccessToken: tokens.accessToken,\n\t\ttokenExpiresAt,\n\t});\n\n\treturn {\n\t\tprofileName: profile.name,\n\t\tidentity,\n\t\texisted,\n\t};\n}\n","import { createServer, type Server } from \"node:http\";\nimport { errorHtml, successHtml } from \"./callback-html\";\n\nconst CALLBACK_PORT = 13337;\n\n// The redirect_uri uses the \"localhost\" hostname, which resolves to 127.0.0.1\n// (IPv4) on some hosts and ::1 (IPv6) on others. Bind both loopback families so\n// the browser's redirect connects regardless of how it resolves localhost.\nconst LOOPBACK_HOSTS = [\"127.0.0.1\", \"::1\"] as const;\n\n/**\n * Starts a temporary HTTP server on the loopback callback port, waits for the\n * OAuth redirect to `/callback` carrying the expected `state`, responds with a\n * close-tab page, and resolves with the authorization code. Rejects if the\n * callback contains an error, the port is unavailable on every loopback family,\n * or it times out after 5 minutes.\n */\nexport function startCallbackServer(expectedState: string): Promise<string> {\n\treturn new Promise((resolve, reject) => {\n\t\tconst servers: Server[] = [];\n\t\tlet settled = false;\n\t\tlet bindFailures = 0;\n\n\t\tconst settle = (run: () => void): void => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tclearTimeout(timeout);\n\t\t\tfor (const server of servers) {\n\t\t\t\tserver.close();\n\t\t\t\tserver.closeAllConnections();\n\t\t\t}\n\t\t\trun();\n\t\t};\n\n\t\tconst timeout = setTimeout(\n\t\t\t() =>\n\t\t\t\tsettle(() =>\n\t\t\t\t\treject(new Error(\"Timed out waiting for OAuth callback (5 min).\")),\n\t\t\t\t),\n\t\t\t5 * 60 * 1000,\n\t\t);\n\n\t\tfor (const host of LOOPBACK_HOSTS) {\n\t\t\tconst server = createServer((req, res) => {\n\t\t\t\tconst url = new URL(req.url ?? \"/\", \"http://localhost\");\n\n\t\t\t\t// Ignore anything that isn't our callback (favicon, probes, prefetch)\n\t\t\t\t// so a stray request can't consume or abort the pending login.\n\t\t\t\tif (url.pathname !== \"/callback\") {\n\t\t\t\t\tres.writeHead(404, { \"Content-Type\": \"text/plain; charset=utf-8\" });\n\t\t\t\t\tres.end(\"Not found\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Bind the response to this login: a missing/mismatched state is a\n\t\t\t\t// forged or cross-flow request — reject the request, not the login.\n\t\t\t\tif (url.searchParams.get(\"state\") !== expectedState) {\n\t\t\t\t\tres.writeHead(400, { \"Content-Type\": \"text/plain; charset=utf-8\" });\n\t\t\t\t\tres.end(\"Invalid OAuth state\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst code = url.searchParams.get(\"code\");\n\t\t\t\tconst error = url.searchParams.get(\"error\");\n\n\t\t\t\tres.writeHead(200, { \"Content-Type\": \"text/html; charset=utf-8\" });\n\t\t\t\t// Settle only after the page has flushed — otherwise tearing the\n\t\t\t\t// socket down can reset the connection before the browser renders it.\n\t\t\t\tres.end(code ? successHtml : errorHtml(error), () => {\n\t\t\t\t\tsettle(() => {\n\t\t\t\t\t\tif (code) resolve(code);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treject(new Error(`OAuth error: ${error ?? \"no code returned\"}`));\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tserver.on(\"error\", (err: NodeJS.ErrnoException) => {\n\t\t\t\t// Tolerate a loopback family that isn't available (e.g. IPv6\n\t\t\t\t// disabled); only fail if every family failed to bind.\n\t\t\t\tbindFailures += 1;\n\t\t\t\tif (bindFailures === LOOPBACK_HOSTS.length) settle(() => reject(err));\n\t\t\t});\n\n\t\t\tserver.listen(CALLBACK_PORT, host);\n\t\t\tservers.push(server);\n\t\t}\n\t});\n}\n","const LOGO_SVG = `<svg width=\"64\" height=\"64\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M27.1309 8.31348C28.6407 8.31348 30.1822 9.43651 31 10.5625H30.9864L19.1729 22.375C17.4239 24.124 14.5605 24.124 12.8116 22.375L11.6817 21.2441L22.3614 10.5625C22.3761 10.5433 22.7583 10.1702 22.7715 10.1572C23.8 9.17896 25.1594 8.31355 27.1309 8.31348ZM16.4356 8.31348C17.9454 8.31348 19.4869 9.43651 20.3047 10.5625L10.6534 20.2148L6.34087 15.9023L11.6797 10.5625C11.6967 10.5404 12.0648 10.1688 12.0762 10.1572C13.1047 9.17893 14.464 8.3135 16.4356 8.31348ZM5.76958 8.31348C7.27863 8.31352 8.82085 9.43653 9.63872 10.5625L5.31939 14.8818L1.00005 10.5625C0.994867 10.5507 1.40013 10.1668 1.41021 10.1572C2.43874 9.17892 3.79797 8.31348 5.76958 8.31348Z\" fill=\"#FA4616\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"/>\n</svg>`;\n\nconst BASE_STYLES = `\n *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }\n body {\n font-family: -apple-system, BlinkMacSystemFont, \"Inter\", \"Segoe UI\", sans-serif;\n min-height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #fcfcfc;\n color: #202020;\n }\n .card {\n background: #ffffff;\n border: 1px solid #e8e8e8;\n border-radius: 16px;\n padding: 48px 40px;\n width: 100%;\n max-width: 360px;\n text-align: center;\n box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);\n }\n .logo { margin-bottom: 24px; }\n h1 {\n font-size: 17px;\n font-weight: 600;\n letter-spacing: -0.02em;\n margin-bottom: 6px;\n }\n p { font-size: 13px; color: #646464; line-height: 1.5; }\n @media (prefers-color-scheme: dark) {\n body { background: #111111; color: #eeeeee; }\n .card { background: #191919; border-color: #2a2a2a; box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2); }\n p { color: #b4b4b4; }\n }`;\n\nexport const successHtml = `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Logged in to Whop</title>\n <style>${BASE_STYLES}\n </style>\n</head>\n<body>\n <div class=\"card\">\n <div class=\"logo\">${LOGO_SVG}</div>\n <h1>Logged in to Whop</h1>\n <p>You can return to your terminal.</p>\n </div>\n</body>\n</html>`;\n\nexport function errorHtml(error: string | null): string {\n\tconst message = error\n\t\t? `<code>${error.replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\")}</code>`\n\t\t: \"An unknown error occurred.\";\n\treturn `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Login failed</title>\n <style>${BASE_STYLES}\n code { font-size: 12px; color: #e54d2e; background: #feebe7; padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, monospace; }\n @media (prefers-color-scheme: dark) {\n code { background: #391714; color: #f5a898; }\n }\n </style>\n</head>\n<body>\n <div class=\"card\">\n <div class=\"logo\">${LOGO_SVG}</div>\n <h1>Login failed</h1>\n <p>${message}</p>\n </div>\n</body>\n</html>`;\n}\n","import { isCancel, log, password, select, spinner } from \"@clack/prompts\";\nimport type { AuthMethod, Profile } from \"./types\";\n\n/**\n * Interactive prompts (TTY only) built on `@clack/prompts`.\n *\n * On Ctrl-C / cancel, clack returns a cancel symbol; we throw\n * `PromptCancelledError` so the command runner can convert it into a clean\n * error result with exit code 130.\n */\n\nexport class PromptCancelledError extends Error {\n\tconstructor() {\n\t\tsuper(\"Prompt cancelled\");\n\t\tthis.name = \"PromptCancelledError\";\n\t}\n}\n\nfunction ensure<T>(value: T | symbol): T {\n\tif (isCancel(value)) throw new PromptCancelledError();\n\treturn value;\n}\n\nexport async function chooseAuthMethod(): Promise<AuthMethod> {\n\tconst method = await select<AuthMethod>({\n\t\tmessage: \"How do you want to authenticate?\",\n\t\toptions: [\n\t\t\t{\n\t\t\t\tvalue: \"oauth\",\n\t\t\t\tlabel: \"Log in with Whop\",\n\t\t\t\thint: \"Opens your browser to authorize\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: \"api_key\",\n\t\t\t\tlabel: \"API key\",\n\t\t\t\thint: \"Paste a Whop account API key\",\n\t\t\t},\n\t\t],\n\t\tinitialValue: \"oauth\",\n\t});\n\treturn ensure(method);\n}\n\nexport async function promptApiKey(): Promise<string> {\n\tconst key = await password({\n\t\tmessage: \"Paste your Whop API key:\",\n\t\tvalidate: (value) =>\n\t\t\tvalue && value.trim().length > 0 ? undefined : \"An API key is required\",\n\t});\n\treturn ensure(key).trim();\n}\n\nexport interface CompanyChoice {\n\tid: string;\n\ttitle: string;\n\troute: string;\n}\n\nexport async function selectCompany(\n\tcompanies: CompanyChoice[],\n): Promise<CompanyChoice> {\n\tconst id = await select<string>({\n\t\tmessage: \"Which business account do you want to use?\",\n\t\toptions: companies.map((company) => ({\n\t\t\tvalue: company.id,\n\t\t\tlabel: company.title,\n\t\t\thint: company.id,\n\t\t})),\n\t});\n\tconst chosen = ensure(id);\n\tconst match = companies.find((company) => company.id === chosen);\n\tif (!match) {\n\t\tthrow new Error(\n\t\t\t`Selected business account \"${chosen}\" is no longer available.`,\n\t\t);\n\t}\n\treturn match;\n}\n\nexport async function selectProfile(profiles: Profile[]): Promise<string> {\n\tconst name = await select<string>({\n\t\tmessage: \"Select a profile to switch to:\",\n\t\toptions: profiles.map((profile) => ({\n\t\t\tvalue: profile.name,\n\t\t\tlabel: profile.name,\n\t\t\thint:\n\t\t\t\tprofile.accountTitle ??\n\t\t\t\tprofile.userEmail ??\n\t\t\t\tprofile.accountId ??\n\t\t\t\tprofile.userId,\n\t\t})),\n\t});\n\treturn ensure(name);\n}\n\n/** Starts a clack spinner and returns it so the caller can `.stop(message)`. */\nexport function startSpinner(message: string): ReturnType<typeof spinner> {\n\tconst s = spinner();\n\ts.start(message);\n\treturn s;\n}\n\n/** Prints an informational line (e.g. a manual fallback URL or hint). */\nexport function printInfo(message: string): void {\n\tlog.info(message);\n}\n","/**\n * The user-grantable OAuth scopes for the Whop CLI's OAuth app.\n *\n * NOTE: these are OAuth *scope* names, which are NOT the same vocabulary as the\n * REST permission names in the OpenAPI spec's `security` blocks (e.g. products\n * are granted via `access_pass:*`, not `product:*`). Requesting a name the OAuth\n * server doesn't recognize fails the whole login with `invalid_scope`, so only\n * add names confirmed grantable by the OAuth app. Some command groups (ads,\n * audiences, social accounts, referrals, swaps) have no OAuth scope and are only\n * reachable with an API-key login.\n */\nexport const WHOP_SCOPES = [\n\t\"access_pass:basic:read\",\n\t\"access_pass:create\",\n\t\"access_pass:delete\",\n\t\"access_pass:stats:read\",\n\t\"access_pass:update\",\n\t\"affiliate:basic:read\",\n\t\"affiliate:create\",\n\t\"affiliate:update\",\n\t\"ai_chat:create\",\n\t\"ai_chat:delete\",\n\t\"ai_chat:read\",\n\t\"ai_chat:update\",\n\t\"ai_prompt:create\",\n\t\"bounty:create\",\n\t\"chat:message:create\",\n\t\"chat:moderate\",\n\t\"chat:read\",\n\t\"checkout_configuration:basic:read\",\n\t\"checkout_configuration:create\",\n\t\"checkout_configuration:delete\",\n\t\"company:authorized_user:email:read\",\n\t\"company:authorized_user:read\",\n\t\"company:balance:export\",\n\t\"company:balance:read\",\n\t\"company:basic:read\",\n\t\"company:create\",\n\t\"company:delete\",\n\t\"company:log:read\",\n\t\"company:manage_checkout\",\n\t\"company:update\",\n\t\"company_token_transaction:create\",\n\t\"company_token_transaction:read\",\n\t\"course_analytics:read\",\n\t\"course_lesson_interaction:read\",\n\t\"courses:read\",\n\t\"courses:update\",\n\t\"custom_emoji:update\",\n\t\"developer:basic:read\",\n\t\"developer:manage_builds\",\n\t\"dms:channel:manage\",\n\t\"dms:message:manage\",\n\t\"dms:read\",\n\t\"email\",\n\t\"event:create\",\n\t\"experience:attach\",\n\t\"experience:create\",\n\t\"experience:delete\",\n\t\"experience:detach\",\n\t\"experience:hidden_experience:read\",\n\t\"experience:update\",\n\t\"forum:moderate\",\n\t\"forum:post:create\",\n\t\"forum:read\",\n\t\"identity:read\",\n\t\"identity:write\",\n\t\"invoice:basic:read\",\n\t\"invoice:create\",\n\t\"invoice:update\",\n\t\"lead:basic:read\",\n\t\"lead:manage\",\n\t\"livestream:chat:read\",\n\t\"livestream:chat:write\",\n\t\"livestream:create\",\n\t\"livestream:delete\",\n\t\"livestream:manage_recording\",\n\t\"livestream:moderate\",\n\t\"member:basic:read\",\n\t\"member:email:read\",\n\t\"member:journey:read\",\n\t\"member:manage\",\n\t\"member:moderate\",\n\t\"member:payment_methods:manage\",\n\t\"member:payment_methods:read\",\n\t\"member:phone:read\",\n\t\"member:stats:read\",\n\t\"membership:cancel\",\n\t\"membership:update\",\n\t\"notification:create\",\n\t\"openid\",\n\t\"payment:basic:read\",\n\t\"payment:charge\",\n\t\"payment:dispute\",\n\t\"payment:dispute:read\",\n\t\"payment:dispute_alert:read\",\n\t\"payment:manage\",\n\t\"payment:resolution_center\",\n\t\"payment:resolution_center_case:read\",\n\t\"payment:setup_intent:read\",\n\t\"payout:account:read\",\n\t\"payout:account:update\",\n\t\"payout:create_destination\",\n\t\"payout:delete_destination\",\n\t\"payout:destination:read\",\n\t\"payout:transfer:export\",\n\t\"payout:transfer:read\",\n\t\"payout:update_destination\",\n\t\"payout:withdraw_funds\",\n\t\"payout:withdrawal:read\",\n\t\"plan:basic:export\",\n\t\"plan:basic:read\",\n\t\"plan:create\",\n\t\"plan:delete\",\n\t\"plan:stats:export\",\n\t\"plan:stats:read\",\n\t\"plan:update\",\n\t\"plan:waitlist:export\",\n\t\"plan:waitlist:manage\",\n\t\"plan:waitlist:read\",\n\t\"profile\",\n\t\"promo_code:basic:export\",\n\t\"promo_code:basic:read\",\n\t\"promo_code:create\",\n\t\"promo_code:delete\",\n\t\"promo_code:update\",\n\t\"shipment:basic:read\",\n\t\"shipment:create\",\n\t\"social_link:update\",\n\t\"stats:read\",\n\t\"support_chat:create\",\n\t\"support_chat:message:create\",\n\t\"support_chat:read\",\n\t\"tracking_link:basic:export\",\n\t\"tracking_link:basic:read\",\n\t\"tracking_link:create\",\n\t\"tracking_link:delete\",\n\t\"tracking_link:stats:export\",\n\t\"tracking_link:stats:read\",\n\t\"tracking_link:update\",\n\t\"user:balance:read\",\n\t\"user:profile:update\",\n] as const;\n\nexport type WhopScope = (typeof WHOP_SCOPES)[number];\n","import { readConfig, writeConfig } from \"./config\";\nimport { deleteSecret, getSecret, setSecret } from \"./keyring\";\nimport { refreshAccessToken } from \"./oauth\";\nimport type { AuthMethod, Identity, Profile } from \"./types\";\n\n/** 60-second buffer — refresh before the token actually expires. */\nconst EXPIRY_BUFFER_MS = 60_000;\n\n/**\n * The OAuth secret stored in the keychain: the long-lived refresh token plus a\n * cached short-lived access token and its expiry. Kept together as one keychain\n * entry so the access token never lands in the plaintext config file, and so a\n * rotated refresh token is written atomically with the access token it pairs\n * with (the backend invalidates the old refresh token on rotation).\n */\ninterface OAuthSecret {\n\trefreshToken: string;\n\taccessToken?: string;\n\ttokenExpiresAt?: string;\n}\n\n/** Parses the stored keychain secret, tolerating the legacy plain refresh-token string. */\nfunction parseOAuthSecret(raw: string): OAuthSecret {\n\ttry {\n\t\tconst parsed = JSON.parse(raw) as unknown;\n\t\tif (\n\t\t\tparsed != null &&\n\t\t\ttypeof parsed === \"object\" &&\n\t\t\ttypeof (parsed as OAuthSecret).refreshToken === \"string\"\n\t\t) {\n\t\t\treturn parsed as OAuthSecret;\n\t\t}\n\t} catch {\n\t\t// Not JSON — fall through to the legacy plain refresh-token form.\n\t}\n\treturn { refreshToken: raw };\n}\n\n/**\n * Returns a valid Bearer token for the given profile, handling both auth\n * methods transparently:\n * - api_key: returns the raw API key from the keychain.\n * - oauth: returns the cached access token if still valid, otherwise uses the\n * stored refresh token to obtain a new one and persists it to the keychain.\n */\nexport async function getValidAccessToken(\n\tprofile: Profile,\n): Promise<string | null> {\n\tif (profile.method === \"api_key\") {\n\t\treturn getSecret(profile.name);\n\t}\n\n\tconst raw = getSecret(profile.name);\n\tif (!raw) return null;\n\tconst secret = parseOAuthSecret(raw);\n\n\tif (secret.accessToken && secret.tokenExpiresAt) {\n\t\tconst expiresAt = new Date(secret.tokenExpiresAt).getTime();\n\t\tif (Date.now() < expiresAt - EXPIRY_BUFFER_MS) {\n\t\t\treturn secret.accessToken;\n\t\t}\n\t}\n\n\tlet refreshed: Awaited<ReturnType<typeof refreshAccessToken>>;\n\ttry {\n\t\trefreshed = await refreshAccessToken(secret.refreshToken);\n\t} catch {\n\t\t// Refresh token expired/revoked, or a transient network failure. Surface\n\t\t// it as \"no usable credential\" (null) so the caller returns the clean\n\t\t// \"Run `whop login` again\" 401 instead of crashing with a raw stack trace.\n\t\treturn null;\n\t}\n\tconst tokenExpiresAt = new Date(\n\t\tDate.now() + refreshed.expiresIn * 1000,\n\t).toISOString();\n\n\tsetSecret(\n\t\tprofile.name,\n\t\tJSON.stringify({\n\t\t\trefreshToken: refreshed.refreshToken,\n\t\t\taccessToken: refreshed.accessToken,\n\t\t\ttokenExpiresAt,\n\t\t} satisfies OAuthSecret),\n\t);\n\n\treturn refreshed.accessToken;\n}\n\n/**\n * Profile orchestration — the only module that writes both the config file and\n * the keychain, keeping them consistent.\n */\n\nexport function listProfiles(env: NodeJS.ProcessEnv = process.env): Profile[] {\n\treturn readConfig(env).profiles;\n}\n\nexport function getActiveProfile(\n\tenv: NodeJS.ProcessEnv = process.env,\n): Profile | null {\n\tconst config = readConfig(env);\n\tif (!config.activeProfile) return null;\n\treturn (\n\t\tconfig.profiles.find((profile) => profile.name === config.activeProfile) ??\n\t\tnull\n\t);\n}\n\nfunction slugify(value: string): string {\n\treturn value\n\t\t.toLowerCase()\n\t\t.replace(/[^a-z0-9]+/g, \"-\")\n\t\t.replace(/^-+|-+$/g, \"\")\n\t\t.slice(0, 32);\n}\n\n/** Picks a default profile name from the identity, slugified: email local-part → route → title → id → fallback. */\nexport function deriveProfileName(\n\tidentity: Identity,\n\tfallback = \"default\",\n): string {\n\tif (identity.email) return slugify(identity.email.split(\"@\")[0]) || fallback;\n\tif (identity.route) return slugify(identity.route) || fallback;\n\tif (identity.title) return slugify(identity.title) || fallback;\n\tif (identity.id) return identity.id;\n\treturn fallback;\n}\n\n/** Adds or replaces a profile (dedupe by name), stores its secret, and makes it active. */\nexport function upsertProfile(\n\tinput: {\n\t\tname: string;\n\t\tmethod: AuthMethod;\n\t\tsecret: string;\n\t\tidentity: Identity;\n\t\t/** OAuth only: the business account associated with the OAuth user, for scoped API calls */\n\t\tcompanyIdentity?: Identity;\n\t\t/** OAuth only: cached access token */\n\t\taccessToken?: string;\n\t\t/** OAuth only: ISO expiry timestamp for accessToken */\n\t\ttokenExpiresAt?: string;\n\t},\n\tenv: NodeJS.ProcessEnv = process.env,\n): Profile {\n\tconst config = readConfig(env);\n\tconst existing = config.profiles.find(\n\t\t(profile) => profile.name === input.name,\n\t);\n\tconst isOauth = input.method === \"oauth\";\n\tconst account = isOauth ? input.companyIdentity : input.identity;\n\tconst profile: Profile = {\n\t\tname: input.name,\n\t\tmethod: input.method,\n\t\taccountId: account?.id,\n\t\taccountTitle: account?.title,\n\t\taccountRoute: account?.route,\n\t\tcompanyId: account?.id,\n\t\tcompanyTitle: account?.title,\n\t\tcompanyRoute: account?.route,\n\t\tuserId: isOauth ? input.identity.id : undefined,\n\t\tuserEmail: isOauth ? input.identity.email : undefined,\n\t\tcreatedAt: existing?.createdAt ?? new Date().toISOString(),\n\t};\n\tconfig.profiles = [\n\t\t...config.profiles.filter((p) => p.name !== input.name),\n\t\tprofile,\n\t];\n\tconfig.activeProfile = input.name;\n\twriteConfig(config, env);\n\t// oauth secrets are stored as a JSON blob (refresh + cached access token);\n\t// api_key stores the raw key. The access token never touches the config file.\n\tconst secret =\n\t\tinput.method === \"oauth\"\n\t\t\t? JSON.stringify({\n\t\t\t\t\trefreshToken: input.secret,\n\t\t\t\t\taccessToken: input.accessToken,\n\t\t\t\t\ttokenExpiresAt: input.tokenExpiresAt,\n\t\t\t\t} satisfies OAuthSecret)\n\t\t\t: input.secret;\n\tsetSecret(input.name, secret);\n\treturn profile;\n}\n\n/** Removes a profile and its secret; if it was active, the first remaining profile becomes active. */\nexport function removeProfile(\n\tname: string,\n\tenv: NodeJS.ProcessEnv = process.env,\n): { removed: boolean; newActive: string | null } {\n\tconst config = readConfig(env);\n\tconst existed = config.profiles.some((profile) => profile.name === name);\n\tconfig.profiles = config.profiles.filter((profile) => profile.name !== name);\n\tif (config.activeProfile === name) {\n\t\tconfig.activeProfile = config.profiles[0]?.name;\n\t}\n\twriteConfig(config, env);\n\tdeleteSecret(name);\n\treturn { removed: existed, newActive: config.activeProfile ?? null };\n}\n\n/** Removes every profile and its keychain secret — a full auth reset. Returns the removed names. */\nexport function removeAllProfiles(\n\tenv: NodeJS.ProcessEnv = process.env,\n): string[] {\n\tconst config = readConfig(env);\n\tconst names = config.profiles.map((profile) => profile.name);\n\tif (names.length === 0) return names;\n\tconfig.profiles = [];\n\tconfig.activeProfile = undefined;\n\twriteConfig(config, env);\n\tfor (const name of names) deleteSecret(name);\n\treturn names;\n}\n\n/** Makes a profile active. Returns null if no such profile exists. */\nexport function switchProfile(\n\tname: string,\n\tenv: NodeJS.ProcessEnv = process.env,\n): Profile | null {\n\tconst config = readConfig(env);\n\tconst profile = config.profiles.find((p) => p.name === name);\n\tif (!profile) return null;\n\tconfig.activeProfile = name;\n\twriteConfig(config, env);\n\treturn profile;\n}\n","import nativeSpec from \"./native-spec.json\" with { type: \"json\" };\nimport { apiBaseUrl, validateApiKey } from \"../auth/client\";\nimport { getActiveProfile, getValidAccessToken } from \"../auth/profiles\";\nimport type { Profile } from \"../auth/types\";\n\nconst HTTP_METHODS = new Set([\n\t\"get\",\n\t\"put\",\n\t\"post\",\n\t\"delete\",\n\t\"options\",\n\t\"head\",\n\t\"patch\",\n\t\"trace\",\n]);\n\nexport { nativeSpec };\n\n/**\n * Returns a filtered copy of the spec containing only paths whose operations\n * carry the given tag. Passed to incur's `{ fetch, openapi }` command to\n * auto-generate typed subcommands for one command group at a time.\n */\n/**\n * Parameter names that are redundant in CLI help: `authorization` is injected by\n * the fetch proxy as a Bearer token, and `api-version-date` is an internal\n * versioning header. Matched case-insensitively (the spec names it\n * `Api-Version-Date`) and through `$ref`s into `components.parameters`.\n */\nconst HIDDEN_PARAMS = new Set([\"authorization\", \"api-version-date\"]);\n\n/**\n * Account-scoping params the fetch proxy auto-fills from the active profile.\n * The spec often marks these `required`, which would make incur demand them on\n * the command line before the proxy ever runs — so we demote them to optional\n * (still overridable by power users) and let the proxy inject the account.\n */\nconst AUTO_FILLED_PARAMS = new Set([\"company_id\", \"account_id\"]);\n\n/** `$ref` strings (e.g. `#/components/parameters/ApiVersionDate`) that resolve to a hidden param. */\nfunction hiddenParamRefs(spec: Record<string, unknown>): Set<string> {\n\tconst refs = new Set<string>();\n\tconst components = (spec.components as Record<string, unknown> | undefined)\n\t\t?.parameters;\n\tif (components && typeof components === \"object\") {\n\t\tfor (const [key, def] of Object.entries(\n\t\t\tcomponents as Record<string, unknown>,\n\t\t)) {\n\t\t\tconst name = (def as Record<string, unknown> | null)?.name;\n\t\t\tif (typeof name === \"string\" && HIDDEN_PARAMS.has(name.toLowerCase())) {\n\t\t\t\trefs.add(`#/components/parameters/${key}`);\n\t\t\t}\n\t\t}\n\t}\n\treturn refs;\n}\n\nfunction isHiddenParam(p: unknown, hiddenRefs: Set<string>): boolean {\n\tif (p == null || typeof p !== \"object\") return false;\n\tconst rec = p as Record<string, unknown>;\n\tif (typeof rec.$ref === \"string\" && hiddenRefs.has(rec.$ref)) return true;\n\treturn (\n\t\ttypeof rec.name === \"string\" && HIDDEN_PARAMS.has(rec.name.toLowerCase())\n\t);\n}\n\nfunction transformParams(\n\top: Record<string, unknown>,\n\thiddenRefs: Set<string>,\n): Record<string, unknown> {\n\t// `authorization` is auto-injected by the proxy, so drop the security\n\t// requirement that makes incur render an `--authorization` option.\n\tconst { security: _security, ...rest } = op;\n\tconst params = rest.parameters;\n\tif (!Array.isArray(params)) return rest;\n\tconst relaxed = params\n\t\t.filter((p: unknown) => !isHiddenParam(p, hiddenRefs))\n\t\t.map((p: unknown) => {\n\t\t\tif (\n\t\t\t\tp != null &&\n\t\t\t\ttypeof p === \"object\" &&\n\t\t\t\tAUTO_FILLED_PARAMS.has(\n\t\t\t\t\tString((p as Record<string, unknown>).name ?? \"\"),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn { ...(p as Record<string, unknown>), required: false };\n\t\t\t}\n\t\t\treturn p;\n\t\t});\n\treturn { ...rest, parameters: relaxed };\n}\n\nexport function filterSpecByTag(\n\tspec: Record<string, unknown>,\n\ttag: string,\n): Record<string, unknown> {\n\tconst hiddenRefs = hiddenParamRefs(spec);\n\tconst paths: Record<string, Record<string, unknown>> = {};\n\tfor (const [path, methods] of Object.entries(\n\t\tspec.paths as Record<string, Record<string, unknown>>,\n\t)) {\n\t\tconst filtered: Record<string, unknown> = {};\n\t\tconst nonOpEntries: [string, unknown][] = [];\n\t\tfor (const [method, op] of Object.entries(methods)) {\n\t\t\tif (!HTTP_METHODS.has(method)) {\n\t\t\t\tnonOpEntries.push([method, op]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst tags = (op as Record<string, unknown>).tags;\n\t\t\tif (Array.isArray(tags) && tags.includes(tag)) {\n\t\t\t\tfiltered[method] = transformParams(\n\t\t\t\t\top as Record<string, unknown>,\n\t\t\t\t\thiddenRefs,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (Object.keys(filtered).length > 0) {\n\t\t\tfor (const [k, v] of nonOpEntries) filtered[k] = v;\n\t\t\tpaths[path] = filtered;\n\t\t}\n\t}\n\treturn { ...spec, paths };\n}\n\n/** Body/query field names that carry the active account. */\nconst COMPANY_FIELDS = [\"company_id\", \"account_id\"];\n\ninterface SpecOperation {\n\tparameters?: Array<{ name?: string; in?: string }>;\n\trequestBody?: {\n\t\tcontent?: Record<\n\t\t\tstring,\n\t\t\t{ schema?: { properties?: Record<string, unknown> } }\n\t\t>;\n\t};\n}\n\n/** Finds the spec operation for a concrete request path + method (templated segments are wildcards). */\nfunction findOperation(method: string, pathname: string): SpecOperation | null {\n\tconst paths = (\n\t\tnativeSpec as { paths?: Record<string, Record<string, unknown>> }\n\t).paths;\n\tif (!paths) return null;\n\tconst want = pathname.split(\"/\").filter(Boolean);\n\tconst m = method.toLowerCase();\n\tfor (const [template, ops] of Object.entries(paths)) {\n\t\tconst segs = template.split(\"/\").filter(Boolean);\n\t\tif (segs.length !== want.length) continue;\n\t\tconst matches = segs.every(\n\t\t\t(seg, i) => (seg.startsWith(\"{\") && seg.endsWith(\"}\")) || seg === want[i],\n\t\t);\n\t\tif (matches && ops[m]) return ops[m] as SpecOperation;\n\t}\n\treturn null;\n}\n\nfunction declaresQueryParam(op: SpecOperation, name: string): boolean {\n\treturn (op.parameters ?? []).some((p) => p.name === name && p.in === \"query\");\n}\n\nfunction declaresBodyProp(op: SpecOperation, name: string): boolean {\n\tconst props =\n\t\top.requestBody?.content?.[\"application/json\"]?.schema?.properties;\n\treturn !!props && Object.prototype.hasOwnProperty.call(props, name);\n}\n\n/**\n * The Whop API nests its error message under `{ error: { message } }`, but incur\n * only reads a top-level `message`, so every failure collapses to \"HTTP 400\".\n * Lift the real message to the top level so spec commands report what's wrong.\n */\nfunction extractApiMessage(payload: unknown): string | undefined {\n\tif (payload == null || typeof payload !== \"object\") return undefined;\n\tconst p = payload as Record<string, unknown>;\n\tconst err = p.error;\n\tif (\n\t\terr &&\n\t\ttypeof err === \"object\" &&\n\t\ttypeof (err as Record<string, unknown>).message === \"string\"\n\t) {\n\t\treturn (err as Record<string, string>).message;\n\t}\n\tfor (const value of [p.message, p.detail, err]) {\n\t\tif (typeof value === \"string\") return value;\n\t}\n\treturn undefined;\n}\n\nlet envCompanyId: Promise<string | undefined> | null = null;\n\nfunction normalizeApiKey(key: string): string {\n\treturn key.replace(/^Bearer\\s+/i, \"\").trim();\n}\n\nasync function resolveCompanyId(\n\tprofile: Profile | null,\n\tapiKey: string,\n): Promise<string | undefined> {\n\tif (profile?.companyId) return profile.companyId;\n\n\tconst envKey = process.env.WHOP_API_KEY\n\t\t? normalizeApiKey(process.env.WHOP_API_KEY)\n\t\t: undefined;\n\tif (!profile && envKey && apiKey === envKey) {\n\t\t// Memoize so concurrent requests in one command share a single validation,\n\t\t// but never cache a miss: a transient failure or not-yet-valid key must be\n\t\t// re-checked on the next request rather than locking the process to \"no\n\t\t// account\". A rejection is swallowed to undefined so it stays non-fatal —\n\t\t// commerce then surfaces a clear error instead of the proxy throwing.\n\t\tenvCompanyId ??= validateApiKey(envKey, apiBaseUrl())\n\t\t\t.then((result) =>\n\t\t\t\tresult.status === \"valid\" || result.status === \"underscoped\"\n\t\t\t\t\t? result.identity.id\n\t\t\t\t\t: undefined,\n\t\t\t)\n\t\t\t.catch(() => undefined);\n\t\tconst resolved = await envCompanyId;\n\t\tif (resolved === undefined) envCompanyId = null;\n\t\treturn resolved;\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Resolves the active account id for hand-written commands, using the same rules\n * as the fetch proxy: the active profile's account, or — when only WHOP_API_KEY\n * is set (agents / CI) — the account the env key belongs to. Lets commands that\n * build their own requests reach the account without a saved login profile.\n */\nexport async function resolveActiveCompanyId(): Promise<string | undefined> {\n\tconst profile = getActiveProfile();\n\tconst rawKey = profile\n\t\t? await getValidAccessToken(profile)\n\t\t: (process.env.WHOP_API_KEY ?? null);\n\tif (!rawKey) return undefined;\n\treturn resolveCompanyId(profile, normalizeApiKey(rawKey));\n}\n\n/**\n * Returns a fetch handler that proxies requests to the Whop API. It:\n * - injects the active profile's credential as a Bearer token,\n * - auto-fills the active account (company_id/account_id) on any operation that\n * declares it but didn't receive it — user-scoped OAuth tokens require this,\n * - surfaces the API's real error message instead of a bare \"HTTP <status>\".\n *\n * Passed to incur's `{ fetch, openapi }` command to drive spec subcommands.\n */\nexport function createWhopFetch(): (request: Request) => Promise<Response> {\n\treturn async (request: Request): Promise<Response> => {\n\t\tconst profile = getActiveProfile();\n\t\tconst rawKey = profile\n\t\t\t? await getValidAccessToken(profile)\n\t\t\t: (process.env.WHOP_API_KEY ?? null);\n\n\t\tif (!rawKey) {\n\t\t\tconst message = profile\n\t\t\t\t? \"Stored credential not found. Run `whop login` again.\"\n\t\t\t\t: \"Not logged in. Run `whop login` first.\";\n\t\t\treturn Response.json({ message }, { status: 401 });\n\t\t}\n\n\t\tconst token = normalizeApiKey(rawKey);\n\n\t\tconst incomingUrl = new URL(request.url);\n\t\tconst op = findOperation(request.method, incomingUrl.pathname);\n\t\tconst companyId = await resolveCompanyId(profile, token);\n\t\tconst method = request.method.toUpperCase();\n\n\t\tlet body = request.body ? await request.text() : undefined;\n\n\t\t// The single place account scoping happens: auto-fill the active account on\n\t\t// any operation that declares it but didn't receive it. Never overwrites a\n\t\t// value the caller set.\n\t\tif (op && companyId) {\n\t\t\tif (method === \"GET\" || method === \"DELETE\" || method === \"HEAD\") {\n\t\t\t\tfor (const name of COMPANY_FIELDS) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!incomingUrl.searchParams.has(name) &&\n\t\t\t\t\t\tdeclaresQueryParam(op, name)\n\t\t\t\t\t) {\n\t\t\t\t\t\tincomingUrl.searchParams.set(name, companyId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst parsed = body ? safeParse(body) : {};\n\t\t\t\tif (parsed && typeof parsed === \"object\") {\n\t\t\t\t\tconst rec = parsed as Record<string, unknown>;\n\t\t\t\t\tlet changed = false;\n\t\t\t\t\tfor (const name of COMPANY_FIELDS) {\n\t\t\t\t\t\t// The API infers company_id from a plan and rejects it when one is\n\t\t\t\t\t\t// given, so never inject company_id alongside a plan_id.\n\t\t\t\t\t\tif (name === \"company_id\" && rec.plan_id != null) continue;\n\t\t\t\t\t\tif (rec[name] == null && declaresBodyProp(op, name)) {\n\t\t\t\t\t\t\trec[name] = companyId;\n\t\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (changed) body = JSON.stringify(parsed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst base = apiBaseUrl().replace(/\\/$/, \"\");\n\t\tconst target = `${base}${incomingUrl.pathname}${incomingUrl.search}`;\n\n\t\tconst headers = new Headers(request.headers);\n\t\theaders.set(\"Authorization\", `Bearer ${token}`);\n\t\theaders.set(\"Content-Type\", \"application/json\");\n\n\t\tconst res = await fetch(target, { method: request.method, headers, body });\n\t\tif (res.ok) return res;\n\n\t\t// Lift the API's nested error message to the top level for incur.\n\t\tconst text = await res.text();\n\t\tconst payload = safeParse(text);\n\t\tlet message = extractApiMessage(payload) ?? text ?? `HTTP ${res.status}`;\n\t\t// This permission has no OAuth scope, so re-login can't grant it — it needs\n\t\t// an API-key login for an account that holds the permission.\n\t\tif (\n\t\t\tres.status === 403 &&\n\t\t\t/not authorized for the .* scope/i.test(message)\n\t\t) {\n\t\t\tmessage +=\n\t\t\t\t\" This resource requires an API-key login (`whop login --api-key`).\";\n\t\t}\n\t\treturn Response.json(\n\t\t\t{ message, error: payload ?? text },\n\t\t\t{ status: res.status },\n\t\t);\n\t};\n}\n\nfunction safeParse(text: string): unknown {\n\ttry {\n\t\treturn JSON.parse(text);\n\t} catch {\n\t\treturn null;\n\t}\n}\n"],"mappings":";;;;;;;;;;AAAA;AAAA,EACE,SAAW;AAAA,EACX,MAAQ;AAAA,IACN,OAAS;AAAA,IACT,aAAe;AAAA,IACf,SAAW;AAAA,EACb;AAAA,EACA,SAAW;AAAA,IACT;AAAA,MACE,KAAO;AAAA,MACP,WAAa;AAAA,QACX,aAAe;AAAA,UACb,SAAW;AAAA,QACb;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,OAAS;AAAA,IACP,aAAa;AAAA,MACX,KAAO;AAAA,QACL,SAAW;AAAA,QACX,MAAQ;AAAA,UACN;AAAA,QACF;AAAA,QACA,UAAY;AAAA,UACV;AAAA,YACE,YAAc;AAAA,cACZ;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,QACA,aAAe;AAAA,QACf,aAAe;AAAA,QACf,YAAc;AAAA,UACZ;AAAA,YACE,MAAQ;AAAA,YACR,IAAM;AAAA,YACN,QAAU;AAAA,cACR,MAAQ;AAAA,YACV;AAAA,YACA,UAAY;AAAA,YACZ,aAAe;AAAA,UACjB;AAAA,UACA;AAAA,YACE,MAAQ;AAAA,YACR,IAAM;AAAA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K,QAAQ,iBAAiB,IAAI,IAAI,GAAG;AACpD,kBAAI,IAAI,IAAI;AACZ,wBAAU;AAAA,YACX;AAAA,UACD;AACA,cAAI,QAAS,QAAO,KAAK,UAAU,MAAM;AAAA,QAC1C;AAAA,MACD;AAAA,IACD;AAEA,UAAM,OAAO,WAAW,EAAE,QAAQ,OAAO,EAAE;AAC3C,UAAM,SAAS,GAAG,IAAI,GAAG,YAAY,QAAQ,GAAG,YAAY,MAAM;AAElE,UAAM,UAAU,IAAI,QAAQ,QAAQ,OAAO;AAC3C,YAAQ,IAAI,iBAAiB,UAAU,KAAK,EAAE;AAC9C,YAAQ,IAAI,gBAAgB,kBAAkB;AAE9C,UAAM,MAAM,MAAM,MAAM,QAAQ,EAAE,QAAQ,QAAQ,QAAQ,SAAS,KAAK,CAAC;AACzE,QAAI,IAAI,GAAI,QAAO;AAGnB,UAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,UAAM,UAAU,UAAU,IAAI;AAC9B,QAAI,UAAU,kBAAkB,OAAO,KAAK,QAAQ,QAAQ,IAAI,MAAM;AAGtE,QACC,IAAI,WAAW,OACf,mCAAmC,KAAK,OAAO,GAC9C;AACD,iBACC;AAAA,IACF;AACA,WAAO,SAAS;AAAA,MACf,EAAE,SAAS,OAAO,WAAW,KAAK;AAAA,MAClC,EAAE,QAAQ,IAAI,OAAO;AAAA,IACtB;AAAA,EACD;AACD;AAEA,SAAS,UAAU,MAAuB;AACzC,MAAI;AACH,WAAO,KAAK,MAAM,IAAI;AAAA,EACvB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;","names":["fs","os","path","fs","os","path","all","index","entry","current","path","index","path","value","format","isArrayOfObjects","path","table","parse","isBooleanOption","unwrap","path","format","path","parse","split","entry","unwrap","maxLen","entry","path","walk","dereferenced","entry","fetch","path","index","key","bucket","resolveTypeName","table","register","configPath","resolve","fs","os","path","entry","fs","path","os","hash","installed","name","def","fetch","entry","format","configPath","result","index","command","sub","rest","register","base","formatted","path","sentinel","isSentinel","cta","outputPolicy","resolve","responses","basename","path","os","fs","parsed","createHash","execFile","Whop","resolve","createHash","execFile","Whop","slugify","profile","path","message"]}