From 5f63032bb5d7c2fefc3bb97966e29b8f62a77bf3 Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Thu, 12 Nov 2026 11:29:59 +0200 Subject: [PATCH 1/2] Rename organization to team across the CLI Tracks contract revision 61610853b4 of polymorfa/polymorfa#887. Renames the --owner value, profile key, principal type, output fields, SDK credential and client names, help text, README, skills and tests. No aliases or shims. Regenerates contracts/cli-reference.json. --- README.md | 68 +- contracts/abprops-capabilities.json | 4 +- contracts/cli-reference.json | 1588 ++++++++--------- docs/command-research/business-app.md | 2 +- docs/command-research/call-consent.md | 2 +- docs/command-research/calls-lids-users.md | 2 +- docs/command-research/calls.md | 6 +- docs/command-research/campaigns.md | 4 +- docs/command-research/customers.md | 2 +- .../developer-events-webhooks.md | 2 +- docs/command-research/platform-management.md | 14 +- docs/command-research/quicklinks.md | 6 +- docs/command-research/voice.md | 2 +- docs/development/bansafe-sdk-integration.md | 2 +- .../2026-08-19-cli-foundation-and-api.md | 4 +- .../specs/2026-08-19-polymorfa-cli-design.md | 36 +- package.json | 12 +- skills/polymorfa/SKILL.md | 6 +- src/base-command.ts | 12 +- src/commands/analytics/get.ts | 2 +- src/commands/analytics/metrics.ts | 2 +- src/commands/audit-log/list.ts | 2 +- src/commands/auth/login.ts | 2 +- src/commands/auth/status.ts | 4 +- src/commands/billing/limits/list.ts | 2 +- src/commands/billing/limits/set.ts | 2 +- src/commands/billing/priority/list.ts | 2 +- src/commands/billing/priority/reorder.ts | 2 +- src/commands/billing/priority/set.ts | 2 +- src/commands/calls/export.ts | 2 +- src/commands/calls/opt-outs/add.ts | 2 +- src/commands/calls/opt-outs/import.ts | 2 +- src/commands/calls/opt-outs/list.ts | 2 +- src/commands/calls/opt-outs/remove.ts | 2 +- src/commands/calls/policy/get.ts | 2 +- src/commands/calls/policy/set.ts | 2 +- src/commands/calls/stats.ts | 2 +- src/commands/key/list.ts | 2 +- src/commands/key/revoke.ts | 2 +- src/commands/listen.ts | 2 +- src/commands/member/list.ts | 2 +- src/commands/optout/settings/update.ts | 2 +- src/commands/optout/settings/view.ts | 2 +- src/commands/security-incident/list.ts | 2 +- src/commands/session-ban/list.ts | 2 +- src/commands/session/list.ts | 2 +- src/commands/session/status.ts | 2 +- src/commands/session/view.ts | 2 +- src/commands/webhook/test.ts | 6 +- src/commands/widget/update.ts | 2 +- src/commands/widget/view.ts | 2 +- src/config/profiles.ts | 13 +- src/context/environment.ts | 46 +- src/context/owner.ts | 14 +- src/developer/client.ts | 4 +- src/developer/render.ts | 2 +- src/functions/command.ts | 2 +- src/listener/frames.ts | 6 +- src/mcp/server.ts | 4 +- src/mcp/session-discovery.ts | 2 +- src/output/contracts.ts | 6 +- src/sdk/client.ts | 6 +- src/services/audiences.ts | 8 +- src/services/auth.ts | 22 +- src/services/bansafe.ts | 58 +- src/services/billing-controls.ts | 19 +- src/services/call-analytics.ts | 6 +- src/services/call-consent.ts | 2 +- src/services/campaign-conversions.ts | 4 +- src/services/campaign-frequency-cap.ts | 4 +- src/services/campaign-segments-drip.ts | 2 +- src/services/customers.ts | 28 +- src/services/doctor.ts | 2 +- src/services/init-starter.ts | 2 +- src/services/number-tiers.ts | 8 +- src/services/opt-outs.ts | 4 +- src/services/platform-management.ts | 46 +- src/services/projects.ts | 4 +- src/services/usage.ts | 2 +- test/commands/audiences-optouts.test.ts | 2 +- test/commands/call-analytics.test.ts | 4 +- test/commands/call-consent.test.ts | 4 +- test/commands/campaign-segments-drip.test.ts | 2 +- test/commands/customers.test.ts | 6 +- test/commands/developer-webhooks.test.ts | 43 +- test/commands/event-stream.test.ts | 4 +- test/commands/events.test.ts | 16 +- test/commands/functions.test.ts | 2 +- test/commands/hybrid-credentials.test.ts | 45 +- test/commands/hybrid-link.test.ts | 4 +- test/commands/listen.test.ts | 4 +- test/commands/operations.test.ts | 24 +- test/commands/platform-management.test.ts | 10 +- test/commands/project-context.test.ts | 8 +- test/config/profiles.test.ts | 6 +- test/context/environment.test.ts | 57 +- test/context/owner.test.ts | 14 +- test/developer/client.test.ts | 14 +- test/developer/output.test.ts | 4 +- test/listener/frames.test.ts | 6 +- test/listener/session.test.ts | 4 +- test/mcp/session-discovery.test.ts | 2 +- test/sdk/client.test.ts | 8 +- test/services/auth.test.ts | 4 +- test/services/call-consent.test.ts | 4 +- test/services/projects.test.ts | 14 +- 106 files changed, 1221 insertions(+), 1264 deletions(-) diff --git a/README.md b/README.md index d4cd6e06..903e1ac7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ polymorfa version ## Requirements - Node.js 22 or newer -- A Polymorfa organization API key or exact-project token for developer requests +- A Polymorfa team API key or exact-project token for developer requests - A server API key or short-lived client token for Messaging requests ## Development installation @@ -140,7 +140,7 @@ The registry comes from the real command files. Commands needing the installed C ## Authentication profiles Until the backend exposes a revocable CLI device-authorization flow, login -accepts an organization API key or exact-project token through standard input: +accepts a team API key or exact-project token through standard input: ```shell printf '%s' "$POLYMORFA_API_KEY" | \ @@ -154,7 +154,7 @@ printf '%s' "$POLYMORFA_PROJECT_TOKEN" | \ polymorfa auth login --with-project-token --project project_123 --profile project-work ``` -Profile metadata records its explicit project or organization owner. Credentials +Profile metadata records its explicit project or team owner. Credentials are stored separately in macOS Keychain, Windows Credential Manager, or Linux Secret Service. A keyring failure stops the command; the CLI never silently falls back to plaintext. `auth status` reports local secure-store availability @@ -194,7 +194,7 @@ polymorfa project current # show the project and where it comes from Commands resolve the project in this order: `--project`, the nearest `polymorfa.json` in the current directory or a parent, then the -profile's stored project. Organization-owned commands ignore linked and profile +profile's stored project. Team-owned commands ignore linked and profile projects. `--verbose` prints the link file in use. `project use` and `link` accept a UUID or a unique slug and store the canonical @@ -257,7 +257,7 @@ your shell to its startup file if you want completion in later sessions. ## Inspect sessions -Use an organization API key with `sessions:read` to inspect stored session +Use a team API key with `sessions:read` to inspect stored session metadata: ```shell @@ -272,12 +272,12 @@ Use a session ID from the list for `view` or `status`; these commands do not accept `--project`. `status` reads the stored status and optional reason from the session record. It does not probe the device or wait for a connection. Key metadata listing and revocation are available through `key list` and -`key revoke`; the CLI does not mint or rotate organization keys. +`key revoke`; the CLI does not mint or rotate team keys. ## QuickLinks A QuickLink is a persistent hosted link that connects one WhatsApp number to a -new session in a project. Create one from a JSON request with an organization +new session in a project. Create one from a JSON request with a team API key that has `quicklink:manage`: ```shell @@ -290,7 +290,7 @@ The request accepts `customerId`, `externalId`, and `configuration`. See [Guided session creation and configuration](#guided-session-creation-and-configuration) for the configuration fields. -Inspect or cancel a link with an organization API key or an exact-project +Inspect or cancel a link with a team API key or an exact-project token that has `quicklink:manage`: ```shell @@ -314,7 +314,7 @@ or history operation, so the CLI does not synthesize them. ## Customers -Manage Customers through the Platform API with an organization server key and +Manage Customers through the Platform API with a team server key and an explicit project ID: ```shell @@ -493,7 +493,7 @@ header. ### Flow drafts and provider lifecycle -Flow commands require a project scope and an organization API key or project +Flow commands require a project scope and a team API key or project token. Reads use `sessions:read`; mutations use `sessions:manage`. ```shell @@ -576,7 +576,7 @@ linked to another project; the API checks that the credential can access it. ### Official API observations and templates -The `cloud` commands require an organization API key or a project token with the +The `cloud` commands require a team API key or a project token with the listed scope. Client tokens cannot use these commands. Server-side feature access still applies: an installed command does not enroll a Number or enable a beta feature. @@ -1243,7 +1243,7 @@ sox greeting.wav -t raw -r 16000 -e signed -b 16 -c 1 - | \ Polymorfa checks every call against the team's call policy before the destination rings. `calls policy` and `calls opt-outs` read and change that -policy and require an organization API key (`POLYMORFA_API_KEY` or a profile). +policy and require a team API key (`POLYMORFA_API_KEY` or a profile). A project token used as the API key reaches the API, which refuses it with `403` (exit code 3). A client token is not a Platform credential, so the CLI refuses the command before sending a request (exit code 2). @@ -1322,9 +1322,9 @@ polymorfa calls check +14155550123 --session support ### Call statistics and export `calls stats` summarizes calls and `calls export` writes call detail records. -Both accept an organization API key or an exact-project token with the +Both accept a team API key or an exact-project token with the `sessions:read` scope. Pass `--project` to read one project. Without it, an -organization API key reads every project in the organization. A project token +team API key reads every project in the team. A project token reads only its own project and requires `--project`. ```shell @@ -1413,7 +1413,7 @@ or times out, the command keeps the password on screen and exits successfully. Voice Automation is a beta (`calls.voice-automation`) for enrolled teams only. For other teams, every change except delete fails with `voice_not_enabled`. Reads, previews and deletes keep working after a team leaves the beta. The -commands require an organization server API key with `voice:read` (lists, +commands require a team server API key with `voice:read` (lists, views, previews) or `voice:manage` (changes). ### Audio library @@ -1690,7 +1690,7 @@ request metadata. ## Platform access and security -Organization server API keys can inspect the credential, membership, audit, +Team server API keys can inspect the credential, membership, audit, ban, incident, saved QuickLink settings, and project-token metadata made available by the Platform API: @@ -1743,7 +1743,7 @@ bypass. returns `null` in JSON when no settings row has been saved. Update accepts one bounded JSON object from `--input`; the target project is selected separately with `--project` and cannot be hidden in that input. Omitting the -project targets organization defaults. Widget logo fields are existing storage +project targets team defaults. Widget logo fields are existing storage identifiers, not file, URL, base64, upload, or download operations. Widget access requires the `quicklink:manage` scope. @@ -1773,7 +1773,7 @@ enqueue another request, while repeated deletion counts only rows still present. ## Messaging campaigns -Campaign commands use organization Messaging API keys and require an explicit +Campaign commands use team Messaging API keys and require an explicit project slug because the source routes are slug-scoped: ```shell @@ -1935,7 +1935,7 @@ or stop a campaign's operation, use the `operation` commands in ## Campaign audiences -Audience commands are organization-scoped and use the Platform API: +Audience commands are team-scoped and use the Platform API: ```shell polymorfa audience create --name "August launch" \ @@ -1967,7 +1967,7 @@ recipient listing. ## Campaign opt-outs -Opt-out suppression is organization-wide. Keyword capture has its own settings: +Opt-out suppression is team-wide. Keyword capture has its own settings: ```shell polymorfa optout settings view @@ -1990,8 +1990,8 @@ recipient with `lastError` `opted_out`. ## Developer events and webhooks Developer resources always have an explicit owner. Project-owned commands need -`--owner project --project `. Organization-owned commands use -`--owner organization` and reject a project override. A stored profile can +`--owner project --project `. Team-owned commands use +`--owner team` and reject a project override. A stored profile can provide the owner, but the CLI never guesses it from a credential or retries a request against a different owner. @@ -2068,18 +2068,18 @@ operation ID in the JSON `operation.id` field. Follow it with Campaign sends, production enrollments, and other durable work are tracked as operations. The commands need `operations:read`; `operation cancel` needs -`operations:cancel`. With `--owner organization`, commands read team-owned +`operations:cancel`. With `--owner team`, commands read team-owned operations and every project's operations. With `--owner project`, they read one project. ```shell -polymorfa operation list --owner organization --status running -polymorfa operation list --owner organization \ +polymorfa operation list --owner team --status running +polymorfa operation list --owner team \ --resource-type campaign --resource-id campaign_123 -polymorfa operation view operation_123 --owner organization -polymorfa operation wait operation_123 --owner organization --timeout 600 -polymorfa operation watch operation_123 --owner organization -polymorfa operation cancel operation_123 --owner organization --yes +polymorfa operation view operation_123 --owner team +polymorfa operation wait operation_123 --owner team --timeout 600 +polymorfa operation watch operation_123 --owner team +polymorfa operation cancel operation_123 --owner team --yes ``` `operation wait` long-polls the API (up to 30 seconds per request) until the @@ -2253,7 +2253,7 @@ status, and safe counters, never primary credentials, listener credentials, forwarding secrets, or unrestricted payloads. `polymorfa_session_list` is a read-only discovery tool for one explicit project -UUID. It uses the selected CLI organization API key with `sessions:read` and +UUID. It uses the selected CLI team API key with `sessions:read` and returns session ID, name, stored status, and test-mode flag. It omits phone numbers, credentials, and message data. The tool does not probe the live device. Project tokens and Messaging client tokens cannot use this tool. A failed read @@ -2465,7 +2465,7 @@ the CLI never creates or confirms a replacement purchase automatically. ### Number tier changes -Tier changes use an organization API key. Quote first, review the credit charge +Tier changes use a team API key. Quote first, review the credit charge and effective time, then confirm that exact quote: ```shell @@ -2554,7 +2554,7 @@ polymorfa hybrid-link resume --session NUMBER --expected-revision REVISION For project and session routing scopes, `--project`, the nearest linked project, and the selected profile determine the project in that order. A project-token profile fails when its project differs from the linked directory. Team routing -scope uses an organization API key and ignores directory project links. `quicklink +scope uses a team API key and ignores directory project links. `quicklink availability` shows existing connection status and any QuickLink that can be resumed. @@ -2575,7 +2575,7 @@ transports within the restrictions inherited from the team and project. ### Functions -Functions are project-owned. Select `--project` or use the linked project/profile context. The commands accept an organization API key or a project token; browser client tokens are refused. Access also depends on the team's enabled Functions release and the configured execution region. +Functions are project-owned. Select `--project` or use the linked project/profile context. The commands accept a team API key or a project token; browser client tokens are refused. Access also depends on the team's enabled Functions release and the configured execution region. ```bash polymorfa function list --project PROJECT_UUID @@ -2660,7 +2660,7 @@ does not retrieve media or webhook deliveries. ### Spending limits and funding priority -With an organization key carrying `billing:read`, inspect current controls: +With a team key carrying `billing:read`, inspect current controls: ```bash polymorfa billing limits list --project --json diff --git a/contracts/abprops-capabilities.json b/contracts/abprops-capabilities.json index c3055b60..ca515dcf 100644 --- a/contracts/abprops-capabilities.json +++ b/contracts/abprops-capabilities.json @@ -430,7 +430,7 @@ "whatsapp_group_suspended", "whatsapp_group_has_no_participants", "bansafe_suspended", - "bansafe_org_suspended", + "bansafe_team_suspended", "bansafe_cold_blocked", "bansafe_cold_held", "bansafe_throttled", @@ -458,7 +458,7 @@ "request_log_url": { "type": "string", "format": "uri", - "description": "Console page that shows this request. Returned only to organization and project credentials whose request was logged." + "description": "Console page that shows this request. Returned only to team and project credentials whose request was logged." } }, "required": ["type", "code", "message", "param", "request_id"] diff --git a/contracts/cli-reference.json b/contracts/cli-reference.json index 432e7abe..4f62f8fd 100644 --- a/contracts/cli-reference.json +++ b/contracts/cli-reference.json @@ -109,8 +109,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -287,8 +287,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -552,8 +552,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -814,8 +814,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1011,8 +1011,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1192,8 +1192,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1326,8 +1326,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1397,8 +1397,8 @@ }, { "id": "audit-log list", - "summary": "List organization audit log entries.", - "description": "List organization audit log entries.", + "summary": "List team audit log entries.", + "description": "List team audit log entries.", "usage": ["polymorfa audit-log list [flags]"], "aliases": [], "hidden": false, @@ -1471,8 +1471,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1604,8 +1604,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1675,8 +1675,8 @@ }, { "id": "auth login", - "summary": "Store an organization key or project token in the operating-system keyring.", - "description": "Store an organization key or project token in the operating-system keyring.", + "summary": "Store a team key or project token in the operating-system keyring.", + "description": "Store a team key or project token in the operating-system keyring.", "usage": ["polymorfa auth login [flags]"], "aliases": [], "hidden": false, @@ -1725,8 +1725,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1870,8 +1870,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -1991,8 +1991,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -2119,8 +2119,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -2264,8 +2264,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -2423,8 +2423,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -2568,8 +2568,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -2713,8 +2713,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -2870,8 +2870,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3051,8 +3051,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3220,8 +3220,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3341,8 +3341,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3481,8 +3481,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3638,8 +3638,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3766,8 +3766,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -3911,8 +3911,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4080,8 +4080,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4232,8 +4232,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4377,8 +4377,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4498,8 +4498,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4650,8 +4650,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4778,8 +4778,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -4899,8 +4899,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5051,8 +5051,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5203,8 +5203,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5348,8 +5348,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5469,8 +5469,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5597,8 +5597,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5773,8 +5773,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -5881,7 +5881,7 @@ { "id": "billing limits list", "summary": "Read monthly project and number spending limits.", - "description": "Requires an organization key with billing:read. Use --project to include its number limits. Months reset on the first day at 00:00 UTC.", + "description": "Requires a team key with billing:read. Use --project to include its number limits. Months reset on the first day at 00:00 UTC.", "usage": ["polymorfa billing limits list [flags]"], "aliases": [], "hidden": false, @@ -5930,8 +5930,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6002,7 +6002,7 @@ { "id": "billing limits set", "summary": "Set or remove a monthly spending limit.", - "description": "Requires Pay-As-You-Go and an organization key with billing:manage. Zero blocks new charges; already-paid service continues. A stale observed revision fails without overwriting newer settings.", + "description": "Requires Pay-As-You-Go and a team key with billing:manage. Zero blocks new charges; already-paid service continues. A stale observed revision fails without overwriting newer settings.", "usage": ["polymorfa billing limits set ID [flags]"], "aliases": [], "hidden": false, @@ -6082,8 +6082,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6178,7 +6178,7 @@ { "id": "billing priority list", "summary": "Read project, customer and number funding priorities.", - "description": "Requires an organization key with billing:read. Project priority takes precedence. Numbers inherit customer priority; a higher number priority overrides it. Use --project for its funding controls. Includes the revision used for changes.", + "description": "Requires a team key with billing:read. Project priority takes precedence. Numbers inherit customer priority; a higher number priority overrides it. Use --project for its funding controls. Includes the revision used for changes.", "usage": ["polymorfa billing priority list [flags]"], "aliases": [], "hidden": false, @@ -6227,8 +6227,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6299,7 +6299,7 @@ { "id": "billing priority reorder", "summary": "Save a complete funding order atomically.", - "description": "Requires Pay-As-You-Go and an organization key with billing:manage. Pass every active project, customer or real number for its scope. Resource scope mixes all customers and numbers in --project, highest first. Incomplete or stale orders fail without partial changes.", + "description": "Requires Pay-As-You-Go and a team key with billing:manage. Pass every active project, customer or real number for its scope. Resource scope mixes all customers and numbers in --project, highest first. Incomplete or stale orders fail without partial changes.", "usage": ["polymorfa billing priority reorder [flags]"], "aliases": [], "hidden": false, @@ -6384,8 +6384,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6468,7 +6468,7 @@ { "id": "billing priority set", "summary": "Set a project or number funding priority.", - "description": "Requires Pay-As-You-Go and an organization key with billing:manage. Changes future renewal protection and recovery; paid windows keep their expiry.", + "description": "Requires Pay-As-You-Go and a team key with billing:manage. Changes future renewal protection and recovery; paid windows keep their expiry.", "usage": ["polymorfa billing priority set ID [flags]"], "aliases": [], "hidden": false, @@ -6536,8 +6536,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6681,8 +6681,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6838,8 +6838,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -6983,8 +6983,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -7164,8 +7164,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -7328,8 +7328,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -7497,8 +7497,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -7661,8 +7661,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -7866,8 +7866,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8035,8 +8035,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8211,8 +8211,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8411,8 +8411,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8580,8 +8580,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8713,8 +8713,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8846,8 +8846,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -8998,8 +8998,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -9162,8 +9162,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -9331,8 +9331,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -9483,8 +9483,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -9659,8 +9659,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -9811,8 +9811,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -9975,8 +9975,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -10127,8 +10127,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -10296,8 +10296,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -10465,8 +10465,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -10598,8 +10598,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -10762,8 +10762,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -10914,8 +10914,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -11072,8 +11072,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -11221,8 +11221,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -11295,7 +11295,7 @@ { "id": "calls export", "summary": "Export call detail records.", - "description": "Export call detail records as CSV or newline-delimited JSON, newest first.\n\nEach record has callId, projectId, sessionId, direction, upstream, outcome, state, hasVideo, peerRef, startedAt, connectedAt, endedAt, durationSeconds, and endReason. peerRef is a team-specific pseudonym of the other party, never a phone number.\n\nThe command requests every page until no records remain and writes one CSV header. Records go to standard output, or to --output. Progress and the next cursor go to standard error, as JSON lines with --json. --max-pages stops early; resume with --cursor and the same filters. When a page fails, the command reports the cursor that resumes from that page and exits non-zero.\n\nPass --project to read one project. Without it, an organization API key reads every project in the organization. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.", + "description": "Export call detail records as CSV or newline-delimited JSON, newest first.\n\nEach record has callId, projectId, sessionId, direction, upstream, outcome, state, hasVideo, peerRef, startedAt, connectedAt, endedAt, durationSeconds, and endReason. peerRef is a team-specific pseudonym of the other party, never a phone number.\n\nThe command requests every page until no records remain and writes one CSV header. Records go to standard output, or to --output. Progress and the next cursor go to standard error, as JSON lines with --json. --max-pages stops early; resume with --cursor and the same filters. When a page fails, the command reports the cursor that resumes from that page and exits non-zero.\n\nPass --project to read one project. Without it, a team API key reads every project in the team. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.", "usage": ["polymorfa calls export [flags]"], "aliases": [], "hidden": false, @@ -11446,8 +11446,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -11651,8 +11651,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -11814,8 +11814,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -11959,8 +11959,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -12097,8 +12097,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -12251,8 +12251,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -12459,8 +12459,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -12704,8 +12704,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -12837,7 +12837,7 @@ { "id": "calls opt-outs add", "summary": "Add a person to the do-not-call list.", - "description": "Add a person to the team’s do-not-call list by phone number or BSUID. From then on, calls to them are refused with call_recipient_opted_out, including calls your PBX places through a SIP trunk. Adding a person already on the list changes nothing and returns their entry (metadata.status 200 instead of 201). The list holds up to 100,000 entries; a full list fails with call_opt_out_limit (exit code 4). Requires an organization API key.", + "description": "Add a person to the team’s do-not-call list by phone number or BSUID. From then on, calls to them are refused with call_recipient_opted_out, including calls your PBX places through a SIP trunk. Adding a person already on the list changes nothing and returns their entry (metadata.status 200 instead of 201). The list holds up to 100,000 entries; a full list fails with call_opt_out_limit (exit code 4). Requires a team API key.", "usage": ["polymorfa calls opt-outs add [flags]"], "aliases": [], "hidden": false, @@ -12910,8 +12910,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -13003,7 +13003,7 @@ { "id": "calls opt-outs import", "summary": "Import entries into the do-not-call list.", - "description": "Add many people to the team’s do-not-call list from a file of up to 10 MiB. CSV needs a header row naming phoneNumber, bsuid and optionally note; each row names a phone number (E.164) or a BSUID. JSON is an array of {\"phoneNumber\" | \"bsuid\", \"note\"} objects, or an object with that array as \"entries\". The CLI sends 5,000 entries per request and reports the entries added, already listed and rejected, with each rejected entry's zero-based position (and CSV line). Running an import again is safe: entries already on the list are counted as already listed. Exit codes: 0 when every entry is listed; 12 when some entries were rejected, or when a later request failed after earlier batches were stored (run the import again); the request's own exit code when nothing was stored. Requires an organization API key.", + "description": "Add many people to the team’s do-not-call list from a file of up to 10 MiB. CSV needs a header row naming phoneNumber, bsuid and optionally note; each row names a phone number (E.164) or a BSUID. JSON is an array of {\"phoneNumber\" | \"bsuid\", \"note\"} objects, or an object with that array as \"entries\". The CLI sends 5,000 entries per request and reports the entries added, already listed and rejected, with each rejected entry's zero-based position (and CSV line). Running an import again is safe: entries already on the list are counted as already listed. Exit codes: 0 when every entry is listed; 12 when some entries were rejected, or when a later request failed after earlier batches were stored (run the import again); the request's own exit code when nothing was stored. Requires a team API key.", "usage": ["polymorfa calls opt-outs import FILE [flags]"], "aliases": [], "hidden": false, @@ -13071,8 +13071,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -13156,7 +13156,7 @@ { "id": "calls opt-outs list", "summary": "List the do-not-call list.", - "description": "List the team’s do-not-call list, newest first. One page is returned unless --paginate follows page.nextCursor up to --max-items entries; human output ends with the --cursor for the next page. --phone-number or --bsuid returns only that person’s entry, if any. Requires an organization API key.", + "description": "List the team’s do-not-call list, newest first. One page is returned unless --paginate follows page.nextCursor up to --max-items entries; human output ends with the --cursor for the next page. --phone-number or --bsuid returns only that person’s entry, if any. Requires a team API key.", "usage": ["polymorfa calls opt-outs list [flags]"], "aliases": [], "hidden": false, @@ -13253,8 +13253,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -13359,7 +13359,7 @@ { "id": "calls opt-outs remove", "summary": "Remove a person from the do-not-call list.", - "description": "Remove one entry from the team’s do-not-call list. The person can be called again at once. Requires --yes and an organization API key; an unknown ID fails with exit code 4.", + "description": "Remove one entry from the team’s do-not-call list. The person can be called again at once. Requires --yes and a team API key; an unknown ID fails with exit code 4.", "usage": ["polymorfa calls opt-outs remove OPTOUTID [flags]"], "aliases": [], "hidden": false, @@ -13415,8 +13415,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -13560,8 +13560,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -13733,8 +13733,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -13890,8 +13890,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -14080,8 +14080,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -14209,7 +14209,7 @@ { "id": "calls policy get", "summary": "Read the team call policy.", - "description": "Read the team call policy: the blocked country codes, the number of entries on the do-not-call list, and the revision to pass to `calls policy set --expected-revision`. The revision is 0 before the codes are first saved. Requires an organization API key: a project token used as the API key is refused by the API (exit code 3), and a client token is not accepted for this command (exit code 2).", + "description": "Read the team call policy: the blocked country codes, the number of entries on the do-not-call list, and the revision to pass to `calls policy set --expected-revision`. The revision is 0 before the codes are first saved. Requires a team API key: a project token used as the API key is refused by the API (exit code 3), and a client token is not accepted for this command (exit code 2).", "usage": ["polymorfa calls policy get [flags]"], "aliases": [], "hidden": false, @@ -14258,8 +14258,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -14332,7 +14332,7 @@ { "id": "calls policy set", "summary": "Replace the blocked country codes.", - "description": "Replace the team’s blocked country codes. Calls to phone numbers that start with a blocked code are refused with call_destination_blocked, and while any code is blocked, calls to a person whose phone number is not known are refused too. The list you pass replaces the stored list; --clear allows every country. Codes are country calling codes or longer dialing prefixes of 1 to 4 digits (44, 1876), at most 300. New calls use the new list at once; calls in progress continue. --expected-revision applies the change only if the policy still has that revision (see `calls policy get`); otherwise the command fails with state_conflict (exit code 4) and changes nothing. Requires an organization API key.", + "description": "Replace the team’s blocked country codes. Calls to phone numbers that start with a blocked code are refused with call_destination_blocked, and while any code is blocked, calls to a person whose phone number is not known are refused too. The list you pass replaces the stored list; --clear allows every country. Codes are country calling codes or longer dialing prefixes of 1 to 4 digits (44, 1876), at most 300. New calls use the new list at once; calls in progress continue. --expected-revision applies the change only if the policy still has that revision (see `calls policy get`); otherwise the command fails with state_conflict (exit code 4) and changes nothing. Requires a team API key.", "usage": ["polymorfa calls policy set [flags]"], "aliases": [], "hidden": false, @@ -14417,8 +14417,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -14594,8 +14594,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -14739,8 +14739,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -14878,8 +14878,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -15025,8 +15025,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -15196,8 +15196,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -15322,8 +15322,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -15532,8 +15532,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -15681,7 +15681,7 @@ { "id": "calls stats", "summary": "Summarize call volume, outcomes, and duration.", - "description": "Summarize calls: counts by outcome, answer rate, and connected time, grouped by day, hour, session, or outcome.\n\nThe range defaults to the last 7 days. --group-by day covers at most 366 days and --group-by hour at most 31. Day and hour buckets, and the heatmap, use --timezone (UTC by default).\n\nPass --project to read one project. Without it, an organization API key reads every project in the organization. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.", + "description": "Summarize calls: counts by outcome, answer rate, and connected time, grouped by day, hour, session, or outcome.\n\nThe range defaults to the last 7 days. --group-by day covers at most 366 days and --group-by hour at most 31. Day and hour buckets, and the heatmap, use --timezone (UTC by default).\n\nPass --project to read one project. Without it, a team API key reads every project in the team. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.", "usage": ["polymorfa calls stats [flags]"], "aliases": [], "hidden": false, @@ -15784,8 +15784,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -15987,8 +15987,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -16122,8 +16122,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -16287,8 +16287,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -16487,8 +16487,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -16644,8 +16644,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -16878,8 +16878,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17066,8 +17066,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17242,8 +17242,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17387,8 +17387,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17539,8 +17539,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17715,8 +17715,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17912,8 +17912,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18113,8 +18113,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18265,8 +18265,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18417,8 +18417,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18550,8 +18550,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18678,8 +18678,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18818,8 +18818,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18963,8 +18963,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -19103,8 +19103,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -19224,8 +19224,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -19345,8 +19345,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -19502,8 +19502,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -19654,8 +19654,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -19890,8 +19890,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -20066,8 +20066,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -20235,8 +20235,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -20387,8 +20387,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -20551,8 +20551,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -20684,8 +20684,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -20836,8 +20836,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21000,8 +21000,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21160,8 +21160,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21318,8 +21318,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21494,8 +21494,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21658,8 +21658,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21810,8 +21810,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -21962,8 +21962,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -22102,8 +22102,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -22295,8 +22295,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -22483,8 +22483,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -22701,8 +22701,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -22852,8 +22852,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -22992,8 +22992,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -23161,8 +23161,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -23342,8 +23342,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -23475,8 +23475,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -23608,8 +23608,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -23777,8 +23777,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -23941,8 +23941,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -24093,8 +24093,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -24245,8 +24245,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -24409,8 +24409,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -24585,8 +24585,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -24737,8 +24737,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -24918,8 +24918,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -25094,8 +25094,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -25258,8 +25258,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -25434,8 +25434,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -25591,8 +25591,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -25724,8 +25724,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -25888,8 +25888,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26045,8 +26045,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26197,8 +26197,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26373,8 +26373,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26525,8 +26525,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26658,8 +26658,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26833,8 +26833,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -26966,8 +26966,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27106,8 +27106,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27239,8 +27239,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27391,8 +27391,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27531,8 +27531,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27664,8 +27664,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27804,8 +27804,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -27956,8 +27956,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -28096,8 +28096,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -28248,8 +28248,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -28417,8 +28417,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -28550,8 +28550,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -28690,8 +28690,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -28871,8 +28871,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29023,8 +29023,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29181,8 +29181,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29369,8 +29369,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29497,8 +29497,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29631,8 +29631,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29783,8 +29783,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -29904,8 +29904,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -30080,8 +30080,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -30208,8 +30208,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -30402,8 +30402,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -30562,8 +30562,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -30750,8 +30750,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -30931,8 +30931,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31092,8 +31092,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31225,8 +31225,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31353,8 +31353,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31493,8 +31493,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31657,8 +31657,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31821,8 +31821,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -31973,8 +31973,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -32125,8 +32125,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -32325,8 +32325,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -32489,8 +32489,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -32610,8 +32610,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -32755,8 +32755,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -32912,8 +32912,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33057,8 +33057,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33202,8 +33202,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33330,8 +33330,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33494,8 +33494,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33622,8 +33622,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33786,8 +33786,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -33935,8 +33935,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34092,8 +34092,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34232,8 +34232,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34384,8 +34384,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34536,8 +34536,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34684,8 +34684,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34820,8 +34820,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -34972,8 +34972,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35124,8 +35124,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35260,8 +35260,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35405,8 +35405,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35545,8 +35545,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35697,8 +35697,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35831,8 +35831,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -35983,8 +35983,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -36111,8 +36111,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -36239,8 +36239,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -36405,8 +36405,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -36574,8 +36574,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -36731,8 +36731,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -36864,8 +36864,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -37016,8 +37016,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -37185,8 +37185,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -37342,8 +37342,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -37494,8 +37494,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -37663,8 +37663,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -37880,8 +37880,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38037,8 +38037,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38194,8 +38194,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38339,8 +38339,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38484,8 +38484,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38617,8 +38617,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38762,8 +38762,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -38893,8 +38893,8 @@ }, { "id": "key list", - "summary": "List organization API-key metadata (never raw key material).", - "description": "List organization API-key metadata (never raw key material).", + "summary": "List team API-key metadata (never raw key material).", + "description": "List team API-key metadata (never raw key material).", "usage": ["polymorfa key list [flags]"], "aliases": [], "hidden": false, @@ -38943,8 +38943,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -39014,8 +39014,8 @@ }, { "id": "key revoke", - "summary": "Revoke an organization API key.", - "description": "Revoke an organization API key.", + "summary": "Revoke a team API key.", + "description": "Revoke a team API key.", "usage": ["polymorfa key revoke KEY [flags]"], "aliases": [], "hidden": false, @@ -39083,8 +39083,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -39235,8 +39235,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -39411,8 +39411,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -39580,8 +39580,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -39732,8 +39732,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -39889,8 +39889,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -40065,8 +40065,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -40210,8 +40210,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -40458,8 +40458,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -40483,7 +40483,7 @@ "multiple": false, "default": null, "options": [], - "description": "Use a project UUID; organization API keys may use a unique slug. Defaults to the linked or profile project.", + "description": "Use a project UUID; team API keys may use a unique slug. Defaults to the linked or profile project.", "env": null, "helpGroup": null }, @@ -40639,8 +40639,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -40901,8 +40901,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41107,8 +41107,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41235,8 +41235,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41356,8 +41356,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41484,8 +41484,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41605,8 +41605,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41733,8 +41733,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -41909,8 +41909,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -42074,8 +42074,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -42202,8 +42202,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -42273,8 +42273,8 @@ }, { "id": "member list", - "summary": "List organization members.", - "description": "List organization members.", + "summary": "List team members.", + "description": "List team members.", "usage": ["polymorfa member list [flags]"], "aliases": [], "hidden": false, @@ -42323,8 +42323,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -42475,8 +42475,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -42680,8 +42680,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -42861,8 +42861,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -43001,8 +43001,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -43177,8 +43177,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -43394,8 +43394,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -43668,8 +43668,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -43918,8 +43918,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -44216,8 +44216,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -44490,8 +44490,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -44752,8 +44752,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -45022,8 +45022,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -45220,8 +45220,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -45441,8 +45441,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -45687,8 +45687,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -45945,8 +45945,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -46171,8 +46171,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -46424,8 +46424,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -46645,8 +46645,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -46826,8 +46826,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -46990,8 +46990,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -47171,8 +47171,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -47388,8 +47388,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -47516,8 +47516,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -47649,8 +47649,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -47720,8 +47720,8 @@ }, { "id": "optout settings update", - "summary": "Replace the organization’s STOP and START keyword capture settings. Every field is replaced, so pass the complete keyword set.", - "description": "Replace the organization’s STOP and START keyword capture settings. Every field is replaced, so pass the complete keyword set.", + "summary": "Replace the team’s STOP and START keyword capture settings. Every field is replaced, so pass the complete keyword set.", + "description": "Replace the team’s STOP and START keyword capture settings. Every field is replaced, so pass the complete keyword set.", "usage": ["polymorfa optout settings update [flags]"], "aliases": [], "hidden": false, @@ -47818,8 +47818,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -47898,8 +47898,8 @@ }, { "id": "optout settings view", - "summary": "Show the organization’s STOP and START keyword capture settings.", - "description": "Show the organization’s STOP and START keyword capture settings.", + "summary": "Show the team’s STOP and START keyword capture settings.", + "description": "Show the team’s STOP and START keyword capture settings.", "usage": ["polymorfa optout settings view [flags]"], "aliases": [], "hidden": false, @@ -47948,8 +47948,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48088,8 +48088,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48228,8 +48228,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48373,8 +48373,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48518,8 +48518,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48675,8 +48675,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48820,8 +48820,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -48977,8 +48977,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -49134,8 +49134,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -49279,8 +49279,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -49448,8 +49448,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -49605,8 +49605,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -49750,8 +49750,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -49883,8 +49883,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50004,8 +50004,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50125,8 +50125,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50253,8 +50253,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50428,8 +50428,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50592,8 +50592,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50737,8 +50737,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -50925,8 +50925,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -51070,8 +51070,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -51210,8 +51210,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -51391,8 +51391,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -51555,8 +51555,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -51676,8 +51676,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -51857,8 +51857,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52033,8 +52033,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52104,8 +52104,8 @@ }, { "id": "security-incident list", - "summary": "List organization security incidents.", - "description": "List organization security incidents.", + "summary": "List team security incidents.", + "description": "List team security incidents.", "usage": ["polymorfa security-incident list [flags]"], "aliases": [], "hidden": false, @@ -52154,8 +52154,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52225,8 +52225,8 @@ }, { "id": "session-ban list", - "summary": "List recorded organization session bans.", - "description": "List recorded organization session bans.", + "summary": "List recorded team session bans.", + "description": "List recorded team session bans.", "usage": ["polymorfa session-ban list [flags]"], "aliases": [], "hidden": false, @@ -52287,8 +52287,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52415,8 +52415,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52552,8 +52552,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52692,8 +52692,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52832,8 +52832,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -52965,8 +52965,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53041,8 +53041,8 @@ }, { "id": "session list", - "summary": "List session metadata for the team or one project. Requires an organization API key with sessions:read.", - "description": "List session metadata for the team or one project. Requires an organization API key with sessions:read.", + "summary": "List session metadata for the team or one project. Requires a team API key with sessions:read.", + "description": "List session metadata for the team or one project. Requires a team API key with sessions:read.", "usage": ["polymorfa session list [flags]"], "aliases": [], "hidden": false, @@ -53091,8 +53091,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53168,8 +53168,8 @@ }, { "id": "session status", - "summary": "Read the stored session status and reason. Requires an organization API key with sessions:read.", - "description": "Read the stored session status and reason. Requires an organization API key with sessions:read.", + "summary": "Read the stored session status and reason. Requires a team API key with sessions:read.", + "description": "Read the stored session status and reason. Requires a team API key with sessions:read.", "usage": ["polymorfa session status SESSION [flags]"], "aliases": [], "hidden": false, @@ -53225,8 +53225,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53367,8 +53367,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53507,8 +53507,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53700,8 +53700,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53887,8 +53887,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -53963,8 +53963,8 @@ }, { "id": "session view", - "summary": "Read one session by its ID. Requires an organization API key with sessions:read.", - "description": "Read one session by its ID. Requires an organization API key with sessions:read.", + "summary": "Read one session by its ID. Requires a team API key with sessions:read.", + "description": "Read one session by its ID. Requires a team API key with sessions:read.", "usage": ["polymorfa session view SESSION [flags]"], "aliases": [], "hidden": false, @@ -54020,8 +54020,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -54158,8 +54158,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -54291,8 +54291,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -54424,8 +54424,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -54548,8 +54548,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -54681,8 +54681,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -54869,8 +54869,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55006,8 +55006,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55134,8 +55134,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55303,8 +55303,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55489,8 +55489,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55651,8 +55651,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55838,8 +55838,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -55992,8 +55992,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56150,8 +56150,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56283,8 +56283,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56411,8 +56411,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56568,8 +56568,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56747,8 +56747,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56913,8 +56913,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -57158,8 +57158,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -57319,8 +57319,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -57492,8 +57492,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -57637,8 +57637,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -57790,8 +57790,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -57923,8 +57923,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58057,8 +58057,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58185,8 +58185,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58330,8 +58330,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58494,8 +58494,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58670,8 +58670,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58818,8 +58818,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -58987,8 +58987,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -59193,8 +59193,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -59333,8 +59333,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -59490,8 +59490,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -59654,8 +59654,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -59842,8 +59842,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -59994,8 +59994,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -60134,8 +60134,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -60205,8 +60205,8 @@ }, { "id": "widget update", - "summary": "Update saved Connect widget settings for the organization or one project.", - "description": "Update saved Connect widget settings for the organization or one project.", + "summary": "Update saved Connect widget settings for the team or one project.", + "description": "Update saved Connect widget settings for the team or one project.", "usage": ["polymorfa widget update [flags]"], "aliases": [], "hidden": false, @@ -60279,8 +60279,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -60350,8 +60350,8 @@ }, { "id": "widget view", - "summary": "View saved Connect widget settings for the organization or one project.", - "description": "View saved Connect widget settings for the organization or one project.", + "summary": "View saved Connect widget settings for the team or one project.", + "description": "View saved Connect widget settings for the team or one project.", "usage": ["polymorfa widget view [flags]"], "aliases": [], "hidden": false, @@ -60400,8 +60400,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, diff --git a/docs/command-research/business-app.md b/docs/command-research/business-app.md index 647354b5..88c07a31 100644 --- a/docs/command-research/business-app.md +++ b/docs/command-research/business-app.md @@ -61,7 +61,7 @@ business view ``` -These 25 operations require an organization/server API key and an active Linked +These 25 operations require a team/server API key and an active Linked Device session. They do not support project credentials, browser client tokens, or Cloud API sessions. Reads retain the exact `profile:read` or `business:read` scope boundaries; mutations retain `profile:write`. The CLI fails client tokens diff --git a/docs/command-research/call-consent.md b/docs/command-research/call-consent.md index 1838411e..ae7ad82f 100644 --- a/docs/command-research/call-consent.md +++ b/docs/command-research/call-consent.md @@ -69,7 +69,7 @@ package metadata. ## Credential rules - `calls policy` and `calls opt-outs` resolve Platform credentials, so they - require an organization API key. The API answers a project token or client + require a team API key. The API answers a project token or client token with `403 permission_denied`, which exits with code 3. - `calls permission get` and `calls check` require a server API key. The CLI refuses a Messaging client token before sending a request, because the API diff --git a/docs/command-research/calls-lids-users.md b/docs/command-research/calls-lids-users.md index d9bf199a..bc306f5f 100644 --- a/docs/command-research/calls-lids-users.md +++ b/docs/command-research/calls-lids-users.md @@ -30,7 +30,7 @@ user security-code ``` -All commands require an organization/server API key, an active Linked Device +All commands require a team/server API key, an active Linked Device session, and encoded identifiers. Project credentials, browser client tokens, Cloud API sessions, dashboard sessions, and staff identities are rejected. Call rejection requires `chats:manage`; LID resolution and security-code lookup diff --git a/docs/command-research/calls.md b/docs/command-research/calls.md index 040d451e..99c06ed7 100644 --- a/docs/command-research/calls.md +++ b/docs/command-research/calls.md @@ -125,11 +125,11 @@ internal SDK module. mode to satisfy the older validator. Other settings-only updates retain the typed SDK method. The dependency pin is unchanged, and the local type extensions remain until a matching SDK package is accepted. -- `calls stats` and `calls export` accept an organization API key or an +- `calls stats` and `calls export` accept a team API key or an exact-project token (`sessions:read`), resolved like the developer commands. `--project` (or a project token, which requires it) reads one - project; an organization key without `--project` reads the whole - organization. `--owner` still overrides the inferred owner. + project; a team key without `--project` reads the whole + team. `--owner` still overrides the inferred owner. - `calls retention` resolves a team API key or a project token (`resolveTeamSettingEnvironment`), from the environment or a profile, with no project context, and the API decides what each principal may do. diff --git a/docs/command-research/campaigns.md b/docs/command-research/campaigns.md index 7135187f..50c20950 100644 --- a/docs/command-research/campaigns.md +++ b/docs/command-research/campaigns.md @@ -57,7 +57,7 @@ optout ``` The CLI uses only `MessagingClient.campaigns`. Every campaign command requires an -organization Messaging API key. Reads require `campaigns:read`; creation and +team Messaging API key. Reads require `campaigns:read`; creation and lifecycle mutations require `campaigns:manage`. The CLI rejects browser client tokens before transport. It does not broaden the SDK to project tokens even though the live middleware has a separately bound project-token path. @@ -175,7 +175,7 @@ The same revision declares `projectId` as a query parameter on the single-campaign Platform operations, and a later one declares the `409` that update answers after launch. No CLI command calls those operations, so no flag changed. The API schema permits an omitted `projectId` for project tokens; -the SDK's organization-only campaign resource requires it. Its create method +the SDK's team-only campaign resource requires it. Its create method also requires the typed `CreatePlatformCampaignRequest` with a name and project ID. CLI campaign commands still use the separate Messaging resource with an explicit project slug. diff --git a/docs/command-research/customers.md b/docs/command-research/customers.md index 36148233..1b1d8ae3 100644 --- a/docs/command-research/customers.md +++ b/docs/command-research/customers.md @@ -1,7 +1,7 @@ # Customer command contract The Customer command family maps the complete public Customers surface in the -Platform contract. Every request uses an organization server API key and an +Platform contract. Every request uses a team server API key and an explicit project ID. | Command | Platform operation | diff --git a/docs/command-research/developer-events-webhooks.md b/docs/command-research/developer-events-webhooks.md index 086d26e4..93d2822b 100644 --- a/docs/command-research/developer-events-webhooks.md +++ b/docs/command-research/developer-events-webhooks.md @@ -35,7 +35,7 @@ listen mcp serve|install|uninstall|status|tools|doctor ``` -Developer resources have an explicit `project` or `organization` owner. A +Developer resources have an explicit `project` or `team` owner. A stored profile may fix that choice; otherwise `--owner` is required before any transport. Project ownership also requires exact project context. The CLI never probes one owner after another and never treats a credential prefix, resource diff --git a/docs/command-research/platform-management.md b/docs/command-research/platform-management.md index 7ee1b727..af5d1866 100644 --- a/docs/command-research/platform-management.md +++ b/docs/command-research/platform-management.md @@ -1,6 +1,6 @@ # Platform management command research -- **Status:** Organization-key management commands reconciled with the unified +- **Status:** Team-key management commands reconciled with the unified client; operation inspection is console-only - **Reviewed:** 2026-09-16 - **SDK baseline:** `08452992a32a392de5fc3d0fa3954ba6addd7f32` @@ -46,7 +46,7 @@ security-incident acknowledge operation - list|view|wait|watch|cancel --owner + list|view|wait|watch|cancel --owner project-token list --project @@ -56,8 +56,8 @@ session delete [--project ] --yes ``` -The management commands use the public typed organization resources on the -unified SDK `Client`. They require an organization server API key. Reads require +The management commands use the public typed team resources on the +unified SDK `Client`. They require a team server API key. Reads require `sessions:read`; key revocation and incident acknowledgement require `sessions:manage`; batch session stop/delete also require `sessions:manage`. Project tokens and Messaging browser client tokens are rejected before @@ -85,14 +85,14 @@ without cursor semantics. `session-ban list --active` keeps one discovery command while selecting the SDK's distinct active-only operation. Incident acknowledgement is repeatable, has no confirmation gate, and sends no body. `acknowledgedBy` may be empty when -an organization key performed the acknowledgement. +a team key performed the acknowledgement. The original singular Platform operation view was removed. Operation inspection is console-only at API contract 1600403, and the pinned SDK has no operations resource, so the CLI ships no operation commands. The unpublished `--surface` selector was removed. Project-token listing requires an explicit project because the live -organization-key handler rejects an absent project even though its OpenAPI +team-key handler rejects an absent project even though its OpenAPI query field is optional. Only metadata is returned. Batch session commands use positional IDs because they are the primary action @@ -110,7 +110,7 @@ without claiming stronger server behavior. ## Explicit gaps -There is no organization-key member mutation, API-key creation or rotation, +There is no team-key member mutation, API-key creation or rotation, project-token minting or revocation, raw bearer material, cross-project token aggregate, incident detail, management-list pagination, security-state aggregation, batch per-item result, or machine-credential operation inspection diff --git a/docs/command-research/quicklinks.md b/docs/command-research/quicklinks.md index 6afffae7..3b30b289 100644 --- a/docs/command-research/quicklinks.md +++ b/docs/command-research/quicklinks.md @@ -21,16 +21,16 @@ on the hosted page and preserves entitlement boundaries around direct pairing. | `quicklink view` | `MessagingClient.quickLinks.retrieve` | `GET /messaging/quicklinks/{id}` | Read one link's status and onboarding progress | | `quicklink cancel` | `MessagingClient.quickLinks.cancel` | `DELETE /messaging/quicklinks/{id}` | Invalidate an unconnected link; initial Number/session cleanup can continue after acceptance | -All three routes require `quicklink:manage`. The API accepts organization keys +All three routes require `quicklink:manage`. The API accepts team keys and exact-project tokens and scopes project tokens to their own project. `quicklink create` takes one JSON object from `--input` with `projectId`, `customerId`, `externalId`, and `configuration`, and rejects other top-level fields before transport. Presentation and callbacks belong in saved settings -(`widget view|update`). It uses an organization API key; project-token support +(`widget view|update`). It uses a team API key; project-token support for creation is not exposed by this command. -`quicklink view` and `quicklink cancel` accept an organization API key or an +`quicklink view` and `quicklink cancel` accept a team API key or an exact-project token and require explicit project context. Browser client tokens fail before transport. Cancellation requires TTY confirmation or `--yes` before a client is constructed. The route does not read an `Idempotency-Key`, so the diff --git a/docs/command-research/voice.md b/docs/command-research/voice.md index 1cb61ad9..00b2c8af 100644 --- a/docs/command-research/voice.md +++ b/docs/command-research/voice.md @@ -79,7 +79,7 @@ URL itself with no credential, no redirects, a bounded response, and a timeout. ## Credential rules -- The commands resolve Platform credentials: an organization server API key +- The commands resolve Platform credentials: a team server API key (`POLYMORFA_API_KEY` or an API-key profile). Client tokens fail before any request. The API also accepts project tokens; the CLI does not use them for these commands, matching `sip-trunk`. diff --git a/docs/development/bansafe-sdk-integration.md b/docs/development/bansafe-sdk-integration.md index 2dc9b2fc..ea1ce065 100644 --- a/docs/development/bansafe-sdk-integration.md +++ b/docs/development/bansafe-sdk-integration.md @@ -64,7 +64,7 @@ dependency. The CLI mapping covers all 25 Platform BanSafe operations in the SDK coverage ledger. The SDK also covers the 10 equivalent Messaging settings routes through `MessagingClient.banSafe`; the CLI uses the Platform routes for those settings -because BanSafe commands authenticate with an organization server API key. +because BanSafe commands authenticate with a team server API key. | SDK operations | CLI commands | | ------------------------------------------------------------ | ---------------------------------------------------------- | diff --git a/docs/superpowers/plans/2026-08-19-cli-foundation-and-api.md b/docs/superpowers/plans/2026-08-19-cli-foundation-and-api.md index 5a820bb0..2ba0d87c 100644 --- a/docs/superpowers/plans/2026-08-19-cli-foundation-and-api.md +++ b/docs/superpowers/plans/2026-08-19-cli-foundation-and-api.md @@ -229,7 +229,7 @@ export function renderValue( } ``` -Define `BaseCommand` with inherited flags `--json`, `--quiet`, `--no-color`, `--profile`, `--project`, `--api-version`, `--timeout`, and `--verbose`. Make `--json` and `--quiet` mutually exclusive. Organization-owned requests use the organization bound to the selected key; do not expose a cosmetic organization override. Add `outputMode(flags)` and `writeValue(value, human)` helpers that write only to stdout. +Define `BaseCommand` with inherited flags `--json`, `--quiet`, `--no-color`, `--profile`, `--project`, `--api-version`, `--timeout`, and `--verbose`. Make `--json` and `--quiet` mutually exclusive. Team-owned requests use the team bound to the selected key; do not expose a cosmetic team override. Add `outputMode(flags)` and `writeValue(value, human)` helpers that write only to stdout. Change `version` to extend `BaseCommand`, parse its flags, and render `{cli, sdk}` in JSON or the existing literal in human mode. @@ -433,7 +433,7 @@ export function createRawClient(environment: ResolvedEnvironment): RawClient { if (environment.surface === 'platform') { return new Client({ credential: { - type: 'organizationApiKey', + type: 'teamApiKey', value: environment.credential.value, }, ...shared, diff --git a/docs/superpowers/specs/2026-08-19-polymorfa-cli-design.md b/docs/superpowers/specs/2026-08-19-polymorfa-cli-design.md index b1b24a4e..8daa0cb1 100644 --- a/docs/superpowers/specs/2026-08-19-polymorfa-cli-design.md +++ b/docs/superpowers/specs/2026-08-19-polymorfa-cli-design.md @@ -32,7 +32,7 @@ prompts, output, errors, and workflows are written and reviewed by hand. 3. **One behavior across humans and agents.** CLI commands and MCP tools call the same application services and share validation, authorization, and error handling. -4. **Make context visible.** Organization, project, environment, API surface, +4. **Make context visible.** Team, project, environment, API surface, and profile are shown before consequential actions and in verbose output. 5. **Never leak credentials.** Secrets do not appear in arguments, config files, debug logs, shell history, MCP results, or generated support bundles. @@ -135,8 +135,8 @@ LID resolution, user security codes, business profiles, catalogs, products, collections, orders, compliance, observation policies, webhooks, client tokens, project templates, project-scoped campaigns, and all 33 signed event payload schemas plus Platform -organizations, projects, sessions, billing, campaigns, audiences, opt-outs, -media, organization API keys, members, audit logs, session bans, security +teams, projects, sessions, billing, campaigns, audiences, opt-outs, +media, team API keys, members, audit logs, session bans, security incidents, project-token metadata, saved QuickLink (widget) settings, and batch session stop/delete. Curated commands do not use the SDK's raw escape hatch to paper over a missing public contract. The explicit `api` command is @@ -193,8 +193,8 @@ choosing the first result. ### Global context flags - `--profile ` selects stored authentication and defaults. -- Organization-owned API requests use the organization bound to the selected - key. The CLI does not accept an organization override that could relabel a +- Team-owned API requests use the team bound to the selected + key. The CLI does not accept a team override that could relabel a request without changing its authorization. - `--project ` overrides the linked or profile project. - `--api-version ` overrides the SDK default when the API permits it. @@ -243,7 +243,7 @@ Errors contain: - a concise human message; - a stable CLI error code; - the Polymorfa request ID when available; -- the selected profile, organization, project, and API surface when relevant; +- the selected profile, team, project, and API surface when relevant; - a corrective command or documentation link; and - additional sanitized detail under `--verbose` or `--debug`. @@ -314,13 +314,13 @@ slurping, and JSON filtering. It adds an explicit `--surface messaging|platform` selector. The CLI may infer the surface only when the route and available credential make the choice unique. -`dashboard` opens the active organization, project, session, or other supplied +`dashboard` opens the active team, project, session, or other supplied resource in the Polymorfa console without embedding credentials in the URL. -### Organizations, projects, credentials, access, and billing +### Teams, projects, credentials, access, and billing ```text -organization +team list view create @@ -382,14 +382,14 @@ rather than pretending rotation is atomic. Billing commands expose operational status and open the hosted billing portal; they do not duplicate the console's purchasing UI. -The organization-key billing contract provides balance status, usage, an +The team-key billing contract provides balance status, usage, an unpaged transaction list, tier pricing, and reminder-settings mutation. The CLI does not invent pagination or a usage export when the API exposes neither. Billing top-ups and console usage-insight aggregation remain dashboard/staff surfaces. `billing portal` is a credential-free console navigation helper, not an API mutation. -`organization view` remains credential-compatible. Organization update and +`team view` remains credential-compatible. Team update and member/invite mutations remain reserved and unshipped because those routes require a dashboard session. In particular, the CLI must not use `raw.request` to bypass that credential boundary. @@ -585,7 +585,7 @@ group ``` Number pairing uses a persistent hosted QuickLink. `quicklink create` accepts a -JSON request with an organization API key and returns the link URL, +JSON request with a team API key and returns the link URL, `quicklink view` reads its status, and `quicklink cancel` invalidates a link that has not connected. View and cancel also accept an exact-project token. Saved QuickLink settings are managed with `widget view` and `widget update`; the CLI @@ -814,11 +814,11 @@ bounded concurrency, and machine-readable partial-failure artifacts. The `flow` top-level command name remains reserved but is not shipped against this SDK baseline. The separate Platform template and Flow routes require -dashboard JWTs and reject organization keys. The CLI must not collect, persist, +dashboard JWTs and reject team keys. The CLI must not collect, persist, or replay dashboard session JWTs to bypass that boundary, and neither MCP tools nor skills may expose those routes. Platform template management and Flow commands can enter the implementation plan only after the Platform API provides -a CLI-appropriate organization or project credential contract and the public +a CLI-appropriate team or project credential contract and the public SDK exposes it. The shipped `template` family uses the credential-compatible Messaging project-template resource instead. `message send template` is a separate Messaging send operation. @@ -1000,7 +1000,7 @@ maintenance work. ### Phase 1: core messaging and MCP -- Organization and project discovery. +- Team and project discovery. - Session lifecycle and connection workflows. - Text and media message sending plus essential reads. - Webhook inspection and testing. @@ -1071,7 +1071,7 @@ slices: - unified Calls commands for placement, answering and joining with exclusive claims, declining, leaving, ending, inviting, session call updates, raw PCM call audio, and session call settings, pinned to an unpushed SDK revision; -- organization-key API-key list/revocation, member and audit lists, session-ban +- team-key API-key list/revocation, member and audit lists, session-ban filtering, security-incident list/acknowledgement, and project-token metadata commands; - bounded batch session stop and confirmed management deletion commands; @@ -1079,8 +1079,8 @@ slices: commands, with accepted-work receipts and direct requeue; - explicit owner-scoped event list/view/replay, webhook CRUD/test/secret rotation, delivery and attempt inspection, and retry commands; -- persistent QuickLink create with organization keys, view/cancel with - organization keys or exact-project tokens, and no direct session QR fallback; +- persistent QuickLink create with team keys, view/cancel with + team keys or exact-project tokens, and no direct session QR fallback; - the bounded SSE listener with JSONL and human sinks, fail-closed gap handling, cumulative acknowledgement, checkpointed reconnects, exact-byte local signing, and redirect-safe forwarding; diff --git a/package.json b/package.json index f2c144d3..7c529feb 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "description": "Add, list, and remove audience members." }, "audit-log": { - "description": "Inspect organization audit activity." + "description": "Inspect team audit activity." }, "auth": { "description": "Manage authentication profiles and credentials." @@ -167,7 +167,7 @@ "description": "Resolve phone numbers and usernames to Polymorfa user IDs." }, "key": { - "description": "Inspect and revoke organization API keys." + "description": "Inspect and revoke team API keys." }, "label": { "description": "Manage Messaging labels and chat assignments." @@ -182,7 +182,7 @@ "description": "Inspect, download, and persist Messaging media." }, "member": { - "description": "Inspect organization members." + "description": "Inspect team members." }, "message": { "description": "Send messages and perform message actions." @@ -191,7 +191,7 @@ "description": "Send a message by content type." }, "optout": { - "description": "Manage organization opt-out suppression." + "description": "Manage team opt-out suppression." }, "optout:settings": { "description": "Inspect and replace STOP/START keyword capture." @@ -233,13 +233,13 @@ "description": "Create, inspect, and cancel persistent onboarding QuickLinks." }, "security-incident": { - "description": "Inspect and acknowledge organization security incidents." + "description": "Inspect and acknowledge team security incidents." }, "session": { "description": "Manage Platform sessions." }, "session-ban": { - "description": "Inspect recorded organization session bans." + "description": "Inspect recorded team session bans." }, "voice": { "description": "Voice Automation (beta): audio library and text-to-speech provider credentials." diff --git a/skills/polymorfa/SKILL.md b/skills/polymorfa/SKILL.md index bdd25c97..7b9953a9 100644 --- a/skills/polymorfa/SKILL.md +++ b/skills/polymorfa/SKILL.md @@ -11,14 +11,14 @@ Use `polymorfa --help` and `polymorfa --help` as the installed command a 1. Run `polymorfa auth status --json` before a mutation or a project-scoped read. 2. Select an explicit profile with `--profile` when the active profile is not already unambiguous. -3. For resources that may be project- or organization-owned, supply `--owner project|organization` unless the stored profile fixes the owner. +3. For resources that may be project- or team-owned, supply `--owner project|team` unless the stored profile fixes the owner. 4. Supply the exact project context for project-owned resources. Never infer ownership from an ID, credential shape, failed request, or route. -Organization API keys and exact-project tokens are durable principals. Browser client tokens and listener credentials are not general CLI credentials. Do not print, log, persist in project files, or pass credentials in command arguments. +Team API keys and exact-project tokens are durable principals. Browser client tokens and listener credentials are not general CLI credentials. Do not print, log, persist in project files, or pass credentials in command arguments. Voice Automation commands (`polymorfa voice audio`, `polymorfa voice credential`) are a beta for enrolled teams; `voice_not_enabled` (exit 6) means the team is not enrolled and `gate_limit_reached` (exit 7) means a voice limit is reached, so do not retry either. Pass a provider key to `polymorfa voice credential add` only through standard input or the environment variable named by `--key-env`, never as an argument. -Use `polymorfa quicklink create --project PROJECT --input request.json` with an organization API key for standard number pairing. Treat the returned hosted URL as credential material; do not request direct session QR payloads or pairing codes. +Use `polymorfa quicklink create --project PROJECT --input request.json` with a team API key for standard number pairing. Treat the returned hosted URL as credential material; do not request direct session QR payloads or pairing codes. ## Choose an interface diff --git a/src/base-command.ts b/src/base-command.ts index 16567413..527ce291 100644 --- a/src/base-command.ts +++ b/src/base-command.ts @@ -55,9 +55,9 @@ export abstract class BaseCommand extends Command { helpGroup: 'GLOBAL', }), owner: Flags.string({ - description: 'Select project-owned or organization-owned resources.', + description: 'Select project-owned or team-owned resources.', helpGroup: 'GLOBAL', - options: ['project', 'organization'], + options: ['project', 'team'], }), profile: Flags.string({ description: 'Use a named authentication profile.', @@ -102,10 +102,10 @@ export abstract class BaseCommand extends Command { } /** - * Resolve an organization API key or exact-project token without building a + * Resolve a team API key or exact-project token without building a * typed client, for commands that span projects. With `inferOwner`, --project - * or a project token reads one project and an organization key otherwise - * reads the whole organization. + * or a project token reads one project and a team key otherwise + * reads the whole team. */ protected async developerEnvironment( flags: GlobalFlags, @@ -243,7 +243,7 @@ export abstract class BaseCommand extends Command { protected async platformClient( flags: GlobalFlags, - ): Promise> { + ): Promise> { return createPlatformClient(await this.platformEnvironment(flags)) } diff --git a/src/commands/analytics/get.ts b/src/commands/analytics/get.ts index 089fdc5b..50a80540 100644 --- a/src/commands/analytics/get.ts +++ b/src/commands/analytics/get.ts @@ -35,7 +35,7 @@ export default class AnalyticsGet extends BaseCommand { }) const session = await this.developerSession({ ...flags, - owner: flags.owner ?? (flags.project ? 'project' : 'organization'), + owner: flags.owner ?? (flags.project ? 'project' : 'team'), }) const result = await getAnalytics(session.client, query) this.writeValue(result, renderAnalytics(result.data), flags) diff --git a/src/commands/analytics/metrics.ts b/src/commands/analytics/metrics.ts index c232297b..b9a1aa42 100644 --- a/src/commands/analytics/metrics.ts +++ b/src/commands/analytics/metrics.ts @@ -42,7 +42,7 @@ export default class AnalyticsMetrics extends BaseCommand { }) const session = await this.developerSession({ ...flags, - owner: flags.owner ?? (flags.project ? 'project' : 'organization'), + owner: flags.owner ?? (flags.project ? 'project' : 'team'), }) const result = await getAnalyticsMetrics(session.client, query) this.writeValue(result, result.data.trimEnd(), flags) diff --git a/src/commands/audit-log/list.ts b/src/commands/audit-log/list.ts index 4f660004..c7e4bd0b 100644 --- a/src/commands/audit-log/list.ts +++ b/src/commands/audit-log/list.ts @@ -7,7 +7,7 @@ import { } from '../../services/platform-management.js' export default class AuditLogList extends BaseCommand { - static override description = 'List organization audit log entries.' + static override description = 'List team audit log entries.' static override flags = { action: Flags.string({description: 'Match one exact audit action.'}), diff --git a/src/commands/auth/login.ts b/src/commands/auth/login.ts index 0292b780..2dd7e96f 100644 --- a/src/commands/auth/login.ts +++ b/src/commands/auth/login.ts @@ -7,7 +7,7 @@ import {readSecretFromStdin} from '../../input/stdin.js' export default class AuthLogin extends BaseCommand { static override description = - 'Store an organization key or project token in the operating-system keyring.' + 'Store a team key or project token in the operating-system keyring.' static override flags = { 'with-api-key': Flags.boolean({ diff --git a/src/commands/auth/status.ts b/src/commands/auth/status.ts index e89d48e3..814e6fd9 100644 --- a/src/commands/auth/status.ts +++ b/src/commands/auth/status.ts @@ -4,7 +4,7 @@ import {validateProjectToken} from '../../config/credentials.js' import { PolymorfaConfigurationError, validateMessagingCredential, - validateOrganizationApiKey, + validateTeamApiKey, } from '@polymorfa/sdk' export default class AuthStatus extends BaseCommand { @@ -61,7 +61,7 @@ function environmentStatus( ) } - if (apiKey !== undefined) validateOrganizationApiKey(apiKey) + if (apiKey !== undefined) validateTeamApiKey(apiKey) if (clientToken !== undefined) { validateMessagingCredential({type: 'clientToken', value: clientToken}) } diff --git a/src/commands/billing/limits/list.ts b/src/commands/billing/limits/list.ts index 0e2a2f2b..31bb5b36 100644 --- a/src/commands/billing/limits/list.ts +++ b/src/commands/billing/limits/list.ts @@ -3,7 +3,7 @@ import {getLimits, renderLimits} from '../../../services/billing-controls.js' export default class LimitsList extends BaseCommand { static override summary = 'Read monthly project and number spending limits.' static override description = - 'Requires an organization key with billing:read. Use --project to include its number limits. Months reset on the first day at 00:00 UTC.' + 'Requires a team key with billing:read. Use --project to include its number limits. Months reset on the first day at 00:00 UTC.' async run(): Promise { const {flags} = await this.parse(LimitsList) const result = await getLimits( diff --git a/src/commands/billing/limits/set.ts b/src/commands/billing/limits/set.ts index 9e321787..1b6beb5d 100644 --- a/src/commands/billing/limits/set.ts +++ b/src/commands/billing/limits/set.ts @@ -4,7 +4,7 @@ import {setLimit, limitValue} from '../../../services/billing-controls.js' export default class LimitsSet extends BaseCommand { static override summary = 'Set or remove a monthly spending limit.' static override description = - 'Requires Pay-As-You-Go and an organization key with billing:manage. Zero blocks new charges; already-paid service continues. A stale observed revision fails without overwriting newer settings.' + 'Requires Pay-As-You-Go and a team key with billing:manage. Zero blocks new charges; already-paid service continues. A stale observed revision fails without overwriting newer settings.' static override args = { id: Args.string({required: true, description: 'Project or number UUID.'}), } diff --git a/src/commands/billing/priority/list.ts b/src/commands/billing/priority/list.ts index de5a123e..6d58e922 100644 --- a/src/commands/billing/priority/list.ts +++ b/src/commands/billing/priority/list.ts @@ -7,7 +7,7 @@ export default class PriorityList extends BaseCommand { static override summary = 'Read project, customer and number funding priorities.' static override description = - 'Requires an organization key with billing:read. Project priority takes precedence. Numbers inherit customer priority; a higher number priority overrides it. Use --project for its funding controls. Includes the revision used for changes.' + 'Requires a team key with billing:read. Project priority takes precedence. Numbers inherit customer priority; a higher number priority overrides it. Use --project for its funding controls. Includes the revision used for changes.' async run(): Promise { const {flags} = await this.parse(PriorityList) const result = await getPriorities( diff --git a/src/commands/billing/priority/reorder.ts b/src/commands/billing/priority/reorder.ts index 7d9aff3f..b991560a 100644 --- a/src/commands/billing/priority/reorder.ts +++ b/src/commands/billing/priority/reorder.ts @@ -6,7 +6,7 @@ import {reorderPriorities} from '../../../services/billing-controls.js' export default class PriorityReorder extends BaseCommand { static override summary = 'Save a complete funding order atomically.' static override description = - 'Requires Pay-As-You-Go and an organization key with billing:manage. Pass every active project, customer or real number for its scope. Resource scope mixes all customers and numbers in --project, highest first. Incomplete or stale orders fail without partial changes.' + 'Requires Pay-As-You-Go and a team key with billing:manage. Pass every active project, customer or real number for its scope. Resource scope mixes all customers and numbers in --project, highest first. Incomplete or stale orders fail without partial changes.' static override flags = { scope: Flags.string({ options: ['project', 'customer', 'number', 'resource'], diff --git a/src/commands/billing/priority/set.ts b/src/commands/billing/priority/set.ts index 4058883e..ecb1aa89 100644 --- a/src/commands/billing/priority/set.ts +++ b/src/commands/billing/priority/set.ts @@ -4,7 +4,7 @@ import {setPriority} from '../../../services/billing-controls.js' export default class PrioritySet extends BaseCommand { static override summary = 'Set a project or number funding priority.' static override description = - 'Requires Pay-As-You-Go and an organization key with billing:manage. Changes future renewal protection and recovery; paid windows keep their expiry.' + 'Requires Pay-As-You-Go and a team key with billing:manage. Changes future renewal protection and recovery; paid windows keep their expiry.' static override args = { id: Args.string({required: true, description: 'Project or number UUID.'}), } diff --git a/src/commands/calls/export.ts b/src/commands/calls/export.ts index 10a74e73..3c39026a 100644 --- a/src/commands/calls/export.ts +++ b/src/commands/calls/export.ts @@ -26,7 +26,7 @@ Each record has callId, projectId, sessionId, direction, upstream, outcome, stat The command requests every page until no records remain and writes one CSV header. Records go to standard output, or to --output. Progress and the next cursor go to standard error, as JSON lines with --json. --max-pages stops early; resume with --cursor and the same filters. When a page fails, the command reports the cursor that resumes from that page and exits non-zero. -Pass --project to read one project. Without it, an organization API key reads every project in the organization. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.` +Pass --project to read one project. Without it, a team API key reads every project in the team. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.` static override examples = [ '<%= config.bin %> calls export --since 2026-09-01T00:00:00Z --output calls.csv', diff --git a/src/commands/calls/opt-outs/add.ts b/src/commands/calls/opt-outs/add.ts index 41456123..d5974729 100644 --- a/src/commands/calls/opt-outs/add.ts +++ b/src/commands/calls/opt-outs/add.ts @@ -8,7 +8,7 @@ import { export default class CallsOptOutsAdd extends BaseCommand { static override description = - 'Add a person to the team’s do-not-call list by phone number or BSUID. From then on, calls to them are refused with call_recipient_opted_out, including calls your PBX places through a SIP trunk. Adding a person already on the list changes nothing and returns their entry (metadata.status 200 instead of 201). The list holds up to 100,000 entries; a full list fails with call_opt_out_limit (exit code 4). Requires an organization API key.' + 'Add a person to the team’s do-not-call list by phone number or BSUID. From then on, calls to them are refused with call_recipient_opted_out, including calls your PBX places through a SIP trunk. Adding a person already on the list changes nothing and returns their entry (metadata.status 200 instead of 201). The list holds up to 100,000 entries; a full list fails with call_opt_out_limit (exit code 4). Requires a team API key.' static override examples = [ '<%= config.bin %> calls opt-outs add --phone-number +14155550123 --note "Asked by phone on 2026-09-19"', diff --git a/src/commands/calls/opt-outs/import.ts b/src/commands/calls/opt-outs/import.ts index d12abed1..58d8e255 100644 --- a/src/commands/calls/opt-outs/import.ts +++ b/src/commands/calls/opt-outs/import.ts @@ -20,7 +20,7 @@ export default class CallsOptOutsImport extends BaseCommand { }), } - static override description = `Add many people to the team’s do-not-call list from a file of up to 10 MiB. CSV needs a header row naming phoneNumber, bsuid and optionally note; each row names a phone number (E.164) or a BSUID. JSON is an array of {"phoneNumber" | "bsuid", "note"} objects, or an object with that array as "entries". The CLI sends ${IMPORT_BATCH_SIZE.toLocaleString('en-US')} entries per request and reports the entries added, already listed and rejected, with each rejected entry's zero-based position (and CSV line). Running an import again is safe: entries already on the list are counted as already listed. Exit codes: 0 when every entry is listed; 12 when some entries were rejected, or when a later request failed after earlier batches were stored (run the import again); the request's own exit code when nothing was stored. Requires an organization API key.` + static override description = `Add many people to the team’s do-not-call list from a file of up to 10 MiB. CSV needs a header row naming phoneNumber, bsuid and optionally note; each row names a phone number (E.164) or a BSUID. JSON is an array of {"phoneNumber" | "bsuid", "note"} objects, or an object with that array as "entries". The CLI sends ${IMPORT_BATCH_SIZE.toLocaleString('en-US')} entries per request and reports the entries added, already listed and rejected, with each rejected entry's zero-based position (and CSV line). Running an import again is safe: entries already on the list are counted as already listed. Exit codes: 0 when every entry is listed; 12 when some entries were rejected, or when a later request failed after earlier batches were stored (run the import again); the request's own exit code when nothing was stored. Requires a team API key.` static override examples = [ '<%= config.bin %> calls opt-outs import do-not-call.csv', diff --git a/src/commands/calls/opt-outs/list.ts b/src/commands/calls/opt-outs/list.ts index cfefcfaa..fa283b5b 100644 --- a/src/commands/calls/opt-outs/list.ts +++ b/src/commands/calls/opt-outs/list.ts @@ -9,7 +9,7 @@ import { export default class CallsOptOutsList extends BaseCommand { static override description = - 'List the team’s do-not-call list, newest first. One page is returned unless --paginate follows page.nextCursor up to --max-items entries; human output ends with the --cursor for the next page. --phone-number or --bsuid returns only that person’s entry, if any. Requires an organization API key.' + 'List the team’s do-not-call list, newest first. One page is returned unless --paginate follows page.nextCursor up to --max-items entries; human output ends with the --cursor for the next page. --phone-number or --bsuid returns only that person’s entry, if any. Requires a team API key.' static override examples = [ '<%= config.bin %> calls opt-outs list', diff --git a/src/commands/calls/opt-outs/remove.ts b/src/commands/calls/opt-outs/remove.ts index c2611b51..2ca7691c 100644 --- a/src/commands/calls/opt-outs/remove.ts +++ b/src/commands/calls/opt-outs/remove.ts @@ -15,7 +15,7 @@ export default class CallsOptOutsRemove extends BaseCommand { } static override description = - 'Remove one entry from the team’s do-not-call list. The person can be called again at once. Requires --yes and an organization API key; an unknown ID fails with exit code 4.' + 'Remove one entry from the team’s do-not-call list. The person can be called again at once. Requires --yes and a team API key; an unknown ID fails with exit code 4.' static override examples = [ '<%= config.bin %> calls opt-outs remove 0b9f6a52-8f0e-4a44-9d51-3c1f9d6f2a10 --yes', diff --git a/src/commands/calls/policy/get.ts b/src/commands/calls/policy/get.ts index 8019c4ce..59cecdaf 100644 --- a/src/commands/calls/policy/get.ts +++ b/src/commands/calls/policy/get.ts @@ -6,7 +6,7 @@ import { export default class CallsPolicyGet extends BaseCommand { static override description = - 'Read the team call policy: the blocked country codes, the number of entries on the do-not-call list, and the revision to pass to `calls policy set --expected-revision`. The revision is 0 before the codes are first saved. Requires an organization API key: a project token used as the API key is refused by the API (exit code 3), and a client token is not accepted for this command (exit code 2).' + 'Read the team call policy: the blocked country codes, the number of entries on the do-not-call list, and the revision to pass to `calls policy set --expected-revision`. The revision is 0 before the codes are first saved. Requires a team API key: a project token used as the API key is refused by the API (exit code 3), and a client token is not accepted for this command (exit code 2).' static override examples = ['<%= config.bin %> calls policy get'] diff --git a/src/commands/calls/policy/set.ts b/src/commands/calls/policy/set.ts index 28942fda..e1a9db89 100644 --- a/src/commands/calls/policy/set.ts +++ b/src/commands/calls/policy/set.ts @@ -9,7 +9,7 @@ import { export default class CallsPolicySet extends BaseCommand { static override description = - 'Replace the team’s blocked country codes. Calls to phone numbers that start with a blocked code are refused with call_destination_blocked, and while any code is blocked, calls to a person whose phone number is not known are refused too. The list you pass replaces the stored list; --clear allows every country. Codes are country calling codes or longer dialing prefixes of 1 to 4 digits (44, 1876), at most 300. New calls use the new list at once; calls in progress continue. --expected-revision applies the change only if the policy still has that revision (see `calls policy get`); otherwise the command fails with state_conflict (exit code 4) and changes nothing. Requires an organization API key.' + 'Replace the team’s blocked country codes. Calls to phone numbers that start with a blocked code are refused with call_destination_blocked, and while any code is blocked, calls to a person whose phone number is not known are refused too. The list you pass replaces the stored list; --clear allows every country. Codes are country calling codes or longer dialing prefixes of 1 to 4 digits (44, 1876), at most 300. New calls use the new list at once; calls in progress continue. --expected-revision applies the change only if the policy still has that revision (see `calls policy get`); otherwise the command fails with state_conflict (exit code 4) and changes nothing. Requires a team API key.' static override examples = [ '<%= config.bin %> calls policy set --blocked-country-codes 44,1876', diff --git a/src/commands/calls/stats.ts b/src/commands/calls/stats.ts index f40d1eef..0842b115 100644 --- a/src/commands/calls/stats.ts +++ b/src/commands/calls/stats.ts @@ -17,7 +17,7 @@ export default class CallsStats extends BaseCommand { The range defaults to the last 7 days. --group-by day covers at most 366 days and --group-by hour at most 31. Day and hour buckets, and the heatmap, use --timezone (UTC by default). -Pass --project to read one project. Without it, an organization API key reads every project in the organization. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.` +Pass --project to read one project. Without it, a team API key reads every project in the team. A project token reads only its own project and requires --project. Credentials need the sessions:read scope.` static override examples = [ '<%= config.bin %> calls stats', diff --git a/src/commands/key/list.ts b/src/commands/key/list.ts index dc7e183a..ba4c294e 100644 --- a/src/commands/key/list.ts +++ b/src/commands/key/list.ts @@ -3,7 +3,7 @@ import {listApiKeys, renderApiKeys} from '../../services/platform-management.js' export default class KeyList extends BaseCommand { static override description = - 'List organization API-key metadata (never raw key material).' + 'List team API-key metadata (never raw key material).' async run(): Promise { const {flags} = await this.parse(KeyList) diff --git a/src/commands/key/revoke.ts b/src/commands/key/revoke.ts index 40b37847..c9340d01 100644 --- a/src/commands/key/revoke.ts +++ b/src/commands/key/revoke.ts @@ -8,7 +8,7 @@ export default class KeyRevoke extends BaseCommand { key: Args.string({description: 'API key ID.', required: true}), } - static override description = 'Revoke an organization API key.' + static override description = 'Revoke a team API key.' static override flags = { 'idempotency-key': Flags.string({ diff --git a/src/commands/listen.ts b/src/commands/listen.ts index 274cf045..0b0ab4b1 100644 --- a/src/commands/listen.ts +++ b/src/commands/listen.ts @@ -74,7 +74,7 @@ export default class Listen extends BaseCommand { }), project: Flags.string({ description: - 'Use a project UUID; organization API keys may use a unique slug. Defaults to the linked or profile project.', + 'Use a project UUID; team API keys may use a unique slug. Defaults to the linked or profile project.', }), } diff --git a/src/commands/member/list.ts b/src/commands/member/list.ts index fb13c650..89bdb0b6 100644 --- a/src/commands/member/list.ts +++ b/src/commands/member/list.ts @@ -2,7 +2,7 @@ import {BaseCommand} from '../../base-command.js' import {listMembers, renderMembers} from '../../services/platform-management.js' export default class MemberList extends BaseCommand { - static override description = 'List organization members.' + static override description = 'List team members.' async run(): Promise { const {flags} = await this.parse(MemberList) diff --git a/src/commands/optout/settings/update.ts b/src/commands/optout/settings/update.ts index 293be9ec..7a0a7f3c 100644 --- a/src/commands/optout/settings/update.ts +++ b/src/commands/optout/settings/update.ts @@ -9,7 +9,7 @@ import { export default class OptOutSettingsUpdate extends BaseCommand { static override description = - 'Replace the organization’s STOP and START keyword capture settings. Every field is replaced, so pass the complete keyword set.' + 'Replace the team’s STOP and START keyword capture settings. Every field is replaced, so pass the complete keyword set.' static override examples = [ '<%= config.bin %> <%= command.id %> --enabled --opt-out-keyword STOP --opt-out-keyword BAJA --opt-in-keyword START', diff --git a/src/commands/optout/settings/view.ts b/src/commands/optout/settings/view.ts index 3062928f..c4f86e10 100644 --- a/src/commands/optout/settings/view.ts +++ b/src/commands/optout/settings/view.ts @@ -6,7 +6,7 @@ import { export default class OptOutSettingsView extends BaseCommand { static override description = - 'Show the organization’s STOP and START keyword capture settings.' + 'Show the team’s STOP and START keyword capture settings.' async run(): Promise { const {flags} = await this.parse(OptOutSettingsView) diff --git a/src/commands/security-incident/list.ts b/src/commands/security-incident/list.ts index 8651914a..77055f03 100644 --- a/src/commands/security-incident/list.ts +++ b/src/commands/security-incident/list.ts @@ -5,7 +5,7 @@ import { } from '../../services/platform-management.js' export default class SecurityIncidentList extends BaseCommand { - static override description = 'List organization security incidents.' + static override description = 'List team security incidents.' async run(): Promise { const {flags} = await this.parse(SecurityIncidentList) diff --git a/src/commands/session-ban/list.ts b/src/commands/session-ban/list.ts index 0f5f60c9..1fd96814 100644 --- a/src/commands/session-ban/list.ts +++ b/src/commands/session-ban/list.ts @@ -7,7 +7,7 @@ import { } from '../../services/platform-management.js' export default class SessionBanList extends BaseCommand { - static override description = 'List recorded organization session bans.' + static override description = 'List recorded team session bans.' static override flags = { active: Flags.boolean({description: 'Return only active bans.'}), diff --git a/src/commands/session/list.ts b/src/commands/session/list.ts index 0eb5559c..d791bc7d 100644 --- a/src/commands/session/list.ts +++ b/src/commands/session/list.ts @@ -6,7 +6,7 @@ import { export default class SessionList extends BaseCommand { static override description = - 'List session metadata for the team or one project. Requires an organization API key with sessions:read.' + 'List session metadata for the team or one project. Requires a team API key with sessions:read.' static override examples = [ '<%= config.bin %> session list', '<%= config.bin %> session list --project PROJECT_ID --json', diff --git a/src/commands/session/status.ts b/src/commands/session/status.ts index 97e308db..47e736a5 100644 --- a/src/commands/session/status.ts +++ b/src/commands/session/status.ts @@ -6,7 +6,7 @@ import {viewManagedSession} from '../../services/platform-management.js' export default class SessionStatus extends BaseCommand { static override description = - 'Read the stored session status and reason. Requires an organization API key with sessions:read.' + 'Read the stored session status and reason. Requires a team API key with sessions:read.' static override args = { session: Args.string({description: 'Session ID.', required: true}), } diff --git a/src/commands/session/view.ts b/src/commands/session/view.ts index 2d9e6b51..88b65bcd 100644 --- a/src/commands/session/view.ts +++ b/src/commands/session/view.ts @@ -9,7 +9,7 @@ import { export default class SessionView extends BaseCommand { static override description = - 'Read one session by its ID. Requires an organization API key with sessions:read.' + 'Read one session by its ID. Requires a team API key with sessions:read.' static override args = { session: Args.string({description: 'Session ID.', required: true}), } diff --git a/src/commands/webhook/test.ts b/src/commands/webhook/test.ts index 5230b92a..26c417bf 100644 --- a/src/commands/webhook/test.ts +++ b/src/commands/webhook/test.ts @@ -52,17 +52,17 @@ export default class WebhookTest extends BaseCommand { } function validateTestInput( - owner: 'organization' | 'project', + owner: 'team' | 'project', input: Record, ): void { const allowed = - owner === 'organization' + owner === 'team' ? new Set(['eventType']) : new Set(['eventType', 'body', 'sessionId']) const unexpected = Object.keys(input).find((key) => !allowed.has(key)) if (unexpected !== undefined) { throw new PolymorfaValidationError( - `${owner === 'organization' ? 'Team' : 'Project'} webhook tests do not accept ${unexpected}.`, + `${owner === 'team' ? 'Team' : 'Project'} webhook tests do not accept ${unexpected}.`, {code: 'invalid_parameter'}, ) } diff --git a/src/commands/widget/update.ts b/src/commands/widget/update.ts index fe238dbf..10b52b73 100644 --- a/src/commands/widget/update.ts +++ b/src/commands/widget/update.ts @@ -9,7 +9,7 @@ import { export default class WidgetUpdate extends BaseCommand { static override description = - 'Update saved Connect widget settings for the organization or one project.' + 'Update saved Connect widget settings for the team or one project.' static override flags = { 'idempotency-key': Flags.string({ diff --git a/src/commands/widget/view.ts b/src/commands/widget/view.ts index d7de706c..b23a2fd4 100644 --- a/src/commands/widget/view.ts +++ b/src/commands/widget/view.ts @@ -6,7 +6,7 @@ import { export default class WidgetView extends BaseCommand { static override description = - 'View saved Connect widget settings for the organization or one project.' + 'View saved Connect widget settings for the team or one project.' async run(): Promise { const {flags} = await this.parse(WidgetView) diff --git a/src/config/profiles.ts b/src/config/profiles.ts index b0a791c4..ea040197 100644 --- a/src/config/profiles.ts +++ b/src/config/profiles.ts @@ -21,8 +21,8 @@ export interface ProfileMetadata { readonly apiVersion?: string readonly baseUrl?: string readonly credential: CredentialReference - readonly owner?: 'organization' | 'project' - readonly organization?: string + readonly owner?: 'team' | 'project' + readonly team?: string readonly project?: string } @@ -138,7 +138,7 @@ function isProfile(value: unknown, version: 1 | 2): value is ProfileMetadata { 'baseUrl', 'credential', 'owner', - 'organization', + 'team', 'project', ]) if (Object.keys(value).some((key) => !profileKeys.has(key))) return false @@ -159,7 +159,7 @@ function isProfile(value: unknown, version: 1 | 2): value is ProfileMetadata { if ( value.owner !== undefined && - value.owner !== 'organization' && + value.owner !== 'team' && value.owner !== 'project' ) { return false @@ -172,10 +172,9 @@ function isProfile(value: unknown, version: 1 | 2): value is ProfileMetadata { ) { return false } - if (value.owner === 'organization' && value.project !== undefined) - return false + if (value.owner === 'team' && value.project !== undefined) return false - return ['apiVersion', 'baseUrl', 'organization', 'project'].every( + return ['apiVersion', 'baseUrl', 'team', 'project'].every( (key) => value[key] === undefined || typeof value[key] === 'string', ) } diff --git a/src/context/environment.ts b/src/context/environment.ts index 0f64c622..bc1f5700 100644 --- a/src/context/environment.ts +++ b/src/context/environment.ts @@ -45,7 +45,7 @@ export interface ListenerEnvironment { readonly apiVersion?: string readonly baseUrl: string readonly credential: string - readonly principalType: 'organization_key' | 'project_token' + readonly principalType: 'team_key' | 'project_token' readonly profile?: string readonly projectId: string readonly timeoutMs?: number @@ -75,7 +75,7 @@ export interface ResolveDeveloperEnvironmentInput { /** * Choose the owner when neither --owner nor the profile names one: a * project context (--project, or a project token) reads one project, and - * an organization key otherwise reads the whole organization. For commands + * a team key otherwise reads the whole team. For commands * whose results span projects rather than belong to one owner. */ readonly inferOwner?: boolean | undefined @@ -182,9 +182,7 @@ export async function resolveDeveloperEnvironment( ) } const principalType = - profile.credential.kind === 'projectToken' - ? 'project_token' - : 'organization_key' + profile.credential.kind === 'projectToken' ? 'project_token' : 'team_key' const explicitProject = nonEmpty(input.project) const owner = input.owner ?? @@ -329,7 +327,7 @@ export async function resolveListenerEnvironment( nonEmpty(input.env.POLYMORFA_BASE_URL) ?? 'https://api.polymorfa.com' const projectId = await canonicalProjectId( project, - 'organization_key', + 'team_key', { ...(input.apiVersion === undefined ? {} @@ -344,7 +342,7 @@ export async function resolveListenerEnvironment( ...(input.apiVersion === undefined ? {} : {apiVersion: input.apiVersion}), baseUrl, credential: apiKey, - principalType: 'organization_key', + principalType: 'team_key', projectId: requiredProjectId(projectId), ...(input.timeoutMs === undefined ? {} : {timeoutMs: input.timeoutMs}), } @@ -390,9 +388,7 @@ export async function resolveListenerEnvironment( ) } const principalType = - profile.credential.kind === 'projectToken' - ? 'project_token' - : 'organization_key' + profile.credential.kind === 'projectToken' ? 'project_token' : 'team_key' const baseUrl = nonEmpty(input.env.POLYMORFA_BASE_URL) ?? profile.baseUrl ?? @@ -464,8 +460,8 @@ export async function resolveCommandEnvironment( ) { throw new PolymorfaConfigurationError( input.surface === 'platform' - ? `Profile ${selected} contains a project token; this Platform command requires an organization API key.` - : `Profile ${selected} contains a project token; this Messaging command requires an organization API key or a Messaging client token.`, + ? `Profile ${selected} contains a project token; this Platform command requires a team API key.` + : `Profile ${selected} contains a project token; this Messaging command requires a team API key or a Messaging client token.`, 'credential', ) } @@ -519,7 +515,7 @@ export interface TeamSettingEnvironment { readonly apiVersion?: string readonly baseUrl: string readonly credential: string - readonly principalType: 'organization_key' | 'project_token' + readonly principalType: 'team_key' | 'project_token' readonly timeoutMs?: number } @@ -592,9 +588,7 @@ export async function resolveTeamSettingEnvironment( baseUrl: baseUrl ?? profile.baseUrl ?? 'https://api.polymorfa.com', credential, principalType: - profile.credential.kind === 'projectToken' - ? 'project_token' - : 'organization_key', + profile.credential.kind === 'projectToken' ? 'project_token' : 'team_key', ...optional, } } @@ -673,7 +667,7 @@ function durableEnvironmentCredential( env: Readonly>, ): | { - readonly principalType: 'organization_key' | 'project_token' + readonly principalType: 'team_key' | 'project_token' readonly value: string } | undefined { @@ -697,7 +691,7 @@ function durableEnvironmentCredential( } return apiKey === undefined ? undefined - : {principalType: 'organization_key', value: apiKey} + : {principalType: 'team_key', value: apiKey} } const PROJECT_UUID = @@ -705,7 +699,7 @@ const PROJECT_UUID = export async function canonicalProjectId( project: string | undefined, - principalType: 'organization_key' | 'project_token', + principalType: 'team_key' | 'project_token', connection: Parameters[0], lookup: ProjectLookup, ): Promise { @@ -721,13 +715,13 @@ export async function canonicalProjectId( ) if (matches.length === 0) { throw new PolymorfaConfigurationError( - `Project slug ${project} was not found in the organization.`, + `Project slug ${project} was not found in the team.`, 'project', ) } if (matches.length > 1) { throw new PolymorfaConfigurationError( - `Project slug ${project} is ambiguous in the organization.`, + `Project slug ${project} is ambiguous in the team.`, 'project', ) } @@ -746,7 +740,7 @@ export async function listProjects( ): Promise { const client = new Client({ baseUrl: input.baseUrl, - credential: {type: 'organizationApiKey', value: input.credential}, + credential: {type: 'teamApiKey', value: input.credential}, ...(input.apiVersion === undefined ? {} : {apiVersion: input.apiVersion}), ...(input.timeoutMs === undefined ? {} : {timeoutMs: input.timeoutMs}), }) @@ -755,12 +749,10 @@ export async function listProjects( } function inferredOwner( - principalType: 'organization_key' | 'project_token', + principalType: 'team_key' | 'project_token', hasProject: boolean, -): 'organization' | 'project' { - return principalType === 'project_token' || hasProject - ? 'project' - : 'organization' +): 'team' | 'project' { + return principalType === 'project_token' || hasProject ? 'project' : 'team' } function requiredProjectId(projectId: string | undefined): string { diff --git a/src/context/owner.ts b/src/context/owner.ts index c941117a..c4680543 100644 --- a/src/context/owner.ts +++ b/src/context/owner.ts @@ -9,13 +9,13 @@ import type { export function resolveOwnerContext(input: { readonly owner?: string readonly principalType: PrincipalType - readonly organizationId?: string + readonly teamId?: string readonly projectId?: string readonly profile?: string }): OutputContext { - if (input.owner !== 'project' && input.owner !== 'organization') { + if (input.owner !== 'project' && input.owner !== 'team') { throw new PolymorfaConfigurationError( - 'This command requires --owner project or --owner organization.', + 'This command requires --owner project or --owner team.', 'owner', ) } @@ -30,13 +30,13 @@ export function resolveOwnerContext(input: { } else { if (input.principalType === 'project_token') { throw new PolymorfaConfigurationError( - 'A project token cannot access organization-owned resources.', + 'A project token cannot access team-owned resources.', 'credential', ) } if (input.projectId) { throw new PolymorfaConfigurationError( - 'Organization-owned commands reject a simultaneous project override.', + 'Team-owned commands reject a simultaneous project override.', 'project', ) } @@ -44,9 +44,7 @@ export function resolveOwnerContext(input: { return { owner, principalType: input.principalType, - ...(input.organizationId === undefined - ? {} - : {organizationId: input.organizationId}), + ...(input.teamId === undefined ? {} : {teamId: input.teamId}), ...(input.profile === undefined ? {} : {profile: input.profile}), ...(input.projectId === undefined ? {} : {projectId: input.projectId}), } diff --git a/src/developer/client.ts b/src/developer/client.ts index d2390950..fafa1e69 100644 --- a/src/developer/client.ts +++ b/src/developer/client.ts @@ -59,7 +59,7 @@ export async function createDeveloperSession( : new Client({ baseUrl: environment.baseUrl, credential: { - type: 'organizationApiKey', + type: 'teamApiKey', value: environment.credential, }, ...(environment.apiVersion === undefined @@ -70,7 +70,7 @@ export async function createDeveloperSession( : {timeoutMs: environment.timeoutMs}), }) const client = - environment.context.owner === 'project' && root.owner === 'organization' + environment.context.owner === 'project' && root.owner === 'team' ? root.project(requiredProject(environment.context.projectId)) : root return { diff --git a/src/developer/render.ts b/src/developer/render.ts index e1526fac..e130486d 100644 --- a/src/developer/render.ts +++ b/src/developer/render.ts @@ -26,7 +26,7 @@ export function renderEventDetail( ['Type', event.type], ['Source', event.source], ['Environment', event.environment], - ['Project', event.projectId ?? 'organization'], + ['Project', event.projectId ?? 'team'], ['Created', event.createdAt], ['Replayable until', event.replayableUntil], ['Payload availability', event.payloadAvailability], diff --git a/src/functions/command.ts b/src/functions/command.ts index 6df12889..d8564ef5 100644 --- a/src/functions/command.ts +++ b/src/functions/command.ts @@ -7,7 +7,7 @@ export abstract class FunctionsCommand extends BaseCommand { protected async functionContext(flags: GlobalFlags) { if (flags.owner !== undefined && flags.owner !== 'project') throw new PolymorfaConfigurationError( - 'Functions are project-owned; --owner organization is not supported.', + 'Functions are project-owned; --owner team is not supported.', 'owner', ) const session = await this.developerSession({...flags, owner: 'project'}) diff --git a/src/listener/frames.ts b/src/listener/frames.ts index 0e7b48f8..d6530163 100644 --- a/src/listener/frames.ts +++ b/src/listener/frames.ts @@ -328,16 +328,16 @@ function validateEventMetadata( 'environment', 'id', 'metadataExpiresAt', - 'organizationId', + 'teamId', 'payloadAvailability', 'projectId', 'replayableUntil', 'source', 'type', ]) - for (const key of ['id', 'organizationId', 'projectId', 'type'] as const) + for (const key of ['id', 'teamId', 'projectId', 'type'] as const) requireString(value, key) - for (const key of ['id', 'organizationId', 'projectId'] as const) { + for (const key of ['id', 'teamId', 'projectId'] as const) { if (!UUID.test(String(value[key]))) { throw protocol('listener_event_invalid', `${key} must be a UUID.`) } diff --git a/src/mcp/server.ts b/src/mcp/server.ts index c1ebd143..66bdcc40 100644 --- a/src/mcp/server.ts +++ b/src/mcp/server.ts @@ -92,7 +92,7 @@ export function createMcpServer( readOnlyHint: true, }, description: - 'List stored session summaries in one project. Requires a CLI organization API key with sessions:read.', + 'List stored session summaries in one project. Requires a CLI team API key with sessions:read.', inputSchema: z.object({ projectId: z.string().regex(LISTENER_PROJECT_ID_PATTERN), }), @@ -105,7 +105,7 @@ export function createMcpServer( return { content: [ { - text: 'Could not list project sessions with the selected CLI organization API key.', + text: 'Could not list project sessions with the selected CLI team API key.', type: 'text' as const, }, ], diff --git a/src/mcp/session-discovery.ts b/src/mcp/session-discovery.ts index b6feee06..d46954f8 100644 --- a/src/mcp/session-discovery.ts +++ b/src/mcp/session-discovery.ts @@ -34,7 +34,7 @@ export async function listMcpSessions( process.env.POLYMORFA_CLIENT_TOKEN?.trim()) ) { throw new PolymorfaConfigurationError( - 'Select only one organization API key for MCP session discovery.', + 'Select only one team API key for MCP session discovery.', 'credential', ) } diff --git a/src/output/contracts.ts b/src/output/contracts.ts index e6aeef3d..3017e90b 100644 --- a/src/output/contracts.ts +++ b/src/output/contracts.ts @@ -1,11 +1,11 @@ -export type ResourceOwner = 'project' | 'organization' -export type PrincipalType = 'project_token' | 'organization_key' | 'cli_grant' +export type ResourceOwner = 'project' | 'team' +export type PrincipalType = 'project_token' | 'team_key' | 'cli_grant' export interface OutputContext { readonly owner: ResourceOwner readonly principalType: PrincipalType readonly profile?: string - readonly organizationId?: string | null + readonly teamId?: string | null readonly projectId?: string | null } diff --git a/src/sdk/client.ts b/src/sdk/client.ts index e727749f..2bf7902d 100644 --- a/src/sdk/client.ts +++ b/src/sdk/client.ts @@ -87,7 +87,7 @@ export function createCallRetentionClient( type: environment.principalType === 'project_token' ? 'projectToken' - : 'organizationApiKey', + : 'teamApiKey', value: environment.credential, }, ...(environment.apiVersion === undefined @@ -106,7 +106,7 @@ export function createCallRetentionClient( export function createPlatformClient( environment: ResolvedEnvironment, -): ClientInstance<'organization'> { +): ClientInstance<'team'> { if (environment.surface !== 'platform') { throw new PolymorfaConfigurationError( 'A typed Platform client requires the Platform API surface.', @@ -116,7 +116,7 @@ export function createPlatformClient( return new Client({ credential: { - type: 'organizationApiKey', + type: 'teamApiKey', value: environment.credential.value, }, ...sharedOptions(environment), diff --git a/src/services/audiences.ts b/src/services/audiences.ts index 80975065..4407faf0 100644 --- a/src/services/audiences.ts +++ b/src/services/audiences.ts @@ -27,7 +27,7 @@ export interface AudienceResult { } export async function createAudience( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, body: CreateAudienceRequest, options: RequestOptions = {}, ): Promise> { @@ -36,7 +36,7 @@ export async function createAudience( } export async function addAudienceMembers( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, listId: string, members: readonly CampaignRecipientInput[], options: RequestOptions = {}, @@ -46,7 +46,7 @@ export async function addAudienceMembers( } export async function listAudienceMembers( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, listId: string, params: ListAudienceMembersParams, ): Promise> { @@ -55,7 +55,7 @@ export async function listAudienceMembers( } export async function removeAudienceMember( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, listId: string, phone: string, options: RequestOptions = {}, diff --git a/src/services/auth.ts b/src/services/auth.ts index 5ecb0029..eca46584 100644 --- a/src/services/auth.ts +++ b/src/services/auth.ts @@ -1,7 +1,7 @@ import { PolymorfaConfigurationError, PolymorfaNotFoundError, - validateOrganizationApiKey, + validateTeamApiKey, } from '@polymorfa/sdk' import { @@ -26,8 +26,8 @@ export interface ProfileSummary { readonly baseUrl?: string readonly credentialKind: 'apiKey' | 'projectToken' readonly name: string - readonly owner?: 'organization' | 'project' - readonly organization?: string + readonly owner?: 'team' | 'project' + readonly team?: string readonly project?: string } @@ -56,7 +56,7 @@ export class AuthService { readonly profile: string }): Promise { assertProfileName(input.profile) - const apiKey = validateOrganizationApiKey(input.apiKey.trim()) + const apiKey = validateTeamApiKey(input.apiKey.trim()) const config = await this.profiles.load() const previous = config.profiles[input.profile] const previousAccount = previous?.credential.account @@ -72,9 +72,7 @@ export class AuthService { ? {} : {apiVersion: previous.apiVersion}), ...(previous?.baseUrl === undefined ? {} : {baseUrl: previous.baseUrl}), - ...(previous?.organization === undefined - ? {} - : {organization: previous.organization}), + ...(previous?.team === undefined ? {} : {team: previous.team}), credential: {account, kind: 'apiKey'}, } const next: ProfileConfig = { @@ -131,9 +129,7 @@ export class AuthService { ? {} : {apiVersion: previous.apiVersion}), ...(previous?.baseUrl === undefined ? {} : {baseUrl: previous.baseUrl}), - ...(previous?.organization === undefined - ? {} - : {organization: previous.organization}), + ...(previous?.team === undefined ? {} : {team: previous.team}), credential: {account, kind: 'projectToken'}, owner: 'project', project, @@ -206,7 +202,7 @@ export class AuthService { if (metadata.credential.kind === 'projectToken') { validateProjectToken(credential) } else { - validateOrganizationApiKey(credential) + validateTeamApiKey(credential) } credentialFormatValid = true } catch { @@ -271,9 +267,7 @@ function summary( ? {} : {apiVersion: profile.apiVersion}), ...(profile.baseUrl === undefined ? {} : {baseUrl: profile.baseUrl}), - ...(profile.organization === undefined - ? {} - : {organization: profile.organization}), + ...(profile.team === undefined ? {} : {team: profile.team}), ...(profile.owner === undefined ? {} : {owner: profile.owner}), ...(profile.project === undefined ? {} : {project: profile.project}), } diff --git a/src/services/bansafe.ts b/src/services/bansafe.ts index f6a194ec..516e263b 100644 --- a/src/services/bansafe.ts +++ b/src/services/bansafe.ts @@ -11,7 +11,7 @@ import { type BanSafeSignalDefinition, type BanSafeTelemetryDetail, type BanSafeTelemetrySnapshot, - type ClientInstance as OrganizationClient, + type ClientInstance as TeamClient, type CursorPageMetadata, type ListBanSafeClaimsParams, type ListBanSafeCollectionParams, @@ -55,7 +55,7 @@ interface ResultMetadata { } export async function listHealth( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeHealthParams, ): Promise> { const response = await client.banSafe.listHealth(params) @@ -63,7 +63,7 @@ export async function listHealth( } export async function getHealth( - client: OrganizationClient, + client: TeamClient, session: string, ): Promise> { const response = await client.banSafe.getHealth(session) @@ -71,7 +71,7 @@ export async function getHealth( } export async function listHealthHistory( - client: OrganizationClient, + client: TeamClient, session: string, params: ListBanSafeHealthHistoryParams, ): Promise> { @@ -80,14 +80,14 @@ export async function listHealthHistory( } export async function listSignals( - client: OrganizationClient, + client: TeamClient, ): Promise> { const response = await client.banSafe.listSignals() return result(response.data.data, response.metadata) } export async function getTelemetry( - client: OrganizationClient, + client: TeamClient, session: string, ): Promise> { const response = await client.banSafe.getTelemetry(session) @@ -95,7 +95,7 @@ export async function getTelemetry( } export async function listTelemetryHistory( - client: OrganizationClient, + client: TeamClient, session: string, params: ListBanSafeTelemetryHistoryParams, ): Promise> { @@ -104,7 +104,7 @@ export async function listTelemetryHistory( } export async function listCollection( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeCollectionParams, ): Promise> { const response = await client.banSafe.listCollection(params) @@ -112,7 +112,7 @@ export async function listCollection( } export async function listFindings( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeFindingsParams, ): Promise> { const response = await client.banSafe.listFindings(params) @@ -120,7 +120,7 @@ export async function listFindings( } export async function listEnforcement( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeEnforcementParams, ): Promise> { const response = await client.banSafe.listEnforcement(params) @@ -128,7 +128,7 @@ export async function listEnforcement( } export async function listIncidents( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeIncidentsParams, ): Promise> { const response = await client.banSafe.listIncidents(params) @@ -136,7 +136,7 @@ export async function listIncidents( } export async function listClaims( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeClaimsParams, ): Promise> { const response = await client.banSafe.listClaims(params) @@ -144,7 +144,7 @@ export async function listClaims( } export async function getClaim( - client: OrganizationClient, + client: TeamClient, claimId: string, ): Promise> { const response = await client.banSafe.getClaim(claimId) @@ -152,7 +152,7 @@ export async function getClaim( } export async function reportIncident( - client: OrganizationClient, + client: TeamClient, body: ReportBanSafeIncidentRequest, options: RequestOptions, ) { @@ -161,7 +161,7 @@ export async function reportIncident( } export async function retractIncident( - client: OrganizationClient, + client: TeamClient, incidentId: string, options: RequestOptions, ) { @@ -170,7 +170,7 @@ export async function retractIncident( } export async function getProjectSafeMode( - client: OrganizationClient, + client: TeamClient, projectId: string, ) { const response = await client.projects.getSafeMode(projectId) @@ -178,7 +178,7 @@ export async function getProjectSafeMode( } export async function updateProjectSafeMode( - client: OrganizationClient, + client: TeamClient, projectId: string, input: unknown, options: RequestOptions, @@ -191,16 +191,13 @@ export async function updateProjectSafeMode( return result(response.data.data, response.metadata) } -export async function getSessionSafeMode( - client: OrganizationClient, - session: string, -) { +export async function getSessionSafeMode(client: TeamClient, session: string) { const response = await client.sessions.getSafeMode(session) return result(response.data.data, response.metadata) } export async function updateSessionSafeMode( - client: OrganizationClient, + client: TeamClient, session: string, input: unknown, options: RequestOptions, @@ -213,16 +210,13 @@ export async function updateSessionSafeMode( return result(response.data.data, response.metadata) } -export async function getWarmupPlan( - client: OrganizationClient, - projectId: string, -) { +export async function getWarmupPlan(client: TeamClient, projectId: string) { const response = await client.projects.getWarmupPlan(projectId) return result(response.data.data, response.metadata) } export async function getInsuranceEvidence( - client: OrganizationClient, + client: TeamClient, projectId: string, ) { const response = await client.projects.getInsuranceEvidence(projectId) @@ -230,7 +224,7 @@ export async function getInsuranceEvidence( } export async function updateInsuranceEvidence( - client: OrganizationClient, + client: TeamClient, projectId: string, input: unknown, options: RequestOptions, @@ -244,7 +238,7 @@ export async function updateInsuranceEvidence( } export async function updateWarmupPlan( - client: OrganizationClient, + client: TeamClient, projectId: string, input: unknown, options: RequestOptions, @@ -258,7 +252,7 @@ export async function updateWarmupPlan( } export async function listHealthActions( - client: OrganizationClient, + client: TeamClient, params: ListBanSafeHealthActionsParams, ): Promise> { const response = await client.banSafe.listHealthActions(params) @@ -266,7 +260,7 @@ export async function listHealthActions( } export async function getHealthPolicy( - client: OrganizationClient, + client: TeamClient, projectId: string, ): Promise> { const response = await client.projects.getHealthPolicy(projectId) @@ -274,7 +268,7 @@ export async function getHealthPolicy( } export async function updateHealthPolicy( - client: OrganizationClient, + client: TeamClient, projectId: string, input: unknown, options: RequestOptions = {}, diff --git a/src/services/billing-controls.ts b/src/services/billing-controls.ts index 8062a6ec..59f01732 100644 --- a/src/services/billing-controls.ts +++ b/src/services/billing-controls.ts @@ -75,7 +75,7 @@ export function limitValue( return Number(value) } async function request( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, method: 'GET' | 'PUT', path: string, schema: z.ZodType, @@ -98,10 +98,7 @@ async function request( }) return {data: parsed.data, metadata: response.metadata} } -export function getLimits( - client: ClientInstance<'organization'>, - projectId?: string, -) { +export function getLimits(client: ClientInstance<'team'>, projectId?: string) { return request( client, 'GET', @@ -112,7 +109,7 @@ export function getLimits( ) } export function setLimit( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, scope: 'project' | 'customer' | 'number', id: string, credits: number | null, @@ -130,7 +127,7 @@ export function setLimit( ) } export function getPriorities( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId?: string, ) { return request( @@ -143,7 +140,7 @@ export function getPriorities( ) } export function setPriority( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, scope: 'project' | 'customer' | 'number', id: string, value: number, @@ -161,7 +158,7 @@ export function setPriority( ) } export function reorderPriorities( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, scope: 'project' | 'customer' | 'number' | 'resource', ids: string[], expectedRevision: number, @@ -241,7 +238,7 @@ const resourceControls = z.object({ priorityRevision: revision, }) export function getResourceControls( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, scope: 'project' | 'customer' | 'number', id: string, ) { @@ -253,7 +250,7 @@ export function getResourceControls( ) } export function setResourceControls( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, scope: 'project' | 'customer' | 'number', id: string, input: { diff --git a/src/services/call-analytics.ts b/src/services/call-analytics.ts index a6b3e636..a4029257 100644 --- a/src/services/call-analytics.ts +++ b/src/services/call-analytics.ts @@ -80,7 +80,7 @@ type Query = Readonly> export class CallAnalyticsApi { private readonly calls: - PlatformCallsResource<'organization'> | PlatformCallsResource<'project'> + PlatformCallsResource<'team'> | PlatformCallsResource<'project'> constructor( environment: DeveloperEnvironment, @@ -107,7 +107,7 @@ export class CallAnalyticsApi { } else { const root = new Client({ ...options, - credential: {type: 'organizationApiKey', value: environment.credential}, + credential: {type: 'teamApiKey', value: environment.credential}, }) this.calls = environment.context.owner === 'project' && environment.context.projectId @@ -209,7 +209,7 @@ export function callFilterQuery(input: CallFilterInput): Query { } } -/** The project filter for the resolved context; none for the organization. */ +/** The project filter for the resolved context; none for the team. */ export function projectQuery(context: OutputContext): Query { return context.owner === 'project' && context.projectId ? {projectId: context.projectId} diff --git a/src/services/call-consent.ts b/src/services/call-consent.ts index 7bfe4ed0..28a40979 100644 --- a/src/services/call-consent.ts +++ b/src/services/call-consent.ts @@ -20,7 +20,7 @@ import {conversationReference} from './conversation.js' import {validateCallTarget} from './calls.js' import {assertCursorAdvanced} from '../developer/support.js' -type PlatformClient = ClientInstance<'organization'> +type PlatformClient = ClientInstance<'team'> export interface CallConsentResult { readonly data: T diff --git a/src/services/campaign-conversions.ts b/src/services/campaign-conversions.ts index b4c7e266..a751d9cf 100644 --- a/src/services/campaign-conversions.ts +++ b/src/services/campaign-conversions.ts @@ -10,7 +10,7 @@ import type {CampaignResult} from './campaigns.js' /** Report a conversion for one campaign recipient (beta). */ export async function recordCampaignConversion( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, campaignId: string, body: RecordCampaignConversionRequest, ): Promise> { @@ -20,7 +20,7 @@ export async function recordCampaignConversion( /** A campaign's conversion counts and per-currency values (beta). */ export async function viewCampaignConversions( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, campaignId: string, projectId: string, ): Promise> { diff --git a/src/services/campaign-frequency-cap.ts b/src/services/campaign-frequency-cap.ts index d2e7a1e1..512b5ecc 100644 --- a/src/services/campaign-frequency-cap.ts +++ b/src/services/campaign-frequency-cap.ts @@ -74,14 +74,14 @@ export function frequencyCapInput( } satisfies CampaignFrequencyCap, } } -export async function getFrequencyCap(client: ClientInstance<'organization'>) { +export async function getFrequencyCap(client: ClientInstance<'team'>) { const response = await client.raw.request<{ data: CampaignFrequencyCapSettings }>({method: 'GET', path: '/platform/campaign-settings/frequency-cap'}) return {data: response.data.data, metadata: response.metadata} } export async function updateFrequencyCap( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, body: UpdateCampaignFrequencyCapInput, ) { const response = await client.raw.request<{ diff --git a/src/services/campaign-segments-drip.ts b/src/services/campaign-segments-drip.ts index 83d02a97..924577cc 100644 --- a/src/services/campaign-segments-drip.ts +++ b/src/services/campaign-segments-drip.ts @@ -88,7 +88,7 @@ export function dripInput( return body } export async function campaignRequest( - client: ClientInstance<'organization'> | MessagingClient, + client: ClientInstance<'team'> | MessagingClient, request: RawRequest, ) { const response = await client.raw.request<{data: T}>({ diff --git a/src/services/customers.ts b/src/services/customers.ts index eccba578..13089c14 100644 --- a/src/services/customers.ts +++ b/src/services/customers.ts @@ -42,7 +42,7 @@ export function requireCustomerProject(projectId?: string): string { } export async function customerStatus( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId: string, ): Promise> { const response = await client.customers.status(projectId) @@ -50,7 +50,7 @@ export async function customerStatus( } export async function enableCustomers( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId: string, options: RequestOptions, ): Promise> { @@ -59,7 +59,7 @@ export async function enableCustomers( } export async function listCustomers( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, params: ListCustomersParams, ): Promise> { const response = await client.customers.list(params) @@ -67,7 +67,7 @@ export async function listCustomers( } export async function createCustomer( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, body: CreateCustomerRequest, options: RequestOptions, ): Promise> { @@ -76,7 +76,7 @@ export async function createCustomer( } export async function viewCustomer( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, projectId: string, ): Promise> { @@ -85,7 +85,7 @@ export async function viewCustomer( } export async function updateCustomer( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, body: UpdateCustomerRequest, ): Promise> { @@ -100,7 +100,7 @@ export async function updateCustomer( } export async function archiveCustomer( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, body: CustomerProjectRequest, options: RequestOptions, @@ -110,7 +110,7 @@ export async function archiveCustomer( } export async function restoreCustomer( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, body: CustomerProjectRequest, options: RequestOptions, @@ -120,7 +120,7 @@ export async function restoreCustomer( } export async function listCustomerNumbers( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, projectId: string, ): Promise> { @@ -129,7 +129,7 @@ export async function listCustomerNumbers( } export async function listCustomerEvents( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, params: ListCustomerEventsParams, ): Promise> { @@ -138,7 +138,7 @@ export async function listCustomerEvents( } export async function createCustomerPairingLink( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, body: CreateCustomerPairingLinkRequest, options: RequestOptions, @@ -152,7 +152,7 @@ export async function createCustomerPairingLink( } export async function listCustomerPairingLinks( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, projectId: string, ): Promise> { @@ -164,7 +164,7 @@ export async function listCustomerPairingLinks( } export async function revokeCustomerPairingLink( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, pairingLinkId: string, projectId: string, @@ -178,7 +178,7 @@ export async function revokeCustomerPairingLink( } export async function transferCustomerNumber( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, customerId: string, sessionId: string, body: TransferCustomerNumberRequest, diff --git a/src/services/doctor.ts b/src/services/doctor.ts index 35c5cbcf..cec3bca2 100644 --- a/src/services/doctor.ts +++ b/src/services/doctor.ts @@ -256,7 +256,7 @@ async function listProjectsPing(input: { }): Promise { return new Client({ baseUrl: input.baseUrl, - credential: {type: 'organizationApiKey', value: input.credential}, + credential: {type: 'teamApiKey', value: input.credential}, maxNetworkRetries: 0, ...(input.timeoutMs === undefined ? {} : {timeoutMs: input.timeoutMs}), }).projects.list() diff --git a/src/services/init-starter.ts b/src/services/init-starter.ts index ff3ab164..dd10d381 100644 --- a/src/services/init-starter.ts +++ b/src/services/init-starter.ts @@ -98,7 +98,7 @@ if (!apiKey) { process.exitCode = 1 } else { const client = new Client({ - credential: {type: 'organizationApiKey', value: apiKey}, + credential: {type: 'teamApiKey', value: apiKey}, }) const response = await client.projects.list() for (const project of response.data.data) { diff --git a/src/services/number-tiers.ts b/src/services/number-tiers.ts index 33cb9ed5..86350522 100644 --- a/src/services/number-tiers.ts +++ b/src/services/number-tiers.ts @@ -98,7 +98,7 @@ function hybridResolution(input: TierQuoteInput): HybridResolution | undefined { } export async function quoteTierChange( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, sessionId: string, body: NumberTierQuoteRequest, ): Promise> { @@ -107,7 +107,7 @@ export async function quoteTierChange( } export async function confirmTierChange( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, sessionId: string, quoteId: string, projectId?: string, @@ -122,7 +122,7 @@ export async function confirmTierChange( } export async function retrieveTierChange( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, sessionId: string, quoteId: string, ): Promise> { @@ -131,7 +131,7 @@ export async function retrieveTierChange( } export async function listHybridMergeCandidates( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId: string, ): Promise> { const response = await client.projects.listHybridMergeCandidates(projectId) diff --git a/src/services/opt-outs.ts b/src/services/opt-outs.ts index 00ed7424..f990b0cc 100644 --- a/src/services/opt-outs.ts +++ b/src/services/opt-outs.ts @@ -21,14 +21,14 @@ export interface OptOutResult { } export async function viewOptOutSettings( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, ): Promise> { const response = await client.optOuts.getSettings() return result(response.data.data, response.metadata) } export async function updateOptOutSettings( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, body: UpdateOptOutSettingsRequest, options: RequestOptions = {}, ): Promise> { diff --git a/src/services/platform-management.ts b/src/services/platform-management.ts index af2b706d..620be7bb 100644 --- a/src/services/platform-management.ts +++ b/src/services/platform-management.ts @@ -4,7 +4,7 @@ import { type AuditLog, type ClientInstance, type ListAuditLogsParams, - type OrganizationMember, + type TeamMember, PolymorfaValidationError, type ProjectToken, type RequestOptions, @@ -19,11 +19,11 @@ import { type PlatformSession, type SessionCapabilities, type UpdateQuickLinkSettingsInput, - type OrganizationQuickLinkSettings, + type TeamQuickLinkSettings, type ProjectQuickLinkSettings, } from '@polymorfa/sdk' -type WidgetSettings = OrganizationQuickLinkSettings | ProjectQuickLinkSettings +type WidgetSettings = TeamQuickLinkSettings | ProjectQuickLinkSettings export interface PlatformResult { readonly data: T @@ -36,14 +36,14 @@ export interface PlatformResult { } export async function listApiKeys( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, ): Promise> { const response = await client.apiKeys.list() return result(response.data.data, response.metadata) } export async function revokeApiKey( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, keyId: string, options: RequestOptions = {}, ): Promise> { @@ -52,14 +52,14 @@ export async function revokeApiKey( } export async function listMembers( - client: ClientInstance<'organization'>, -): Promise> { + client: ClientInstance<'team'>, +): Promise> { const response = await client.members.list() return result(response.data.data, response.metadata) } export async function listAuditLogs( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, params: ListAuditLogsParams = {}, ): Promise> { const response = await client.auditLogs.list(params) @@ -67,7 +67,7 @@ export async function listAuditLogs( } export async function listSessionBans( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, activeOnly: boolean, ): Promise> { const response = activeOnly @@ -77,14 +77,14 @@ export async function listSessionBans( } export async function listSecurityIncidents( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, ): Promise> { const response = await client.securityIncidents.list() return result(response.data.data, response.metadata) } export async function acknowledgeSecurityIncident( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, incidentId: string, options: RequestOptions = {}, ): Promise> { @@ -96,7 +96,7 @@ export async function acknowledgeSecurityIncident( } export async function listProjectTokens( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId: string, ): Promise> { const response = await client.projectTokens.list(projectId) @@ -104,7 +104,7 @@ export async function listProjectTokens( } export async function listManagedSessions( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId?: string, ): Promise> { const response = await client.sessions.list( @@ -114,7 +114,7 @@ export async function listManagedSessions( } export async function viewManagedSession( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, sessionId: string, ): Promise> { const response = await client.sessions.retrieve(sessionId) @@ -177,7 +177,7 @@ function newChatCapLine(session: Session): string[] { } export async function stopSessions( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, sessionIds: readonly string[], projectId?: string, options: RequestOptions = {}, @@ -191,7 +191,7 @@ export async function stopSessions( /** WhatsApp features and limits WhatsApp enabled for a number (beta). */ export async function getSessionCapabilities( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, session: string, ): Promise> { const response = await client.sessions.getCapabilities(session) @@ -222,7 +222,7 @@ export function renderSessionCapabilities( } export async function deleteSessions( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, sessionIds: readonly string[], projectId?: string, options: RequestOptions = {}, @@ -248,8 +248,8 @@ export function renderApiKeys(keys: readonly ApiKey[]): string { .join('\n') } -export function renderMembers(members: readonly OrganizationMember[]): string { - if (members.length === 0) return 'No organization members found.' +export function renderMembers(members: readonly TeamMember[]): string { + if (members.length === 0) return 'No team members found.' return members .map((member) => [member.email, member.name ?? '', member.role, member.status].join('\t'), @@ -318,7 +318,7 @@ export function renderProjectTokens(tokens: readonly ProjectToken[]): string { } export async function viewWidgetSettings( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, projectId?: string, ): Promise> { const response = await ( @@ -328,7 +328,7 @@ export async function viewWidgetSettings( } export async function updateWidgetSettings( - client: ClientInstance<'organization'>, + client: ClientInstance<'team'>, input: unknown, projectId?: string, options: RequestOptions = {}, @@ -345,13 +345,13 @@ export function renderWidgetSettings( ): string { if (settings === null) { return requestedProjectId === undefined - ? 'No saved organization-default widget settings found.' + ? 'No saved team-default widget settings found.' : `No saved widget settings found for project ${requestedProjectId}.` } return [ `ID\t${settings.id}`, - `Scope\t${settings.projectId ?? 'organization defaults'}`, + `Scope\t${settings.projectId ?? 'team defaults'}`, `Enabled\t${settings.enabled}`, `Methods\t${settings.methods?.join(', ') ?? 'default'}`, `Theme\t${settings.theme}`, diff --git a/src/services/projects.ts b/src/services/projects.ts index 8f81e84f..0a179bd7 100644 --- a/src/services/projects.ts +++ b/src/services/projects.ts @@ -228,7 +228,7 @@ export class ProjectContextService { ) if (matches.length === 0) { throw new PolymorfaConfigurationError( - `Project ${value} was not found in the organization.`, + `Project ${value} was not found in the team.`, 'project', ) } @@ -280,7 +280,7 @@ export class ProjectContextService { if (projectToken !== undefined) { // The token does not name its project, so an explicit UUID is the // only way to identify it locally. A slug cannot be resolved without - // an organization credential. + // a team credential. const declared = nonEmpty(options.project)?.trim() if (declared !== undefined && PROJECT_UUID.test(declared)) { return { diff --git a/src/services/usage.ts b/src/services/usage.ts index da0f3fa8..ce270b7d 100644 --- a/src/services/usage.ts +++ b/src/services/usage.ts @@ -62,7 +62,7 @@ export function createUsageResource( } const client = new Client({ ...options, - credential: {type: 'organizationApiKey', value: environment.credential}, + credential: {type: 'teamApiKey', value: environment.credential}, }) return environment.context.owner === 'project' && projectId ? client.project(projectId).usage diff --git a/test/commands/audiences-optouts.test.ts b/test/commands/audiences-optouts.test.ts index 78763a96..0b1fc768 100644 --- a/test/commands/audiences-optouts.test.ts +++ b/test/commands/audiences-optouts.test.ts @@ -172,7 +172,7 @@ describe('Audience and opt-out commands', () => { expect(result.stdout).not.toContain('Removed') }) - test('reads the organization keyword settings', async () => { + test('reads the team keyword settings', async () => { server = await startHttpServer({body: {data: settings()}}) const result = await apiKeyEnvironment(() => diff --git a/test/commands/call-analytics.test.ts b/test/commands/call-analytics.test.ts index 7df50f74..f65c91f0 100644 --- a/test/commands/call-analytics.test.ts +++ b/test/commands/call-analytics.test.ts @@ -161,7 +161,7 @@ describe('calls stats', () => { expect(result.stdout).not.toContain('Calls by hour') }) - test('reads the whole organization without --project and prints the heatmap', async () => { + test('reads the whole team without --project and prints the heatmap', async () => { server = await startHttpSequenceServer([ { body: { @@ -199,7 +199,7 @@ describe('calls stats', () => { expect(JSON.parse(result.stdout)).toEqual({ schemaVersion: 1, data: stats(), - context: {owner: 'organization', principalType: 'organization_key'}, + context: {owner: 'team', principalType: 'team_key'}, request: {apiVersion: null, id: 'req_1', status: 200}, }) }) diff --git a/test/commands/call-consent.test.ts b/test/commands/call-consent.test.ts index d7120986..628d7dd8 100644 --- a/test/commands/call-consent.test.ts +++ b/test/commands/call-consent.test.ts @@ -135,7 +135,7 @@ describe('call consent commands', () => { body: { error: { code: 'permission_denied', - message: "The team's call policy needs an organization credential.", + message: "The team's call policy needs a team credential.", }, success: false, }, @@ -155,7 +155,7 @@ describe('call consent commands', () => { error: {category: 'conflict', code: 'state_conflict'}, }) expect(exitCode(refused.error)).toBe(3) - expect(refused.stderr).toContain('organization credential') + expect(refused.stderr).toContain('team credential') }, 30_000) test('reports malformed SDK collection envelopes as server failures', async () => { diff --git a/test/commands/campaign-segments-drip.test.ts b/test/commands/campaign-segments-drip.test.ts index 7ea0a588..c906e41c 100644 --- a/test/commands/campaign-segments-drip.test.ts +++ b/test/commands/campaign-segments-drip.test.ts @@ -93,7 +93,7 @@ async function run(command: string) { () => runCommand(command), ) } -test('lists and reads organization segments with pagination', async () => { +test('lists and reads team segments with pagination', async () => { server = await startHttpSequenceServer([ {body: {data: [segment], page: {hasMore: true, nextCursor: 'next'}}}, {body: {data: segment}}, diff --git a/test/commands/customers.test.ts b/test/commands/customers.test.ts index 682a6272..82d8d5c6 100644 --- a/test/commands/customers.test.ts +++ b/test/commands/customers.test.ts @@ -92,7 +92,7 @@ describe('Customer commands', () => { name: 'Ada', needsAttention: false, numberCount: 1, - orgId: 'org_1', + teamId: 'team_1', projectId: 'project/1', status: 'active', updatedAt: 1_725_000_000_000, @@ -320,7 +320,7 @@ function customer() { id: 'customer/1', isDefault: false, name: 'Ada', - orgId: 'org_1', + teamId: 'team_1', projectId: 'project/1', status: 'active', updatedAt: 1_725_000_000_000, @@ -383,7 +383,7 @@ function pairingLink() { maxAttempts: 3, methods: ['qr', 'phone'], openedAt: null, - orgId: 'org_1', + teamId: 'team_1', pendingSessionId: null, phoneMismatchCount: 0, projectId: 'project/1', diff --git a/test/commands/developer-webhooks.test.ts b/test/commands/developer-webhooks.test.ts index b79c1e4c..cf0815c3 100644 --- a/test/commands/developer-webhooks.test.ts +++ b/test/commands/developer-webhooks.test.ts @@ -145,12 +145,12 @@ describe('developer webhook commands', () => { const output = stdout() await developerEnvironment(() => - WebhookList.run(['--owner', 'organization', '--limit', '10', '--json']), + WebhookList.run(['--owner', 'team', '--limit', '10', '--json']), ) expect(findCall('webhooks.list').args).toEqual([{limit: 10}, {}]) expect(json(output)).toMatchObject({ - context: {owner: 'organization'}, + context: {owner: 'team'}, data: [{id: 'wh_1'}], page: {hasMore: true, nextCursor: 'next_1'}, schemaVersion: 1, @@ -161,7 +161,7 @@ describe('developer webhook commands', () => { const output = stdout() await developerEnvironment(() => - WebhookView.run(['wh_1', '--owner', 'organization', '--json']), + WebhookView.run(['wh_1', '--owner', 'team', '--json']), ) expect(findCall('webhooks.retrieve').args).toEqual(['wh_1', {}]) @@ -172,8 +172,8 @@ describe('developer webhook commands', () => { const output = stdout() await developerEnvironment(async () => { - await WebhookView.run(['wh_1', '--owner', 'organization']) - await WebhookDeliveryView.run(['delivery_1', '--owner', 'organization']) + await WebhookView.run(['wh_1', '--owner', 'team']) + await WebhookDeliveryView.run(['delivery_1', '--owner', 'team']) }) const text = output.mock.calls.map(([chunk]) => String(chunk)).join('') @@ -191,7 +191,7 @@ describe('developer webhook commands', () => { WebhookDelete.run([ 'wh_1', '--owner', - 'organization', + 'team', '--yes', '--idempotency-key', 'delete_1', @@ -272,7 +272,7 @@ describe('developer webhook commands', () => { 'delivery_1', 'attempt_1', '--owner', - 'organization', + 'team', '--json', ]), ) @@ -292,12 +292,7 @@ describe('developer webhook commands', () => { const output = stdout() await developerEnvironment(() => - WebhookDeliveryView.run([ - 'delivery_1', - '--owner', - 'organization', - '--json', - ]), + WebhookDeliveryView.run(['delivery_1', '--owner', 'team', '--json']), ) expect(findCall('webhookDeliveries.retrieve').args).toEqual([ @@ -348,7 +343,7 @@ describe('developer webhook commands', () => { WebhookUpdate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--input', input, '--idempotency-key', @@ -411,7 +406,7 @@ describe('developer webhook commands', () => { WebhookUpdate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--phone-offline-start-day', '13', '--idempotency-key', @@ -432,7 +427,7 @@ describe('developer webhook commands', () => { WebhookUpdate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--phone-offline-start-day', 'off', '--idempotency-key', @@ -456,7 +451,7 @@ describe('developer webhook commands', () => { WebhookUpdate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--phone-offline-start-day', 'off', ]), @@ -480,7 +475,7 @@ describe('developer webhook commands', () => { WebhookUpdate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--phone-offline-start-day', value, ]), @@ -500,7 +495,7 @@ describe('developer webhook commands', () => { .spyOn(process.stderr, 'write') .mockImplementation(() => true) const error = await developerEnvironment(() => - WebhookUpdate.run(['wh_1', '--owner', 'organization']), + WebhookUpdate.run(['wh_1', '--owner', 'team']), ).catch((caught: unknown) => caught) expect(exitCode(error)).toBe(2) expect(String(stderr.mock.calls.flat().join(''))).toContain( @@ -559,7 +554,7 @@ describe('developer webhook commands', () => { WebhookTest.run([ 'wh_1', '--owner', - 'organization', + 'team', '--event', 'customer.created', '--input', @@ -639,7 +634,7 @@ describe('developer webhook commands', () => { WebhookSecretRotate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--overlap', '1h', '--secret-out', @@ -671,7 +666,7 @@ describe('developer webhook commands', () => { WebhookSecretRotate.run([ 'wh_1', '--owner', - 'organization', + 'team', '--secret-out', secret, '--yes', @@ -694,7 +689,7 @@ describe('developer webhook commands', () => { WebhookDeliveryRetry.run([ 'delivery_1', '--owner', - 'organization', + 'team', '--yes', '--idempotency-key', 'retry_1', @@ -807,7 +802,7 @@ function resource( format: 'native', headers: [], id: String(args[0]), - owner: 'organization', + owner: 'team', projectId: null, updatedAt: '2026-09-08T00:00:00Z', url: 'https://hooks.example.test/polymorfa', diff --git a/test/commands/event-stream.test.ts b/test/commands/event-stream.test.ts index 26f215fc..bdb7d880 100644 --- a/test/commands/event-stream.test.ts +++ b/test/commands/event-stream.test.ts @@ -195,7 +195,7 @@ describe('event stream', () => { test('requires a project owner', async () => { vi.spyOn(process.stderr, 'write').mockImplementation(() => true) const error = await environment(() => - EventStream.run(['--owner', 'organization', '--json']), + EventStream.run(['--owner', 'team', '--json']), ).catch((caught: unknown) => caught) expect(exitCode(error)).toBe(8) expect(sdk.params).toHaveLength(0) @@ -223,7 +223,7 @@ function item(id: string, cursor: string, withBody = true) { sequence: 2, event: { id, - organizationId: 'org_1', + teamId: 'team_1', projectId: PROJECT, type: 'message.received', source: 'runtime', diff --git a/test/commands/events.test.ts b/test/commands/events.test.ts index 7fcd2097..bebd2305 100644 --- a/test/commands/events.test.ts +++ b/test/commands/events.test.ts @@ -79,7 +79,7 @@ describe('event commands', () => { data: [event()], context: { owner: 'project', - principalType: 'organization_key', + principalType: 'team_key', projectId: '11111111-1111-4111-8111-111111111111', }, request: {apiVersion: '2026-08-20', id: 'req_1', status: 200}, @@ -87,7 +87,7 @@ describe('event commands', () => { }) }) - test('views an organization event and explicitly requests its payload', async () => { + test('views a team event and explicitly requests its payload', async () => { sdk.responses.push({data: event(), metadata: metadata()}) const output = vi .spyOn(process.stdout, 'write') @@ -97,7 +97,7 @@ describe('event commands', () => { EventView.run([ 'evt_1', '--owner', - 'organization', + 'team', '--include-payload', '--json', ]), @@ -112,7 +112,7 @@ describe('event commands', () => { expect(JSON.parse(String(output.mock.calls[0]?.[0]))).toMatchObject({ schemaVersion: 1, data: {id: 'evt_1'}, - context: {owner: 'organization', principalType: 'organization_key'}, + context: {owner: 'team', principalType: 'team_key'}, request: {id: 'req_1', status: 200}, }) }) @@ -135,7 +135,7 @@ describe('event commands', () => { .mockImplementation(() => true) await environment(() => - EventView.run(['evt_1', '--owner', 'organization', '--include-payload']), + EventView.run(['evt_1', '--owner', 'team', '--include-payload']), ) const text = output.mock.calls.map(([chunk]) => String(chunk)).join('') @@ -150,7 +150,7 @@ describe('event commands', () => { const error = await environment(() => EventList.run([ '--owner', - 'organization', + 'team', '--cursor', 'cursor_1', '--type', @@ -221,7 +221,7 @@ describe('event commands', () => { '--webhook', 'wh_1', '--owner', - 'organization', + 'team', '--json', ]), ).catch((caught: unknown) => caught) @@ -267,7 +267,7 @@ function event() { environment: 'development', id: 'evt_1', metadataExpiresAt: '2026-10-08T00:00:00Z', - organizationId: 'org_1', + teamId: 'team_1', payload: null, payloadAvailability: 'not_retained', projectId: '11111111-1111-4111-8111-111111111111', diff --git a/test/commands/functions.test.ts b/test/commands/functions.test.ts index 69bc63da..a096d247 100644 --- a/test/commands/functions.test.ts +++ b/test/commands/functions.test.ts @@ -391,7 +391,7 @@ describe('Function commands', () => { expect(result.stderr).toContain('reconcile') expect(server.requests).toHaveLength(1) }) - test('uses project tokens without silently treating them as organization credentials', async () => { + test('uses project tokens without silently treating them as team credentials', async () => { server = await startHttpServer({ body: {data: {items: [], nextCursor: null}}, }) diff --git a/test/commands/hybrid-credentials.test.ts b/test/commands/hybrid-credentials.test.ts index 1fa6818f..9041ba8e 100644 --- a/test/commands/hybrid-credentials.test.ts +++ b/test/commands/hybrid-credentials.test.ts @@ -322,30 +322,27 @@ test.each(cases)( test.each([ 'routing-policy get --scope team', 'routing-policy set --scope team --expected-revision default --prefer inherit --deny-all', -])( - 'project credentials cannot invoke organization policy: %s', - async (command) => { - const server = await startHttpSequenceServer([{body: {}}]) - try { - await withEnvironment( - { - POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_API_KEY: undefined, - POLYMORFA_PROJECT_TOKEN: projectToken, - POLYMORFA_CLIENT_TOKEN: undefined, - }, - async () => { - const result = await runCommand(`${command} --json`) - expect(result.error).toBeDefined() - expect(result.stderr).toContain('require a server API key') - }, - ) - expect(server.requests).toEqual([]) - } finally { - await server.close() - } - }, -) +])('project credentials cannot invoke team policy: %s', async (command) => { + const server = await startHttpSequenceServer([{body: {}}]) + try { + await withEnvironment( + { + POLYMORFA_BASE_URL: server.baseUrl, + POLYMORFA_API_KEY: undefined, + POLYMORFA_PROJECT_TOKEN: projectToken, + POLYMORFA_CLIENT_TOKEN: undefined, + }, + async () => { + const result = await runCommand(`${command} --json`) + expect(result.error).toBeDefined() + expect(result.stderr).toContain('require a server API key') + }, + ) + expect(server.requests).toEqual([]) + } finally { + await server.close() + } +}) test('invalid project-token format is rejected before transport', async () => { const server = await startHttpSequenceServer([{body: {}}]) diff --git a/test/commands/hybrid-link.test.ts b/test/commands/hybrid-link.test.ts index 37fc4a14..594a2086 100644 --- a/test/commands/hybrid-link.test.ts +++ b/test/commands/hybrid-link.test.ts @@ -59,7 +59,7 @@ test('routing policy uses linked project and resolves an explicit slug', async ( _creationTime: 0, _id: project, name: 'App', - orgId: 'org_1', + teamId: 'team_1', slug: 'app', stage: 'development', }, @@ -195,7 +195,7 @@ test('QuickLink creation accepts a project slug from the input file', async () = _creationTime: 0, _id: project, name: 'App', - orgId: 'org_1', + teamId: 'team_1', slug: 'app', stage: 'development', }, diff --git a/test/commands/listen.test.ts b/test/commands/listen.test.ts index cc3e9284..43478101 100644 --- a/test/commands/listen.test.ts +++ b/test/commands/listen.test.ts @@ -214,7 +214,7 @@ const PROJECT = '11111111-1111-4111-8111-111111111111' const STREAM = '22222222-2222-4222-8222-222222222222' const AUTH = '33333333-3333-4333-8333-333333333333' const EVENT = '44444444-4444-4444-8444-444444444444' -const ORGANIZATION = '55555555-5555-4555-8555-555555555555' +const TEAM = '55555555-5555-4555-8555-555555555555' let activeBaseUrl = '' function route( @@ -330,7 +330,7 @@ function event() { environment: 'development', id: EVENT, metadataExpiresAt: '2026-10-08T00:00:00Z', - organizationId: ORGANIZATION, + teamId: TEAM, payloadAvailability: 'available', projectId: PROJECT, replayableUntil: null, diff --git a/test/commands/operations.test.ts b/test/commands/operations.test.ts index bccea36e..202eaf94 100644 --- a/test/commands/operations.test.ts +++ b/test/commands/operations.test.ts @@ -99,7 +99,7 @@ describe('operation commands', () => { process.exitCode = undefined }) - test('lists organization operations with filters', async () => { + test('lists team operations with filters', async () => { api.responses.push({ data: [operation('running', 2)], page: {nextCursor: null}, @@ -108,7 +108,7 @@ describe('operation commands', () => { await environment(() => OperationList.run([ '--owner', - 'organization', + 'team', '--status', 'running', '--resource-type', @@ -165,7 +165,7 @@ describe('operation commands', () => { OperationWait.run([ OPERATION, '--owner', - 'organization', + 'team', '--timeout', '120', '--json', @@ -182,7 +182,7 @@ describe('operation commands', () => { api.responses.push({data: operation('failed', 3)}) silence() await environment(() => - OperationWait.run([OPERATION, '--owner', 'organization', '--json']), + OperationWait.run([OPERATION, '--owner', 'team', '--json']), ) expect(process.exitCode).toBe(1) }) @@ -195,7 +195,7 @@ describe('operation commands', () => { OperationWait.run([ OPERATION, '--owner', - 'organization', + 'team', '--timeout', '0', '--json', @@ -212,9 +212,7 @@ describe('operation commands', () => { {data: operation('cancelled', 4)}, ) const output = silence() - await environment(() => - OperationWatch.run([OPERATION, '--owner', 'organization']), - ) + await environment(() => OperationWatch.run([OPERATION, '--owner', 'team'])) const text = output.mock.calls.map(([chunk]) => String(chunk)).join('') expect(text).toContain('\trunning\t') expect(text).toContain('\tcancelling\t') @@ -231,7 +229,7 @@ describe('operation commands', () => { OperationWait.run([ OPERATION, '--owner', - 'organization', + 'team', '--timeout', '1', '--json', @@ -250,7 +248,7 @@ describe('operation commands', () => { OperationWatch.run([ OPERATION, '--owner', - 'organization', + 'team', '--timeout', '1', '--json', @@ -274,7 +272,7 @@ describe('operation commands', () => { OperationCancel.run([ OPERATION, '--owner', - 'organization', + 'team', '--yes', '--idempotency-key', 'cancel_1', @@ -295,7 +293,7 @@ describe('operation commands', () => { test('does not cancel without --yes in a noninteractive process', async () => { vi.spyOn(process.stderr, 'write').mockImplementation(() => true) const error = await environment(() => - OperationCancel.run([OPERATION, '--owner', 'organization', '--json']), + OperationCancel.run([OPERATION, '--owner', 'team', '--json']), ).catch((caught: unknown) => caught) expect(exitCode(error)).toBe(2) expect(api.calls).toHaveLength(0) @@ -315,7 +313,7 @@ function operation(status: string, sequence: number) { error: null, id: OPERATION, kind: 'campaign', - organizationId: 'org_1', + teamId: 'team_1', progress: null, projectId: PROJECT, resource: {id: 'c1', type: 'campaign'}, diff --git a/test/commands/platform-management.test.ts b/test/commands/platform-management.test.ts index 2eafd47a..24d371f6 100644 --- a/test/commands/platform-management.test.ts +++ b/test/commands/platform-management.test.ts @@ -75,7 +75,7 @@ describe('Platform management commands', () => { data: { sessionId: 'session_1', name: 'Support', - tenantId: 'org_1', + tenantId: 'team_1', type: 'linked_device', testMode: false, status: 'DISCONNECTED', @@ -279,7 +279,7 @@ describe('Platform management commands', () => { keyId: 'key_1', label: 'Production', last4: '1234', - orgId: 'org_1', + teamId: 'team_1', scopes: 65_535, source: 'dashboard', start: 'pmfa_', @@ -332,7 +332,7 @@ describe('Platform management commands', () => { expect(server.requests).toHaveLength(0) }) - test('lists organization members through the organization-key resource', async () => { + test('lists team members through the team-key resource', async () => { server = await startHttpServer({ body: { data: [ @@ -343,7 +343,7 @@ describe('Platform management commands', () => { invitedAt: null, joinedAt: 1, name: 'Owner', - orgId: 'org_1', + teamId: 'team_1', role: 'owner', status: 'active', userId: 'user_1', @@ -619,7 +619,7 @@ describe('Platform management commands', () => { expect(server.requests).toHaveLength(0) }) - test('represents absent organization-default widget settings as null', async () => { + test('represents absent team-default widget settings as null', async () => { server = await startHttpServer({ body: {data: null}, headers: {'request-id': 'req_widget_missing'}, diff --git a/test/commands/project-context.test.ts b/test/commands/project-context.test.ts index 9092e7a4..939ea56b 100644 --- a/test/commands/project-context.test.ts +++ b/test/commands/project-context.test.ts @@ -41,7 +41,7 @@ describe('link and project commands', () => { _creationTime: 0, _id: APP, name: 'App', - orgId: 'org_1', + teamId: 'team_1', slug: 'app', stage: 'development', }, @@ -89,7 +89,7 @@ describe('link and project commands', () => { }) test.each(['malformed', 'unreadable'])( - 'organization commands ignore a %s project link', + 'team commands ignore a %s project link', async (kind) => { const link = join(directory, 'polymorfa.json') if (kind === 'malformed') await writeFile(link, '{invalid json') @@ -116,7 +116,7 @@ describe('link and project commands', () => { }, ) - test('organization developer commands ignore a malformed project link', async () => { + test('team developer commands ignore a malformed project link', async () => { await writeFile(join(directory, 'polymorfa.json'), '{invalid json') server = await startHttpServer({body: {data: []}}) @@ -128,7 +128,7 @@ describe('link and project commands', () => { POLYMORFA_CONFIG_DIR: join(directory, 'config'), POLYMORFA_PROJECT_TOKEN: undefined, }, - () => runCommand('webhook list --owner organization --json --verbose'), + () => runCommand('webhook list --owner team --json --verbose'), ) expect(result.error, result.stderr).toBeUndefined() diff --git a/test/config/profiles.test.ts b/test/config/profiles.test.ts index a6155ae2..7cac5a32 100644 --- a/test/config/profiles.test.ts +++ b/test/config/profiles.test.ts @@ -65,7 +65,7 @@ describe('ProfileRepository', () => { profiles: { work: { credential: {account: 'profile:work:apiKey', kind: 'apiKey'}, - organization: 'org_123', + team: 'team_123', }, }, version: 2, @@ -77,7 +77,7 @@ describe('ProfileRepository', () => { profiles: { work: { credential: {account: 'profile:work:apiKey', kind: 'apiKey'}, - organization: 'org_123', + team: 'team_123', }, }, version: 2, @@ -131,7 +131,7 @@ describe('ProfileRepository', () => { account: 'profile:project:projectToken', kind: 'projectToken', }, - owner: 'organization', + owner: 'team', project: 'project_1', }, }, diff --git a/test/context/environment.test.ts b/test/context/environment.test.ts index 0d6a8518..77dba1be 100644 --- a/test/context/environment.test.ts +++ b/test/context/environment.test.ts @@ -91,7 +91,7 @@ describe('resolveEnvironment', () => { POLYMORFA_API_KEY: 'ambient_key', POLYMORFA_CLIENT_TOKEN: 'ambient_client', }, - owner: 'organization', + owner: 'team', profile: 'work', }, fakeProfiles(), @@ -100,7 +100,7 @@ describe('resolveEnvironment', () => { ), ), ).resolves.toMatchObject({ - context: {owner: 'organization', profile: 'work'}, + context: {owner: 'team', profile: 'work'}, credential: 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', }) @@ -162,12 +162,12 @@ describe('resolveEnvironment', () => { ).resolves.toMatchObject({ credential: 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', - principalType: 'organization_key', + principalType: 'team_key', }) expect(credentials.get).not.toHaveBeenCalled() }) - test('resolves an organization project slug to its canonical UUID', async () => { + test('resolves a team project slug to its canonical UUID', async () => { const lookup = vi.fn(() => Promise.resolve([fakeProject('checkout')])) await expect( @@ -184,7 +184,7 @@ describe('resolveEnvironment', () => { lookup, ), ).resolves.toMatchObject({ - principalType: 'organization_key', + principalType: 'team_key', projectId: PROJECT, }) expect(lookup).toHaveBeenCalledOnce() @@ -219,25 +219,22 @@ describe('resolveEnvironment', () => { fakeProject('checkout', OTHER_PROJECT), ], }, - ])( - 'rejects an organization slug that is $expected', - async ({expected, projects}) => { - await expect( - resolveListenerEnvironment( - { - env: { - POLYMORFA_API_KEY: - 'pmfa_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', - }, - project: 'checkout', + ])('rejects a team slug that is $expected', async ({expected, projects}) => { + await expect( + resolveListenerEnvironment( + { + env: { + POLYMORFA_API_KEY: + 'pmfa_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', }, - fakeProfiles(), - fakeCredentials('unused'), - () => Promise.resolve(projects), - ), - ).rejects.toThrow(expected) - }, - ) + project: 'checkout', + }, + fakeProfiles(), + fakeCredentials('unused'), + () => Promise.resolve(projects), + ), + ).rejects.toThrow(expected) + }) test('rejects a project-token slug without attempting project discovery', async () => { const lookup = vi.fn(() => Promise.resolve([fakeProject('checkout')])) @@ -437,7 +434,7 @@ describe('resolveEnvironment', () => { expect(credentials.get).not.toHaveBeenCalled() }) - test('preserves the organization Platform credential boundary for project profiles and environment', async () => { + test('preserves the team Platform credential boundary for project profiles and environment', async () => { expect(() => resolveEnvironment({ env: {POLYMORFA_PROJECT_TOKEN: PROJECT_TOKEN}, @@ -451,7 +448,7 @@ describe('resolveEnvironment', () => { projectProfiles(), credentials, ), - ).rejects.toThrow('organization API key') + ).rejects.toThrow('team API key') expect(credentials.get).not.toHaveBeenCalled() }) @@ -545,7 +542,7 @@ describe('resolveDeveloperEnvironment owner inference', () => { const key = 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB' - test('reads the whole organization despite a saved project profile', async () => { + test('reads the whole team despite a saved project profile', async () => { const config: ProfileConfig = { activeProfile: 'scoped', profiles: { @@ -567,7 +564,7 @@ describe('resolveDeveloperEnvironment owner inference', () => { profiles, fakeCredentials(key), ) - expect(analytics.context.owner).toBe('organization') + expect(analytics.context.owner).toBe('team') expect(analytics.context.projectId).toBeUndefined() const explicitProfileScope = await resolveDeveloperEnvironment( @@ -581,7 +578,7 @@ describe('resolveDeveloperEnvironment owner inference', () => { }) }) - test('reads the organization with an organization key and no project', async () => { + test('reads the team with a team key and no project', async () => { await expect( resolveDeveloperEnvironment( {env: {POLYMORFA_API_KEY: key}, inferOwner: true}, @@ -589,7 +586,7 @@ describe('resolveDeveloperEnvironment owner inference', () => { fakeCredentials('unused'), ), ).resolves.toMatchObject({ - context: {owner: 'organization', principalType: 'organization_key'}, + context: {owner: 'team', principalType: 'team_key'}, }) }) @@ -646,7 +643,7 @@ function fakeProject(slug: string, id: string = PROJECT): ProjectWithStats { isActive: true, lastActivity: null, name: slug, - orgId: '33333333-3333-4333-8333-333333333333', + teamId: '33333333-3333-4333-8333-333333333333', slug, stage: 'development', totalMessages: 0, diff --git a/test/context/owner.test.ts b/test/context/owner.test.ts index cdee4b1c..9d4b59eb 100644 --- a/test/context/owner.test.ts +++ b/test/context/owner.test.ts @@ -4,9 +4,9 @@ import {resolveOwnerContext} from '../../src/context/owner.js' describe('resolveOwnerContext', () => { test('requires explicit owner and exact project context', () => { - expect(() => - resolveOwnerContext({principalType: 'organization_key'}), - ).toThrow('owner') + expect(() => resolveOwnerContext({principalType: 'team_key'})).toThrow( + 'owner', + ) expect(() => resolveOwnerContext({owner: 'project', principalType: 'project_token'}), ).toThrow('project') @@ -23,17 +23,17 @@ describe('resolveOwnerContext', () => { }) }) - test('rejects project context and project tokens for organization ownership', () => { + test('rejects project context and project tokens for team ownership', () => { expect(() => resolveOwnerContext({ - owner: 'organization', + owner: 'team', principalType: 'project_token', }), ).toThrow('project token') expect(() => resolveOwnerContext({ - owner: 'organization', - principalType: 'organization_key', + owner: 'team', + principalType: 'team_key', projectId: 'project_1', }), ).toThrow('project override') diff --git a/test/developer/client.test.ts b/test/developer/client.test.ts index 6abdfa6c..83b99308 100644 --- a/test/developer/client.test.ts +++ b/test/developer/client.test.ts @@ -5,7 +5,7 @@ import {createDeveloperSession} from '../../src/developer/client.js' import {withEnvironment} from '../helpers/http-server.js' describe('createDeveloperSession', () => { - test('ignores a broken project link for organization-owned resources', async () => { + test('ignores a broken project link for team-owned resources', async () => { const loadLinkedProject = vi.fn(() => Promise.reject(new Error('Broken project link')), ) @@ -17,18 +17,14 @@ describe('createDeveloperSession', () => { POLYMORFA_PROJECT_TOKEN: undefined, }, () => - createDeveloperSession( - {owner: 'organization'}, - undefined, - loadLinkedProject, - ), + createDeveloperSession({owner: 'team'}, undefined, loadLinkedProject), ) - expect(session.context.owner).toBe('organization') + expect(session.context.owner).toBe('team') expect(loadLinkedProject).not.toHaveBeenCalled() }) - test('creates an immutable project view from an organization key', async () => { + test('creates an immutable project view from a team key', async () => { const session = await withEnvironment( { POLYMORFA_API_KEY: @@ -48,7 +44,7 @@ describe('createDeveloperSession', () => { expect(session.client.projectId).toBe(PROJECT) expect(session.context).toMatchObject({ owner: 'project', - principalType: 'organization_key', + principalType: 'team_key', projectId: PROJECT, }) }) diff --git a/test/developer/output.test.ts b/test/developer/output.test.ts index 22ce81ac..aa4da4df 100644 --- a/test/developer/output.test.ts +++ b/test/developer/output.test.ts @@ -4,8 +4,8 @@ import {developerMutation} from '../../src/developer/output.js' const base = { context: { - owner: 'organization' as const, - principalType: 'organization_key' as const, + owner: 'team' as const, + principalType: 'team_key' as const, }, metadata: {attempts: 1, headers: {}, status: 200}, resource: null, diff --git a/test/listener/frames.test.ts b/test/listener/frames.test.ts index ef44116d..0253bd1e 100644 --- a/test/listener/frames.test.ts +++ b/test/listener/frames.test.ts @@ -102,7 +102,7 @@ describe('ListenerFrameDecoder', () => { 'cursor_1', ), ), - ).toThrow('organizationId') + ).toThrow('teamId') const bodyDecoder = startedDecoder() expect(() => @@ -210,7 +210,7 @@ function eventMetadata() { environment: 'development', id: EVENT, metadataExpiresAt: '2026-10-08T00:00:00Z', - organizationId: ORGANIZATION, + teamId: TEAM, payloadAvailability: 'available', projectId: PROJECT, replayableUntil: null, @@ -251,5 +251,5 @@ function ready() { const STREAM = '22222222-2222-4222-8222-222222222222' const PROJECT = '11111111-1111-4111-8111-111111111111' -const ORGANIZATION = '33333333-3333-4333-8333-333333333333' +const TEAM = '33333333-3333-4333-8333-333333333333' const EVENT = '44444444-4444-4444-8444-444444444444' diff --git a/test/listener/session.test.ts b/test/listener/session.test.ts index 892fa8e3..5ce873c8 100644 --- a/test/listener/session.test.ts +++ b/test/listener/session.test.ts @@ -539,7 +539,7 @@ describe('runListener', () => { const PROJECT = '11111111-1111-4111-8111-111111111111' const STREAM = '22222222-2222-4222-8222-222222222222' const AUTHORIZATION = '33333333-3333-4333-8333-333333333333' -const ORGANIZATION = '44444444-4444-4444-8444-444444444444' +const TEAM = '44444444-4444-4444-8444-444444444444' const EVENT = '55555555-5555-4555-8555-555555555555' const SECOND_EVENT = '66666666-6666-4666-8666-666666666666' @@ -639,7 +639,7 @@ function event() { environment: 'development', id: EVENT, metadataExpiresAt: '2026-10-08T00:00:00Z', - organizationId: ORGANIZATION, + teamId: TEAM, payloadAvailability: 'available', projectId: PROJECT, replayableUntil: null, diff --git a/test/mcp/session-discovery.test.ts b/test/mcp/session-discovery.test.ts index 0c7dcc87..7414754e 100644 --- a/test/mcp/session-discovery.test.ts +++ b/test/mcp/session-discovery.test.ts @@ -79,7 +79,7 @@ describe('MCP session discovery', () => { }, () => listMcpSessions(PROJECT_ID), ), - ).rejects.toThrow('Select only one organization API key') + ).rejects.toThrow('Select only one team API key') expect(server.requests).toHaveLength(0) }) }) diff --git a/test/sdk/client.test.ts b/test/sdk/client.test.ts index ef7a8423..5973e822 100644 --- a/test/sdk/client.test.ts +++ b/test/sdk/client.test.ts @@ -44,7 +44,7 @@ describe('createRawClient', () => { credential: {type: 'clientToken', value: 'pmfa_ct_browser'}, }), ).toThrow( - 'Client and project tokens cannot be used as organization server API keys.', + 'Client and project tokens cannot be used as team server API keys.', ) }) @@ -82,7 +82,7 @@ describe('createRawClient', () => { expect(client.quickLinks).toHaveProperty('create') }) - test('creates the unified organization client and rejects the wrong surface', () => { + test('creates the unified team client and rejects the wrong surface', () => { const client = createPlatformClient({ surface: 'platform', credential: { @@ -93,7 +93,7 @@ describe('createRawClient', () => { }) expect(client).toBeInstanceOf(Client) - expect(client.owner).toBe('organization') + expect(client.owner).toBe('team') expect(client.billing).toHaveProperty('retrieve') expect(client.billing).toHaveProperty('usage') expect(client.billing).toHaveProperty('listTransactions') @@ -103,7 +103,7 @@ describe('createRawClient', () => { expect(client.sessions).toHaveProperty('update') expect(client.sessions).toHaveProperty('quoteTierChange') expect(client.sessions).toHaveProperty('retrieveTierChange') - expect(client.organizations).not.toHaveProperty('update') + expect(client.teams).not.toHaveProperty('update') expect(() => createPlatformClient({ diff --git a/test/services/auth.test.ts b/test/services/auth.test.ts index d0501c27..8baa3ed6 100644 --- a/test/services/auth.test.ts +++ b/test/services/auth.test.ts @@ -190,7 +190,7 @@ describe('AuthService', () => { }, work: { credential: {account: 'profile:work:apiKey', kind: 'apiKey'}, - organization: 'org_work', + team: 'team_work', }, }, version: 2, @@ -207,7 +207,7 @@ describe('AuthService', () => { active: true, credentialKind: 'apiKey', name: 'work', - organization: 'org_work', + team: 'team_work', }, ]) expect(fixture.credentials.get).not.toHaveBeenCalled() diff --git a/test/services/call-consent.test.ts b/test/services/call-consent.test.ts index e770d93e..ae62083e 100644 --- a/test/services/call-consent.test.ts +++ b/test/services/call-consent.test.ts @@ -233,7 +233,7 @@ function fakeClient( requests: ImportCallOptOutsInput[], result: CallOptOutImportResult, failAfterFirst?: Error, -): ClientInstance<'organization'> { +): ClientInstance<'team'> { return { callOptOuts: { import(input: ImportCallOptOutsInput) { @@ -247,5 +247,5 @@ function fakeClient( }) }, }, - } as unknown as ClientInstance<'organization'> + } as unknown as ClientInstance<'team'> } diff --git a/test/services/projects.test.ts b/test/services/projects.test.ts index b27158da..6f101d86 100644 --- a/test/services/projects.test.ts +++ b/test/services/projects.test.ts @@ -258,18 +258,18 @@ describe('project context', () => { expect(explicit.context.projectId).toBe(APP) }) - test('organization-owned commands ignore the linked project', async () => { + test('team-owned commands ignore the linked project', async () => { const environment = await resolveDeveloperEnvironment( - {env: {}, linkedProject: WEB, owner: 'organization'}, + {env: {}, linkedProject: WEB, owner: 'team'}, profiles, credentials, lookup, ) - expect(environment.context).toMatchObject({owner: 'organization'}) + expect(environment.context).toMatchObject({owner: 'team'}) expect(environment.context.projectId).toBeUndefined() }) - test('organization-owned profiles do not read a project link', async () => { + test('team-owned profiles do not read a project link', async () => { const loadLinkedProject = vi.fn(() => Promise.reject(new Error('Broken project link')), ) @@ -281,7 +281,7 @@ describe('project context', () => { ...config, profiles: { ...config.profiles, - work: {...config.profiles.work!, owner: 'organization'}, + work: {...config.profiles.work!, owner: 'team'}, }, }), save: () => Promise.resolve(), @@ -290,7 +290,7 @@ describe('project context', () => { lookup, ) - expect(environment.context.owner).toBe('organization') + expect(environment.context.owner).toBe('team') expect(loadLinkedProject).not.toHaveBeenCalled() }) @@ -327,7 +327,7 @@ function project(id: string, slug: string, name: string) { isActive: true, lastActivity: null, name, - orgId: 'org_1', + teamId: 'team_1', slug, stage: 'development', totalMessages: 0, From a79c8731953c82727eb251891577d0cce0f5b49f Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Mon, 16 Nov 2026 22:32:25 +0200 Subject: [PATCH 2/2] Align merged main with the team rename and current SDK credential checks Rename the newsletter observation fixture to teamId, sync the Business account-mode contract to API a3db53e74c (team wording), regenerate the CLI reference, and use credential fixtures with valid opaque shapes so tests run against the SDK source that validates them. --- contracts/business-account-modes.json | 8 +-- contracts/cli-reference.json | 36 +++++----- scripts/verify-browser.mjs | 2 +- test/browser/run.test.ts | 6 +- test/commands/analytics.test.ts | 12 ++-- test/commands/api-gh.test.ts | 2 +- test/commands/api.test.ts | 44 ++++++------ test/commands/audience-profiles.test.ts | 2 +- test/commands/audiences-optouts.test.ts | 2 +- test/commands/auth.test.ts | 10 +-- test/commands/bansafe.test.ts | 2 +- test/commands/billing-controls.test.ts | 2 +- test/commands/business-account-modes.test.ts | 2 +- test/commands/business.test.ts | 4 +- test/commands/call-analytics.test.ts | 4 +- test/commands/call-consent.test.ts | 4 +- test/commands/call-links.test.ts | 4 +- test/commands/call-records.test.ts | 2 +- test/commands/calls-and-identities.test.ts | 4 +- test/commands/calls-sockets.test.ts | 2 +- test/commands/calls.test.ts | 6 +- test/commands/campaign-conversions.test.ts | 2 +- test/commands/campaign-experiments.test.ts | 2 +- test/commands/campaign-follow-ups.test.ts | 2 +- test/commands/campaign-frequency-cap.test.ts | 2 +- test/commands/campaign-recipients.test.ts | 2 +- test/commands/campaign-segments-drip.test.ts | 2 +- test/commands/campaigns.test.ts | 4 +- test/commands/channels.test.ts | 4 +- test/commands/cloud-group.test.ts | 4 +- test/commands/cloud.test.ts | 12 +++- test/commands/contacts.test.ts | 4 +- test/commands/customers.test.ts | 2 +- test/commands/developer-webhooks.test.ts | 2 +- test/commands/doctor.test.ts | 2 +- test/commands/event-stream.test.ts | 2 +- test/commands/events.test.ts | 2 +- test/commands/flow-endpoints.test.ts | 2 +- test/commands/flows.test.ts | 4 +- test/commands/functions.test.ts | 5 +- test/commands/group-mutations.test.ts | 2 +- test/commands/groups.test.ts | 4 +- test/commands/history.test.ts | 6 +- test/commands/hybrid-credentials.test.ts | 10 +-- test/commands/hybrid-link.test.ts | 2 +- test/commands/labels.test.ts | 4 +- test/commands/listen.test.ts | 10 +-- test/commands/media.test.ts | 4 +- test/commands/message-sends.test.ts | 2 +- test/commands/messages.test.ts | 4 +- test/commands/newsletter-observations.test.ts | 4 +- test/commands/number-tiers.test.ts | 2 +- test/commands/operations.test.ts | 2 +- test/commands/platform-management.test.ts | 4 +- test/commands/presence.test.ts | 4 +- test/commands/privacy.test.ts | 4 +- test/commands/profile.test.ts | 4 +- test/commands/project-context.test.ts | 2 +- test/commands/quick-replies.test.ts | 4 +- test/commands/quicklinks.test.ts | 6 +- test/commands/request-logs.test.ts | 2 +- test/commands/sip-trunks.test.ts | 2 +- test/commands/trigger.test.ts | 2 +- test/commands/usage.test.ts | 4 +- test/commands/voice-wait-timeout.test.ts | 2 +- test/commands/voice.test.ts | 2 +- test/context/environment.test.ts | 72 +++++++++---------- test/developer/client.test.ts | 6 +- test/input/stdin.test.ts | 4 +- test/mcp/session-discovery.test.ts | 2 +- test/sdk/client.test.ts | 22 +++--- test/services/auth.test.ts | 30 ++++---- test/services/doctor.test.ts | 2 +- test/services/groups.test.ts | 2 +- test/services/projects.test.ts | 2 +- test/services/voice.test.ts | 2 +- 76 files changed, 237 insertions(+), 226 deletions(-) diff --git a/contracts/business-account-modes.json b/contracts/business-account-modes.json index 1c836bc8..ad453240 100644 --- a/contracts/business-account-modes.json +++ b/contracts/business-account-modes.json @@ -1,11 +1,11 @@ { "repository": "polymorfa/polymorfa", - "commit": "14153ad9d69ddd3bae972594e6b3dc3ddae8e8e4", + "commit": "a3db53e74c6e24507ca01e2ff6ecba19358422c7", "releaseStatus": "source-only", "sources": { "messaging": { "sourcePath": "apps/api/docs/openapi.json", - "sourceSha256": "44a2cc304483d7cd4e12974b8f31df92a3b7880d21152aa70af0a50948b40cb1", + "sourceSha256": "0c66f1ee93923cf57425ac29c01a84c5c140b703ace2160e1b899ee6dad0b071", "paths": { "/messaging/{session}/contacts/{contactId}/business-profile": { "get": { @@ -808,7 +808,7 @@ "whatsapp_group_suspended", "whatsapp_group_has_no_participants", "bansafe_suspended", - "bansafe_org_suspended", + "bansafe_team_suspended", "bansafe_cold_blocked", "bansafe_cold_held", "bansafe_throttled", @@ -831,7 +831,7 @@ "request_log_url": { "type": "string", "format": "uri", - "description": "Console page that shows this request. Returned only to organization and project credentials whose request was logged." + "description": "Console page that shows this request. Returned only to team and project credentials whose request was logged." } }, "required": ["type", "code", "message", "param", "request_id"] diff --git a/contracts/cli-reference.json b/contracts/cli-reference.json index d7a264ac..d54d84c5 100644 --- a/contracts/cli-reference.json +++ b/contracts/cli-reference.json @@ -17715,8 +17715,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17855,8 +17855,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -17983,8 +17983,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18128,8 +18128,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18268,8 +18268,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18396,8 +18396,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18541,8 +18541,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -18705,8 +18705,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, @@ -56498,8 +56498,8 @@ "required": false, "multiple": false, "default": null, - "options": ["project", "organization"], - "description": "Select project-owned or organization-owned resources.", + "options": ["project", "team"], + "description": "Select project-owned or team-owned resources.", "env": null, "helpGroup": "GLOBAL" }, diff --git a/scripts/verify-browser.mjs b/scripts/verify-browser.mjs index 500db3e7..aa0715e3 100644 --- a/scripts/verify-browser.mjs +++ b/scripts/verify-browser.mjs @@ -97,7 +97,7 @@ const sent = await actual.runCommand( 'Hello from Polymorfa', ], { - env: {POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_' + 'fixture'.repeat(6)}, + env: {POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_' + 'fixtureA'.repeat(5)}, fetch: async (input, init = {}) => { requests.push({ path: new URL(String(input)).pathname, diff --git a/test/browser/run.test.ts b/test/browser/run.test.ts index d81b078a..76403209 100644 --- a/test/browser/run.test.ts +++ b/test/browser/run.test.ts @@ -14,10 +14,10 @@ import {EventEmitter as BrowserEmitter} from '../../src/browser/stubs/events.js' import {process as browserProcess} from '../../src/browser/stubs/process.js' import * as browserPath from '../../src/browser/stubs/path.js' -// A client token fixture: the SDK checks only the prefix of client tokens. -const CLIENT_TOKEN = `pmfa_ct_${'fixture'.repeat(6)}` +// A client token fixture: the SDK checks the prefix and canonical base64url shape of client tokens. +const CLIENT_TOKEN = `pmfa_ct_${'fixtureA'.repeat(5)}` // A well-formed team key fixture for Platform commands. Not a real key. -const API_KEY = `pmfa_${'A'.repeat(72)}` +const API_KEY = `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` const PROJECT = '11111111-1111-4111-8111-111111111111' /** diff --git a/test/commands/analytics.test.ts b/test/commands/analytics.test.ts index 616f73a3..577bd366 100644 --- a/test/commands/analytics.test.ts +++ b/test/commands/analytics.test.ts @@ -35,7 +35,7 @@ test('runs the JSON analytics command against the project-confined public route' POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', POLYMORFA_BASE_URL: server.baseUrl, }, () => @@ -69,7 +69,7 @@ test('rejects an invalid range before making a request', async () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_PROJECT_TOKEN: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, @@ -121,7 +121,7 @@ test('shows call vitals when messaging measurements are unavailable', async () = const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_PROJECT_TOKEN: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, @@ -137,7 +137,7 @@ test('shows call vitals when messaging measurements are unavailable', async () = const json = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_PROJECT_TOKEN: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, @@ -166,7 +166,7 @@ test('exports raw collector text through the project-confined SDK transport', as POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', POLYMORFA_BASE_URL: server.baseUrl, }, () => @@ -200,7 +200,7 @@ test('rejects an HTML response instead of printing it as collector data', async const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_PROJECT_TOKEN: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, diff --git a/test/commands/api-gh.test.ts b/test/commands/api-gh.test.ts index 361800de..9d672d3f 100644 --- a/test/commands/api-gh.test.ts +++ b/test/commands/api-gh.test.ts @@ -9,7 +9,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' describe('api gh-style options', () => { let server: TestHttpServer | undefined diff --git a/test/commands/api.test.ts b/test/commands/api.test.ts index a0237750..d1772fe2 100644 --- a/test/commands/api.test.ts +++ b/test/commands/api.test.ts @@ -17,7 +17,7 @@ describe('api', () => { test('sends raw Messaging requests with a project token', async () => { server = await startHttpServer({body: {success: true, data: {ready: true}}}) - const projectToken = `pmfa_pt_${'A'.repeat(94)}` + const projectToken = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` const result = await withEnvironment( { POLYMORFA_API_KEY: undefined, @@ -38,9 +38,9 @@ describe('api', () => { server = await startHttpServer({body: {success: true}}) const result = await withEnvironment( { - POLYMORFA_API_KEY: `pmfa_${'A'.repeat(72)}`, + POLYMORFA_API_KEY: `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m`, POLYMORFA_CLIENT_TOKEN: undefined, - POLYMORFA_PROJECT_TOKEN: `pmfa_pt_${'A'.repeat(94)}`, + POLYMORFA_PROJECT_TOKEN: `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, POLYMORFA_BASE_URL: server.baseUrl, }, () => runCommand('api /messaging/health --surface messaging --json'), @@ -57,7 +57,9 @@ describe('api', () => { const previousDirectory = process.cwd() const keyring = vi .spyOn(AsyncEntry.prototype, 'getPassword') - .mockResolvedValue(`pmfa_pt_${'A'.repeat(94)}`) + .mockResolvedValue( + `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, + ) tempDirectories.push(directory) try { await mkdir(configDirectory) @@ -125,7 +127,7 @@ describe('api', () => { process.chdir(directory) const result = await withEnvironment( { - POLYMORFA_API_KEY: `pmfa_${'A'.repeat(72)}`, + POLYMORFA_API_KEY: `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m`, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, @@ -146,7 +148,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -178,7 +180,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -219,7 +221,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -239,7 +241,7 @@ describe('api', () => { url: '/v1/projects', }) expect(server.requests[0]?.headers.authorization).toBe( - 'Bearer pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'Bearer pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) }) @@ -252,7 +254,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -282,7 +284,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -310,7 +312,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -332,7 +334,7 @@ describe('api', () => { server = await startHttpServer({ body: { error: - 'Invalid API key pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.', + 'Invalid API key pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m.', }, headers: {'request-id': 'req_auth'}, status: 401, @@ -341,7 +343,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -361,7 +363,7 @@ describe('api', () => { schemaVersion: 1, }) expect(result.stderr).not.toContain( - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) expect(result.stdout).toBe('') }) @@ -372,7 +374,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -396,7 +398,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -424,7 +426,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -458,7 +460,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -476,7 +478,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -496,7 +498,7 @@ describe('api', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/audience-profiles.test.ts b/test/commands/audience-profiles.test.ts index 8f691b24..7cefcbd0 100644 --- a/test/commands/audience-profiles.test.ts +++ b/test/commands/audience-profiles.test.ts @@ -58,7 +58,7 @@ describe('campaign profiles commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server!.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, ...env, diff --git a/test/commands/audiences-optouts.test.ts b/test/commands/audiences-optouts.test.ts index 0b1fc768..cddaf03a 100644 --- a/test/commands/audiences-optouts.test.ts +++ b/test/commands/audiences-optouts.test.ts @@ -225,7 +225,7 @@ describe('Audience and opt-out commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/auth.test.ts b/test/commands/auth.test.ts index e06e9277..418b9152 100644 --- a/test/commands/auth.test.ts +++ b/test/commands/auth.test.ts @@ -55,7 +55,7 @@ describe('auth commands', () => { test('logs in from stdin, lists profiles, and switches active profile', async () => { await withConfig(async () => { const login = await withStdin( - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m\n', async () => runCommand('auth login --with-api-key --profile work --json'), ) @@ -79,7 +79,7 @@ describe('auth commands', () => { test('reports keyring availability and logs out only the selected profile', async () => { await withConfig(async () => { await withStdin( - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m\n', async () => runCommand('auth login --with-api-key --profile work --json'), ) @@ -105,7 +105,7 @@ describe('auth commands', () => { await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + 'pmfa_AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOWinjW', POLYMORFA_CLIENT_TOKEN: undefined, }, async () => { @@ -124,7 +124,7 @@ describe('auth commands', () => { test('stores a project-token profile with exact project ownership', async () => { await withConfig(async () => { - const token = `pmfa_pt_${'A'.repeat(94)}\n` + const token = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ\n` const login = await withStdin(token, async () => runCommand( 'auth login --with-project-token --profile project --project project_1 --json', @@ -156,7 +156,7 @@ describe('auth commands', () => { }) test('reports an environment project token without exposing it', async () => { - const token = `pmfa_pt_${'A'.repeat(94)}` + const token = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` await withEnvironment( { POLYMORFA_API_KEY: undefined, diff --git a/test/commands/bansafe.test.ts b/test/commands/bansafe.test.ts index 5dcdd036..789aaf67 100644 --- a/test/commands/bansafe.test.ts +++ b/test/commands/bansafe.test.ts @@ -491,7 +491,7 @@ describe('BanSafe commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/billing-controls.test.ts b/test/commands/billing-controls.test.ts index 1841264b..583868ba 100644 --- a/test/commands/billing-controls.test.ts +++ b/test/commands/billing-controls.test.ts @@ -9,7 +9,7 @@ import { type TestHttpServer, } from '../helpers/http-server.js' const key = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const project = '22222222-2222-4222-8222-222222222222', number = '33333333-3333-4333-8333-333333333333' const priorities = { diff --git a/test/commands/business-account-modes.test.ts b/test/commands/business-account-modes.test.ts index 650e9ced..4acafcb5 100644 --- a/test/commands/business-account-modes.test.ts +++ b/test/commands/business-account-modes.test.ts @@ -5,7 +5,7 @@ import { withEnvironment, } from '../helpers/http-server.js' -const key = `pmfa_${'A'.repeat(72)}` +const key = `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` function environment( baseUrl: string, run: () => Promise, diff --git a/test/commands/business.test.ts b/test/commands/business.test.ts index 9bf7cd06..854e8b9a 100644 --- a/test/commands/business.test.ts +++ b/test/commands/business.test.ts @@ -545,7 +545,7 @@ describe('business commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -559,7 +559,7 @@ describe('business commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, run, ) diff --git a/test/commands/call-analytics.test.ts b/test/commands/call-analytics.test.ts index f65c91f0..0f26feaf 100644 --- a/test/commands/call-analytics.test.ts +++ b/test/commands/call-analytics.test.ts @@ -15,9 +15,9 @@ import { import {temporaryDirectory} from '../support/fs.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const PROJECT_TOKEN = - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ' const PROJECT = '11111111-1111-4111-8111-111111111111' const HEADER = diff --git a/test/commands/call-consent.test.ts b/test/commands/call-consent.test.ts index 628d7dd8..9af7185e 100644 --- a/test/commands/call-consent.test.ts +++ b/test/commands/call-consent.test.ts @@ -12,8 +12,8 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' -const CLIENT_TOKEN = 'pmfa_ct_browser_token' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' +const CLIENT_TOKEN = 'pmfa_ct_browser_tokenAA' const OPT_OUT_ID = '0b9f6a52-8f0e-4a44-9d51-3c1f9d6f2a10' const NEXT_CURSOR = '1c9f6a52-8f0e-4a44-9d51-3c1f9d6f2a11' diff --git a/test/commands/call-links.test.ts b/test/commands/call-links.test.ts index 457d7771..feb12d36 100644 --- a/test/commands/call-links.test.ts +++ b/test/commands/call-links.test.ts @@ -11,8 +11,8 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' -const CLIENT_TOKEN = 'pmfa_ct_browser_token' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' +const CLIENT_TOKEN = 'pmfa_ct_browser_tokenAA' const TOKEN = 'AbCdEf0123456789_link-token' describe('call link commands', () => { diff --git a/test/commands/call-records.test.ts b/test/commands/call-records.test.ts index fcc74723..86e0a0bb 100644 --- a/test/commands/call-records.test.ts +++ b/test/commands/call-records.test.ts @@ -8,7 +8,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const PROJECT = '11111111-1111-4111-8111-111111111111' const record = { callId: 'call_1', diff --git a/test/commands/calls-and-identities.test.ts b/test/commands/calls-and-identities.test.ts index ed0c8bee..54ca9235 100644 --- a/test/commands/calls-and-identities.test.ts +++ b/test/commands/calls-and-identities.test.ts @@ -164,7 +164,7 @@ describe('call and identity commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -178,7 +178,7 @@ describe('call and identity commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, run, ) diff --git a/test/commands/calls-sockets.test.ts b/test/commands/calls-sockets.test.ts index a4abe603..8226ed9a 100644 --- a/test/commands/calls-sockets.test.ts +++ b/test/commands/calls-sockets.test.ts @@ -26,7 +26,7 @@ import { import {withEnvironment} from '../helpers/http-server.js' const API_KEY = 'pmfa_socket_test_key_0123456789' -const CLIENT_TOKEN = 'pmfa_ct_socket_test_token' +const CLIENT_TOKEN = 'pmfa_ct_socket_test_tokenAA' const TIMESTAMP = '2026-09-16T10:00:00.000Z' describe('calls watch and media', () => { diff --git a/test/commands/calls.test.ts b/test/commands/calls.test.ts index 0a942890..c7f1c8cf 100644 --- a/test/commands/calls.test.ts +++ b/test/commands/calls.test.ts @@ -14,10 +14,10 @@ import { } from '../../src/services/calls.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' -const CLIENT_TOKEN = 'pmfa_ct_browser_token' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' +const CLIENT_TOKEN = 'pmfa_ct_browser_tokenAA' const PROJECT_TOKEN = - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ' const TRUNK_ID = '6f1c2f0e-1d5b-4d8e-9a55-0d4b8a6c1f10' const DEFAULT_RETENTION = { appliesTo: ['call_records', 'call_events', 'client_reports'], diff --git a/test/commands/campaign-conversions.test.ts b/test/commands/campaign-conversions.test.ts index 1628e216..4764845a 100644 --- a/test/commands/campaign-conversions.test.ts +++ b/test/commands/campaign-conversions.test.ts @@ -119,7 +119,7 @@ describe('Campaign conversion commands (beta)', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/campaign-experiments.test.ts b/test/commands/campaign-experiments.test.ts index c24156ad..24ceb06d 100644 --- a/test/commands/campaign-experiments.test.ts +++ b/test/commands/campaign-experiments.test.ts @@ -8,7 +8,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' describe('campaign A/B test and weighted variation output (beta)', () => { let server: TestHttpServer | undefined diff --git a/test/commands/campaign-follow-ups.test.ts b/test/commands/campaign-follow-ups.test.ts index 5fbb5c67..51663e28 100644 --- a/test/commands/campaign-follow-ups.test.ts +++ b/test/commands/campaign-follow-ups.test.ts @@ -179,7 +179,7 @@ describe('campaign follow-up output (beta)', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/campaign-frequency-cap.test.ts b/test/commands/campaign-frequency-cap.test.ts index eef9d455..130cc07b 100644 --- a/test/commands/campaign-frequency-cap.test.ts +++ b/test/commands/campaign-frequency-cap.test.ts @@ -31,7 +31,7 @@ const settings = { function run(command: string) { return withEnvironment( { - POLYMORFA_API_KEY: `pmfa_${'A'.repeat(72)}`, + POLYMORFA_API_KEY: `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m`, POLYMORFA_BASE_URL: server!.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/campaign-recipients.test.ts b/test/commands/campaign-recipients.test.ts index f8bcfe7a..a1cb9fd7 100644 --- a/test/commands/campaign-recipients.test.ts +++ b/test/commands/campaign-recipients.test.ts @@ -415,7 +415,7 @@ describe('Campaign recipient commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/campaign-segments-drip.test.ts b/test/commands/campaign-segments-drip.test.ts index c906e41c..216b23fa 100644 --- a/test/commands/campaign-segments-drip.test.ts +++ b/test/commands/campaign-segments-drip.test.ts @@ -86,7 +86,7 @@ async function run(command: string) { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/campaigns.test.ts b/test/commands/campaigns.test.ts index c8a91970..840738f0 100644 --- a/test/commands/campaigns.test.ts +++ b/test/commands/campaigns.test.ts @@ -342,7 +342,7 @@ describe('Messaging campaign commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -356,7 +356,7 @@ describe('Messaging campaign commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, run, ) diff --git a/test/commands/channels.test.ts b/test/commands/channels.test.ts index 3c1f5035..000c856d 100644 --- a/test/commands/channels.test.ts +++ b/test/commands/channels.test.ts @@ -345,7 +345,7 @@ describe('channel commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -359,7 +359,7 @@ describe('channel commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, run, ) diff --git a/test/commands/cloud-group.test.ts b/test/commands/cloud-group.test.ts index d20b8e44..3dbd8f66 100644 --- a/test/commands/cloud-group.test.ts +++ b/test/commands/cloud-group.test.ts @@ -18,7 +18,9 @@ describe('Official group commands (beta)', () => { return withEnvironment( { POLYMORFA_API_KEY: - kind === 'api' ? `pmfa_${'A'.repeat(72)}` : undefined, + kind === 'api' + ? `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` + : undefined, POLYMORFA_PROJECT_TOKEN: undefined, POLYMORFA_CLIENT_TOKEN: kind === 'client' ? `pmfa_ct_${'A'.repeat(94)}` : undefined, diff --git a/test/commands/cloud.test.ts b/test/commands/cloud.test.ts index bf7477fd..4fd32c2f 100644 --- a/test/commands/cloud.test.ts +++ b/test/commands/cloud.test.ts @@ -113,7 +113,9 @@ describe('Official API commands', () => { ) const keyring = vi .spyOn(AsyncEntry.prototype, 'getPassword') - .mockResolvedValue(`pmfa_pt_${'A'.repeat(94)}`) + .mockResolvedValue( + `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, + ) server = await startHttpServer({ status: 202, body: {success: true, data: {accepted: true}}, @@ -466,9 +468,13 @@ describe('Official API commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - kind === 'api' ? `pmfa_${'A'.repeat(72)}` : undefined, + kind === 'api' + ? `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` + : undefined, POLYMORFA_PROJECT_TOKEN: - kind === 'project' ? `pmfa_pt_${'A'.repeat(94)}` : undefined, + kind === 'project' + ? `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` + : undefined, POLYMORFA_CLIENT_TOKEN: kind === 'client' ? `pmfa_ct_${'A'.repeat(94)}` : undefined, POLYMORFA_BASE_URL: server.baseUrl, diff --git a/test/commands/contacts.test.ts b/test/commands/contacts.test.ts index f11f19be..04c59730 100644 --- a/test/commands/contacts.test.ts +++ b/test/commands/contacts.test.ts @@ -250,7 +250,7 @@ describe('contact commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -264,7 +264,7 @@ describe('contact commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, run, ) diff --git a/test/commands/customers.test.ts b/test/commands/customers.test.ts index 82d8d5c6..88f2c4de 100644 --- a/test/commands/customers.test.ts +++ b/test/commands/customers.test.ts @@ -303,7 +303,7 @@ describe('Customer commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/developer-webhooks.test.ts b/test/commands/developer-webhooks.test.ts index cf0815c3..c8daf53b 100644 --- a/test/commands/developer-webhooks.test.ts +++ b/test/commands/developer-webhooks.test.ts @@ -877,7 +877,7 @@ function developerEnvironment(run: () => Promise): Promise { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: 'https://api.example.test', POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/doctor.test.ts b/test/commands/doctor.test.ts index 5a005d20..9d1a9baf 100644 --- a/test/commands/doctor.test.ts +++ b/test/commands/doctor.test.ts @@ -19,7 +19,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' describe('doctor command exit status', () => { let server: TestHttpServer diff --git a/test/commands/event-stream.test.ts b/test/commands/event-stream.test.ts index bdb7d880..0a1477ec 100644 --- a/test/commands/event-stream.test.ts +++ b/test/commands/event-stream.test.ts @@ -252,7 +252,7 @@ function environment(run: () => Promise): Promise { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: 'https://api.example.test', POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/events.test.ts b/test/commands/events.test.ts index bebd2305..9411d005 100644 --- a/test/commands/events.test.ts +++ b/test/commands/events.test.ts @@ -296,7 +296,7 @@ function environment(run: () => Promise): Promise { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: 'https://api.example.test', POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/flow-endpoints.test.ts b/test/commands/flow-endpoints.test.ts index 3362c8f6..4d9e2ab1 100644 --- a/test/commands/flow-endpoints.test.ts +++ b/test/commands/flow-endpoints.test.ts @@ -18,7 +18,7 @@ describe('dynamic Flow endpoint commands', () => { return withEnvironment( { POLYMORFA_API_KEY: undefined, - POLYMORFA_PROJECT_TOKEN: `pmfa_pt_${'A'.repeat(94)}`, + POLYMORFA_PROJECT_TOKEN: `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server!.baseUrl, }, diff --git a/test/commands/flows.test.ts b/test/commands/flows.test.ts index 48bcaf3c..ad1d029c 100644 --- a/test/commands/flows.test.ts +++ b/test/commands/flows.test.ts @@ -25,7 +25,9 @@ describe('project Flow commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_PROJECT_TOKEN: - kind === 'project' ? `pmfa_pt_${'A'.repeat(94)}` : undefined, + kind === 'project' + ? `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` + : undefined, POLYMORFA_CLIENT_TOKEN: kind === 'client' ? `pmfa_ct_${'A'.repeat(94)}` : undefined, POLYMORFA_BASE_URL: server!.baseUrl, diff --git a/test/commands/functions.test.ts b/test/commands/functions.test.ts index a096d247..a046f43b 100644 --- a/test/commands/functions.test.ts +++ b/test/commands/functions.test.ts @@ -10,7 +10,7 @@ import { type TestHttpServer, } from '../helpers/http-server.js' const KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const PROJECT = '018f0000-0000-7000-8000-000000000001', FN = '018f0000-0000-7000-8000-000000000002', DEPLOY = '018f0000-0000-7000-8000-000000000003', @@ -395,7 +395,8 @@ describe('Function commands', () => { server = await startHttpServer({ body: {data: {items: [], nextCursor: null}}, }) - const token = 'pmfa_pt_' + 'A'.repeat(94) + const token = + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ' const result = await withEnvironment( { POLYMORFA_API_KEY: undefined, diff --git a/test/commands/group-mutations.test.ts b/test/commands/group-mutations.test.ts index 840e247b..0788bedc 100644 --- a/test/commands/group-mutations.test.ts +++ b/test/commands/group-mutations.test.ts @@ -9,7 +9,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' describe('group mutation commands', () => { let server: TestHttpServer | undefined diff --git a/test/commands/groups.test.ts b/test/commands/groups.test.ts index ee3946ff..33709a41 100644 --- a/test/commands/groups.test.ts +++ b/test/commands/groups.test.ts @@ -96,7 +96,7 @@ describe('group commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand('group list --session session_1 --json'), ) @@ -177,7 +177,7 @@ describe('group commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/history.test.ts b/test/commands/history.test.ts index ac4ee258..f319d8e0 100644 --- a/test/commands/history.test.ts +++ b/test/commands/history.test.ts @@ -86,7 +86,7 @@ describe('stored chat history commands', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: undefined, - POLYMORFA_PROJECT_TOKEN: `pmfa_pt_${'A'.repeat(94)}`, + POLYMORFA_PROJECT_TOKEN: `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, }, @@ -140,7 +140,7 @@ describe('stored chat history commands', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: undefined, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', POLYMORFA_BASE_URL: server.baseUrl, }, () => runCommand('chat list --session number_1 --json'), @@ -210,7 +210,7 @@ describe('stored chat history commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_BASE_URL: server.baseUrl, }, diff --git a/test/commands/hybrid-credentials.test.ts b/test/commands/hybrid-credentials.test.ts index 9041ba8e..bfad0da9 100644 --- a/test/commands/hybrid-credentials.test.ts +++ b/test/commands/hybrid-credentials.test.ts @@ -10,8 +10,8 @@ import { } from '../helpers/http-server.js' const project = '11111111-1111-4111-8111-111111111111' -const apiKey = `pmfa_${'A'.repeat(72)}` -const projectToken = `pmfa_pt_${'A'.repeat(94)}` +const apiKey = `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` +const projectToken = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` const cases = [ { command: 'hybrid-link state --session existing', @@ -301,7 +301,7 @@ test.each(cases)( POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_API_KEY: undefined, POLYMORFA_PROJECT_TOKEN: undefined, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, async () => { const result = await runCommand(`${command} --json`) @@ -309,7 +309,7 @@ test.each(cases)( expect(JSON.parse(result.stderr)).toMatchObject({ error: {category: 'configuration'}, }) - expect(result.stderr).not.toContain('pmfa_ct_browser') + expect(result.stderr).not.toContain('pmfa_ct_browserA') }, ) expect(server.requests).toEqual([]) @@ -359,7 +359,7 @@ test('invalid project-token format is rejected before transport', async () => { 'hybrid-link state --session existing --json', ) expect(result.error).toBeDefined() - expect(result.stderr).toContain('canonical pmfa_pt_ v1 format') + expect(result.stderr).toContain('opaque format') expect(result.stderr).not.toContain('pmfa_pt_invalid') }, ) diff --git a/test/commands/hybrid-link.test.ts b/test/commands/hybrid-link.test.ts index 594a2086..d4684c1a 100644 --- a/test/commands/hybrid-link.test.ts +++ b/test/commands/hybrid-link.test.ts @@ -9,7 +9,7 @@ import { } from '../helpers/http-server.js' const project = '11111111-1111-4111-8111-111111111111' const env = (url: string) => ({ - POLYMORFA_API_KEY: `pmfa_${'A'.repeat(72)}`, + POLYMORFA_API_KEY: `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m`, POLYMORFA_BASE_URL: url, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/labels.test.ts b/test/commands/labels.test.ts index 6b8ebf43..de6b8b0f 100644 --- a/test/commands/labels.test.ts +++ b/test/commands/labels.test.ts @@ -63,7 +63,7 @@ describe('label commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand('label list --session session_1 --json'), ) @@ -221,7 +221,7 @@ describe('label commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/listen.test.ts b/test/commands/listen.test.ts index 43478101..ff2db649 100644 --- a/test/commands/listen.test.ts +++ b/test/commands/listen.test.ts @@ -43,7 +43,7 @@ describe('listen', () => { POLYMORFA_BASE_URL: baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, () => runCommand(`listen --project ${PROJECT} --event message.* --json`), ) @@ -123,7 +123,7 @@ describe('listen', () => { POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, () => runCommand( @@ -159,7 +159,7 @@ describe('listen', () => { POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, () => runCommand( @@ -177,7 +177,7 @@ describe('listen', () => { POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, () => runCommand( @@ -194,7 +194,7 @@ describe('listen', () => { POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, () => runCommand( diff --git a/test/commands/media.test.ts b/test/commands/media.test.ts index 43b3b2b0..c1539851 100644 --- a/test/commands/media.test.ts +++ b/test/commands/media.test.ts @@ -52,7 +52,7 @@ describe('media commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand('media view media_1 --json'), ) @@ -450,7 +450,7 @@ describe('media commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/message-sends.test.ts b/test/commands/message-sends.test.ts index e474ea9b..d5aca8c2 100644 --- a/test/commands/message-sends.test.ts +++ b/test/commands/message-sends.test.ts @@ -12,7 +12,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' describe('typed message send commands', () => { let server: TestHttpServer | undefined diff --git a/test/commands/messages.test.ts b/test/commands/messages.test.ts index ff13d345..c4e68660 100644 --- a/test/commands/messages.test.ts +++ b/test/commands/messages.test.ts @@ -134,7 +134,7 @@ describe('message commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand( @@ -257,7 +257,7 @@ describe('message commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/newsletter-observations.test.ts b/test/commands/newsletter-observations.test.ts index 6c1d854f..56a5203a 100644 --- a/test/commands/newsletter-observations.test.ts +++ b/test/commands/newsletter-observations.test.ts @@ -45,7 +45,7 @@ const channel = JSON.parse( const PROJECT = '11111111-1111-4111-8111-111111111111' const metadata = (index: number, includePayload: boolean) => ({ id: fixture.events[index]!.id, - organizationId: 'org_1', + teamId: 'team_1', projectId: PROJECT, type: 'newsletter.update', source: 'runtime', @@ -74,7 +74,7 @@ describe('newsletter observation consumers', () => { withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server!.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/number-tiers.test.ts b/test/commands/number-tiers.test.ts index d16b61a8..6f3075da 100644 --- a/test/commands/number-tiers.test.ts +++ b/test/commands/number-tiers.test.ts @@ -452,7 +452,7 @@ describe('session tier commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/operations.test.ts b/test/commands/operations.test.ts index 202eaf94..7cb53ef4 100644 --- a/test/commands/operations.test.ts +++ b/test/commands/operations.test.ts @@ -328,7 +328,7 @@ function environment(run: () => Promise): Promise { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: api.url, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, diff --git a/test/commands/platform-management.test.ts b/test/commands/platform-management.test.ts index 24d371f6..cad2598f 100644 --- a/test/commands/platform-management.test.ts +++ b/test/commands/platform-management.test.ts @@ -137,7 +137,7 @@ describe('Platform management commands', () => { const result = await withEnvironment( { POLYMORFA_API_KEY: undefined, - POLYMORFA_PROJECT_TOKEN: `pmfa_pt_${'A'.repeat(94)}`, + POLYMORFA_PROJECT_TOKEN: `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, POLYMORFA_BASE_URL: server.baseUrl, }, () => runCommand('session list --json'), @@ -739,7 +739,7 @@ describe('Platform management commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/presence.test.ts b/test/commands/presence.test.ts index d005f98d..71b637bf 100644 --- a/test/commands/presence.test.ts +++ b/test/commands/presence.test.ts @@ -184,7 +184,7 @@ describe('presence commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, @@ -198,7 +198,7 @@ describe('presence commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, run, ) diff --git a/test/commands/privacy.test.ts b/test/commands/privacy.test.ts index 12f44985..9ead0e06 100644 --- a/test/commands/privacy.test.ts +++ b/test/commands/privacy.test.ts @@ -57,7 +57,7 @@ describe('privacy commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand('privacy view --session session_1 --json'), ) @@ -165,7 +165,7 @@ describe('privacy commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/profile.test.ts b/test/commands/profile.test.ts index 1db44ec7..b27d853b 100644 --- a/test/commands/profile.test.ts +++ b/test/commands/profile.test.ts @@ -83,7 +83,7 @@ describe('profile commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand('profile view --session session_1 --json'), ) @@ -274,7 +274,7 @@ describe('profile commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/project-context.test.ts b/test/commands/project-context.test.ts index 939ea56b..b5dc5f98 100644 --- a/test/commands/project-context.test.ts +++ b/test/commands/project-context.test.ts @@ -12,7 +12,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const APP = '11111111-1111-4111-8111-111111111111' describe('link and project commands', () => { diff --git a/test/commands/quick-replies.test.ts b/test/commands/quick-replies.test.ts index 13e0ca80..c88a85b6 100644 --- a/test/commands/quick-replies.test.ts +++ b/test/commands/quick-replies.test.ts @@ -54,7 +54,7 @@ describe('quick-reply commands', () => { { POLYMORFA_API_KEY: undefined, POLYMORFA_BASE_URL: server.baseUrl, - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, () => runCommand('quick-reply list --session session_1 --json'), ) @@ -187,7 +187,7 @@ describe('quick-reply commands', () => { return withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, }, diff --git a/test/commands/quicklinks.test.ts b/test/commands/quicklinks.test.ts index 5e9430f7..d76b1d9d 100644 --- a/test/commands/quicklinks.test.ts +++ b/test/commands/quicklinks.test.ts @@ -35,7 +35,7 @@ test('creates a QuickLink and uploads separate test history with exact project s try { await withEnvironment( { - POLYMORFA_API_KEY: `pmfa_${'A'.repeat(72)}`, + POLYMORFA_API_KEY: `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m`, POLYMORFA_BASE_URL: server.baseUrl, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, @@ -69,8 +69,8 @@ test('creates a QuickLink and uploads separate test history with exact project s }) const projectId = '11111111-1111-4111-8111-111111111111' -const apiKey = `pmfa_${'A'.repeat(72)}` -const projectToken = `pmfa_pt_${'A'.repeat(94)}` +const apiKey = `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` +const projectToken = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` test('retrieves QuickLink status with an exact-project token and encoded ID', async () => { const server = await startHttpSequenceServer([ diff --git a/test/commands/request-logs.test.ts b/test/commands/request-logs.test.ts index 1043d7d7..99ff34e8 100644 --- a/test/commands/request-logs.test.ts +++ b/test/commands/request-logs.test.ts @@ -8,7 +8,7 @@ import { } from '../helpers/http-server.js' const key = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const project = '22222222-2222-4222-8222-222222222222' let server: TestHttpServer diff --git a/test/commands/sip-trunks.test.ts b/test/commands/sip-trunks.test.ts index 95c75fb1..f4bf715a 100644 --- a/test/commands/sip-trunks.test.ts +++ b/test/commands/sip-trunks.test.ts @@ -16,7 +16,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const PROJECT = '018f0000-0000-7000-8000-000000000002' const TRUNK_ID = '6f1c2f0e-1d5b-4d8e-9a55-0d4b8a6c1f10' diff --git a/test/commands/trigger.test.ts b/test/commands/trigger.test.ts index 785c0502..e6ab6777 100644 --- a/test/commands/trigger.test.ts +++ b/test/commands/trigger.test.ts @@ -7,7 +7,7 @@ import { } from '../helpers/http-server.js' const projectId = '11111111-1111-4111-8111-111111111111' -const apiKey = `pmfa_${'A'.repeat(72)}` +const apiKey = `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` const eventId = '0199f1c2-7a4e-7c55-9d1e-3f0b8a2c6d10' async function run( diff --git a/test/commands/usage.test.ts b/test/commands/usage.test.ts index 1aa474c1..7e50eb5a 100644 --- a/test/commands/usage.test.ts +++ b/test/commands/usage.test.ts @@ -8,9 +8,9 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const PROJECT_TOKEN = - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ' const PROJECT_A = '22222222-2222-4222-8222-222222222222' const PROJECT_B = '33333333-3333-4333-8333-333333333333' diff --git a/test/commands/voice-wait-timeout.test.ts b/test/commands/voice-wait-timeout.test.ts index 032d06d5..1eba0ca9 100644 --- a/test/commands/voice-wait-timeout.test.ts +++ b/test/commands/voice-wait-timeout.test.ts @@ -8,7 +8,7 @@ import {expect, test} from 'vitest' import {temporaryDirectory} from '../support/fs.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const ASSET_ID = '6f1c2f0e-1d5b-4d8e-9a55-0d4b8a6c1f10' const PROJECT = '018f0000-0000-7000-8000-000000000002' diff --git a/test/commands/voice.test.ts b/test/commands/voice.test.ts index 7f3109da..6d04a341 100644 --- a/test/commands/voice.test.ts +++ b/test/commands/voice.test.ts @@ -12,7 +12,7 @@ import { } from '../helpers/http-server.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const PROVIDER_KEY = 'sk-provider-secret-0123456789' const PROJECT = '018f0000-0000-7000-8000-000000000002' const ASSET_ID = '6f1c2f0e-1d5b-4d8e-9a55-0d4b8a6c1f10' diff --git a/test/context/environment.test.ts b/test/context/environment.test.ts index 77dba1be..7cdf7746 100644 --- a/test/context/environment.test.ts +++ b/test/context/environment.test.ts @@ -17,7 +17,7 @@ describe('resolveEnvironment', () => { env: { POLYMORFA_BASE_URL: 'http://127.0.0.1:4567', POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, apiVersion: '2026-09-01', project: PROJECT, @@ -27,7 +27,7 @@ describe('resolveEnvironment', () => { apiVersion: '2026-09-01', baseUrl: 'http://127.0.0.1:4567', credential: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', principalType: 'project_token', projectId: PROJECT, timeoutMs: 4321, @@ -39,7 +39,7 @@ describe('resolveEnvironment', () => { resolveListenerEnvironment({ env: { POLYMORFA_API_KEY: - 'pmfa_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', + 'pmfa_BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQnGnS_', POLYMORFA_PROJECT_TOKEN: 'pmfa_pt', }, project: 'project_1', @@ -68,7 +68,7 @@ describe('resolveEnvironment', () => { {env: {}, profile: 'project'}, {load: () => Promise.resolve(profile), save: () => Promise.resolve()}, fakeCredentials( - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', ), ), ).resolves.toMatchObject({ @@ -79,7 +79,7 @@ describe('resolveEnvironment', () => { projectId: PROJECT, }, credential: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }) }) @@ -96,13 +96,13 @@ describe('resolveEnvironment', () => { }, fakeProfiles(), fakeCredentials( - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', ), ), ).resolves.toMatchObject({ context: {owner: 'team', profile: 'work'}, credential: - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', }) }) @@ -131,12 +131,12 @@ describe('resolveEnvironment', () => { }, {load: () => Promise.resolve(profile), save: () => Promise.resolve()}, fakeCredentials( - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', ), ), ).resolves.toMatchObject({ credential: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', profile: 'project', projectId: '11111111-1111-4111-8111-111111111111', }) @@ -144,7 +144,7 @@ describe('resolveEnvironment', () => { test('prefers an environment API key over the active listener profile', async () => { const credentials = fakeCredentials( - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', ) await expect( @@ -152,7 +152,7 @@ describe('resolveEnvironment', () => { { env: { POLYMORFA_API_KEY: - 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + 'pmfa_AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOWinjW', }, project: '11111111-1111-4111-8111-111111111111', }, @@ -161,7 +161,7 @@ describe('resolveEnvironment', () => { ), ).resolves.toMatchObject({ credential: - 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + 'pmfa_AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOWinjW', principalType: 'team_key', }) expect(credentials.get).not.toHaveBeenCalled() @@ -175,7 +175,7 @@ describe('resolveEnvironment', () => { { env: { POLYMORFA_API_KEY: - 'pmfa_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', + 'pmfa_BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQnGnS_', }, project: 'checkout', }, @@ -196,7 +196,7 @@ describe('resolveEnvironment', () => { { env: { POLYMORFA_API_KEY: - 'pmfa_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', + 'pmfa_BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQnGnS_', }, owner: 'project', project: 'checkout', @@ -225,7 +225,7 @@ describe('resolveEnvironment', () => { { env: { POLYMORFA_API_KEY: - 'pmfa_DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD', + 'pmfa_BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQnGnS_', }, project: 'checkout', }, @@ -255,7 +255,7 @@ describe('resolveEnvironment', () => { resolveDeveloperEnvironment({ env: { POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, project: PROJECT, }), @@ -267,7 +267,7 @@ describe('resolveEnvironment', () => { resolveEnvironment({ env: { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_BASE_URL: 'http://127.0.0.1:4567', UNRELATED_SECRET: 'do-not-copy', }, @@ -279,7 +279,7 @@ describe('resolveEnvironment', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, baseUrl: 'http://127.0.0.1:4567', timeoutMs: 5000, @@ -289,7 +289,7 @@ describe('resolveEnvironment', () => { test('rejects a client token for the Platform surface', () => { expect(() => resolveEnvironment({ - env: {POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser'}, + env: {POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA'}, surface: 'platform', }), ).toThrow('Platform API requests require POLYMORFA_API_KEY.') @@ -298,12 +298,12 @@ describe('resolveEnvironment', () => { test('resolves a client token for the Messaging surface', () => { expect( resolveEnvironment({ - env: {POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser'}, + env: {POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA'}, surface: 'messaging', }), ).toEqual({ surface: 'messaging', - credential: {type: 'clientToken', value: 'pmfa_ct_browser'}, + credential: {type: 'clientToken', value: 'pmfa_ct_browserA'}, }) }) @@ -312,7 +312,7 @@ describe('resolveEnvironment', () => { resolveEnvironment({ env: { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, surface: 'messaging', }), @@ -321,7 +321,7 @@ describe('resolveEnvironment', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, }) }) @@ -331,8 +331,8 @@ describe('resolveEnvironment', () => { resolveEnvironment({ env: { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', - POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browser', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', + POLYMORFA_CLIENT_TOKEN: 'pmfa_ct_browserA', }, surface: 'messaging', }), @@ -464,7 +464,7 @@ describe('resolveEnvironment', () => { test('prefers an environment credential over the active profile', async () => { const credentials = fakeCredentials( - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', ) await expect( @@ -472,7 +472,7 @@ describe('resolveEnvironment', () => { { env: { POLYMORFA_API_KEY: - 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + 'pmfa_AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOWinjW', }, surface: 'platform', }, @@ -483,7 +483,7 @@ describe('resolveEnvironment', () => { credential: { type: 'apiKey', value: - 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + 'pmfa_AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOWinjW', }, source: 'environment', }) @@ -496,14 +496,14 @@ describe('resolveEnvironment', () => { {env: {}, surface: 'platform'}, fakeProfiles(), fakeCredentials( - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', ), ), ).resolves.toMatchObject({ credential: { type: 'apiKey', value: - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', }, profile: 'work', source: 'profile', @@ -516,21 +516,21 @@ describe('resolveEnvironment', () => { { env: { POLYMORFA_API_KEY: - 'pmfa_CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC', + 'pmfa_AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwOWinjW', }, profile: 'work', surface: 'messaging', }, fakeProfiles(), fakeCredentials( - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', ), ), ).resolves.toMatchObject({ credential: { type: 'apiKey', value: - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu', }, profile: 'work', source: 'profile', @@ -540,7 +540,7 @@ describe('resolveEnvironment', () => { describe('resolveDeveloperEnvironment owner inference', () => { const key = - 'pmfa_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB' + 'pmfa_AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLucXtu' test('reads the whole team despite a saved project profile', async () => { const config: ProfileConfig = { @@ -608,7 +608,7 @@ describe('resolveDeveloperEnvironment owner inference', () => { { env: { POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, inferOwner: true, }, @@ -675,7 +675,7 @@ function fakeCredentials(value: string): CredentialStore { } } -const PROJECT_TOKEN = `pmfa_pt_${'A'.repeat(94)}` +const PROJECT_TOKEN = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` function projectProfiles() { const config: ProfileConfig = { version: 2, diff --git a/test/developer/client.test.ts b/test/developer/client.test.ts index 83b99308..bf6abc7f 100644 --- a/test/developer/client.test.ts +++ b/test/developer/client.test.ts @@ -12,7 +12,7 @@ describe('createDeveloperSession', () => { const session = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, }, @@ -28,7 +28,7 @@ describe('createDeveloperSession', () => { const session = await withEnvironment( { POLYMORFA_API_KEY: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: undefined, }, @@ -55,7 +55,7 @@ describe('createDeveloperSession', () => { POLYMORFA_API_KEY: undefined, POLYMORFA_CLIENT_TOKEN: undefined, POLYMORFA_PROJECT_TOKEN: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, () => createDeveloperSession({ diff --git a/test/input/stdin.test.ts b/test/input/stdin.test.ts index abaa3e46..2602ba98 100644 --- a/test/input/stdin.test.ts +++ b/test/input/stdin.test.ts @@ -8,11 +8,11 @@ describe('readSecretFromStdin', () => { await expect( readSecretFromStdin( Readable.from([ - ' pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n', + ' pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m\n', ]), ), ).resolves.toBe( - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) }) diff --git a/test/mcp/session-discovery.test.ts b/test/mcp/session-discovery.test.ts index 7414754e..ebbdd54d 100644 --- a/test/mcp/session-discovery.test.ts +++ b/test/mcp/session-discovery.test.ts @@ -8,7 +8,7 @@ import { } from '../helpers/http-server.js' const PROJECT_ID = '11111111-1111-4111-8111-111111111111' -const API_KEY = `pmfa_${'A'.repeat(72)}` +const API_KEY = `pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m` describe('MCP session discovery', () => { let server: TestHttpServer | undefined diff --git a/test/sdk/client.test.ts b/test/sdk/client.test.ts index 5973e822..a6576cee 100644 --- a/test/sdk/client.test.ts +++ b/test/sdk/client.test.ts @@ -21,7 +21,7 @@ describe('createRawClient', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, }) @@ -31,7 +31,7 @@ describe('createRawClient', () => { test('returns the public Messaging raw client', () => { const client = createRawClient({ surface: 'messaging', - credential: {type: 'clientToken', value: 'pmfa_ct_browser'}, + credential: {type: 'clientToken', value: 'pmfa_ct_browserA'}, }) expect(client).toBeInstanceOf(RawClient) @@ -41,11 +41,9 @@ describe('createRawClient', () => { expect(() => createRawClient({ surface: 'platform', - credential: {type: 'clientToken', value: 'pmfa_ct_browser'}, + credential: {type: 'clientToken', value: 'pmfa_ct_browserA'}, }), - ).toThrow( - 'Client and project tokens cannot be used as team server API keys.', - ) + ).toThrow('Client and project tokens cannot be used as team keys.') }) test('creates a typed Messaging client with session and operation resources', () => { @@ -54,7 +52,7 @@ describe('createRawClient', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, timeoutMs: 1234, }) @@ -73,7 +71,7 @@ describe('createRawClient', () => { credential: { type: 'projectToken', value: - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', }, surface: 'messaging', }) @@ -88,7 +86,7 @@ describe('createRawClient', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, }) @@ -111,7 +109,7 @@ describe('createRawClient', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, }), ).toThrow('requires the Platform API surface') @@ -128,7 +126,7 @@ describe('createRawClient', () => { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, surface: 'platform', }).project('11111111-1111-4111-8111-111111111111') @@ -143,7 +141,7 @@ describe('createRawClient', () => { url: '/platform/projects/11111111-1111-4111-8111-111111111111/events?limit=25', }) expect(server.requests[0]?.headers.authorization).toBe( - 'Bearer pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'Bearer pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) } finally { await server.close() diff --git a/test/services/auth.test.ts b/test/services/auth.test.ts index 8baa3ed6..a2bff018 100644 --- a/test/services/auth.test.ts +++ b/test/services/auth.test.ts @@ -10,7 +10,7 @@ describe('AuthService', () => { const result = await fixture.service.login({ apiKey: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', profile: 'work', }) @@ -21,7 +21,7 @@ describe('AuthService', () => { }) expect(fixture.credentials.set).toHaveBeenCalledWith( 'profile:work:apiKey', - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) expect(fixture.saved()).toEqual({ activeProfile: 'work', @@ -33,7 +33,7 @@ describe('AuthService', () => { version: 2, }) expect(JSON.stringify(fixture.saved())).not.toContain( - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) }) @@ -43,7 +43,7 @@ describe('AuthService', () => { await expect( fixture.service.login({ apiKey: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', profile: '../work', }), ).rejects.toThrow('Profile names may contain') @@ -55,13 +55,13 @@ describe('AuthService', () => { await expect( fixture.service.login({apiKey: 'secret', profile: 'work'}), - ).rejects.toThrow('must use the canonical pmfa_ v1 format') + ).rejects.toThrow('must use the canonical pmfa_ opaque format') expect(fixture.credentials.set).not.toHaveBeenCalled() }) test('stores an exact-project token only with explicit project ownership', async () => { const fixture = createFixture() - const token = `pmfa_pt_${'A'.repeat(94)}` + const token = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` await expect( fixture.service.loginProjectToken({ @@ -89,12 +89,12 @@ describe('AuthService', () => { profile: 'project', project: 'project_1', projectToken: - ' pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ', + ' pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ ', }) expect(fixture.credentials.set).toHaveBeenCalledWith( 'profile:project:projectToken', - 'pmfa_pt_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ', ) await expect( fixture.service.loginProjectToken({ @@ -102,7 +102,7 @@ describe('AuthService', () => { project: 'project_1', projectToken: 'pmfa_pt_', }), - ).rejects.toThrow('canonical pmfa_pt_ v1 format') + ).rejects.toThrow('opaque format') }) test('removes the previous project-token keyring entry after switching a profile to an API key', async () => { @@ -120,12 +120,12 @@ describe('AuthService', () => { version: 2, }) vi.mocked(fixture.credentials.get).mockResolvedValue( - `pmfa_pt_${'A'.repeat(94)}`, + `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, ) await fixture.service.login({ apiKey: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', profile: 'work', }) @@ -157,7 +157,7 @@ describe('AuthService', () => { }, version: 2, }) - const oldToken = `pmfa_pt_${'A'.repeat(94)}` + const oldToken = `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ` vi.mocked(fixture.credentials.get).mockResolvedValue(oldToken) vi.mocked(fixture.repository.save).mockRejectedValue( new Error('profile save failed'), @@ -166,7 +166,7 @@ describe('AuthService', () => { await expect( fixture.service.login({ apiKey: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', profile: 'work', }), ).rejects.toThrow('profile save failed') @@ -216,7 +216,7 @@ describe('AuthService', () => { test('switches the active profile and reports secure credential availability', async () => { const fixture = createFixture(profileConfig()) vi.mocked(fixture.credentials.get).mockResolvedValue( - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', ) await expect(fixture.service.use('work')).resolves.toMatchObject({ @@ -250,7 +250,7 @@ describe('AuthService', () => { version: 2, }) vi.mocked(fixture.credentials.get).mockResolvedValue( - `pmfa_pt_${'A'.repeat(94)}`, + `pmfa_pt_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBqz0whQ`, ) await expect(fixture.service.status('project')).resolves.toMatchObject({ diff --git a/test/services/doctor.test.ts b/test/services/doctor.test.ts index 67337e1d..e17ca121 100644 --- a/test/services/doctor.test.ts +++ b/test/services/doctor.test.ts @@ -10,7 +10,7 @@ import type {ProfileConfig} from '../../src/config/profiles.js' import {runDoctor, type DoctorDependencies} from '../../src/services/doctor.js' const KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const config: ProfileConfig = { activeProfile: 'work', profiles: { diff --git a/test/services/groups.test.ts b/test/services/groups.test.ts index 6306df2c..7abb3848 100644 --- a/test/services/groups.test.ts +++ b/test/services/groups.test.ts @@ -107,7 +107,7 @@ function client(baseUrl: string) { credential: { type: 'apiKey', value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, surface: 'messaging', }) diff --git a/test/services/projects.test.ts b/test/services/projects.test.ts index 6f101d86..6ab41318 100644 --- a/test/services/projects.test.ts +++ b/test/services/projects.test.ts @@ -18,7 +18,7 @@ import { import {ProjectContextService} from '../../src/services/projects.js' const API_KEY = - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m' const APP = '11111111-1111-4111-8111-111111111111' const WEB = '22222222-2222-4222-8222-222222222222' diff --git a/test/services/voice.test.ts b/test/services/voice.test.ts index c4d8744a..74b47f0c 100644 --- a/test/services/voice.test.ts +++ b/test/services/voice.test.ts @@ -146,7 +146,7 @@ describe('voice transfers', () => { credential: { type: 'apiKey' as const, value: - 'pmfa_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', + 'pmfa_AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFnfH-m', }, surface: 'platform' as const, ...(timeoutMs === undefined ? {} : {timeoutMs}),