import type { JsonObj } from '../../result.js'; import { BaseCommand } from '../../index.js'; export default class WorkspaceCreate extends BaseCommand { static args: { slug: import("@oclif/core/lib/interfaces/parser.js").Arg>; }; static description: string; static examples: string[]; static flags: { name: import("@oclif/core/lib/interfaces/parser.js").OptionFlag; org: import("@oclif/core/lib/interfaces/parser.js").OptionFlag; }; run(): Promise; /** * oRPC surfaces structured errors as {json: {code, message, ...}} or * {error: {...}}. Extract the message for display; fall back to raw * text when the body isn't JSON. */ private extractErrorMessage; /** * Pick the org for the new workspace from the per-org token store. * * - 0 orgs → "No orgs found. Run `qfg login` first." * - 1 org → auto-select that org. * - 2+ orgs → require `--org `. Slug is matched against * `org_slug` in the token store; UUID is matched against the token * store key. Either way the org must exist locally — we never invent * an orgId we don't have a token for. * * Always returns BOTH the WorkOS org id (needed to mint the JWT) and the * org slug (needed for the create-workspace request body). If the token * lacks `org_slug`, errors with a `qfg login` hint. */ private resolveOrgFromTokens; }