andesine 0.1.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +27 -8
- package/dist/cli.js +1611 -121
- package/dist/cli.js.map +1 -1
- package/dist/config.schema.json +20 -3
- package/dist/templates/pages/.env.example +5 -0
- package/dist/templates/pages/AGENTS.md +79 -0
- package/dist/templates/pages/LICENSE +21 -0
- package/dist/templates/pages/README.md +72 -0
- package/dist/templates/pages/andesine.config.ts +39 -0
- package/dist/templates/pages/astro.config.ts +23 -0
- package/dist/templates/pages/gitignore +13 -0
- package/dist/templates/pages/package.template.json +45 -0
- package/dist/templates/pages/src/api/openapi.yaml +246 -0
- package/dist/templates/pages/src/assets/andesine.svg +1 -0
- package/dist/templates/pages/src/assets/andesine.ts +6 -0
- package/dist/templates/pages/src/assets/favicon.svg +13 -0
- package/dist/templates/pages/src/assets/social-dots.svg +14 -0
- package/dist/templates/pages/src/components/content/callout.astro +26 -0
- package/dist/templates/pages/src/components/content/card-grid.astro +1 -0
- package/dist/templates/pages/src/components/content/card.astro +31 -0
- package/dist/templates/pages/src/components/content/code-block.astro +34 -0
- package/dist/templates/pages/src/components/content/code-group.astro +13 -0
- package/dist/templates/pages/src/components/content/copy-button.tsx +53 -0
- package/dist/templates/pages/src/components/content/disclosure.astro +26 -0
- package/dist/templates/pages/src/components/content/figure.astro +10 -0
- package/dist/templates/pages/src/components/content/file-tree.astro +47 -0
- package/dist/templates/pages/src/components/content/index.ts +30 -0
- package/dist/templates/pages/src/components/content/steps.astro +16 -0
- package/dist/templates/pages/src/components/content/tab.astro +7 -0
- package/dist/templates/pages/src/components/content/tabs.astro +15 -0
- package/dist/templates/pages/src/components/content/tabs.tsx +99 -0
- package/dist/templates/pages/src/components/effects/page-scroll-shadow.tsx +27 -0
- package/dist/templates/pages/src/components/effects/page-scrollbar.tsx +35 -0
- package/dist/templates/pages/src/components/layout/call-to-action.tsx +28 -0
- package/dist/templates/pages/src/components/layout/footer.astro +44 -0
- package/dist/templates/pages/src/components/layout/group-label.tsx +34 -0
- package/dist/templates/pages/src/components/layout/header.astro +53 -0
- package/dist/templates/pages/src/components/layout/mobile-navigation.tsx +51 -0
- package/dist/templates/pages/src/components/layout/navigation-links.tsx +57 -0
- package/dist/templates/pages/src/components/layout/navigation-tree.tsx +138 -0
- package/dist/templates/pages/src/components/layout/outline.tsx +162 -0
- package/dist/templates/pages/src/components/layout/page-actions.tsx +87 -0
- package/dist/templates/pages/src/components/layout/powered-by.tsx +29 -0
- package/dist/templates/pages/src/components/layout/section-tabs.tsx +83 -0
- package/dist/templates/pages/src/components/layout/sidebar.tsx +65 -0
- package/dist/templates/pages/src/components/primitives/button.tsx +121 -0
- package/dist/templates/pages/src/components/primitives/card.tsx +25 -0
- package/dist/templates/pages/src/components/primitives/dialog.tsx +47 -0
- package/dist/templates/pages/src/components/primitives/input.tsx +22 -0
- package/dist/templates/pages/src/components/primitives/logo.tsx +41 -0
- package/dist/templates/pages/src/components/primitives/menu.tsx +121 -0
- package/dist/templates/pages/src/components/primitives/scroll-area.tsx +103 -0
- package/dist/templates/pages/src/components/primitives/shortcut.tsx +60 -0
- package/dist/templates/pages/src/components/primitives/tooltip.tsx +39 -0
- package/dist/templates/pages/src/components/reference/facts.astro +27 -0
- package/dist/templates/pages/src/components/reference/fields.astro +102 -0
- package/dist/templates/pages/src/components/reference/method-badge.astro +18 -0
- package/dist/templates/pages/src/components/reference/methods.ts +17 -0
- package/dist/templates/pages/src/components/reference/operation.astro +252 -0
- package/dist/templates/pages/src/components/reference/styles.ts +14 -0
- package/dist/templates/pages/src/components/search/highlighted-text.tsx +22 -0
- package/dist/templates/pages/src/components/search/search-answer.tsx +123 -0
- package/dist/templates/pages/src/components/search/search-palette.tsx +174 -0
- package/dist/templates/pages/src/components/search/search-results.tsx +229 -0
- package/dist/templates/pages/src/components/social/card.ts +77 -0
- package/dist/templates/pages/src/content/docs/customization/index.mdx +11 -0
- package/dist/templates/pages/src/content/docs/customization/styles.mdx +18 -0
- package/dist/templates/pages/src/content/docs/getting-started/api-reference.mdx +100 -0
- package/dist/templates/pages/src/content/docs/getting-started/components.mdx +156 -0
- package/dist/templates/pages/src/content/docs/getting-started/configuration.mdx +194 -0
- package/dist/templates/pages/src/content/docs/getting-started/deployment.mdx +142 -0
- package/dist/templates/pages/src/content/docs/getting-started/index.mdx +22 -0
- package/dist/templates/pages/src/content/docs/getting-started/writing-pages.mdx +35 -0
- package/dist/templates/pages/src/content/docs/index.mdx +21 -0
- package/dist/templates/pages/src/content.config.ts +1 -0
- package/dist/templates/pages/src/layouts/page.astro +195 -0
- package/dist/templates/pages/src/styles/global.css +95 -0
- package/dist/templates/pages/tsconfig.json +10 -0
- package/dist/templates/pages/uno.config.ts +168 -0
- package/package.json +2 -2
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":[],"sources":["../src/errors.ts","../package.json","../src/config/files.ts","../src/config/schema.ts","../src/config/resolve.ts","../src/output.ts","../src/prompts.ts","../src/context.ts","../src/auth/schema.ts","../src/storage/files.ts","../src/storage/credentials.ts","../src/storage/lock.ts","../src/storage/profiles.ts","../src/auth/oauth.ts","../src/auth/client.ts","../src/auth/login.ts","../src/auth/logout.ts","../src/auth/status.ts","../src/content/collections.ts","../src/init/choices.ts","../src/init/write-config.ts","../src/types/options.ts","../src/api/errors.ts","../src/types/source.ts","../src/types/schema.ts","../src/types/tree.ts","../src/types/generate.ts","../src/types/file.ts","../src/types/metadata.ts","../src/types/execute.ts","../src/init/index.ts","../src/api/manifest.ts","../src/api/input.ts","../src/api/bindings.ts","../src/api/binary.ts","../src/api/execute.ts","../src/api/register.ts","../src/types/register.ts","../src/program.ts","../src/run.ts","../src/cli.ts"],"sourcesContent":["/** Process exit codes shared by commands and the executable. */\nconst exitCodes = { success: 0, failure: 1, usage: 2, stale: 3, cancelled: 130 } as const;\n\nclass CLIError extends Error {\n constructor(\n message: string,\n readonly exitCode: number = exitCodes.failure\n ) {\n super(message);\n this.name = \"CLIError\";\n }\n}\n\nclass CancelledError extends CLIError {\n constructor() {\n super(\"Cancelled.\", exitCodes.cancelled);\n this.name = \"CancelledError\";\n }\n}\n\nexport { CLIError, CancelledError, exitCodes };\n","","import { CLIError, exitCodes } from \"../errors\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport type * as z from \"zod\";\n\n/** Read declarative JSON only. Missing optional files are distinct from invalid files. */\nconst readConfigFile = async <Schema extends z.ZodType>(\n filePath: string,\n schema: Schema,\n optional = false\n): Promise<z.output<Schema> | undefined> => {\n let content: string;\n let value: unknown;\n\n try {\n content = await readFile(filePath, \"utf8\");\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n\n if (optional && code === \"ENOENT\") return undefined;\n\n throw new CLIError(`Cannot read ${filePath} (${code ?? \"filesystem error\"}).`, exitCodes.usage);\n }\n\n try {\n value = JSON.parse(content);\n } catch {\n throw new CLIError(`Invalid JSON in ${filePath}.`, exitCodes.usage);\n }\n\n const result = schema.safeParse(value);\n\n if (!result.success) {\n // Report field locations without echoing values that could contain a pasted secret.\n const fields = [...new Set(result.error.issues.map((issue) => issue.path.join(\".\") || \"root\"))];\n\n throw new CLIError(\n `Invalid configuration in ${filePath}. Check: ${fields.join(\", \")}.`,\n exitCodes.usage\n );\n }\n\n return result.data;\n};\n\n/** Find the nearest andesine.json. Only init can select a missing explicit file. */\nconst findProjectConfig = async <Schema extends z.ZodType>(\n cwd: string,\n schema: Schema,\n explicitPath?: string,\n allowMissingExplicit = false\n): Promise<{ path: string; value: z.output<Schema> } | undefined> => {\n let directory = path.resolve(cwd);\n\n if (explicitPath !== undefined) {\n const filePath = path.resolve(directory, explicitPath);\n const value = await readConfigFile(filePath, schema, allowMissingExplicit);\n\n return value === undefined ? undefined : { path: filePath, value };\n }\n\n while (true) {\n const filePath = path.join(directory, \"andesine.json\");\n const value = await readConfigFile(filePath, schema, true);\n const parent = path.dirname(directory);\n\n if (value !== undefined) return { path: filePath, value };\n if (parent === directory) return undefined;\n\n directory = parent;\n }\n};\n\nexport { readConfigFile, findProjectConfig };\n","import * as z from \"zod\";\n\nconst nonemptyString = z.string().trim().min(1);\nconst workspaceIDSchema = z\n .string()\n .regex(/^ws_[A-Za-z\\d]{1,22}$/, \"Expected a workspace ID (ws_…).\");\nconst sourceSchema = z.union([\n z.strictObject({\n kind: z.literal(\"published\"),\n channel: nonemptyString.max(50).default(\"published\")\n }),\n z.strictObject({\n kind: z.literal(\"published\"),\n snapshotID: z.string().regex(/^snp_[A-Za-z\\d]{1,22}$/)\n }),\n z.strictObject({ kind: z.literal(\"current\") })\n]);\nconst typesConfigSchema = z.strictObject({\n source: sourceSchema.default({ kind: \"published\", channel: \"published\" }),\n collections: z\n .array(nonemptyString)\n .default([])\n .describe(\"Collection IDs or paths; empty selects all accessible collections.\"),\n output: nonemptyString\n .default(\"src/andesine.generated.ts\")\n .describe(\n \"Output path relative to andesine.json, or the working directory when no config is present.\"\n ),\n includeEntryIDs: z.boolean().default(false),\n includeEntryPaths: z.boolean().default(false),\n includeTree: z.boolean().default(false)\n});\nconst projectConfigSchema = z.strictObject({\n $schema: z.string().optional(),\n version: z.literal(1),\n baseURL: z\n .url()\n .optional()\n .describe(\n \"HTTP(S) API root, optionally including a deployment prefix. No credentials, query, or fragment.\"\n ),\n workspaceID: workspaceIDSchema.optional(),\n profile: nonemptyString.optional(),\n types: typesConfigSchema.optional()\n});\nconst profileSchema = z.strictObject({\n baseURL: z.url(),\n workspaceID: workspaceIDSchema.optional(),\n accountID: nonemptyString.optional(),\n credentialRef: nonemptyString.optional()\n});\nconst userConfigSchema = z.strictObject({\n version: z.literal(1),\n defaultProfile: nonemptyString.optional(),\n profiles: z.record(nonemptyString, profileSchema)\n});\n\ntype ProjectConfig = z.output<typeof projectConfigSchema>;\ntype TypesConfig = z.output<typeof typesConfigSchema>;\ntype UserProfile = z.output<typeof profileSchema>;\n\nexport { projectConfigSchema, typesConfigSchema, userConfigSchema, workspaceIDSchema };\nexport type { ProjectConfig, TypesConfig, UserProfile };\n","import { CLIError, exitCodes } from \"../errors\";\nimport { findProjectConfig, readConfigFile } from \"./files\";\nimport {\n projectConfigSchema,\n typesConfigSchema,\n userConfigSchema,\n workspaceIDSchema,\n type TypesConfig,\n type UserProfile\n} from \"./schema\";\nimport { homedir } from \"node:os\";\nimport path from \"node:path\";\n\ninterface GlobalOptions {\n config?: string;\n profile?: string;\n baseUrl?: string;\n workspace?: string;\n interactive?: boolean;\n}\n\ninterface ResolveConfigOptions {\n flags?: GlobalOptions;\n cwd?: string;\n env?: NodeJS.ProcessEnv;\n userConfigPath?: string;\n allowNewProfile?: boolean;\n allowMissingConfig?: boolean;\n}\n\ninterface ResolvedConfig {\n baseURL: string;\n workspaceID?: string;\n configPath?: string;\n profileName?: string;\n /** Only present when the selected profile belongs to the resolved API root. */\n profile?: UserProfile;\n types: TypesConfig;\n}\n\n/** Canonical instance identity includes the deployment prefix, not just its origin. */\nconst normalizeBaseURL = (value: string): string => {\n const message = \"baseURL must be an HTTP(S) URL without credentials, query, or fragment.\";\n let url: URL;\n\n try {\n url = new URL(value);\n } catch {\n throw new CLIError(message, exitCodes.usage);\n }\n\n const hasUnsupportedParts = url.username || url.password || url.search || url.hash;\n const isHTTP = url.protocol === \"http:\" || url.protocol === \"https:\";\n\n if (!isHTTP || hasUnsupportedParts) throw new CLIError(message, exitCodes.usage);\n\n return url.href.replace(/\\/+$/, \"\");\n};\n\n/** User metadata stays outside the project. This file must never contain tokens. */\nconst getUserConfigPath = (env: NodeJS.ProcessEnv): string => {\n const home = homedir();\n const defaultDirectory =\n process.platform === \"win32\"\n ? env.APPDATA || path.join(home, \"AppData\", \"Roaming\")\n : process.platform === \"darwin\"\n ? path.join(home, \"Library\", \"Application Support\")\n : path.join(home, \".config\");\n const directory = env.XDG_CONFIG_HOME || defaultDirectory;\n\n if (!path.isAbsolute(directory)) {\n throw new CLIError(\n \"The user configuration directory must be an absolute path.\",\n exitCodes.usage\n );\n }\n\n return path.join(directory, \"andesine\", \"profiles.json\");\n};\n\n/** Resolve flags > environment > project > selected profile > defaults, without credentials or I/O writes. */\nconst resolveConfig = async ({\n flags = {},\n cwd = process.cwd(),\n env = process.env,\n userConfigPath = getUserConfigPath(env),\n allowNewProfile = false,\n allowMissingConfig = false\n}: ResolveConfigOptions = {}): Promise<ResolvedConfig> => {\n const project = await findProjectConfig(\n cwd,\n projectConfigSchema,\n flags.config ?? env.ANDESINE_CONFIG,\n allowMissingConfig\n );\n const userConfig = await readConfigFile(userConfigPath, userConfigSchema, true);\n const profileName =\n flags.profile ?? env.ANDESINE_PROFILE ?? project?.value.profile ?? userConfig?.defaultProfile;\n const selectedProfile =\n profileName && userConfig && Object.hasOwn(userConfig.profiles, profileName)\n ? userConfig.profiles[profileName]\n : undefined;\n\n if (profileName !== undefined && !selectedProfile && !allowNewProfile) {\n throw new CLIError(\n \"The selected profile does not exist in the user configuration.\",\n exitCodes.usage\n );\n }\n\n const profileBaseURL = selectedProfile ? normalizeBaseURL(selectedProfile.baseURL) : undefined;\n const baseURL = normalizeBaseURL(\n flags.baseUrl ??\n env.ANDESINE_BASE_URL ??\n project?.value.baseURL ??\n profileBaseURL ??\n \"https://api.andesine.app\"\n );\n const profile =\n selectedProfile && profileBaseURL === baseURL ? { ...selectedProfile, baseURL } : undefined;\n const workspaceID =\n flags.workspace ??\n env.ANDESINE_WORKSPACE_ID ??\n project?.value.workspaceID ??\n profile?.workspaceID;\n const types = project?.value.types ?? typesConfigSchema.parse({});\n const outputDirectory = project ? path.dirname(project.path) : path.resolve(cwd);\n\n if (workspaceID !== undefined && !workspaceIDSchema.safeParse(workspaceID).success) {\n throw new CLIError(\"workspaceID must be a workspace ID (ws_…).\", exitCodes.usage);\n }\n\n return {\n baseURL,\n workspaceID,\n configPath: project?.path,\n profileName,\n profile,\n types: { ...types, output: path.resolve(outputDirectory, types.output) }\n };\n};\n\nexport { resolveConfig, normalizeBaseURL, getUserConfigPath };\nexport type { GlobalOptions, ResolvedConfig, ResolveConfigOptions };\n","import type { Writable } from \"node:stream\";\nimport { styleText } from \"node:util\";\nimport { intro, log, note, spinner } from \"@clack/prompts\";\nimport { CLIError } from \"./errors\";\n\n/** Wait for each write so commands can stream results without an unbounded queue. */\nconst writeOutput = (stream: Writable, text: string | Uint8Array): Promise<void> => {\n return new Promise((resolve, reject) => {\n // Writes with a callback can also emit an error event on the stream.\n stream.once(\"error\", reject);\n stream.write(text, (error) => {\n if (error) reject(error);\n else {\n stream.removeListener(\"error\", reject);\n resolve();\n }\n });\n });\n};\n\nconst serializeJSON = (value: unknown): string => {\n const serialized = JSON.stringify(value);\n\n if (serialized === undefined) throw new CLIError(\"The result is not a JSON value.\");\n\n return `${serialized}\\n`;\n};\n\n/** Data goes to stdout; prompts and diagnostics go to stderr. */\nconst createOutput = (interactive = true, signal?: AbortSignal) => {\n const terminal = Boolean(\n interactive && process.stderr.isTTY && !process.env.CI && process.env.TERM !== \"dumb\"\n );\n const options = { output: process.stderr, withGuide: true };\n const diagnostic = async (\n message: string,\n level: \"info\" | \"success\" | \"warn\" | \"error\" = \"info\"\n ) => {\n if (terminal) log[level](message, options);\n else await writeOutput(process.stderr, `${message}\\n`);\n };\n\n return {\n json: (value: unknown) => writeOutput(process.stdout, serializeJSON(value)),\n text: (value: string) => writeOutput(process.stdout, value),\n diagnostic: (message: string) => diagnostic(message),\n success: (message: string) => diagnostic(message, \"success\"),\n warning: (message: string) => diagnostic(message, \"warn\"),\n error: (message: string) => diagnostic(message, \"error\"),\n heading: async (title: string) => {\n if (terminal) intro(styleText([\"bold\", \"cyan\"], title, { stream: process.stderr }), options);\n else await writeOutput(process.stderr, `${title}\\n`);\n },\n note: async (title: string, fields: Record<string, string | undefined>) => {\n const lines = Object.entries(fields).flatMap(([label, value]) => {\n if (value === undefined) return [];\n\n if (!terminal) return [`${label}: ${value}`];\n\n return [\n `${styleText(\"bold\", `${label}:`, { stream: process.stderr })} ${styleText(\"cyan\", value, { stream: process.stderr })}`\n ];\n });\n\n if (terminal) note(lines.join(\"\\n\"), title, options);\n else await writeOutput(process.stderr, `${title}\\n${lines.join(\"\\n\")}\\n`);\n },\n /** Always release the spinner and its listeners before errors or later output. */\n progress: async <Value>(\n message: string,\n action: () => Promise<Value>,\n complete: string\n ): Promise<Value> => {\n const loader = terminal\n ? spinner({ ...options, signal, cancelMessage: \"Cancelled.\" })\n : undefined;\n\n signal?.throwIfAborted();\n\n if (loader) loader.start(message);\n else await diagnostic(message);\n\n try {\n const result = await action();\n\n loader?.stop(complete);\n return result;\n } finally {\n loader?.clear();\n }\n }\n };\n};\n\nexport { createOutput, writeOutput };\n","import { CancelledError, CLIError, exitCodes } from \"./errors\";\nimport { isCancel } from \"@clack/prompts\";\nimport type { Readable, Writable } from \"node:stream\";\n\ninterface PromptOptions {\n input: Readable;\n output: Writable;\n signal: AbortSignal;\n}\n\n/** Keep Clack on stderr and prevent prompts in CI, pipes, and explicit non-interactive mode. */\nconst canPrompt = (interactive = true) => {\n return Boolean(interactive && process.stdin.isTTY && process.stderr.isTTY && !process.env.CI);\n};\nconst createPrompt = (signal: AbortSignal, interactive = true) => {\n const enabled = canPrompt(interactive);\n\n return async <Value>(\n run: (options: PromptOptions) => Promise<Value | symbol>\n ): Promise<Value> => {\n signal.throwIfAborted();\n\n if (!enabled) {\n throw new CLIError(\n \"Input is required. Supply the command flags or run in an interactive terminal.\",\n exitCodes.usage\n );\n }\n\n const value = await run({ input: process.stdin, output: process.stderr, signal });\n\n signal.throwIfAborted();\n\n if (isCancel(value)) throw new CancelledError();\n\n return value as Value;\n };\n};\n\nexport { canPrompt, createPrompt };\n","import {\n resolveConfig,\n type GlobalOptions,\n type ResolvedConfig,\n type ResolveConfigOptions\n} from \"./config/resolve\";\nimport { createOutput } from \"./output\";\nimport { createPrompt } from \"./prompts\";\n\ninterface CommandContext {\n config: ResolvedConfig;\n signal: AbortSignal;\n output: ReturnType<typeof createOutput>;\n prompt: ReturnType<typeof createPrompt>;\n}\n\n/** Create context inside command actions so help and version never read configuration. */\nconst createCommandContext = async (\n flags: GlobalOptions,\n signal: AbortSignal,\n options: Pick<ResolveConfigOptions, \"allowNewProfile\" | \"allowMissingConfig\"> = {}\n): Promise<CommandContext> => {\n signal.throwIfAborted();\n\n const config = await resolveConfig({ flags, ...options });\n\n signal.throwIfAborted();\n\n return {\n config,\n signal,\n output: createOutput(flags.interactive, signal),\n prompt: createPrompt(signal, flags.interactive)\n };\n};\n\nexport { createCommandContext };\nexport type { CommandContext };\n","import * as z from \"zod\";\n\nconst credentialsSchema = z.object({\n version: z.literal(1),\n baseURL: z.string(),\n accountID: z.string(),\n accessToken: z.string().min(1),\n refreshToken: z.string().min(1),\n expiresAt: z.number().finite(),\n refreshPending: z.boolean().default(false)\n});\nconst tokenResponseSchema = z.object({\n access_token: z.string().min(1),\n refresh_token: z.string().min(1),\n token_type: z.string().refine((value) => value.toLowerCase() === \"bearer\"),\n expires_in: z.number().int().positive(),\n scope: z.string().optional()\n});\nconst deviceResponseSchema = z.object({\n device_code: z.string().min(1),\n user_code: z.string().regex(/^[A-HJ-NP-Z2-9]{8}$/),\n verification_uri: z.url(),\n verification_uri_complete: z.url().optional(),\n expires_in: z.number().int().positive(),\n interval: z.number().int().positive().default(5)\n});\n\ntype Credentials = z.output<typeof credentialsSchema>;\ntype TokenResponse = z.output<typeof tokenResponseSchema>;\ntype DeviceResponse = z.output<typeof deviceResponseSchema>;\ntype StorageKind = \"keyring\" | \"file\";\n\nexport { credentialsSchema, tokenResponseSchema, deviceResponseSchema };\nexport type { Credentials, TokenResponse, DeviceResponse, StorageKind };\n","import { CLIError } from \"../errors\";\nimport { getUserConfigPath } from \"../config/resolve\";\nimport { chmod, lstat, mkdir, open, rename, unlink } from \"node:fs/promises\";\nimport { randomUUID } from \"node:crypto\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport path from \"node:path\";\n\nconst stateDirectory = () => path.dirname(getUserConfigPath(process.env));\nconst isMissing = (error: unknown) => (error as NodeJS.ErrnoException)?.code === \"ENOENT\";\n\n/** Create private CLI storage. Windows uses a protected ACL inherited by new files. */\nconst ensurePrivateDirectory = async (directory: string): Promise<void> => {\n await mkdir(directory, { recursive: true, mode: 0o700 });\n\n const info = await lstat(directory);\n\n if (!info.isDirectory() || info.isSymbolicLink()) {\n throw new CLIError(\"CLI storage must be a real directory.\");\n }\n\n if (process.platform !== \"win32\") {\n if (info.uid !== process.getuid?.()) {\n throw new CLIError(\"CLI storage must belong to the current user.\");\n }\n\n await chmod(directory, 0o700);\n return;\n }\n\n try {\n await promisify(execFile)(\n \"powershell.exe\",\n [\n \"-NoProfile\",\n \"-NonInteractive\",\n \"-Command\",\n `\n $ErrorActionPreference = 'Stop'\n $sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User\n $acl = New-Object System.Security.AccessControl.DirectorySecurity\n $acl.SetOwner($sid)\n $acl.SetAccessRuleProtection($true, $false)\n $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($sid, 'FullControl', 'ContainerInherit,ObjectInherit', 'None', 'Allow')\n $acl.AddAccessRule($rule)\n Set-Acl -LiteralPath $env:ANDESINE_STORAGE_PATH -AclObject $acl\n `\n ],\n {\n env: { ...process.env, ANDESINE_STORAGE_PATH: directory },\n timeout: 10_000,\n windowsHide: true\n }\n );\n } catch {\n throw new CLIError(\"Cannot restrict CLI storage to the current Windows account.\");\n }\n};\n\n/** Write and sync a private temporary file before replacing the destination. */\nconst writePrivateJSON = async (file: string, value: unknown): Promise<void> => {\n const temporary = `${file}.${randomUUID()}.tmp`;\n\n await ensurePrivateDirectory(path.dirname(file));\n\n const handle = await open(temporary, \"wx\", 0o600);\n\n try {\n await handle.writeFile(`${JSON.stringify(value, null, 2)}\\n`, \"utf8\");\n await handle.sync();\n await handle.close();\n await rename(temporary, file);\n\n if (process.platform !== \"win32\") {\n const directory = await open(path.dirname(file), \"r\");\n try {\n await directory.sync();\n } finally {\n await directory.close();\n }\n }\n } finally {\n await handle.close();\n await unlink(temporary).catch((error: unknown) => {\n if (!isMissing(error)) throw error;\n });\n }\n};\n\nexport { stateDirectory, isMissing, ensurePrivateDirectory, writePrivateJSON };\n","import { credentialsSchema, type Credentials, type StorageKind } from \"../auth/schema\";\nimport { CLIError } from \"../errors\";\nimport { ensurePrivateDirectory, isMissing, stateDirectory, writePrivateJSON } from \"./files\";\nimport { constants } from \"node:fs\";\nimport { open, unlink } from \"node:fs/promises\";\nimport path from \"node:path\";\n\ninterface CredentialStore {\n get(): Promise<Credentials | undefined>;\n set(value: Credentials): Promise<void>;\n delete(): Promise<void>;\n}\n\nconst parseCredentials = (value: string): Credentials => {\n try {\n return credentialsSchema.parse(JSON.parse(value));\n } catch {\n throw new CLIError(\"Stored credentials are invalid. Run auth login again.\");\n }\n};\nconst credentialStore = async (\n reference: string,\n signal?: AbortSignal\n): Promise<CredentialStore> => {\n const match = /^(keyring|file):([a-f0-9-]{36})$/.exec(reference);\n\n if (!match) throw new CLIError(\"Invalid credential reference. Run auth login again.\");\n\n const kind = match[1] as StorageKind;\n const id = match[2];\n\n if (kind === \"keyring\") {\n try {\n const { AsyncEntry } = await import(\"@napi-rs/keyring\");\n const entry = new AsyncEntry(\"app.andesine.cli\", id, { linux: { store: \"secret-service\" } });\n const safely = async <Value>(\n run: (signal: AbortSignal) => Promise<Value>\n ): Promise<Value> => {\n try {\n return await run(\n AbortSignal.any([AbortSignal.timeout(15_000), ...(signal ? [signal] : [])])\n );\n } catch {\n throw new CLIError(\n \"The OS credential store is unavailable. Unlock it and try again, or use auth login --credential-store file.\"\n );\n }\n };\n\n return {\n get: async () => {\n const value = await safely((signal) => entry.getPassword(signal));\n return value === undefined ? undefined : parseCredentials(value);\n },\n set: (value) => safely((signal) => entry.setPassword(JSON.stringify(value), signal)),\n delete: async () => {\n await safely((signal) => entry.deletePassword(signal));\n }\n };\n } catch {\n throw new CLIError(\n \"The OS credential store is unavailable. Use auth login --credential-store file for explicit file storage.\"\n );\n }\n }\n\n const directory = path.join(stateDirectory(), \"credentials\");\n const file = path.join(directory, `${id}.json`);\n\n return {\n get: async () => {\n await ensurePrivateDirectory(directory);\n\n let handle;\n\n try {\n handle = await open(file, constants.O_RDONLY | (constants.O_NOFOLLOW || 0));\n const info = await handle.stat();\n const privateFile =\n process.platform === \"win32\" ||\n ((info.mode & 0o077) === 0 && info.uid === process.getuid?.());\n\n if (!info.isFile() || !privateFile) {\n throw new CLIError(\n \"Credential file permissions must allow only the current user (0600).\"\n );\n }\n\n return parseCredentials(await handle.readFile(\"utf8\"));\n } catch (error) {\n if (isMissing(error)) return undefined;\n\n if (error instanceof CLIError) throw error;\n throw new CLIError(\"Cannot read the credential file.\");\n } finally {\n await handle?.close();\n }\n },\n set: (value) => writePrivateJSON(file, value),\n delete: async () => {\n await unlink(file).catch((error: unknown) => {\n if (!isMissing(error)) throw new CLIError(\"Cannot remove the credential file.\");\n });\n }\n };\n};\n\nexport { credentialStore };\nexport type { CredentialStore };\n","import { CLIError } from \"../errors\";\nimport { ensurePrivateDirectory, stateDirectory } from \"./files\";\nimport { createHash } from \"node:crypto\";\nimport { setTimeout } from \"node:timers/promises\";\nimport path from \"node:path\";\nimport lockfile from \"proper-lockfile\";\n\n/** Serialize metadata updates and token rotation across CLI processes. */\nconst withStateLock = async <Value>(\n name: string,\n signal: AbortSignal,\n run: (assertOwned: () => void) => Promise<Value>\n): Promise<Value> => {\n const directory = path.join(stateDirectory(), \"locks\");\n const target = path.join(directory, createHash(\"sha256\").update(name).digest(\"hex\"));\n const deadline = Date.now() + 150_000;\n let compromised = false;\n let release: (() => Promise<void>) | undefined;\n\n await ensurePrivateDirectory(directory);\n\n while (!release) {\n signal.throwIfAborted();\n\n try {\n release = await lockfile.lock(target, {\n realpath: false,\n stale: 120_000,\n update: 10_000,\n onCompromised: () => {\n compromised = true;\n }\n });\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== \"ELOCKED\") {\n throw new CLIError(\"Cannot lock CLI storage.\");\n }\n\n if (Date.now() >= deadline) {\n throw new CLIError(\"Another CLI process is using these credentials. Try again later.\");\n }\n\n await setTimeout(100, undefined, { signal });\n }\n }\n\n const assertOwned = () => {\n signal.throwIfAborted();\n if (compromised) {\n throw new CLIError(\"The credential lock was lost. Run auth status before retrying.\");\n }\n };\n\n try {\n assertOwned();\n return await run(assertOwned);\n } finally {\n await release().catch(() => {\n /* A compromised lock belongs to another process. */\n });\n }\n};\n\nexport { withStateLock };\n","import { readConfigFile } from \"../config/files\";\nimport { getUserConfigPath } from \"../config/resolve\";\nimport { userConfigSchema, type UserProfile } from \"../config/schema\";\nimport { CLIError } from \"../errors\";\nimport { writePrivateJSON } from \"./files\";\nimport { withStateLock } from \"./lock\";\n\n/** Compare before writing, so a concurrent login cannot replace an unseen profile. */\nconst saveProfile = async (\n name: string,\n profile: UserProfile,\n expected: UserProfile | undefined,\n signal: AbortSignal\n): Promise<void> => {\n await withStateLock(\"profiles\", signal, async (assertOwned) => {\n const file = getUserConfigPath(process.env);\n const config = (await readConfigFile(file, userConfigSchema, true)) || {\n version: 1 as const,\n profiles: {}\n };\n const previous = Object.hasOwn(config.profiles, name) ? config.profiles[name] : undefined;\n\n if (JSON.stringify(previous) !== JSON.stringify(expected)) {\n throw new CLIError(\n \"This profile changed during login. Retry with a different --profile name.\"\n );\n }\n\n assertOwned();\n await writePrivateJSON(file, {\n ...config,\n defaultProfile: config.defaultProfile || name,\n profiles: { ...config.profiles, [name]: profile }\n });\n });\n};\nconst clearProfileCredential = async (\n name: string,\n reference: string,\n signal: AbortSignal\n): Promise<void> => {\n await withStateLock(\"profiles\", signal, async (assertOwned) => {\n const file = getUserConfigPath(process.env);\n const config = await readConfigFile(file, userConfigSchema, true);\n const profile =\n config && Object.hasOwn(config.profiles, name) ? config.profiles[name] : undefined;\n\n if (!config || profile?.credentialRef !== reference) return;\n\n const { credentialRef: _, ...remaining } = profile;\n\n assertOwned();\n await writePrivateJSON(file, {\n ...config,\n profiles: { ...config.profiles, [name]: remaining }\n });\n });\n};\n\nexport { saveProfile, clearProfileCredential };\n","import { CLIError } from \"../errors\";\nimport { deviceResponseSchema, tokenResponseSchema, type TokenResponse } from \"./schema\";\nimport { setTimeout } from \"node:timers/promises\";\nimport type * as z from \"zod\";\n\nconst CLIENT_ID = \"andesine-cli\";\nconst SCOPES = \"andesine:api offline_access\";\nconst DEVICE_GRANT = \"urn:ietf:params:oauth:grant-type:device_code\";\n\nclass OAuthError extends CLIError {\n constructor(\n readonly code: string,\n readonly retryAfter = 0\n ) {\n super(\"The authorization request failed. Run auth login again.\");\n }\n}\n\n/** Send credentials only to this instance, in a form body, without redirects or retries. */\nconst oauthRequest = async (\n baseURL: string,\n endpoint: string,\n fields: Record<string, string>,\n signal: AbortSignal\n): Promise<unknown> => {\n let response: Response;\n\n try {\n response = await fetch(`${baseURL}/auth/${endpoint}`, {\n method: \"POST\",\n redirect: \"error\",\n headers: {\n \"content-type\": \"application/x-www-form-urlencoded\",\n \"accept\": \"application/json\"\n },\n body: new URLSearchParams({ client_id: CLIENT_ID, ...fields }),\n signal: AbortSignal.any([signal, AbortSignal.timeout(30_000)])\n });\n } catch {\n signal.throwIfAborted();\n throw new OAuthError(\"network_error\");\n }\n\n const body: unknown = await response.json().catch(() => undefined);\n\n if (!response.ok) {\n const code =\n body && typeof body === \"object\" && \"error\" in body && typeof body.error === \"string\"\n ? body.error\n : \"server_error\";\n const retryAfter = Number(response.headers.get(\"retry-after\"));\n\n throw new OAuthError(\n response.status === 429 ? \"slow_down\" : code,\n Number.isFinite(retryAfter) ? Math.max(retryAfter, 0) : 0\n );\n }\n\n return body;\n};\nconst parseResponse = <Schema extends z.ZodType>(\n schema: Schema,\n value: unknown\n): z.output<Schema> => {\n const result = schema.safeParse(value);\n\n if (!result.success) {\n throw new CLIError(\"The instance returned an invalid authorization response.\");\n }\n\n return result.data;\n};\nconst startDeviceLogin = async (baseURL: string, signal: AbortSignal) => {\n const device = parseResponse(\n deviceResponseSchema,\n await oauthRequest(baseURL, \"device/code\", { scope: SCOPES, resource: baseURL }, signal)\n );\n const verification = new URL(device.verification_uri);\n const complete = new URL(device.verification_uri_complete || device.verification_uri);\n const validProtocol =\n verification.protocol === \"https:\" ||\n (new URL(baseURL).protocol === \"http:\" && verification.protocol === \"http:\");\n const validDestination =\n validProtocol &&\n !verification.username &&\n !verification.password &&\n complete.origin === verification.origin &&\n complete.pathname === verification.pathname &&\n !complete.username &&\n !complete.password &&\n !complete.hash &&\n (!device.verification_uri_complete ||\n complete.searchParams.get(\"user_code\") === device.user_code);\n\n if (!validDestination) {\n throw new CLIError(\"The instance returned an invalid browser authorization URL.\");\n }\n\n return device;\n};\nconst pollDeviceLogin = async (\n baseURL: string,\n device: Awaited<ReturnType<typeof startDeviceLogin>>,\n expiresAt: number,\n signal: AbortSignal\n): Promise<TokenResponse> => {\n let interval = device.interval * 1000;\n\n while (Date.now() < expiresAt) {\n await setTimeout(Math.min(interval, Math.max(expiresAt - Date.now(), 0)), undefined, {\n signal\n });\n if (Date.now() >= expiresAt) break;\n\n try {\n return parseResponse(\n tokenResponseSchema,\n await oauthRequest(\n baseURL,\n \"oauth2/token\",\n {\n grant_type: DEVICE_GRANT,\n device_code: device.device_code,\n resource: baseURL\n },\n signal\n )\n );\n } catch (error) {\n if (!(error instanceof OAuthError)) throw error;\n\n if (error.code === \"authorization_pending\") continue;\n\n if (error.code === \"slow_down\") {\n interval = Math.max(interval + 5000, error.retryAfter * 1000);\n continue;\n }\n\n if (error.code === \"network_error\" || error.code === \"server_error\") {\n interval = Math.max(interval * 2, 5000);\n continue;\n }\n\n if (error.code === \"access_denied\") throw new CLIError(\"Login was denied in the browser.\");\n\n if (error.code === \"expired_token\") break;\n\n throw new CLIError(\"The login request is no longer valid. Run auth login again.\");\n }\n }\n\n throw new CLIError(\"The login code expired. Run auth login again.\");\n};\nconst refreshAccess = async (baseURL: string, refreshToken: string, signal: AbortSignal) => {\n return parseResponse(\n tokenResponseSchema,\n await oauthRequest(\n baseURL,\n \"oauth2/token\",\n {\n grant_type: \"refresh_token\",\n refresh_token: refreshToken,\n resource: baseURL\n },\n signal\n )\n );\n};\nconst revokeAccess = async (\n baseURL: string,\n refreshToken: string,\n signal: AbortSignal\n): Promise<void> => {\n await oauthRequest(\n baseURL,\n \"oauth2/revoke\",\n { token: refreshToken, token_type_hint: \"refresh_token\" },\n signal\n );\n};\n\nexport { startDeviceLogin, pollDeviceLogin, refreshAccess, revokeAccess };\n","import { createClient, AndesineAPIError } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError } from \"../errors\";\nimport { credentialStore } from \"../storage/credentials\";\nimport { withStateLock } from \"../storage/lock\";\nimport { refreshAccess } from \"./oauth\";\n\n/** Select one credential source explicitly; never fall back after an authentication error. */\nconst authenticatedClient = async (context: CommandContext) => {\n const { config, signal } = context;\n const apiKey = process.env.ANDESINE_API_KEY;\n const headers = config.workspaceID ? { \"x-workspace-id\": config.workspaceID } : undefined;\n const fetcher: typeof fetch = (input, init) =>\n fetch(input, {\n ...init,\n redirect: \"error\",\n signal: AbortSignal.any([\n signal,\n ...(init?.signal ? [init.signal] : []),\n ...(input instanceof Request ? [input.signal] : [])\n ])\n });\n\n if (apiKey !== undefined) {\n if (!apiKey.trim()) {\n throw new CLIError(\n \"ANDESINE_API_KEY is empty. Set it or remove it before using saved credentials.\"\n );\n }\n\n return {\n client: createClient({ baseURL: config.baseURL, apiKey, headers, fetch: fetcher }),\n source: \"environment\" as const\n };\n }\n\n const reference = config.profile?.credentialRef;\n\n if (!reference) {\n throw new CLIError(\n \"No credentials for this instance. Run andesine auth login or set ANDESINE_API_KEY.\"\n );\n }\n\n const accessToken = await withStateLock(reference, signal, async (assertOwned) => {\n const store = await credentialStore(reference, signal);\n const credentials = await store.get();\n\n if (!credentials) throw new CLIError(\"Saved credentials were not found. Run auth login again.\");\n\n if (\n credentials.baseURL !== config.baseURL ||\n credentials.accountID !== config.profile?.accountID\n ) {\n throw new CLIError(\n \"Saved credentials do not match this instance and account. Run auth login again.\"\n );\n }\n\n if (credentials.refreshPending) {\n throw new CLIError(\n \"The previous token exchange was interrupted. Run auth login again; the old refresh token will not be reused.\"\n );\n }\n\n if (credentials.expiresAt > Date.now() + 60_000) return credentials.accessToken;\n\n assertOwned();\n\n await store.set({ ...credentials, refreshPending: true });\n\n assertOwned();\n\n try {\n const startedAt = Date.now();\n const tokens = await refreshAccess(config.baseURL, credentials.refreshToken, signal);\n\n assertOwned();\n\n await store.set({\n ...credentials,\n accessToken: tokens.access_token,\n refreshToken: tokens.refresh_token,\n expiresAt: startedAt + tokens.expires_in * 1000,\n refreshPending: false\n });\n return tokens.access_token;\n } catch {\n signal.throwIfAborted();\n throw new CLIError(\n \"Could not complete the token exchange. Run auth login again; the previous refresh token will not be reused.\"\n );\n }\n });\n\n return {\n client: createClient({ baseURL: config.baseURL, accessToken, headers, fetch: fetcher }),\n source: reference.startsWith(\"file:\") ? (\"file\" as const) : (\"keyring\" as const)\n };\n};\n\n/** Do not expose server error bodies or retry a dispatched request during auth recovery. */\nconst identity = async (client: ReturnType<typeof createClient>, signal: AbortSignal) => {\n try {\n return await client.auth.getIdentity(undefined, { signal });\n } catch (error) {\n signal.throwIfAborted();\n if (error instanceof AndesineAPIError && (error.status === 401 || error.status === 403)) {\n throw new CLIError(\n \"The credential is not authorized. Check ANDESINE_API_KEY or run auth login again.\"\n );\n }\n throw new CLIError(\n \"Cannot verify this credential with the instance. Check the connection and base URL.\"\n );\n }\n};\n\nexport { authenticatedClient, identity };\n","import type { CommandContext } from \"../context\";\nimport { CLIError, CancelledError } from \"../errors\";\nimport { credentialStore, type CredentialStore } from \"../storage/credentials\";\nimport { readConfigFile } from \"../config/files\";\nimport { getUserConfigPath, normalizeBaseURL } from \"../config/resolve\";\nimport { userConfigSchema } from \"../config/schema\";\nimport { saveProfile } from \"../storage/profiles\";\nimport { withStateLock } from \"../storage/lock\";\nimport { startDeviceLogin, pollDeviceLogin, revokeAccess } from \"./oauth\";\nimport { identity } from \"./client\";\nimport type { Credentials, StorageKind } from \"./schema\";\nimport { createClient } from \"@andesine/sdk\";\nimport { confirm } from \"@clack/prompts\";\nimport { randomUUID } from \"node:crypto\";\nimport openBrowser from \"open\";\n\ninterface LoginOptions {\n browser: boolean;\n credentialStore?: StorageKind;\n}\ninterface LoginStore {\n reference: string;\n store: CredentialStore;\n}\n\nconst prepareStore = async (context: CommandContext, kind: StorageKind): Promise<LoginStore> => {\n const reference = `${kind}:${randomUUID()}`;\n const store = await credentialStore(reference, context.signal);\n\n // Check write access before the user grants access in the browser.\n await store.set({\n version: 1,\n baseURL: context.config.baseURL,\n accountID: \"probe\",\n accessToken: \"probe\",\n refreshToken: \"probe\",\n expiresAt: 0,\n refreshPending: false\n });\n await store.delete();\n context.signal.throwIfAborted();\n return { reference, store };\n};\nconst selectStore = async (\n context: CommandContext,\n selected?: StorageKind\n): Promise<LoginStore> => {\n try {\n return await prepareStore(context, selected || \"keyring\");\n } catch (error) {\n context.signal.throwIfAborted();\n if (selected) throw error;\n\n await context.output.warning(\n \"The OS credential store is unavailable. File storage keeps unencrypted tokens in a file restricted to your user. Use --credential-store file to select it explicitly.\"\n );\n const accepted = await context.prompt((options) =>\n confirm({\n ...options,\n message: \"Use private file storage for this login?\",\n initialValue: false\n })\n );\n\n if (!accepted) throw new CancelledError();\n return prepareStore(context, \"file\");\n }\n};\n\n/** Grant approval stays in the browser; the CLI only polls the provider and saves its tokens. */\nconst login = async (\n context: CommandContext,\n options: LoginOptions,\n reportResult = true\n): Promise<void> => {\n const { config, signal, output } = context;\n const name = config.profileName || \"default\";\n const profiles = await readConfigFile(getUserConfigPath(process.env), userConfigSchema, true);\n const existing =\n profiles && Object.hasOwn(profiles.profiles, name) ? profiles.profiles[name] : undefined;\n\n if (existing && normalizeBaseURL(existing.baseURL) !== config.baseURL) {\n throw new CLIError(\n \"This profile belongs to another instance. Use --profile with a new name for this login.\"\n );\n }\n\n await output.heading(\"Andesine · Sign in\");\n await output.note(\"Login\", { Instance: config.baseURL, Profile: name });\n\n const storage = await selectStore(context, options.credentialStore);\n const device = await output.progress(\n \"Requesting a login code\",\n () => startDeviceLogin(config.baseURL, signal),\n \"Login code ready\"\n );\n const expiresAt = Date.now() + device.expires_in * 1000;\n\n await output.note(\"Authorize in your browser\", {\n Open: device.verification_uri,\n Code: device.user_code\n });\n await output.diagnostic(\"Approve access in your browser. Press Ctrl+C to cancel.\");\n\n if (options.browser) {\n try {\n signal.throwIfAborted();\n await openBrowser(device.verification_uri_complete || device.verification_uri, {\n wait: false\n });\n } catch {\n signal.throwIfAborted();\n await output.warning(\"Could not open a browser. Open the URL above and enter the code.\");\n }\n }\n\n const tokens = await output.progress(\n \"Waiting for browser approval\",\n () => pollDeviceLogin(config.baseURL, device, expiresAt, signal),\n \"Browser approval received\"\n );\n const tokenReceivedAt = Date.now();\n let saved = false;\n\n try {\n const client = createClient({\n baseURL: config.baseURL,\n accessToken: tokens.access_token,\n fetch: (input, init) => fetch(input, { ...init, redirect: \"error\" })\n });\n const account = await output.progress(\n \"Verifying your account\",\n () => identity(client, signal),\n \"Account verified\"\n );\n\n if (account.type !== \"oauth\") {\n throw new CLIError(\"The instance did not return an OAuth user identity.\");\n }\n\n const credentials: Credentials = {\n version: 1,\n baseURL: config.baseURL,\n accountID: account.user.id,\n accessToken: tokens.access_token,\n refreshToken: tokens.refresh_token,\n expiresAt: tokenReceivedAt + tokens.expires_in * 1000,\n refreshPending: false\n };\n const commit = async () => {\n signal.throwIfAborted();\n await storage.store.set(credentials);\n await saveProfile(\n name,\n {\n baseURL: config.baseURL,\n accountID: account.user.id,\n credentialRef: storage.reference,\n ...(config.workspaceID ? { workspaceID: config.workspaceID } : {})\n },\n config.profile,\n signal\n );\n saved = true;\n };\n const previousRef = config.profile?.credentialRef;\n\n if (previousRef) {\n await withStateLock(previousRef, signal, async (assertOwned) => {\n assertOwned();\n await commit();\n try {\n const previousStore = await credentialStore(previousRef, signal);\n const previous = await previousStore.get();\n\n if (previous?.refreshPending) {\n await output.warning(\n \"The previous token exchange was interrupted; its server grant may remain active.\"\n );\n } else if (previous) {\n if (\n previous.baseURL !== config.baseURL ||\n previous.accountID !== config.profile?.accountID\n ) {\n throw new CLIError(\"The previous credential does not match this account.\");\n }\n await revokeAccess(config.baseURL, previous.refreshToken, signal);\n }\n await previousStore.delete();\n } catch {\n await output.warning(\n \"New login saved. Could not fully remove the previous login; its server credentials may remain active.\"\n );\n }\n });\n } else {\n await commit();\n }\n\n await output.success(`Signed in as ${account.user.email}. Saved profile: ${name}.`);\n if (process.env.ANDESINE_API_KEY !== undefined) {\n await output.warning(\n \"ANDESINE_API_KEY is set and will still take precedence for API requests.\"\n );\n }\n\n if (reportResult) {\n await output.json({\n authenticated: true,\n profile: name,\n baseURL: config.baseURL,\n account: account.user,\n workspaceID: config.workspaceID ?? null,\n credentialSource: storage.reference.split(\":\")[0]\n });\n }\n } finally {\n if (!saved) {\n await revokeAccess(config.baseURL, tokens.refresh_token, AbortSignal.timeout(10_000)).catch(\n async () => {\n await output.warning(\n \"Login was not saved, and token revocation could not be confirmed. The server grant may remain active.\"\n );\n }\n );\n await credentialStore(storage.reference)\n .then((store) => store.delete())\n .catch(async () => {\n await output.warning(\"Could not remove the incomplete login from credential storage.\");\n });\n }\n }\n};\n\nexport { login };\nexport type { LoginOptions };\n","import type { CommandContext } from \"../context\";\nimport { CLIError } from \"../errors\";\nimport { credentialStore } from \"../storage/credentials\";\nimport { clearProfileCredential } from \"../storage/profiles\";\nimport { withStateLock } from \"../storage/lock\";\nimport { revokeAccess } from \"./oauth\";\n\n/** Remove this profile's credentials and report remote revocation separately. */\nconst logout = async (context: CommandContext): Promise<void> => {\n const { config, signal, output } = context;\n const reference = config.profile?.credentialRef;\n\n await output.heading(\"Andesine · Sign out\");\n\n if (process.env.ANDESINE_API_KEY !== undefined) {\n await output.warning(\n \"ANDESINE_API_KEY is unchanged. Remove it from your environment to stop using that API key.\"\n );\n }\n\n if (!reference || !config.profileName) {\n await output.diagnostic(\"No saved login for this profile.\");\n await output.json({ loggedOut: true, localRemoved: false, revocation: \"not-applicable\" });\n return;\n }\n\n const revoked = await output.progress(\n \"Signing out\",\n () =>\n withStateLock(reference, signal, async (assertOwned) => {\n const store = await credentialStore(reference, signal);\n const credentials = await store.get();\n let revoked = false;\n\n if (\n credentials &&\n (credentials.baseURL !== config.baseURL ||\n credentials.accountID !== config.profile?.accountID)\n ) {\n throw new CLIError(\"Stored credentials do not match the selected instance and account.\");\n }\n\n if (credentials && !credentials.refreshPending) {\n try {\n await revokeAccess(config.baseURL, credentials.refreshToken, signal);\n revoked = true;\n } catch {\n signal.throwIfAborted();\n }\n }\n\n assertOwned();\n await store.delete();\n await clearProfileCredential(config.profileName!, reference, signal);\n return revoked;\n }),\n \"Local credentials removed\"\n );\n\n await output.json({\n loggedOut: true,\n localRemoved: true,\n revocation: revoked ? \"confirmed\" : \"unconfirmed\"\n });\n await output.diagnostic(\n \"Local credentials removed. Access tokens from earlier rotations may remain valid for up to 15 minutes.\"\n );\n\n if (!revoked) {\n throw new CLIError(\n \"Server revocation could not be confirmed. The server grant may remain active.\"\n );\n }\n\n await output.success(\"Signed out. Server revocation confirmed.\");\n};\n\nexport { logout };\n","import type { CommandContext } from \"../context\";\nimport { authenticatedClient, identity } from \"./client\";\n\n/** Verify the selected credential online; output identity metadata only. */\nconst status = async (context: CommandContext): Promise<void> => {\n const { output } = context;\n\n await output.heading(\"Andesine · Authentication\");\n\n const { account, source } = await output.progress(\n \"Checking authentication\",\n async () => {\n const { client, source } = await authenticatedClient(context);\n const account = await identity(client, context.signal);\n\n return { account, source };\n },\n \"Authentication verified\"\n );\n\n await output.note(\"Authenticated\", {\n \"Instance\": context.config.baseURL,\n \"Account\": account.type === \"key\" ? undefined : account.user.email,\n \"API key\": account.type === \"key\" ? account.keyID : undefined,\n \"Profile\": source === \"environment\" ? undefined : context.config.profileName,\n \"Credentials\": source,\n \"Workspace\": account.type === \"key\" ? account.workspaceID : context.config.workspaceID\n });\n\n await context.output.json({\n authenticated: true,\n baseURL: context.config.baseURL,\n profile: source === \"environment\" ? null : context.config.profileName,\n credentialSource: source,\n account: account.type === \"key\" ? null : account.user,\n keyID: account.type === \"key\" ? account.keyID : undefined,\n workspaceID: account.type === \"key\" ? account.workspaceID : (context.config.workspaceID ?? null)\n });\n};\n\nexport { status };\n","import { paginate, type AndesineClient } from \"@andesine/sdk\";\nimport type { TypesConfig } from \"../config/schema\";\n\ninterface CollectionChoice {\n id: string;\n path: string;\n}\n\n/** Read selectable collections from one published snapshot, or the current tree. */\nconst listCollections = async (\n client: AndesineClient,\n source: TypesConfig[\"source\"],\n signal: AbortSignal\n): Promise<CollectionChoice[]> => {\n const collections: CollectionChoice[] = [];\n\n if (source.kind === \"published\") {\n const { kind: _, ...selector } = source;\n\n for await (const collection of client.content.paginateCollections(selector, { signal })) {\n collections.push(collection);\n }\n } else {\n const queue: Array<string | undefined> = [undefined];\n const seen = new Set<string>();\n\n for (const collectionID of queue) {\n const scope = collectionID ? { collectionID } : {};\n\n for await (const collection of paginate((cursor) =>\n client.collections.list({ ...scope, cursor, limit: 100 }, { signal })\n )) {\n if (seen.has(collection.id)) continue;\n\n seen.add(collection.id);\n collections.push(collection);\n queue.push(collection.id);\n }\n }\n }\n\n return collections.sort((a, b) => a.path.localeCompare(b.path));\n};\n\n/** Let the public API resolve IDs and paths, including collection-ID anchors. */\nconst validateCollections = async (\n client: AndesineClient,\n source: TypesConfig[\"source\"],\n selectors: string[],\n signal: AbortSignal\n): Promise<void> => {\n let snapshotID =\n source.kind === \"published\" && \"snapshotID\" in source ? source.snapshotID : undefined;\n\n for (const selector of selectors.length ? selectors : [undefined]) {\n const scope =\n selector === undefined\n ? {}\n : /^coll_[A-Za-z\\d]+$/.test(selector)\n ? { collectionID: selector }\n : { collectionPath: selector };\n\n if (source.kind === \"current\") {\n await client.collections.list({ ...scope, limit: 1 }, { signal });\n } else {\n const publication = snapshotID\n ? { snapshotID }\n : { channel: \"channel\" in source ? source.channel : undefined };\n const page = await client.content.listCollections(\n { ...scope, ...publication, limit: 1 },\n { signal }\n );\n\n snapshotID = page.snapshotID;\n }\n }\n};\n\nexport { listCollections, validateCollections };\nexport type { CollectionChoice };\n","import { multiselect, select, text, confirm } from \"@clack/prompts\";\nimport type { AndesineClient } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport type { TypesConfig } from \"../config/schema\";\nimport { typesConfigSchema } from \"../config/schema\";\nimport { canPrompt } from \"../prompts\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { listCollections } from \"../content/collections\";\nimport type { InitOptions } from \"./options\";\n\ntype SourceMode = \"published\" | \"current\" | \"snapshot\";\n\nconst selectSource = async (\n context: CommandContext,\n client: AndesineClient,\n options: InitOptions,\n initial: TypesConfig[\"source\"]\n): Promise<TypesConfig[\"source\"]> => {\n const interactive = canPrompt(options.interactive);\n const initialMode =\n initial.kind === \"current\" ? \"current\" : \"snapshotID\" in initial ? \"snapshot\" : \"published\";\n const explicit =\n options.source !== undefined || options.channel !== undefined || options.snapshot !== undefined;\n let mode: SourceMode = initialMode;\n\n if (explicit) {\n mode = options.snapshot !== undefined ? \"snapshot\" : (options.source ?? \"published\");\n } else if (interactive) {\n mode = await context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"Which content should types describe?\",\n initialValue: initialMode,\n options: [\n {\n value: \"published\",\n label: \"Published channel\",\n hint: \"Default; follows each publication\"\n },\n {\n value: \"current\",\n label: \"Current content\",\n hint: \"Includes unpublished schema changes\"\n },\n { value: \"snapshot\", label: \"Fixed published snapshot\" }\n ]\n })\n );\n }\n\n if (mode === \"current\") return { kind: \"current\" };\n\n if (mode === \"snapshot\") {\n const initialSnapshot =\n initial.kind === \"published\" && \"snapshotID\" in initial ? initial.snapshotID : \"\";\n const snapshotID =\n options.snapshot ??\n (interactive\n ? await context.prompt((prompt) =>\n text({\n ...prompt,\n message: \"Snapshot ID\",\n initialValue: initialSnapshot,\n validate: (value) =>\n /^snp_[A-Za-z\\d]{1,22}$/.test(value ?? \"\")\n ? undefined\n : \"Enter a snapshot ID (snp_…).\"\n })\n )\n : initialSnapshot);\n\n return { kind: \"published\", snapshotID };\n }\n\n const initialChannel =\n initial.kind === \"published\" && \"channel\" in initial ? initial.channel : \"published\";\n\n if (options.channel !== undefined || !interactive) {\n return { kind: \"published\", channel: options.channel ?? initialChannel };\n }\n\n const channels = await context.output.progress(\n \"Loading publishing channels\",\n () => client.publishing.listChannels({}, { signal: context.signal }),\n \"Publishing channels loaded\"\n );\n\n if (!channels.length) {\n throw new CLIError(\n \"No publishing channels are available. Select --source current or create a channel in Andesine.\"\n );\n }\n\n const channel = await context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"Publishing channel\",\n initialValue: channels.some((item) => item.code === initialChannel)\n ? initialChannel\n : undefined,\n options: channels.map((item) => ({ value: item.code, label: item.name, hint: item.code }))\n })\n );\n\n return { kind: \"published\", channel };\n};\n\nconst selectTypes = async (\n context: CommandContext,\n client: AndesineClient,\n options: InitOptions,\n initial: TypesConfig\n): Promise<TypesConfig> => {\n const interactive = canPrompt(options.interactive);\n const source = await selectSource(context, client, options, initial.source);\n let collections = options.allCollections ? [] : (options.collection ?? initial.collections);\n let output = options.output ?? initial.output;\n let includeEntryIDs = options.includeEntryIds ?? initial.includeEntryIDs;\n let includeEntryPaths = options.includeEntryPaths ?? initial.includeEntryPaths;\n let includeTree = options.includeTree ?? initial.includeTree;\n\n if (interactive && options.collection === undefined && !options.allCollections) {\n const change =\n !collections.length ||\n (await context.prompt((prompt) =>\n confirm({\n ...prompt,\n message: \"Change the saved collection selection?\",\n initialValue: false\n })\n ));\n\n if (change) {\n const available = await context.output.progress(\n \"Loading collections\",\n () => listCollections(client, source, context.signal),\n \"Collections loaded\"\n );\n\n if (available.length) {\n const format = await context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"How should collections be saved?\",\n options: [\n { value: \"id\", label: \"IDs\", hint: \"Stable when collections are renamed\" },\n { value: \"path\", label: \"Paths\", hint: \"Readable names from the explorer\" }\n ]\n })\n );\n const selected = await context.prompt((prompt) =>\n multiselect({\n ...prompt,\n message: \"Collections (leave empty for all)\",\n required: false,\n initialValues: available\n .filter((item) => collections.includes(item.id) || collections.includes(item.path))\n .map((item) => item.id),\n options: available.map((item) => ({ value: item.id, label: item.path, hint: item.id }))\n })\n );\n\n collections = available\n .filter((item) => selected.includes(item.id))\n .map((item) => (format === \"id\" ? item.id : item.path));\n } else {\n collections = [];\n await context.output.diagnostic(\n \"No collections yet. The configuration will include all collections as they become available.\"\n );\n }\n }\n }\n\n if (interactive && options.output === undefined) {\n output = await context.prompt((prompt) =>\n text({\n ...prompt,\n message: \"Generated types file (relative to the configuration)\",\n initialValue: output,\n validate: (value) => (value?.trim() ? undefined : \"Enter an output path.\")\n })\n );\n }\n\n const explicitIncludes =\n options.includeEntryIds !== undefined ||\n options.includeEntryPaths !== undefined ||\n options.includeTree !== undefined;\n\n if (interactive && !explicitIncludes) {\n const extras = await context.prompt((prompt) =>\n multiselect({\n ...prompt,\n message: \"Optional generated types\",\n required: false,\n initialValues: [\n includeEntryIDs ? \"ids\" : \"\",\n includeEntryPaths ? \"paths\" : \"\",\n includeTree ? \"tree\" : \"\"\n ].filter(Boolean),\n options: [\n { value: \"ids\", label: \"Entry IDs\" },\n { value: \"paths\", label: \"Entry paths\" },\n { value: \"tree\", label: \"Exact tree structure\" }\n ]\n })\n );\n\n includeEntryIDs = extras.includes(\"ids\");\n includeEntryPaths = extras.includes(\"paths\");\n includeTree = extras.includes(\"tree\");\n }\n\n const parsed = typesConfigSchema.safeParse({\n source,\n collections: [...new Set(collections)],\n output,\n includeEntryIDs,\n includeEntryPaths,\n includeTree\n });\n\n if (!parsed.success) {\n throw new CLIError(\n \"Invalid type configuration. Check the source, collection selectors, and output path.\",\n exitCodes.usage\n );\n }\n\n return parsed.data;\n};\n\nexport { selectTypes };\n","import { CLIError, exitCodes } from \"../errors\";\nimport type { ProjectConfig } from \"../config/schema\";\nimport { randomUUID } from \"node:crypto\";\nimport { link, lstat, mkdir, readFile, rename, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport lockfile from \"proper-lockfile\";\n\nconst readProjectFile = async (file: string): Promise<string | undefined> => {\n try {\n const info = await lstat(file);\n\n if (!info.isFile() || info.isSymbolicLink()) {\n throw new CLIError(\n \"The project configuration must be a regular file, not a link.\",\n exitCodes.usage\n );\n }\n\n return await readFile(file, \"utf8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n\n throw error;\n }\n};\n\n/** Recheck the reviewed file under a lock, then replace it with complete JSON. */\nconst writeProjectConfig = async (\n file: string,\n config: ProjectConfig,\n expected: string | undefined,\n signal: AbortSignal\n): Promise<void> => {\n const temporary = `${file}.${randomUUID()}.tmp`;\n let compromised = false;\n\n signal.throwIfAborted();\n await mkdir(path.dirname(file), { recursive: true });\n\n const release = await lockfile.lock(file, {\n realpath: false,\n onCompromised: () => {\n compromised = true;\n }\n });\n\n try {\n if ((await readProjectFile(file)) !== expected) {\n throw new CLIError(\"The project configuration changed during setup. Run init again.\");\n }\n\n const info = expected === undefined ? undefined : await lstat(file);\n\n await writeFile(temporary, `${JSON.stringify(config, null, 2)}\\n`, {\n flag: \"wx\",\n mode: info?.mode ?? 0o644\n });\n signal.throwIfAborted();\n\n if (compromised) throw new CLIError(\"The configuration lock was lost. Run init again.\");\n\n if (expected === undefined) {\n await link(temporary, file);\n } else {\n if ((await readProjectFile(file)) !== expected) {\n throw new CLIError(\"The project configuration changed during setup. Run init again.\");\n }\n\n await rename(temporary, file);\n }\n } finally {\n try {\n await unlink(temporary).catch((error: NodeJS.ErrnoException) => {\n if (error.code !== \"ENOENT\") throw error;\n });\n } finally {\n await release().catch((error: unknown) => {\n if (!compromised) throw error;\n });\n }\n }\n};\n\nexport { readProjectFile, writeProjectConfig };\n","import type { ResolvedConfig } from \"../config/resolve\";\nimport { typesConfigSchema, type TypesConfig } from \"../config/schema\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport path from \"node:path\";\n\ninterface TypeOptions {\n source?: \"published\" | \"current\";\n channel?: string;\n snapshot?: string;\n collection?: string[];\n allCollections?: boolean;\n output?: string;\n includeEntryIds?: boolean;\n includeEntryPaths?: boolean;\n includeTree?: boolean;\n}\ninterface GenerateOptions extends TypeOptions {\n check?: boolean;\n watch?: boolean;\n force?: boolean;\n interval?: string;\n}\n\nconst validateTypeOptions = (options: TypeOptions): void => {\n const invalidSource =\n (options.channel !== undefined && options.snapshot !== undefined) ||\n (options.source === \"current\" &&\n (options.channel !== undefined || options.snapshot !== undefined));\n\n if (invalidSource) {\n throw new CLIError(\n \"Use --channel or --snapshot for published content; neither can be used with --source current.\",\n exitCodes.usage\n );\n }\n\n if (options.allCollections && options.collection) {\n throw new CLIError(\"Use --collection or --all-collections, not both.\", exitCodes.usage);\n }\n};\n\n/** Apply command overrides without changing the saved configuration. */\nconst resolveTypes = (config: ResolvedConfig, options: TypeOptions): TypesConfig => {\n const initial = config.types;\n const directory = config.configPath ? path.dirname(config.configPath) : process.cwd();\n let source = initial.source;\n\n validateTypeOptions(options);\n\n if (options.source === \"current\") {\n source = { kind: \"current\" };\n } else if (options.snapshot !== undefined) {\n source = { kind: \"published\", snapshotID: options.snapshot };\n } else if (options.source === \"published\" || options.channel !== undefined) {\n const previousChannel =\n initial.source.kind === \"published\" && \"channel\" in initial.source\n ? initial.source.channel\n : \"published\";\n\n source = { kind: \"published\", channel: options.channel ?? previousChannel };\n }\n\n const parsed = typesConfigSchema.safeParse({\n ...initial,\n source,\n collections: options.allCollections ? [] : (options.collection ?? initial.collections),\n output: options.output ?? initial.output,\n includeEntryIDs: options.includeEntryIds ?? initial.includeEntryIDs,\n includeEntryPaths: options.includeEntryPaths ?? initial.includeEntryPaths,\n includeTree: options.includeTree ?? initial.includeTree\n });\n\n if (!parsed.success) {\n throw new CLIError(\n \"Invalid type options. Check the source, collection selectors, and output path.\",\n exitCodes.usage\n );\n }\n\n const output = path.resolve(directory, parsed.data.output);\n\n if (!/\\.(?:ts|mts|cts)$/.test(output) || output === config.configPath) {\n throw new CLIError(\n \"The types output must be a TypeScript file, separate from the configuration.\",\n exitCodes.usage\n );\n }\n\n return { ...parsed.data, collections: [...new Set(parsed.data.collections)], output };\n};\n\nexport { resolveTypes, validateTypeOptions };\nexport type { TypeOptions, GenerateOptions };\n","import { AndesineAPIError, AndesineStreamProtocolError } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError } from \"../errors\";\n\n/** Keep structured API failures on stderr without exposing response bodies or credentials. */\nconst reportAPIError = async (context: CommandContext, error: unknown): Promise<never> => {\n context.signal.throwIfAborted();\n\n if (error instanceof AndesineAPIError || error instanceof AndesineStreamProtocolError) {\n const response = error.response;\n const details =\n error instanceof AndesineAPIError\n ? {\n status: error.status,\n data: error.defined ? error.data : undefined,\n hints: error.hints\n }\n : {};\n\n await context.output.diagnostic(\n JSON.stringify({\n error: {\n code: error.code,\n message: error.message,\n ...details,\n requestID: response.headers.get(\"x-request-id\") ?? undefined,\n retryAfter: response.headers.get(\"retry-after\") ?? undefined\n }\n })\n );\n\n const missingCapability = error instanceof AndesineAPIError && error.status === 501;\n\n throw new CLIError(\n missingCapability\n ? `${error.message} This server may not support the operation. Check its capabilities and version.`\n : error.message\n );\n }\n\n throw error;\n};\n\nexport { reportAPIError };\n","import { createHash } from \"node:crypto\";\n\ninterface NamedItem {\n key: string;\n label: string;\n}\n\nconst compare = (left: string, right: string): number => (left < right ? -1 : left > right ? 1 : 0);\nconst json = (value: unknown): string =>\n JSON.stringify(value)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\nconst literal = (value: string | null): string => json(value);\nconst union = (values: string[]): string =>\n [...new Set(values)].sort(compare).join(\" | \") || \"never\";\nconst tuple = (values: string[]): string => `[${values.join(\", \")}]`;\nconst hash = (value: string): string => createHash(\"sha256\").update(value).digest(\"hex\");\nconst identifier = (label: string): string => {\n const words = label.normalize(\"NFKC\").match(/[\\p{L}\\p{N}\\p{M}]+/gu) ?? [];\n const name = words\n .map((word) => {\n const [first, ...rest] = Array.from(word);\n\n return first.toUpperCase() + rest.join(\"\");\n })\n .join(\"\")\n .replace(/[^\\p{ID_Continue}]/gu, \"\");\n\n return /^[\\p{ID_Start}]/u.test(name) ? name : `_${name || \"Unnamed\"}`;\n};\n\n/** Allocate stable identifiers without using remote text as TypeScript syntax. */\nconst names = (items: NamedItem[], suffix: string): Map<string, string> => {\n const counts = new Map<string, number>();\n const result = new Map<string, string>();\n const used = new Set<string>();\n const sorted = [...items].sort((a, b) => compare(a.key, b.key));\n\n for (const item of sorted) {\n const base = `${identifier(item.label)}${suffix}`;\n\n counts.set(base, (counts.get(base) ?? 0) + 1);\n }\n\n for (const item of sorted) {\n const base = `${identifier(item.label)}${suffix}`;\n const digest = hash(item.key);\n\n let name = counts.get(base) === 1 ? base : `${base}_${digest.slice(0, 8)}`;\n let length = 8;\n\n while (used.has(name)) {\n length += 4;\n name = `${base}_${digest.slice(0, length)}`;\n }\n\n used.add(name);\n result.set(item.key, name);\n }\n\n return result;\n};\n\nexport { compare, json, literal, union, tuple, hash, names };\n","import type { SchemaField, SchemaProperty, SchemaRevision } from \"@andesine/sdk\";\nimport { compare, literal, union } from \"./source\";\n\n/** Match the API's derived field keys, including Unicode and empty-label fallbacks. */\nconst fieldKey = (field: SchemaField): string => {\n const fallback = field.kind === \"fragment\" ? \"content\" : \"property\";\n const source = Array.from(field.label.normalize(\"NFC\").trim()).slice(0, 50).join(\"\");\n const words = (source || fallback)\n .normalize(\"NFKC\")\n .replace(/([\\p{Ll}\\p{N}])(\\p{Lu})/gu, \"$1 $2\")\n .match(/[\\p{L}\\p{N}\\p{M}]+/gu);\n\n return (\n words\n ?.map((word, index) => {\n const [first = \"\", ...rest] = Array.from(word.toLowerCase());\n\n return `${index ? first.toUpperCase() : first}${rest.join(\"\")}`;\n })\n .join(\"\") || fallback\n );\n};\nconst propertyValue = (field: SchemaProperty): string => {\n switch (field.type) {\n case \"checkbox\":\n return \"boolean\";\n case \"number\":\n return \"number | null\";\n case \"select\":\n return union([literal(\"\"), ...field.options.map(literal)]);\n case \"multi-select\":\n return `Array<${union(field.options.map(literal))}>`;\n case \"text\":\n case \"date\":\n case \"url\":\n return \"string\";\n default:\n throw new Error(`Unsupported schema property type: ${String(field.type)}`);\n }\n};\nconst fieldMap = (fields: Map<string, string>): string => {\n const sorted = [...fields].sort(([a], [b]) => compare(a, b));\n\n return sorted.length\n ? `{\\n${sorted.map(([key, value]) => ` ${literal(key)}: ${value};`).join(\"\\n\")}\\n }`\n : \"Record<never, never>\";\n};\n\n/** Render effective fields only. Defaults are content, not constraints on field values. */\nconst schemaFields = (revision: SchemaRevision): string => {\n const groups = { property: new Map<string, string>(), fragment: new Map<string, string>() };\n\n if (revision.definition.formatVersion !== 1)\n throw new Error(\"Unsupported schema format version.\");\n\n for (const field of revision.definition.fields) {\n const key = fieldKey(field);\n const group = groups[field.kind];\n\n if (group.has(key)) throw new Error(`Duplicate ${field.kind} key ${literal(key)}.`);\n\n group.set(\n key,\n field.kind === \"property\"\n ? `{ name: string; type: ${literal(field.type)}; value: ${propertyValue(field)} }`\n : `{ name: string; content: FragmentDocument<${union(field.allowedBlocks.map(literal))}> }`\n );\n }\n\n return ` properties: ${fieldMap(groups.property)};\\n fragments: ${fieldMap(groups.fragment)};`;\n};\n\n// Only block kinds are constrained by schemas. Element names, props, marks, and\n// attributes remain general; default content must never become a schema for them.\nconst fragmentTypes = `type FragmentNode<Block extends string> = Omit<SDK.ContentNode, \"type\" | \"content\"> & {\n type: Block | \"paragraph\" | \"listItem\" | \"taskItem\" | \"tableRow\" | \"tableCell\" | \"tableHeader\" | \"text\" | \"hardBreak\";\n content?: Array<FragmentNode<Block>>;\n};\n\ntype FragmentDocument<Block extends string> = Omit<SDK.ContentNode, \"type\" | \"content\"> & {\n type: \"doc\";\n content: Array<Omit<FragmentNode<Block>, \"type\"> & { type: Block | \"paragraph\" }>;\n};`;\n\nexport { schemaFields, fragmentTypes };\n","import type { TypeMetadata, TypeMetadataCollection } from \"@andesine/sdk\";\nimport { literal, tuple } from \"./source\";\n\ninterface MetadataHierarchy {\n collections: Map<string | null, TypeMetadataCollection>;\n descendants: Map<string | null, string[]>;\n}\n\n/** Build selected subtrees. Missing parents are valid for a selected or restricted subtree. */\nconst hierarchy = (metadata: TypeMetadata): MetadataHierarchy => {\n const collections = new Map(\n metadata.collections.map((collection) => [collection.id, collection])\n );\n const children = new Map<string | null, TypeMetadataCollection[]>();\n const descendants = new Map<string | null, string[]>();\n const visiting = new Set<string | null>();\n const visit = (id: string | null): string[] => {\n if (visiting.has(id)) throw new Error(\"Type metadata contains a collection cycle.\");\n if (descendants.has(id)) return descendants.get(id)!;\n\n visiting.add(id);\n\n const result = (children.get(id) ?? []).flatMap((child) => [child.id!, ...visit(child.id)]);\n\n visiting.delete(id);\n descendants.set(id, result);\n\n return result;\n };\n\n if (collections.size !== metadata.collections.length) {\n throw new Error(\"Type metadata contains duplicate collection IDs.\");\n }\n\n for (const collection of metadata.collections) {\n if (collection.id === null) continue;\n\n const siblings = children.get(collection.parentID) ?? [];\n\n siblings.push(collection);\n children.set(collection.parentID, siblings);\n }\n\n for (const collection of metadata.collections) visit(collection.id);\n\n return { collections, descendants };\n};\n\n/** Emit ordered tree tuples without content bodies or runtime values. */\nconst treeTypes = (metadata: TypeMetadata, collectionNames: Map<string, string>): string[] => {\n const entries = new Map(metadata.entries!.map((entry) => [entry.id, entry]));\n const collections = new Map(\n metadata.collections.map((collection) => [collection.id, collection])\n );\n const rows = new Map(metadata.tree!.map((row) => [row.collectionID, row]));\n\n return metadata.collections.map((collection) => {\n const name = `${collectionNames.get(collection.id ?? \"/\")}Tree`;\n const row = rows.get(collection.id);\n\n if (!row) throw new Error(`Missing tree metadata for ${literal(collection.path)}.`);\n\n const childTrees = row.collectionIDs.map((id) => {\n const child = collections.get(id);\n\n if (!child || child.parentID !== collection.id) {\n throw new Error(`Invalid tree collection reference ${literal(id)}.`);\n }\n\n return `${collectionNames.get(id)}Tree`;\n });\n const childEntries = row.entryIDs.map((id) => {\n const entry = entries.get(id);\n\n if (!entry || entry.collectionID !== collection.id) {\n throw new Error(`Invalid tree entry reference ${literal(id)}.`);\n }\n\n return `Omit<SDK.PublishedEntry, \"id\" | \"name\" | \"path\"> & { id: ${literal(id)}; name: ${literal(entry.name)}; path: ${literal(entry.path)} }`;\n });\n\n if (metadata.source.kind === \"current\") {\n return `export interface ${name} {\n collectionID: ${literal(collection.id)};\n collectionIDs: ${tuple(row.collectionIDs.map(literal))};\n entryIDs: ${tuple(row.entryIDs.map(literal))};\n}`;\n }\n\n return `export interface ${name} extends SDK.PublishedCollection {\n id: ${literal(collection.id)};\n name: ${literal(collection.name)};\n path: ${literal(collection.path)};\n entries: ${tuple(childEntries)};\n collections: ${tuple(childTrees)};\n}`;\n });\n};\n\nexport { hierarchy, treeTypes };\n","import type { TypeMetadata } from \"@andesine/sdk\";\nimport type { TypesConfig } from \"../config/schema\";\nimport { compare, hash, json, literal, names, tuple, union } from \"./source\";\nimport { fragmentTypes, schemaFields } from \"./schema\";\nimport { hierarchy, treeTypes } from \"./tree\";\n\ninterface TypeGenerationOptions {\n /** Requested source. Omit to follow the metadata's channel or current source. */\n source?: TypesConfig[\"source\"];\n /** Requested collection selectors, recorded as provenance. Metadata is already scoped. */\n collections?: string[];\n /** Emit exact ID bindings and per-collection entry ID unions. Defaults to false. */\n includeEntryIDs?: boolean;\n /** Emit exact path bindings and per-collection entry path unions. Defaults to false. */\n includeEntryPaths?: boolean;\n /** Emit ordered trees, including their entry identities. Defaults to false. */\n includeTree?: boolean;\n}\n\nconst GENERATED_TYPES_MARKER = \"// Generated by Andesine. Do not edit.\";\n\n/**\n * Convert public type metadata into deterministic, type-only TypeScript source.\n *\n * @param metadata - One complete current or published metadata response.\n * @param options - Source provenance and optional entry/tree exports. These do not filter\n * metadata; request the selected collections and optional metadata before calling this function.\n * @returns Source text with Workspace, collection, and revision types. No files are written.\n * @throws Error for unsupported metadata, inconsistent references, or missing requested extras.\n * No network, credentials, project config loading, or executable remote input is involved.\n */\nconst generateTypes = (metadata: TypeMetadata, options: TypeGenerationOptions = {}): string => {\n const includeEntries = Boolean(options.includeEntryIDs || options.includeEntryPaths);\n const requestedSource =\n options.source ??\n (metadata.source.kind === \"published\"\n ? { kind: \"published\", channel: metadata.source.channel }\n : { kind: \"current\" });\n const source: TypesConfig[\"source\"] =\n requestedSource.kind === \"current\"\n ? { kind: \"current\" }\n : \"snapshotID\" in requestedSource\n ? { kind: \"published\", snapshotID: requestedSource.snapshotID }\n : { kind: \"published\", channel: requestedSource.channel };\n const sourceMismatch =\n source.kind !== metadata.source.kind ||\n (source.kind === \"published\" &&\n metadata.source.kind === \"published\" &&\n ((\"channel\" in source && source.channel !== metadata.source.channel) ||\n (\"snapshotID\" in source && source.snapshotID !== metadata.source.snapshotID)));\n\n if (metadata.formatVersion !== 1) throw new Error(\"Unsupported type metadata format version.\");\n if (sourceMismatch) throw new Error(\"Type metadata does not match the requested source.\");\n\n if ((includeEntries || options.includeTree) && !metadata.entries) {\n throw new Error(\"Request entry metadata before generating entry or tree types.\");\n }\n\n if (options.includeTree && !metadata.tree) {\n throw new Error(\"Request tree metadata before generating tree types.\");\n }\n\n const collections = [...metadata.collections].sort((a, b) => compare(a.id ?? \"\", b.id ?? \"\"));\n const selected = { ...metadata, collections };\n const { descendants } = hierarchy(selected);\n const collectionNames = names(\n collections.map((row) => ({ key: row.id ?? \"/\", label: row.name || \"Root\" })),\n \"Collection\"\n );\n const revisions = new Map(metadata.revisions.map((revision) => [revision.revisionID, revision]));\n const usedRevisions = new Set(\n collections.flatMap((row) => row.schemaRevisionIDs).filter((id) => id !== null)\n );\n const entries =\n includeEntries || options.includeTree\n ? [...metadata.entries!].sort((a, b) => compare(a.id, b.id))\n : [];\n const collectionBindings = new Map<string, string>();\n const entryBindings = new Map<string, string>();\n const shapes = new Map<string, string>();\n const interfaces: string[] = [];\n const types: string[] = [];\n const schemaBindings: string[] = [];\n const treeBindings: string[] = [];\n const base = metadata.source.kind === \"published\" ? \"SDK.PublishedEntryContent\" : \"SDK.Entry\";\n const contentBase = `Omit<${base}, \"schema\" | \"properties\" | \"fragments\">`;\n const bind = (map: Map<string, string>, key: string, value: string) => {\n if (map.has(key)) throw new Error(`Duplicate metadata selector ${literal(key)}.`);\n\n map.set(key, value);\n };\n\n for (const collection of collections) {\n const name = collectionNames.get(collection.id ?? \"/\")!;\n\n bind(collectionBindings, collection.path, name);\n\n if (collection.id !== null) bind(collectionBindings, collection.id, name);\n }\n\n for (const entry of entries) {\n const collection = collectionBindings.get(entry.collectionID ?? \"/\");\n\n if (!collection) throw new Error(`Missing collection for entry ${literal(entry.id)}.`);\n if (entry.schemaRevisionID !== null) usedRevisions.add(entry.schemaRevisionID);\n\n const binding = `{ collection: ${literal(entry.collectionID ?? \"/\")}; schemaRevisionID: ${literal(entry.schemaRevisionID)} }`;\n\n if (options.includeEntryIDs) bind(entryBindings, entry.id, binding);\n if (options.includeEntryPaths) bind(entryBindings, entry.path, binding);\n }\n\n const revisionNames = names(\n [...usedRevisions].map((id) => ({ key: id, label: `Revision_${id}` })),\n \"Schema\"\n );\n\n for (const id of [...usedRevisions].sort(compare)) {\n const revision = revisions.get(id);\n\n if (!revision) throw new Error(`Missing schema revision ${literal(id)}.`);\n\n const fields = schemaFields(revision);\n const shapeName = `SchemaFields_${hash(fields)}`;\n const revisionName = revisionNames.get(id)!;\n\n shapes.set(shapeName, fields);\n interfaces.push(`export interface ${revisionName} extends ${shapeName} {\n hash: ${literal(revision.hash)};\n}`);\n types.push(\n `export type ${revisionName}Content = ${contentBase} & SDK.SchemaContent<Workspace, ${literal(id)}>;`\n );\n schemaBindings.push(` ${literal(id)}: ${revisionName};`);\n }\n\n for (const collection of collections) {\n const name = collectionNames.get(collection.id ?? \"/\")!;\n const ids = [...new Set(collection.schemaRevisionIDs)].sort((a, b) =>\n compare(a ?? \"\", b ?? \"\")\n );\n const childIDs = [...descendants.get(collection.id)!].sort(compare);\n const identity =\n metadata.source.kind === \"published\" ? ` & { collectionID: ${literal(collection.id)} }` : \"\";\n\n interfaces.push(`export interface ${name} extends SDK.WorkspaceCollection {\n id: ${literal(collection.id)};\n path: ${literal(collection.path)};\n schemaRevisionIDs: readonly ${tuple(ids.map(literal))};\n descendants: readonly ${tuple(childIDs.map(literal))};\n}`);\n types.push(\n `export type ${name}Content = ${contentBase} & SDK.SchemaContent<Workspace, ${union(ids.map(literal))}>${identity};`\n );\n types.push(`export type ${name}StructuredContent = SDK.StructuredContent<${name}Content>;`);\n\n const collectionEntries = entries.filter((entry) => entry.collectionID === collection.id);\n\n if (options.includeEntryIDs) {\n types.push(\n `export type ${name}EntryID = ${union(collectionEntries.map((entry) => literal(entry.id)))};`\n );\n }\n\n if (options.includeEntryPaths) {\n types.push(\n `export type ${name}EntryPath = ${union(collectionEntries.map((entry) => literal(entry.path)))};`\n );\n }\n\n if (options.includeTree) {\n treeBindings.push(` ${literal(collection.path)}: ${name}Tree;`);\n if (collection.id !== null) treeBindings.push(` ${literal(collection.id)}: ${name}Tree;`);\n }\n }\n\n if (options.includeTree) {\n interfaces.push(...treeTypes(selected, collectionNames));\n types.push(`export type WorkspaceTree = {\\n${treeBindings.join(\"\\n\")}\\n};`);\n }\n\n const mapFields = [\n ` workspaceID: ${literal(metadata.workspaceID)};`,\n ` source: ${\n source.kind === \"current\"\n ? '{ kind: \"current\" }'\n : `{\n kind: \"published\";\n ${\"snapshotID\" in source ? `snapshotID: ${literal(source.snapshotID)};` : `channel: ${literal(source.channel)};`}\n }`\n };`,\n ` collections: {\\n${[...collectionBindings]\n .sort(([a], [b]) => compare(a, b))\n .map(([key, value]) => ` ${literal(key)}: ${value};`)\n .join(\"\\n\")}\\n };`,\n ` schemas: {\\n${schemaBindings.join(\"\\n\")}\\n };`\n ];\n\n if (includeEntries) {\n mapFields.push(\n ` entries: {\\n${[...entryBindings]\n .sort(([a], [b]) => compare(a, b))\n .map(([key, value]) => ` ${literal(key)}: ${value};`)\n .join(\"\\n\")}\\n };`\n );\n }\n\n if (options.includeTree && metadata.source.kind === \"published\") {\n mapFields.push(\" tree: WorkspaceTree;\");\n }\n\n return [\n [\n GENERATED_TYPES_MARKER,\n `// Workspace: ${literal(metadata.workspaceID)}; source: ${json(source)}.`,\n `// Collections: ${json([...new Set(options.collections ?? [])].sort(compare))}; entry IDs: ${Boolean(options.includeEntryIDs)}; entry paths: ${Boolean(options.includeEntryPaths)}; tree: ${Boolean(options.includeTree)}.`,\n \"// Types only. Configure the runtime client for the same workspace and source.\"\n ].join(\"\\n\"),\n 'import type * as SDK from \"@andesine/sdk\";',\n `export interface Workspace extends SDK.WorkspaceTypeMap {\\n${mapFields.join(\"\\n\")}\\n}`,\n ...[...shapes]\n .sort(([a], [b]) => compare(a, b))\n .map(([name, fields]) => `interface ${name} {\\n${fields}\\n}`),\n ...interfaces,\n ...([...shapes.values()].some((fields) => fields.includes(\"FragmentDocument<\"))\n ? [fragmentTypes]\n : []),\n ...types,\n \"\"\n ].join(\"\\n\\n\");\n};\n\nexport { generateTypes, GENERATED_TYPES_MARKER };\nexport type { TypeGenerationOptions };\n","import { randomUUID } from \"node:crypto\";\nimport { link, lstat, mkdir, readFile, rename, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport lockfile from \"proper-lockfile\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { GENERATED_TYPES_MARKER } from \"./generate\";\n\n/** Read without creating files, directories, or locks. Reject links and non-regular files. */\nconst readTypesFile = async (file: string): Promise<string | undefined> => {\n try {\n const info = await lstat(file);\n\n if (!info.isFile() || info.isSymbolicLink()) {\n throw new CLIError(\"The types output must be a regular file, not a link.\", exitCodes.usage);\n }\n\n return await readFile(file, \"utf8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n\n throw error;\n }\n};\n\n/** Replace only a reviewed file, atomically, and leave identical output untouched. */\nconst writeTypesFile = async (\n file: string,\n source: string,\n expected: string | undefined,\n signal: AbortSignal,\n force = false\n): Promise<boolean> => {\n const temporary = `${file}.${randomUUID()}.tmp`;\n const generated = expected?.split(/\\r?\\n/, 1)[0] === GENERATED_TYPES_MARKER;\n\n let compromised = false;\n\n signal.throwIfAborted();\n\n if (expected !== undefined && !generated && !force) {\n throw new CLIError(\n `Refusing to replace ${file}: it is not an Andesine generated file. Choose another --output or use --force to replace it.`,\n exitCodes.usage\n );\n }\n\n if (expected === source && (await readTypesFile(file)) === source) return false;\n\n await mkdir(path.dirname(file), { recursive: true });\n\n const release = await lockfile.lock(file, {\n realpath: false,\n onCompromised: () => {\n compromised = true;\n }\n });\n const assertUnchanged = async () => {\n signal.throwIfAborted();\n\n if (compromised) throw new CLIError(\"The types file lock was lost. Run generation again.\");\n\n if ((await readTypesFile(file)) !== expected) {\n throw new CLIError(\"The types file changed during generation. Run generation again.\");\n }\n };\n\n try {\n await assertUnchanged();\n if (expected === source) return false;\n\n const info = expected === undefined ? undefined : await lstat(file);\n\n await writeFile(temporary, source, { flag: \"wx\", mode: info?.mode ?? 0o644 });\n await assertUnchanged();\n\n if (expected === undefined) await link(temporary, file);\n else await rename(temporary, file);\n\n return true;\n } finally {\n try {\n await unlink(temporary).catch((error: NodeJS.ErrnoException) => {\n if (error.code !== \"ENOENT\") throw error;\n });\n } finally {\n await release().catch((error: unknown) => {\n if (!compromised) throw error;\n });\n }\n }\n};\n\nexport { readTypesFile, writeTypesFile };\n","import { AndesineAPIError, type TypeMetadata } from \"@andesine/sdk\";\nimport { authenticatedClient } from \"../auth/client\";\nimport type { CommandContext } from \"../context\";\nimport type { TypesConfig } from \"../config/schema\";\nimport { CLIError, exitCodes } from \"../errors\";\n\n/** Only metadata read failures can be retried by watch; writes and auth exchanges cannot. */\nclass RetryableMetadataError extends Error {\n constructor(\n readonly failure: unknown,\n readonly retryAfter = 0\n ) {\n super(\"Could not read type metadata.\", { cause: failure });\n }\n}\n\nconst retryDelay = (error: AndesineAPIError): number => {\n const header = error.response.headers.get(\"retry-after\");\n\n if (!header) return 0;\n\n const seconds = Number(header);\n const delay = Number.isFinite(seconds) ? seconds * 1000 : Date.parse(header) - Date.now();\n\n return Number.isFinite(delay) ? Math.max(0, delay) : 0;\n};\n\n/** Refresh credentials between polls and read the selected public metadata endpoint. */\nconst readMetadata = async (context: CommandContext, types: TypesConfig): Promise<TypeMetadata> => {\n const { config, signal } = context;\n\n if (process.env.ANDESINE_API_KEY === undefined && !config.workspaceID) {\n throw new CLIError(\n \"No workspace selected. Run andesine init, pass --workspace <id>, or set ANDESINE_WORKSPACE_ID.\",\n exitCodes.usage\n );\n }\n\n const { client } = await authenticatedClient(context);\n const input = {\n collections: types.collections,\n includeEntries: types.includeEntryIDs || types.includeEntryPaths || types.includeTree,\n includeTree: types.includeTree\n };\n const request = { signal, retries: 0 };\n\n let metadata: TypeMetadata;\n\n try {\n metadata =\n types.source.kind === \"current\"\n ? await client.typeMetadata.getCurrent(input, request)\n : await client.typeMetadata.getPublished(\n {\n ...input,\n ...(\"snapshotID\" in types.source\n ? { snapshotID: types.source.snapshotID }\n : { channel: types.source.channel })\n },\n request\n );\n } catch (error) {\n signal.throwIfAborted();\n\n const transientAPIError =\n error instanceof AndesineAPIError &&\n (error.status === 408 ||\n error.status === 429 ||\n (error.status >= 500 && error.status !== 501) ||\n error.code === \"SCHEMA_MIGRATION_IN_PROGRESS\");\n const networkError =\n error instanceof TypeError ||\n (error instanceof DOMException && error.name === \"TimeoutError\");\n\n if (transientAPIError || networkError) {\n throw new RetryableMetadataError(\n error,\n error instanceof AndesineAPIError ? retryDelay(error) : 0\n );\n }\n\n throw error;\n }\n\n if (config.workspaceID && config.workspaceID !== metadata.workspaceID) {\n throw new CLIError(\n \"The API credential returned another workspace. Check --workspace and ANDESINE_API_KEY.\"\n );\n }\n\n return metadata;\n};\n\nexport { readMetadata, RetryableMetadataError };\n","import { setTimeout } from \"node:timers/promises\";\nimport type { TypeMetadata } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { reportAPIError } from \"../api/errors\";\nimport { generateTypes } from \"./generate\";\nimport { readTypesFile, writeTypesFile } from \"./file\";\nimport { readMetadata, RetryableMetadataError } from \"./metadata\";\nimport { resolveTypes, type GenerateOptions } from \"./options\";\n\ninterface GenerationResult {\n outputPath: string;\n workspaceID: string;\n source: TypeMetadata[\"source\"];\n fingerprint: string;\n status: \"generated\" | \"unchanged\" | \"current\" | \"stale\";\n}\ninterface GenerationCache {\n fingerprint: string;\n source: string;\n}\n\n/** Generate, check, or watch using the same metadata and output comparison. */\nconst executeTypes = async (\n context: CommandContext,\n options: GenerateOptions = {},\n emitResult = true\n): Promise<GenerationResult> => {\n const { output, signal } = context;\n const types = resolveTypes(context.config, options);\n const interval = Number(options.interval ?? \"10\") * 1000;\n\n if (options.check && (options.watch || options.force)) {\n throw new CLIError(\"--check cannot be combined with --watch or --force.\", exitCodes.usage);\n }\n\n if (options.interval !== undefined && !options.watch) {\n throw new CLIError(\"--interval requires --watch.\", exitCodes.usage);\n }\n\n if (!Number.isFinite(interval) || interval < 1000 || interval > 300_000) {\n throw new CLIError(\"--interval must be between 1 and 300 seconds.\", exitCodes.usage);\n }\n\n let cache: GenerationCache | undefined;\n let first = true;\n let failures = 0;\n let previousFailure: string | undefined;\n let force = options.force;\n\n const run = async (): Promise<GenerationResult> => {\n const expected = await readTypesFile(types.output);\n const metadata = await readMetadata(context, types);\n const source =\n cache?.fingerprint === metadata.fingerprint ? cache.source : generateTypes(metadata, types);\n const changed = options.check\n ? (await readTypesFile(types.output)) !== source\n : await writeTypesFile(types.output, source, expected, signal, force);\n\n signal.throwIfAborted();\n cache = { fingerprint: metadata.fingerprint, source };\n force = false;\n\n return {\n outputPath: types.output,\n workspaceID: metadata.workspaceID,\n source: metadata.source,\n fingerprint: metadata.fingerprint,\n status: options.check ? (changed ? \"stale\" : \"current\") : changed ? \"generated\" : \"unchanged\"\n };\n };\n\n await output.heading(\n `Andesine · ${options.check ? \"Check\" : options.watch ? \"Watch\" : \"Generate\"} content types`\n );\n await output.note(\"Type generation\", {\n Source: JSON.stringify(types.source),\n Collections: types.collections.join(\", \") || \"All accessible collections\",\n Output: types.output\n });\n\n if (options.watch) {\n await output.diagnostic(`Watching every ${interval / 1000}s. Press Ctrl+C to stop.`);\n }\n\n while (true) {\n let delay = interval;\n\n signal.throwIfAborted();\n\n try {\n const result = first\n ? await output.progress(\"Reading metadata and generating types\", run, \"Types checked\")\n : await run();\n const recovered = failures > 0;\n\n if (first || recovered || result.status === \"generated\") {\n if (recovered) await output.success(\"Metadata access restored.\");\n\n if (result.status === \"stale\") {\n await output.warning(\"Generated types are missing or out of date.\");\n } else {\n await output.success(\n result.status === \"generated\" ? \"Types generated.\" : \"Types are up to date.\"\n );\n }\n\n if (emitResult) await output.json(result);\n }\n\n if (result.status === \"stale\") {\n throw new CLIError(\n \"Run andesine types generate to update the types file.\",\n exitCodes.stale\n );\n }\n\n if (!options.watch) return result;\n\n first = false;\n failures = 0;\n previousFailure = undefined;\n } catch (error) {\n signal.throwIfAborted();\n\n if (!options.watch || !(error instanceof RetryableMetadataError)) {\n return reportAPIError(\n context,\n error instanceof RetryableMetadataError ? error.failure : error\n );\n }\n\n failures += 1;\n delay = Math.max(\n Math.min(interval * 2 ** Math.min(failures, 10), 60_000),\n interval,\n error.retryAfter\n );\n\n // Report the first failure and each changed error, then stay quiet until recovery.\n try {\n const message =\n error.failure instanceof Error ? error.failure.message : \"Metadata read failed.\";\n\n if (message !== previousFailure) {\n previousFailure = message;\n await reportAPIError(context, error.failure);\n }\n } catch (failure) {\n signal.throwIfAborted();\n\n const message = failure instanceof Error ? failure.message : \"Metadata read failed.\";\n\n await output.warning(\n `${message} Keeping the last types file. Retrying in ${Math.ceil(delay / 1000)}s.`\n );\n }\n\n first = false;\n }\n\n await setTimeout(Math.min(delay, 2_147_483_647), undefined, { signal });\n }\n};\n\nexport { executeTypes };\nexport type { GenerationResult };\n","import { confirm, select } from \"@clack/prompts\";\nimport { createCommandContext, type CommandContext } from \"../context\";\nimport { authenticatedClient, identity } from \"../auth/client\";\nimport { login } from \"../auth/login\";\nimport { readConfigFile } from \"../config/files\";\nimport { projectConfigSchema, typesConfigSchema, type ProjectConfig } from \"../config/schema\";\nimport { CancelledError, CLIError, exitCodes } from \"../errors\";\nimport { canPrompt } from \"../prompts\";\nimport { validateCollections } from \"../content/collections\";\nimport { selectTypes } from \"./choices\";\nimport { readProjectFile, writeProjectConfig } from \"./write-config\";\nimport type { InitOptions } from \"./options\";\nimport { validateTypeOptions } from \"../types/options\";\nimport { executeTypes } from \"../types/execute\";\nimport path from \"node:path\";\n\nconst selectWorkspace = async (context: CommandContext, interactive: boolean): Promise<string> => {\n const { client } = await authenticatedClient(context);\n const account = await context.output.progress(\n \"Checking your account\",\n () => identity(client, context.signal),\n \"Account verified\"\n );\n const configured = context.config.workspaceID;\n\n if (account.type === \"key\") {\n if (configured && configured !== account.workspaceID) {\n throw new CLIError(\n \"This API key belongs to another workspace. Change --workspace or ANDESINE_API_KEY.\"\n );\n }\n\n await context.output.note(\"API key\", {\n Instance: context.config.baseURL,\n Workspace: account.workspaceID\n });\n return account.workspaceID;\n }\n\n await context.output.note(\"Account\", {\n Instance: context.config.baseURL,\n Email: account.user.email,\n Profile: context.config.profileName\n });\n\n const workspaces = await context.output.progress(\n \"Loading workspaces\",\n () => client.workspaces.list(undefined, { signal: context.signal }),\n \"Workspaces loaded\"\n );\n\n if (configured && !workspaces.some((workspace) => workspace.id === configured)) {\n throw new CLIError(\n \"The selected workspace is not available to this account. Use --workspace with an accessible workspace ID.\",\n exitCodes.usage\n );\n }\n\n if (!workspaces.length) {\n throw new CLIError(\"No workspaces are available. Create a workspace in Andesine first.\");\n }\n if (!interactive && configured) return configured;\n if (workspaces.length === 1) return workspaces[0].id;\n\n if (!interactive) {\n throw new CLIError(\n \"Several workspaces are available. Supply --workspace <id> or run init in an interactive terminal.\",\n exitCodes.usage\n );\n }\n\n return context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"Workspace\",\n initialValue: configured,\n options: workspaces.map((workspace) => ({\n value: workspace.id,\n label: workspace.name,\n hint: workspace.id\n }))\n })\n );\n};\n\nconst describeConfig = (config: ProjectConfig): Record<string, string | undefined> => ({\n \"Instance\": config.baseURL,\n \"Workspace\": config.workspaceID,\n \"Profile\": config.profile,\n \"Source\": config.types ? JSON.stringify(config.types.source) : undefined,\n \"Collections\": config.types\n ? config.types.collections.join(\", \") || \"All accessible collections\"\n : undefined,\n \"Output\": config.types?.output,\n \"Entry IDs\": config.types ? String(config.types.includeEntryIDs) : undefined,\n \"Entry paths\": config.types ? String(config.types.includeEntryPaths) : undefined,\n \"Exact tree\": config.types ? String(config.types.includeTree) : undefined\n});\n\n/** Configure a project through the public API; never save credentials in the project. */\nconst init = async (options: InitOptions, signal: AbortSignal): Promise<void> => {\n const interactive = canPrompt(options.interactive);\n\n validateTypeOptions(options);\n\n let context = await createCommandContext(options, signal, {\n allowNewProfile: true,\n allowMissingConfig: true\n });\n\n const explicitPath = options.config ?? process.env.ANDESINE_CONFIG;\n const explicitProfile = options.profile ?? process.env.ANDESINE_PROFILE;\n const file = path.resolve(explicitPath ?? context.config.configPath ?? \"andesine.json\");\n const original = await readProjectFile(file);\n const previous = await readConfigFile(file, projectConfigSchema, true);\n\n await context.output.heading(\"Andesine · Initialize project\");\n\n const needsLogin =\n process.env.ANDESINE_API_KEY === undefined && !context.config.profile?.credentialRef;\n\n if (needsLogin) {\n if (!interactive) {\n throw new CLIError(\n \"Sign in with andesine auth login or set ANDESINE_API_KEY before running init non-interactively.\",\n exitCodes.usage\n );\n }\n\n const approved = await context.prompt((prompt) =>\n confirm({ ...prompt, message: `Sign in to ${context.config.baseURL}?`, initialValue: true })\n );\n\n if (!approved) throw new CancelledError();\n\n await login(context, options, false);\n context = await createCommandContext(options, signal, { allowMissingConfig: true });\n }\n\n const workspaceID = await selectWorkspace(\n context,\n interactive && options.workspace === undefined\n );\n const scopedContext = { ...context, config: { ...context.config, workspaceID } };\n const { client } = await authenticatedClient(scopedContext);\n const types = await selectTypes(\n scopedContext,\n client,\n options,\n previous?.types ?? typesConfigSchema.parse({})\n );\n\n await context.output.progress(\n \"Validating the selected content\",\n () => validateCollections(client, types.source, types.collections, signal),\n \"Content selection verified\"\n );\n\n const config: ProjectConfig = {\n ...previous,\n $schema:\n previous?.$schema ??\n path\n .relative(path.dirname(file), path.resolve(\"node_modules/andesine/dist/config.schema.json\"))\n .split(path.sep)\n .join(\"/\"),\n version: 1,\n baseURL: context.config.baseURL,\n workspaceID,\n ...(explicitProfile !== undefined ? { profile: explicitProfile } : {}),\n types\n };\n const details = describeConfig(config);\n const previousDetails = previous ? describeConfig(previous) : undefined;\n const changes = Object.fromEntries(\n Object.entries(details)\n .filter(([label, value]) => !previousDetails || previousDetails[label] !== value)\n .map(([label, value]) => [\n label,\n previousDetails ? `${previousDetails[label] ?? \"Not set\"} → ${value ?? \"Not set\"}` : value\n ])\n );\n const unchanged = previous && JSON.stringify(previous) === JSON.stringify(config);\n\n await context.output.note(\n unchanged\n ? \"Configuration unchanged\"\n : previous\n ? \"Update configuration\"\n : \"Create configuration\",\n { File: file, ...changes }\n );\n\n if (!unchanged) {\n if (interactive && !options.yes) {\n const approved = await context.prompt((prompt) =>\n confirm({\n ...prompt,\n message: previous ? \"Save these changes?\" : \"Create this configuration?\",\n initialValue: true\n })\n );\n\n if (!approved) throw new CancelledError();\n } else if (previous && !options.yes) {\n throw new CLIError(\n \"The configuration already exists. Review the changes above and rerun with --yes to save them.\",\n exitCodes.usage\n );\n }\n\n await context.output.progress(\n \"Saving project configuration\",\n () => writeProjectConfig(file, config, original, signal),\n \"Project configuration saved\"\n );\n }\n\n await context.output.success(\n unchanged ? \"Project configuration is up to date.\" : \"Project initialized.\"\n );\n\n const generate =\n options.generate ??\n (interactive &&\n (await context.prompt((prompt) =>\n confirm({\n ...prompt,\n message: \"Generate the configured types file now?\",\n initialValue: false\n })\n )));\n const generation = generate\n ? await executeTypes(\n {\n ...scopedContext,\n config: {\n ...scopedContext.config,\n configPath: file,\n types: { ...types, output: path.resolve(path.dirname(file), types.output) }\n }\n },\n {},\n false\n )\n : undefined;\n\n await context.output.json({\n configured: true,\n changed: !unchanged,\n configPath: file,\n baseURL: config.baseURL,\n workspaceID,\n ...(generation ? { generation } : {})\n });\n};\n\nexport { init };\n","/* eslint-disable max-lines */\n// Generated from SDK openapi.json. Do not edit.\nimport type { APICommand, JSONSchema } from \"./types\";\n\nconst commands: APICommand[] = [\n {\n id: \"assets.attach\",\n group: \"assets\",\n command: \"attach\",\n method: \"post\",\n path: \"/assets/{assetID}/attachments\",\n summary: \"Attach an asset\",\n description:\n \"Attaches a ready image to an entry. This does not insert an image node into the document.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"assets.get\",\n group: \"assets\",\n command: \"get\",\n method: \"get\",\n path: \"/assets/{assetID}\",\n summary: \"Get asset status and details\",\n description:\n \"Returns image metadata, processing status, and available files. Supply entryID when checking access through an entry.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.importURL\",\n group: \"assets\",\n command: \"import-url\",\n method: \"post\",\n path: \"/assets/imports\",\n summary: \"Import an image URL\",\n description:\n \"Downloads a remote image and starts processing it for the entry. With checkDuplicates, can return an existing image instead. Use assets.get to check processing status.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\",\n url: \"https://example.com/image.png\",\n checkDuplicates: true\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"assetID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"url\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 4096,\n format: \"uri\"\n },\n flag: \"url\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"checkDuplicates\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false\n },\n flag: \"check-duplicates\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.register\",\n group: \"assets\",\n command: \"register\",\n method: \"post\",\n path: \"/assets/uploads\",\n summary: \"Register an image upload\",\n description:\n \"Reserves an image upload for an entry. Supply the byte count and lowercase SHA-256 checksum of the file. Call assets.upload before expiresAt, then use assets.get to check processing status.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\",\n filename: \"image.png\",\n byteSize: 1024,\n checksum: \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"assetID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filename\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 255\n },\n flag: \"filename\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"byteSize\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 10485760\n },\n flag: \"byte-size\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"checksum\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^[a-f0-9]{64}$\",\n description: \"SHA-256 of the file bytes, verified by the backend and worker\"\n },\n flag: \"checksum\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.search\",\n group: \"assets\",\n command: \"search\",\n method: \"get\",\n path: \"/assets/search\",\n summary: \"Search assets\",\n description:\n \"Finds workspace images by text or SHA-256 checksum. Semantic search defaults to true. Returns up to 50 results.\\n\\nRequired API key permissions: read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n query: \"mountains\",\n limit: 10\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"query\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 500,\n default: \"\"\n },\n flag: \"query\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"checksum\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f0-9]{64}$\"\n },\n flag: \"checksum\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"semantic\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n default: true\n },\n flag: \"semantic\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n default: 24\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.upload\",\n group: \"assets\",\n command: \"upload\",\n method: \"put\",\n path: \"/assets/{assetID}/upload\",\n summary: \"Upload registered image bytes\",\n description:\n \"Uploads a file for a registered asset with multipart/form-data. The bytes must match the registered size and checksum. Processing continues after the upload; use assets.get to check status.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n file: \"<binary file>\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"file\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n contentMediaType: \"*/*\"\n },\n flag: \"file\",\n kind: \"file\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"auth.getIdentity\",\n group: \"auth\",\n command: \"get-identity\",\n method: \"get\",\n path: \"/identity\",\n summary: \"Get credential identity\",\n description:\n \"Returns the authenticated user for OAuth or browser credentials, or the key and workspace IDs for an API key. Does not require a workspace selection and does not count toward API usage.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"collections.bulkDelete\",\n group: \"collections\",\n command: \"bulk-delete\",\n method: \"post\",\n path: \"/collections/bulk/delete\",\n summary: \"Delete collection trees\",\n description:\n \"Soft-deletes the selected collections, their descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collections to delete\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"collections.create\",\n group: \"collections\",\n command: \"create\",\n method: \"post\",\n path: \"/collections\",\n summary: \"Create a collection\",\n description:\n \"Creates a child collection. Without parentID, uses the workspace root. The name defaults to Untitled. Creation selects an available sibling name with a numeric suffix when needed. Names are trimmed, NFC-normalized, case-sensitive, and shared by sibling entries and collections. Names cannot contain a slash or equal a single dot or two dots. Restricted collections require a session with restricted_collections permission and the Pro plan; API keys cannot create them.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Documentation\",\n parentID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"id\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 300,\n description: \"Name of the collection\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"parentID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the parent collection,\"\n },\n flag: \"parent-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"restricted\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to restrict access to the collection tree\"\n },\n flag: \"restricted\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"collections.delete\",\n group: \"collections\",\n command: \"delete\",\n method: \"delete\",\n path: \"/collections/{id}\",\n summary: \"Delete a collection tree\",\n description:\n \"Soft-deletes the collection, its descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection to delete\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"collections.list\",\n group: \"collections\",\n command: \"list\",\n method: \"get\",\n path: \"/collections/list\",\n summary: \"List collections\",\n description:\n \"Lists collections under the selected ancestor. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum collections to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"collections.update\",\n group: \"collections\",\n command: \"update\",\n method: \"put\",\n path: \"/collections/{id}\",\n summary: \"Rename a collection\",\n description:\n \"Updates the collection name. Rejects names already used by a sibling entry or collection. An active schema migration can block this action.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"coll_example\",\n name: \"Guides\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection to be updated\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 300,\n description: \"New name of the collection\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"content.get\",\n group: \"content\",\n command: \"get\",\n method: \"get\",\n path: \"/content/entries/get\",\n summary: \"Get published entry content\",\n description:\n \"Returns content from a publishing channel or a specific available snapshot. Use channel or snapshotID, never both. The default channel is published. Validates saved content against its recorded schema and returns schema metadata. expectedSchemaHash must match that revision; schema-less content cannot match it. Validation and hash checks run before ETag handling. Supports ETag and If-None-Match; a match returns 304 without a body.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"path\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Historical publication snapshot to read\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: true,\n response: \"json\"\n },\n {\n id: \"content.getAsset\",\n group: \"content\",\n command: \"get-asset\",\n method: \"get\",\n path: \"/content/assets/{workspaceID}/{snapshotID}/{entryID}/{assetID}/{variant}\",\n summary: \"Download a published asset\",\n description:\n \"Returns binary image data from a publication snapshot. No API key is required. The asset must belong to the entry in that available snapshot. Use the asset URLs returned with published content.\",\n example: {\n workspaceID: \"ws_example\",\n snapshotID: \"snp_example\",\n entryID: \"ent_example\",\n assetID: \"ast_example\",\n variant: \"display\"\n },\n security: [],\n fields: [\n {\n name: \"workspaceID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ws_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"variant\",\n location: \"path\",\n required: true,\n schema: {\n enum: [\"thumbnail\", \"display\"],\n type: \"string\"\n },\n flag: \"variant\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"binary\"\n },\n {\n id: \"content.getSchema\",\n group: \"content\",\n command: \"get-schema\",\n method: \"get\",\n path: \"/content/entries/schema\",\n summary: \"Get a published entry schema\",\n description:\n \"Returns the exact recorded effective schema, or null for schema-less content. Uses the same publication access as content.get. Pass its snapshotID for a consistent read; use channel or snapshotID, not both.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"path\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"content.getTree\",\n group: \"content\",\n command: \"get-tree\",\n method: \"get\",\n path: \"/content/tree\",\n summary: \"Get a published collection tree\",\n description:\n \"Returns a published collection tree and its snapshot ID. Use channel or snapshotID, never both. The default channel is published. Reuse the snapshot ID for consistent content reads. Supports ETag and If-None-Match; a match returns 304 without a body.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Historical publication snapshot to read\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: true,\n response: \"json\"\n },\n {\n id: \"content.listCollections\",\n group: \"content\",\n command: \"list-collections\",\n method: \"get\",\n path: \"/content/collections\",\n summary: \"List published collections\",\n description:\n \"Returns a flat page of collections from a publication snapshot. The default channel is published. On later pages, pass the returned snapshotID and pagination.nextCursor, and omit channel. Optionally select direct children using collectionID or collectionPath. Results are ordered by ID, not display order.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"snapshot\"\n },\n {\n id: \"content.listEntries\",\n group: \"content\",\n command: \"list-entries\",\n method: \"get\",\n path: \"/content/entries\",\n summary: \"List published entries\",\n description:\n \"Returns a flat page of entries from a publication snapshot. The default channel is published. On later pages, pass the returned snapshotID and pagination.nextCursor, and omit channel. Select direct children using collectionID or collectionPath, or include nested entries with descendants: true. descendants requires a collection scope. All property filters must match the assigned version. includeContent: true returns validated full content, properties, fragments, assets, and recorded schema metadata. An invalid full item fails the page. Keep the same scope and filters across pages. Results are ordered by ID, not display order.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"descendants\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false\n },\n flag: \"descendants\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"includeContent\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false\n },\n flag: \"include-content\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"query\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"snapshot\"\n },\n {\n id: \"entries.bulkDelete\",\n group: \"entries\",\n command: \"bulk-delete\",\n method: \"post\",\n path: \"/entries/bulk/delete\",\n summary: \"Delete entries\",\n description:\n \"Soft-deletes the selected entries and clears current-entry selections for affected members. An active schema migration can block this action.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"ent_example\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the entries to delete\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"entries.create\",\n group: \"entries\",\n command: \"create\",\n method: \"post\",\n path: \"/entries\",\n summary: \"Create an entry\",\n description:\n \"Creates an entry and its initial document. The name defaults to Untitled. Creation selects an available sibling name with a numeric suffix when needed. Names are trimmed, NFC-normalized, case-sensitive, and shared by sibling entries and collections. Names cannot contain a slash or equal a single dot or two dots. A collection schema can set the initial content.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Getting started\",\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"id\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 300,\n description: \"Name of the entry\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection this entry belongs to\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"entries.delete\",\n group: \"entries\",\n command: \"delete\",\n method: \"delete\",\n path: \"/entries/{id}\",\n summary: \"Delete an entry\",\n description:\n \"Soft-deletes the entry and clears current-entry selections for affected members. An active schema migration can block this action.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry to delete\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"entries.get\",\n group: \"entries\",\n command: \"get\",\n method: \"get\",\n path: \"/entries/get\",\n summary: \"Get an entry\",\n description:\n \"Returns current entry details, fragments, properties, and recorded schema metadata. Validates content without changing it. expectedSchemaHash must match the recorded schema; schema-less content cannot match it. Use content.get to read published content.\\n\\nRequired API key permissions: read:entries. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"path\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"entries.list\",\n group: \"entries\",\n command: \"list\",\n method: \"get\",\n path: \"/entries/list\",\n summary: \"List entries\",\n description:\n \"Lists entries in the selected collection, or all accessible entries when collectionID is omitted. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100 and defaults to 50.\\n\\nRequired API key permissions: read:entries. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum entries to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"entries.update\",\n group: \"entries\",\n command: \"update\",\n method: \"put\",\n path: \"/entries/{id}\",\n summary: \"Rename an entry\",\n description:\n \"Updates the entry name. Rejects names already used by a sibling entry or collection. An active schema migration can block this action.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ent_example\",\n name: \"Installation\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry to be updated\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 300,\n description: \"New name of the entry\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"instance.get\",\n group: \"instance\",\n command: \"get\",\n method: \"get\",\n path: \"/instance\",\n summary: \"Get instance capabilities and limits\",\n description:\n \"Returns configured features and effective limits for the authenticated workspace. These values do not grant permissions or report live service health. No discovery request is made automatically by the SDK.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"memberships.invite\",\n group: \"memberships\",\n command: \"invite\",\n method: \"post\",\n path: \"/memberships\",\n summary: \"Invite a workspace member\",\n description:\n \"Creates an invitation and attempts email delivery. Check emailDelivery in the result. Requires the Pro plan and permission to delegate the selected role. Existing membership or pending invitation returns a conflict.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n email: \"editor@example.com\",\n roleID: \"rl_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"email\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n format: \"email\",\n description: \"Email address of the user to invite\"\n },\n flag: \"email\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"roleID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the role to assign\"\n },\n flag: \"role-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"memberships.list\",\n group: \"memberships\",\n command: \"list\",\n method: \"get\",\n path: \"/memberships\",\n summary: \"List workspace members\",\n description:\n \"Lists workspace memberships with role and user details. Use pagination.nextCursor to continue with the same filters; concurrent changes can affect later pages.\\n\\nRequired API key permissions: read:memberships. Write permissions also grant read access for the same resource.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"memberships.listInvites\",\n group: \"memberships\",\n command: \"list-invites\",\n method: \"get\",\n path: \"/memberships/invites\",\n summary: \"List invitations\",\n description:\n \"Lists pending, unexpired workspace invitations. Use pagination.nextCursor to continue. Requires the Pro plan.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"memberships.remove\",\n group: \"memberships\",\n command: \"remove\",\n method: \"delete\",\n path: \"/memberships/{id}\",\n summary: \"Remove a workspace member\",\n description:\n \"Removes the membership and its workspace access. Administrator memberships have additional restrictions.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ms_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the membership to remove\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"memberships.resendInvite\",\n group: \"memberships\",\n command: \"resend-invite\",\n method: \"post\",\n path: \"/memberships/invites/{id}/resend\",\n summary: \"Resend an invitation\",\n description:\n \"Attempts email delivery again for a pending invitation. Check emailDelivery in the result. Requires the Pro plan.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"inv_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the pending invitation\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"memberships.revokeInvite\",\n group: \"memberships\",\n command: \"revoke-invite\",\n method: \"delete\",\n path: \"/memberships/invites/{id}\",\n summary: \"Revoke an invitation\",\n description:\n \"Revokes a pending invitation so it can no longer be accepted. Requires the Pro plan.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"inv_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the invite to revoke\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"memberships.update\",\n group: \"memberships\",\n command: \"update\",\n method: \"patch\",\n path: \"/memberships/{id}\",\n summary: \"Change a member role\",\n description:\n \"Assigns a new role to a member. Requires the Pro plan and permission to delegate that role. Administrator assignments have additional restrictions.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ms_example\",\n roleID: \"rl_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the membership to update\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"roleID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"New role ID\"\n },\n flag: \"role-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.bulkPublishCollections\",\n group: \"publishing\",\n command: \"bulk-publish-collections\",\n method: \"post\",\n path: \"/publishing/collections/bulk/publish\",\n summary: \"Publish collection trees\",\n description:\n \"Publishes the latest entry versions in the selected publishing-enabled collection trees. At least one ID is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collection trees to publish\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.bulkPublishEntries\",\n group: \"publishing\",\n command: \"bulk-publish-entries\",\n method: \"post\",\n path: \"/publishing/entries/bulk/publish\",\n summary: \"Publish entries\",\n description:\n \"Publishes the selected entries with optional version IDs. Entries must be in publishing-enabled collections. At least one entry is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entries: [\n {\n entryID: \"ent_example\"\n }\n ],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entries\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n $ref: \"#/components/schemas/PublishEntryTarget\"\n },\n description: \"Entries and versions to publish\"\n },\n flag: \"entries\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.bulkSetCollections\",\n group: \"publishing\",\n command: \"bulk-set-collections\",\n method: \"post\",\n path: \"/publishing/collections/bulk/set\",\n summary: \"Configure publishing for collections\",\n description:\n \"Enables publishing for the selected collections, or disables it and unpublishes their trees from all channels. When enabling, publish can also publish the latest entry versions.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"],\n enabled: true,\n publish: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collections to configure\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"expectedSnapshots\",\n location: \"body\",\n required: false,\n schema: {\n type: \"object\",\n propertyNames: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n additionalProperties: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n description:\n \"Optional snapshot checks for supplied channels before changing collection publishing. Omitted channels are not checked.\"\n },\n flag: \"expected-snapshots\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: true,\n schema: {\n type: \"boolean\",\n description:\n \"Enable publishing, or disable and unpublish the collection trees from all channels\"\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"publish\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to publish latest entry versions when enabling publishing\"\n },\n flag: \"publish\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.bulkUnpublishCollections\",\n group: \"publishing\",\n command: \"bulk-unpublish-collections\",\n method: \"post\",\n path: \"/publishing/collections/bulk/unpublish\",\n summary: \"Unpublish collection trees\",\n description:\n \"Removes publication assignments for the selected collection trees from the channel. At least one ID is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collection trees to unpublish\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.bulkUnpublishEntries\",\n group: \"publishing\",\n command: \"bulk-unpublish-entries\",\n method: \"post\",\n path: \"/publishing/entries/bulk/unpublish\",\n summary: \"Unpublish entries\",\n description:\n \"Removes publication assignments for the selected entries from the channel. At least one ID is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"ent_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the entries to unpublish\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.createChannel\",\n group: \"publishing\",\n command: \"create-channel\",\n method: \"post\",\n path: \"/publishing/channels\",\n summary: \"Create a publishing channel\",\n description:\n \"Creates a publishing channel from its display name and returns the generated channel code.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Preview\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel label\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.deleteChannel\",\n group: \"publishing\",\n command: \"delete-channel\",\n method: \"delete\",\n path: \"/publishing/channels/{code}\",\n summary: \"Delete a publishing channel\",\n description:\n \"Deletes a custom channel and its publication assignments. The default published channel cannot be deleted.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n code: \"preview\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"code\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel identifier\"\n },\n flag: \"code\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Reject deletion if the channel snapshot changed\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.getChannelContent\",\n group: \"publishing\",\n command: \"get-channel-content\",\n method: \"get\",\n path: \"/publishing/channels/{channel}/content\",\n summary: \"Get channel content and pending changes\",\n description:\n \"Returns publication state and pending changes for a publishing root, with the snapshot ID needed to review and revert changes.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"channel\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"query\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Publishing root collection whose content to list\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.getEntryVersion\",\n group: \"publishing\",\n command: \"get-entry-version\",\n method: \"get\",\n path: \"/publishing/entries/{entryID}/version\",\n summary: \"Get a published entry version\",\n description:\n \"Returns the entry version assigned to a channel, or to an explicit available snapshot, with its recorded schema metadata. Validates content against that revision. expectedSchemaHash must match it; schema-less content cannot match it. The default channel is published.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry whose published version to get\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Exact publication snapshot to read\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.listChannels\",\n group: \"publishing\",\n command: \"list-channels\",\n method: \"get\",\n path: \"/publishing/channels\",\n summary: \"List publishing channels\",\n description:\n \"Returns workspace publishing channels. Set includeAssignmentCount to include entry assignment counts.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n includeAssignmentCount: true\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"includeAssignmentCount\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to include the number of assigned entries\"\n },\n flag: \"include-assignment-count\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.listEntryPublications\",\n group: \"publishing\",\n command: \"list-entry-publications\",\n method: \"get\",\n path: \"/publishing/entries/{entryID}/publications\",\n summary: \"List entry publications\",\n description:\n \"Returns the entry publication assignments across channels.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry whose publications to list\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.publishCollection\",\n group: \"publishing\",\n command: \"publish-collection\",\n method: \"post\",\n path: \"/publishing/collections/{collectionID}\",\n summary: \"Publish a collection tree\",\n description:\n \"Publishes the latest entry versions in a publishing-enabled collection tree to the channel. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Collection tree to publish\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.publishEntry\",\n group: \"publishing\",\n command: \"publish-entry\",\n method: \"post\",\n path: \"/publishing/entries/{entryID}\",\n summary: \"Publish an entry\",\n description:\n \"Publishes an existing version, or the latest entry content if versionID is omitted. The entry must be in a publishing-enabled collection. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry to publish\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"versionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Existing version to publish\"\n },\n flag: \"version-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.revertChanges\",\n group: \"publishing\",\n command: \"revert-changes\",\n method: \"post\",\n path: \"/publishing/changes/revert\",\n summary: \"Revert pending publishing changes\",\n description:\n \"Restores selected drafts to the reviewed publication snapshot. This can remove unpublished items and replace draft content. First review publishing.getChannelContent and pass its snapshotID. Use all: true or specific collectionIDs/entryIDs, never both. Requires write access to affected resources in addition to read:publishing.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n snapshotID: \"snp_example\",\n entryIDs: [\"ent_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"all\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to revert all pending changes\"\n },\n flag: \"all\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Publishing root collection\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionIDs\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"Collections whose changes to revert\"\n },\n flag: \"collection-ids\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"entryIDs\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"Entries whose changes to revert\"\n },\n flag: \"entry-ids\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Snapshot used to review the changes\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.setCollection\",\n group: \"publishing\",\n command: \"set-collection\",\n method: \"put\",\n path: \"/publishing/collections/{collectionID}\",\n summary: \"Configure collection publishing\",\n description:\n \"Enables publishing for a collection, or disables it and unpublishes its tree from all channels. When enabling, publish can also publish the latest entry versions.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n enabled: true,\n publish: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Collection to configure\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshots\",\n location: \"body\",\n required: false,\n schema: {\n type: \"object\",\n propertyNames: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n additionalProperties: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n description:\n \"Optional snapshot checks for supplied channels before changing collection publishing. Omitted channels are not checked.\"\n },\n flag: \"expected-snapshots\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: true,\n schema: {\n type: \"boolean\",\n description:\n \"Enable publishing, or disable and unpublish the collection tree from all channels\"\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"publish\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to publish latest entry versions when enabling publishing\"\n },\n flag: \"publish\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.unpublishCollection\",\n group: \"publishing\",\n command: \"unpublish-collection\",\n method: \"delete\",\n path: \"/publishing/collections/{collectionID}\",\n summary: \"Unpublish a collection tree\",\n description:\n \"Removes publication assignments for a collection tree from the channel. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Collection tree to unpublish\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.unpublishEntry\",\n group: \"publishing\",\n command: \"unpublish-entry\",\n method: \"delete\",\n path: \"/publishing/entries/{entryID}\",\n summary: \"Unpublish an entry\",\n description:\n \"Removes the entry publication from the channel. Supply versionID to require that version to be assigned; a changed assignment returns a conflict. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\",\n versionID: \"ver_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry to unpublish\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"versionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Version expected to be assigned\"\n },\n flag: \"version-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"roles.create\",\n group: \"roles\",\n command: \"create\",\n method: \"post\",\n path: \"/roles\",\n summary: \"Create a role\",\n description:\n \"Creates a workspace role. Names are unique without regard to case and must contain 1 to 50 characters after trimming. Requires the Pro plan and permission to delegate the selected permissions.\\n\\nRequired API key permissions: roles. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Editor\",\n permissions: [\"content\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Name of the role\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"permissions\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n items: {\n $ref: \"#/components/schemas/Permission\"\n },\n description: \"Permissions to grant to the role\"\n },\n flag: \"permissions\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"roles.delete\",\n group: \"roles\",\n command: \"delete\",\n method: \"delete\",\n path: \"/roles/{id}\",\n summary: \"Delete a role\",\n description:\n \"Deletes a custom role and updates its assignments. Built-in roles cannot be deleted. Requires the Pro plan.\\n\\nRequired API key permissions: roles. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"rl_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the role to delete\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"roles.list\",\n group: \"roles\",\n command: \"list\",\n method: \"get\",\n path: \"/roles\",\n summary: \"List roles\",\n description:\n \"Returns workspace roles and their permissions.\\n\\nRequired API key permissions: read:roles. Write permissions also grant read access for the same resource.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"roles.update\",\n group: \"roles\",\n command: \"update\",\n method: \"put\",\n path: \"/roles/{id}\",\n summary: \"Update a role\",\n description:\n \"Changes a role name or permissions. Names are unique without regard to case. Requires the Pro plan and permission to delegate the selected permissions. Built-in roles have additional restrictions.\\n\\nRequired API key permissions: roles. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"rl_example\",\n name: \"Content editor\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the role to update\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"New name for the role\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"permissions\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n items: {\n $ref: \"#/components/schemas/Permission\"\n },\n description: \"New permissions for the role\"\n },\n flag: \"permissions\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"schemaMigrations.get\",\n group: \"schema-migrations\",\n command: \"get\",\n method: \"get\",\n path: \"/schema-migrations/{id}\",\n summary: \"Get schema migration status\",\n description:\n \"Returns bounded migration progress and status. Use schemaMigrations.listContentLossEntries for per-entry content loss details. Check status before repeating an operation blocked by this migration.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"smg_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema migration\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaMigrations.getActive\",\n group: \"schema-migrations\",\n command: \"get-active\",\n method: \"get\",\n path: \"/collections/{collectionID}/schema-migration\",\n summary: \"Get the active schema migration\",\n description:\n \"Returns the active migration for a collection, or null when none is active.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the affected collection\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaMigrations.listContentLossEntries\",\n group: \"schema-migrations\",\n command: \"list-content-loss-entries\",\n method: \"get\",\n path: \"/schema-migrations/{id}/content-loss-entries\",\n summary: \"List entries with migration content loss\",\n description:\n \"Lists accessible, non-deleted entries that lost content in a completed migration. Returns an empty page until completion. Use pagination.nextCursor to continue.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"smg_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"schemas.apply\",\n group: \"schemas\",\n command: \"apply\",\n method: \"post\",\n path: \"/schemas/{schemaID}/apply\",\n summary: \"Apply a schema draft\",\n description:\n \"Creates a schema version from the draft and starts any required migration of affected entry content. Review possible content removal before calling: confirmedDataLoss must be true. Use schemaMigrations.get to follow a returned migrationID.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n schemaID: \"sch_example\",\n confirmedDataLoss: true,\n name: \"Reviewed schema\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"schemaID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the local collection schema\"\n },\n flag: \"schema-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"confirmedDataLoss\",\n location: \"body\",\n required: true,\n schema: {\n const: true,\n description: \"Confirmation that the migration can remove entry content\"\n },\n flag: \"confirmed-data-loss\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Optional version name\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.create\",\n group: \"schemas\",\n command: \"create\",\n method: \"post\",\n path: \"/collections/{collectionID}/schema\",\n summary: \"Create a local collection schema\",\n description:\n \"Creates a local schema draft for the collection. Use schemas.get to inspect local and effective schemas.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.delete\",\n group: \"schemas\",\n command: \"delete\",\n method: \"delete\",\n path: \"/schemas/{schemaID}\",\n summary: \"Delete a local schema\",\n description:\n \"Removes the local schema and recalculates inherited schemas. This can start a content migration. Review possible content removal before setting confirmedDataLoss. Use schemaMigrations.get with a returned migrationID.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n schemaID: \"sch_example\",\n confirmedDataLoss: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"schemaID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the local collection schema\"\n },\n flag: \"schema-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"confirmedDataLoss\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Confirmation that an inherited-schema migration can remove entry content\"\n },\n flag: \"confirmed-data-loss\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.get\",\n group: \"schemas\",\n command: \"get\",\n method: \"get\",\n path: \"/schemas/collection\",\n summary: \"Get collection schemas\",\n description:\n \"Returns local and effective schema details for the collection, including inheritance.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.getRevision\",\n group: \"schemas\",\n command: \"get-revision\",\n method: \"get\",\n path: \"/schema-revisions/{revisionID}\",\n summary: \"Get an exact schema revision\",\n description:\n \"Returns the recorded effective definition, including inherited fields. Requires read access to the revision's collection. The definition is independent of the currently active schema.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n revisionID: \"schr_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"revisionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^schr_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"revision-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaVersions.get\",\n group: \"schema-versions\",\n command: \"get\",\n method: \"get\",\n path: \"/schema-versions/{id}\",\n summary: \"Get a schema version\",\n description:\n \"Returns a saved schema version and its definition.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"schv_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema version\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaVersions.list\",\n group: \"schema-versions\",\n command: \"list\",\n method: \"get\",\n path: \"/schemas/{schemaID}/versions\",\n summary: \"List schema versions\",\n description:\n \"Lists versions of a local collection schema. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n schemaID: \"sch_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"schemaID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the local collection schema\"\n },\n flag: \"schema-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum versions to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"schemaVersions.revert\",\n group: \"schema-versions\",\n command: \"revert\",\n method: \"post\",\n path: \"/schema-versions/{id}/revert\",\n summary: \"Restore a schema version\",\n description:\n \"Restores the selected definition and starts any required content migration. Review possible content removal before calling: confirmedDataLoss must be true. Use schemaMigrations.get to follow a returned migrationID.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"schv_example\",\n confirmedDataLoss: true\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema version to restore\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"confirmedDataLoss\",\n location: \"body\",\n required: true,\n schema: {\n const: true,\n description: \"Confirmation that the migration can remove entry content\"\n },\n flag: \"confirmed-data-loss\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Optional version name\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaVersions.update\",\n group: \"schema-versions\",\n command: \"update\",\n method: \"patch\",\n path: \"/schema-versions/{id}\",\n summary: \"Rename a schema version\",\n description:\n \"Changes the saved version name. Set name to null to remove the name.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"schv_example\",\n name: \"Reviewed schema\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema version\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n anyOf: [\n {\n type: \"string\",\n minLength: 1,\n maxLength: 100\n },\n {\n type: \"null\"\n }\n ],\n description: \"New version name, or null to remove it\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: true\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"search.askCurrent\",\n group: \"search\",\n command: \"ask-current\",\n method: \"post\",\n path: \"/search/current/ask\",\n summary: \"Ask AI about current content\",\n description:\n \"Returns a complete answer with numbered sources. Requires explicit ai-answers permission in addition to content read permissions. Accepts up to 1,000 question characters, 10 history messages of up to 4,000 characters each, and 20 property filters. Uses the existing Ask AI rate limit. Keep API keys on your server.\\n\\nRequired API key permissions: ai-answers, read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n question: \"How do I install Andesine?\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"search.askCurrentStream\",\n group: \"search\",\n command: \"ask-current-stream\",\n method: \"post\",\n path: \"/search/current/ask/stream\",\n summary: \"Stream an AI answer about current content\",\n description:\n \"Emits sources, textDelta, and completed events over SSE. Uses the same inputs, permissions, and rate limit as complete answers. Stream errors use SSE error frames. Never reconnect automatically.\\n\\nRequired API key permissions: ai-answers, read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"stream\"\n },\n {\n id: \"search.askPublished\",\n group: \"search\",\n command: \"ask-published\",\n method: \"post\",\n path: \"/search/published/ask\",\n summary: \"Ask AI about published content\",\n description:\n \"Returns a complete answer with numbered sources. Requires explicit ai-answers permission in addition to content read permissions. Accepts up to 1,000 question characters, 10 history messages of up to 4,000 characters each, and 20 property filters. Uses the existing Ask AI rate limit. Keep API keys on your server.\\n\\nRequired API key permissions: ai-answers, read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n question: \"How do I install Andesine?\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel to search\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"search.askPublishedStream\",\n group: \"search\",\n command: \"ask-published-stream\",\n method: \"post\",\n path: \"/search/published/ask/stream\",\n summary: \"Stream an AI answer about published content\",\n description:\n \"Emits sources, textDelta, and completed events over SSE. Uses the same inputs, permissions, and rate limit as complete answers. Stream errors use SSE error frames. Never reconnect automatically.\\n\\nRequired API key permissions: ai-answers, read:publishing. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel to search\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"stream\"\n },\n {\n id: \"search.current\",\n group: \"search\",\n command: \"current\",\n method: \"post\",\n path: \"/search/current\",\n summary: \"Search current content\",\n description:\n \"Searches current entry content by text and optional property filters. Up to 20 filters and 50 results are allowed. Semantic search is optional and has a separate rate limit.\\n\\nRequired API key permissions: read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n query: \"installation\",\n limit: 10\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"query\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 500\n },\n flag: \"query\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"body\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n default: 20\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"semantic\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Whether to combine keyword and vector search\"\n },\n flag: \"semantic\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"search.published\",\n group: \"search\",\n command: \"published\",\n method: \"post\",\n path: \"/search/published\",\n summary: \"Search published content\",\n description:\n \"Searches content published to the required channel. Up to 20 filters and 50 results are allowed. Semantic search is optional and has a separate rate limit.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n query: \"installation\",\n channel: \"published\",\n limit: 10\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"query\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 500\n },\n flag: \"query\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"body\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n default: 20\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"semantic\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Whether to combine keyword and vector search\"\n },\n flag: \"semantic\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel to search\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"typeMetadata.getCurrent\",\n group: \"type-metadata\",\n command: \"get-current\",\n method: \"post\",\n path: \"/type-metadata/current\",\n summary: \"Get current content type metadata\",\n description:\n \"Read-only bulk metadata for type generation. Returns one consistent database snapshot of accessible collections and their active effective schemas, including inheritance. Optional entry/tree data requires read:entries in addition to read:collections. Explicit unavailable collection selectors fail. Active schema migrations in the selected collections return a conflict. No entry content is loaded. Schema-free collections use general types without warnings.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collections: [\"/Tutorials\"],\n includeEntries: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collections\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n anyOf: [\n {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n }\n ]\n },\n default: [],\n description:\n \"Collection IDs or paths. Includes selected subtrees; empty selects all accessible collections.\"\n },\n flag: \"collections\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"includeEntries\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Include entry IDs, names, paths, and schema associations.\"\n },\n flag: \"include-entries\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"includeTree\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description:\n \"Include ordered child IDs for each collection. Also includes entry metadata.\"\n },\n flag: \"include-tree\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"typeMetadata.getPublished\",\n group: \"type-metadata\",\n command: \"get-published\",\n method: \"post\",\n path: \"/type-metadata/published\",\n summary: \"Get published content type metadata\",\n description:\n \"Read-only bulk metadata for type generation. Resolves a channel once (published by default), or reads a retained snapshot. Uses publication paths, names, and exact entry-version schema revisions; never substitutes current schemas. Supports mixed revisions and schema-free entries. Empty collections use general types without warnings. Includes selected subtrees; no selectors means all published collections and root entries. Publication-access rules match content.get. No entry content is loaded. Reuse source.snapshotID for related reads. The fingerprint changes only when returned type metadata changes, not when content-only publication creates a new snapshot.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n collections: [\"/Tutorials\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collections\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n anyOf: [\n {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n }\n ]\n },\n default: [],\n description:\n \"Collection IDs or paths. Includes selected subtrees; empty selects all accessible collections.\"\n },\n flag: \"collections\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"includeEntries\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Include entry IDs, names, paths, and schema associations.\"\n },\n flag: \"include-entries\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"includeTree\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description:\n \"Include ordered child IDs for each collection. Also includes entry metadata.\"\n },\n flag: \"include-tree\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.create\",\n group: \"versions\",\n command: \"create\",\n method: \"post\",\n path: \"/entries/{entryID}/versions\",\n summary: \"Create an entry version\",\n description:\n \"Saves a version of the current entry content. Optionally assigns a name.\\n\\nRequired API key permissions: versions. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n name: \"Before release\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry to version\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Optional version name\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.get\",\n group: \"versions\",\n command: \"get\",\n method: \"get\",\n path: \"/versions/{id}\",\n summary: \"Get an entry version\",\n description:\n \"Returns the saved content and recorded schema metadata of an entry version. Validates against its recorded revision, including historical versions. expectedSchemaHash must match that revision; schema-less content cannot match it.\\n\\nRequired API key permissions: read:versions. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ver_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the version to get\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.list\",\n group: \"versions\",\n command: \"list\",\n method: \"get\",\n path: \"/entries/{entryID}/versions\",\n summary: \"List entry versions\",\n description:\n \"Lists saved entry versions. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100.\\n\\nRequired API key permissions: read:versions. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry whose versions to list\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum versions to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"versions.revert\",\n group: \"versions\",\n command: \"revert\",\n method: \"post\",\n path: \"/versions/{id}/revert\",\n summary: \"Restore an entry version\",\n description:\n \"Restores saved content to the current entry and returns the resulting version. An active schema migration can block this action.\\n\\nRequired API key permissions: versions. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ver_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the version to restore\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.update\",\n group: \"versions\",\n command: \"update\",\n method: \"patch\",\n path: \"/versions/{id}\",\n summary: \"Rename an entry version\",\n description:\n \"Changes the saved version name. Set name to null to remove the name.\\n\\nRequired API key permissions: versions. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ver_example\",\n name: \"Release candidate\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the version to update\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n anyOf: [\n {\n type: \"string\",\n minLength: 1,\n maxLength: 100\n },\n {\n type: \"null\"\n }\n ],\n description: \"New version name, or null to remove it\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: true\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"workspaces.list\",\n group: \"workspaces\",\n command: \"list\",\n method: \"get\",\n path: \"/workspaces\",\n summary: \"List available workspaces\",\n description:\n \"Lists workspaces available to the OAuth user, with current role permissions and plan access. Browser sessions can list workspaces across signed-in accounts. Does not require workspace selection and does not count toward API usage.\",\n security: [\n {\n oauth: []\n }\n ],\n fields: [],\n conditional: false,\n response: \"json\"\n }\n];\nconst schemas: Record<string, JSONSchema> = {\n PropertyFilter: {\n anyOf: [\n {\n $ref: \"#/components/schemas/TextPropertyFilter\"\n },\n {\n $ref: \"#/components/schemas/NumberPropertyFilter\"\n },\n {\n $ref: \"#/components/schemas/BooleanPropertyFilter\"\n },\n {\n $ref: \"#/components/schemas/DatePropertyFilter\"\n }\n ]\n },\n TextPropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"text\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n operator: {\n enum: [\"any\", \"all\", \"none\"],\n type: \"string\",\n default: \"any\"\n },\n values: {\n type: \"array\",\n minItems: 1,\n maxItems: 20,\n items: {\n type: \"string\",\n maxLength: 500\n }\n }\n },\n required: [\"kind\", \"key\", \"values\"]\n },\n NumberPropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"number\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n operator: {\n $ref: \"#/components/schemas/ComparisonOperator\"\n },\n value: {\n type: \"number\"\n }\n },\n required: [\"kind\", \"key\", \"operator\", \"value\"]\n },\n ComparisonOperator: {\n enum: [\n \"equals\",\n \"notEquals\",\n \"greaterThan\",\n \"greaterThanOrEqual\",\n \"lessThan\",\n \"lessThanOrEqual\"\n ],\n type: \"string\"\n },\n BooleanPropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"boolean\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n value: {\n type: \"boolean\"\n }\n },\n required: [\"kind\", \"key\", \"value\"]\n },\n DatePropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"date\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n operator: {\n $ref: \"#/components/schemas/ComparisonOperator\"\n },\n value: {\n type: \"string\"\n }\n },\n required: [\"kind\", \"key\", \"operator\", \"value\"]\n },\n Permission: {\n enum: [\n \"content\",\n \"publishing\",\n \"api_keys\",\n \"read:api_keys\",\n \"billing\",\n \"read:billing\",\n \"restricted_collections\",\n \"read:restricted_collections\",\n \"memberships\",\n \"roles\",\n \"workspace\"\n ],\n type: \"string\"\n },\n AnswerHistoryMessage: {\n type: \"object\",\n properties: {\n role: {\n enum: [\"user\", \"assistant\"],\n type: \"string\"\n },\n content: {\n type: \"string\",\n minLength: 1,\n maxLength: 4000\n }\n },\n required: [\"role\", \"content\"]\n },\n PublishEntryTarget: {\n type: \"object\",\n properties: {\n entryID: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry to publish\"\n },\n versionID: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Existing version to publish\"\n }\n },\n required: [\"entryID\"]\n }\n};\nexport { commands, schemas };\n","import { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport type { APICommand, APIField, APIOptions } from \"./types\";\n\nconst readStdin = async (signal: AbortSignal): Promise<Buffer> => {\n const chunks: Buffer[] = [];\n const abort = () =>\n process.stdin.destroy(signal.reason instanceof Error ? signal.reason : new Error(\"Cancelled.\"));\n\n signal.throwIfAborted();\n signal.addEventListener(\"abort\", abort, { once: true });\n\n try {\n for await (const chunk of process.stdin) chunks.push(Buffer.from(chunk));\n signal.throwIfAborted();\n return Buffer.concat(chunks);\n } finally {\n signal.removeEventListener(\"abort\", abort);\n }\n};\nconst optionKey = (flag: string): string =>\n flag.replace(/-([a-z])/g, (_match, letter: string) => letter.toUpperCase());\n\nconst parseFlag = (field: APIField, value: string): unknown => {\n if (field.nullable && value === \"null\") return null;\n if (field.kind === \"string\" || field.kind === \"file\") return value;\n if (field.kind === \"boolean\") {\n if (value === \"true\") return true;\n if (value === \"false\") return false;\n throw new CLIError(`--${field.flag} expects true or false.`, exitCodes.usage);\n }\n\n try {\n const parsed: unknown = JSON.parse(value);\n\n if (field.kind === \"number\" && (typeof parsed !== \"number\" || !Number.isFinite(parsed))) {\n throw new Error();\n }\n\n return parsed;\n } catch {\n throw new CLIError(\n `--${field.flag} expects ${field.kind === \"number\" ? \"a number\" : \"valid JSON\"}.`,\n exitCodes.usage\n );\n }\n};\n\n/** Flat flags replace matching JSON fields; omitted flags never introduce defaults. */\nconst readInput = async (\n command: APICommand,\n options: APIOptions,\n signal: AbortSignal\n): Promise<Record<string, unknown>> => {\n let input: Record<string, unknown> = {};\n let stdinUsed = options.input === \"-\";\n\n if (options.input !== undefined) {\n if (options.input !== \"-\" && !options.input.startsWith(\"@\")) {\n throw new CLIError(\n \"Use --input @file.json or --input - for JSON from stdin.\",\n exitCodes.usage\n );\n }\n\n const source =\n options.input === \"-\"\n ? await readStdin(signal)\n : await readFile(options.input.slice(1), { signal });\n let parsed: unknown;\n\n try {\n parsed = JSON.parse(source.toString(\"utf8\"));\n } catch {\n throw new CLIError(\"Input is not valid JSON.\", exitCodes.usage);\n }\n\n if (!parsed || typeof parsed !== \"object\" || Array.isArray(parsed)) {\n throw new CLIError(\"Input must be a JSON object.\", exitCodes.usage);\n }\n\n input = { ...parsed };\n }\n\n const fields = new Set(command.fields.map((field) => field.name));\n\n for (const name of Object.keys(input)) {\n if (!fields.has(name)) {\n throw new CLIError(`Unknown input field: ${name}. See --help or --schema.`, exitCodes.usage);\n }\n }\n\n for (const field of command.fields) {\n const value = options[optionKey(field.flag)];\n\n if (typeof value === \"string\") input[field.name] = parseFlag(field, value);\n\n const supplied = Object.hasOwn(input, field.name);\n\n if (field.required && !supplied) {\n throw new CLIError(`Missing ${field.name}. Use --${field.flag} or --input.`, exitCodes.usage);\n }\n\n if (!supplied) continue;\n\n const current = input[field.name];\n\n if (current === null && field.nullable) continue;\n if (typeof current === \"number\" && !Number.isFinite(current)) {\n throw new CLIError(`Invalid number for ${field.name}.`, exitCodes.usage);\n }\n\n if (\n field.kind !== \"json\" &&\n typeof current !== (field.kind === \"file\" ? \"string\" : field.kind)\n ) {\n throw new CLIError(\n `Invalid type for ${field.name}; expected ${field.kind}.`,\n exitCodes.usage\n );\n }\n\n if (field.kind === \"file\") {\n const file = current as string;\n\n if (file === \"-\" && stdinUsed) {\n throw new CLIError(\n \"Stdin can supply either JSON or one upload file, not both.\",\n exitCodes.usage\n );\n }\n\n const bytes = file === \"-\" ? await readStdin(signal) : await readFile(file, { signal });\n\n stdinUsed ||= file === \"-\";\n input[field.name] = new File(\n [new Uint8Array(bytes)],\n file === \"-\" ? \"stdin\" : path.basename(file),\n { type: \"application/octet-stream\" }\n );\n }\n }\n\n return input;\n};\n\nexport { readInput, optionKey };\n","// Generated from SDK openapi.json. Do not edit.\nimport type { operations, OperationInput } from \"@andesine/sdk\";\nimport type { SDKOperation } from \"./types\";\n\nconst bindings: Record<keyof operations, SDKOperation> = {\n \"assets.attach\": (client, input, options) =>\n client.assets.attach(input as OperationInput<\"assets.attach\">, options),\n \"assets.get\": (client, input, options) =>\n client.assets.get(input as OperationInput<\"assets.get\">, options),\n \"assets.importURL\": (client, input, options) =>\n client.assets.importURL(input as OperationInput<\"assets.importURL\">, options),\n \"assets.register\": (client, input, options) =>\n client.assets.register(input as OperationInput<\"assets.register\">, options),\n \"assets.search\": (client, input, options) =>\n client.assets.search(input as OperationInput<\"assets.search\">, options),\n \"assets.upload\": (client, input, options) =>\n client.assets.upload(input as OperationInput<\"assets.upload\">, options),\n \"auth.getIdentity\": (client, input, options) =>\n client.auth.getIdentity(input as OperationInput<\"auth.getIdentity\">, options),\n \"collections.bulkDelete\": (client, input, options) =>\n client.collections.bulkDelete(input as OperationInput<\"collections.bulkDelete\">, options),\n \"collections.create\": (client, input, options) =>\n client.collections.create(input as OperationInput<\"collections.create\">, options),\n \"collections.delete\": (client, input, options) =>\n client.collections.delete(input as OperationInput<\"collections.delete\">, options),\n \"collections.list\": (client, input, options) =>\n client.collections.list(input as OperationInput<\"collections.list\">, options),\n \"collections.update\": (client, input, options) =>\n client.collections.update(input as OperationInput<\"collections.update\">, options),\n \"content.get\": (client, input, options) =>\n client.content.get(input as OperationInput<\"content.get\">, options),\n \"content.getAsset\": (client, input, options) =>\n client.content.getAsset(input as OperationInput<\"content.getAsset\">, options),\n \"content.getSchema\": (client, input, options) =>\n client.content.getSchema(input as OperationInput<\"content.getSchema\">, options),\n \"content.getTree\": (client, input, options) =>\n client.content.getTree(input as OperationInput<\"content.getTree\">, options),\n \"content.listCollections\": (client, input, options) =>\n client.content.listCollections(input as OperationInput<\"content.listCollections\">, options),\n \"content.listEntries\": (client, input, options) =>\n client.content.listEntries(input as OperationInput<\"content.listEntries\">, options),\n \"entries.bulkDelete\": (client, input, options) =>\n client.entries.bulkDelete(input as OperationInput<\"entries.bulkDelete\">, options),\n \"entries.create\": (client, input, options) =>\n client.entries.create(input as OperationInput<\"entries.create\">, options),\n \"entries.delete\": (client, input, options) =>\n client.entries.delete(input as OperationInput<\"entries.delete\">, options),\n \"entries.get\": (client, input, options) =>\n client.entries.get(input as OperationInput<\"entries.get\">, options),\n \"entries.list\": (client, input, options) =>\n client.entries.list(input as OperationInput<\"entries.list\">, options),\n \"entries.update\": (client, input, options) =>\n client.entries.update(input as OperationInput<\"entries.update\">, options),\n \"instance.get\": (client, input, options) =>\n client.instance.get(input as OperationInput<\"instance.get\">, options),\n \"memberships.invite\": (client, input, options) =>\n client.memberships.invite(input as OperationInput<\"memberships.invite\">, options),\n \"memberships.list\": (client, input, options) =>\n client.memberships.list(input as OperationInput<\"memberships.list\">, options),\n \"memberships.listInvites\": (client, input, options) =>\n client.memberships.listInvites(input as OperationInput<\"memberships.listInvites\">, options),\n \"memberships.remove\": (client, input, options) =>\n client.memberships.remove(input as OperationInput<\"memberships.remove\">, options),\n \"memberships.resendInvite\": (client, input, options) =>\n client.memberships.resendInvite(input as OperationInput<\"memberships.resendInvite\">, options),\n \"memberships.revokeInvite\": (client, input, options) =>\n client.memberships.revokeInvite(input as OperationInput<\"memberships.revokeInvite\">, options),\n \"memberships.update\": (client, input, options) =>\n client.memberships.update(input as OperationInput<\"memberships.update\">, options),\n \"publishing.bulkPublishCollections\": (client, input, options) =>\n client.publishing.bulkPublishCollections(\n input as OperationInput<\"publishing.bulkPublishCollections\">,\n options\n ),\n \"publishing.bulkPublishEntries\": (client, input, options) =>\n client.publishing.bulkPublishEntries(\n input as OperationInput<\"publishing.bulkPublishEntries\">,\n options\n ),\n \"publishing.bulkSetCollections\": (client, input, options) =>\n client.publishing.bulkSetCollections(\n input as OperationInput<\"publishing.bulkSetCollections\">,\n options\n ),\n \"publishing.bulkUnpublishCollections\": (client, input, options) =>\n client.publishing.bulkUnpublishCollections(\n input as OperationInput<\"publishing.bulkUnpublishCollections\">,\n options\n ),\n \"publishing.bulkUnpublishEntries\": (client, input, options) =>\n client.publishing.bulkUnpublishEntries(\n input as OperationInput<\"publishing.bulkUnpublishEntries\">,\n options\n ),\n \"publishing.createChannel\": (client, input, options) =>\n client.publishing.createChannel(input as OperationInput<\"publishing.createChannel\">, options),\n \"publishing.deleteChannel\": (client, input, options) =>\n client.publishing.deleteChannel(input as OperationInput<\"publishing.deleteChannel\">, options),\n \"publishing.getChannelContent\": (client, input, options) =>\n client.publishing.getChannelContent(\n input as OperationInput<\"publishing.getChannelContent\">,\n options\n ),\n \"publishing.getEntryVersion\": (client, input, options) =>\n client.publishing.getEntryVersion(\n input as OperationInput<\"publishing.getEntryVersion\">,\n options\n ),\n \"publishing.listChannels\": (client, input, options) =>\n client.publishing.listChannels(input as OperationInput<\"publishing.listChannels\">, options),\n \"publishing.listEntryPublications\": (client, input, options) =>\n client.publishing.listEntryPublications(\n input as OperationInput<\"publishing.listEntryPublications\">,\n options\n ),\n \"publishing.publishCollection\": (client, input, options) =>\n client.publishing.publishCollection(\n input as OperationInput<\"publishing.publishCollection\">,\n options\n ),\n \"publishing.publishEntry\": (client, input, options) =>\n client.publishing.publishEntry(input as OperationInput<\"publishing.publishEntry\">, options),\n \"publishing.revertChanges\": (client, input, options) =>\n client.publishing.revertChanges(input as OperationInput<\"publishing.revertChanges\">, options),\n \"publishing.setCollection\": (client, input, options) =>\n client.publishing.setCollection(input as OperationInput<\"publishing.setCollection\">, options),\n \"publishing.unpublishCollection\": (client, input, options) =>\n client.publishing.unpublishCollection(\n input as OperationInput<\"publishing.unpublishCollection\">,\n options\n ),\n \"publishing.unpublishEntry\": (client, input, options) =>\n client.publishing.unpublishEntry(input as OperationInput<\"publishing.unpublishEntry\">, options),\n \"roles.create\": (client, input, options) =>\n client.roles.create(input as OperationInput<\"roles.create\">, options),\n \"roles.delete\": (client, input, options) =>\n client.roles.delete(input as OperationInput<\"roles.delete\">, options),\n \"roles.list\": (client, input, options) =>\n client.roles.list(input as OperationInput<\"roles.list\">, options),\n \"roles.update\": (client, input, options) =>\n client.roles.update(input as OperationInput<\"roles.update\">, options),\n \"schemaMigrations.get\": (client, input, options) =>\n client.schemaMigrations.get(input as OperationInput<\"schemaMigrations.get\">, options),\n \"schemaMigrations.getActive\": (client, input, options) =>\n client.schemaMigrations.getActive(\n input as OperationInput<\"schemaMigrations.getActive\">,\n options\n ),\n \"schemaMigrations.listContentLossEntries\": (client, input, options) =>\n client.schemaMigrations.listContentLossEntries(\n input as OperationInput<\"schemaMigrations.listContentLossEntries\">,\n options\n ),\n \"schemas.apply\": (client, input, options) =>\n client.schemas.apply(input as OperationInput<\"schemas.apply\">, options),\n \"schemas.create\": (client, input, options) =>\n client.schemas.create(input as OperationInput<\"schemas.create\">, options),\n \"schemas.delete\": (client, input, options) =>\n client.schemas.delete(input as OperationInput<\"schemas.delete\">, options),\n \"schemas.get\": (client, input, options) =>\n client.schemas.get(input as OperationInput<\"schemas.get\">, options),\n \"schemas.getRevision\": (client, input, options) =>\n client.schemas.getRevision(input as OperationInput<\"schemas.getRevision\">, options),\n \"schemaVersions.get\": (client, input, options) =>\n client.schemaVersions.get(input as OperationInput<\"schemaVersions.get\">, options),\n \"schemaVersions.list\": (client, input, options) =>\n client.schemaVersions.list(input as OperationInput<\"schemaVersions.list\">, options),\n \"schemaVersions.revert\": (client, input, options) =>\n client.schemaVersions.revert(input as OperationInput<\"schemaVersions.revert\">, options),\n \"schemaVersions.update\": (client, input, options) =>\n client.schemaVersions.update(input as OperationInput<\"schemaVersions.update\">, options),\n \"search.askCurrent\": (client, input, options) =>\n client.search.askCurrent(input as OperationInput<\"search.askCurrent\">, options),\n \"search.askCurrentStream\": (client, input, options) =>\n client.search.askCurrentStream(input as OperationInput<\"search.askCurrentStream\">, options),\n \"search.askPublished\": (client, input, options) =>\n client.search.askPublished(input as OperationInput<\"search.askPublished\">, options),\n \"search.askPublishedStream\": (client, input, options) =>\n client.search.askPublishedStream(input as OperationInput<\"search.askPublishedStream\">, options),\n \"search.current\": (client, input, options) =>\n client.search.current(input as OperationInput<\"search.current\">, options),\n \"search.published\": (client, input, options) =>\n client.search.published(input as OperationInput<\"search.published\">, options),\n \"typeMetadata.getCurrent\": (client, input, options) =>\n client.typeMetadata.getCurrent(input as OperationInput<\"typeMetadata.getCurrent\">, options),\n \"typeMetadata.getPublished\": (client, input, options) =>\n client.typeMetadata.getPublished(input as OperationInput<\"typeMetadata.getPublished\">, options),\n \"versions.create\": (client, input, options) =>\n client.versions.create(input as OperationInput<\"versions.create\">, options),\n \"versions.get\": (client, input, options) =>\n client.versions.get(input as OperationInput<\"versions.get\">, options),\n \"versions.list\": (client, input, options) =>\n client.versions.list(input as OperationInput<\"versions.list\">, options),\n \"versions.revert\": (client, input, options) =>\n client.versions.revert(input as OperationInput<\"versions.revert\">, options),\n \"versions.update\": (client, input, options) =>\n client.versions.update(input as OperationInput<\"versions.update\">, options),\n \"workspaces.list\": (client, input, options) =>\n client.workspaces.list(input as OperationInput<\"workspaces.list\">, options)\n};\nexport { bindings };\n","import { open, unlink } from \"node:fs/promises\";\nimport { Readable } from \"node:stream\";\nimport { pipeline } from \"node:stream/promises\";\nimport { CLIError } from \"../errors\";\nimport { writeOutput } from \"../output\";\n\n/** Write bytes only to an explicit destination; never overwrite an existing file. */\nconst writeBinary = async (\n value: unknown,\n destination: string,\n signal: AbortSignal\n): Promise<void> => {\n if (!(value instanceof Blob)) throw new CLIError(\"Expected binary data from this API operation.\");\n\n if (destination === \"-\") {\n for await (const chunk of value.stream()) {\n signal.throwIfAborted();\n await writeOutput(process.stdout, Buffer.from(chunk));\n }\n return;\n }\n\n const file = await open(destination, \"wx\");\n let completed = false;\n\n try {\n await pipeline(Readable.fromWeb(value.stream()), file.createWriteStream(), { signal });\n completed = true;\n } finally {\n await file.close();\n if (!completed) await unlink(destination);\n }\n};\n\nexport { writeBinary };\n","import {\n createClient,\n paginatePages,\n type AndesineClient,\n type OperationInput,\n type RequestOptions,\n type AnswerEvent\n} from \"@andesine/sdk\";\nimport { authenticatedClient } from \"../auth/client\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { workspaceIDSchema } from \"../config/schema\";\nimport { readInput } from \"./input\";\nimport { bindings } from \"./bindings\";\nimport { reportAPIError } from \"./errors\";\nimport { writeBinary } from \"./binary\";\nimport type { APICommand, APIOptions } from \"./types\";\n\ninterface CursorPage {\n data: unknown[];\n pagination: { hasMore: boolean; nextCursor: string | null };\n}\n\nconst isPage = (value: unknown): value is CursorPage => {\n if (\n !value ||\n typeof value !== \"object\" ||\n !(\"data\" in value) ||\n !Array.isArray(value.data) ||\n !(\"pagination\" in value)\n ) {\n return false;\n }\n\n const pagination = value.pagination;\n\n return Boolean(\n pagination &&\n typeof pagination === \"object\" &&\n \"hasMore\" in pagination &&\n typeof pagination.hasMore === \"boolean\" &&\n \"nextCursor\" in pagination &&\n (pagination.nextCursor === null || typeof pagination.nextCursor === \"string\")\n );\n};\n\nconst pages = async function* (\n command: APICommand,\n client: AndesineClient,\n input: Record<string, unknown>,\n options: RequestOptions\n): AsyncGenerator<unknown> {\n if (command.id === \"content.listCollections\") {\n yield* client.content.paginateCollectionPages(\n input as OperationInput<\"content.listCollections\">,\n { ...options, response: \"data\" }\n );\n return;\n }\n\n if (command.id === \"content.listEntries\") {\n yield* client.content.paginateEntryPages(input as OperationInput<\"content.listEntries\">, {\n ...options,\n response: \"data\"\n });\n return;\n }\n\n const invoke = bindings[command.id as keyof typeof bindings];\n\n yield* paginatePages(\n async (cursor) => {\n const result = await invoke(client, { ...input, cursor }, { ...options, response: \"full\" });\n\n if (!isPage(result.data)) {\n throw new CLIError(\"The server returned an invalid paginated response.\");\n }\n\n return result.data;\n },\n { cursor: typeof input.cursor === \"string\" ? input.cursor : undefined }\n );\n};\n\n/** Use the SDK for all transport; command metadata and execution bindings are bundled locally. */\nconst executeAPI = async (\n command: APICommand,\n options: APIOptions,\n context: CommandContext\n): Promise<void> => {\n const { output, signal } = context;\n const timeout = options.timeout === undefined ? 30_000 : Number(options.timeout);\n\n if (!Number.isFinite(timeout) || timeout < 0 || options.timeout?.trim() === \"\") {\n throw new CLIError(\n \"--timeout must be a nonnegative number of milliseconds; 0 disables it.\",\n exitCodes.usage\n );\n }\n\n if (options.paginate && !command.pagination) {\n throw new CLIError(\"This operation does not support cursor pagination.\", exitCodes.usage);\n }\n\n if (options.paginate && options.ifNoneMatch !== undefined) {\n throw new CLIError(\"Conditional headers cannot be combined with --paginate.\", exitCodes.usage);\n }\n\n if (options.paginate && options.full) {\n throw new CLIError(\n \"--full cannot be combined with --paginate; pages already retain pagination and snapshot metadata.\",\n exitCodes.usage\n );\n }\n\n if (command.response === \"binary\" && !options.output) {\n throw new CLIError(\"Specify --output <file> or --output - for binary data.\", exitCodes.usage);\n }\n\n if (options.output && command.response !== \"binary\") {\n throw new CLIError(\"Use shell redirection for JSON and text output.\", exitCodes.usage);\n }\n\n if (options.format === \"text\" && command.response !== \"stream\") {\n throw new CLIError(\"--format text is only available for AI answer streams.\", exitCodes.usage);\n }\n\n const input = await readInput(command, options, signal);\n const headers = new Headers();\n\n for (const field of command.fields) {\n if (field.location !== \"header\" || !Object.hasOwn(input, field.name)) continue;\n\n headers.set(field.name, String(input[field.name]));\n delete input[field.name];\n }\n\n if (options.ifNoneMatch !== undefined) headers.set(\"If-None-Match\", options.ifNoneMatch);\n\n const request: RequestOptions = { signal, timeout, retries: 0, headers };\n\n await output.heading(`Andesine · ${command.summary}`);\n\n try {\n const anonymous =\n command.security.length === 0 ||\n command.security.some((requirement) => !Object.keys(requirement).length);\n const auth = anonymous\n ? {\n client: createClient({\n baseURL: context.config.baseURL,\n fetch: (input, init) => fetch(input, { ...init, redirect: \"error\" })\n }),\n source: \"anonymous\"\n }\n : await authenticatedClient(context);\n const acceptsAPIKey = command.security.some((requirement) =>\n Object.hasOwn(requirement, \"apiKey\")\n );\n\n if (auth.source === \"environment\" && !acceptsAPIKey) {\n throw new CLIError(\n \"This operation requires OAuth login. Unset ANDESINE_API_KEY and run andesine auth login.\"\n );\n }\n\n const requiresWorkspace =\n (auth.source === \"file\" || auth.source === \"keyring\") &&\n command.fields.some(\n (field) => field.location === \"header\" && field.name === \"x-workspace-id\"\n );\n\n if (requiresWorkspace) {\n const workspaceID = headers.get(\"x-workspace-id\") ?? context.config.workspaceID;\n\n if (workspaceID === undefined) {\n throw new CLIError(\n \"No workspace selected. Run andesine init, pass --workspace <id>, or set ANDESINE_WORKSPACE_ID. Use andesine api workspaces list to find a workspace ID.\",\n exitCodes.usage\n );\n }\n\n if (!workspaceIDSchema.safeParse(workspaceID).success) {\n throw new CLIError(\"The workspace must be a workspace ID (ws_…).\", exitCodes.usage);\n }\n\n headers.set(\"x-workspace-id\", workspaceID);\n }\n\n if (options.paginate) {\n let count = 0;\n\n for await (const page of pages(command, auth.client, input, request)) {\n signal.throwIfAborted();\n await output.json(page);\n count += 1;\n }\n\n await output.success(`Received ${count} page${count === 1 ? \"\" : \"s\"}.`);\n return;\n }\n\n const invoke = bindings[command.id as keyof typeof bindings];\n const response = await output.progress(\n \"Sending request\",\n () => invoke(auth.client, input, { ...request, response: \"full\" }),\n \"Response received\"\n );\n\n if (response.notModified) {\n await output.json({\n status: 304,\n notModified: true,\n etag: response.headers.get(\"etag\"),\n ...(options.full ? { headers: Object.fromEntries(response.headers), data: null } : {})\n });\n return;\n }\n\n if (options.full) {\n await output.json({\n status: response.status,\n headers: Object.fromEntries(response.headers),\n data: response.data ?? null,\n notModified: false\n });\n return;\n }\n\n if (command.response === \"stream\") {\n const events = response.data as AsyncIterable<AnswerEvent>;\n\n for await (const event of events) {\n signal.throwIfAborted();\n if (options.format !== \"text\") await output.json(event);\n else if (event.type === \"textDelta\") await output.text(event.text);\n }\n\n await output.success(\"Answer complete.\");\n } else if (command.response === \"binary\") {\n await writeBinary(response.data, options.output!, signal);\n await output.success(\n options.output === \"-\" ? \"Download complete.\" : `Saved ${options.output}.`\n );\n } else if (command.response === \"empty\" || response.data === undefined) {\n await output.success(`Request completed (${response.status}).`);\n } else {\n await output.json(response.data);\n }\n } catch (error) {\n await reportAPIError(context, error);\n }\n};\n\nexport { executeAPI };\n","import { Option, type CommandUnknownOpts } from \"@commander-js/extra-typings\";\nimport { createCommandContext } from \"../context\";\nimport { createOutput } from \"../output\";\nimport type { GlobalOptions } from \"../config/resolve\";\nimport { commands, schemas } from \"./manifest\";\nimport { executeAPI } from \"./execute\";\nimport type { APIOptions } from \"./types\";\n\n/** Register the public spec without reading user config or credentials for help. */\nconst registerAPI = (program: CommandUnknownOpts, signal: AbortSignal): void => {\n const api = program\n .command(\"api\")\n .description(\"Call the public API; browser-only endpoints are not exposed\");\n const groups = new Map<string, CommandUnknownOpts>();\n\n for (const operation of commands) {\n let group = groups.get(operation.group);\n\n if (!group) {\n group = api.command(operation.group).description(`${operation.group} operations`);\n group.action(() => group?.outputHelp());\n groups.set(operation.group, group);\n }\n\n const command = group\n .command(operation.command)\n .description(operation.summary)\n .option(\n \"--input <source>\",\n \"JSON object from @file or - (stdin); flags override matching fields\"\n )\n .option(\"--timeout <ms>\", \"Request timeout in milliseconds (default: 30000; 0 disables it)\")\n .option(\"--schema\", \"Print the bundled input JSON Schema without making a request\");\n\n if (operation.conditional) {\n command.option(\"--if-none-match <etag>\", \"Read only if the published content has changed\");\n }\n\n if (operation.response === \"json\" || operation.response === \"empty\") {\n command.option(\"--full\", \"Include HTTP status and headers with the response data\");\n }\n\n if (operation.pagination) {\n command.option(\"--paginate\", \"Emit every page as one JSON line, retaining snapshot metadata\");\n }\n\n if (operation.response === \"binary\") {\n command.option(\"--output <file>\", \"Save bytes to a new file, or use - for raw stdout\");\n }\n\n if (operation.response === \"stream\") {\n command.addOption(\n new Option(\"--format <format>\", \"NDJSON events or answer text deltas\")\n .choices([\"json\", \"text\"])\n .default(\"json\")\n );\n }\n\n for (const field of operation.fields) {\n const argument = field.kind === \"file\" ? \"file\" : field.kind === \"json\" ? \"json\" : \"value\";\n const description = [\n field.schema.description,\n field.required ? \"Required\" : undefined,\n field.kind === \"file\"\n ? \"File path or - for stdin\"\n : field.kind === \"boolean\"\n ? \"true or false\"\n : field.kind === \"json\"\n ? \"JSON value\"\n : undefined,\n field.nullable ? \"Use null to clear\" : undefined\n ]\n .filter(Boolean)\n .join(\". \");\n\n command.option(`--${field.flag} <${argument}>`, description || field.name);\n }\n\n const authentication = operation.security.length\n ? operation.security.map((requirement) => Object.keys(requirement).join(\" + \")).join(\" or \")\n : \"Anonymous\";\n\n command.addHelpText(\n \"after\",\n `\\n${operation.description}\\n\\n${operation.method.toUpperCase()} ${operation.path}\\nAuthentication: ${authentication}\\nUse --workspace for OAuth workspace selection. JSON keys use API names, such as collectionID.\\n${operation.example ? `\\nExample input (pass through --input @request.json):\\n${JSON.stringify(operation.example, null, 2)}\\n` : \"\"}`\n );\n command.action(async (...args) => {\n const action = args.at(-1) as CommandUnknownOpts;\n const options = action.opts() as APIOptions;\n if (options.schema) {\n await createOutput(false).json({\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: Object.fromEntries(\n operation.fields.map((field) => [field.name, field.schema])\n ),\n required: operation.fields.filter((field) => field.required).map((field) => field.name),\n additionalProperties: false,\n components: { schemas }\n });\n return;\n }\n\n const context = await createCommandContext(action.optsWithGlobals() as GlobalOptions, signal);\n\n await executeAPI(operation, options, context);\n });\n }\n\n api.action(() => api.outputHelp());\n};\n\nexport { registerAPI };\n","import { type Command, Option } from \"@commander-js/extra-typings\";\nimport { createCommandContext } from \"../context\";\nimport { executeTypes } from \"./execute\";\nimport type { GlobalOptions } from \"../config/resolve\";\nimport type { GenerateOptions } from \"./options\";\n\nconst registerTypes = (program: Command, signal: AbortSignal): void => {\n const types = program\n .command(\"types\")\n .description(\"Generate TypeScript types for workspace content\");\n\n types\n .command(\"generate\")\n .description(\"Generate a types file, check it for CI, or watch for metadata changes\")\n .addOption(\n new Option(\n \"--source <source>\",\n \"Content source (default: saved source or published)\"\n ).choices([\"published\", \"current\"] as const)\n )\n .option(\"--channel <code>\", \"Follow a publishing channel\")\n .option(\"--snapshot <id>\", \"Use a fixed published snapshot\")\n .option(\"--collection <selectors...>\", \"Collection IDs or decoded paths, including descendants\")\n .option(\"--all-collections\", \"Include all accessible collections\")\n .option(\n \"--output <file>\",\n \"Types file relative to config, or the working directory without config\"\n )\n .option(\"--include-entry-ids\", \"Include entry ID types\")\n .option(\"--no-include-entry-ids\", \"Omit entry ID types\")\n .option(\"--include-entry-paths\", \"Include entry path types\")\n .option(\"--no-include-entry-paths\", \"Omit entry path types\")\n .option(\"--include-tree\", \"Include exact tree types\")\n .option(\"--no-include-tree\", \"Omit exact tree types\")\n .option(\"--check\", \"Compare against live metadata without writes; exit 3 if missing or stale\")\n .option(\"--watch\", \"Poll in the foreground; no daemon or overlapping requests\")\n .option(\"--interval <seconds>\", \"Watch polling interval, 1–300 seconds (default: 10)\")\n .option(\n \"--force\",\n \"Replace an unrelated output file; with watch, applies only until the first successful generation\"\n )\n .addHelpText(\n \"after\",\n \"\\nCommit the generated file and use --check in CI. Channel/current sources follow live changes;\\n--snapshot fixes the source while that snapshot is retained. Options override saved config.\\nWatch holds configuration fixed; restart it after config changes. Nothing runs at install time.\"\n )\n .action(async (options, command) => {\n const globals = command.optsWithGlobals() as GlobalOptions & GenerateOptions;\n\n await executeTypes(await createCommandContext(globals, signal), options);\n });\n};\n\nexport { registerTypes };\n","import { version } from \"../package.json\";\nimport { Command, Option } from \"@commander-js/extra-typings\";\nimport { createCommandContext } from \"./context\";\nimport { login } from \"./auth/login\";\nimport { logout } from \"./auth/logout\";\nimport { status } from \"./auth/status\";\nimport { init } from \"./init\";\nimport { registerAPI } from \"./api/register\";\nimport { registerTypes } from \"./types/register\";\n\n/** Register custom commands and the generated public API group. */\nconst createProgram = (signal: AbortSignal) => {\n const program = new Command()\n .name(\"andesine\")\n .description(\"Command-line tools for Andesine\")\n .version(version)\n .option(\"--config <file>\", \"Use a project configuration file (ANDESINE_CONFIG)\")\n .option(\"--profile <name>\", \"Select a saved user profile (ANDESINE_PROFILE)\")\n .option(\"--base-url <url>\", \"Set the API root (ANDESINE_BASE_URL)\")\n .option(\"--workspace <id>\", \"Select a workspace (ANDESINE_WORKSPACE_ID)\")\n .option(\"--no-interactive\", \"Disable interactive prompts\")\n .showHelpAfterError()\n .exitOverride();\n\n const auth = program.command(\"auth\").description(\"Manage CLI authentication\");\n\n program\n .command(\"init\")\n .description(\"Configure this project for Andesine content and type generation\")\n .addOption(\n new Option(\"--source <source>\", \"Type source: published (default) or current\").choices([\n \"published\",\n \"current\"\n ] as const)\n )\n .option(\"--channel <code>\", \"Publishing channel (default: published)\")\n .option(\"--snapshot <id>\", \"Use a fixed published snapshot instead of a channel\")\n .option(\n \"--collection <selectors...>\",\n \"Collection IDs or decoded paths, including collection-ID anchors\"\n )\n .option(\"--all-collections\", \"Include all accessible collections\")\n .option(\"--output <file>\", \"Types file relative to config (default: src/andesine.generated.ts)\")\n .option(\"--include-entry-ids\", \"Include entry ID types\")\n .option(\"--no-include-entry-ids\", \"Omit entry ID types\")\n .option(\"--include-entry-paths\", \"Include entry path types\")\n .option(\"--no-include-entry-paths\", \"Omit entry path types\")\n .option(\"--include-tree\", \"Include exact tree types\")\n .option(\"--no-include-tree\", \"Omit exact tree types\")\n .option(\"--yes\", \"Save without confirmation, including updates to an existing config\")\n .option(\"--generate\", \"Generate the configured types file after saving\")\n .option(\"--no-generate\", \"Save configuration without generating types\")\n .option(\"--no-browser\", \"Do not open a browser if login is needed\")\n .addOption(\n new Option(\"--credential-store <store>\", \"Credential store for a new login\").choices([\n \"keyring\",\n \"file\"\n ] as const)\n )\n .action(async (_options, command) => {\n await init(command.optsWithGlobals(), signal);\n });\n\n auth\n .command(\"login\")\n .description(\"Sign in through browser device approval\")\n .option(\"--no-browser\", \"Display the URL and code without opening a browser\")\n .addOption(\n new Option(\n \"--credential-store <store>\",\n \"Store credentials in the OS keyring or an unencrypted private file\"\n ).choices([\"keyring\", \"file\"] as const)\n )\n .action(async (options, command) => {\n const context = await createCommandContext(command.optsWithGlobals(), signal, {\n allowNewProfile: true\n });\n\n await login(context, options);\n });\n auth\n .command(\"status\")\n .description(\"Verify the selected credential and show its identity as JSON\")\n .action(async (_options, command) => {\n await status(await createCommandContext(command.optsWithGlobals(), signal));\n });\n auth\n .command(\"logout\")\n .description(\n \"Revoke and remove the selected profile's credentials; leave API-key environment variables unchanged\"\n )\n .action(async (_options, command) => {\n await logout(await createCommandContext(command.optsWithGlobals(), signal));\n });\n\n program.addHelpText(\n \"after\",\n \"\\nConfiguration precedence: flags > environment > project > profile > defaults.\\nDefault API root: https://api.andesine.app\\nAPI keys are read from ANDESINE_API_KEY by authenticated commands.\"\n );\n program.hook(\"preAction\", () => {\n signal.throwIfAborted();\n });\n registerAPI(program, signal);\n registerTypes(program, signal);\n program.action(() => {\n program.outputHelp();\n });\n\n return program;\n};\n\nexport { createProgram };\n","import { CLIError, CancelledError, exitCodes } from \"./errors\";\nimport { createProgram } from \"./program\";\nimport { createOutput, writeOutput } from \"./output\";\nimport { CommanderError } from \"commander\";\n\n/** Run the executable and release signal listeners when it finishes. */\nconst runCLI = async (argv = process.argv): Promise<number> => {\n const controller = new AbortController();\n const program = createProgram(controller.signal);\n const cancel = () => {\n controller.abort(new CancelledError());\n };\n const handleOutputError = (error: NodeJS.ErrnoException) => {\n const isBrokenPipe = error.code === \"EPIPE\";\n\n controller.abort(\n new CLIError(\n isBrokenPipe ? \"Output pipe closed.\" : \"Cannot write output.\",\n isBrokenPipe ? exitCodes.success : exitCodes.failure\n )\n );\n };\n\n let exitCode: number = exitCodes.success;\n\n process.once(\"SIGINT\", cancel);\n process.once(\"SIGTERM\", cancel);\n process.stdout.on(\"error\", handleOutputError);\n process.stderr.on(\"error\", handleOutputError);\n\n try {\n await program.parseAsync(argv);\n controller.signal.throwIfAborted();\n } catch (error) {\n if (error instanceof CommanderError) {\n exitCode = error.exitCode === 0 ? exitCodes.success : exitCodes.usage;\n } else {\n const failure: unknown = controller.signal.aborted ? controller.signal.reason : error;\n const message = failure instanceof Error ? failure.message : \"Command failed.\";\n\n exitCode = failure instanceof CLIError ? failure.exitCode : exitCodes.failure;\n\n if (exitCode !== exitCodes.success && !process.stderr.destroyed) {\n await createOutput(program.opts().interactive)\n .error(message)\n .catch(() => {});\n }\n }\n } finally {\n // Commander writes synchronously. Drain its queued output before releasing error handlers.\n await Promise.allSettled([writeOutput(process.stdout, \"\"), writeOutput(process.stderr, \"\")]);\n process.removeListener(\"SIGINT\", cancel);\n process.removeListener(\"SIGTERM\", cancel);\n process.stdout.removeListener(\"error\", handleOutputError);\n process.stderr.removeListener(\"error\", handleOutputError);\n }\n\n if (controller.signal.aborted) {\n const reason: unknown = controller.signal.reason;\n\n return reason instanceof CLIError ? reason.exitCode : exitCodes.failure;\n }\n\n return exitCode;\n};\n\nexport { runCLI };\n","#!/usr/bin/env node\nimport { runCLI } from \"./run\";\n\nprocess.exitCode = await runCLI();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,MAAM,YAAY;CAAE,SAAS;CAAG,SAAS;CAAG,OAAO;CAAG,OAAO;CAAG,WAAW;AAAI;AAE/E,IAAM,WAAN,cAAuB,MAAM;CAGhB;CAFX,YACE,SACA,WAA4B,UAAU,SACtC;EACA,MAAM,OAAO;EAFJ,KAAA,WAAA;EAGT,KAAK,OAAO;CACd;AACF;AAEA,IAAM,iBAAN,cAA6B,SAAS;CACpC,cAAc;EACZ,MAAM,cAAc,UAAU,SAAS;EACvC,KAAK,OAAO;CACd;AACF;;;;;;;AEZA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ACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;GACT,KAAK;GACL,iBAAiB;EACnB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,QAAQ;IACV;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;GACT,UAAU;GACV,UAAU;GACV,UAAU;EACZ;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CAAC;EACT,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,KAAK,CAAC,cAAc,EACtB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,SAAS;IACX;IACA,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,MAAM;GACN,UAAU;EACZ;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,eACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,aAAa;GACb,YAAY;GACZ,SAAS;GACT,SAAS;GACT,SAAS;EACX;EACA,UAAU,CAAC;EACX,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM,CAAC,aAAa,SAAS;KAC7B,MAAM;IACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,KAAK,CAAC,aAAa,EACrB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,SAAS;IACX;IACA,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,MAAM;GACN,cAAc;EAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,QAAQ;EACV;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,QAAQ;KACR,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,aACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,QAAQ;EACV;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,cAAc;GACpB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS,CACP,EACE,SAAS,cACX,CACF;GACA,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO,EACL,MAAM,0CACR;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,cAAc;GACpB,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,eAAe;MACb,MAAM;MACN,WAAW;MACX,WAAW;KACb;KACA,sBAAsB;MACpB,MAAM;MACN,SAAS;KACX;KACA,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,cAAc;GACpB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,aAAa;GACnB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,MAAM,UACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,MAAM,UACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,cAAc;EAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,wBAAwB,KAC1B;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,SAAS,cACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,YAAY;GACZ,UAAU,CAAC,aAAa;GACxB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,eAAe;MACb,MAAM;MACN,WAAW;MACX,WAAW;KACb;KACA,sBAAsB;MACpB,MAAM;MACN,SAAS;KACX;KACA,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;GACT,WAAW;EACb;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,MAAM;GACN,aAAa,CAAC,SAAS;EACzB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,OAAO,EACL,MAAM,kCACR;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,aACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,OAAO,EACL,MAAM,kCACR;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,cAAc,eAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,mBAAmB;GACnB,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO;KACP,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,cAAc,eAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,mBAAmB;EACrB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,cAAc,eAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,YAAY,eACd;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;GACX;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,eACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,mBAAmB;EACrB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO;KACP,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO,CACL;MACE,MAAM;MACN,WAAW;MACX,WAAW;KACb,GACA,EACE,MAAM,OACR,CACF;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,UAAU,6BACZ;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,aAAa,CAAC,YAAY;GAC1B,gBAAgB;EAClB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,OAAO,CACL;MACE,MAAM;MACN,SAAS;KACX,GACA;MACE,MAAM;MACN,aACE;KACJ,CACF,EACF;KACA,SAAS,CAAC;KACV,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,aAAa,CAAC,YAAY;EAC5B;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,OAAO,CACL;MACE,MAAM;MACN,SAAS;KACX,GACA;MACE,MAAM;MACN,aACE;KACJ,CACF,EACF;KACA,SAAS,CAAC;KACV,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO,CACL;MACE,MAAM;MACN,WAAW;MACX,WAAW;KACb,GACA,EACE,MAAM,OACR,CACF;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CAAC;EACT,aAAa;EACb,UAAU;CACZ;AACF;AACA,MAAM,UAAsC;CAC1C,gBAAgB,EACd,OAAO;EACL,EACE,MAAM,0CACR;EACA,EACE,MAAM,4CACR;EACA,EACE,MAAM,6CACR;EACA,EACE,MAAM,0CACR;CACF,EACF;CACA,oBAAoB;EAClB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,OACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,UAAU;IACR,MAAM;KAAC;KAAO;KAAO;IAAM;IAC3B,MAAM;IACN,SAAS;GACX;GACA,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,WAAW;IACb;GACF;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;EAAQ;CACpC;CACA,sBAAsB;EACpB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,SACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,UAAU,EACR,MAAM,0CACR;GACA,OAAO,EACL,MAAM,SACR;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;GAAY;EAAO;CAC/C;CACA,oBAAoB;EAClB,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;CACR;CACA,uBAAuB;EACrB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,UACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,OAAO,EACL,MAAM,UACR;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;EAAO;CACnC;CACA,oBAAoB;EAClB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,OACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,UAAU,EACR,MAAM,0CACR;GACA,OAAO,EACL,MAAM,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D;GACL,MAAM,UAAmB,WAAW,OAAO,UAAU,WAAW,OAAO,SAAS;GAChF,MAAM,UAAU,mBAAmB,QAAQ,QAAQ,UAAU;GAE7D,WAAW,mBAAmB,WAAW,QAAQ,WAAW,UAAU;GAEtE,IAAI,aAAa,UAAU,WAAW,CAAC,QAAQ,OAAO,WACpD,MAAM,aAAa,QAAQ,KAAK,CAAC,CAAC,WAAW,CAAC,CAC3C,MAAM,OAAO,CAAC,CACd,YAAY,CAAC,CAAC;EAErB;CACF,UAAU;EAER,MAAM,QAAQ,WAAW,CAAC,YAAY,QAAQ,QAAQ,EAAE,GAAG,YAAY,QAAQ,QAAQ,EAAE,CAAC,CAAC;EAC3F,QAAQ,eAAe,UAAU,MAAM;EACvC,QAAQ,eAAe,WAAW,MAAM;EACxC,QAAQ,OAAO,eAAe,SAAS,iBAAiB;EACxD,QAAQ,OAAO,eAAe,SAAS,iBAAiB;CAC1D;CAEA,IAAI,WAAW,OAAO,SAAS;EAC7B,MAAM,SAAkB,WAAW,OAAO;EAE1C,OAAO,kBAAkB,WAAW,OAAO,WAAW,UAAU;CAClE;CAEA,OAAO;AACT;;;AC7DA,QAAQ,WAAW,MAAM,OAAO"}
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../src/errors.ts","../package.json","../src/config/files.ts","../src/config/schema.ts","../src/config/resolve.ts","../src/output.ts","../src/prompts.ts","../src/context.ts","../src/auth/schema.ts","../src/storage/files.ts","../src/storage/credentials.ts","../src/storage/lock.ts","../src/storage/profiles.ts","../src/auth/oauth.ts","../src/auth/client.ts","../src/auth/login.ts","../src/auth/logout.ts","../src/auth/status.ts","../src/content/collections.ts","../src/types/options.ts","../src/init/choices.ts","../src/init/write-config.ts","../src/api/errors.ts","../src/types/source.ts","../src/types/schema.ts","../src/types/tree.ts","../src/types/generate.ts","../src/types/file.ts","../src/types/metadata.ts","../src/types/execute.ts","../src/init/index.ts","../src/pages/init.ts","../src/api/manifest.ts","../src/api/input.ts","../src/api/bindings.ts","../src/api/binary.ts","../src/api/execute.ts","../src/api/register.ts","../src/types/register.ts","../src/program.ts","../src/run.ts","../src/cli.ts"],"sourcesContent":["/** Process exit codes shared by commands and the executable. */\nconst exitCodes = { success: 0, failure: 1, usage: 2, stale: 3, cancelled: 130 } as const;\n\nclass CLIError extends Error {\n constructor(\n message: string,\n readonly exitCode: number = exitCodes.failure\n ) {\n super(message);\n this.name = \"CLIError\";\n }\n}\n\nclass CancelledError extends CLIError {\n constructor() {\n super(\"Cancelled.\", exitCodes.cancelled);\n this.name = \"CancelledError\";\n }\n}\n\nexport { CLIError, CancelledError, exitCodes };\n","","import { CLIError, exitCodes } from \"../errors\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport type * as z from \"zod\";\n\n/** Read declarative JSON only. Missing optional files are distinct from invalid files. */\nconst readConfigFile = async <Schema extends z.ZodType>(\n filePath: string,\n schema: Schema,\n optional = false\n): Promise<z.output<Schema> | undefined> => {\n let content: string;\n let value: unknown;\n\n try {\n content = await readFile(filePath, \"utf8\");\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n\n if (optional && code === \"ENOENT\") return undefined;\n\n throw new CLIError(`Cannot read ${filePath} (${code ?? \"filesystem error\"}).`, exitCodes.usage);\n }\n\n try {\n value = JSON.parse(content);\n } catch {\n throw new CLIError(`Invalid JSON in ${filePath}.`, exitCodes.usage);\n }\n\n const result = schema.safeParse(value);\n\n if (!result.success) {\n // Report field locations without echoing values that could contain a pasted secret.\n const fields = [...new Set(result.error.issues.map((issue) => issue.path.join(\".\") || \"root\"))];\n\n throw new CLIError(\n `Invalid configuration in ${filePath}. Check: ${fields.join(\", \")}.`,\n exitCodes.usage\n );\n }\n\n return result.data;\n};\n\n/** Find the nearest andesine.json. Only init can select a missing explicit file. */\nconst findProjectConfig = async <Schema extends z.ZodType>(\n cwd: string,\n schema: Schema,\n explicitPath?: string,\n allowMissingExplicit = false\n): Promise<{ path: string; value: z.output<Schema> } | undefined> => {\n let directory = path.resolve(cwd);\n\n if (explicitPath !== undefined) {\n const filePath = path.resolve(directory, explicitPath);\n const value = await readConfigFile(filePath, schema, allowMissingExplicit);\n\n return value === undefined ? undefined : { path: filePath, value };\n }\n\n while (true) {\n const filePath = path.join(directory, \"andesine.json\");\n const value = await readConfigFile(filePath, schema, true);\n const parent = path.dirname(directory);\n\n if (value !== undefined) return { path: filePath, value };\n if (parent === directory) return undefined;\n\n directory = parent;\n }\n};\n\nexport { readConfigFile, findProjectConfig };\n","import * as z from \"zod\";\n\nconst nonemptyString = z.string().trim().min(1);\nconst workspaceIDSchema = z\n .string()\n .regex(/^ws_[A-Za-z\\d]{1,22}$/, \"Expected a workspace ID (ws_…).\");\nconst sourceSchema = z.union([\n z.strictObject({\n kind: z.literal(\"published\"),\n channel: nonemptyString.max(50).default(\"published\")\n }),\n z.strictObject({\n kind: z.literal(\"published\"),\n snapshotID: z.string().regex(/^snp_[A-Za-z\\d]{1,22}$/)\n }),\n z.strictObject({ kind: z.literal(\"current\") })\n]);\nconst typesConfigSchema = z.strictObject({\n source: sourceSchema.default({ kind: \"published\", channel: \"published\" }),\n collections: z\n .array(z.union([nonemptyString, z.strictObject({ collectionSlugPath: nonemptyString })]))\n .default([])\n .describe(\n \"Collection IDs, name paths, or objects with collectionSlugPath; empty selects all accessible collections.\"\n ),\n output: nonemptyString\n .default(\"src/andesine.generated.ts\")\n .describe(\n \"Output path relative to andesine.json, or the working directory when no config is present.\"\n ),\n includeEntryIDs: z.boolean().default(false),\n includeEntryPaths: z.boolean().default(false),\n includeTree: z.boolean().default(false)\n});\nconst projectConfigSchema = z.strictObject({\n $schema: z.string().optional(),\n version: z.literal(1),\n baseURL: z\n .url()\n .optional()\n .describe(\n \"HTTP(S) API root, optionally including a deployment prefix. No credentials, query, or fragment.\"\n ),\n workspaceID: workspaceIDSchema.optional(),\n profile: nonemptyString.optional(),\n types: typesConfigSchema.optional()\n});\nconst profileSchema = z.strictObject({\n baseURL: z.url(),\n workspaceID: workspaceIDSchema.optional(),\n accountID: nonemptyString.optional(),\n credentialRef: nonemptyString.optional()\n});\nconst userConfigSchema = z.strictObject({\n version: z.literal(1),\n defaultProfile: nonemptyString.optional(),\n profiles: z.record(nonemptyString, profileSchema)\n});\n\ntype ProjectConfig = z.output<typeof projectConfigSchema>;\ntype TypesConfig = z.output<typeof typesConfigSchema>;\ntype UserProfile = z.output<typeof profileSchema>;\n\nexport { projectConfigSchema, typesConfigSchema, userConfigSchema, workspaceIDSchema };\nexport type { ProjectConfig, TypesConfig, UserProfile };\n","import { CLIError, exitCodes } from \"../errors\";\nimport { findProjectConfig, readConfigFile } from \"./files\";\nimport {\n projectConfigSchema,\n typesConfigSchema,\n userConfigSchema,\n workspaceIDSchema,\n type TypesConfig,\n type UserProfile\n} from \"./schema\";\nimport { homedir } from \"node:os\";\nimport path from \"node:path\";\n\ninterface GlobalOptions {\n config?: string;\n profile?: string;\n baseUrl?: string;\n workspace?: string;\n interactive?: boolean;\n}\n\ninterface ResolveConfigOptions {\n flags?: GlobalOptions;\n cwd?: string;\n env?: NodeJS.ProcessEnv;\n userConfigPath?: string;\n allowNewProfile?: boolean;\n allowMissingConfig?: boolean;\n}\n\ninterface ResolvedConfig {\n baseURL: string;\n workspaceID?: string;\n configPath?: string;\n profileName?: string;\n /** Only present when the selected profile belongs to the resolved API root. */\n profile?: UserProfile;\n types: TypesConfig;\n}\n\n/** Canonical instance identity includes the deployment prefix, not just its origin. */\nconst normalizeBaseURL = (value: string): string => {\n const message = \"baseURL must be an HTTP(S) URL without credentials, query, or fragment.\";\n let url: URL;\n\n try {\n url = new URL(value);\n } catch {\n throw new CLIError(message, exitCodes.usage);\n }\n\n const hasUnsupportedParts = url.username || url.password || url.search || url.hash;\n const isHTTP = url.protocol === \"http:\" || url.protocol === \"https:\";\n\n if (!isHTTP || hasUnsupportedParts) throw new CLIError(message, exitCodes.usage);\n\n return url.href.replace(/\\/+$/, \"\");\n};\n\n/** User metadata stays outside the project. This file must never contain tokens. */\nconst getUserConfigPath = (env: NodeJS.ProcessEnv): string => {\n const home = homedir();\n const defaultDirectory =\n process.platform === \"win32\"\n ? env.APPDATA || path.join(home, \"AppData\", \"Roaming\")\n : process.platform === \"darwin\"\n ? path.join(home, \"Library\", \"Application Support\")\n : path.join(home, \".config\");\n const directory = env.XDG_CONFIG_HOME || defaultDirectory;\n\n if (!path.isAbsolute(directory)) {\n throw new CLIError(\n \"The user configuration directory must be an absolute path.\",\n exitCodes.usage\n );\n }\n\n return path.join(directory, \"andesine\", \"profiles.json\");\n};\n\n/** Resolve flags > environment > project > selected profile > defaults, without credentials or I/O writes. */\nconst resolveConfig = async ({\n flags = {},\n cwd = process.cwd(),\n env = process.env,\n userConfigPath = getUserConfigPath(env),\n allowNewProfile = false,\n allowMissingConfig = false\n}: ResolveConfigOptions = {}): Promise<ResolvedConfig> => {\n const project = await findProjectConfig(\n cwd,\n projectConfigSchema,\n flags.config ?? env.ANDESINE_CONFIG,\n allowMissingConfig\n );\n const userConfig = await readConfigFile(userConfigPath, userConfigSchema, true);\n const profileName =\n flags.profile ?? env.ANDESINE_PROFILE ?? project?.value.profile ?? userConfig?.defaultProfile;\n const selectedProfile =\n profileName && userConfig && Object.hasOwn(userConfig.profiles, profileName)\n ? userConfig.profiles[profileName]\n : undefined;\n\n if (profileName !== undefined && !selectedProfile && !allowNewProfile) {\n throw new CLIError(\n \"The selected profile does not exist in the user configuration.\",\n exitCodes.usage\n );\n }\n\n const profileBaseURL = selectedProfile ? normalizeBaseURL(selectedProfile.baseURL) : undefined;\n const baseURL = normalizeBaseURL(\n flags.baseUrl ??\n env.ANDESINE_BASE_URL ??\n project?.value.baseURL ??\n profileBaseURL ??\n \"https://api.andesine.app\"\n );\n const profile =\n selectedProfile && profileBaseURL === baseURL ? { ...selectedProfile, baseURL } : undefined;\n const workspaceID =\n flags.workspace ??\n env.ANDESINE_WORKSPACE_ID ??\n project?.value.workspaceID ??\n profile?.workspaceID;\n const types = project?.value.types ?? typesConfigSchema.parse({});\n const outputDirectory = project ? path.dirname(project.path) : path.resolve(cwd);\n\n if (workspaceID !== undefined && !workspaceIDSchema.safeParse(workspaceID).success) {\n throw new CLIError(\"workspaceID must be a workspace ID (ws_…).\", exitCodes.usage);\n }\n\n return {\n baseURL,\n workspaceID,\n configPath: project?.path,\n profileName,\n profile,\n types: { ...types, output: path.resolve(outputDirectory, types.output) }\n };\n};\n\nexport { resolveConfig, normalizeBaseURL, getUserConfigPath };\nexport type { GlobalOptions, ResolvedConfig, ResolveConfigOptions };\n","import type { Writable } from \"node:stream\";\nimport { styleText } from \"node:util\";\nimport { intro, log, note, spinner } from \"@clack/prompts\";\nimport { CLIError } from \"./errors\";\n\n/** Wait for each write so commands can stream results without an unbounded queue. */\nconst writeOutput = (stream: Writable, text: string | Uint8Array): Promise<void> => {\n return new Promise((resolve, reject) => {\n // Writes with a callback can also emit an error event on the stream.\n stream.once(\"error\", reject);\n stream.write(text, (error) => {\n if (error) reject(error);\n else {\n stream.removeListener(\"error\", reject);\n resolve();\n }\n });\n });\n};\n\nconst serializeJSON = (value: unknown): string => {\n const serialized = JSON.stringify(value);\n\n if (serialized === undefined) throw new CLIError(\"The result is not a JSON value.\");\n\n return `${serialized}\\n`;\n};\n\n/** Data goes to stdout; prompts and diagnostics go to stderr. */\nconst createOutput = (interactive = true, signal?: AbortSignal) => {\n const terminal = Boolean(\n interactive && process.stderr.isTTY && !process.env.CI && process.env.TERM !== \"dumb\"\n );\n const options = { output: process.stderr, withGuide: true };\n const diagnostic = async (\n message: string,\n level: \"info\" | \"success\" | \"warn\" | \"error\" = \"info\"\n ) => {\n if (terminal) log[level](message, options);\n else await writeOutput(process.stderr, `${message}\\n`);\n };\n\n return {\n json: (value: unknown) => writeOutput(process.stdout, serializeJSON(value)),\n text: (value: string) => writeOutput(process.stdout, value),\n diagnostic: (message: string) => diagnostic(message),\n success: (message: string) => diagnostic(message, \"success\"),\n warning: (message: string) => diagnostic(message, \"warn\"),\n error: (message: string) => diagnostic(message, \"error\"),\n heading: async (title: string) => {\n if (terminal) intro(styleText([\"bold\", \"cyan\"], title, { stream: process.stderr }), options);\n else await writeOutput(process.stderr, `${title}\\n`);\n },\n note: async (title: string, fields: Record<string, string | undefined>) => {\n const lines = Object.entries(fields).flatMap(([label, value]) => {\n if (value === undefined) return [];\n\n if (!terminal) return [`${label}: ${value}`];\n\n return [\n `${styleText(\"bold\", `${label}:`, { stream: process.stderr })} ${styleText(\"cyan\", value, { stream: process.stderr })}`\n ];\n });\n\n if (terminal) note(lines.join(\"\\n\"), title, options);\n else await writeOutput(process.stderr, `${title}\\n${lines.join(\"\\n\")}\\n`);\n },\n /** Always release the spinner and its listeners before errors or later output. */\n progress: async <Value>(\n message: string,\n action: () => Promise<Value>,\n complete: string\n ): Promise<Value> => {\n const loader = terminal\n ? spinner({ ...options, signal, cancelMessage: \"Cancelled.\" })\n : undefined;\n\n signal?.throwIfAborted();\n\n if (loader) loader.start(message);\n else await diagnostic(message);\n\n try {\n const result = await action();\n\n loader?.stop(complete);\n return result;\n } finally {\n loader?.clear();\n }\n }\n };\n};\n\nexport { createOutput, writeOutput };\n","import { CancelledError, CLIError, exitCodes } from \"./errors\";\nimport { isCancel } from \"@clack/prompts\";\nimport type { Readable, Writable } from \"node:stream\";\n\ninterface PromptOptions {\n input: Readable;\n output: Writable;\n signal: AbortSignal;\n}\n\n/** Keep Clack on stderr and prevent prompts in CI, pipes, and explicit non-interactive mode. */\nconst canPrompt = (interactive = true) => {\n return Boolean(interactive && process.stdin.isTTY && process.stderr.isTTY && !process.env.CI);\n};\nconst createPrompt = (signal: AbortSignal, interactive = true) => {\n const enabled = canPrompt(interactive);\n\n return async <Value>(\n run: (options: PromptOptions) => Promise<Value | symbol>\n ): Promise<Value> => {\n signal.throwIfAborted();\n\n if (!enabled) {\n throw new CLIError(\n \"Input is required. Supply the command flags or run in an interactive terminal.\",\n exitCodes.usage\n );\n }\n\n const value = await run({ input: process.stdin, output: process.stderr, signal });\n\n signal.throwIfAborted();\n\n if (isCancel(value)) throw new CancelledError();\n\n return value as Value;\n };\n};\n\nexport { canPrompt, createPrompt };\n","import {\n resolveConfig,\n type GlobalOptions,\n type ResolvedConfig,\n type ResolveConfigOptions\n} from \"./config/resolve\";\nimport { createOutput } from \"./output\";\nimport { createPrompt } from \"./prompts\";\n\ninterface CommandContext {\n config: ResolvedConfig;\n signal: AbortSignal;\n output: ReturnType<typeof createOutput>;\n prompt: ReturnType<typeof createPrompt>;\n}\n\n/** Create context inside command actions so help and version never read configuration. */\nconst createCommandContext = async (\n flags: GlobalOptions,\n signal: AbortSignal,\n options: Pick<ResolveConfigOptions, \"allowNewProfile\" | \"allowMissingConfig\"> = {}\n): Promise<CommandContext> => {\n signal.throwIfAborted();\n\n const config = await resolveConfig({ flags, ...options });\n\n signal.throwIfAborted();\n\n return {\n config,\n signal,\n output: createOutput(flags.interactive, signal),\n prompt: createPrompt(signal, flags.interactive)\n };\n};\n\nexport { createCommandContext };\nexport type { CommandContext };\n","import * as z from \"zod\";\n\nconst credentialsSchema = z.object({\n version: z.literal(1),\n baseURL: z.string(),\n accountID: z.string(),\n accessToken: z.string().min(1),\n refreshToken: z.string().min(1),\n expiresAt: z.number().finite(),\n refreshPending: z.boolean().default(false)\n});\nconst tokenResponseSchema = z.object({\n access_token: z.string().min(1),\n refresh_token: z.string().min(1),\n token_type: z.string().refine((value) => value.toLowerCase() === \"bearer\"),\n expires_in: z.number().int().positive(),\n scope: z.string().optional()\n});\nconst deviceResponseSchema = z.object({\n device_code: z.string().min(1),\n user_code: z.string().regex(/^[A-HJ-NP-Z2-9]{8}$/),\n verification_uri: z.url(),\n verification_uri_complete: z.url().optional(),\n expires_in: z.number().int().positive(),\n interval: z.number().int().positive().default(5)\n});\n\ntype Credentials = z.output<typeof credentialsSchema>;\ntype TokenResponse = z.output<typeof tokenResponseSchema>;\ntype DeviceResponse = z.output<typeof deviceResponseSchema>;\ntype StorageKind = \"keyring\" | \"file\";\n\nexport { credentialsSchema, tokenResponseSchema, deviceResponseSchema };\nexport type { Credentials, TokenResponse, DeviceResponse, StorageKind };\n","import { CLIError } from \"../errors\";\nimport { getUserConfigPath } from \"../config/resolve\";\nimport { chmod, lstat, mkdir, open, rename, unlink } from \"node:fs/promises\";\nimport { randomUUID } from \"node:crypto\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport path from \"node:path\";\n\nconst stateDirectory = () => path.dirname(getUserConfigPath(process.env));\nconst isMissing = (error: unknown) => (error as NodeJS.ErrnoException)?.code === \"ENOENT\";\n\n/** Create private CLI storage. Windows uses a protected ACL inherited by new files. */\nconst ensurePrivateDirectory = async (directory: string): Promise<void> => {\n await mkdir(directory, { recursive: true, mode: 0o700 });\n\n const info = await lstat(directory);\n\n if (!info.isDirectory() || info.isSymbolicLink()) {\n throw new CLIError(\"CLI storage must be a real directory.\");\n }\n\n if (process.platform !== \"win32\") {\n if (info.uid !== process.getuid?.()) {\n throw new CLIError(\"CLI storage must belong to the current user.\");\n }\n\n await chmod(directory, 0o700);\n return;\n }\n\n try {\n await promisify(execFile)(\n \"powershell.exe\",\n [\n \"-NoProfile\",\n \"-NonInteractive\",\n \"-Command\",\n `\n $ErrorActionPreference = 'Stop'\n $sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User\n $acl = New-Object System.Security.AccessControl.DirectorySecurity\n $acl.SetOwner($sid)\n $acl.SetAccessRuleProtection($true, $false)\n $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($sid, 'FullControl', 'ContainerInherit,ObjectInherit', 'None', 'Allow')\n $acl.AddAccessRule($rule)\n Set-Acl -LiteralPath $env:ANDESINE_STORAGE_PATH -AclObject $acl\n `\n ],\n {\n env: { ...process.env, ANDESINE_STORAGE_PATH: directory },\n timeout: 10_000,\n windowsHide: true\n }\n );\n } catch {\n throw new CLIError(\"Cannot restrict CLI storage to the current Windows account.\");\n }\n};\n\n/** Write and sync a private temporary file before replacing the destination. */\nconst writePrivateJSON = async (file: string, value: unknown): Promise<void> => {\n const temporary = `${file}.${randomUUID()}.tmp`;\n\n await ensurePrivateDirectory(path.dirname(file));\n\n const handle = await open(temporary, \"wx\", 0o600);\n\n try {\n await handle.writeFile(`${JSON.stringify(value, null, 2)}\\n`, \"utf8\");\n await handle.sync();\n await handle.close();\n await rename(temporary, file);\n\n if (process.platform !== \"win32\") {\n const directory = await open(path.dirname(file), \"r\");\n try {\n await directory.sync();\n } finally {\n await directory.close();\n }\n }\n } finally {\n await handle.close();\n await unlink(temporary).catch((error: unknown) => {\n if (!isMissing(error)) throw error;\n });\n }\n};\n\nexport { stateDirectory, isMissing, ensurePrivateDirectory, writePrivateJSON };\n","import { credentialsSchema, type Credentials, type StorageKind } from \"../auth/schema\";\nimport { CLIError } from \"../errors\";\nimport { ensurePrivateDirectory, isMissing, stateDirectory, writePrivateJSON } from \"./files\";\nimport { constants } from \"node:fs\";\nimport { open, unlink } from \"node:fs/promises\";\nimport path from \"node:path\";\n\ninterface CredentialStore {\n get(): Promise<Credentials | undefined>;\n set(value: Credentials): Promise<void>;\n delete(): Promise<void>;\n}\n\nconst parseCredentials = (value: string): Credentials => {\n try {\n return credentialsSchema.parse(JSON.parse(value));\n } catch {\n throw new CLIError(\"Stored credentials are invalid. Run auth login again.\");\n }\n};\nconst credentialStore = async (\n reference: string,\n signal?: AbortSignal\n): Promise<CredentialStore> => {\n const match = /^(keyring|file):([a-f0-9-]{36})$/.exec(reference);\n\n if (!match) throw new CLIError(\"Invalid credential reference. Run auth login again.\");\n\n const kind = match[1] as StorageKind;\n const id = match[2];\n\n if (kind === \"keyring\") {\n try {\n const { AsyncEntry } = await import(\"@napi-rs/keyring\");\n const entry = new AsyncEntry(\"app.andesine.cli\", id, { linux: { store: \"secret-service\" } });\n const safely = async <Value>(\n run: (signal: AbortSignal) => Promise<Value>\n ): Promise<Value> => {\n try {\n return await run(\n AbortSignal.any([AbortSignal.timeout(15_000), ...(signal ? [signal] : [])])\n );\n } catch {\n throw new CLIError(\n \"The OS credential store is unavailable. Unlock it and try again, or use auth login --credential-store file.\"\n );\n }\n };\n\n return {\n get: async () => {\n const value = await safely((signal) => entry.getPassword(signal));\n return value === undefined ? undefined : parseCredentials(value);\n },\n set: (value) => safely((signal) => entry.setPassword(JSON.stringify(value), signal)),\n delete: async () => {\n await safely((signal) => entry.deletePassword(signal));\n }\n };\n } catch {\n throw new CLIError(\n \"The OS credential store is unavailable. Use auth login --credential-store file for explicit file storage.\"\n );\n }\n }\n\n const directory = path.join(stateDirectory(), \"credentials\");\n const file = path.join(directory, `${id}.json`);\n\n return {\n get: async () => {\n await ensurePrivateDirectory(directory);\n\n let handle;\n\n try {\n handle = await open(file, constants.O_RDONLY | (constants.O_NOFOLLOW || 0));\n const info = await handle.stat();\n const privateFile =\n process.platform === \"win32\" ||\n ((info.mode & 0o077) === 0 && info.uid === process.getuid?.());\n\n if (!info.isFile() || !privateFile) {\n throw new CLIError(\n \"Credential file permissions must allow only the current user (0600).\"\n );\n }\n\n return parseCredentials(await handle.readFile(\"utf8\"));\n } catch (error) {\n if (isMissing(error)) return undefined;\n\n if (error instanceof CLIError) throw error;\n throw new CLIError(\"Cannot read the credential file.\");\n } finally {\n await handle?.close();\n }\n },\n set: (value) => writePrivateJSON(file, value),\n delete: async () => {\n await unlink(file).catch((error: unknown) => {\n if (!isMissing(error)) throw new CLIError(\"Cannot remove the credential file.\");\n });\n }\n };\n};\n\nexport { credentialStore };\nexport type { CredentialStore };\n","import { CLIError } from \"../errors\";\nimport { ensurePrivateDirectory, stateDirectory } from \"./files\";\nimport { createHash } from \"node:crypto\";\nimport { setTimeout } from \"node:timers/promises\";\nimport path from \"node:path\";\nimport lockfile from \"proper-lockfile\";\n\n/** Serialize metadata updates and token rotation across CLI processes. */\nconst withStateLock = async <Value>(\n name: string,\n signal: AbortSignal,\n run: (assertOwned: () => void) => Promise<Value>\n): Promise<Value> => {\n const directory = path.join(stateDirectory(), \"locks\");\n const target = path.join(directory, createHash(\"sha256\").update(name).digest(\"hex\"));\n const deadline = Date.now() + 150_000;\n let compromised = false;\n let release: (() => Promise<void>) | undefined;\n\n await ensurePrivateDirectory(directory);\n\n while (!release) {\n signal.throwIfAborted();\n\n try {\n release = await lockfile.lock(target, {\n realpath: false,\n stale: 120_000,\n update: 10_000,\n onCompromised: () => {\n compromised = true;\n }\n });\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== \"ELOCKED\") {\n throw new CLIError(\"Cannot lock CLI storage.\");\n }\n\n if (Date.now() >= deadline) {\n throw new CLIError(\"Another CLI process is using these credentials. Try again later.\");\n }\n\n await setTimeout(100, undefined, { signal });\n }\n }\n\n const assertOwned = () => {\n signal.throwIfAborted();\n if (compromised) {\n throw new CLIError(\"The credential lock was lost. Run auth status before retrying.\");\n }\n };\n\n try {\n assertOwned();\n return await run(assertOwned);\n } finally {\n await release().catch(() => {\n /* A compromised lock belongs to another process. */\n });\n }\n};\n\nexport { withStateLock };\n","import { readConfigFile } from \"../config/files\";\nimport { getUserConfigPath } from \"../config/resolve\";\nimport { userConfigSchema, type UserProfile } from \"../config/schema\";\nimport { CLIError } from \"../errors\";\nimport { writePrivateJSON } from \"./files\";\nimport { withStateLock } from \"./lock\";\n\n/** Compare before writing, so a concurrent login cannot replace an unseen profile. */\nconst saveProfile = async (\n name: string,\n profile: UserProfile,\n expected: UserProfile | undefined,\n signal: AbortSignal\n): Promise<void> => {\n await withStateLock(\"profiles\", signal, async (assertOwned) => {\n const file = getUserConfigPath(process.env);\n const config = (await readConfigFile(file, userConfigSchema, true)) || {\n version: 1 as const,\n profiles: {}\n };\n const previous = Object.hasOwn(config.profiles, name) ? config.profiles[name] : undefined;\n\n if (JSON.stringify(previous) !== JSON.stringify(expected)) {\n throw new CLIError(\n \"This profile changed during login. Retry with a different --profile name.\"\n );\n }\n\n assertOwned();\n await writePrivateJSON(file, {\n ...config,\n defaultProfile: config.defaultProfile || name,\n profiles: { ...config.profiles, [name]: profile }\n });\n });\n};\nconst clearProfileCredential = async (\n name: string,\n reference: string,\n signal: AbortSignal\n): Promise<void> => {\n await withStateLock(\"profiles\", signal, async (assertOwned) => {\n const file = getUserConfigPath(process.env);\n const config = await readConfigFile(file, userConfigSchema, true);\n const profile =\n config && Object.hasOwn(config.profiles, name) ? config.profiles[name] : undefined;\n\n if (!config || profile?.credentialRef !== reference) return;\n\n const { credentialRef: _, ...remaining } = profile;\n\n assertOwned();\n await writePrivateJSON(file, {\n ...config,\n profiles: { ...config.profiles, [name]: remaining }\n });\n });\n};\n\nexport { saveProfile, clearProfileCredential };\n","import { CLIError } from \"../errors\";\nimport { deviceResponseSchema, tokenResponseSchema, type TokenResponse } from \"./schema\";\nimport { setTimeout } from \"node:timers/promises\";\nimport type * as z from \"zod\";\n\nconst CLIENT_ID = \"andesine-cli\";\nconst SCOPES = \"andesine:api offline_access\";\nconst DEVICE_GRANT = \"urn:ietf:params:oauth:grant-type:device_code\";\n\nclass OAuthError extends CLIError {\n constructor(\n readonly code: string,\n readonly retryAfter = 0\n ) {\n super(\"The authorization request failed. Run auth login again.\");\n }\n}\n\n/** Send credentials only to this instance, in a form body, without redirects or retries. */\nconst oauthRequest = async (\n baseURL: string,\n endpoint: string,\n fields: Record<string, string>,\n signal: AbortSignal\n): Promise<unknown> => {\n let response: Response;\n\n try {\n response = await fetch(`${baseURL}/auth/${endpoint}`, {\n method: \"POST\",\n redirect: \"error\",\n headers: {\n \"content-type\": \"application/x-www-form-urlencoded\",\n \"accept\": \"application/json\"\n },\n body: new URLSearchParams({ client_id: CLIENT_ID, ...fields }),\n signal: AbortSignal.any([signal, AbortSignal.timeout(30_000)])\n });\n } catch {\n signal.throwIfAborted();\n throw new OAuthError(\"network_error\");\n }\n\n const body: unknown = await response.json().catch(() => undefined);\n\n if (!response.ok) {\n const code =\n body && typeof body === \"object\" && \"error\" in body && typeof body.error === \"string\"\n ? body.error\n : \"server_error\";\n const retryAfter = Number(response.headers.get(\"retry-after\"));\n\n throw new OAuthError(\n response.status === 429 ? \"slow_down\" : code,\n Number.isFinite(retryAfter) ? Math.max(retryAfter, 0) : 0\n );\n }\n\n return body;\n};\nconst parseResponse = <Schema extends z.ZodType>(\n schema: Schema,\n value: unknown\n): z.output<Schema> => {\n const result = schema.safeParse(value);\n\n if (!result.success) {\n throw new CLIError(\"The instance returned an invalid authorization response.\");\n }\n\n return result.data;\n};\nconst startDeviceLogin = async (baseURL: string, signal: AbortSignal) => {\n const device = parseResponse(\n deviceResponseSchema,\n await oauthRequest(baseURL, \"device/code\", { scope: SCOPES, resource: baseURL }, signal)\n );\n const verification = new URL(device.verification_uri);\n const complete = new URL(device.verification_uri_complete || device.verification_uri);\n const validProtocol =\n verification.protocol === \"https:\" ||\n (new URL(baseURL).protocol === \"http:\" && verification.protocol === \"http:\");\n const validDestination =\n validProtocol &&\n !verification.username &&\n !verification.password &&\n complete.origin === verification.origin &&\n complete.pathname === verification.pathname &&\n !complete.username &&\n !complete.password &&\n !complete.hash &&\n (!device.verification_uri_complete ||\n complete.searchParams.get(\"user_code\") === device.user_code);\n\n if (!validDestination) {\n throw new CLIError(\"The instance returned an invalid browser authorization URL.\");\n }\n\n return device;\n};\nconst pollDeviceLogin = async (\n baseURL: string,\n device: Awaited<ReturnType<typeof startDeviceLogin>>,\n expiresAt: number,\n signal: AbortSignal\n): Promise<TokenResponse> => {\n let interval = device.interval * 1000;\n\n while (Date.now() < expiresAt) {\n await setTimeout(Math.min(interval, Math.max(expiresAt - Date.now(), 0)), undefined, {\n signal\n });\n if (Date.now() >= expiresAt) break;\n\n try {\n return parseResponse(\n tokenResponseSchema,\n await oauthRequest(\n baseURL,\n \"oauth2/token\",\n {\n grant_type: DEVICE_GRANT,\n device_code: device.device_code,\n resource: baseURL\n },\n signal\n )\n );\n } catch (error) {\n if (!(error instanceof OAuthError)) throw error;\n\n if (error.code === \"authorization_pending\") continue;\n\n if (error.code === \"slow_down\") {\n interval = Math.max(interval + 5000, error.retryAfter * 1000);\n continue;\n }\n\n if (error.code === \"network_error\" || error.code === \"server_error\") {\n interval = Math.max(interval * 2, 5000);\n continue;\n }\n\n if (error.code === \"access_denied\") throw new CLIError(\"Login was denied in the browser.\");\n\n if (error.code === \"expired_token\") break;\n\n throw new CLIError(\"The login request is no longer valid. Run auth login again.\");\n }\n }\n\n throw new CLIError(\"The login code expired. Run auth login again.\");\n};\nconst refreshAccess = async (baseURL: string, refreshToken: string, signal: AbortSignal) => {\n return parseResponse(\n tokenResponseSchema,\n await oauthRequest(\n baseURL,\n \"oauth2/token\",\n {\n grant_type: \"refresh_token\",\n refresh_token: refreshToken,\n resource: baseURL\n },\n signal\n )\n );\n};\nconst revokeAccess = async (\n baseURL: string,\n refreshToken: string,\n signal: AbortSignal\n): Promise<void> => {\n await oauthRequest(\n baseURL,\n \"oauth2/revoke\",\n { token: refreshToken, token_type_hint: \"refresh_token\" },\n signal\n );\n};\n\nexport { startDeviceLogin, pollDeviceLogin, refreshAccess, revokeAccess };\n","import { createClient, AndesineAPIError } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError } from \"../errors\";\nimport { credentialStore } from \"../storage/credentials\";\nimport { withStateLock } from \"../storage/lock\";\nimport { refreshAccess } from \"./oauth\";\n\n/** Select one credential source explicitly; never fall back after an authentication error. */\nconst authenticatedClient = async (context: CommandContext) => {\n const { config, signal } = context;\n const apiKey = process.env.ANDESINE_API_KEY;\n const headers = config.workspaceID ? { \"x-workspace-id\": config.workspaceID } : undefined;\n const fetcher: typeof fetch = (input, init) =>\n fetch(input, {\n ...init,\n redirect: \"error\",\n signal: AbortSignal.any([\n signal,\n ...(init?.signal ? [init.signal] : []),\n ...(input instanceof Request ? [input.signal] : [])\n ])\n });\n\n if (apiKey !== undefined) {\n if (!apiKey.trim()) {\n throw new CLIError(\n \"ANDESINE_API_KEY is empty. Set it or remove it before using saved credentials.\"\n );\n }\n\n return {\n client: createClient({ baseURL: config.baseURL, apiKey, headers, fetch: fetcher }),\n source: \"environment\" as const\n };\n }\n\n const reference = config.profile?.credentialRef;\n\n if (!reference) {\n throw new CLIError(\n \"No credentials for this instance. Run andesine auth login or set ANDESINE_API_KEY.\"\n );\n }\n\n const accessToken = await withStateLock(reference, signal, async (assertOwned) => {\n const store = await credentialStore(reference, signal);\n const credentials = await store.get();\n\n if (!credentials) throw new CLIError(\"Saved credentials were not found. Run auth login again.\");\n\n if (\n credentials.baseURL !== config.baseURL ||\n credentials.accountID !== config.profile?.accountID\n ) {\n throw new CLIError(\n \"Saved credentials do not match this instance and account. Run auth login again.\"\n );\n }\n\n if (credentials.refreshPending) {\n throw new CLIError(\n \"The previous token exchange was interrupted. Run auth login again; the old refresh token will not be reused.\"\n );\n }\n\n if (credentials.expiresAt > Date.now() + 60_000) return credentials.accessToken;\n\n assertOwned();\n\n await store.set({ ...credentials, refreshPending: true });\n\n assertOwned();\n\n try {\n const startedAt = Date.now();\n const tokens = await refreshAccess(config.baseURL, credentials.refreshToken, signal);\n\n assertOwned();\n\n await store.set({\n ...credentials,\n accessToken: tokens.access_token,\n refreshToken: tokens.refresh_token,\n expiresAt: startedAt + tokens.expires_in * 1000,\n refreshPending: false\n });\n return tokens.access_token;\n } catch {\n signal.throwIfAborted();\n throw new CLIError(\n \"Could not complete the token exchange. Run auth login again; the previous refresh token will not be reused.\"\n );\n }\n });\n\n return {\n client: createClient({ baseURL: config.baseURL, accessToken, headers, fetch: fetcher }),\n source: reference.startsWith(\"file:\") ? (\"file\" as const) : (\"keyring\" as const)\n };\n};\n\n/** Do not expose server error bodies or retry a dispatched request during auth recovery. */\nconst identity = async (client: ReturnType<typeof createClient>, signal: AbortSignal) => {\n try {\n return await client.auth.getIdentity(undefined, { signal });\n } catch (error) {\n signal.throwIfAborted();\n if (error instanceof AndesineAPIError && (error.status === 401 || error.status === 403)) {\n throw new CLIError(\n \"The credential is not authorized. Check ANDESINE_API_KEY or run auth login again.\"\n );\n }\n throw new CLIError(\n \"Cannot verify this credential with the instance. Check the connection and base URL.\"\n );\n }\n};\n\nexport { authenticatedClient, identity };\n","import type { CommandContext } from \"../context\";\nimport { CLIError, CancelledError } from \"../errors\";\nimport { credentialStore, type CredentialStore } from \"../storage/credentials\";\nimport { readConfigFile } from \"../config/files\";\nimport { getUserConfigPath, normalizeBaseURL } from \"../config/resolve\";\nimport { userConfigSchema } from \"../config/schema\";\nimport { saveProfile } from \"../storage/profiles\";\nimport { withStateLock } from \"../storage/lock\";\nimport { startDeviceLogin, pollDeviceLogin, revokeAccess } from \"./oauth\";\nimport { identity } from \"./client\";\nimport type { Credentials, StorageKind } from \"./schema\";\nimport { createClient } from \"@andesine/sdk\";\nimport { confirm } from \"@clack/prompts\";\nimport { randomUUID } from \"node:crypto\";\nimport openBrowser from \"open\";\n\ninterface LoginOptions {\n browser: boolean;\n credentialStore?: StorageKind;\n}\ninterface LoginStore {\n reference: string;\n store: CredentialStore;\n}\n\nconst prepareStore = async (context: CommandContext, kind: StorageKind): Promise<LoginStore> => {\n const reference = `${kind}:${randomUUID()}`;\n const store = await credentialStore(reference, context.signal);\n\n // Check write access before the user grants access in the browser.\n await store.set({\n version: 1,\n baseURL: context.config.baseURL,\n accountID: \"probe\",\n accessToken: \"probe\",\n refreshToken: \"probe\",\n expiresAt: 0,\n refreshPending: false\n });\n await store.delete();\n context.signal.throwIfAborted();\n return { reference, store };\n};\nconst selectStore = async (\n context: CommandContext,\n selected?: StorageKind\n): Promise<LoginStore> => {\n try {\n return await prepareStore(context, selected || \"keyring\");\n } catch (error) {\n context.signal.throwIfAborted();\n if (selected) throw error;\n\n await context.output.warning(\n \"The OS credential store is unavailable. File storage keeps unencrypted tokens in a file restricted to your user. Use --credential-store file to select it explicitly.\"\n );\n const accepted = await context.prompt((options) =>\n confirm({\n ...options,\n message: \"Use private file storage for this login?\",\n initialValue: false\n })\n );\n\n if (!accepted) throw new CancelledError();\n return prepareStore(context, \"file\");\n }\n};\n\n/** Grant approval stays in the browser; the CLI only polls the provider and saves its tokens. */\nconst login = async (\n context: CommandContext,\n options: LoginOptions,\n reportResult = true\n): Promise<void> => {\n const { config, signal, output } = context;\n const name = config.profileName || \"default\";\n const profiles = await readConfigFile(getUserConfigPath(process.env), userConfigSchema, true);\n const existing =\n profiles && Object.hasOwn(profiles.profiles, name) ? profiles.profiles[name] : undefined;\n\n if (existing && normalizeBaseURL(existing.baseURL) !== config.baseURL) {\n throw new CLIError(\n \"This profile belongs to another instance. Use --profile with a new name for this login.\"\n );\n }\n\n await output.heading(\"Andesine · Sign in\");\n await output.note(\"Login\", { Instance: config.baseURL, Profile: name });\n\n const storage = await selectStore(context, options.credentialStore);\n const device = await output.progress(\n \"Requesting a login code\",\n () => startDeviceLogin(config.baseURL, signal),\n \"Login code ready\"\n );\n const expiresAt = Date.now() + device.expires_in * 1000;\n\n await output.note(\"Authorize in your browser\", {\n Open: device.verification_uri,\n Code: device.user_code\n });\n await output.diagnostic(\"Approve access in your browser. Press Ctrl+C to cancel.\");\n\n if (options.browser) {\n try {\n signal.throwIfAborted();\n await openBrowser(device.verification_uri_complete || device.verification_uri, {\n wait: false\n });\n } catch {\n signal.throwIfAborted();\n await output.warning(\"Could not open a browser. Open the URL above and enter the code.\");\n }\n }\n\n const tokens = await output.progress(\n \"Waiting for browser approval\",\n () => pollDeviceLogin(config.baseURL, device, expiresAt, signal),\n \"Browser approval received\"\n );\n const tokenReceivedAt = Date.now();\n let saved = false;\n\n try {\n const client = createClient({\n baseURL: config.baseURL,\n accessToken: tokens.access_token,\n fetch: (input, init) => fetch(input, { ...init, redirect: \"error\" })\n });\n const account = await output.progress(\n \"Verifying your account\",\n () => identity(client, signal),\n \"Account verified\"\n );\n\n if (account.type !== \"oauth\") {\n throw new CLIError(\"The instance did not return an OAuth user identity.\");\n }\n\n const credentials: Credentials = {\n version: 1,\n baseURL: config.baseURL,\n accountID: account.user.id,\n accessToken: tokens.access_token,\n refreshToken: tokens.refresh_token,\n expiresAt: tokenReceivedAt + tokens.expires_in * 1000,\n refreshPending: false\n };\n const commit = async () => {\n signal.throwIfAborted();\n await storage.store.set(credentials);\n await saveProfile(\n name,\n {\n baseURL: config.baseURL,\n accountID: account.user.id,\n credentialRef: storage.reference,\n ...(config.workspaceID ? { workspaceID: config.workspaceID } : {})\n },\n config.profile,\n signal\n );\n saved = true;\n };\n const previousRef = config.profile?.credentialRef;\n\n if (previousRef) {\n await withStateLock(previousRef, signal, async (assertOwned) => {\n assertOwned();\n await commit();\n try {\n const previousStore = await credentialStore(previousRef, signal);\n const previous = await previousStore.get();\n\n if (previous?.refreshPending) {\n await output.warning(\n \"The previous token exchange was interrupted; its server grant may remain active.\"\n );\n } else if (previous) {\n if (\n previous.baseURL !== config.baseURL ||\n previous.accountID !== config.profile?.accountID\n ) {\n throw new CLIError(\"The previous credential does not match this account.\");\n }\n await revokeAccess(config.baseURL, previous.refreshToken, signal);\n }\n await previousStore.delete();\n } catch {\n await output.warning(\n \"New login saved. Could not fully remove the previous login; its server credentials may remain active.\"\n );\n }\n });\n } else {\n await commit();\n }\n\n await output.success(`Signed in as ${account.user.email}. Saved profile: ${name}.`);\n if (process.env.ANDESINE_API_KEY !== undefined) {\n await output.warning(\n \"ANDESINE_API_KEY is set and will still take precedence for API requests.\"\n );\n }\n\n if (reportResult) {\n await output.json({\n authenticated: true,\n profile: name,\n baseURL: config.baseURL,\n account: account.user,\n workspaceID: config.workspaceID ?? null,\n credentialSource: storage.reference.split(\":\")[0]\n });\n }\n } finally {\n if (!saved) {\n await revokeAccess(config.baseURL, tokens.refresh_token, AbortSignal.timeout(10_000)).catch(\n async () => {\n await output.warning(\n \"Login was not saved, and token revocation could not be confirmed. The server grant may remain active.\"\n );\n }\n );\n await credentialStore(storage.reference)\n .then((store) => store.delete())\n .catch(async () => {\n await output.warning(\"Could not remove the incomplete login from credential storage.\");\n });\n }\n }\n};\n\nexport { login };\nexport type { LoginOptions };\n","import type { CommandContext } from \"../context\";\nimport { CLIError } from \"../errors\";\nimport { credentialStore } from \"../storage/credentials\";\nimport { clearProfileCredential } from \"../storage/profiles\";\nimport { withStateLock } from \"../storage/lock\";\nimport { revokeAccess } from \"./oauth\";\n\n/** Remove this profile's credentials and report remote revocation separately. */\nconst logout = async (context: CommandContext): Promise<void> => {\n const { config, signal, output } = context;\n const reference = config.profile?.credentialRef;\n\n await output.heading(\"Andesine · Sign out\");\n\n if (process.env.ANDESINE_API_KEY !== undefined) {\n await output.warning(\n \"ANDESINE_API_KEY is unchanged. Remove it from your environment to stop using that API key.\"\n );\n }\n\n if (!reference || !config.profileName) {\n await output.diagnostic(\"No saved login for this profile.\");\n await output.json({ loggedOut: true, localRemoved: false, revocation: \"not-applicable\" });\n return;\n }\n\n const revoked = await output.progress(\n \"Signing out\",\n () =>\n withStateLock(reference, signal, async (assertOwned) => {\n const store = await credentialStore(reference, signal);\n const credentials = await store.get();\n let revoked = false;\n\n if (\n credentials &&\n (credentials.baseURL !== config.baseURL ||\n credentials.accountID !== config.profile?.accountID)\n ) {\n throw new CLIError(\"Stored credentials do not match the selected instance and account.\");\n }\n\n if (credentials && !credentials.refreshPending) {\n try {\n await revokeAccess(config.baseURL, credentials.refreshToken, signal);\n revoked = true;\n } catch {\n signal.throwIfAborted();\n }\n }\n\n assertOwned();\n await store.delete();\n await clearProfileCredential(config.profileName!, reference, signal);\n return revoked;\n }),\n \"Local credentials removed\"\n );\n\n await output.json({\n loggedOut: true,\n localRemoved: true,\n revocation: revoked ? \"confirmed\" : \"unconfirmed\"\n });\n await output.diagnostic(\n \"Local credentials removed. Access tokens from earlier rotations may remain valid for up to 15 minutes.\"\n );\n\n if (!revoked) {\n throw new CLIError(\n \"Server revocation could not be confirmed. The server grant may remain active.\"\n );\n }\n\n await output.success(\"Signed out. Server revocation confirmed.\");\n};\n\nexport { logout };\n","import type { CommandContext } from \"../context\";\nimport { authenticatedClient, identity } from \"./client\";\n\n/** Verify the selected credential online; output identity metadata only. */\nconst status = async (context: CommandContext): Promise<void> => {\n const { output } = context;\n\n await output.heading(\"Andesine · Authentication\");\n\n const { account, source } = await output.progress(\n \"Checking authentication\",\n async () => {\n const { client, source } = await authenticatedClient(context);\n const account = await identity(client, context.signal);\n\n return { account, source };\n },\n \"Authentication verified\"\n );\n\n await output.note(\"Authenticated\", {\n \"Instance\": context.config.baseURL,\n \"Account\": account.type === \"key\" ? undefined : account.user.email,\n \"API key\": account.type === \"key\" ? account.keyID : undefined,\n \"Profile\": source === \"environment\" ? undefined : context.config.profileName,\n \"Credentials\": source,\n \"Workspace\": account.type === \"key\" ? account.workspaceID : context.config.workspaceID\n });\n\n await context.output.json({\n authenticated: true,\n baseURL: context.config.baseURL,\n profile: source === \"environment\" ? null : context.config.profileName,\n credentialSource: source,\n account: account.type === \"key\" ? null : account.user,\n keyID: account.type === \"key\" ? account.keyID : undefined,\n workspaceID: account.type === \"key\" ? account.workspaceID : (context.config.workspaceID ?? null)\n });\n};\n\nexport { status };\n","import { paginate, type AndesineClient } from \"@andesine/sdk\";\nimport type { TypesConfig } from \"../config/schema\";\n\ninterface CollectionChoice {\n id: string;\n path: string;\n slugPath: string;\n}\n\n/** Read selectable collections from one published snapshot, or the current tree. */\nconst listCollections = async (\n client: AndesineClient,\n source: TypesConfig[\"source\"],\n signal: AbortSignal\n): Promise<CollectionChoice[]> => {\n const collections: CollectionChoice[] = [];\n\n if (source.kind === \"published\") {\n const { kind: _, ...selector } = source;\n\n for await (const collection of client.content.paginateCollections(selector, { signal })) {\n collections.push(collection);\n }\n } else {\n const queue: Array<string | undefined> = [undefined];\n const seen = new Set<string>();\n\n for (const collectionID of queue) {\n const scope = collectionID ? { collectionID } : {};\n\n for await (const collection of paginate((cursor) =>\n client.collections.list({ ...scope, cursor, limit: 100 }, { signal })\n )) {\n if (seen.has(collection.id)) continue;\n\n seen.add(collection.id);\n collections.push(collection);\n queue.push(collection.id);\n }\n }\n }\n\n return collections.sort((a, b) => a.path.localeCompare(b.path));\n};\n\n/** Let the public API resolve IDs and paths, including collection-ID anchors. */\nconst validateCollections = async (\n client: AndesineClient,\n source: TypesConfig[\"source\"],\n selectors: TypesConfig[\"collections\"],\n signal: AbortSignal\n): Promise<void> => {\n let snapshotID =\n source.kind === \"published\" && \"snapshotID\" in source ? source.snapshotID : undefined;\n\n for (const selector of selectors.length ? selectors : [undefined]) {\n const scope =\n selector === undefined\n ? {}\n : typeof selector !== \"string\"\n ? selector\n : /^coll_[A-Za-z\\d]+$/.test(selector)\n ? { collectionID: selector }\n : { collectionPath: selector };\n\n if (source.kind === \"current\") {\n await client.collections.list({ ...scope, limit: 1 }, { signal });\n } else {\n const publication = snapshotID\n ? { snapshotID }\n : { channel: \"channel\" in source ? source.channel : undefined };\n const page = await client.content.listCollections(\n { ...scope, ...publication, limit: 1 },\n { signal }\n );\n\n snapshotID = page.snapshotID;\n }\n }\n};\n\nexport { listCollections, validateCollections };\nexport type { CollectionChoice };\n","import type { ResolvedConfig } from \"../config/resolve\";\nimport { typesConfigSchema, type TypesConfig } from \"../config/schema\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport path from \"node:path\";\n\ninterface TypeOptions {\n source?: \"published\" | \"current\";\n channel?: string;\n snapshot?: string;\n collection?: string[];\n collectionSlugPath?: string[];\n allCollections?: boolean;\n output?: string;\n includeEntryIds?: boolean;\n includeEntryPaths?: boolean;\n includeTree?: boolean;\n}\ninterface GenerateOptions extends TypeOptions {\n check?: boolean;\n watch?: boolean;\n force?: boolean;\n interval?: string;\n}\n\nconst validateTypeOptions = (options: TypeOptions): void => {\n const invalidSource =\n (options.channel !== undefined && options.snapshot !== undefined) ||\n (options.source === \"current\" &&\n (options.channel !== undefined || options.snapshot !== undefined));\n\n if (invalidSource) {\n throw new CLIError(\n \"Use --channel or --snapshot for published content; neither can be used with --source current.\",\n exitCodes.usage\n );\n }\n\n if (options.allCollections && (options.collection || options.collectionSlugPath)) {\n throw new CLIError(\"Use collection selectors or --all-collections, not both.\", exitCodes.usage);\n }\n};\n\n/** Apply command overrides without changing the saved configuration. */\nconst collectionSelectors = (\n options: TypeOptions,\n initial: TypesConfig[\"collections\"]\n): TypesConfig[\"collections\"] => {\n if (options.allCollections) return [];\n if (options.collection === undefined && options.collectionSlugPath === undefined) return initial;\n\n return [\n ...(options.collection ?? []),\n ...(options.collectionSlugPath ?? []).map((collectionSlugPath) => ({ collectionSlugPath }))\n ];\n};\nconst resolveTypes = (config: ResolvedConfig, options: TypeOptions): TypesConfig => {\n const initial = config.types;\n const directory = config.configPath ? path.dirname(config.configPath) : process.cwd();\n let source = initial.source;\n\n validateTypeOptions(options);\n\n if (options.source === \"current\") {\n source = { kind: \"current\" };\n } else if (options.snapshot !== undefined) {\n source = { kind: \"published\", snapshotID: options.snapshot };\n } else if (options.source === \"published\" || options.channel !== undefined) {\n const previousChannel =\n initial.source.kind === \"published\" && \"channel\" in initial.source\n ? initial.source.channel\n : \"published\";\n\n source = { kind: \"published\", channel: options.channel ?? previousChannel };\n }\n\n const parsed = typesConfigSchema.safeParse({\n ...initial,\n source,\n collections: collectionSelectors(options, initial.collections),\n output: options.output ?? initial.output,\n includeEntryIDs: options.includeEntryIds ?? initial.includeEntryIDs,\n includeEntryPaths: options.includeEntryPaths ?? initial.includeEntryPaths,\n includeTree: options.includeTree ?? initial.includeTree\n });\n\n if (!parsed.success) {\n throw new CLIError(\n \"Invalid type options. Check the source, collection selectors, and output path.\",\n exitCodes.usage\n );\n }\n\n const output = path.resolve(directory, parsed.data.output);\n\n if (!/\\.(?:ts|mts|cts)$/.test(output) || output === config.configPath) {\n throw new CLIError(\n \"The types output must be a TypeScript file, separate from the configuration.\",\n exitCodes.usage\n );\n }\n\n return { ...parsed.data, collections: [...new Set(parsed.data.collections)], output };\n};\n\nexport { resolveTypes, validateTypeOptions, collectionSelectors };\nexport type { TypeOptions, GenerateOptions };\n","import { collectionSelectors } from \"../types/options\";\nimport { multiselect, select, text, confirm } from \"@clack/prompts\";\nimport type { AndesineClient } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport type { TypesConfig } from \"../config/schema\";\nimport { typesConfigSchema } from \"../config/schema\";\nimport { canPrompt } from \"../prompts\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { listCollections } from \"../content/collections\";\nimport type { InitOptions } from \"./options\";\n\ntype SourceMode = \"published\" | \"current\" | \"snapshot\";\n\nconst selectSource = async (\n context: CommandContext,\n client: AndesineClient,\n options: InitOptions,\n initial: TypesConfig[\"source\"]\n): Promise<TypesConfig[\"source\"]> => {\n const interactive = canPrompt(options.interactive);\n const initialMode =\n initial.kind === \"current\" ? \"current\" : \"snapshotID\" in initial ? \"snapshot\" : \"published\";\n const explicit =\n options.source !== undefined || options.channel !== undefined || options.snapshot !== undefined;\n let mode: SourceMode = initialMode;\n\n if (explicit) {\n mode = options.snapshot !== undefined ? \"snapshot\" : (options.source ?? \"published\");\n } else if (interactive) {\n mode = await context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"Which content should types describe?\",\n initialValue: initialMode,\n options: [\n {\n value: \"published\",\n label: \"Published channel\",\n hint: \"Default; follows each publication\"\n },\n {\n value: \"current\",\n label: \"Current content\",\n hint: \"Includes unpublished schema changes\"\n },\n { value: \"snapshot\", label: \"Fixed published snapshot\" }\n ]\n })\n );\n }\n\n if (mode === \"current\") return { kind: \"current\" };\n\n if (mode === \"snapshot\") {\n const initialSnapshot =\n initial.kind === \"published\" && \"snapshotID\" in initial ? initial.snapshotID : \"\";\n const snapshotID =\n options.snapshot ??\n (interactive\n ? await context.prompt((prompt) =>\n text({\n ...prompt,\n message: \"Snapshot ID\",\n initialValue: initialSnapshot,\n validate: (value) =>\n /^snp_[A-Za-z\\d]{1,22}$/.test(value ?? \"\")\n ? undefined\n : \"Enter a snapshot ID (snp_…).\"\n })\n )\n : initialSnapshot);\n\n return { kind: \"published\", snapshotID };\n }\n\n const initialChannel =\n initial.kind === \"published\" && \"channel\" in initial ? initial.channel : \"published\";\n\n if (options.channel !== undefined || !interactive) {\n return { kind: \"published\", channel: options.channel ?? initialChannel };\n }\n\n const channels = await context.output.progress(\n \"Loading publishing channels\",\n () => client.publishing.listChannels({}, { signal: context.signal }),\n \"Publishing channels loaded\"\n );\n\n if (!channels.length) {\n throw new CLIError(\n \"No publishing channels are available. Select --source current or create a channel in Andesine.\"\n );\n }\n\n const channel = await context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"Publishing channel\",\n initialValue: channels.some((item) => item.code === initialChannel)\n ? initialChannel\n : undefined,\n options: channels.map((item) => ({ value: item.code, label: item.name, hint: item.code }))\n })\n );\n\n return { kind: \"published\", channel };\n};\n\nconst selectTypes = async (\n context: CommandContext,\n client: AndesineClient,\n options: InitOptions,\n initial: TypesConfig\n): Promise<TypesConfig> => {\n const interactive = canPrompt(options.interactive);\n const source = await selectSource(context, client, options, initial.source);\n let collections = collectionSelectors(options, initial.collections);\n let output = options.output ?? initial.output;\n let includeEntryIDs = options.includeEntryIds ?? initial.includeEntryIDs;\n let includeEntryPaths = options.includeEntryPaths ?? initial.includeEntryPaths;\n let includeTree = options.includeTree ?? initial.includeTree;\n\n if (\n interactive &&\n options.collection === undefined &&\n options.collectionSlugPath === undefined &&\n !options.allCollections\n ) {\n const change =\n !collections.length ||\n (await context.prompt((prompt) =>\n confirm({\n ...prompt,\n message: \"Change the saved collection selection?\",\n initialValue: false\n })\n ));\n\n if (change) {\n const available = await context.output.progress(\n \"Loading collections\",\n () => listCollections(client, source, context.signal),\n \"Collections loaded\"\n );\n\n if (available.length) {\n const format = await context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"How should collections be saved?\",\n options: [\n { value: \"id\", label: \"IDs\", hint: \"Stable when collections are renamed\" },\n { value: \"path\", label: \"Paths\", hint: \"Readable names from the explorer\" },\n { value: \"slug\", label: \"Slug paths\", hint: \"URL paths derived from names\" }\n ]\n })\n );\n const selected = await context.prompt((prompt) =>\n multiselect({\n ...prompt,\n message: \"Collections (leave empty for all)\",\n required: false,\n initialValues: available\n .filter((item) =>\n collections.some((selector) =>\n typeof selector === \"string\"\n ? selector === item.id || selector === item.path\n : selector.collectionSlugPath === item.slugPath\n )\n )\n .map((item) => item.id),\n options: available.map((item) => ({ value: item.id, label: item.path, hint: item.id }))\n })\n );\n\n collections = available\n .filter((item) => selected.includes(item.id))\n .map((item) =>\n format === \"id\"\n ? item.id\n : format === \"slug\"\n ? { collectionSlugPath: item.slugPath }\n : item.path\n );\n } else {\n collections = [];\n await context.output.diagnostic(\n \"No collections yet. The configuration will include all collections as they become available.\"\n );\n }\n }\n }\n\n if (interactive && options.output === undefined) {\n output = await context.prompt((prompt) =>\n text({\n ...prompt,\n message: \"Generated types file (relative to the configuration)\",\n initialValue: output,\n validate: (value) => (value?.trim() ? undefined : \"Enter an output path.\")\n })\n );\n }\n\n const explicitIncludes =\n options.includeEntryIds !== undefined ||\n options.includeEntryPaths !== undefined ||\n options.includeTree !== undefined;\n\n if (interactive && !explicitIncludes) {\n const extras = await context.prompt((prompt) =>\n multiselect({\n ...prompt,\n message: \"Optional generated types\",\n required: false,\n initialValues: [\n includeEntryIDs ? \"ids\" : \"\",\n includeEntryPaths ? \"paths\" : \"\",\n includeTree ? \"tree\" : \"\"\n ].filter(Boolean),\n options: [\n { value: \"ids\", label: \"Entry IDs\" },\n { value: \"paths\", label: \"Entry paths\" },\n { value: \"tree\", label: \"Exact tree structure\" }\n ]\n })\n );\n\n includeEntryIDs = extras.includes(\"ids\");\n includeEntryPaths = extras.includes(\"paths\");\n includeTree = extras.includes(\"tree\");\n }\n\n const parsed = typesConfigSchema.safeParse({\n source,\n collections: [...new Set(collections)],\n output,\n includeEntryIDs,\n includeEntryPaths,\n includeTree\n });\n\n if (!parsed.success) {\n throw new CLIError(\n \"Invalid type configuration. Check the source, collection selectors, and output path.\",\n exitCodes.usage\n );\n }\n\n return parsed.data;\n};\n\nexport { selectTypes };\n","import { CLIError, exitCodes } from \"../errors\";\nimport type { ProjectConfig } from \"../config/schema\";\nimport { randomUUID } from \"node:crypto\";\nimport { link, lstat, mkdir, readFile, rename, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport lockfile from \"proper-lockfile\";\n\nconst readProjectFile = async (file: string): Promise<string | undefined> => {\n try {\n const info = await lstat(file);\n\n if (!info.isFile() || info.isSymbolicLink()) {\n throw new CLIError(\n \"The project configuration must be a regular file, not a link.\",\n exitCodes.usage\n );\n }\n\n return await readFile(file, \"utf8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n\n throw error;\n }\n};\n\n/** Recheck the reviewed file under a lock, then replace it with complete JSON. */\nconst writeProjectConfig = async (\n file: string,\n config: ProjectConfig,\n expected: string | undefined,\n signal: AbortSignal\n): Promise<void> => {\n const temporary = `${file}.${randomUUID()}.tmp`;\n let compromised = false;\n\n signal.throwIfAborted();\n await mkdir(path.dirname(file), { recursive: true });\n\n const release = await lockfile.lock(file, {\n realpath: false,\n onCompromised: () => {\n compromised = true;\n }\n });\n\n try {\n if ((await readProjectFile(file)) !== expected) {\n throw new CLIError(\"The project configuration changed during setup. Run init again.\");\n }\n\n const info = expected === undefined ? undefined : await lstat(file);\n\n await writeFile(temporary, `${JSON.stringify(config, null, 2)}\\n`, {\n flag: \"wx\",\n mode: info?.mode ?? 0o644\n });\n signal.throwIfAborted();\n\n if (compromised) throw new CLIError(\"The configuration lock was lost. Run init again.\");\n\n if (expected === undefined) {\n await link(temporary, file);\n } else {\n if ((await readProjectFile(file)) !== expected) {\n throw new CLIError(\"The project configuration changed during setup. Run init again.\");\n }\n\n await rename(temporary, file);\n }\n } finally {\n try {\n await unlink(temporary).catch((error: NodeJS.ErrnoException) => {\n if (error.code !== \"ENOENT\") throw error;\n });\n } finally {\n await release().catch((error: unknown) => {\n if (!compromised) throw error;\n });\n }\n }\n};\n\nexport { readProjectFile, writeProjectConfig };\n","import { AndesineAPIError, AndesineStreamProtocolError } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError } from \"../errors\";\n\n/** Keep structured API failures on stderr without exposing response bodies or credentials. */\nconst reportAPIError = async (context: CommandContext, error: unknown): Promise<never> => {\n context.signal.throwIfAborted();\n\n if (error instanceof AndesineAPIError || error instanceof AndesineStreamProtocolError) {\n const response = error.response;\n const details =\n error instanceof AndesineAPIError\n ? {\n status: error.status,\n data: error.defined ? error.data : undefined,\n hints: error.hints\n }\n : {};\n\n await context.output.diagnostic(\n JSON.stringify({\n error: {\n code: error.code,\n message: error.message,\n ...details,\n requestID: response.headers.get(\"x-request-id\") ?? undefined,\n retryAfter: response.headers.get(\"retry-after\") ?? undefined\n }\n })\n );\n\n const missingCapability = error instanceof AndesineAPIError && error.status === 501;\n\n throw new CLIError(\n missingCapability\n ? `${error.message} This server may not support the operation. Check its capabilities and version.`\n : error.message\n );\n }\n\n throw error;\n};\n\nexport { reportAPIError };\n","import { createHash } from \"node:crypto\";\n\ninterface NamedItem {\n key: string;\n label: string;\n}\n\nconst compare = (left: string, right: string): number => (left < right ? -1 : left > right ? 1 : 0);\nconst json = (value: unknown): string =>\n JSON.stringify(value)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\nconst literal = (value: string | null): string => json(value);\nconst union = (values: string[]): string =>\n [...new Set(values)].sort(compare).join(\" | \") || \"never\";\nconst tuple = (values: string[]): string => `[${values.join(\", \")}]`;\nconst hash = (value: string): string => createHash(\"sha256\").update(value).digest(\"hex\");\nconst identifier = (label: string): string => {\n const words = label.normalize(\"NFKC\").match(/[\\p{L}\\p{N}\\p{M}]+/gu) ?? [];\n const name = words\n .map((word) => {\n const [first, ...rest] = Array.from(word);\n\n return first.toUpperCase() + rest.join(\"\");\n })\n .join(\"\")\n .replace(/[^\\p{ID_Continue}]/gu, \"\");\n\n return /^[\\p{ID_Start}]/u.test(name) ? name : `_${name || \"Unnamed\"}`;\n};\n\n/** Allocate stable identifiers without using remote text as TypeScript syntax. */\nconst names = (items: NamedItem[], suffix: string): Map<string, string> => {\n const counts = new Map<string, number>();\n const result = new Map<string, string>();\n const used = new Set<string>();\n const sorted = [...items].sort((a, b) => compare(a.key, b.key));\n\n for (const item of sorted) {\n const base = `${identifier(item.label)}${suffix}`;\n\n counts.set(base, (counts.get(base) ?? 0) + 1);\n }\n\n for (const item of sorted) {\n const base = `${identifier(item.label)}${suffix}`;\n const digest = hash(item.key);\n\n let name = counts.get(base) === 1 ? base : `${base}_${digest.slice(0, 8)}`;\n let length = 8;\n\n while (used.has(name)) {\n length += 4;\n name = `${base}_${digest.slice(0, length)}`;\n }\n\n used.add(name);\n result.set(item.key, name);\n }\n\n return result;\n};\n\nexport { compare, json, literal, union, tuple, hash, names };\n","import type { SchemaField, SchemaProperty, SchemaRevision } from \"@andesine/sdk\";\nimport { compare, literal, union } from \"./source\";\n\n/** Match the API's derived field keys, including Unicode and empty-label fallbacks. */\nconst fieldKey = (field: SchemaField): string => {\n const fallback = field.kind === \"fragment\" ? \"content\" : \"property\";\n const source = Array.from(field.label.normalize(\"NFC\").trim()).slice(0, 50).join(\"\");\n const words = (source || fallback)\n .normalize(\"NFKC\")\n .replace(/([\\p{Ll}\\p{N}])(\\p{Lu})/gu, \"$1 $2\")\n .match(/[\\p{L}\\p{N}\\p{M}]+/gu);\n\n return (\n words\n ?.map((word, index) => {\n const [first = \"\", ...rest] = Array.from(word.toLowerCase());\n\n return `${index ? first.toUpperCase() : first}${rest.join(\"\")}`;\n })\n .join(\"\") || fallback\n );\n};\nconst propertyValue = (field: SchemaProperty): string => {\n switch (field.type) {\n case \"checkbox\":\n return \"boolean\";\n case \"number\":\n return \"number | null\";\n case \"select\":\n return union([literal(\"\"), ...field.options.map(literal)]);\n case \"multi-select\":\n return `Array<${union(field.options.map(literal))}>`;\n case \"text\":\n case \"date\":\n case \"url\":\n return \"string\";\n default:\n throw new Error(`Unsupported schema property type: ${String(field.type)}`);\n }\n};\nconst fieldMap = (fields: Map<string, string>): string => {\n const sorted = [...fields].sort(([a], [b]) => compare(a, b));\n\n return sorted.length\n ? `{\\n${sorted.map(([key, value]) => ` ${literal(key)}: ${value};`).join(\"\\n\")}\\n }`\n : \"Record<never, never>\";\n};\n\n/** Render effective fields only. Defaults are content, not constraints on field values. */\nconst schemaFields = (revision: SchemaRevision): string => {\n const groups = { property: new Map<string, string>(), fragment: new Map<string, string>() };\n\n if (revision.definition.formatVersion !== 1)\n throw new Error(\"Unsupported schema format version.\");\n\n for (const field of revision.definition.fields) {\n const key = fieldKey(field);\n const group = groups[field.kind];\n\n if (group.has(key)) throw new Error(`Duplicate ${field.kind} key ${literal(key)}.`);\n\n group.set(\n key,\n field.kind === \"property\"\n ? `{ name: string; type: ${literal(field.type)}; value: ${propertyValue(field)} }`\n : `{ name: string; content: FragmentDocument<${union(field.allowedBlocks.map(literal))}> }`\n );\n }\n\n return ` properties: ${fieldMap(groups.property)};\\n fragments: ${fieldMap(groups.fragment)};`;\n};\n\n// Only block kinds are constrained by schemas. Element names, props, marks, and\n// attributes remain general; default content must never become a schema for them.\nconst fragmentTypes = `type FragmentNode<Block extends string> = Omit<SDK.ContentNode, \"type\" | \"content\"> & {\n type: Block | \"paragraph\" | \"listItem\" | \"taskItem\" | \"tableRow\" | \"tableCell\" | \"tableHeader\" | \"text\" | \"hardBreak\";\n content?: Array<FragmentNode<Block>>;\n};\n\ntype FragmentDocument<Block extends string> = Omit<SDK.ContentNode, \"type\" | \"content\"> & {\n type: \"doc\";\n content: Array<Omit<FragmentNode<Block>, \"type\"> & { type: Block | \"paragraph\" }>;\n};`;\n\nexport { schemaFields, fragmentTypes };\n","import type { TypeMetadata, TypeMetadataCollection } from \"@andesine/sdk\";\nimport { literal, tuple } from \"./source\";\n\ninterface MetadataHierarchy {\n collections: Map<string | null, TypeMetadataCollection>;\n descendants: Map<string | null, string[]>;\n}\n\n/** Build selected subtrees. Missing parents are valid for a selected or restricted subtree. */\nconst hierarchy = (metadata: TypeMetadata): MetadataHierarchy => {\n const collections = new Map(\n metadata.collections.map((collection) => [collection.id, collection])\n );\n const children = new Map<string | null, TypeMetadataCollection[]>();\n const descendants = new Map<string | null, string[]>();\n const visiting = new Set<string | null>();\n const visit = (id: string | null): string[] => {\n if (visiting.has(id)) throw new Error(\"Type metadata contains a collection cycle.\");\n if (descendants.has(id)) return descendants.get(id)!;\n\n visiting.add(id);\n\n const result = (children.get(id) ?? []).flatMap((child) => [child.id!, ...visit(child.id)]);\n\n visiting.delete(id);\n descendants.set(id, result);\n\n return result;\n };\n\n if (collections.size !== metadata.collections.length) {\n throw new Error(\"Type metadata contains duplicate collection IDs.\");\n }\n\n for (const collection of metadata.collections) {\n if (collection.id === null) continue;\n\n const siblings = children.get(collection.parentID) ?? [];\n\n siblings.push(collection);\n children.set(collection.parentID, siblings);\n }\n\n for (const collection of metadata.collections) visit(collection.id);\n\n return { collections, descendants };\n};\n\n/** Emit ordered tree tuples without content bodies or runtime values. */\nconst treeTypes = (metadata: TypeMetadata, collectionNames: Map<string, string>): string[] => {\n const entries = new Map(metadata.entries!.map((entry) => [entry.id, entry]));\n const collections = new Map(\n metadata.collections.map((collection) => [collection.id, collection])\n );\n const rows = new Map(metadata.tree!.map((row) => [row.collectionID, row]));\n\n return metadata.collections.map((collection) => {\n const name = `${collectionNames.get(collection.id ?? \"/\")}Tree`;\n const row = rows.get(collection.id);\n\n if (!row) throw new Error(`Missing tree metadata for ${literal(collection.path)}.`);\n\n const childTrees = row.collectionIDs.map((id) => {\n const child = collections.get(id);\n\n if (!child || child.parentID !== collection.id) {\n throw new Error(`Invalid tree collection reference ${literal(id)}.`);\n }\n\n return `${collectionNames.get(id)}Tree`;\n });\n const childEntries = row.entryIDs.map((id) => {\n const entry = entries.get(id);\n\n if (!entry || entry.collectionID !== collection.id) {\n throw new Error(`Invalid tree entry reference ${literal(id)}.`);\n }\n\n return `Omit<SDK.PublishedEntry, \"id\" | \"name\" | \"path\" | \"slugPath\"> & { id: ${literal(id)}; name: ${literal(entry.name)}; path: ${literal(entry.path)}; slugPath: ${literal(entry.slugPath)} }`;\n });\n\n if (metadata.source.kind === \"current\") {\n return `export interface ${name} {\n collectionID: ${literal(collection.id)};\n collectionIDs: ${tuple(row.collectionIDs.map(literal))};\n entryIDs: ${tuple(row.entryIDs.map(literal))};\n}`;\n }\n\n return `export interface ${name} extends SDK.PublishedCollection {\n id: ${literal(collection.id)};\n name: ${literal(collection.name)};\n path: ${literal(collection.path)};\n slugPath: ${literal(collection.slugPath)};\n entries: ${tuple(childEntries)};\n collections: ${tuple(childTrees)};\n}`;\n });\n};\n\nexport { hierarchy, treeTypes };\n","import type { TypeMetadata } from \"@andesine/sdk\";\nimport type { TypesConfig } from \"../config/schema\";\nimport { compare, hash, json, literal, names, tuple, union } from \"./source\";\nimport { fragmentTypes, schemaFields } from \"./schema\";\nimport { hierarchy, treeTypes } from \"./tree\";\n\ninterface TypeGenerationOptions {\n /** Requested source. Omit to follow the metadata's channel or current source. */\n source?: TypesConfig[\"source\"];\n /** Requested collection selectors, recorded as provenance. Metadata is already scoped. */\n collections?: TypesConfig[\"collections\"];\n /** Emit exact ID bindings and per-collection entry ID unions. Defaults to false. */\n includeEntryIDs?: boolean;\n /** Emit exact path bindings and per-collection entry path unions. Defaults to false. */\n includeEntryPaths?: boolean;\n /** Emit ordered trees, including their entry identities. Defaults to false. */\n includeTree?: boolean;\n}\n\nconst GENERATED_TYPES_MARKER = \"// Generated by Andesine. Do not edit.\";\n\n/**\n * Convert public type metadata into deterministic, type-only TypeScript source.\n *\n * @param metadata - One complete current or published metadata response.\n * @param options - Source provenance and optional entry/tree exports. These do not filter\n * metadata; request the selected collections and optional metadata before calling this function.\n * @returns Source text with Workspace, collection, and revision types. No files are written.\n * @throws Error for unsupported metadata, inconsistent references, or missing requested extras.\n * No network, credentials, project config loading, or executable remote input is involved.\n */\nconst generateTypes = (metadata: TypeMetadata, options: TypeGenerationOptions = {}): string => {\n const includeEntries = Boolean(options.includeEntryIDs || options.includeEntryPaths);\n const requestedSource =\n options.source ??\n (metadata.source.kind === \"published\"\n ? { kind: \"published\", channel: metadata.source.channel }\n : { kind: \"current\" });\n const source: TypesConfig[\"source\"] =\n requestedSource.kind === \"current\"\n ? { kind: \"current\" }\n : \"snapshotID\" in requestedSource\n ? { kind: \"published\", snapshotID: requestedSource.snapshotID }\n : { kind: \"published\", channel: requestedSource.channel };\n const sourceMismatch =\n source.kind !== metadata.source.kind ||\n (source.kind === \"published\" &&\n metadata.source.kind === \"published\" &&\n ((\"channel\" in source && source.channel !== metadata.source.channel) ||\n (\"snapshotID\" in source && source.snapshotID !== metadata.source.snapshotID)));\n\n if (metadata.formatVersion !== 1) throw new Error(\"Unsupported type metadata format version.\");\n if (sourceMismatch) throw new Error(\"Type metadata does not match the requested source.\");\n\n if ((includeEntries || options.includeTree) && !metadata.entries) {\n throw new Error(\"Request entry metadata before generating entry or tree types.\");\n }\n\n if (options.includeTree && !metadata.tree) {\n throw new Error(\"Request tree metadata before generating tree types.\");\n }\n\n const collections = [...metadata.collections].sort((a, b) => compare(a.id ?? \"\", b.id ?? \"\"));\n const selected = { ...metadata, collections };\n const { descendants } = hierarchy(selected);\n const collectionNames = names(\n collections.map((row) => ({ key: row.id ?? \"/\", label: row.name || \"Root\" })),\n \"Collection\"\n );\n const revisions = new Map(metadata.revisions.map((revision) => [revision.revisionID, revision]));\n const usedRevisions = new Set(\n collections.flatMap((row) => row.schemaRevisionIDs).filter((id) => id !== null)\n );\n const entries =\n includeEntries || options.includeTree\n ? [...metadata.entries!].sort((a, b) => compare(a.id, b.id))\n : [];\n const collectionBindings = new Map<string, string>();\n const entryBindings = new Map<string, string>();\n const shapes = new Map<string, string>();\n const interfaces: string[] = [];\n const types: string[] = [];\n const schemaBindings: string[] = [];\n const treeBindings: string[] = [];\n const base = metadata.source.kind === \"published\" ? \"SDK.PublishedEntryContent\" : \"SDK.Entry\";\n const contentBase = `Omit<${base}, \"schema\" | \"properties\" | \"fragments\">`;\n const bind = (map: Map<string, string>, key: string, value: string) => {\n if (map.has(key) && map.get(key) !== value) {\n throw new Error(`Duplicate metadata selector ${literal(key)}.`);\n }\n\n map.set(key, value);\n };\n\n for (const collection of collections) {\n const name = collectionNames.get(collection.id ?? \"/\")!;\n\n bind(collectionBindings, collection.path, name);\n if (collection.slugPath !== collection.path) {\n bind(collectionBindings, collection.slugPath, name);\n }\n\n if (collection.id !== null) bind(collectionBindings, collection.id, name);\n }\n\n for (const entry of entries) {\n const collection = collectionBindings.get(entry.collectionID ?? \"/\");\n\n if (!collection) throw new Error(`Missing collection for entry ${literal(entry.id)}.`);\n if (entry.schemaRevisionID !== null) usedRevisions.add(entry.schemaRevisionID);\n\n const binding = `{ collection: ${literal(entry.collectionID ?? \"/\")}; schemaRevisionID: ${literal(entry.schemaRevisionID)} }`;\n\n if (options.includeEntryIDs) bind(entryBindings, entry.id, binding);\n\n if (options.includeEntryPaths) {\n bind(entryBindings, entry.path, binding);\n\n if (entry.slugPath !== entry.path) {\n bind(entryBindings, entry.slugPath, binding);\n }\n }\n }\n\n const revisionNames = names(\n [...usedRevisions].map((id) => ({ key: id, label: `Revision_${id}` })),\n \"Schema\"\n );\n\n for (const id of [...usedRevisions].sort(compare)) {\n const revision = revisions.get(id);\n\n if (!revision) throw new Error(`Missing schema revision ${literal(id)}.`);\n\n const fields = schemaFields(revision);\n const shapeName = `SchemaFields_${hash(fields)}`;\n const revisionName = revisionNames.get(id)!;\n\n shapes.set(shapeName, fields);\n interfaces.push(`export interface ${revisionName} extends ${shapeName} {\n hash: ${literal(revision.hash)};\n}`);\n types.push(\n `export type ${revisionName}Content = ${contentBase} & SDK.SchemaContent<Workspace, ${literal(id)}>;`\n );\n schemaBindings.push(` ${literal(id)}: ${revisionName};`);\n }\n\n for (const collection of collections) {\n const name = collectionNames.get(collection.id ?? \"/\")!;\n const ids = [...new Set(collection.schemaRevisionIDs)].sort((a, b) =>\n compare(a ?? \"\", b ?? \"\")\n );\n const childIDs = [...descendants.get(collection.id)!].sort(compare);\n const identity =\n metadata.source.kind === \"published\" ? ` & { collectionID: ${literal(collection.id)} }` : \"\";\n\n interfaces.push(`export interface ${name} extends SDK.WorkspaceCollection {\n id: ${literal(collection.id)};\n path: ${literal(collection.path)};\n slugPath: ${literal(collection.slugPath)};\n schemaRevisionIDs: readonly ${tuple(ids.map(literal))};\n descendants: readonly ${tuple(childIDs.map(literal))};\n}`);\n types.push(\n `export type ${name}Content = ${contentBase} & SDK.SchemaContent<Workspace, ${union(ids.map(literal))}>${identity};`\n );\n types.push(`export type ${name}StructuredContent = SDK.StructuredContent<${name}Content>;`);\n\n const collectionEntries = entries.filter((entry) => entry.collectionID === collection.id);\n\n if (options.includeEntryIDs) {\n types.push(\n `export type ${name}EntryID = ${union(collectionEntries.map((entry) => literal(entry.id)))};`\n );\n }\n\n if (options.includeEntryPaths) {\n types.push(\n `export type ${name}EntryPath = ${union(collectionEntries.map((entry) => literal(entry.path)))};`,\n `export type ${name}EntrySlugPath = ${union(collectionEntries.map((entry) => literal(entry.slugPath)))};`\n );\n }\n\n if (options.includeTree) {\n treeBindings.push(` ${literal(collection.path)}: ${name}Tree;`);\n if (collection.slugPath !== collection.path) {\n treeBindings.push(` ${literal(collection.slugPath)}: ${name}Tree;`);\n }\n if (collection.id !== null) treeBindings.push(` ${literal(collection.id)}: ${name}Tree;`);\n }\n }\n\n if (options.includeTree) {\n interfaces.push(...treeTypes(selected, collectionNames));\n types.push(`export type WorkspaceTree = {\\n${treeBindings.join(\"\\n\")}\\n};`);\n }\n\n const mapFields = [\n ` workspaceID: ${literal(metadata.workspaceID)};`,\n ` source: ${\n source.kind === \"current\"\n ? '{ kind: \"current\" }'\n : `{\n kind: \"published\";\n ${\"snapshotID\" in source ? `snapshotID: ${literal(source.snapshotID)};` : `channel: ${literal(source.channel)};`}\n }`\n };`,\n ` collections: {\\n${[...collectionBindings]\n .sort(([a], [b]) => compare(a, b))\n .map(([key, value]) => ` ${literal(key)}: ${value};`)\n .join(\"\\n\")}\\n };`,\n ` schemas: {\\n${schemaBindings.join(\"\\n\")}\\n };`\n ];\n\n if (includeEntries) {\n mapFields.push(\n ` entries: {\\n${[...entryBindings]\n .sort(([a], [b]) => compare(a, b))\n .map(([key, value]) => ` ${literal(key)}: ${value};`)\n .join(\"\\n\")}\\n };`\n );\n }\n\n if (options.includeTree && metadata.source.kind === \"published\") {\n mapFields.push(\" tree: WorkspaceTree;\");\n }\n\n return [\n [\n GENERATED_TYPES_MARKER,\n `// Workspace: ${literal(metadata.workspaceID)}; source: ${json(source)}.`,\n `// Collections: ${json([...(options.collections ?? [])].sort((a, b) => compare(json(a), json(b))))}; entry IDs: ${Boolean(options.includeEntryIDs)}; entry paths: ${Boolean(options.includeEntryPaths)}; tree: ${Boolean(options.includeTree)}.`,\n \"// Types only. Configure the runtime client for the same workspace and source.\"\n ].join(\"\\n\"),\n 'import type * as SDK from \"@andesine/sdk\";',\n `export interface Workspace extends SDK.WorkspaceTypeMap {\\n${mapFields.join(\"\\n\")}\\n}`,\n ...[...shapes]\n .sort(([a], [b]) => compare(a, b))\n .map(([name, fields]) => `interface ${name} {\\n${fields}\\n}`),\n ...interfaces,\n ...([...shapes.values()].some((fields) => fields.includes(\"FragmentDocument<\"))\n ? [fragmentTypes]\n : []),\n ...types,\n \"\"\n ].join(\"\\n\\n\");\n};\n\nexport { generateTypes, GENERATED_TYPES_MARKER };\nexport type { TypeGenerationOptions };\n","import { randomUUID } from \"node:crypto\";\nimport { link, lstat, mkdir, readFile, rename, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport lockfile from \"proper-lockfile\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { GENERATED_TYPES_MARKER } from \"./generate\";\n\n/** Read without creating files, directories, or locks. Reject links and non-regular files. */\nconst readTypesFile = async (file: string): Promise<string | undefined> => {\n try {\n const info = await lstat(file);\n\n if (!info.isFile() || info.isSymbolicLink()) {\n throw new CLIError(\"The types output must be a regular file, not a link.\", exitCodes.usage);\n }\n\n return await readFile(file, \"utf8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n\n throw error;\n }\n};\n\n/** Replace only a reviewed file, atomically, and leave identical output untouched. */\nconst writeTypesFile = async (\n file: string,\n source: string,\n expected: string | undefined,\n signal: AbortSignal,\n force = false\n): Promise<boolean> => {\n const temporary = `${file}.${randomUUID()}.tmp`;\n const generated = expected?.split(/\\r?\\n/, 1)[0] === GENERATED_TYPES_MARKER;\n\n let compromised = false;\n\n signal.throwIfAborted();\n\n if (expected !== undefined && !generated && !force) {\n throw new CLIError(\n `Refusing to replace ${file}: it is not an Andesine generated file. Choose another --output or use --force to replace it.`,\n exitCodes.usage\n );\n }\n\n if (expected === source && (await readTypesFile(file)) === source) return false;\n\n await mkdir(path.dirname(file), { recursive: true });\n\n const release = await lockfile.lock(file, {\n realpath: false,\n onCompromised: () => {\n compromised = true;\n }\n });\n const assertUnchanged = async () => {\n signal.throwIfAborted();\n\n if (compromised) throw new CLIError(\"The types file lock was lost. Run generation again.\");\n\n if ((await readTypesFile(file)) !== expected) {\n throw new CLIError(\"The types file changed during generation. Run generation again.\");\n }\n };\n\n try {\n await assertUnchanged();\n if (expected === source) return false;\n\n const info = expected === undefined ? undefined : await lstat(file);\n\n await writeFile(temporary, source, { flag: \"wx\", mode: info?.mode ?? 0o644 });\n await assertUnchanged();\n\n if (expected === undefined) await link(temporary, file);\n else await rename(temporary, file);\n\n return true;\n } finally {\n try {\n await unlink(temporary).catch((error: NodeJS.ErrnoException) => {\n if (error.code !== \"ENOENT\") throw error;\n });\n } finally {\n await release().catch((error: unknown) => {\n if (!compromised) throw error;\n });\n }\n }\n};\n\nexport { readTypesFile, writeTypesFile };\n","import { AndesineAPIError, type TypeMetadata } from \"@andesine/sdk\";\nimport { authenticatedClient } from \"../auth/client\";\nimport type { CommandContext } from \"../context\";\nimport type { TypesConfig } from \"../config/schema\";\nimport { CLIError, exitCodes } from \"../errors\";\n\n/** Only metadata read failures can be retried by watch; writes and auth exchanges cannot. */\nclass RetryableMetadataError extends Error {\n constructor(\n readonly failure: unknown,\n readonly retryAfter = 0\n ) {\n super(\"Could not read type metadata.\", { cause: failure });\n }\n}\n\nconst retryDelay = (error: AndesineAPIError): number => {\n const header = error.response.headers.get(\"retry-after\");\n\n if (!header) return 0;\n\n const seconds = Number(header);\n const delay = Number.isFinite(seconds) ? seconds * 1000 : Date.parse(header) - Date.now();\n\n return Number.isFinite(delay) ? Math.max(0, delay) : 0;\n};\n\n/** Refresh credentials between polls and read the selected public metadata endpoint. */\nconst readMetadata = async (context: CommandContext, types: TypesConfig): Promise<TypeMetadata> => {\n const { config, signal } = context;\n\n if (process.env.ANDESINE_API_KEY === undefined && !config.workspaceID) {\n throw new CLIError(\n \"No workspace selected. Run andesine init, pass --workspace <id>, or set ANDESINE_WORKSPACE_ID.\",\n exitCodes.usage\n );\n }\n\n const { client } = await authenticatedClient(context);\n const input = {\n collections: types.collections,\n includeEntries: types.includeEntryIDs || types.includeEntryPaths || types.includeTree,\n includeTree: types.includeTree\n };\n const request = { signal, retries: 0 };\n\n let metadata: TypeMetadata;\n\n try {\n metadata =\n types.source.kind === \"current\"\n ? await client.typeMetadata.getCurrent(input, request)\n : await client.typeMetadata.getPublished(\n {\n ...input,\n ...(\"snapshotID\" in types.source\n ? { snapshotID: types.source.snapshotID }\n : { channel: types.source.channel })\n },\n request\n );\n } catch (error) {\n signal.throwIfAborted();\n\n const transientAPIError =\n error instanceof AndesineAPIError &&\n (error.status === 408 ||\n error.status === 429 ||\n (error.status >= 500 && error.status !== 501) ||\n error.code === \"SCHEMA_MIGRATION_IN_PROGRESS\");\n const networkError =\n error instanceof TypeError ||\n (error instanceof DOMException && error.name === \"TimeoutError\");\n\n if (transientAPIError || networkError) {\n throw new RetryableMetadataError(\n error,\n error instanceof AndesineAPIError ? retryDelay(error) : 0\n );\n }\n\n throw error;\n }\n\n if (config.workspaceID && config.workspaceID !== metadata.workspaceID) {\n throw new CLIError(\n \"The API credential returned another workspace. Check --workspace and ANDESINE_API_KEY.\"\n );\n }\n\n return metadata;\n};\n\nexport { readMetadata, RetryableMetadataError };\n","import { setTimeout } from \"node:timers/promises\";\nimport type { TypeMetadata } from \"@andesine/sdk\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { reportAPIError } from \"../api/errors\";\nimport { generateTypes } from \"./generate\";\nimport { readTypesFile, writeTypesFile } from \"./file\";\nimport { readMetadata, RetryableMetadataError } from \"./metadata\";\nimport { resolveTypes, type GenerateOptions } from \"./options\";\n\ninterface GenerationResult {\n outputPath: string;\n workspaceID: string;\n source: TypeMetadata[\"source\"];\n fingerprint: string;\n status: \"generated\" | \"unchanged\" | \"current\" | \"stale\";\n}\ninterface GenerationCache {\n fingerprint: string;\n source: string;\n}\n\n/** Generate, check, or watch using the same metadata and output comparison. */\nconst executeTypes = async (\n context: CommandContext,\n options: GenerateOptions = {},\n emitResult = true\n): Promise<GenerationResult> => {\n const { output, signal } = context;\n const types = resolveTypes(context.config, options);\n const interval = Number(options.interval ?? \"10\") * 1000;\n\n if (options.check && (options.watch || options.force)) {\n throw new CLIError(\"--check cannot be combined with --watch or --force.\", exitCodes.usage);\n }\n\n if (options.interval !== undefined && !options.watch) {\n throw new CLIError(\"--interval requires --watch.\", exitCodes.usage);\n }\n\n if (!Number.isFinite(interval) || interval < 1000 || interval > 300_000) {\n throw new CLIError(\"--interval must be between 1 and 300 seconds.\", exitCodes.usage);\n }\n\n let cache: GenerationCache | undefined;\n let first = true;\n let failures = 0;\n let previousFailure: string | undefined;\n let force = options.force;\n\n const run = async (): Promise<GenerationResult> => {\n const expected = await readTypesFile(types.output);\n const metadata = await readMetadata(context, types);\n const source =\n cache?.fingerprint === metadata.fingerprint ? cache.source : generateTypes(metadata, types);\n const changed = options.check\n ? (await readTypesFile(types.output)) !== source\n : await writeTypesFile(types.output, source, expected, signal, force);\n\n signal.throwIfAborted();\n cache = { fingerprint: metadata.fingerprint, source };\n force = false;\n\n return {\n outputPath: types.output,\n workspaceID: metadata.workspaceID,\n source: metadata.source,\n fingerprint: metadata.fingerprint,\n status: options.check ? (changed ? \"stale\" : \"current\") : changed ? \"generated\" : \"unchanged\"\n };\n };\n\n await output.heading(\n `Andesine · ${options.check ? \"Check\" : options.watch ? \"Watch\" : \"Generate\"} content types`\n );\n await output.note(\"Type generation\", {\n Source: JSON.stringify(types.source),\n Collections:\n types.collections\n .map((selector) => (typeof selector === \"string\" ? selector : selector.collectionSlugPath))\n .join(\", \") || \"All accessible collections\",\n Output: types.output\n });\n\n if (options.watch) {\n await output.diagnostic(`Watching every ${interval / 1000}s. Press Ctrl+C to stop.`);\n }\n\n while (true) {\n let delay = interval;\n\n signal.throwIfAborted();\n\n try {\n const result = first\n ? await output.progress(\"Reading metadata and generating types\", run, \"Types checked\")\n : await run();\n const recovered = failures > 0;\n\n if (first || recovered || result.status === \"generated\") {\n if (recovered) await output.success(\"Metadata access restored.\");\n\n if (result.status === \"stale\") {\n await output.warning(\"Generated types are missing or out of date.\");\n } else {\n await output.success(\n result.status === \"generated\" ? \"Types generated.\" : \"Types are up to date.\"\n );\n }\n\n if (emitResult) await output.json(result);\n }\n\n if (result.status === \"stale\") {\n throw new CLIError(\n \"Run andesine types generate to update the types file.\",\n exitCodes.stale\n );\n }\n\n if (!options.watch) return result;\n\n first = false;\n failures = 0;\n previousFailure = undefined;\n } catch (error) {\n signal.throwIfAborted();\n\n if (!options.watch || !(error instanceof RetryableMetadataError)) {\n return reportAPIError(\n context,\n error instanceof RetryableMetadataError ? error.failure : error\n );\n }\n\n failures += 1;\n delay = Math.max(\n Math.min(interval * 2 ** Math.min(failures, 10), 60_000),\n interval,\n error.retryAfter\n );\n\n // Report the first failure and each changed error, then stay quiet until recovery.\n try {\n const message =\n error.failure instanceof Error ? error.failure.message : \"Metadata read failed.\";\n\n if (message !== previousFailure) {\n previousFailure = message;\n await reportAPIError(context, error.failure);\n }\n } catch (failure) {\n signal.throwIfAborted();\n\n const message = failure instanceof Error ? failure.message : \"Metadata read failed.\";\n\n await output.warning(\n `${message} Keeping the last types file. Retrying in ${Math.ceil(delay / 1000)}s.`\n );\n }\n\n first = false;\n }\n\n await setTimeout(Math.min(delay, 2_147_483_647), undefined, { signal });\n }\n};\n\nexport { executeTypes };\nexport type { GenerationResult };\n","import { confirm, select } from \"@clack/prompts\";\nimport { createCommandContext, type CommandContext } from \"../context\";\nimport { authenticatedClient, identity } from \"../auth/client\";\nimport { login } from \"../auth/login\";\nimport { readConfigFile } from \"../config/files\";\nimport { projectConfigSchema, typesConfigSchema, type ProjectConfig } from \"../config/schema\";\nimport { CancelledError, CLIError, exitCodes } from \"../errors\";\nimport { canPrompt } from \"../prompts\";\nimport { validateCollections } from \"../content/collections\";\nimport { selectTypes } from \"./choices\";\nimport { readProjectFile, writeProjectConfig } from \"./write-config\";\nimport type { InitOptions } from \"./options\";\nimport { validateTypeOptions } from \"../types/options\";\nimport { executeTypes } from \"../types/execute\";\nimport path from \"node:path\";\n\nconst selectWorkspace = async (context: CommandContext, interactive: boolean): Promise<string> => {\n const { client } = await authenticatedClient(context);\n const account = await context.output.progress(\n \"Checking your account\",\n () => identity(client, context.signal),\n \"Account verified\"\n );\n const configured = context.config.workspaceID;\n\n if (account.type === \"key\") {\n if (configured && configured !== account.workspaceID) {\n throw new CLIError(\n \"This API key belongs to another workspace. Change --workspace or ANDESINE_API_KEY.\"\n );\n }\n\n await context.output.note(\"API key\", {\n Instance: context.config.baseURL,\n Workspace: account.workspaceID\n });\n return account.workspaceID;\n }\n\n await context.output.note(\"Account\", {\n Instance: context.config.baseURL,\n Email: account.user.email,\n Profile: context.config.profileName\n });\n\n const workspaces = await context.output.progress(\n \"Loading workspaces\",\n () => client.workspaces.list(undefined, { signal: context.signal }),\n \"Workspaces loaded\"\n );\n\n if (configured && !workspaces.some((workspace) => workspace.id === configured)) {\n throw new CLIError(\n \"The selected workspace is not available to this account. Use --workspace with an accessible workspace ID.\",\n exitCodes.usage\n );\n }\n\n if (!workspaces.length) {\n throw new CLIError(\"No workspaces are available. Create a workspace in Andesine first.\");\n }\n if (!interactive && configured) return configured;\n if (workspaces.length === 1) return workspaces[0].id;\n\n if (!interactive) {\n throw new CLIError(\n \"Several workspaces are available. Supply --workspace <id> or run init in an interactive terminal.\",\n exitCodes.usage\n );\n }\n\n return context.prompt((prompt) =>\n select({\n ...prompt,\n message: \"Workspace\",\n initialValue: configured,\n options: workspaces.map((workspace) => ({\n value: workspace.id,\n label: workspace.name,\n hint: workspace.id\n }))\n })\n );\n};\n\nconst describeConfig = (config: ProjectConfig): Record<string, string | undefined> => ({\n \"Instance\": config.baseURL,\n \"Workspace\": config.workspaceID,\n \"Profile\": config.profile,\n \"Source\": config.types ? JSON.stringify(config.types.source) : undefined,\n \"Collections\": config.types\n ? config.types.collections\n .map((selector) => (typeof selector === \"string\" ? selector : selector.collectionSlugPath))\n .join(\", \") || \"All accessible collections\"\n : undefined,\n \"Output\": config.types?.output,\n \"Entry IDs\": config.types ? String(config.types.includeEntryIDs) : undefined,\n \"Entry paths\": config.types ? String(config.types.includeEntryPaths) : undefined,\n \"Exact tree\": config.types ? String(config.types.includeTree) : undefined\n});\n\n/** Configure a project through the public API; never save credentials in the project. */\nconst init = async (options: InitOptions, signal: AbortSignal): Promise<void> => {\n const interactive = canPrompt(options.interactive);\n\n validateTypeOptions(options);\n\n let context = await createCommandContext(options, signal, {\n allowNewProfile: true,\n allowMissingConfig: true\n });\n\n const explicitPath = options.config ?? process.env.ANDESINE_CONFIG;\n const explicitProfile = options.profile ?? process.env.ANDESINE_PROFILE;\n const file = path.resolve(explicitPath ?? context.config.configPath ?? \"andesine.json\");\n const original = await readProjectFile(file);\n const previous = await readConfigFile(file, projectConfigSchema, true);\n\n await context.output.heading(\"Andesine · Initialize project\");\n\n const needsLogin =\n process.env.ANDESINE_API_KEY === undefined && !context.config.profile?.credentialRef;\n\n if (needsLogin) {\n if (!interactive) {\n throw new CLIError(\n \"Sign in with andesine auth login or set ANDESINE_API_KEY before running init non-interactively.\",\n exitCodes.usage\n );\n }\n\n const approved = await context.prompt((prompt) =>\n confirm({ ...prompt, message: `Sign in to ${context.config.baseURL}?`, initialValue: true })\n );\n\n if (!approved) throw new CancelledError();\n\n await login(context, options, false);\n context = await createCommandContext(options, signal, { allowMissingConfig: true });\n }\n\n const workspaceID = await selectWorkspace(\n context,\n interactive && options.workspace === undefined\n );\n const scopedContext = { ...context, config: { ...context.config, workspaceID } };\n const { client } = await authenticatedClient(scopedContext);\n const types = await selectTypes(\n scopedContext,\n client,\n options,\n previous?.types ?? typesConfigSchema.parse({})\n );\n\n await context.output.progress(\n \"Validating the selected content\",\n () => validateCollections(client, types.source, types.collections, signal),\n \"Content selection verified\"\n );\n\n const config: ProjectConfig = {\n ...previous,\n $schema:\n previous?.$schema ??\n path\n .relative(path.dirname(file), path.resolve(\"node_modules/andesine/dist/config.schema.json\"))\n .split(path.sep)\n .join(\"/\"),\n version: 1,\n baseURL: context.config.baseURL,\n workspaceID,\n ...(explicitProfile !== undefined ? { profile: explicitProfile } : {}),\n types\n };\n const details = describeConfig(config);\n const previousDetails = previous ? describeConfig(previous) : undefined;\n const changes = Object.fromEntries(\n Object.entries(details)\n .filter(([label, value]) => !previousDetails || previousDetails[label] !== value)\n .map(([label, value]) => [\n label,\n previousDetails ? `${previousDetails[label] ?? \"Not set\"} → ${value ?? \"Not set\"}` : value\n ])\n );\n const unchanged = previous && JSON.stringify(previous) === JSON.stringify(config);\n\n await context.output.note(\n unchanged\n ? \"Configuration unchanged\"\n : previous\n ? \"Update configuration\"\n : \"Create configuration\",\n { File: file, ...changes }\n );\n\n if (!unchanged) {\n if (interactive && !options.yes) {\n const approved = await context.prompt((prompt) =>\n confirm({\n ...prompt,\n message: previous ? \"Save these changes?\" : \"Create this configuration?\",\n initialValue: true\n })\n );\n\n if (!approved) throw new CancelledError();\n } else if (previous && !options.yes) {\n throw new CLIError(\n \"The configuration already exists. Review the changes above and rerun with --yes to save them.\",\n exitCodes.usage\n );\n }\n\n await context.output.progress(\n \"Saving project configuration\",\n () => writeProjectConfig(file, config, original, signal),\n \"Project configuration saved\"\n );\n }\n\n await context.output.success(\n unchanged ? \"Project configuration is up to date.\" : \"Project initialized.\"\n );\n\n const generate =\n options.generate ??\n (interactive &&\n (await context.prompt((prompt) =>\n confirm({\n ...prompt,\n message: \"Generate the configured types file now?\",\n initialValue: false\n })\n )));\n const generation = generate\n ? await executeTypes(\n {\n ...scopedContext,\n config: {\n ...scopedContext.config,\n configPath: file,\n types: { ...types, output: path.resolve(path.dirname(file), types.output) }\n }\n },\n {},\n false\n )\n : undefined;\n\n await context.output.json({\n configured: true,\n changed: !unchanged,\n configPath: file,\n baseURL: config.baseURL,\n workspaceID,\n ...(generation ? { generation } : {})\n });\n};\n\nexport { init };\n","import { cp, readdir, readFile, rename, rm, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport type { createOutput } from \"../output\";\n\n// The build copies the template next to the bundled CLI; see `scripts/pages-template.ts`.\nconst templateDirectory = fileURLToPath(new URL(\"./templates/pages/\", import.meta.url));\n\nconst isEmptyDirectory = async (directory: string): Promise<boolean> => {\n try {\n return (await readdir(directory)).length === 0;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return true;\n\n throw error;\n }\n};\n/** Package names allow lowercase letters, digits, and `-._~` only. */\nconst toPackageName = (directory: string): string => {\n const name = path\n .basename(directory)\n .toLowerCase()\n .replace(/[^a-z\\d._~-]+/g, \"-\");\n\n return name.replace(/^[._-]+|[-]+$/g, \"\") || \"andesine-pages-site\";\n};\n\n/** Creates an Andesine Pages site from the template in an empty directory. */\nconst initPages = async (\n directory: string,\n output: ReturnType<typeof createOutput>\n): Promise<void> => {\n const target = path.resolve(directory);\n const manifestPath = path.join(target, \"package.json\");\n\n if (!(await isEmptyDirectory(target))) {\n throw new CLIError(\n `${directory} is not empty. Choose a new or empty directory.`,\n exitCodes.usage\n );\n }\n\n await output.progress(\n \"Copying the template\",\n async () => {\n const manifest = JSON.parse(\n await readFile(path.join(templateDirectory, \"package.template.json\"), \"utf8\")\n );\n\n await cp(templateDirectory, target, { recursive: true });\n await rename(path.join(target, \"gitignore\"), path.join(target, \".gitignore\"));\n await rm(path.join(target, \"package.template.json\"));\n await writeFile(\n manifestPath,\n `${JSON.stringify({ ...manifest, name: toPackageName(target) }, null, 2)}\\n`\n );\n },\n \"Template copied\"\n );\n await output.note(\"Next steps\", {\n \"Open the site\": `cd ${path.relative(process.cwd(), target) || \".\"}`,\n \"Install\": \"npm install\",\n \"Start\": \"npm run dev\"\n });\n};\n\nexport { initPages };\n","/* eslint-disable max-lines */\n// Generated from SDK openapi.json. Do not edit.\nimport type { APICommand, JSONSchema } from \"./types\";\n\nconst commands: APICommand[] = [\n {\n id: \"assets.attach\",\n group: \"assets\",\n command: \"attach\",\n method: \"post\",\n path: \"/assets/{assetID}/attachments\",\n summary: \"Attach an asset\",\n description:\n \"Attaches a ready image to an entry. This does not insert an image node into the document.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"assets.get\",\n group: \"assets\",\n command: \"get\",\n method: \"get\",\n path: \"/assets/{assetID}\",\n summary: \"Get asset status and details\",\n description:\n \"Returns image metadata, processing status, and available files. Supply entryID when checking access through an entry.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.importURL\",\n group: \"assets\",\n command: \"import-url\",\n method: \"post\",\n path: \"/assets/imports\",\n summary: \"Import an image URL\",\n description:\n \"Downloads a remote image and starts processing it for the entry. With checkDuplicates, can return an existing image instead. Use assets.get to check processing status.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\",\n url: \"https://example.com/image.png\",\n checkDuplicates: true\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"assetID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"url\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 4096,\n format: \"uri\"\n },\n flag: \"url\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"checkDuplicates\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false\n },\n flag: \"check-duplicates\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.register\",\n group: \"assets\",\n command: \"register\",\n method: \"post\",\n path: \"/assets/uploads\",\n summary: \"Register an image upload\",\n description:\n \"Reserves an image upload for an entry. Supply the byte count and lowercase SHA-256 checksum of the file. Call assets.upload before expiresAt, then use assets.get to check processing status.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n entryID: \"ent_example\",\n filename: \"image.png\",\n byteSize: 1024,\n checksum: \"0000000000000000000000000000000000000000000000000000000000000000\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"assetID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filename\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 255\n },\n flag: \"filename\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"byteSize\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 10485760\n },\n flag: \"byte-size\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"checksum\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^[a-f0-9]{64}$\",\n description: \"SHA-256 of the file bytes, verified by the backend and worker\"\n },\n flag: \"checksum\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.search\",\n group: \"assets\",\n command: \"search\",\n method: \"get\",\n path: \"/assets/search\",\n summary: \"Search assets\",\n description:\n \"Finds workspace images by text or SHA-256 checksum. Semantic search defaults to true and uses 1 AI credit for a text query. Returns up to 50 results.\\n\\nRequired API key permissions: read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n query: \"mountains\",\n limit: 10\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"query\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 500,\n default: \"\"\n },\n flag: \"query\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"checksum\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f0-9]{64}$\"\n },\n flag: \"checksum\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"semantic\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n default: true\n },\n flag: \"semantic\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n default: 24\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"assets.upload\",\n group: \"assets\",\n command: \"upload\",\n method: \"put\",\n path: \"/assets/{assetID}/upload\",\n summary: \"Upload registered image bytes\",\n description:\n \"Uploads a file for a registered asset with multipart/form-data. The bytes must match the registered size and checksum. Processing continues after the upload; use assets.get to check status.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n assetID: \"ast_example\",\n file: \"<binary file>\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"file\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n contentMediaType: \"*/*\"\n },\n flag: \"file\",\n kind: \"file\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"auth.getIdentity\",\n group: \"auth\",\n command: \"get-identity\",\n method: \"get\",\n path: \"/identity\",\n summary: \"Get credential identity\",\n description:\n \"Returns the authenticated user for OAuth or browser credentials, or the key and workspace IDs for an API key. Does not require a workspace selection and does not count toward API usage.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"collections.bulkDelete\",\n group: \"collections\",\n command: \"bulk-delete\",\n method: \"post\",\n path: \"/collections/bulk/delete\",\n summary: \"Delete collection trees\",\n description:\n \"Soft-deletes the selected collections, their descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collections to delete\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"collections.create\",\n group: \"collections\",\n command: \"create\",\n method: \"post\",\n path: \"/collections\",\n summary: \"Create a collection\",\n description:\n \"Creates a child collection. Without parentID, uses the workspace root. The name defaults to Untitled. Creation selects an available sibling name with a numeric suffix when needed. Names are trimmed and NFC-normalized. Derived URL slugs must be unique across sibling entries and collections, including case and punctuation variants. Names cannot contain a slash or equal a single dot or two dots. Restricted collections require a session with restricted_collections permission and the Pro plan; API keys cannot create them.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Documentation\",\n parentID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"id\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 300,\n description: \"Name of the collection\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"parentID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the parent collection,\"\n },\n flag: \"parent-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"restricted\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to restrict access to the collection tree\"\n },\n flag: \"restricted\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"collections.delete\",\n group: \"collections\",\n command: \"delete\",\n method: \"delete\",\n path: \"/collections/{id}\",\n summary: \"Delete a collection tree\",\n description:\n \"Soft-deletes the collection, its descendants, and their entries. The workspace root cannot be deleted. An active schema migration can block this action.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection to delete\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"collections.list\",\n group: \"collections\",\n command: \"list\",\n method: \"get\",\n path: \"/collections/list\",\n summary: \"List collections\",\n description:\n \"Lists collections under the selected ancestor. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum collections to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"collections.update\",\n group: \"collections\",\n command: \"update\",\n method: \"put\",\n path: \"/collections/{id}\",\n summary: \"Rename a collection\",\n description:\n \"Updates the collection name. Rejects names already used by a sibling entry or collection. An active schema migration can block this action.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"coll_example\",\n name: \"Guides\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection to be updated\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 300,\n description: \"New name of the collection\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"content.get\",\n group: \"content\",\n command: \"get\",\n method: \"get\",\n path: \"/content/entries/get\",\n summary: \"Get published entry content\",\n description:\n \"Returns content from a publishing channel or a specific available snapshot. Use channel or snapshotID, never both. The default channel is published. Validates saved content against its recorded schema and returns schema metadata. expectedSchemaHash must match that revision; schema-less content cannot match it. Validation and hash checks run before ETag handling. Supports ETag and If-None-Match; a match returns 304 without a body.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"path\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"slugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Historical publication snapshot to read\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: true,\n response: \"json\"\n },\n {\n id: \"content.getAsset\",\n group: \"content\",\n command: \"get-asset\",\n method: \"get\",\n path: \"/content/assets/{workspaceID}/{snapshotID}/{entryID}/{assetID}/{variant}\",\n summary: \"Download a published asset\",\n description:\n \"Returns binary image data from a publication snapshot. No API key is required. The asset must belong to the entry in that available snapshot. Use the asset URLs returned with published content.\",\n example: {\n workspaceID: \"ws_example\",\n snapshotID: \"snp_example\",\n entryID: \"ent_example\",\n assetID: \"ast_example\",\n variant: \"display\"\n },\n security: [],\n fields: [\n {\n name: \"workspaceID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ws_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"assetID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^ast_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"asset-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"variant\",\n location: \"path\",\n required: true,\n schema: {\n enum: [\"thumbnail\", \"display\"],\n type: \"string\"\n },\n flag: \"variant\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"binary\"\n },\n {\n id: \"content.getSchema\",\n group: \"content\",\n command: \"get-schema\",\n method: \"get\",\n path: \"/content/entries/schema\",\n summary: \"Get a published entry schema\",\n description:\n \"Returns the exact recorded effective schema, or null for schema-less content. Uses the same publication access as content.get. Pass its snapshotID for a consistent read; use channel or snapshotID, not both.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"path\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"slugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"content.getTree\",\n group: \"content\",\n command: \"get-tree\",\n method: \"get\",\n path: \"/content/tree\",\n summary: \"Get a published collection tree\",\n description:\n \"Returns a published collection tree and its snapshot ID. Use channel or snapshotID, never both. The default channel is published. Reuse the snapshot ID for consistent content reads. Supports ETag and If-None-Match; a match returns 304 without a body.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Historical publication snapshot to read\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: true,\n response: \"json\"\n },\n {\n id: \"content.listCollections\",\n group: \"content\",\n command: \"list-collections\",\n method: \"get\",\n path: \"/content/collections\",\n summary: \"List published collections\",\n description:\n \"Returns a flat page of collections from a publication snapshot. The default channel is published. On later pages, pass the returned snapshotID and pagination.nextCursor, and omit channel. Optionally select direct children using collectionID, collectionPath, or collectionSlugPath. Results are ordered by ID, not display order.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"snapshot\"\n },\n {\n id: \"content.listEntries\",\n group: \"content\",\n command: \"list-entries\",\n method: \"get\",\n path: \"/content/entries\",\n summary: \"List published entries\",\n description:\n \"Returns a flat page of entries from a publication snapshot. The default channel is published. On later pages, pass the returned snapshotID and pagination.nextCursor, and omit channel. Select direct children using collectionID, collectionPath, or collectionSlugPath, or include nested entries with descendants: true. descendants requires a collection scope. All property filters must match the assigned version. includeContent: true returns validated full content, properties, fragments, assets, and recorded schema metadata. An invalid full item fails the page. Keep the same scope and filters across pages. Results are ordered by ID, not display order.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"descendants\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false\n },\n flag: \"descendants\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"includeContent\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false\n },\n flag: \"include-content\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"query\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"snapshot\"\n },\n {\n id: \"entries.bulkDelete\",\n group: \"entries\",\n command: \"bulk-delete\",\n method: \"post\",\n path: \"/entries/bulk/delete\",\n summary: \"Delete entries\",\n description:\n \"Soft-deletes the selected entries and clears current-entry selections for affected members. An active schema migration can block this action.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"ent_example\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the entries to delete\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"entries.create\",\n group: \"entries\",\n command: \"create\",\n method: \"post\",\n path: \"/entries\",\n summary: \"Create an entry\",\n description:\n \"Creates an entry and its initial document. The name defaults to Untitled. Creation selects an available sibling name with a numeric suffix when needed. Names are trimmed and NFC-normalized. Derived URL slugs must be unique across sibling entries and collections, including case and punctuation variants. Names cannot contain a slash or equal a single dot or two dots. A collection schema can set the initial content.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Getting started\",\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"id\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 300,\n description: \"Name of the entry\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection this entry belongs to\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"entries.delete\",\n group: \"entries\",\n command: \"delete\",\n method: \"delete\",\n path: \"/entries/{id}\",\n summary: \"Delete an entry\",\n description:\n \"Soft-deletes the entry and clears current-entry selections for affected members. An active schema migration can block this action.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry to delete\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"entries.get\",\n group: \"entries\",\n command: \"get\",\n method: \"get\",\n path: \"/entries/get\",\n summary: \"Get an entry\",\n description:\n \"Returns current entry details, fragments, properties, and recorded schema metadata. Validates content without changing it. expectedSchemaHash must match the recorded schema; schema-less content cannot match it. Use content.get to read published content.\\n\\nRequired API key permissions: read:entries. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^ent_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"path\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"slugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"entries.list\",\n group: \"entries\",\n command: \"list\",\n method: \"get\",\n path: \"/entries/list\",\n summary: \"List entries\",\n description:\n \"Lists entries in the selected collection, or all accessible entries when collectionID is omitted. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100 and defaults to 50.\\n\\nRequired API key permissions: read:entries. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum entries to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"entries.update\",\n group: \"entries\",\n command: \"update\",\n method: \"put\",\n path: \"/entries/{id}\",\n summary: \"Rename an entry\",\n description:\n \"Updates the entry name. Rejects names already used by a sibling entry or collection. An active schema migration can block this action.\\n\\nRequired API key permissions: entries. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ent_example\",\n name: \"Installation\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry to be updated\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 300,\n description: \"New name of the entry\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"instance.get\",\n group: \"instance\",\n command: \"get\",\n method: \"get\",\n path: \"/instance\",\n summary: \"Get instance capabilities and limits\",\n description:\n \"Returns configured features and effective limits for the authenticated workspace. These values do not grant permissions or report live service health. No discovery request is made automatically by the SDK.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"memberships.invite\",\n group: \"memberships\",\n command: \"invite\",\n method: \"post\",\n path: \"/memberships\",\n summary: \"Invite a workspace member\",\n description:\n \"Creates an invitation and attempts email delivery. Check emailDelivery in the result. Requires the Pro plan and permission to delegate the selected role. Existing membership or pending invitation returns a conflict.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n email: \"editor@example.com\",\n roleID: \"rl_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"email\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n format: \"email\",\n description: \"Email address of the user to invite\"\n },\n flag: \"email\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"roleID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the role to assign\"\n },\n flag: \"role-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"memberships.list\",\n group: \"memberships\",\n command: \"list\",\n method: \"get\",\n path: \"/memberships\",\n summary: \"List workspace members\",\n description:\n \"Lists workspace memberships with role and user details. Use pagination.nextCursor to continue with the same filters; concurrent changes can affect later pages.\\n\\nRequired API key permissions: read:memberships. Write permissions also grant read access for the same resource.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"memberships.listInvites\",\n group: \"memberships\",\n command: \"list-invites\",\n method: \"get\",\n path: \"/memberships/invites\",\n summary: \"List invitations\",\n description:\n \"Lists pending, unexpired workspace invitations. Use pagination.nextCursor to continue. Requires the Pro plan.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"memberships.remove\",\n group: \"memberships\",\n command: \"remove\",\n method: \"delete\",\n path: \"/memberships/{id}\",\n summary: \"Remove a workspace member\",\n description:\n \"Removes the membership and its workspace access. Administrator memberships have additional restrictions.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ms_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the membership to remove\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"memberships.resendInvite\",\n group: \"memberships\",\n command: \"resend-invite\",\n method: \"post\",\n path: \"/memberships/invites/{id}/resend\",\n summary: \"Resend an invitation\",\n description:\n \"Attempts email delivery again for a pending invitation. Check emailDelivery in the result. Requires the Pro plan.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"inv_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the pending invitation\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"memberships.revokeInvite\",\n group: \"memberships\",\n command: \"revoke-invite\",\n method: \"delete\",\n path: \"/memberships/invites/{id}\",\n summary: \"Revoke an invitation\",\n description:\n \"Revokes a pending invitation so it can no longer be accepted. Requires the Pro plan.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"inv_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the invite to revoke\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"memberships.update\",\n group: \"memberships\",\n command: \"update\",\n method: \"patch\",\n path: \"/memberships/{id}\",\n summary: \"Change a member role\",\n description:\n \"Assigns a new role to a member. Requires the Pro plan and permission to delegate that role. Administrator assignments have additional restrictions.\\n\\nRequired API key permissions: memberships. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ms_example\",\n roleID: \"rl_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the membership to update\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"roleID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"New role ID\"\n },\n flag: \"role-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.bulkPublishCollections\",\n group: \"publishing\",\n command: \"bulk-publish-collections\",\n method: \"post\",\n path: \"/publishing/collections/bulk/publish\",\n summary: \"Publish collection trees\",\n description:\n \"Publishes the latest entry versions in the selected publishing-enabled collection trees. At least one ID is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collection trees to publish\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.bulkPublishEntries\",\n group: \"publishing\",\n command: \"bulk-publish-entries\",\n method: \"post\",\n path: \"/publishing/entries/bulk/publish\",\n summary: \"Publish entries\",\n description:\n \"Publishes the selected entries with optional version IDs. Entries must be in publishing-enabled collections. At least one entry is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entries: [\n {\n entryID: \"ent_example\"\n }\n ],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"entries\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n $ref: \"#/components/schemas/PublishEntryTarget\"\n },\n description: \"Entries and versions to publish\"\n },\n flag: \"entries\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.bulkSetCollections\",\n group: \"publishing\",\n command: \"bulk-set-collections\",\n method: \"post\",\n path: \"/publishing/collections/bulk/set\",\n summary: \"Configure publishing for collections\",\n description:\n \"Enables publishing for the selected collections, or disables it and unpublishes their trees from all channels. When enabling, publish can also publish the latest entry versions.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"],\n enabled: true,\n publish: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collections to configure\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"expectedSnapshots\",\n location: \"body\",\n required: false,\n schema: {\n type: \"object\",\n propertyNames: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n additionalProperties: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n description:\n \"Optional snapshot checks for supplied channels before changing collection publishing. Omitted channels are not checked.\"\n },\n flag: \"expected-snapshots\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: true,\n schema: {\n type: \"boolean\",\n description:\n \"Enable publishing, or disable and unpublish the collection trees from all channels\"\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"publish\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to publish latest entry versions when enabling publishing\"\n },\n flag: \"publish\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.bulkUnpublishCollections\",\n group: \"publishing\",\n command: \"bulk-unpublish-collections\",\n method: \"post\",\n path: \"/publishing/collections/bulk/unpublish\",\n summary: \"Unpublish collection trees\",\n description:\n \"Removes publication assignments for the selected collection trees from the channel. At least one ID is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"coll_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the collection trees to unpublish\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.bulkUnpublishEntries\",\n group: \"publishing\",\n command: \"bulk-unpublish-entries\",\n method: \"post\",\n path: \"/publishing/entries/bulk/unpublish\",\n summary: \"Unpublish entries\",\n description:\n \"Removes publication assignments for the selected entries from the channel. At least one ID is required. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n ids: [\"ent_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"ids\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"IDs of the entries to unpublish\"\n },\n flag: \"ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.createChannel\",\n group: \"publishing\",\n command: \"create-channel\",\n method: \"post\",\n path: \"/publishing/channels\",\n summary: \"Create a publishing channel\",\n description:\n \"Creates a publishing channel from its display name and returns the generated channel code.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Preview\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel label\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.deleteChannel\",\n group: \"publishing\",\n command: \"delete-channel\",\n method: \"delete\",\n path: \"/publishing/channels/{code}\",\n summary: \"Delete a publishing channel\",\n description:\n \"Deletes a custom channel and its publication assignments. The default published channel cannot be deleted.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n code: \"preview\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"code\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel identifier\"\n },\n flag: \"code\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Reject deletion if the channel snapshot changed\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.getChannelContent\",\n group: \"publishing\",\n command: \"get-channel-content\",\n method: \"get\",\n path: \"/publishing/channels/{channel}/content\",\n summary: \"Get channel content and pending changes\",\n description:\n \"Returns publication state and pending changes for a publishing root, with the snapshot ID needed to review and revert changes.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"channel\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"query\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Publishing root collection whose content to list\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.getEntryVersion\",\n group: \"publishing\",\n command: \"get-entry-version\",\n method: \"get\",\n path: \"/publishing/entries/{entryID}/version\",\n summary: \"Get a published entry version\",\n description:\n \"Returns the entry version assigned to a channel, or to an explicit available snapshot, with its recorded schema metadata. Validates content against that revision. expectedSchemaHash must match it; schema-less content cannot match it. The default channel is published.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry whose published version to get\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Exact publication snapshot to read\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.listChannels\",\n group: \"publishing\",\n command: \"list-channels\",\n method: \"get\",\n path: \"/publishing/channels\",\n summary: \"List publishing channels\",\n description:\n \"Returns workspace publishing channels. Set includeAssignmentCount to include entry assignment counts.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n includeAssignmentCount: true\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"includeAssignmentCount\",\n location: \"query\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to include the number of assigned entries\"\n },\n flag: \"include-assignment-count\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.listEntryPublications\",\n group: \"publishing\",\n command: \"list-entry-publications\",\n method: \"get\",\n path: \"/publishing/entries/{entryID}/publications\",\n summary: \"List entry publications\",\n description:\n \"Returns the entry publication assignments across channels.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry whose publications to list\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.publishCollection\",\n group: \"publishing\",\n command: \"publish-collection\",\n method: \"post\",\n path: \"/publishing/collections/{collectionID}\",\n summary: \"Publish a collection tree\",\n description:\n \"Publishes the latest entry versions in a publishing-enabled collection tree to the channel. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Collection tree to publish\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.publishEntry\",\n group: \"publishing\",\n command: \"publish-entry\",\n method: \"post\",\n path: \"/publishing/entries/{entryID}\",\n summary: \"Publish an entry\",\n description:\n \"Publishes an existing version, or the latest entry content if versionID is omitted. The entry must be in a publishing-enabled collection. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry to publish\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"versionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Existing version to publish\"\n },\n flag: \"version-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"publishing.revertChanges\",\n group: \"publishing\",\n command: \"revert-changes\",\n method: \"post\",\n path: \"/publishing/changes/revert\",\n summary: \"Revert pending publishing changes\",\n description:\n \"Restores selected drafts to the reviewed publication snapshot. This can remove unpublished items and replace draft content. First review publishing.getChannelContent and pass its snapshotID. Use all: true or specific collectionIDs/entryIDs, never both. Requires write access to affected resources in addition to read:publishing.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n snapshotID: \"snp_example\",\n entryIDs: [\"ent_example\"],\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"all\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to revert all pending changes\"\n },\n flag: \"all\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Publishing root collection\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionIDs\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"Collections whose changes to revert\"\n },\n flag: \"collection-ids\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"entryIDs\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n description: \"Entries whose changes to revert\"\n },\n flag: \"entry-ids\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description: \"Snapshot used to review the changes\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.setCollection\",\n group: \"publishing\",\n command: \"set-collection\",\n method: \"put\",\n path: \"/publishing/collections/{collectionID}\",\n summary: \"Configure collection publishing\",\n description:\n \"Enables publishing for a collection, or disables it and unpublishes its tree from all channels. When enabling, publish can also publish the latest entry versions.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n enabled: true,\n publish: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Collection to configure\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshots\",\n location: \"body\",\n required: false,\n schema: {\n type: \"object\",\n propertyNames: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n additionalProperties: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n description:\n \"Optional snapshot checks for supplied channels before changing collection publishing. Omitted channels are not checked.\"\n },\n flag: \"expected-snapshots\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: true,\n schema: {\n type: \"boolean\",\n description:\n \"Enable publishing, or disable and unpublish the collection tree from all channels\"\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"publish\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Whether to publish latest entry versions when enabling publishing\"\n },\n flag: \"publish\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.unpublishCollection\",\n group: \"publishing\",\n command: \"unpublish-collection\",\n method: \"delete\",\n path: \"/publishing/collections/{collectionID}\",\n summary: \"Unpublish a collection tree\",\n description:\n \"Removes publication assignments for a collection tree from the channel. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Collection tree to unpublish\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"publishing.unpublishEntry\",\n group: \"publishing\",\n command: \"unpublish-entry\",\n method: \"delete\",\n path: \"/publishing/entries/{entryID}\",\n summary: \"Unpublish an entry\",\n description:\n \"Removes the entry publication from the channel. Supply versionID to require that version to be assigned; a changed assignment returns a conflict. The default channel is published. Supply expectedSnapshotID from a prior channel read to reject concurrent publication changes.\\n\\nRequired API key permissions: publishing. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n channel: \"published\",\n versionID: \"ver_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry to unpublish\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n default: \"published\",\n description: \"Publishing channel, defaults to published\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSnapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\",\n description:\n \"Reject the mutation if the channel no longer points to this reviewed snapshot\"\n },\n flag: \"expected-snapshot-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"versionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Version expected to be assigned\"\n },\n flag: \"version-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"roles.create\",\n group: \"roles\",\n command: \"create\",\n method: \"post\",\n path: \"/roles\",\n summary: \"Create a role\",\n description:\n \"Creates a workspace role. Names are unique without regard to case and must contain 1 to 50 characters after trimming. Requires the Pro plan and permission to delegate the selected permissions.\\n\\nRequired API key permissions: roles. Write permissions also grant read access for the same resource.\",\n example: {\n name: \"Editor\",\n permissions: [\"content\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Name of the role\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"permissions\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n items: {\n $ref: \"#/components/schemas/Permission\"\n },\n description: \"Permissions to grant to the role\"\n },\n flag: \"permissions\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"roles.delete\",\n group: \"roles\",\n command: \"delete\",\n method: \"delete\",\n path: \"/roles/{id}\",\n summary: \"Delete a role\",\n description:\n \"Deletes a custom role and updates its assignments. Built-in roles cannot be deleted. Requires the Pro plan.\\n\\nRequired API key permissions: roles. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"rl_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the role to delete\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"roles.list\",\n group: \"roles\",\n command: \"list\",\n method: \"get\",\n path: \"/roles\",\n summary: \"List roles\",\n description:\n \"Returns workspace roles and their permissions.\\n\\nRequired API key permissions: read:roles. Write permissions also grant read access for the same resource.\",\n example: {},\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"roles.update\",\n group: \"roles\",\n command: \"update\",\n method: \"put\",\n path: \"/roles/{id}\",\n summary: \"Update a role\",\n description:\n \"Changes a role name or permissions. Names are unique without regard to case. Requires the Pro plan and permission to delegate the selected permissions. Built-in roles have additional restrictions.\\n\\nRequired API key permissions: roles. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"rl_example\",\n name: \"Content editor\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the role to update\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"New name for the role\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"permissions\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n items: {\n $ref: \"#/components/schemas/Permission\"\n },\n description: \"New permissions for the role\"\n },\n flag: \"permissions\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"schemaMigrations.get\",\n group: \"schema-migrations\",\n command: \"get\",\n method: \"get\",\n path: \"/schema-migrations/{id}\",\n summary: \"Get schema migration status\",\n description:\n \"Returns bounded migration progress and status. Use schemaMigrations.listContentLossEntries for per-entry content loss details. Check status before repeating an operation blocked by this migration.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"smg_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema migration\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaMigrations.getActive\",\n group: \"schema-migrations\",\n command: \"get-active\",\n method: \"get\",\n path: \"/collections/{collectionID}/schema-migration\",\n summary: \"Get the active schema migration\",\n description:\n \"Returns the active migration for a collection, or null when none is active.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the affected collection\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaMigrations.listContentLossEntries\",\n group: \"schema-migrations\",\n command: \"list-content-loss-entries\",\n method: \"get\",\n path: \"/schema-migrations/{id}/content-loss-entries\",\n summary: \"List entries with migration content loss\",\n description:\n \"Lists accessible, non-deleted entries that lost content in a completed migration. Returns an empty page until completion. Use pagination.nextCursor to continue.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"smg_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"schemas.apply\",\n group: \"schemas\",\n command: \"apply\",\n method: \"post\",\n path: \"/schemas/{schemaID}/apply\",\n summary: \"Apply a schema draft\",\n description:\n \"Creates a schema version from the draft and starts any required migration of affected entry content. Review possible content removal before calling: confirmedDataLoss must be true. Use schemaMigrations.get to follow a returned migrationID.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n schemaID: \"sch_example\",\n confirmedDataLoss: true,\n name: \"Reviewed schema\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"schemaID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the local collection schema\"\n },\n flag: \"schema-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"confirmedDataLoss\",\n location: \"body\",\n required: true,\n schema: {\n const: true,\n description: \"Confirmation that the migration can remove entry content\"\n },\n flag: \"confirmed-data-loss\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Optional version name\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.create\",\n group: \"schemas\",\n command: \"create\",\n method: \"post\",\n path: \"/collections/{collectionID}/schema\",\n summary: \"Create a local collection schema\",\n description:\n \"Creates a local schema draft for the collection. Use schemas.get to inspect local and effective schemas.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the collection\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.delete\",\n group: \"schemas\",\n command: \"delete\",\n method: \"delete\",\n path: \"/schemas/{schemaID}\",\n summary: \"Delete a local schema\",\n description:\n \"Removes the local schema and recalculates inherited schemas. This can start a content migration. Review possible content removal before setting confirmedDataLoss. Use schemaMigrations.get with a returned migrationID.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n schemaID: \"sch_example\",\n confirmedDataLoss: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"schemaID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the local collection schema\"\n },\n flag: \"schema-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"confirmedDataLoss\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Confirmation that an inherited-schema migration can remove entry content\"\n },\n flag: \"confirmed-data-loss\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.get\",\n group: \"schemas\",\n command: \"get\",\n method: \"get\",\n path: \"/schemas/collection\",\n summary: \"Get collection schemas\",\n description:\n \"Returns local and effective schema details for the collection, including inheritance.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collectionID: \"coll_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"collectionID\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemas.getRevision\",\n group: \"schemas\",\n command: \"get-revision\",\n method: \"get\",\n path: \"/schema-revisions/{revisionID}\",\n summary: \"Get an exact schema revision\",\n description:\n \"Returns the recorded effective definition, including inherited fields. Requires read access to the revision's collection. The definition is independent of the currently active schema.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n revisionID: \"schr_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"revisionID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^schr_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"revision-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaVersions.get\",\n group: \"schema-versions\",\n command: \"get\",\n method: \"get\",\n path: \"/schema-versions/{id}\",\n summary: \"Get a schema version\",\n description:\n \"Returns a saved schema version and its definition.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"schv_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema version\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaVersions.list\",\n group: \"schema-versions\",\n command: \"list\",\n method: \"get\",\n path: \"/schemas/{schemaID}/versions\",\n summary: \"List schema versions\",\n description:\n \"Lists versions of a local collection schema. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n schemaID: \"sch_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"schemaID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the local collection schema\"\n },\n flag: \"schema-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum versions to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"schemaVersions.revert\",\n group: \"schema-versions\",\n command: \"revert\",\n method: \"post\",\n path: \"/schema-versions/{id}/revert\",\n summary: \"Restore a schema version\",\n description:\n \"Restores the selected definition and starts any required content migration. Review possible content removal before calling: confirmedDataLoss must be true. Use schemaMigrations.get to follow a returned migrationID.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"schv_example\",\n confirmedDataLoss: true\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema version to restore\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"confirmedDataLoss\",\n location: \"body\",\n required: true,\n schema: {\n const: true,\n description: \"Confirmation that the migration can remove entry content\"\n },\n flag: \"confirmed-data-loss\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Optional version name\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"schemaVersions.update\",\n group: \"schema-versions\",\n command: \"update\",\n method: \"patch\",\n path: \"/schema-versions/{id}\",\n summary: \"Rename a schema version\",\n description:\n \"Changes the saved version name. Set name to null to remove the name.\\n\\nRequired API key permissions: collections. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"schv_example\",\n name: \"Reviewed schema\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the schema version\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n anyOf: [\n {\n type: \"string\",\n minLength: 1,\n maxLength: 100\n },\n {\n type: \"null\"\n }\n ],\n description: \"New version name, or null to remove it\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: true\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"search.askCurrent\",\n group: \"search\",\n command: \"ask-current\",\n method: \"post\",\n path: \"/search/current/ask\",\n summary: \"Ask AI about current content\",\n description:\n \"Returns a complete answer with numbered sources. Requires explicit ai-answers permission in addition to content read permissions. Accepts up to 1,000 question characters, 10 history messages of up to 4,000 characters each, and 20 property filters. Uses 3 AI credits and the Ask AI rate limit. Use a secret key on your server, or a publishable key for published content.\\n\\nRequired API key permissions: ai-answers, read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n question: \"How do I install Andesine?\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"search.askCurrentStream\",\n group: \"search\",\n command: \"ask-current-stream\",\n method: \"post\",\n path: \"/search/current/ask/stream\",\n summary: \"Stream an AI answer about current content\",\n description:\n \"Emits sources, textDelta, and completed events over SSE. Uses the same inputs, permissions, AI credits, and rate limit as complete answers. Stream errors use SSE error frames. Never reconnect automatically.\\n\\nRequired API key permissions: ai-answers, read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"stream\"\n },\n {\n id: \"search.askPublished\",\n group: \"search\",\n command: \"ask-published\",\n method: \"post\",\n path: \"/search/published/ask\",\n summary: \"Ask AI about published content\",\n description:\n \"Returns a complete answer with numbered sources. Requires explicit ai-answers permission in addition to content read permissions. Accepts up to 1,000 question characters, 10 history messages of up to 4,000 characters each, and 20 property filters. Uses 3 AI credits and the Ask AI rate limit. Use a secret key on your server, or a publishable key for published content.\\n\\nRequired API key permissions: ai-answers, read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n question: \"How do I install Andesine?\",\n channel: \"published\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel to search\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"search.askPublishedStream\",\n group: \"search\",\n command: \"ask-published-stream\",\n method: \"post\",\n path: \"/search/published/ask/stream\",\n summary: \"Stream an AI answer about published content\",\n description:\n \"Emits sources, textDelta, and completed events over SSE. Uses the same inputs, permissions, AI credits, and rate limit as complete answers. Stream errors use SSE error frames. Never reconnect automatically.\\n\\nRequired API key permissions: ai-answers, read:publishing. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"question\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 1000\n },\n flag: \"question\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"history\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 10,\n items: {\n $ref: \"#/components/schemas/AnswerHistoryMessage\"\n },\n default: []\n },\n flag: \"history\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel to search\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"stream\"\n },\n {\n id: \"search.current\",\n group: \"search\",\n command: \"current\",\n method: \"post\",\n path: \"/search/current\",\n summary: \"Search current content\",\n description:\n \"Searches current entry content by text and optional property filters. Up to 20 filters and 50 results are allowed. Semantic search is optional, uses 1 AI credit, and has a separate rate limit.\\n\\nRequired API key permissions: read:entries, read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n query: \"installation\",\n limit: 10\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"query\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 500\n },\n flag: \"query\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"body\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n default: 20\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"semantic\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Whether to combine keyword and vector search\"\n },\n flag: \"semantic\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"search.published\",\n group: \"search\",\n command: \"published\",\n method: \"post\",\n path: \"/search/published\",\n summary: \"Search published content\",\n description:\n \"Searches content published to the required channel. Up to 20 filters and 50 results are allowed. Semantic search is optional, uses 1 AI credit, and has a separate rate limit.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n query: \"installation\",\n channel: \"published\",\n limit: 10\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"query\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 500\n },\n flag: \"query\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"collection-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n flag: \"collection-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collectionSlugPath\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n },\n flag: \"collection-slug-path\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"filters\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 20,\n items: {\n $ref: \"#/components/schemas/PropertyFilter\"\n },\n default: []\n },\n flag: \"filters\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"body\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n default: 20\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"semantic\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Whether to combine keyword and vector search\"\n },\n flag: \"semantic\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50,\n description: \"Publishing channel to search\"\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"typeMetadata.getCurrent\",\n group: \"type-metadata\",\n command: \"get-current\",\n method: \"post\",\n path: \"/type-metadata/current\",\n summary: \"Get current content type metadata\",\n description:\n \"Read-only bulk metadata for type generation. Returns one consistent database snapshot of accessible collections and their active effective schemas, including inheritance. Optional entry/tree data requires read:entries in addition to read:collections. Explicit unavailable collection selectors fail. Active schema migrations in the selected collections return a conflict. No entry content is loaded. Schema-free collections use general types without warnings.\\n\\nRequired API key permissions: read:collections. Write permissions also grant read access for the same resource.\",\n example: {\n collections: [\"/Tutorials\"],\n includeEntries: false\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collections\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n anyOf: [\n {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n {\n type: \"object\",\n properties: {\n collectionSlugPath: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n }\n },\n required: [\"collectionSlugPath\"]\n }\n ]\n },\n default: [],\n description:\n \"Collection IDs, name paths, or objects with collectionSlugPath. Includes selected subtrees; empty selects all accessible collections.\"\n },\n flag: \"collections\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"includeEntries\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Include entry IDs, names, paths, and schema associations.\"\n },\n flag: \"include-entries\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"includeTree\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description:\n \"Include ordered child IDs for each collection. Also includes entry metadata.\"\n },\n flag: \"include-tree\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"typeMetadata.getPublished\",\n group: \"type-metadata\",\n command: \"get-published\",\n method: \"post\",\n path: \"/type-metadata/published\",\n summary: \"Get published content type metadata\",\n description:\n \"Read-only bulk metadata for type generation. Resolves a channel once (published by default), or reads a retained snapshot. Uses publication paths, names, and exact entry-version schema revisions; never substitutes current schemas. Supports mixed revisions and schema-free entries. Empty collections use general types without warnings. Includes selected subtrees; no selectors means all published collections and root entries. Publication-access rules match content.get. No entry content is loaded. Reuse source.snapshotID for related reads. The fingerprint changes only when returned type metadata changes, not when content-only publication creates a new snapshot.\\n\\nRequired API key permissions: read:publishing. Write permissions also grant read access for the same resource.\",\n example: {\n channel: \"published\",\n collections: [\"/Tutorials\"]\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"collections\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n maxItems: 100,\n items: {\n anyOf: [\n {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n },\n {\n type: \"string\",\n description:\n \"Decoded content path, such as /Docs/Page or coll_ID/Page. Names are case-sensitive. Do not URL-encode names before passing them to the SDK.\"\n },\n {\n type: \"object\",\n properties: {\n collectionSlugPath: {\n type: \"string\",\n description:\n \"Decoded derived slug path, such as /docs/getting-started or coll_ID/getting-started. Use the returned slugPath without URL encoding.\"\n }\n },\n required: [\"collectionSlugPath\"]\n }\n ]\n },\n default: [],\n description:\n \"Collection IDs, name paths, or objects with collectionSlugPath. Includes selected subtrees; empty selects all accessible collections.\"\n },\n flag: \"collections\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"includeEntries\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description: \"Include entry IDs, names, paths, and schema associations.\"\n },\n flag: \"include-entries\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"includeTree\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: false,\n description:\n \"Include ordered child IDs for each collection. Also includes entry metadata.\"\n },\n flag: \"include-tree\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"channel\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n },\n flag: \"channel\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"snapshotID\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^snp_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"snapshot-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.create\",\n group: \"versions\",\n command: \"create\",\n method: \"post\",\n path: \"/entries/{entryID}/versions\",\n summary: \"Create an entry version\",\n description:\n \"Saves a version of the current entry content. Optionally assigns a name.\\n\\nRequired API key permissions: versions. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n name: \"Before release\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry to version\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Optional version name\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.get\",\n group: \"versions\",\n command: \"get\",\n method: \"get\",\n path: \"/versions/{id}\",\n summary: \"Get an entry version\",\n description:\n \"Returns the saved content and recorded schema metadata of an entry version. Validates against its recorded revision, including historical versions. expectedSchemaHash must match that revision; schema-less content cannot match it.\\n\\nRequired API key permissions: read:versions. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ver_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the version to get\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedSchemaHash\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^[a-f\\\\d]{64}$\",\n description: \"Hash of the effective schema definition\"\n },\n flag: \"expected-schema-hash\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.list\",\n group: \"versions\",\n command: \"list\",\n method: \"get\",\n path: \"/entries/{entryID}/versions\",\n summary: \"List entry versions\",\n description:\n \"Lists saved entry versions. Pass pagination.nextCursor to the next request while pagination.hasMore is true. The limit is 1 to 100.\\n\\nRequired API key permissions: read:versions. Write permissions also grant read access for the same resource.\",\n example: {\n entryID: \"ent_example\",\n limit: 20\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"entryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the entry whose versions to list\"\n },\n flag: \"entry-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n description: \"Maximum versions to return\"\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"versions.revert\",\n group: \"versions\",\n command: \"revert\",\n method: \"post\",\n path: \"/versions/{id}/revert\",\n summary: \"Restore an entry version\",\n description:\n \"Restores saved content to the current entry and returns the resulting version. An active schema migration can block this action.\\n\\nRequired API key permissions: versions. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ver_example\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the version to restore\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"versions.update\",\n group: \"versions\",\n command: \"update\",\n method: \"patch\",\n path: \"/versions/{id}\",\n summary: \"Rename an entry version\",\n description:\n \"Changes the saved version name. Set name to null to remove the name.\\n\\nRequired API key permissions: versions. Write permissions also grant read access for the same resource.\",\n example: {\n id: \"ver_example\",\n name: \"Release candidate\"\n },\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"ID of the version to update\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n anyOf: [\n {\n type: \"string\",\n minLength: 1,\n maxLength: 100\n },\n {\n type: \"null\"\n }\n ],\n description: \"New version name, or null to remove it\"\n },\n flag: \"name\",\n kind: \"string\",\n nullable: true\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"webhooks.bulkDelete\",\n group: \"webhooks\",\n command: \"bulk-delete\",\n method: \"post\",\n path: \"/webhooks/bulk/delete\",\n summary: \"Delete webhooks\",\n description:\n \"Deletes every listed webhook in one transaction, checking each expectedRevision. Each deletion cancels pending deliveries and destroys signing keys; history stays until its original expiry.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"webhooks\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 10,\n items: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n expectedRevision: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n }\n },\n required: [\"id\", \"expectedRevision\"],\n additionalProperties: false\n }\n },\n flag: \"webhooks\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"webhooks.bulkRedeliver\",\n group: \"webhooks\",\n command: \"bulk-redeliver\",\n method: \"post\",\n path: \"/webhooks/{id}/deliveries/bulk/redeliver\",\n summary: \"Redeliver webhook events\",\n description:\n \"Replays every listed delivery in one transaction with the same checks as a single redelivery. Any ineligible delivery fails the whole request. Counts as one request for rate limiting.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedDestinationRevision\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n },\n flag: \"expected-destination-revision\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"deliveryIDs\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 25,\n items: {\n type: \"string\",\n pattern: \"^whdel_[A-Za-z\\\\d]{1,22}$\"\n }\n },\n flag: \"delivery-ids\",\n kind: \"json\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.bulkSetEnabled\",\n group: \"webhooks\",\n command: \"bulk-set-enabled\",\n method: \"post\",\n path: \"/webhooks/bulk/set-enabled\",\n summary: \"Enable or disable webhooks\",\n description:\n \"Applies the state to every listed webhook in one transaction, checking each expectedRevision. Enabling checks the scope authority and destination of each webhook. Webhooks already in the state are unchanged.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"webhooks\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 10,\n items: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n expectedRevision: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n }\n },\n required: [\"id\", \"expectedRevision\"],\n additionalProperties: false\n }\n },\n flag: \"webhooks\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: true,\n schema: {\n type: \"boolean\"\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.create\",\n group: \"webhooks\",\n command: \"create\",\n method: \"post\",\n path: \"/webhooks\",\n summary: \"Create a webhook\",\n description:\n \"Creates an enabled webhook unless `enabled` is false and returns the signing secret once. The caller must be able to read every resource type its events send, and restricted content when included.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"url\",\n location: \"body\",\n required: true,\n schema: {\n type: \"string\",\n maxLength: 2048,\n format: \"uri\"\n },\n flag: \"url\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n default: true\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"eventTypes\",\n location: \"body\",\n required: true,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 14,\n items: {\n $ref: \"#/components/schemas/WebhookEventName\"\n }\n },\n flag: \"event-types\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"schemaVersion\",\n location: \"body\",\n required: true,\n schema: {\n const: 1\n },\n flag: \"schema-version\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"collections\",\n location: \"body\",\n required: true,\n schema: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"all\"\n }\n },\n required: [\"mode\"],\n additionalProperties: false\n },\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"selected\"\n },\n roots: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n }\n }\n },\n required: [\"mode\", \"roots\"],\n additionalProperties: false\n }\n ]\n },\n flag: \"collections\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"channels\",\n location: \"body\",\n required: true,\n schema: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"all\"\n }\n },\n required: [\"mode\"],\n additionalProperties: false\n },\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"selected\"\n },\n codes: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n }\n }\n },\n required: [\"mode\", \"codes\"],\n additionalProperties: false\n }\n ]\n },\n flag: \"channels\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"restrictedContent\",\n location: \"body\",\n required: true,\n schema: {\n type: \"boolean\",\n description: \"Include restricted collections, including ones restricted later\"\n },\n flag: \"restricted-content\",\n kind: \"boolean\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.delete\",\n group: \"webhooks\",\n command: \"delete\",\n method: \"delete\",\n path: \"/webhooks/{id}\",\n summary: \"Delete a webhook\",\n description:\n \"Cancels pending deliveries and destroys signing keys. Retains history until its original expiry; a deleted endpoint cannot be replayed.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedRevision\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n },\n flag: \"expected-revision\",\n kind: \"number\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"empty\"\n },\n {\n id: \"webhooks.get\",\n group: \"webhooks\",\n command: \"get\",\n method: \"get\",\n path: \"/webhooks/{id}\",\n summary: \"Get a webhook\",\n description:\n \"Required API key permissions: read:webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.getDelivery\",\n group: \"webhooks\",\n command: \"get-delivery\",\n method: \"get\",\n path: \"/webhooks/{id}/deliveries/{deliveryID}\",\n summary: \"Get a webhook delivery\",\n description:\n \"Returns retained delivery metadata and, with content authority, the immutable event payload. Expired deliveries return not found even before physical cleanup.\\n\\nRequired API key permissions: read:webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"deliveryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^whdel_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"delivery-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.list\",\n group: \"webhooks\",\n command: \"list\",\n method: \"get\",\n path: \"/webhooks\",\n summary: \"List webhooks\",\n description:\n \"Required API key permissions: read:webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Cursor from the previous page; keep the same filters\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"webhooks.listAttempts\",\n group: \"webhooks\",\n command: \"list-attempts\",\n method: \"get\",\n path: \"/webhooks/{id}/deliveries/{deliveryID}/runs/{runID}/attempts\",\n summary: \"List delivery attempts\",\n description:\n \"Required API key permissions: read:webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"deliveryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^whdel_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"delivery-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"runID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^whrun_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"run-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^whatt_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"webhooks.listDeliveries\",\n group: \"webhooks\",\n command: \"list-deliveries\",\n method: \"get\",\n path: \"/webhooks/{id}/deliveries\",\n summary: \"List webhook deliveries\",\n description:\n \"Returns unexpired history, including for a deleted endpoint. Metadata does not include event payloads.\\n\\nRequired API key permissions: read:webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^whdel_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"type\",\n location: \"query\",\n required: false,\n schema: {\n $ref: \"#/components/schemas/WebhookEventName\"\n },\n flag: \"type\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"state\",\n location: \"query\",\n required: false,\n schema: {\n enum: [\"pending\", \"in_flight\", \"succeeded\", \"failed\", \"cancelled\"],\n type: \"string\"\n },\n flag: \"state\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"createdAfter\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n format: \"date-time\"\n },\n flag: \"created-after\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"createdBefore\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n format: \"date-time\"\n },\n flag: \"created-before\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"webhooks.listRuns\",\n group: \"webhooks\",\n command: \"list-runs\",\n method: \"get\",\n path: \"/webhooks/{id}/deliveries/{deliveryID}/runs\",\n summary: \"List delivery runs\",\n description:\n \"Required API key permissions: read:webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"deliveryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^whdel_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"delivery-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"cursor\",\n location: \"query\",\n required: false,\n schema: {\n type: \"string\",\n pattern: \"^whrun_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"cursor\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"limit\",\n location: \"query\",\n required: false,\n schema: {\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n default: 50\n },\n flag: \"limit\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\",\n pagination: \"cursor\"\n },\n {\n id: \"webhooks.redeliver\",\n group: \"webhooks\",\n command: \"redeliver\",\n method: \"post\",\n path: \"/webhooks/{id}/deliveries/{deliveryID}/redeliver\",\n summary: \"Redeliver a webhook event\",\n description:\n \"Checks the reviewed destination revision and current scope authority. Reuses the original event ID, payload, and expiry. Returns a conflict if a run is active, or the endpoint is disabled or deleted.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"deliveryID\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^whdel_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"delivery-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedDestinationRevision\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n },\n flag: \"expected-destination-revision\",\n kind: \"number\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.rotateSecret\",\n group: \"webhooks\",\n command: \"rotate-secret\",\n method: \"post\",\n path: \"/webhooks/{id}/rotate-secret\",\n summary: \"Rotate a webhook secret\",\n description:\n \"Returns a new secret once. Overlap keeps the old secret valid for 24 hours. Immediate rotation retires it at once. Normal rotation conflicts while a previous overlap remains active.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedRevision\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n },\n flag: \"expected-revision\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"mode\",\n location: \"body\",\n required: true,\n schema: {\n enum: [\"overlap\", \"immediate\"],\n type: \"string\"\n },\n flag: \"mode\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.sendTest\",\n group: \"webhooks\",\n command: \"send-test\",\n method: \"post\",\n path: \"/webhooks/{id}/test\",\n summary: \"Send a webhook test\",\n description:\n \"Schedules one signed synthetic attempt for this endpoint, including when disabled. The event must be selected by the endpoint. It does not enable the endpoint or change content.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"expectedRevision\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n },\n flag: \"expected-revision\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"type\",\n location: \"body\",\n required: true,\n schema: {\n $ref: \"#/components/schemas/WebhookEventName\"\n },\n flag: \"type\",\n kind: \"string\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"webhooks.update\",\n group: \"webhooks\",\n command: \"update\",\n method: \"put\",\n path: \"/webhooks/{id}\",\n summary: \"Update a webhook\",\n description:\n \"Checks expectedRevision and validates the merged configuration. A URL change cancels pending deliveries and returns a replacement secret once. Scope changes require authority over the previous and new scope.\\n\\nRequired API key permissions: webhooks. Write permissions also grant read access for the same resource.\",\n security: [\n {\n apiKey: []\n },\n {\n oauth: []\n }\n ],\n fields: [\n {\n name: \"id\",\n location: \"path\",\n required: true,\n schema: {\n type: \"string\",\n pattern: \"^wh_[A-Za-z\\\\d]{1,22}$\"\n },\n flag: \"id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"x-workspace-id\",\n location: \"header\",\n required: false,\n schema: {\n type: \"string\",\n description:\n \"Required for OAuth: ID of the workspace to access. API keys use their own workspace.\"\n },\n flag: \"x-workspace-id\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"name\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n minLength: 1,\n maxLength: 100\n },\n flag: \"name\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"url\",\n location: \"body\",\n required: false,\n schema: {\n type: \"string\",\n maxLength: 2048,\n format: \"uri\"\n },\n flag: \"url\",\n kind: \"string\",\n nullable: false\n },\n {\n name: \"enabled\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\"\n },\n flag: \"enabled\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"eventTypes\",\n location: \"body\",\n required: false,\n schema: {\n type: \"array\",\n minItems: 1,\n maxItems: 14,\n items: {\n $ref: \"#/components/schemas/WebhookEventName\"\n }\n },\n flag: \"event-types\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"schemaVersion\",\n location: \"body\",\n required: false,\n schema: {\n const: 1\n },\n flag: \"schema-version\",\n kind: \"number\",\n nullable: false\n },\n {\n name: \"collections\",\n location: \"body\",\n required: false,\n schema: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"all\"\n }\n },\n required: [\"mode\"],\n additionalProperties: false\n },\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"selected\"\n },\n roots: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n pattern: \"^coll_[A-Za-z\\\\d]{1,22}$\"\n }\n }\n },\n required: [\"mode\", \"roots\"],\n additionalProperties: false\n }\n ]\n },\n flag: \"collections\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"channels\",\n location: \"body\",\n required: false,\n schema: {\n anyOf: [\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"all\"\n }\n },\n required: [\"mode\"],\n additionalProperties: false\n },\n {\n type: \"object\",\n properties: {\n mode: {\n const: \"selected\"\n },\n codes: {\n type: \"array\",\n minItems: 1,\n maxItems: 100,\n items: {\n type: \"string\",\n minLength: 1,\n maxLength: 50\n }\n }\n },\n required: [\"mode\", \"codes\"],\n additionalProperties: false\n }\n ]\n },\n flag: \"channels\",\n kind: \"json\",\n nullable: false\n },\n {\n name: \"restrictedContent\",\n location: \"body\",\n required: false,\n schema: {\n type: \"boolean\",\n description: \"Include restricted collections, including ones restricted later\"\n },\n flag: \"restricted-content\",\n kind: \"boolean\",\n nullable: false\n },\n {\n name: \"expectedRevision\",\n location: \"body\",\n required: true,\n schema: {\n type: \"integer\",\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n exclusiveMinimum: 0\n },\n flag: \"expected-revision\",\n kind: \"number\",\n nullable: false\n }\n ],\n conditional: false,\n response: \"json\"\n },\n {\n id: \"workspaces.list\",\n group: \"workspaces\",\n command: \"list\",\n method: \"get\",\n path: \"/workspaces\",\n summary: \"List available workspaces\",\n description:\n \"Lists workspaces available to the OAuth user, with current role permissions and plan access. Browser sessions can list workspaces across signed-in accounts. Does not require workspace selection and does not count toward API usage.\",\n security: [\n {\n oauth: []\n }\n ],\n fields: [],\n conditional: false,\n response: \"json\"\n }\n];\nconst schemas: Record<string, JSONSchema> = {\n PropertyFilter: {\n anyOf: [\n {\n $ref: \"#/components/schemas/TextPropertyFilter\"\n },\n {\n $ref: \"#/components/schemas/NumberPropertyFilter\"\n },\n {\n $ref: \"#/components/schemas/BooleanPropertyFilter\"\n },\n {\n $ref: \"#/components/schemas/DatePropertyFilter\"\n }\n ]\n },\n TextPropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"text\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n operator: {\n enum: [\"any\", \"all\", \"none\"],\n type: \"string\",\n default: \"any\"\n },\n values: {\n type: \"array\",\n minItems: 1,\n maxItems: 20,\n items: {\n type: \"string\",\n maxLength: 500\n }\n }\n },\n required: [\"kind\", \"key\", \"values\"]\n },\n NumberPropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"number\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n operator: {\n $ref: \"#/components/schemas/ComparisonOperator\"\n },\n value: {\n type: \"number\"\n }\n },\n required: [\"kind\", \"key\", \"operator\", \"value\"]\n },\n ComparisonOperator: {\n enum: [\n \"equals\",\n \"notEquals\",\n \"greaterThan\",\n \"greaterThanOrEqual\",\n \"lessThan\",\n \"lessThanOrEqual\"\n ],\n type: \"string\"\n },\n BooleanPropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"boolean\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n value: {\n type: \"boolean\"\n }\n },\n required: [\"kind\", \"key\", \"value\"]\n },\n DatePropertyFilter: {\n type: \"object\",\n properties: {\n kind: {\n const: \"date\"\n },\n key: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n description: \"Property identifier\"\n },\n operator: {\n $ref: \"#/components/schemas/ComparisonOperator\"\n },\n value: {\n type: \"string\"\n }\n },\n required: [\"kind\", \"key\", \"operator\", \"value\"]\n },\n WebhookEventName: {\n enum: [\n \"entry.created\",\n \"entry.updated\",\n \"entry.content_saved\",\n \"entry.moved\",\n \"entry.deleted\",\n \"entry.restored\",\n \"collection.created\",\n \"collection.updated\",\n \"collection.moved\",\n \"collection.deleted\",\n \"collection.restored\",\n \"publishing.channel_advanced\",\n \"publishing.channel_created\",\n \"publishing.channel_deleted\"\n ],\n type: \"string\"\n },\n Permission: {\n enum: [\n \"content\",\n \"publishing\",\n \"api_keys\",\n \"read:api_keys\",\n \"billing\",\n \"read:billing\",\n \"restricted_collections\",\n \"read:restricted_collections\",\n \"memberships\",\n \"roles\",\n \"webhooks\",\n \"read:webhooks\",\n \"workspace\"\n ],\n type: \"string\"\n },\n AnswerHistoryMessage: {\n type: \"object\",\n properties: {\n role: {\n enum: [\"user\", \"assistant\"],\n type: \"string\"\n },\n content: {\n type: \"string\",\n minLength: 1,\n maxLength: 4000\n }\n },\n required: [\"role\", \"content\"]\n },\n PublishEntryTarget: {\n type: \"object\",\n properties: {\n entryID: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Entry to publish\"\n },\n versionID: {\n type: \"string\",\n pattern: \"^(?:\\\\w+?_[A-Za-z\\\\d]{1,22})$\",\n description: \"Existing version to publish\"\n }\n },\n required: [\"entryID\"]\n }\n};\nexport { commands, schemas };\n","import { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport type { APICommand, APIField, APIOptions } from \"./types\";\n\nconst readStdin = async (signal: AbortSignal): Promise<Buffer> => {\n const chunks: Buffer[] = [];\n const abort = () =>\n process.stdin.destroy(signal.reason instanceof Error ? signal.reason : new Error(\"Cancelled.\"));\n\n signal.throwIfAborted();\n signal.addEventListener(\"abort\", abort, { once: true });\n\n try {\n for await (const chunk of process.stdin) chunks.push(Buffer.from(chunk));\n signal.throwIfAborted();\n return Buffer.concat(chunks);\n } finally {\n signal.removeEventListener(\"abort\", abort);\n }\n};\nconst optionKey = (flag: string): string =>\n flag.replace(/-([a-z])/g, (_match, letter: string) => letter.toUpperCase());\n\nconst parseFlag = (field: APIField, value: string): unknown => {\n if (field.nullable && value === \"null\") return null;\n if (field.kind === \"string\" || field.kind === \"file\") return value;\n if (field.kind === \"boolean\") {\n if (value === \"true\") return true;\n if (value === \"false\") return false;\n throw new CLIError(`--${field.flag} expects true or false.`, exitCodes.usage);\n }\n\n try {\n const parsed: unknown = JSON.parse(value);\n\n if (field.kind === \"number\" && (typeof parsed !== \"number\" || !Number.isFinite(parsed))) {\n throw new Error();\n }\n\n return parsed;\n } catch {\n throw new CLIError(\n `--${field.flag} expects ${field.kind === \"number\" ? \"a number\" : \"valid JSON\"}.`,\n exitCodes.usage\n );\n }\n};\n\n/** Flat flags replace matching JSON fields; omitted flags never introduce defaults. */\nconst readInput = async (\n command: APICommand,\n options: APIOptions,\n signal: AbortSignal\n): Promise<Record<string, unknown>> => {\n let input: Record<string, unknown> = {};\n let stdinUsed = options.input === \"-\";\n\n if (options.input !== undefined) {\n if (options.input !== \"-\" && !options.input.startsWith(\"@\")) {\n throw new CLIError(\n \"Use --input @file.json or --input - for JSON from stdin.\",\n exitCodes.usage\n );\n }\n\n const source =\n options.input === \"-\"\n ? await readStdin(signal)\n : await readFile(options.input.slice(1), { signal });\n let parsed: unknown;\n\n try {\n parsed = JSON.parse(source.toString(\"utf8\"));\n } catch {\n throw new CLIError(\"Input is not valid JSON.\", exitCodes.usage);\n }\n\n if (!parsed || typeof parsed !== \"object\" || Array.isArray(parsed)) {\n throw new CLIError(\"Input must be a JSON object.\", exitCodes.usage);\n }\n\n input = { ...parsed };\n }\n\n const fields = new Set(command.fields.map((field) => field.name));\n\n for (const name of Object.keys(input)) {\n if (!fields.has(name)) {\n throw new CLIError(`Unknown input field: ${name}. See --help or --schema.`, exitCodes.usage);\n }\n }\n\n for (const field of command.fields) {\n const value = options[optionKey(field.flag)];\n\n if (typeof value === \"string\") input[field.name] = parseFlag(field, value);\n\n const supplied = Object.hasOwn(input, field.name);\n\n if (field.required && !supplied) {\n throw new CLIError(`Missing ${field.name}. Use --${field.flag} or --input.`, exitCodes.usage);\n }\n\n if (!supplied) continue;\n\n const current = input[field.name];\n\n if (current === null && field.nullable) continue;\n if (typeof current === \"number\" && !Number.isFinite(current)) {\n throw new CLIError(`Invalid number for ${field.name}.`, exitCodes.usage);\n }\n\n if (\n field.kind !== \"json\" &&\n typeof current !== (field.kind === \"file\" ? \"string\" : field.kind)\n ) {\n throw new CLIError(\n `Invalid type for ${field.name}; expected ${field.kind}.`,\n exitCodes.usage\n );\n }\n\n if (field.kind === \"file\") {\n const file = current as string;\n\n if (file === \"-\" && stdinUsed) {\n throw new CLIError(\n \"Stdin can supply either JSON or one upload file, not both.\",\n exitCodes.usage\n );\n }\n\n const bytes = file === \"-\" ? await readStdin(signal) : await readFile(file, { signal });\n\n stdinUsed ||= file === \"-\";\n input[field.name] = new File(\n [new Uint8Array(bytes)],\n file === \"-\" ? \"stdin\" : path.basename(file),\n { type: \"application/octet-stream\" }\n );\n }\n }\n\n return input;\n};\n\nexport { readInput, optionKey };\n","// Generated from SDK openapi.json. Do not edit.\nimport type { operations, OperationInput } from \"@andesine/sdk\";\nimport type { SDKOperation } from \"./types\";\n\nconst bindings: Record<keyof operations, SDKOperation> = {\n \"assets.attach\": (client, input, options) =>\n client.assets.attach(input as OperationInput<\"assets.attach\">, options),\n \"assets.get\": (client, input, options) =>\n client.assets.get(input as OperationInput<\"assets.get\">, options),\n \"assets.importURL\": (client, input, options) =>\n client.assets.importURL(input as OperationInput<\"assets.importURL\">, options),\n \"assets.register\": (client, input, options) =>\n client.assets.register(input as OperationInput<\"assets.register\">, options),\n \"assets.search\": (client, input, options) =>\n client.assets.search(input as OperationInput<\"assets.search\">, options),\n \"assets.upload\": (client, input, options) =>\n client.assets.upload(input as OperationInput<\"assets.upload\">, options),\n \"auth.getIdentity\": (client, input, options) =>\n client.auth.getIdentity(input as OperationInput<\"auth.getIdentity\">, options),\n \"collections.bulkDelete\": (client, input, options) =>\n client.collections.bulkDelete(input as OperationInput<\"collections.bulkDelete\">, options),\n \"collections.create\": (client, input, options) =>\n client.collections.create(input as OperationInput<\"collections.create\">, options),\n \"collections.delete\": (client, input, options) =>\n client.collections.delete(input as OperationInput<\"collections.delete\">, options),\n \"collections.list\": (client, input, options) =>\n client.collections.list(input as OperationInput<\"collections.list\">, options),\n \"collections.update\": (client, input, options) =>\n client.collections.update(input as OperationInput<\"collections.update\">, options),\n \"content.get\": (client, input, options) =>\n client.content.get(input as OperationInput<\"content.get\">, options),\n \"content.getAsset\": (client, input, options) =>\n client.content.getAsset(input as OperationInput<\"content.getAsset\">, options),\n \"content.getSchema\": (client, input, options) =>\n client.content.getSchema(input as OperationInput<\"content.getSchema\">, options),\n \"content.getTree\": (client, input, options) =>\n client.content.getTree(input as OperationInput<\"content.getTree\">, options),\n \"content.listCollections\": (client, input, options) =>\n client.content.listCollections(input as OperationInput<\"content.listCollections\">, options),\n \"content.listEntries\": (client, input, options) =>\n client.content.listEntries(input as OperationInput<\"content.listEntries\">, options),\n \"entries.bulkDelete\": (client, input, options) =>\n client.entries.bulkDelete(input as OperationInput<\"entries.bulkDelete\">, options),\n \"entries.create\": (client, input, options) =>\n client.entries.create(input as OperationInput<\"entries.create\">, options),\n \"entries.delete\": (client, input, options) =>\n client.entries.delete(input as OperationInput<\"entries.delete\">, options),\n \"entries.get\": (client, input, options) =>\n client.entries.get(input as OperationInput<\"entries.get\">, options),\n \"entries.list\": (client, input, options) =>\n client.entries.list(input as OperationInput<\"entries.list\">, options),\n \"entries.update\": (client, input, options) =>\n client.entries.update(input as OperationInput<\"entries.update\">, options),\n \"instance.get\": (client, input, options) =>\n client.instance.get(input as OperationInput<\"instance.get\">, options),\n \"memberships.invite\": (client, input, options) =>\n client.memberships.invite(input as OperationInput<\"memberships.invite\">, options),\n \"memberships.list\": (client, input, options) =>\n client.memberships.list(input as OperationInput<\"memberships.list\">, options),\n \"memberships.listInvites\": (client, input, options) =>\n client.memberships.listInvites(input as OperationInput<\"memberships.listInvites\">, options),\n \"memberships.remove\": (client, input, options) =>\n client.memberships.remove(input as OperationInput<\"memberships.remove\">, options),\n \"memberships.resendInvite\": (client, input, options) =>\n client.memberships.resendInvite(input as OperationInput<\"memberships.resendInvite\">, options),\n \"memberships.revokeInvite\": (client, input, options) =>\n client.memberships.revokeInvite(input as OperationInput<\"memberships.revokeInvite\">, options),\n \"memberships.update\": (client, input, options) =>\n client.memberships.update(input as OperationInput<\"memberships.update\">, options),\n \"publishing.bulkPublishCollections\": (client, input, options) =>\n client.publishing.bulkPublishCollections(\n input as OperationInput<\"publishing.bulkPublishCollections\">,\n options\n ),\n \"publishing.bulkPublishEntries\": (client, input, options) =>\n client.publishing.bulkPublishEntries(\n input as OperationInput<\"publishing.bulkPublishEntries\">,\n options\n ),\n \"publishing.bulkSetCollections\": (client, input, options) =>\n client.publishing.bulkSetCollections(\n input as OperationInput<\"publishing.bulkSetCollections\">,\n options\n ),\n \"publishing.bulkUnpublishCollections\": (client, input, options) =>\n client.publishing.bulkUnpublishCollections(\n input as OperationInput<\"publishing.bulkUnpublishCollections\">,\n options\n ),\n \"publishing.bulkUnpublishEntries\": (client, input, options) =>\n client.publishing.bulkUnpublishEntries(\n input as OperationInput<\"publishing.bulkUnpublishEntries\">,\n options\n ),\n \"publishing.createChannel\": (client, input, options) =>\n client.publishing.createChannel(input as OperationInput<\"publishing.createChannel\">, options),\n \"publishing.deleteChannel\": (client, input, options) =>\n client.publishing.deleteChannel(input as OperationInput<\"publishing.deleteChannel\">, options),\n \"publishing.getChannelContent\": (client, input, options) =>\n client.publishing.getChannelContent(\n input as OperationInput<\"publishing.getChannelContent\">,\n options\n ),\n \"publishing.getEntryVersion\": (client, input, options) =>\n client.publishing.getEntryVersion(\n input as OperationInput<\"publishing.getEntryVersion\">,\n options\n ),\n \"publishing.listChannels\": (client, input, options) =>\n client.publishing.listChannels(input as OperationInput<\"publishing.listChannels\">, options),\n \"publishing.listEntryPublications\": (client, input, options) =>\n client.publishing.listEntryPublications(\n input as OperationInput<\"publishing.listEntryPublications\">,\n options\n ),\n \"publishing.publishCollection\": (client, input, options) =>\n client.publishing.publishCollection(\n input as OperationInput<\"publishing.publishCollection\">,\n options\n ),\n \"publishing.publishEntry\": (client, input, options) =>\n client.publishing.publishEntry(input as OperationInput<\"publishing.publishEntry\">, options),\n \"publishing.revertChanges\": (client, input, options) =>\n client.publishing.revertChanges(input as OperationInput<\"publishing.revertChanges\">, options),\n \"publishing.setCollection\": (client, input, options) =>\n client.publishing.setCollection(input as OperationInput<\"publishing.setCollection\">, options),\n \"publishing.unpublishCollection\": (client, input, options) =>\n client.publishing.unpublishCollection(\n input as OperationInput<\"publishing.unpublishCollection\">,\n options\n ),\n \"publishing.unpublishEntry\": (client, input, options) =>\n client.publishing.unpublishEntry(input as OperationInput<\"publishing.unpublishEntry\">, options),\n \"roles.create\": (client, input, options) =>\n client.roles.create(input as OperationInput<\"roles.create\">, options),\n \"roles.delete\": (client, input, options) =>\n client.roles.delete(input as OperationInput<\"roles.delete\">, options),\n \"roles.list\": (client, input, options) =>\n client.roles.list(input as OperationInput<\"roles.list\">, options),\n \"roles.update\": (client, input, options) =>\n client.roles.update(input as OperationInput<\"roles.update\">, options),\n \"schemaMigrations.get\": (client, input, options) =>\n client.schemaMigrations.get(input as OperationInput<\"schemaMigrations.get\">, options),\n \"schemaMigrations.getActive\": (client, input, options) =>\n client.schemaMigrations.getActive(\n input as OperationInput<\"schemaMigrations.getActive\">,\n options\n ),\n \"schemaMigrations.listContentLossEntries\": (client, input, options) =>\n client.schemaMigrations.listContentLossEntries(\n input as OperationInput<\"schemaMigrations.listContentLossEntries\">,\n options\n ),\n \"schemas.apply\": (client, input, options) =>\n client.schemas.apply(input as OperationInput<\"schemas.apply\">, options),\n \"schemas.create\": (client, input, options) =>\n client.schemas.create(input as OperationInput<\"schemas.create\">, options),\n \"schemas.delete\": (client, input, options) =>\n client.schemas.delete(input as OperationInput<\"schemas.delete\">, options),\n \"schemas.get\": (client, input, options) =>\n client.schemas.get(input as OperationInput<\"schemas.get\">, options),\n \"schemas.getRevision\": (client, input, options) =>\n client.schemas.getRevision(input as OperationInput<\"schemas.getRevision\">, options),\n \"schemaVersions.get\": (client, input, options) =>\n client.schemaVersions.get(input as OperationInput<\"schemaVersions.get\">, options),\n \"schemaVersions.list\": (client, input, options) =>\n client.schemaVersions.list(input as OperationInput<\"schemaVersions.list\">, options),\n \"schemaVersions.revert\": (client, input, options) =>\n client.schemaVersions.revert(input as OperationInput<\"schemaVersions.revert\">, options),\n \"schemaVersions.update\": (client, input, options) =>\n client.schemaVersions.update(input as OperationInput<\"schemaVersions.update\">, options),\n \"search.askCurrent\": (client, input, options) =>\n client.search.askCurrent(input as OperationInput<\"search.askCurrent\">, options),\n \"search.askCurrentStream\": (client, input, options) =>\n client.search.askCurrentStream(input as OperationInput<\"search.askCurrentStream\">, options),\n \"search.askPublished\": (client, input, options) =>\n client.search.askPublished(input as OperationInput<\"search.askPublished\">, options),\n \"search.askPublishedStream\": (client, input, options) =>\n client.search.askPublishedStream(input as OperationInput<\"search.askPublishedStream\">, options),\n \"search.current\": (client, input, options) =>\n client.search.current(input as OperationInput<\"search.current\">, options),\n \"search.published\": (client, input, options) =>\n client.search.published(input as OperationInput<\"search.published\">, options),\n \"typeMetadata.getCurrent\": (client, input, options) =>\n client.typeMetadata.getCurrent(input as OperationInput<\"typeMetadata.getCurrent\">, options),\n \"typeMetadata.getPublished\": (client, input, options) =>\n client.typeMetadata.getPublished(input as OperationInput<\"typeMetadata.getPublished\">, options),\n \"versions.create\": (client, input, options) =>\n client.versions.create(input as OperationInput<\"versions.create\">, options),\n \"versions.get\": (client, input, options) =>\n client.versions.get(input as OperationInput<\"versions.get\">, options),\n \"versions.list\": (client, input, options) =>\n client.versions.list(input as OperationInput<\"versions.list\">, options),\n \"versions.revert\": (client, input, options) =>\n client.versions.revert(input as OperationInput<\"versions.revert\">, options),\n \"versions.update\": (client, input, options) =>\n client.versions.update(input as OperationInput<\"versions.update\">, options),\n \"webhooks.bulkDelete\": (client, input, options) =>\n client.webhooks.bulkDelete(input as OperationInput<\"webhooks.bulkDelete\">, options),\n \"webhooks.bulkRedeliver\": (client, input, options) =>\n client.webhooks.bulkRedeliver(input as OperationInput<\"webhooks.bulkRedeliver\">, options),\n \"webhooks.bulkSetEnabled\": (client, input, options) =>\n client.webhooks.bulkSetEnabled(input as OperationInput<\"webhooks.bulkSetEnabled\">, options),\n \"webhooks.create\": (client, input, options) =>\n client.webhooks.create(input as OperationInput<\"webhooks.create\">, options),\n \"webhooks.delete\": (client, input, options) =>\n client.webhooks.delete(input as OperationInput<\"webhooks.delete\">, options),\n \"webhooks.get\": (client, input, options) =>\n client.webhooks.get(input as OperationInput<\"webhooks.get\">, options),\n \"webhooks.getDelivery\": (client, input, options) =>\n client.webhooks.getDelivery(input as OperationInput<\"webhooks.getDelivery\">, options),\n \"webhooks.list\": (client, input, options) =>\n client.webhooks.list(input as OperationInput<\"webhooks.list\">, options),\n \"webhooks.listAttempts\": (client, input, options) =>\n client.webhooks.listAttempts(input as OperationInput<\"webhooks.listAttempts\">, options),\n \"webhooks.listDeliveries\": (client, input, options) =>\n client.webhooks.listDeliveries(input as OperationInput<\"webhooks.listDeliveries\">, options),\n \"webhooks.listRuns\": (client, input, options) =>\n client.webhooks.listRuns(input as OperationInput<\"webhooks.listRuns\">, options),\n \"webhooks.redeliver\": (client, input, options) =>\n client.webhooks.redeliver(input as OperationInput<\"webhooks.redeliver\">, options),\n \"webhooks.rotateSecret\": (client, input, options) =>\n client.webhooks.rotateSecret(input as OperationInput<\"webhooks.rotateSecret\">, options),\n \"webhooks.sendTest\": (client, input, options) =>\n client.webhooks.sendTest(input as OperationInput<\"webhooks.sendTest\">, options),\n \"webhooks.update\": (client, input, options) =>\n client.webhooks.update(input as OperationInput<\"webhooks.update\">, options),\n \"workspaces.list\": (client, input, options) =>\n client.workspaces.list(input as OperationInput<\"workspaces.list\">, options)\n};\nexport { bindings };\n","import { open, unlink } from \"node:fs/promises\";\nimport { Readable } from \"node:stream\";\nimport { pipeline } from \"node:stream/promises\";\nimport { CLIError } from \"../errors\";\nimport { writeOutput } from \"../output\";\n\n/** Write bytes only to an explicit destination; never overwrite an existing file. */\nconst writeBinary = async (\n value: unknown,\n destination: string,\n signal: AbortSignal\n): Promise<void> => {\n if (!(value instanceof Blob)) throw new CLIError(\"Expected binary data from this API operation.\");\n\n if (destination === \"-\") {\n for await (const chunk of value.stream()) {\n signal.throwIfAborted();\n await writeOutput(process.stdout, Buffer.from(chunk));\n }\n return;\n }\n\n const file = await open(destination, \"wx\");\n let completed = false;\n\n try {\n await pipeline(Readable.fromWeb(value.stream()), file.createWriteStream(), { signal });\n completed = true;\n } finally {\n await file.close();\n if (!completed) await unlink(destination);\n }\n};\n\nexport { writeBinary };\n","import {\n createClient,\n paginatePages,\n type AndesineClient,\n type OperationInput,\n type RequestOptions,\n type AnswerEvent\n} from \"@andesine/sdk\";\nimport { authenticatedClient } from \"../auth/client\";\nimport type { CommandContext } from \"../context\";\nimport { CLIError, exitCodes } from \"../errors\";\nimport { workspaceIDSchema } from \"../config/schema\";\nimport { readInput } from \"./input\";\nimport { bindings } from \"./bindings\";\nimport { reportAPIError } from \"./errors\";\nimport { writeBinary } from \"./binary\";\nimport type { APICommand, APIOptions } from \"./types\";\n\ninterface CursorPage {\n data: unknown[];\n pagination: { hasMore: boolean; nextCursor: string | null };\n}\n\nconst isPage = (value: unknown): value is CursorPage => {\n if (\n !value ||\n typeof value !== \"object\" ||\n !(\"data\" in value) ||\n !Array.isArray(value.data) ||\n !(\"pagination\" in value)\n ) {\n return false;\n }\n\n const pagination = value.pagination;\n\n return Boolean(\n pagination &&\n typeof pagination === \"object\" &&\n \"hasMore\" in pagination &&\n typeof pagination.hasMore === \"boolean\" &&\n \"nextCursor\" in pagination &&\n (pagination.nextCursor === null || typeof pagination.nextCursor === \"string\")\n );\n};\n\nconst pages = async function* (\n command: APICommand,\n client: AndesineClient,\n input: Record<string, unknown>,\n options: RequestOptions\n): AsyncGenerator<unknown> {\n if (command.id === \"content.listCollections\") {\n yield* client.content.paginateCollectionPages(\n input as OperationInput<\"content.listCollections\">,\n { ...options, response: \"data\" }\n );\n return;\n }\n\n if (command.id === \"content.listEntries\") {\n yield* client.content.paginateEntryPages(input as OperationInput<\"content.listEntries\">, {\n ...options,\n response: \"data\"\n });\n return;\n }\n\n const invoke = bindings[command.id as keyof typeof bindings];\n\n yield* paginatePages(\n async (cursor) => {\n const result = await invoke(client, { ...input, cursor }, { ...options, response: \"full\" });\n\n if (!isPage(result.data)) {\n throw new CLIError(\"The server returned an invalid paginated response.\");\n }\n\n return result.data;\n },\n { cursor: typeof input.cursor === \"string\" ? input.cursor : undefined }\n );\n};\n\n/** Use the SDK for all transport; command metadata and execution bindings are bundled locally. */\nconst executeAPI = async (\n command: APICommand,\n options: APIOptions,\n context: CommandContext\n): Promise<void> => {\n const { output, signal } = context;\n const timeout = options.timeout === undefined ? 30_000 : Number(options.timeout);\n\n if (!Number.isFinite(timeout) || timeout < 0 || options.timeout?.trim() === \"\") {\n throw new CLIError(\n \"--timeout must be a nonnegative number of milliseconds; 0 disables it.\",\n exitCodes.usage\n );\n }\n\n if (options.paginate && !command.pagination) {\n throw new CLIError(\"This operation does not support cursor pagination.\", exitCodes.usage);\n }\n\n if (options.paginate && options.ifNoneMatch !== undefined) {\n throw new CLIError(\"Conditional headers cannot be combined with --paginate.\", exitCodes.usage);\n }\n\n if (options.paginate && options.full) {\n throw new CLIError(\n \"--full cannot be combined with --paginate; pages already retain pagination and snapshot metadata.\",\n exitCodes.usage\n );\n }\n\n if (command.response === \"binary\" && !options.output) {\n throw new CLIError(\"Specify --output <file> or --output - for binary data.\", exitCodes.usage);\n }\n\n if (options.output && command.response !== \"binary\") {\n throw new CLIError(\"Use shell redirection for JSON and text output.\", exitCodes.usage);\n }\n\n if (options.format === \"text\" && command.response !== \"stream\") {\n throw new CLIError(\"--format text is only available for AI answer streams.\", exitCodes.usage);\n }\n\n const input = await readInput(command, options, signal);\n const headers = new Headers();\n\n for (const field of command.fields) {\n if (field.location !== \"header\" || !Object.hasOwn(input, field.name)) continue;\n\n headers.set(field.name, String(input[field.name]));\n delete input[field.name];\n }\n\n if (options.ifNoneMatch !== undefined) headers.set(\"If-None-Match\", options.ifNoneMatch);\n\n const request: RequestOptions = { signal, timeout, retries: 0, headers };\n\n await output.heading(`Andesine · ${command.summary}`);\n\n try {\n const anonymous =\n command.security.length === 0 ||\n command.security.some((requirement) => !Object.keys(requirement).length);\n const auth = anonymous\n ? {\n client: createClient({\n baseURL: context.config.baseURL,\n fetch: (input, init) => fetch(input, { ...init, redirect: \"error\" })\n }),\n source: \"anonymous\"\n }\n : await authenticatedClient(context);\n const acceptsAPIKey = command.security.some((requirement) =>\n Object.hasOwn(requirement, \"apiKey\")\n );\n\n if (auth.source === \"environment\" && !acceptsAPIKey) {\n throw new CLIError(\n \"This operation requires OAuth login. Unset ANDESINE_API_KEY and run andesine auth login.\"\n );\n }\n\n const requiresWorkspace =\n (auth.source === \"file\" || auth.source === \"keyring\") &&\n command.fields.some(\n (field) => field.location === \"header\" && field.name === \"x-workspace-id\"\n );\n\n if (requiresWorkspace) {\n const workspaceID = headers.get(\"x-workspace-id\") ?? context.config.workspaceID;\n\n if (workspaceID === undefined) {\n throw new CLIError(\n \"No workspace selected. Run andesine init, pass --workspace <id>, or set ANDESINE_WORKSPACE_ID. Use andesine api workspaces list to find a workspace ID.\",\n exitCodes.usage\n );\n }\n\n if (!workspaceIDSchema.safeParse(workspaceID).success) {\n throw new CLIError(\"The workspace must be a workspace ID (ws_…).\", exitCodes.usage);\n }\n\n headers.set(\"x-workspace-id\", workspaceID);\n }\n\n if (options.paginate) {\n let count = 0;\n\n for await (const page of pages(command, auth.client, input, request)) {\n signal.throwIfAborted();\n await output.json(page);\n count += 1;\n }\n\n await output.success(`Received ${count} page${count === 1 ? \"\" : \"s\"}.`);\n return;\n }\n\n const invoke = bindings[command.id as keyof typeof bindings];\n const response = await output.progress(\n \"Sending request\",\n () => invoke(auth.client, input, { ...request, response: \"full\" }),\n \"Response received\"\n );\n\n if (response.notModified) {\n await output.json({\n status: 304,\n notModified: true,\n etag: response.headers.get(\"etag\"),\n ...(options.full ? { headers: Object.fromEntries(response.headers), data: null } : {})\n });\n return;\n }\n\n if (options.full) {\n await output.json({\n status: response.status,\n headers: Object.fromEntries(response.headers),\n data: response.data ?? null,\n notModified: false\n });\n return;\n }\n\n if (command.response === \"stream\") {\n const events = response.data as AsyncIterable<AnswerEvent>;\n\n for await (const event of events) {\n signal.throwIfAborted();\n if (options.format !== \"text\") await output.json(event);\n else if (event.type === \"textDelta\") await output.text(event.text);\n }\n\n await output.success(\"Answer complete.\");\n } else if (command.response === \"binary\") {\n await writeBinary(response.data, options.output!, signal);\n await output.success(\n options.output === \"-\" ? \"Download complete.\" : `Saved ${options.output}.`\n );\n } else if (command.response === \"empty\" || response.data === undefined) {\n await output.success(`Request completed (${response.status}).`);\n } else {\n await output.json(response.data);\n }\n } catch (error) {\n await reportAPIError(context, error);\n }\n};\n\nexport { executeAPI };\n","import { Option, type CommandUnknownOpts } from \"@commander-js/extra-typings\";\nimport { createCommandContext } from \"../context\";\nimport { createOutput } from \"../output\";\nimport type { GlobalOptions } from \"../config/resolve\";\nimport { commands, schemas } from \"./manifest\";\nimport { executeAPI } from \"./execute\";\nimport type { APIOptions } from \"./types\";\n\n/** Register the public spec without reading user config or credentials for help. */\nconst registerAPI = (program: CommandUnknownOpts, signal: AbortSignal): void => {\n const api = program\n .command(\"api\")\n .description(\"Call the public API; browser-only endpoints are not exposed\");\n const groups = new Map<string, CommandUnknownOpts>();\n\n for (const operation of commands) {\n let group = groups.get(operation.group);\n\n if (!group) {\n group = api.command(operation.group).description(`${operation.group} operations`);\n group.action(() => group?.outputHelp());\n groups.set(operation.group, group);\n }\n\n const command = group\n .command(operation.command)\n .description(operation.summary)\n .option(\n \"--input <source>\",\n \"JSON object from @file or - (stdin); flags override matching fields\"\n )\n .option(\"--timeout <ms>\", \"Request timeout in milliseconds (default: 30000; 0 disables it)\")\n .option(\"--schema\", \"Print the bundled input JSON Schema without making a request\");\n\n if (operation.conditional) {\n command.option(\"--if-none-match <etag>\", \"Read only if the published content has changed\");\n }\n\n if (operation.response === \"json\" || operation.response === \"empty\") {\n command.option(\"--full\", \"Include HTTP status and headers with the response data\");\n }\n\n if (operation.pagination) {\n command.option(\"--paginate\", \"Emit every page as one JSON line, retaining snapshot metadata\");\n }\n\n if (operation.response === \"binary\") {\n command.option(\"--output <file>\", \"Save bytes to a new file, or use - for raw stdout\");\n }\n\n if (operation.response === \"stream\") {\n command.addOption(\n new Option(\"--format <format>\", \"NDJSON events or answer text deltas\")\n .choices([\"json\", \"text\"])\n .default(\"json\")\n );\n }\n\n for (const field of operation.fields) {\n const argument = field.kind === \"file\" ? \"file\" : field.kind === \"json\" ? \"json\" : \"value\";\n const description = [\n field.schema.description,\n field.required ? \"Required\" : undefined,\n field.kind === \"file\"\n ? \"File path or - for stdin\"\n : field.kind === \"boolean\"\n ? \"true or false\"\n : field.kind === \"json\"\n ? \"JSON value\"\n : undefined,\n field.nullable ? \"Use null to clear\" : undefined\n ]\n .filter(Boolean)\n .join(\". \");\n\n command.option(`--${field.flag} <${argument}>`, description || field.name);\n }\n\n const authentication = operation.security.length\n ? operation.security.map((requirement) => Object.keys(requirement).join(\" + \")).join(\" or \")\n : \"Anonymous\";\n\n command.addHelpText(\n \"after\",\n `\\n${operation.description}\\n\\n${operation.method.toUpperCase()} ${operation.path}\\nAuthentication: ${authentication}\\nUse --workspace for OAuth workspace selection. JSON keys use API names, such as collectionID.\\n${operation.example ? `\\nExample input (pass through --input @request.json):\\n${JSON.stringify(operation.example, null, 2)}\\n` : \"\"}`\n );\n command.action(async (...args) => {\n const action = args.at(-1) as CommandUnknownOpts;\n const options = action.opts() as APIOptions;\n if (options.schema) {\n await createOutput(false).json({\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: Object.fromEntries(\n operation.fields.map((field) => [field.name, field.schema])\n ),\n required: operation.fields.filter((field) => field.required).map((field) => field.name),\n additionalProperties: false,\n components: { schemas }\n });\n return;\n }\n\n const context = await createCommandContext(action.optsWithGlobals() as GlobalOptions, signal);\n\n await executeAPI(operation, options, context);\n });\n }\n\n api.action(() => api.outputHelp());\n};\n\nexport { registerAPI };\n","import { type Command, Option } from \"@commander-js/extra-typings\";\nimport { createCommandContext } from \"../context\";\nimport { executeTypes } from \"./execute\";\nimport type { GlobalOptions } from \"../config/resolve\";\nimport type { GenerateOptions } from \"./options\";\n\nconst registerTypes = (program: Command, signal: AbortSignal): void => {\n const types = program\n .command(\"types\")\n .description(\"Generate TypeScript types for workspace content\");\n\n types\n .command(\"generate\")\n .description(\"Generate a types file, check it for CI, or watch for metadata changes\")\n .addOption(\n new Option(\n \"--source <source>\",\n \"Content source (default: saved source or published)\"\n ).choices([\"published\", \"current\"] as const)\n )\n .option(\"--channel <code>\", \"Follow a publishing channel\")\n .option(\"--snapshot <id>\", \"Use a fixed published snapshot\")\n .option(\"--collection <selectors...>\", \"Collection IDs or decoded paths, including descendants\")\n .option(\n \"--collection-slug-path <paths...>\",\n \"Decoded collection slug paths, including descendants\"\n )\n .option(\"--all-collections\", \"Include all accessible collections\")\n .option(\n \"--output <file>\",\n \"Types file relative to config, or the working directory without config\"\n )\n .option(\"--include-entry-ids\", \"Include entry ID types\")\n .option(\"--no-include-entry-ids\", \"Omit entry ID types\")\n .option(\"--include-entry-paths\", \"Include entry path types\")\n .option(\"--no-include-entry-paths\", \"Omit entry path types\")\n .option(\"--include-tree\", \"Include exact tree types\")\n .option(\"--no-include-tree\", \"Omit exact tree types\")\n .option(\"--check\", \"Compare against live metadata without writes; exit 3 if missing or stale\")\n .option(\"--watch\", \"Poll in the foreground; no daemon or overlapping requests\")\n .option(\"--interval <seconds>\", \"Watch polling interval, 1–300 seconds (default: 10)\")\n .option(\n \"--force\",\n \"Replace an unrelated output file; with watch, applies only until the first successful generation\"\n )\n .addHelpText(\n \"after\",\n \"\\nCommit the generated file and use --check in CI. Channel/current sources follow live changes;\\n--snapshot fixes the source while that snapshot is retained. Options override saved config.\\nWatch holds configuration fixed; restart it after config changes. Nothing runs at install time.\"\n )\n .action(async (options, command) => {\n const globals = command.optsWithGlobals() as GlobalOptions & GenerateOptions;\n\n await executeTypes(await createCommandContext(globals, signal), options);\n });\n};\n\nexport { registerTypes };\n","import { version } from \"../package.json\";\nimport { Command, Option } from \"@commander-js/extra-typings\";\nimport { createCommandContext } from \"./context\";\nimport { login } from \"./auth/login\";\nimport { logout } from \"./auth/logout\";\nimport { status } from \"./auth/status\";\nimport { init } from \"./init\";\nimport { createOutput } from \"./output\";\nimport { initPages } from \"./pages/init\";\nimport { registerAPI } from \"./api/register\";\nimport { registerTypes } from \"./types/register\";\n\n/** Register custom commands and the generated public API group. */\nconst createProgram = (signal: AbortSignal) => {\n const program = new Command()\n .name(\"andesine\")\n .description(\"Command-line tools for Andesine\")\n .version(version)\n .option(\"--config <file>\", \"Use a project configuration file (ANDESINE_CONFIG)\")\n .option(\"--profile <name>\", \"Select a saved user profile (ANDESINE_PROFILE)\")\n .option(\"--base-url <url>\", \"Set the API root (ANDESINE_BASE_URL)\")\n .option(\"--workspace <id>\", \"Select a workspace (ANDESINE_WORKSPACE_ID)\")\n .option(\"--no-interactive\", \"Disable interactive prompts\")\n .showHelpAfterError()\n .exitOverride();\n\n const auth = program.command(\"auth\").description(\"Manage CLI authentication\");\n\n program\n .command(\"init\")\n .description(\"Configure this project for Andesine content and type generation\")\n .addOption(\n new Option(\"--source <source>\", \"Type source: published (default) or current\").choices([\n \"published\",\n \"current\"\n ] as const)\n )\n .option(\"--channel <code>\", \"Publishing channel (default: published)\")\n .option(\"--snapshot <id>\", \"Use a fixed published snapshot instead of a channel\")\n .option(\n \"--collection <selectors...>\",\n \"Collection IDs or decoded paths, including collection-ID anchors\"\n )\n .option(\n \"--collection-slug-path <paths...>\",\n \"Decoded collection slug paths, including descendants\"\n )\n .option(\"--all-collections\", \"Include all accessible collections\")\n .option(\"--output <file>\", \"Types file relative to config (default: src/andesine.generated.ts)\")\n .option(\"--include-entry-ids\", \"Include entry ID types\")\n .option(\"--no-include-entry-ids\", \"Omit entry ID types\")\n .option(\"--include-entry-paths\", \"Include entry path types\")\n .option(\"--no-include-entry-paths\", \"Omit entry path types\")\n .option(\"--include-tree\", \"Include exact tree types\")\n .option(\"--no-include-tree\", \"Omit exact tree types\")\n .option(\"--yes\", \"Save without confirmation, including updates to an existing config\")\n .option(\"--generate\", \"Generate the configured types file after saving\")\n .option(\"--no-generate\", \"Save configuration without generating types\")\n .option(\"--no-browser\", \"Do not open a browser if login is needed\")\n .addOption(\n new Option(\"--credential-store <store>\", \"Credential store for a new login\").choices([\n \"keyring\",\n \"file\"\n ] as const)\n )\n .action(async (_options, command) => {\n await init(command.optsWithGlobals(), signal);\n });\n\n program\n .command(\"pages\")\n .description(\"Create Andesine Pages documentation sites\")\n .command(\"init\")\n .description(\"Create an Andesine Pages site from the template in a new or empty directory\")\n .argument(\"[directory]\", \"Directory of the new site\", \"docs\")\n .action(async (directory, _options, command) => {\n await initPages(directory, createOutput(command.optsWithGlobals().interactive, signal));\n });\n\n auth\n .command(\"login\")\n .description(\"Sign in through browser device approval\")\n .option(\"--no-browser\", \"Display the URL and code without opening a browser\")\n .addOption(\n new Option(\n \"--credential-store <store>\",\n \"Store credentials in the OS keyring or an unencrypted private file\"\n ).choices([\"keyring\", \"file\"] as const)\n )\n .action(async (options, command) => {\n const context = await createCommandContext(command.optsWithGlobals(), signal, {\n allowNewProfile: true\n });\n\n await login(context, options);\n });\n auth\n .command(\"status\")\n .description(\"Verify the selected credential and show its identity as JSON\")\n .action(async (_options, command) => {\n await status(await createCommandContext(command.optsWithGlobals(), signal));\n });\n auth\n .command(\"logout\")\n .description(\n \"Revoke and remove the selected profile's credentials; leave API-key environment variables unchanged\"\n )\n .action(async (_options, command) => {\n await logout(await createCommandContext(command.optsWithGlobals(), signal));\n });\n\n program.addHelpText(\n \"after\",\n \"\\nConfiguration precedence: flags > environment > project > profile > defaults.\\nDefault API root: https://api.andesine.app\\nAPI keys are read from ANDESINE_API_KEY by authenticated commands.\"\n );\n program.hook(\"preAction\", () => {\n signal.throwIfAborted();\n });\n registerAPI(program, signal);\n registerTypes(program, signal);\n program.action(() => {\n program.outputHelp();\n });\n\n return program;\n};\n\nexport { createProgram };\n","import { CLIError, CancelledError, exitCodes } from \"./errors\";\nimport { createProgram } from \"./program\";\nimport { createOutput, writeOutput } from \"./output\";\nimport { CommanderError } from \"commander\";\n\n/** Run the executable and release signal listeners when it finishes. */\nconst runCLI = async (argv = process.argv): Promise<number> => {\n const controller = new AbortController();\n const program = createProgram(controller.signal);\n const cancel = () => {\n controller.abort(new CancelledError());\n };\n const handleOutputError = (error: NodeJS.ErrnoException) => {\n const isBrokenPipe = error.code === \"EPIPE\";\n\n controller.abort(\n new CLIError(\n isBrokenPipe ? \"Output pipe closed.\" : \"Cannot write output.\",\n isBrokenPipe ? exitCodes.success : exitCodes.failure\n )\n );\n };\n\n let exitCode: number = exitCodes.success;\n\n process.once(\"SIGINT\", cancel);\n process.once(\"SIGTERM\", cancel);\n process.stdout.on(\"error\", handleOutputError);\n process.stderr.on(\"error\", handleOutputError);\n\n try {\n await program.parseAsync(argv);\n controller.signal.throwIfAborted();\n } catch (error) {\n if (error instanceof CommanderError) {\n exitCode = error.exitCode === 0 ? exitCodes.success : exitCodes.usage;\n } else {\n const failure: unknown = controller.signal.aborted ? controller.signal.reason : error;\n const message = failure instanceof Error ? failure.message : \"Command failed.\";\n\n exitCode = failure instanceof CLIError ? failure.exitCode : exitCodes.failure;\n\n if (exitCode !== exitCodes.success && !process.stderr.destroyed) {\n await createOutput(program.opts().interactive)\n .error(message)\n .catch(() => {});\n }\n }\n } finally {\n // Commander writes synchronously. Drain its queued output before releasing error handlers.\n await Promise.allSettled([writeOutput(process.stdout, \"\"), writeOutput(process.stderr, \"\")]);\n process.removeListener(\"SIGINT\", cancel);\n process.removeListener(\"SIGTERM\", cancel);\n process.stdout.removeListener(\"error\", handleOutputError);\n process.stderr.removeListener(\"error\", handleOutputError);\n }\n\n if (controller.signal.aborted) {\n const reason: unknown = controller.signal.reason;\n\n return reason instanceof CLIError ? reason.exitCode : exitCodes.failure;\n }\n\n return exitCode;\n};\n\nexport { run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T,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;GACT,KAAK;GACL,iBAAiB;EACnB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,QAAQ;IACV;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;GACT,UAAU;GACV,UAAU;GACV,UAAU;EACZ;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CAAC;EACT,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,KAAK,CAAC,cAAc,EACtB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,SAAS;IACX;IACA,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,MAAM;GACN,UAAU;EACZ;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,eACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,aAAa;GACb,YAAY;GACZ,SAAS;GACT,SAAS;GACT,SAAS;EACX;EACA,UAAU,CAAC;EACX,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM,CAAC,aAAa,SAAS;KAC7B,MAAM;IACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,KAAK,CAAC,aAAa,EACrB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,SAAS;IACX;IACA,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,MAAM;GACN,cAAc;EAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,QAAQ;EACV;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,QAAQ;KACR,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,aACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,QAAQ;EACV;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,cAAc;GACpB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS,CACP,EACE,SAAS,cACX,CACF;GACA,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO,EACL,MAAM,0CACR;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,cAAc;GACpB,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,eAAe;MACb,MAAM;MACN,WAAW;MACX,WAAW;KACb;KACA,sBAAsB;MACpB,MAAM;MACN,SAAS;KACX;KACA,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,cAAc;GACpB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,KAAK,CAAC,aAAa;GACnB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,MAAM,UACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,MAAM,UACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,cAAc;EAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,wBAAwB,KAC1B;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,SAAS,cACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,YAAY;GACZ,UAAU,CAAC,aAAa;GACxB,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;GACT,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,eAAe;MACb,MAAM;MACN,WAAW;MACX,WAAW;KACb;KACA,sBAAsB;MACpB,MAAM;MACN,SAAS;KACX;KACA,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,cAAc;GACd,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,SAAS;GACT,WAAW;EACb;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,MAAM;GACN,aAAa,CAAC,SAAS;EACzB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,OAAO,EACL,MAAM,kCACR;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,aACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,CAAC;EACV,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,OAAO,EACL,MAAM,kCACR;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,cAAc,eAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,mBAAmB;GACnB,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO;KACP,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,cAAc,eAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,mBAAmB;EACrB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,cAAc,eAChB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,YAAY,eACd;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;GACX;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,eACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,mBAAmB;EACrB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO;KACP,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO,CACL;MACE,MAAM;MACN,WAAW;MACX,WAAW;KACb,GACA,EACE,MAAM,OACR,CACF;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,UAAU,6BACZ;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,UAAU;GACV,SAAS;EACX;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,4CACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,MAAM,sCACR;KACA,SAAS,CAAC;IACZ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,aAAa,CAAC,YAAY;GAC1B,gBAAgB;EAClB;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,OAAO;MACL;OACE,MAAM;OACN,SAAS;MACX;MACA;OACE,MAAM;OACN,aACE;MACJ;MACA;OACE,MAAM;OACN,YAAY,EACV,oBAAoB;QAClB,MAAM;QACN,aACE;OACJ,EACF;OACA,UAAU,CAAC,oBAAoB;MACjC;KACF,EACF;KACA,SAAS,CAAC;KACV,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,aAAa,CAAC,YAAY;EAC5B;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,OAAO,EACL,OAAO;MACL;OACE,MAAM;OACN,SAAS;MACX;MACA;OACE,MAAM;OACN,aACE;MACJ;MACA;OACE,MAAM;OACN,YAAY,EACV,oBAAoB;QAClB,MAAM;QACN,aACE;OACJ,EACF;OACA,UAAU,CAAC,oBAAoB;MACjC;KACF,EACF;KACA,SAAS,CAAC;KACV,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;KACX,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,SAAS;GACT,OAAO;EACT;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS,EACP,IAAI,cACN;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,SAAS;GACP,IAAI;GACJ,MAAM;EACR;EACA,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,OAAO,CACL;MACE,MAAM;MACN,WAAW;MACX,WAAW;KACb,GACA,EACE,MAAM,OACR,CACF;KACA,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,YAAY;MACV,IAAI;OACF,MAAM;OACN,SAAS;MACX;MACA,kBAAkB;OAChB,MAAM;OACN,SAAS;OACT,SAAS;OACT,kBAAkB;MACpB;KACF;KACA,UAAU,CAAC,MAAM,kBAAkB;KACnC,sBAAsB;IACxB;GACF;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,SAAS;KACX;IACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO;MACL,MAAM;MACN,YAAY;OACV,IAAI;QACF,MAAM;QACN,SAAS;OACX;OACA,kBAAkB;QAChB,MAAM;QACN,SAAS;QACT,SAAS;QACT,kBAAkB;OACpB;MACF;MACA,UAAU,CAAC,MAAM,kBAAkB;MACnC,sBAAsB;KACxB;IACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,MAAM,UACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,QAAQ;IACV;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO,EACL,MAAM,wCACR;IACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,OAAO,EACT;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,OAAO,CACL;KACE,MAAM;KACN,YAAY,EACV,MAAM,EACJ,OAAO,MACT,EACF;KACA,UAAU,CAAC,MAAM;KACjB,sBAAsB;IACxB,GACA;KACE,MAAM;KACN,YAAY;MACV,MAAM,EACJ,OAAO,WACT;MACA,OAAO;OACL,MAAM;OACN,UAAU;OACV,UAAU;OACV,OAAO;QACL,MAAM;QACN,SAAS;OACX;MACF;KACF;KACA,UAAU,CAAC,QAAQ,OAAO;KAC1B,sBAAsB;IACxB,CACF,EACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,OAAO,CACL;KACE,MAAM;KACN,YAAY,EACV,MAAM,EACJ,OAAO,MACT,EACF;KACA,UAAU,CAAC,MAAM;KACjB,sBAAsB;IACxB,GACA;KACE,MAAM;KACN,YAAY;MACV,MAAM,EACJ,OAAO,WACT;MACA,OAAO;OACL,MAAM;OACN,UAAU;OACV,UAAU;OACV,OAAO;QACL,MAAM;QACN,WAAW;QACX,WAAW;OACb;MACF;KACF;KACA,UAAU,CAAC,QAAQ,OAAO;KAC1B,sBAAsB;IACxB,CACF,EACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CACN;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,SAAS;GACX;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,GACA;GACE,MAAM;GACN,UAAU;GACV,UAAU;GACV,QAAQ;IACN,MAAM;IACN,aACE;GACJ;GACA,MAAM;GACN,MAAM;GACN,UAAU;EACZ,CACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,MAAM,wCACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;MAAC;MAAW;MAAa;MAAa;MAAU;KAAW;KACjE,MAAM;IACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,QAAQ;IACV;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,QAAQ;IACV;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;EACV,YAAY;CACd;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM,CAAC,WAAW,WAAW;KAC7B,MAAM;IACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,MAAM,wCACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,QAAQ,CAAC,EACX,GACA,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ;GACN;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;IACX;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,WAAW;IACb;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,WAAW;KACX,QAAQ;IACV;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,MAAM,UACR;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,UAAU;KACV,UAAU;KACV,OAAO,EACL,MAAM,wCACR;IACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,OAAO,EACT;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,OAAO,CACL;KACE,MAAM;KACN,YAAY,EACV,MAAM,EACJ,OAAO,MACT,EACF;KACA,UAAU,CAAC,MAAM;KACjB,sBAAsB;IACxB,GACA;KACE,MAAM;KACN,YAAY;MACV,MAAM,EACJ,OAAO,WACT;MACA,OAAO;OACL,MAAM;OACN,UAAU;OACV,UAAU;OACV,OAAO;QACL,MAAM;QACN,SAAS;OACX;MACF;KACF;KACA,UAAU,CAAC,QAAQ,OAAO;KAC1B,sBAAsB;IACxB,CACF,EACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ,EACN,OAAO,CACL;KACE,MAAM;KACN,YAAY,EACV,MAAM,EACJ,OAAO,MACT,EACF;KACA,UAAU,CAAC,MAAM;KACjB,sBAAsB;IACxB,GACA;KACE,MAAM;KACN,YAAY;MACV,MAAM,EACJ,OAAO,WACT;MACA,OAAO;OACL,MAAM;OACN,UAAU;OACV,UAAU;OACV,OAAO;QACL,MAAM;QACN,WAAW;QACX,WAAW;OACb;MACF;KACF;KACA,UAAU,CAAC,QAAQ,OAAO;KAC1B,sBAAsB;IACxB,CACF,EACF;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,aAAa;IACf;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;GACA;IACE,MAAM;IACN,UAAU;IACV,UAAU;IACV,QAAQ;KACN,MAAM;KACN,SAAS;KACT,SAAS;KACT,kBAAkB;IACpB;IACA,MAAM;IACN,MAAM;IACN,UAAU;GACZ;EACF;EACA,aAAa;EACb,UAAU;CACZ;CACA;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,QAAQ;EACR,MAAM;EACN,SAAS;EACT,aACE;EACF,UAAU,CACR,EACE,OAAO,CAAC,EACV,CACF;EACA,QAAQ,CAAC;EACT,aAAa;EACb,UAAU;CACZ;AACF;AACA,MAAM,UAAsC;CAC1C,gBAAgB,EACd,OAAO;EACL,EACE,MAAM,0CACR;EACA,EACE,MAAM,4CACR;EACA,EACE,MAAM,6CACR;EACA,EACE,MAAM,0CACR;CACF,EACF;CACA,oBAAoB;EAClB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,OACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,UAAU;IACR,MAAM;KAAC;KAAO;KAAO;IAAM;IAC3B,MAAM;IACN,SAAS;GACX;GACA,QAAQ;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,MAAM;KACN,WAAW;IACb;GACF;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;EAAQ;CACpC;CACA,sBAAsB;EACpB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,SACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,UAAU,EACR,MAAM,0CACR;GACA,OAAO,EACL,MAAM,SACR;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;GAAY;EAAO;CAC/C;CACA,oBAAoB;EAClB,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;CACR;CACA,uBAAuB;EACrB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,UACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,OAAO,EACL,MAAM,UACR;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;EAAO;CACnC;CACA,oBAAoB;EAClB,MAAM;EACN,YAAY;GACV,MAAM,EACJ,OAAO,OACT;GACA,KAAK;IACH,MAAM;IACN,WAAW;IACX,WAAW;IACX,aAAa;GACf;GACA,UAAU,EACR,MAAM,0CACR;GACA,OAAO,EACL,MAAM,SACR;EACF;EACA,UAAU;GAAC;GAAQ;GAAO;GAAY;EAAO;CAC/C;CACA,kBAAkB;EAChB,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;CACR;CACA,YAAY;EACV,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;CACR;CACA,sBAAsB;EACpB,MAAM;EACN,YAAY;GACV,MAAM;IACJ,MAAM,CAAC,QAAQ,WAAW;IAC1B,MAAM;GACR;GACA,SAAS;IACP,MAAM;IACN,WAAW;IACX,WAAW;GACb;EACF;EACA,UAAU,CAAC,QAAQ,SAAS;CAC9B;CACA,oBAAoB;EAClB,MAAM;EACN,YAAY;GACV,SAAS;IACP,MAAM;IACN,SAAS;IACT,aAAa;GACf;GACA,WAAW;IACT,MAAM;IACN,SAAS;IACT,aAAa;GACf;EACF;EACA,UAAU,CAAC,SAAS;CACtB;AACF;;;ACzpPA,MAAM,YAAY,OAAO,WAAyC;CAChE,MAAM,SA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