@zitadel/testing 1.0.0-alpha.25 → 1.0.0-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-BbHs0YmP.cjs","names":["require","createRequire","join","dirname","spawn","createServer","mkdtemp","join","tmpdir","rm","randomUUID","applyAppEnvTemplate","nextAppEnv"],"sources":["../../api/dist/runtime/base-url.mjs","../../api/dist/runtime/auth.mjs","../../api/dist/runtime/fetch.mjs","../../api/dist/rolldown-runtime-D7D4PA-g.mjs","../../api/dist/generated/endpoints/zitadelNextGen.mjs","../../api/dist/runtime/api-factory.mjs","../../config/dist/defaults-B3SfaQPb.mjs","../src/bootstrap.ts","../src/cli.ts","../src/envelope.ts","../src/ports.ts","../src/lifecycle.ts","../src/seed.ts","../src/session.ts","../src/index.ts"],"sourcesContent":["//#region src/runtime/base-url.ts\nlet proxyPath = \"\";\nfunction getProxyPath() {\n\treturn proxyPath;\n}\nfunction setProxyPath(path) {\n\tproxyPath = path;\n}\n//#endregion\nexport { getProxyPath, setProxyPath };\n\n//# sourceMappingURL=base-url.mjs.map","//#region src/runtime/auth.ts\n/**\n* Module-global bearer token used by the orval-generated client's\n* custom fetch. Set once at command boot (the same lifecycle pattern\n* as `base-url.ts`); every generated request reads from here.\n*\n* Keeping the token here means the CLI doesn't have to thread an\n* `Authorization` header through every generated call site; orval's\n* `mutator` wires `runtime/fetch.ts` in, and that file pulls the token\n* from this module.\n*/\nlet apiAuthToken;\nfunction getApiAuthToken() {\n\treturn apiAuthToken;\n}\nfunction setApiAuthToken(token) {\n\tapiAuthToken = token;\n}\n/**\n* The CSRF token for the first-party browser surfaces (ADR 053 §5). A\n* state-changing request that the `__nextgen_session` cookie authenticates must\n* carry the session's token — `csrf_token` from `GET /sessions/me/csrf` — in the\n* `X-Zitadel-CSRF` header. The app sets it once it has loaded its session;\n* `runtime/fetch.ts` then adds the header to unsafe requests. Unset (every\n* other caller), nothing is added.\n*\n* The token belongs to the server that issued it, so it is stored with that\n* server's origin and only sent there: another client on the same page, with\n* another base URL, never carries it to a different host. The origin defaults\n* to the page's own, which is where a same-origin app's API lives; with no\n* origin to go by (no page, or an unparsable request URL), nothing is sent.\n*\n* Unlike the bearer slot, the app sets this one rather than the client, so it\n* lives on `globalThis` under a {@link Symbol.for} key, like the project slot in\n* `config.ts`: a second copy of this module (an SDK pinning another version)\n* must read the token the app's copy wrote.\n*/\nconst CSRF_SLOT = Symbol.for(\"@zitadel/api/auth:csrf\");\nfunction csrfSlot() {\n\tconst global = globalThis;\n\tconst existing = global[CSRF_SLOT];\n\tif (existing) return existing;\n\tconst slot = {};\n\tglobal[CSRF_SLOT] = slot;\n\treturn slot;\n}\nfunction pageOrigin() {\n\treturn globalThis.location?.origin;\n}\nfunction getApiCsrfToken() {\n\treturn csrfSlot().token;\n}\n/**\n* Stores the session's CSRF token for the server at `origin` (default: the\n* page's own). `undefined` clears it.\n*/\nfunction setApiCsrfToken(token, origin = pageOrigin()) {\n\tconst slot = csrfSlot();\n\tslot.token = token;\n\tslot.tokenOrigin = token === void 0 ? void 0 : origin;\n}\n/** The token to send to `origin`, if it was issued there. */\nfunction apiCsrfTokenFor(origin) {\n\tconst slot = csrfSlot();\n\treturn origin !== void 0 && slot.tokenOrigin === origin ? slot.token : void 0;\n}\n/**\n* Registers what to do when a state-changing request to `origin` (default: the\n* page's own) is refused with `403 auth.csrf_invalid`: the token is tied to the\n* session cookie, which another tab can replace by signing in again, or it was\n* never loaded. A refusal from any other host is not this session's business\n* and is left alone.\n*\n* The handler re-checks the session. It returns a fresh token only when the\n* session still belongs to the person the request was made for; `customFetch`\n* then retries the request once with it. Returning `undefined` (someone else,\n* or nobody, is signed in now) leaves the request refused, so a write is never\n* replayed under a session it was not prepared for.\n*/\nfunction setApiCsrfRejectionHandler(onRejected, origin = pageOrigin()) {\n\tconst slot = csrfSlot();\n\tslot.onRejected = onRejected;\n\tslot.handlerOrigin = onRejected === void 0 ? void 0 : origin;\n}\nfunction getApiCsrfRejectionHandler() {\n\treturn csrfSlot().onRejected;\n}\n/** The rejection handler for a refusal from `origin`, if it was registered for it. */\nfunction apiCsrfRejectionHandlerFor(origin) {\n\tconst slot = csrfSlot();\n\treturn origin !== void 0 && slot.handlerOrigin === origin ? slot.onRejected : void 0;\n}\n//#endregion\nexport { apiCsrfRejectionHandlerFor, apiCsrfTokenFor, getApiAuthToken, getApiCsrfRejectionHandler, getApiCsrfToken, setApiAuthToken, setApiCsrfRejectionHandler, setApiCsrfToken };\n\n//# sourceMappingURL=auth.mjs.map","import { apiCsrfRejectionHandlerFor, apiCsrfTokenFor, getApiAuthToken } from \"./auth.mjs\";\n//#region src/runtime/fetch.ts\n/** The header the session-bound CSRF token travels in (ADR 053 §5). */\nconst CSRF_HEADER = \"X-Zitadel-CSRF\";\nconst SAFE_METHODS = /* @__PURE__ */ new Set([\n\t\"GET\",\n\t\"HEAD\",\n\t\"OPTIONS\"\n]);\n/** The code the server answers a refused CSRF check with. */\nconst CSRF_INVALID = \"auth.csrf_invalid\";\n/**\n* Framework-neutral failure type the orval-generated client throws on\n* any non-2xx response. Carries the HTTP status, the parsed error body\n* (the spec's `{code, message, details?}` envelope when the server\n* returned one), and the request URL — enough for callers to map to\n* their own error taxonomy without re-implementing the fetch layer.\n*\n* Callers that don't care about the distinction can catch `ApiError`\n* generically; callers that do (the CLI's `toZitadelError`) read\n* `status` and decide.\n*/\nvar ApiError = class extends Error {\n\tstatus;\n\turl;\n\tbody;\n\tconstructor(status, url, body, message) {\n\t\tsuper(message);\n\t\tthis.name = \"ApiError\";\n\t\tthis.status = status;\n\t\tthis.url = url;\n\t\tthis.body = body;\n\t}\n};\n/**\n* Thrown when a request got no response at all: the connection was refused or\n* reset, the host did not resolve, or the server accepted the connection but\n* did not answer in time. The counterpart to {@link ApiError}, which is a\n* response that came back with a failing status.\n*\n* `fetch` only rejects when no response arrived, so this is decided by the\n* fact that it rejected, never by how a runtime words the failure. The\n* runtime's own error stays on `cause` for debugging.\n*/\nvar NetworkError = class extends Error {\n\turl;\n\t/** `timeout` when a deadline cut the request off, `unreachable` otherwise. */\n\treason;\n\tconstructor(url, reason, message, options) {\n\t\tsuper(message, options);\n\t\tthis.name = \"NetworkError\";\n\t\tthis.url = url;\n\t\tthis.reason = reason;\n\t}\n};\nlet requestPolicy = {};\nfunction setRequestPolicy(policy) {\n\trequestPolicy = policy;\n}\n/**\n* The orval `mutator` for the fetch client. Every generated operation\n* routes its request through this function instead of the global\n* `fetch`. We pin three concerns here so generated call sites stay\n* focused on the shape of one HTTP call:\n*\n* - bearer auth — read from `runtime/auth.ts` and attached automatically;\n* - the CSRF header — the session-bound token from `runtime/auth.ts`, on\n* unsafe methods to the origin it was issued for, when a first-party surface\n* has set one; an unsafe request to that origin refused with\n* `403 auth.csrf_invalid` asks the registered rejection handler for a fresh\n* token and is retried once with it, only if the handler returns one (the\n* session still belongs to the same person);\n* - non-2xx → throw — orval's stock client parses the body regardless\n* of status, so callers would have to inspect every response. Throw\n* `ApiError` on `!res.ok` so failures interrupt control flow;\n* - body parsing — return the parsed JSON typed as `T` (the operation's\n* return type, threaded through by orval), or `undefined` for the\n* spec's `204`/`205`/`304` no-body responses;\n* - no response → throw {@link NetworkError}, or the abort reason when the\n* caller cancelled (see {@link request}).\n*/\nasync function customFetch(url, options) {\n\tconst policy = requestPolicy;\n\tconst token = getApiAuthToken();\n\tconst headers = new Headers(options.headers);\n\tif (token && !headers.has(\"authorization\")) headers.set(\"authorization\", `Bearer ${token}`);\n\tconst method = (options.method ?? \"GET\").toUpperCase();\n\tconst unsafe = !SAFE_METHODS.has(method) && !headers.has(\"X-Zitadel-CSRF\");\n\tconst target = originOf(url);\n\tconst csrfToken = apiCsrfTokenFor(target);\n\tif (unsafe && csrfToken) headers.set(CSRF_HEADER, csrfToken);\n\tlet { res, rawBody: parsed } = await request(url, {\n\t\t...options,\n\t\theaders\n\t}, policy, readBody);\n\tconst onRejected = apiCsrfRejectionHandlerFor(target);\n\tif (unsafe && onRejected && res.status === 403 && apiErrorCode(parsed) === CSRF_INVALID && !isStream(options.body)) {\n\t\tconst fresh = await onRejected().catch(() => void 0);\n\t\tif (fresh && fresh !== csrfToken) {\n\t\t\theaders.set(CSRF_HEADER, fresh);\n\t\t\t({res, rawBody: parsed} = await request(url, {\n\t\t\t\t...options,\n\t\t\t\theaders\n\t\t\t}, policy, readBody));\n\t\t}\n\t}\n\tif (!res.ok) {\n\t\tconst message = `${options.method ?? \"GET\"} ${url} returned ${res.status}`;\n\t\tthrow new ApiError(res.status, url, parsed, message);\n\t}\n\treturn parsed;\n}\n/** The parsed body, or `undefined` for the spec's no-body responses. */\nasync function readBody(res) {\n\tif ([\n\t\t204,\n\t\t205,\n\t\t304\n\t].includes(res.status)) return void 0;\n\tconst rawBody = await res.text();\n\treturn rawBody ? safeJsonParse(rawBody) : void 0;\n}\n/** The request's origin, resolved against the page for a relative URL. */\nfunction originOf(url) {\n\ttry {\n\t\treturn new URL(url, globalThis.location?.href).origin;\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction isStream(body) {\n\treturn typeof ReadableStream !== \"undefined\" && body instanceof ReadableStream;\n}\n/**\n* `fetch` bound by a {@link RequestPolicy}, with its failures typed.\n*\n* The policy's signal, its deadline and any signal on `init` are combined, and\n* `read` runs under them too, so a server that sends headers and then stalls\n* mid-body is cut off as well. When the request does not complete:\n*\n* - a deadline fired → {@link NetworkError} with reason `timeout`;\n* - any other abort → the signal's own reason, rethrown untouched, because a\n* cancellation is the caller's decision and the caller knows what it means;\n* - anything else → {@link NetworkError} with reason `unreachable`.\n*\n* Exported for the few callers that need the raw {@link Response} (a\n* `Set-Cookie` header the generated client does not expose).\n*/\nasync function request(url, init, policy = {}, read) {\n\tconst signals = [init.signal, policy.signal].filter((signal) => signal != null);\n\tif (policy.timeoutMs !== void 0) signals.push(AbortSignal.timeout(policy.timeoutMs));\n\tconst signal = signals.length > 0 ? AbortSignal.any(signals) : void 0;\n\tconst method = init.method ?? \"GET\";\n\ttry {\n\t\tconst res = await fetch(url, {\n\t\t\t...init,\n\t\t\tsignal\n\t\t});\n\t\treturn {\n\t\t\tres,\n\t\t\trawBody: read ? await read(res) : void 0\n\t\t};\n\t} catch (error) {\n\t\tif (signal?.aborted) {\n\t\t\tconst reason = signal.reason;\n\t\t\tif (reason instanceof DOMException && reason.name === \"TimeoutError\") throw new NetworkError(url, \"timeout\", `${method} ${url} timed out`, { cause: reason });\n\t\t\tthrow reason;\n\t\t}\n\t\tconst code = errnoOf(error);\n\t\tthrow new NetworkError(url, \"unreachable\", `${method} ${url} got no response${code ? ` (${code})` : \"\"}`, { cause: error });\n\t}\n}\n/**\n* The errno a runtime attached to a failed request, if any, for the message.\n* Undici nests it on `cause`, inside an `AggregateError` when it tried more\n* than one address. Only ever used to describe the failure, never to decide\n* that it was one.\n*/\nfunction errnoOf(error) {\n\tlet node = error;\n\tfor (let depth = 0; depth < 4 && typeof node === \"object\" && node !== null; depth += 1) {\n\t\tconst { code, errors } = node;\n\t\tif (typeof code === \"string\") return code;\n\t\tnode = Array.isArray(errors) ? errors[0] : node.cause;\n\t}\n}\n/**\n* `JSON.parse` wrapped so a non-JSON body (e.g. an HTML 502 from a\n* proxy) becomes `{ raw: \"<text>\" }` instead of throwing inside\n* `customFetch`. The thrown `ApiError` then carries something useful\n* for the user to see.\n*/\nfunction safeJsonParse(text) {\n\ttry {\n\t\treturn JSON.parse(text);\n\t} catch {\n\t\treturn { raw: text };\n\t}\n}\n/**\n* The `code` of the server's `{code, message, details}` error envelope: from an\n* {@link ApiError}, or from a parsed response body. `undefined` when there is\n* none, e.g. an HTML error page from a proxy.\n*/\nfunction apiErrorCode(errorOrBody) {\n\tconst body = errorOrBody instanceof ApiError ? errorOrBody.body : errorOrBody;\n\treturn isRecord(body) && typeof body.code === \"string\" ? body.code : void 0;\n}\n/**\n* Extracts the server's `{code, message, details}` envelope from an\n* {@link ApiError} into a display string. Falls back to the fetch layer's\n* `\"METHOD url returned N\"` when the body isn't shaped like an envelope, so\n* transport-level failures (HTML from a proxy, empty 5xx) still say\n* something.\n*/\nfunction apiErrorMessage(error) {\n\tconst body = error.body;\n\tif (!isRecord(body)) return error.message;\n\tconst serverMessage = typeof body.message === \"string\" ? body.message : void 0;\n\tconst detail = pickDetailString(body.details);\n\tif (!serverMessage) return error.message;\n\treturn detail ? `${serverMessage}: ${detail}` : serverMessage;\n}\n/**\n* Reads the innermost human-readable string out of the spec's error\n* `details` field. Handles both `details: \"...\"` and the nested\n* `details: { details: \"...\" }` shape the platform emits for validation\n* failures.\n*/\nfunction pickDetailString(details) {\n\tif (typeof details === \"string\") return details;\n\tif (isRecord(details)) {\n\t\tif (typeof details.details === \"string\") return details.details;\n\t\tif (typeof details.message === \"string\") return details.message;\n\t}\n}\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n//#endregion\nexport { ApiError, CSRF_HEADER, NetworkError, apiErrorCode, apiErrorMessage, customFetch, request, setRequestPolicy };\n\n//# sourceMappingURL=fetch.mjs.map","//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\nexport { __exportAll as t };\n","import { t as __exportAll } from \"../../rolldown-runtime-D7D4PA-g.mjs\";\nimport { getProxyPath } from \"../../runtime/base-url.mjs\";\nimport { customFetch } from \"../../runtime/fetch.mjs\";\n//#region src/generated/endpoints/zitadelNextGen.ts\n/**\n* Generated by orval 🍺\n* Do not edit manually.\n* Zitadel NextGen\n* This is the next generation of the Zitadel identity platform.\n* OpenAPI spec version: 0.0.1\n*/\nvar zitadelNextGen_exports = /* @__PURE__ */ __exportAll({\n\taddOrigin: () => addOrigin,\n\tbeginUserPasskeyRegistration: () => beginUserPasskeyRegistration,\n\tbuildRelease: () => buildRelease,\n\tcompleteClaim: () => completeClaim,\n\tcreateAuthAttempt: () => createAuthAttempt,\n\tcreateBranding: () => createBranding,\n\tcreateDeployment: () => createDeployment,\n\tcreateFlow: () => createFlow,\n\tcreateFlowDefinition: () => createFlowDefinition,\n\tcreateGrant: () => createGrant,\n\tcreateHandoff: () => createHandoff,\n\tcreateIdp: () => createIdp,\n\tcreateProject: () => createProject,\n\tcreateRelease: () => createRelease,\n\tcreateSchema: () => createSchema,\n\tcreateSession: () => createSession,\n\tcreateTeam: () => createTeam,\n\tcreateUser: () => createUser,\n\tdeleteGrant: () => deleteGrant,\n\tdeleteTeam: () => deleteTeam,\n\tdeleteUserByID: () => deleteUserByID,\n\tdeleteVariable: () => deleteVariable,\n\texchangeHandoff: () => exchangeHandoff,\n\tfinishUserPasskeyRegistration: () => finishUserPasskeyRegistration,\n\tgetAddOriginUrl: () => getAddOriginUrl,\n\tgetAuthAttempt: () => getAuthAttempt,\n\tgetBeginUserPasskeyRegistrationUrl: () => getBeginUserPasskeyRegistrationUrl,\n\tgetBrandingById: () => getBrandingById,\n\tgetBuildReleaseUrl: () => getBuildReleaseUrl,\n\tgetClaimStatus: () => getClaimStatus,\n\tgetClaimWindow: () => getClaimWindow,\n\tgetCompleteClaimUrl: () => getCompleteClaimUrl,\n\tgetCreateAuthAttemptUrl: () => getCreateAuthAttemptUrl,\n\tgetCreateBrandingUrl: () => getCreateBrandingUrl,\n\tgetCreateDeploymentUrl: () => getCreateDeploymentUrl,\n\tgetCreateFlowDefinitionUrl: () => getCreateFlowDefinitionUrl,\n\tgetCreateFlowUrl: () => getCreateFlowUrl,\n\tgetCreateGrantUrl: () => getCreateGrantUrl,\n\tgetCreateHandoffUrl: () => getCreateHandoffUrl,\n\tgetCreateIdpUrl: () => getCreateIdpUrl,\n\tgetCreateProjectUrl: () => getCreateProjectUrl,\n\tgetCreateReleaseUrl: () => getCreateReleaseUrl,\n\tgetCreateSchemaUrl: () => getCreateSchemaUrl,\n\tgetCreateSessionUrl: () => getCreateSessionUrl,\n\tgetCreateTeamUrl: () => getCreateTeamUrl,\n\tgetCreateUserUrl: () => getCreateUserUrl,\n\tgetDeleteGrantUrl: () => getDeleteGrantUrl,\n\tgetDeleteTeamUrl: () => getDeleteTeamUrl,\n\tgetDeleteUserByIDUrl: () => getDeleteUserByIDUrl,\n\tgetDeleteVariableUrl: () => getDeleteVariableUrl,\n\tgetDeploymentById: () => getDeploymentById,\n\tgetDeploymentVariables: () => getDeploymentVariables,\n\tgetEvent: () => getEvent,\n\tgetExchangeHandoffUrl: () => getExchangeHandoffUrl,\n\tgetFinishUserPasskeyRegistrationUrl: () => getFinishUserPasskeyRegistrationUrl,\n\tgetFlowDefinition: () => getFlowDefinition,\n\tgetFlowStep: () => getFlowStep,\n\tgetGetAuthAttemptUrl: () => getGetAuthAttemptUrl,\n\tgetGetBrandingByIdUrl: () => getGetBrandingByIdUrl,\n\tgetGetClaimStatusUrl: () => getGetClaimStatusUrl,\n\tgetGetClaimWindowUrl: () => getGetClaimWindowUrl,\n\tgetGetDeploymentByIdUrl: () => getGetDeploymentByIdUrl,\n\tgetGetDeploymentVariablesUrl: () => getGetDeploymentVariablesUrl,\n\tgetGetEventUrl: () => getGetEventUrl,\n\tgetGetFlowDefinitionUrl: () => getGetFlowDefinitionUrl,\n\tgetGetFlowStepUrl: () => getGetFlowStepUrl,\n\tgetGetGrantUrl: () => getGetGrantUrl,\n\tgetGetHealthUrl: () => getGetHealthUrl,\n\tgetGetIdpByIdUrl: () => getGetIdpByIdUrl,\n\tgetGetIdpRevisionByIdUrl: () => getGetIdpRevisionByIdUrl,\n\tgetGetLiveUrl: () => getGetLiveUrl,\n\tgetGetMySessionCsrfTokenUrl: () => getGetMySessionCsrfTokenUrl,\n\tgetGetMySessionUrl: () => getGetMySessionUrl,\n\tgetGetMyUserSchemaUrl: () => getGetMyUserSchemaUrl,\n\tgetGetMyUserUrl: () => getGetMyUserUrl,\n\tgetGetProjectUrl: () => getGetProjectUrl,\n\tgetGetReadyUrl: () => getGetReadyUrl,\n\tgetGetReleaseByIdUrl: () => getGetReleaseByIdUrl,\n\tgetGetSchemaByIdUrl: () => getGetSchemaByIdUrl,\n\tgetGetSessionUrl: () => getGetSessionUrl,\n\tgetGetTeamUrl: () => getGetTeamUrl,\n\tgetGetUserByIDUrl: () => getGetUserByIDUrl,\n\tgetGetVariableUrl: () => getGetVariableUrl,\n\tgetGetVariablesUrl: () => getGetVariablesUrl,\n\tgetGrant: () => getGrant,\n\tgetHealth: () => getHealth,\n\tgetIdpById: () => getIdpById,\n\tgetIdpRevisionById: () => getIdpRevisionById,\n\tgetInitClaimUrl: () => getInitClaimUrl,\n\tgetIssueChallengeUrl: () => getIssueChallengeUrl,\n\tgetListBrandingUrl: () => getListBrandingUrl,\n\tgetListDeploymentsUrl: () => getListDeploymentsUrl,\n\tgetListEventsUrl: () => getListEventsUrl,\n\tgetListFlowDefinitionsUrl: () => getListFlowDefinitionsUrl,\n\tgetListIdpRevisionsUrl: () => getListIdpRevisionsUrl,\n\tgetListMyProjectsUrl: () => getListMyProjectsUrl,\n\tgetListMyTeamsUrl: () => getListMyTeamsUrl,\n\tgetListPreviewsUrl: () => getListPreviewsUrl,\n\tgetListReleasesUrl: () => getListReleasesUrl,\n\tgetListSchemasUrl: () => getListSchemasUrl,\n\tgetListUserIdentityLinksUrl: () => getListUserIdentityLinksUrl,\n\tgetListUserPasskeysUrl: () => getListUserPasskeysUrl,\n\tgetListUserTeamsUrl: () => getListUserTeamsUrl,\n\tgetLive: () => getLive,\n\tgetMySession: () => getMySession,\n\tgetMySessionCsrfToken: () => getMySessionCsrfToken,\n\tgetMyUser: () => getMyUser,\n\tgetMyUserSchema: () => getMyUserSchema,\n\tgetPatchMyUserUrl: () => getPatchMyUserUrl,\n\tgetPatchProjectUrl: () => getPatchProjectUrl,\n\tgetPatchUserByIDUrl: () => getPatchUserByIDUrl,\n\tgetProject: () => getProject,\n\tgetQueryGrantsUrl: () => getQueryGrantsUrl,\n\tgetQueryIdpsUrl: () => getQueryIdpsUrl,\n\tgetQueryProjectsUrl: () => getQueryProjectsUrl,\n\tgetQuerySessionsUrl: () => getQuerySessionsUrl,\n\tgetQueryTeamsUrl: () => getQueryTeamsUrl,\n\tgetQueryUsersUrl: () => getQueryUsersUrl,\n\tgetReady: () => getReady,\n\tgetReleaseById: () => getReleaseById,\n\tgetRemoveOriginUrl: () => getRemoveOriginUrl,\n\tgetRemovePreviewUrl: () => getRemovePreviewUrl,\n\tgetRevokeMySessionUrl: () => getRevokeMySessionUrl,\n\tgetRevokeReleaseUrl: () => getRevokeReleaseUrl,\n\tgetRevokeSessionUrl: () => getRevokeSessionUrl,\n\tgetRollbackDeploymentUrl: () => getRollbackDeploymentUrl,\n\tgetSchemaById: () => getSchemaById,\n\tgetSession: () => getSession,\n\tgetSetUserPasswordUrl: () => getSetUserPasswordUrl,\n\tgetSubmitFlowStepUrl: () => getSubmitFlowStepUrl,\n\tgetTeam: () => getTeam,\n\tgetUpdateTeamUrl: () => getUpdateTeamUrl,\n\tgetUpdateVariablesUrl: () => getUpdateVariablesUrl,\n\tgetUserByID: () => getUserByID,\n\tgetVariable: () => getVariable,\n\tgetVariables: () => getVariables,\n\tgetVerifyChallengeProofUrl: () => getVerifyChallengeProofUrl,\n\tinitClaim: () => initClaim,\n\tissueChallenge: () => issueChallenge,\n\tlistBranding: () => listBranding,\n\tlistDeployments: () => listDeployments,\n\tlistEvents: () => listEvents,\n\tlistFlowDefinitions: () => listFlowDefinitions,\n\tlistIdpRevisions: () => listIdpRevisions,\n\tlistMyProjects: () => listMyProjects,\n\tlistMyTeams: () => listMyTeams,\n\tlistPreviews: () => listPreviews,\n\tlistReleases: () => listReleases,\n\tlistSchemas: () => listSchemas,\n\tlistUserIdentityLinks: () => listUserIdentityLinks,\n\tlistUserPasskeys: () => listUserPasskeys,\n\tlistUserTeams: () => listUserTeams,\n\tpatchMyUser: () => patchMyUser,\n\tpatchProject: () => patchProject,\n\tpatchUserByID: () => patchUserByID,\n\tqueryGrants: () => queryGrants,\n\tqueryIdps: () => queryIdps,\n\tqueryProjects: () => queryProjects,\n\tquerySessions: () => querySessions,\n\tqueryTeams: () => queryTeams,\n\tqueryUsers: () => queryUsers,\n\tremoveOrigin: () => removeOrigin,\n\tremovePreview: () => removePreview,\n\trevokeMySession: () => revokeMySession,\n\trevokeRelease: () => revokeRelease,\n\trevokeSession: () => revokeSession,\n\trollbackDeployment: () => rollbackDeployment,\n\tsetUserPassword: () => setUserPassword,\n\tsubmitFlowStep: () => submitFlowStep,\n\tupdateTeam: () => updateTeam,\n\tupdateVariables: () => updateVariables,\n\tverifyChallengeProof: () => verifyChallengeProof\n});\nconst getGetHealthUrl = () => {\n\treturn `${getProxyPath()}/healthz`;\n};\n/**\n* Check whether the server is healthy\n* @summary Check server health\n*/\nconst getHealth = async (options) => {\n\treturn customFetch(getGetHealthUrl(), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetLiveUrl = () => {\n\treturn `${getProxyPath()}/livez`;\n};\n/**\n* Check whether the server is started\n* @summary Check server liveness\n*/\nconst getLive = async (options) => {\n\treturn customFetch(getGetLiveUrl(), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetReadyUrl = () => {\n\treturn `${getProxyPath()}/readyz`;\n};\n/**\n* Check whether the server is ready to accept requests\n* @summary Check server readiness\n*/\nconst getReady = async (options) => {\n\treturn customFetch(getGetReadyUrl(), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateUserUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users?${stringifiedParams}` : `${getProxyPath()}/users`;\n};\n/**\n* Creates a user whose attributes satisfy the user schema the request names.\n*\n* The server assigns the user's id. With `team_id`, the user also becomes an\n* active member of that team. A value the schema marks unique that another\n* user already holds is refused with `409`.\n* @summary Create user\n*/\nconst createUser = async (createUserBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateUserUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createUserBody)\n\t});\n};\nconst getQueryUsersUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/query?${stringifiedParams}` : `${getProxyPath()}/users/query`;\n};\n/**\n* Returns the users of a project, paginated with a cursor.\n*\n* `project_id` names the project to list; without it, the credential's own\n* project is listed.\n*\n* Accepts either a project secret (`oauth2`) or a user-bound Console\n* session cookie (`nextgenSession`). Cookie-authenticated requests\n* follow the scheme's CSRF rules (`nextgenSession`).\n* @summary Query users\n*/\nconst queryUsers = async (queryUsersBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getQueryUsersUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(queryUsersBody)\n\t});\n};\nconst getGetUserByIDUrl = (userId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`;\n};\n/**\n* Returns a user by its id, with the attributes its schema defines.\n*\n* With `team_id`, the user is returned only while they are an active member of\n* that team.\n* @summary Get user by ID\n*/\nconst getUserByID = async (userId, params, options) => {\n\treturn customFetch(getGetUserByIDUrl(userId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getPatchUserByIDUrl = (userId) => {\n\treturn `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`;\n};\n/**\n* Partially updates a user's schema-defined attributes, and optionally\n* moves the user to another registered schema. The merged result is\n* validated against the schema before commit. Concurrent writes are\n* last-write-wins.\n* @summary Update user by ID\n*/\nconst patchUserByID = async (userId, patchUserByIDBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getPatchUserByIDUrl(userId), {\n\t\t...options,\n\t\tmethod: \"PATCH\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(patchUserByIDBody)\n\t});\n};\nconst getDeleteUserByIDUrl = (userId) => {\n\treturn `${getProxyPath()}/users/${encodeURIComponent(String(userId))}`;\n};\n/**\n* Deletes a user and removes them from every team they belong to.\n*\n* The user is removed, not deactivated, and the deletion emits `user.deleted`.\n* With a project secret the request is idempotent: deleting a user that exists\n* in no project succeeds without changing anything.\n* @summary Delete user by ID\n*/\nconst deleteUserByID = async (userId, options) => {\n\treturn customFetch(getDeleteUserByIDUrl(userId), {\n\t\t...options,\n\t\tmethod: \"DELETE\"\n\t});\n};\nconst getListUserIdentityLinksUrl = (userId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/identity_links?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/identity_links`;\n};\n/**\n* The identity provider accounts a sign-in linked to the user, oldest first.\n* The provider's subject and claims are never returned.\n* @summary List the provider accounts linked to a user\n*/\nconst listUserIdentityLinks = async (userId, params, options) => {\n\treturn customFetch(getListUserIdentityLinksUrl(userId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getListUserPasskeysUrl = (userId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys`;\n};\n/**\n* Returns the passkeys registered for a user, newest first, paginated with a\n* cursor.\n*\n* Each passkey carries its id, its name and when it was registered, never the\n* credential itself.\n* @summary List user passkeys\n*/\nconst listUserPasskeys = async (userId, params, options) => {\n\treturn customFetch(getListUserPasskeysUrl(userId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getBeginUserPasskeyRegistrationUrl = (userId) => {\n\treturn `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations`;\n};\n/**\n* Starts a WebAuthn registration ceremony for the user and returns the\n* creation options for `navigator.credentials.create()`. Complete the\n* ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within\n* five minutes. Credentials already registered for the user are excluded\n* automatically.\n* @summary Begin passkey registration\n*/\nconst beginUserPasskeyRegistration = async (userId, beginUserPasskeyRegistrationBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getBeginUserPasskeyRegistrationUrl(userId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(beginUserPasskeyRegistrationBody)\n\t});\n};\nconst getFinishUserPasskeyRegistrationUrl = (userId, registrationId) => {\n\treturn `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/passkeys/registrations/${encodeURIComponent(String(registrationId))}`;\n};\n/**\n* Verifies the attestation against the ceremony started by\n* `POST /users/{user_id}/passkeys/registrations` and persists the new credential. A\n* rejected attestation counts against the ceremony's failure budget and the\n* ceremony stays open for a retry. An expired ceremony surfaces as\n* `att.stale_challenge`; an unknown or already-consumed registration id\n* surfaces as `att.not_found`.\n* @summary Finish passkey registration\n*/\nconst finishUserPasskeyRegistration = async (userId, registrationId, finishUserPasskeyRegistrationBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getFinishUserPasskeyRegistrationUrl(userId, registrationId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(finishUserPasskeyRegistrationBody)\n\t});\n};\nconst getSetUserPasswordUrl = (userId) => {\n\treturn `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`;\n};\n/**\n* Sets a user's password, hashed with the project's current password hashing\n* policy.\n*\n* The new password replaces the current one, and setting it emits\n* `auth.factor.password.set`.\n* @summary Set user password\n*/\nconst setUserPassword = async (userId, setUserPasswordBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getSetUserPasswordUrl(userId), {\n\t\t...options,\n\t\tmethod: \"PUT\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(setUserPasswordBody)\n\t});\n};\nconst getListUserTeamsUrl = (userId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams?${stringifiedParams}` : `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/teams`;\n};\n/**\n* The user's team roster, ordered by team name. Each entry carries the\n* team's name, so a client renders a page without resolving ids one by one.\n*\n* This is the N:N roster and it is not lifecycle ownership: the single team\n* that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`\n* on the user read endpoints. Memberships the user was removed from are not\n* returned.\n* @summary List the teams a user belongs to\n*/\nconst listUserTeams = async (userId, params, options) => {\n\treturn customFetch(getListUserTeamsUrl(userId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetMyUserUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/me?${stringifiedParams}` : `${getProxyPath()}/users/me`;\n};\n/**\n* Returns the user signed in to the session that authenticates the request.\n*\n* The project and the user both come from the session cookie, so a caller only\n* ever reads their own user.\n*\n* With `project_id`, the user is returned only when the session belongs to\n* that project.\n* @summary Get my user information\n*/\nconst getMyUser = async (params, options) => {\n\treturn customFetch(getGetMyUserUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getPatchMyUserUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/me?${stringifiedParams}` : `${getProxyPath()}/users/me`;\n};\n/**\n* Partially updates the caller's own schema-defined attributes. The merged\n* result is validated against the user's schema before commit. Concurrent\n* writes are last-write-wins.\n*\n* With `project_id`, the user is updated only when the session belongs to\n* that project.\n* @summary Update my user information\n*/\nconst patchMyUser = async (patchMyUserBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getPatchMyUserUrl(params), {\n\t\t...options,\n\t\tmethod: \"PATCH\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(patchMyUserBody)\n\t});\n};\nconst getListMyProjectsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/projects?${stringifiedParams}` : `${getProxyPath()}/users/me/projects`;\n};\n/**\n* The projects the signed-in user holds an active grant on, either directly or\n* through a team they are a member of. Ordered by project id and paged with an\n* opaque cursor.\n*\n* This is not the same question as `queryProjects`, which answers with the one\n* project the calling credential is bound to. Here the session is the caller\n* and the grants are the answer, so the list spans projects.\n*\n* With `project_id`, the projects are listed only when the session belongs to\n* that project. It names the project the session was signed in to, not one to\n* list.\n* @summary List the projects I can act on\n*/\nconst listMyProjects = async (params, options) => {\n\treturn customFetch(getListMyProjectsUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetMyUserSchemaUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/schema?${stringifiedParams}` : `${getProxyPath()}/users/me/schema`;\n};\n/**\n* The schema the signed-in user's own record is validated against.\n*\n* With `project_id`, the schema is returned only when the session belongs to\n* that project.\n* @summary Get my user schema\n*/\nconst getMyUserSchema = async (params, options) => {\n\treturn customFetch(getGetMyUserSchemaUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getListMyTeamsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/users/me/teams?${stringifiedParams}` : `${getProxyPath()}/users/me/teams`;\n};\n/**\n* The signed-in user's own team roster, ordered by team name.\n*\n* With `project_id`, the teams are listed only when the session belongs to\n* that project.\n* @summary List the teams I belong to\n*/\nconst listMyTeams = async (params, options) => {\n\treturn customFetch(getListMyTeamsUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateFlowUrl = () => {\n\treturn `${getProxyPath()}/flow`;\n};\n/**\n* Resolves a flow definition based on purpose + audience context and returns\n* the first capability step. Creates a new session implicitly unless\n* `session_id` is provided (for step-up / reauth on an existing session).\n*\n* The response contains an `id` field — the flow handle. Use it as the path\n* parameter for all subsequent `/flow/{id}/submit` calls.\n*\n* The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing\n* the flow's orchestration state (current step, collected data, history).\n* The server is stateless between requests — all flow state lives in this\n* cookie. The browser sends it automatically on subsequent requests.\n* @summary Start a new flow\n*/\nconst createFlow = async (createFlowBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateFlowUrl(), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createFlowBody)\n\t});\n};\nconst getGetFlowStepUrl = (id) => {\n\treturn `${getProxyPath()}/flow/${encodeURIComponent(String(id))}`;\n};\n/**\n* Returns the current capability step without advancing the state machine.\n* Useful for page reloads or re-rendering after a network error.\n* @summary Get current step (re-render)\n*/\nconst getFlowStep = async (id, options) => {\n\treturn customFetch(getGetFlowStepUrl(id), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getSubmitFlowStepUrl = (id) => {\n\treturn `${getProxyPath()}/flow/${encodeURIComponent(String(id))}/submit`;\n};\n/**\n* Submits user input for the current step. The server validates,\n* processes (e.g., verifies a credential), advances the state machine\n* through any invisible steps, and returns the next visible step.\n*\n* The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)\n* with the new flow state. The server is stateless — all orchestration\n* state is carried in this cookie between requests.\n*\n* **Important:** The `id` in the response may differ from the `id` used in\n* the request. This happens when a flow pivots (pushes a new flow onto the\n* stack) or when a stacked flow completes (auto-pops to the parent flow).\n* Always use the `id` from the latest response for the next request.\n*\n* ## Flow completion\n*\n* When `step.type` is `complete`, the flow is terminal. The `step.behavior`\n* field tells the frontend what to do:\n*\n* | `behavior` | Action |\n* |------------- |------------------------------------------------------------|\n* | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |\n* | `show` | Render the step as a success screen (e.g., registration). |\n*\n* A `complete` step is only returned when the **entire flow stack** is done.\n* If a stacked flow (e.g., recovery pivoted from login) finishes, the server\n* auto-pops to the parent flow and returns the parent's next step — the\n* frontend never sees a `complete` for intermediate flows.\n*\n* ## External sign-in\n*\n* `{action: \"sso\", sso_provider_id, return_target}` on a step that offers\n* `sso_providers` returns the engine-emitted `sso-redirect` step, whose\n* `redirect_url` the frontend navigates to.\n*\n* - The flow state does not change, but `_zflow` is re-sealed like on\n* every response, so its ten-minute window restarts at this submission;\n* the external sign-in and the return must complete within it.\n* - A second `Set-Cookie` line carries the browser-binding cookie the\n* callback checks: `HttpOnly`, `Path=/`, `SameSite=Lax`.\n* - On every host except http loopback it is `__Host-_zsso` with `Secure`.\n* - When the request host is http loopback (local development, where\n* Safari rejects `Secure`), it is `_zsso` with no `Secure`; the\n* `__Host-` prefix is dropped because it requires `Secure`.\n*\n* A connection whose `client_id` is a `${{ NAME }}` reference has it filled\n* from the project's variables. A provider the engine cannot start a\n* sign-in with, including a reference with no variable behind it,\n* re-renders the step with `error.sso_unavailable`.\n* @summary Submit step data and advance\n*/\nconst submitFlowStep = async (id, submitFlowStepBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getSubmitFlowStepUrl(id), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(submitFlowStepBody)\n\t});\n};\nconst getCreateAuthAttemptUrl = () => {\n\treturn `${getProxyPath()}/auth_attempts`;\n};\n/**\n* Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.\n*\n* An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.\n* It accepts factor challenges, verifies proofs, and completes into a session or handoff token.\n*\n* Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,\n* also include session_id to add factors to an existing session.\n* @summary Create a new authentication attempt\n*/\nconst createAuthAttempt = async (createAuthAttemptBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateAuthAttemptUrl(), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createAuthAttemptBody)\n\t});\n};\nconst getGetAuthAttemptUrl = (attemptId) => {\n\treturn `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}`;\n};\n/**\n* Polls the current state of an authentication attempt.\n*\n* Returns the attempt's state, available factors for the next challenge,\n* challenges issued so far, and any errors preventing progress.\n*\n* Use this for polling during long-running factor verifications (e.g., waiting for\n* a federated IdP callback or a device flow).\n* @summary Get authentication attempt state\n*/\nconst getAuthAttempt = async (attemptId, options) => {\n\treturn customFetch(getGetAuthAttemptUrl(attemptId), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getIssueChallengeUrl = (attemptId) => {\n\treturn `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges`;\n};\n/**\n* Issues a single-factor verification challenge within an auth attempt.\n*\n* This advances the authentication state machine by requesting a specific factor method\n* (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details\n* including method, metadata, and any UI hints. The client then verifies the proof\n* by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.\n* @summary Issue a factor challenge\n*/\nconst issueChallenge = async (attemptId, issueChallengeBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getIssueChallengeUrl(attemptId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(issueChallengeBody)\n\t});\n};\nconst getVerifyChallengeProofUrl = (attemptId, challengeId) => {\n\treturn `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/challenges/${encodeURIComponent(String(challengeId))}/verify`;\n};\n/**\n* Submits a proof (credential, code, assertion) to verify a factor challenge.\n*\n* The proof format depends on the challenge method. For example:\n* - `password` method: { password: \"…\" }\n* - `totp` method: { totp: { code: \"123456\" } }\n* - `passkey` method: { passkey: { assertion: \"…\" } }\n* - `recovery_code` method: { recovery_code: \"…\" }\n*\n* On successful verification, the factor is written to the auth attempt.\n* The attempt moves to the next pending challenge or completes if all required factors are verified.\n* @summary Verify a factor proof\n*/\nconst verifyChallengeProof = async (attemptId, challengeId, verifyChallengeProofBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getVerifyChallengeProofUrl(attemptId, challengeId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(verifyChallengeProofBody)\n\t});\n};\nconst getCreateHandoffUrl = (attemptId) => {\n\treturn `${getProxyPath()}/auth_attempts/${encodeURIComponent(String(attemptId))}/handoff`;\n};\n/**\n* Completes the authentication attempt and mints a `handoff_token`.\n*\n* Call this after all required factors have been verified and the attempt is in `completed` state.\n* The handoff token is short-lived (≤60 seconds) and must be exchanged at\n* POST /sessions/exchange to receive the final session and session_token.\n*\n* The handoff token is:\n* - Single-use (atomic exchange, no retry)\n* - Audience-bound (requires matching project key for exchange)\n* - Idempotency-safe within a 5-minute window (see conventions)\n* @summary Complete authentication and create handoff token\n*/\nconst createHandoff = async (attemptId, options) => {\n\treturn customFetch(getCreateHandoffUrl(attemptId), {\n\t\t...options,\n\t\tmethod: \"POST\"\n\t});\n};\nconst getCreateProjectUrl = () => {\n\treturn `${getProxyPath()}/projects`;\n};\n/**\n* Creates a project and returns its project secret and preview secret, which no\n* other endpoint returns.\n*\n* The request needs no credential and is rate-limited. Unless `seed_defaults` is\n* `false`, the project starts with a default user schema and flow; the CLI turns\n* that off and uploads its own from `.zitadel/`.\n* @summary Create project\n*/\nconst createProject = async (createProjectBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateProjectUrl(), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createProjectBody)\n\t});\n};\nconst getQueryProjectsUrl = () => {\n\treturn `${getProxyPath()}/projects/query`;\n};\n/**\n* Returns the project the project secret belongs to, as a page of at most one\n* project.\n*\n* A credential is scoped to one project until ADR 036 widens it, so the filters\n* and sorting apply to that project alone. The projects a signed-in person can\n* act on are listed by `GET /users/me/projects`.\n* @summary Query projects\n*/\nconst queryProjects = async (queryProjectsBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getQueryProjectsUrl(), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(queryProjectsBody)\n\t});\n};\nconst getGetProjectUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`;\n};\n/**\n* Returns the current state of a project.\n* @summary Get project\n*/\nconst getProject = async (projectId, options) => {\n\treturn customFetch(getGetProjectUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getPatchProjectUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}`;\n};\n/**\n* Updates the state of a project.\n* @summary Update project\n*/\nconst patchProject = async (projectId, patchProjectBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getPatchProjectUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"PATCH\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(patchProjectBody)\n\t});\n};\nconst getInitClaimUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/init`;\n};\n/**\n* Starts a claim challenge for an unclaimed project. Authenticated by the\n* project secret, this mints a single-use, short-lived challenge and returns\n* the `claim_url` the developer opens in a browser to complete the claim,\n* together with the `challenge_id` the CLI polls with. The exact expiry is\n* carried by `expires_at` on the response.\n* @summary Initialize a project claim\n*/\nconst initClaim = async (projectId, options) => {\n\treturn customFetch(getInitClaimUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"POST\"\n\t});\n};\nconst getGetClaimStatusUrl = (projectId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/status`;\n};\n/**\n* Polled by the CLI while a browser completes the claim. Authorized by the\n* project secret that initiated the challenge. Returns `pending`, or\n* `completed` with the owning team, the claim timestamp, and the dashboard\n* URL once the project is claimed. The claim grant, not the polled\n* challenge, is the source of truth: a project claimed through another\n* concurrent challenge also reports `completed`, and a completed claim\n* keeps reporting `completed` past this challenge's expiry and past the\n* project's claim window.\n* @summary Get claim status\n*/\nconst getClaimStatus = async (projectId, params, options) => {\n\treturn customFetch(getGetClaimStatusUrl(projectId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCompleteClaimUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/complete`;\n};\n/**\n* Called by the browser after the developer authenticates on the claim page.\n* Authenticated by the `__nextgen_session` cookie, it attaches the project to\n* the developer's personal team using the `challenge_id` from the claim URL as\n* its single-use, browser-safe authorization.\n* @summary Complete a project claim\n*/\nconst completeClaim = async (projectId, completeClaimBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCompleteClaimUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(completeClaimBody)\n\t});\n};\nconst getGetClaimWindowUrl = (projectId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/claim/window`;\n};\n/**\n* Read by the claim page in the browser to show how long is left to claim the\n* project. Unauthenticated by design: the claim page runs this before the\n* developer has signed in, and holding the `challenge_id` from the claim URL\n* is the authorization — the same capability `claim/complete` accepts. It\n* reveals only the window, never the project itself, and unlike\n* `claim/complete` it spends nothing, so a reload is free.\n* @summary Get the claim window for a project\n*/\nconst getClaimWindow = async (projectId, params, options) => {\n\treturn customFetch(getGetClaimWindowUrl(projectId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getAddOriginUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/origins`;\n};\n/**\n* Adds one `{pattern, kind}` to the project's origins. A primary pattern\n* must be an exact URL (no wildcard). Preview patterns may include a single\n* DNS-label wildcard. Adding a pattern that already exists with the same\n* kind is idempotent and answers 201 with the stored origin.\n* @summary Add an origin pattern\n*/\nconst addOrigin = async (projectId, addOriginBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getAddOriginUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(addOriginBody)\n\t});\n};\nconst getRemoveOriginUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/origins/remove`;\n};\n/**\n* Removes one pattern from the project's origins. Requests from URLs only\n* that pattern admitted are refused from then on; live previews and\n* deployment history are untouched. Removing a pattern that is already\n* absent is idempotent and answers 204.\n* @summary Remove an origin pattern\n*/\nconst removeOrigin = async (projectId, removeOriginBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getRemoveOriginUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(removeOriginBody)\n\t});\n};\nconst getListPreviewsUrl = (projectId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews`;\n};\n/**\n* Lists the project's live previews, newest first by `created_at`. An\n* expired or removed preview is not listed; what was deployed to it stays\n* in `GET /deployments`.\n* @summary List previews\n*/\nconst listPreviews = async (projectId, params, options) => {\n\treturn customFetch(getListPreviewsUrl(projectId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getRemovePreviewUrl = (projectId) => {\n\treturn `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/previews/remove`;\n};\n/**\n* Ends a preview before it expires: the URL stops being served at once.\n* The deployments to it stay in the history.\n*\n* Idempotent: a URL with no live preview, including one that has already\n* expired or was removed before, answers `204` too, so a cleanup that\n* races the expiry still succeeds.\n*\n* The URL travels in the body rather than the path because an origin\n* contains `/`.\n* @summary Remove a preview\n*/\nconst removePreview = async (projectId, removePreviewBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getRemovePreviewUrl(projectId), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(removePreviewBody)\n\t});\n};\nconst getCreateSessionUrl = () => {\n\treturn `${getProxyPath()}/sessions`;\n};\n/**\n* Creates an anonymous session shell with no user and no factors (`state: building`).\n*\n* This is optional — an `auth_attempt` will create a session implicitly if none is provided.\n* Use this explicitly when you want to:\n* - Pre-allocate a `session_id` before the user is known, so device/telemetry signals\n* can be correlated with the eventual authenticated session from the start.\n* - Track anonymous state (bot detection, device fingerprint) that survives until authentication.\n*\n* Creating a session is an app-plane operation on the project credential\n* (`session.write`). The returned `session_token` is a session credential for the\n* end-user client, not a management scope: it is delivered as the\n* `__nextgen_session` cookie and authorises the self-service operations\n* `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The\n* by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`\n* are operator endpoints and require `session.read` / `session.delete` instead.\n*\n* The `session_token` is superseded when a handoff exchange completes — clients must\n* replace it at that point.\n*\n* Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured\n* full session TTL when the first authentication factor is written via a completing `auth_attempt`.\n* @summary Create an anonymous session shell\n*/\nconst createSession = async (createSessionBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateSessionUrl(), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createSessionBody)\n\t});\n};\nconst getQuerySessionsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/query?${stringifiedParams}` : `${getProxyPath()}/sessions/query`;\n};\n/**\n* Returns the sessions of a project, paginated with a cursor.\n* Sessions of every lifecycle state are returned; each carries its `state`.\n* Requires `session.read` permission.\n* @summary Query sessions\n*/\nconst querySessions = async (querySessionsBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getQuerySessionsUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(querySessionsBody)\n\t});\n};\nconst getExchangeHandoffUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/exchange?${stringifiedParams}` : `${getProxyPath()}/sessions/exchange`;\n};\n/**\n* Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`\n* and returns the resulting session and a `session_token`.\n*\n* The server resolves the originating `auth_attempt` from the token and then:\n*\n* | Originating auth_attempt | Outcome |\n* |---|---|\n* | No `session_id` | A new authenticated session is **created**. |\n* | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |\n* | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |\n*\n* The response shape is identical in all three cases.\n*\n* The `session_token` supersedes any previously issued `session_token` for the same session.\n* Clients must replace their stored token at this point.\n*\n* Requires a project service key (OAuth2 client credentials).\n* @summary Exchange handoff token for a session\n*/\nconst exchangeHandoff = async (exchangeHandoffBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getExchangeHandoffUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(exchangeHandoffBody)\n\t});\n};\nconst getGetSessionUrl = (sessionId) => {\n\treturn `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`;\n};\n/**\n* Returns the current state of a session including its factors and all currently\n* satisfied assurance levels.\n*\n* `assurance_levels[]` may shrink over time as factor freshness windows expire,\n* without the session itself expiring. Use step-up authentication (a new `auth_attempt`\n* against the same `session_id`) to restore a dropped assurance level.\n* @summary Get session state\n*/\nconst getSession = async (sessionId, options) => {\n\treturn customFetch(getGetSessionUrl(sessionId), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getRevokeSessionUrl = (sessionId) => {\n\treturn `${getProxyPath()}/sessions/${encodeURIComponent(String(sessionId))}`;\n};\n/**\n* Permanently deletes the session, terminating it immediately.\n*\n* This is the operator revoke path and requires the `session.delete` scope on a\n* project-bound credential. End-user logout with the `__nextgen_session` cookie is\n* `DELETE /sessions/me` (`nextgenSession` scheme).\n*\n* Idempotent: deleting a session that does not exist (or was already deleted)\n* still returns 204. After deletion, any tokens derived from the session are\n* invalidated.\n* @summary Revoke session\n*/\nconst revokeSession = async (sessionId, options) => {\n\treturn customFetch(getRevokeSessionUrl(sessionId), {\n\t\t...options,\n\t\tmethod: \"DELETE\"\n\t});\n};\nconst getGetMySessionUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me?${stringifiedParams}` : `${getProxyPath()}/sessions/me`;\n};\n/**\n* Returns the current state of the current session including its factors and all currently\n* satisfied assurance levels.\n*\n* With `project_id`, the session is returned only when it belongs to that project.\n*\n* `assurance_levels[]` may shrink over time as factor freshness windows expire,\n* without the session itself expiring. Use step-up authentication (a new `auth_attempt`\n* against the same `session_id`) to restore a dropped assurance level.\n* @summary Get my session state\n*/\nconst getMySession = async (params, options) => {\n\treturn customFetch(getGetMySessionUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getRevokeMySessionUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me?${stringifiedParams}` : `${getProxyPath()}/sessions/me`;\n};\n/**\n* Logs out by permanently deleting the session.\n*\n* The `__nextgen_session` cookie issued at creation (or superseded by a handoff\n* exchange) is required, with the session's token from `GET /sessions/me/csrf`\n* in the `X-Zitadel-CSRF` header. Idempotent: if the session is already gone\n* this still returns 204. Any tokens derived from the session are invalidated,\n* and the cookie itself is cleared in the response.\n*\n* With `project_id`, only a session of that project is deleted. A session of\n* another project is left alone, and so is its cookie.\n* @summary Revoke my session\n*/\nconst revokeMySession = async (params, options) => {\n\treturn customFetch(getRevokeMySessionUrl(params), {\n\t\t...options,\n\t\tmethod: \"DELETE\"\n\t});\n};\nconst getGetMySessionCsrfTokenUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/sessions/me/csrf?${stringifiedParams}` : `${getProxyPath()}/sessions/me/csrf`;\n};\n/**\n* Returns the session-bound token for cross-site request forgery protection\n* (ADR 053 §5). Browser code sends it in the `X-Zitadel-CSRF` header on the\n* state-changing requests the session cookie authenticates that require it\n* — see the `nextgenSession` scheme. It authorizes nothing on its own: the\n* HttpOnly cookie is still the credential, and a cross-site page cannot\n* read this response. It stays the same for the life of the session, so a\n* client fetches it once per session.\n*\n* With `project_id`, the token is returned only when the session belongs to\n* that project.\n* @summary Get my session's CSRF token\n*/\nconst getMySessionCsrfToken = async (params, options) => {\n\treturn customFetch(getGetMySessionCsrfTokenUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateSchemaUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`;\n};\n/**\n* Create a new schema. The optional `$id` field is the JSON Schema document\n* URI used to identify the schema in future requests (GitOps-stable identity,\n* not a free-form resource primary key). When `$id` is omitted, the server\n* generates a `sch_*` URL. When provided, `$id` must be unique within the\n* project and should ideally be a valid URI pointing at where the schema can\n* be accessed.\n*\n* The schema can either be a concrete schema, e.g. a user schema, or a\n* schema-url which will be resolved by the server.\n* @summary Create new schema\n*/\nconst createSchema = async (createSchemaBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateSchemaUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createSchemaBody)\n\t});\n};\nconst getListSchemasUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/schemas?${stringifiedParams}` : `${getProxyPath()}/schemas`;\n};\n/**\n* Retrieve a list of all schemas available in the system. This endpoint\n* supports pagination and filtering based on schema attributes.\n* @summary List all schemas\n*/\nconst listSchemas = async (params, options) => {\n\treturn customFetch(getListSchemasUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetSchemaByIdUrl = (id, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/schemas/${encodeURIComponent(String(id))}`;\n};\n/**\n* Get a schema by its ID. A schema ID identifies one immutable revision, so\n* this returns exactly that revision. To find the current revision of an\n* object type, list with `revisions=latest`.\n*\n* Schema IDs are unique within a project, not across projects (the seeded\n* default schema carries the same `$id` in every project). A Console\n* session that manages more than one project names the project with\n* `project_id`; without it, the ID is resolved in the credential's own\n* project when it is ambiguous. A project secret always resolves in its\n* own project and ignores `project_id`.\n* @summary Get schema by ID\n*/\nconst getSchemaById = async (id, params, options) => {\n\treturn customFetch(getGetSchemaByIdUrl(id, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateFlowDefinitionUrl = () => {\n\treturn `${getProxyPath()}/flow_definitions`;\n};\n/**\n* Publishes a new flow definition revision.\n* Flow definitions are templates that define the sequence of steps (capabilities)\n* for a particular user journey (e.g., registration, login, password reset).\n*\n* Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.\n*\n* Every call allocates a new opaque id. Revisions of one flow share its\n* `name`; posting a definition under an existing `name` publishes a new\n* revision of that flow, it is not a conflict. List with `name` to see a\n* flow's revisions, newest by creation time first.\n* @summary Create a new flow definition\n*/\nconst createFlowDefinition = async (createFlowDefinitionBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateFlowDefinitionUrl(), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createFlowDefinitionBody)\n\t});\n};\nconst getListFlowDefinitionsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (Array.isArray(value) && [\"expand\"].includes(key)) {\n\t\t\tvalue.forEach((v) => {\n\t\t\t\tnormalizedParams.append(key, v === null ? \"null\" : String(v));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/flow_definitions?${stringifiedParams}` : `${getProxyPath()}/flow_definitions`;\n};\n/**\n* Retrieves a list of all flow definitions, newest by creation time first.\n* This endpoint can be used to view existing flow definitions and their configurations.\n* Filter by `name` to list the revisions of one flow.\n* @summary List flow definitions\n*/\nconst listFlowDefinitions = async (params, options) => {\n\treturn customFetch(getListFlowDefinitionsUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetFlowDefinitionUrl = (id) => {\n\treturn `${getProxyPath()}/flow_definitions/${encodeURIComponent(String(id))}`;\n};\n/**\n* Get a flow definition by id\n* @summary Get a flow definition by id\n*/\nconst getFlowDefinition = async (id, options) => {\n\treturn customFetch(getGetFlowDefinitionUrl(id), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateTeamUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/teams?${stringifiedParams}` : `${getProxyPath()}/teams`;\n};\n/**\n* Creates a team in the project, with a name no other team in the project has.\n*\n* A taken name is refused with `409 team.already_exists`. The new team has no\n* members yet.\n* @summary Create team\n*/\nconst createTeam = async (createTeamBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateTeamUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createTeamBody)\n\t});\n};\nconst getQueryTeamsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/teams/query?${stringifiedParams}` : `${getProxyPath()}/teams/query`;\n};\n/**\n* Returns the teams of a project, paginated with a cursor.\n* @summary Query teams\n*/\nconst queryTeams = async (queryTeamsBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getQueryTeamsUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(queryTeamsBody)\n\t});\n};\nconst getGetTeamUrl = (teamId) => {\n\treturn `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`;\n};\n/**\n* Returns a Team by its id.\n* @summary Get team\n*/\nconst getTeam = async (teamId, options) => {\n\treturn customFetch(getGetTeamUrl(teamId), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getDeleteTeamUrl = (teamId) => {\n\treturn `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`;\n};\n/**\n* Deactivates the team.\n*\n* The team is tombstoned rather than erased: it stays readable through\n* getTeam with status `deactivated`. Its memberships are removed and the\n* users whose lifecycle it owns are deactivated with it.\n*\n* The request is idempotent. Deleting a team that is already deactivated\n* or doesn't exist succeeds without changing anything.\n*\n* A team that still owns a project is refused with `409\n* team.owns_project`: deactivating it would leave the project owned by a\n* dead team and so unmanageable. No endpoint releases that ownership yet,\n* so such a team cannot currently be deactivated through the API.\n* @summary Delete team\n*/\nconst deleteTeam = async (teamId, options) => {\n\treturn customFetch(getDeleteTeamUrl(teamId), {\n\t\t...options,\n\t\tmethod: \"DELETE\"\n\t});\n};\nconst getUpdateTeamUrl = (teamId) => {\n\treturn `${getProxyPath()}/teams/${encodeURIComponent(String(teamId))}`;\n};\n/**\n* Update team. Only active teams can be updated.\n* @summary Update team\n*/\nconst updateTeam = async (teamId, updateTeamBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getUpdateTeamUrl(teamId), {\n\t\t...options,\n\t\tmethod: \"PATCH\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(updateTeamBody)\n\t});\n};\nconst getCreateBrandingUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`;\n};\n/**\n* Publishes a new immutable branding revision for the project. Branding\n* revisions cannot be updated or deleted; every edit publishes a new\n* revision, and flow responses resolve the latest revision per project.\n*\n* The `liquid_template` is validated lexically on save (size, encoding,\n* banned patterns such as `<script>` tags, inline event handlers, and the\n* `| raw` filter). Authoritative LiquidJS validation runs at authoring\n* time via `zitadel plan` / `zitadel apply`.\n* @summary Publish a new branding revision\n*/\nconst createBranding = async (createBrandingBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateBrandingUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createBrandingBody)\n\t});\n};\nconst getListBrandingUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/branding?${stringifiedParams}` : `${getProxyPath()}/branding`;\n};\n/**\n* Lists branding revisions for the project, newest first, capped at the\n* 100 most recent. The first entry is the revision flow responses\n* currently resolve. Deliberately unpaginated in v1 — list endpoints gain a\n* real query mechanism together; advertising pagination parameters the\n* server ignores would be worse than none.\n* @summary List branding revisions\n*/\nconst listBranding = async (params, options) => {\n\treturn customFetch(getListBrandingUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetBrandingByIdUrl = (id) => {\n\treturn `${getProxyPath()}/branding/${encodeURIComponent(String(id))}`;\n};\n/**\n* Retrieves a single branding revision, including its stored configuration.\n* @summary Get a branding revision by ID\n*/\nconst getBrandingById = async (id, options) => {\n\treturn customFetch(getGetBrandingByIdUrl(id), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateIdpUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/idps?${stringifiedParams}` : `${getProxyPath()}/idps`;\n};\n/**\n* Creates or revises a connection document. If the slug does not already\n* exist, a new connection is created. If a connection with that slug already\n* exists, a revision is created.\n*\n* A revision gets a new `revision_id` and does not modify the connection\n* `id`, so identity links that reference the connection keep resolving while\n* releases and auth attempts stay pinned to the revision they captured.\n*\n* Identity fields are fixed for the life of the connection and a revision\n* that changes one is rejected: `protocol`, `subject_claim`, and `issuer`,\n* the field that names the authority. Their values decide which provider\n* account a stored subject belongs to, so changing one would silently\n* repoint existing identities at a different provider.\n*\n* `subject_claim` is optional, and `sub` is used as the default value. If a\n* revision updates `subject_claim` to a different value than the one set\n* during creation, the request is rejected.\n*\n* OIDC is the only protocol.\n*\n* The document is validated against the `idp-connection.json` schema before\n* anything is stored. The rules the engine applies when it starts a sign-in\n* then run on the document, so a connection that could never start one is\n* refused here instead with `idp.endpoints_partial`: the OIDC block sets an\n* endpoint without the others. It either sets no endpoint, and discovery\n* fills them, or sets `authorization_endpoint`, `token_endpoint`, `jwks_uri`,\n* and `userinfo_endpoint`. `userinfo_endpoint` may be left out when\n* `id_token_mapping` is on, but setting it alone still counts as setting an\n* endpoint. The details list the missing endpoints.\n*\n* A refused document stores nothing, and on a revise the current revision\n* stays unchanged.\n* @summary Create or revise an identity provider connection\n*/\nconst createIdp = async (createIdpBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateIdpUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createIdpBody)\n\t});\n};\nconst getQueryIdpsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/idps/query?${stringifiedParams}` : `${getProxyPath()}/idps/query`;\n};\n/**\n* Returns the identity provider connections of a project, paginated with a\n* cursor. One row per connection, carrying its newest revision.\n* @summary Query identity provider connections\n*/\nconst queryIdps = async (queryIdpsBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getQueryIdpsUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(queryIdpsBody)\n\t});\n};\nconst getGetIdpByIdUrl = (id, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/idps/${encodeURIComponent(String(id))}`;\n};\n/**\n* Reads a connection by its id, at its newest revision.\n* `GET /idps/{id}/revisions` lists every revision of the connection.\n*\n* The lookup is scoped to the project in `project_id`.\n* @summary Get an identity provider connection by id\n*/\nconst getIdpById = async (id, params, options) => {\n\treturn customFetch(getGetIdpByIdUrl(id, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getListIdpRevisionsUrl = (id, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions?${stringifiedParams}` : `${getProxyPath()}/idps/${encodeURIComponent(String(id))}/revisions`;\n};\n/**\n* Returns every revision of one connection, newest first, paginated with a\n* cursor. The order is fixed, so there is no `sorting`.\n*\n* The lookup is scoped to the project in `project_id`.\n* @summary List the revisions of an identity provider connection\n*/\nconst listIdpRevisions = async (id, params, options) => {\n\treturn customFetch(getListIdpRevisionsUrl(id, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetIdpRevisionByIdUrl = (revisionId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/idps/revisions/${encodeURIComponent(String(revisionId))}`;\n};\n/**\n* Reads one revision of a connection by its `revision_id`, the value an auth\n* attempt or a release pins.\n*\n* The lookup is scoped to the project in `project_id`.\n* @summary Get one revision of an identity provider connection\n*/\nconst getIdpRevisionById = async (revisionId, params, options) => {\n\treturn customFetch(getGetIdpRevisionByIdUrl(revisionId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getCreateReleaseUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`;\n};\n/**\n* Assembles a release from existing revisions, given as\n* `(kind, revision_id)` pairs. To build one from files on disk, use\n* `POST /releases/build`.\n*\n* Each revision must exist in the project and is recorded under the handle\n* it declares. The release must be complete and consistent:\n*\n* - Every handle its revisions name must be in the release: a flow's\n* `user_schema`, and the IDP connections named by a flow step's\n* `sso_providers` or a schema's `x-auth-methods.sso.providers`. A missing\n* one answers `rel.unresolved_reference`, naming the resource and the\n* handle, e.g. `flow_definition default-login: user_schema human-user not found`.\n* - Every flow is validated as on save, against the user schema revision\n* in the release. A flow that fails answers `rel.invalid`, with the\n* reason in `details`.\n*\n* Idempotent on the set of revisions: the same revisions with a different\n* `message` answer `200` with the existing release. A new release answers\n* `201`. Creating a release does not deploy it.\n* @summary Create a release\n*/\nconst createRelease = async (createReleaseBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateReleaseUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createReleaseBody)\n\t});\n};\nconst getListReleasesUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/releases?${stringifiedParams}` : `${getProxyPath()}/releases`;\n};\n/**\n* Lists the project's releases, newest first.\n*\n* Entries carry the digest, the metadata and `revoked_at` — the pinned set\n* is omitted.\n* Read one release with `GET /releases/{release_id}` to get its pointers.\n*\n* `content_hash` looks a release up by its content, as the CLI does when a\n* person types the digest a transcript printed. The project holds at most\n* one release per digest, so the filtered list has one entry or none, and\n* an unknown digest is an empty list rather than an error. Paths take the\n* `rel_` id only; the matched entry's `id` is what to use there.\n* @summary List releases\n*/\nconst listReleases = async (params, options) => {\n\treturn customFetch(getListReleasesUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getBuildReleaseUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/releases/build?${stringifiedParams}` : `${getProxyPath()}/releases/build`;\n};\n/**\n* Builds a release from the resources of `.zitadel/` as authored on disk,\n* grouped by kind, in one transaction: a failure anywhere leaves no\n* revision and no release. The caller records nothing.\n*\n* If the project already holds a release with the same content, the same\n* `content_hash`, the request answers `200` with that release and\n* allocates nothing, however long ago it was built. Otherwise every resource is compared against the\n* project's newest revision of the same handle: unchanged content reuses\n* that revision, changed content allocates a new one, and the request\n* answers `201` with the new release. Metadata is excluded from the\n* comparison, so the same content under a different `message` is the same\n* release.\n*\n* A structurally malformed request is refused while decoding with\n* `req.invalid`, naming the offending fields. A well-formed bundle is then\n* checked resource by resource, as each kind's create endpoint checks it,\n* and every failure is reported at once: the request answers `400` with\n* `rel.invalid`, and `details.resources` lists each resource that failed.\n* A handle that resolves neither in the bundle nor in the project answers\n* `rel.unresolved_reference`, naming the pointer and the handle.\n*\n* Building writes revisions, so besides `release.write` it needs the write\n* scope of every kind the bundle carries a resource of: `schema.write`,\n* `flow_definition.write`, `branding.write` and `idp.write`, as the\n* per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,\n* naming the kind. An empty kind needs no scope.\n*\n* Building a release does not deploy it. A release is not tied to an\n* origin, and the same release can later be deployed to any number of\n* origins unchanged.\n* @summary Build a release from files\n*/\nconst buildRelease = async (buildReleaseBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getBuildReleaseUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(buildReleaseBody)\n\t});\n};\nconst getGetReleaseByIdUrl = (releaseId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}?${stringifiedParams}` : `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}`;\n};\n/**\n* Reads one release: its digest, its metadata, whether it was revoked, and\n* the `(kind, handle, revision_id)` tuples it pins.\n*\n* The path takes the `rel_` id only. To find a release from its digest,\n* list with the `content_hash` filter and read the matched entry's `id`.\n*\n* Does not embed resource content. Resolve each `revision_id` through the\n* per-kind read endpoints when the bytes are needed.\n*\n* The lookup is scoped to the project in `project_id`: a release id belonging\n* to another project answers not found exactly as an unknown id does, so the\n* endpoint cannot be used to probe for releases in projects the caller cannot\n* read.\n* @summary Get a release by id\n*/\nconst getReleaseById = async (releaseId, params, options) => {\n\treturn customFetch(getGetReleaseByIdUrl(releaseId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getRevokeReleaseUrl = (releaseId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}/revoke?${stringifiedParams}` : `${getProxyPath()}/releases/${encodeURIComponent(String(releaseId))}/revoke`;\n};\n/**\n* Marks the release revoked, so that its content is never served again.\n* From then on the release cannot be deployed and is refused on every path\n* that would serve it, including to a build that pins its digest, with\n* `rel.revoked`.\n*\n* A release that any origin still serves cannot be revoked. An origin\n* serves the release of the newest deployment to it, so the call answers\n* `409` with `rel.in_use`, naming each such origin and that deployment.\n* Deploy another release there or roll back first, then revoke. Revoking\n* therefore never takes an origin down. Deployments that named the release\n* earlier stay in the history.\n*\n* Idempotent: revoking a release that is already revoked answers `200`\n* with the release unchanged, `revoked_at` still naming the first\n* revocation. There is no un-revoke; build a new release instead.\n*\n* Takes no body. The lookup is scoped to the project in `project_id`, so a\n* release id of another project answers not found exactly as an unknown id\n* does.\n* @summary Revoke a release\n*/\nconst revokeRelease = async (releaseId, params, options) => {\n\treturn customFetch(getRevokeReleaseUrl(releaseId, params), {\n\t\t...options,\n\t\tmethod: \"POST\"\n\t});\n};\nconst getCreateGrantUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/grants?${stringifiedParams}` : `${getProxyPath()}/grants`;\n};\n/**\n* Bind a user or team to `project.viewer`, `project.editor`, or\n* `project.admin` on the project identified by the `project-id` header.\n* Name the principal with `user` (`user_id` or `identifier`) or `team`\n* (`team_id` or `name`). IDs are `asgn_<opaque>`. Owning-team\n* (`project.team`) grants are not created here — claim owns that path. An\n* unrevoked grant with the same principal and relation occupies the unique\n* key even after `expires_at`; DELETE it before re-creating.\n* Create does not accept `expand`. The `user_id` and team locators\n* return 201, whose `user` / `team` carry only `user_id` / `team_id`,\n* and still 404 / 409 when the principal is missing or the tuple\n* already exists. Creating by `user.identifier` answers 202 with no\n* body on every outcome. Granting the session caller's own user is\n* `grant.invalid` on either user locator. Read the grant back for\n* identifier and display.\n*\n* Accepts either a project secret (`oauth2`) or a user-bound Console\n* session cookie (`nextgenSession`). Session callers are authorized as\n* the human against the target project (home may differ). Cookie-authenticated\n* requests follow the scheme's CSRF rules (`nextgenSession`).\n* @summary Create grant\n*/\nconst createGrant = async (createGrantBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateGrantUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createGrantBody)\n\t});\n};\nconst getQueryGrantsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/grants/query?${stringifiedParams}` : `${getProxyPath()}/grants/query`;\n};\n/**\n* Returns the collaboration grants of a project, paginated with a cursor.\n* Only unrevoked grants this API manages are listed (user or team bound to\n* viewer, editor, or admin), including expired grants so a client can\n* DELETE before re-granting. Project-secret setup (`sk_proj`) and\n* owning-team (`relation=team`) rows are not returned. Grants are not in\n* `resource_scope_index`; project scope is required on the query (same as\n* get). Requires `project.read`. `expand: [\"principal\"]` adds envelope\n* fields on `user` / `team` and additionally requires `user.read` and\n* `team.read` for project secrets (documented on the expand enum; those\n* scopes cannot be ANDed onto this security block because they are\n* body-conditional). A user-bound Console session that already passed\n* the project Check may expand without those scopes.\n*\n* Accepts either a project secret (`oauth2`) or a user-bound Console\n* session cookie (`nextgenSession`). Cookie-authenticated requests\n* follow the scheme's CSRF rules (`nextgenSession`).\n* @summary Query grants\n*/\nconst queryGrants = async (queryGrantsBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getQueryGrantsUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(queryGrantsBody)\n\t});\n};\nconst getGetGrantUrl = (id, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (Array.isArray(value) && [\"expand\"].includes(key)) {\n\t\t\tvalue.forEach((v) => {\n\t\t\t\tnormalizedParams.append(key, v === null ? \"null\" : String(v));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`;\n};\n/**\n* Loads a grant by `(project_id, id)` that this API manages (user or team\n* bound to viewer, editor, or admin) and that has not been revoked.\n* \"Active\" here means not revoked: expired grants stay visible so the\n* client can DELETE before re-granting the same binding. Authorization\n* still ignores expired grants. Grants are not registered in\n* `resource_scope_index`; project scope is required on the query (same as\n* events). Misses, revoked rows, project-secret setup (`sk_proj`),\n* owning-team (`relation=team`) rows, and cross-project ids return 404.\n* `expand=principal` adds envelope fields on `user` or `team` and requires\n* `user.read` and `team.read` in addition to `project.read` for project\n* secrets. A user-bound Console session that already passed the project\n* Check may expand without those scopes.\n*\n* Accepts either a project secret (`oauth2`) or a user-bound Console\n* session cookie (`nextgenSession`). Cookie-authenticated requests\n* follow the scheme's CSRF rules (`nextgenSession`).\n* @summary Get grant\n*/\nconst getGrant = async (id, params, options) => {\n\treturn customFetch(getGetGrantUrl(id, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getDeleteGrantUrl = (id, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/grants/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/grants/${encodeURIComponent(String(id))}`;\n};\n/**\n* Soft-revokes a grant this API manages and emits `authz.revoked`.\n* Already-revoked, missing, project-secret setup, and owning-team grants\n* return 404. The row is not un-revoked. Expired grants can still be\n* revoked so the unique binding can be reused.\n*\n* Accepts either a project secret (`oauth2`) or a user-bound Console\n* session cookie (`nextgenSession`). Cookie-authenticated requests\n* follow the scheme's CSRF rules (`nextgenSession`).\n* @summary Revoke grant\n*/\nconst deleteGrant = async (id, params, options) => {\n\treturn customFetch(getDeleteGrantUrl(id, params), {\n\t\t...options,\n\t\tmethod: \"DELETE\"\n\t});\n};\nconst getListEventsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (Array.isArray(value) && [\"category\", \"event_type\"].includes(key)) {\n\t\t\tvalue.forEach((v) => {\n\t\t\t\tnormalizedParams.append(key, v === null ? \"null\" : String(v));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/events?${stringifiedParams}` : `${getProxyPath()}/events`;\n};\n/**\n* Returns project-scoped audit events, newest-first by keyset on\n* `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.\n* Requires `events.read`.\n*\n* Pre-claim projects return an empty list (events are stored but not\n* visible until claim succeeds). Team-scoped credentials see only events\n* whose emit-time `team_id` matches the credential team (enforced when\n* team-scoped tokens exist).\n*\n* Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —\n* see docs/design/api/events-catalog.md.\n* @summary List events\n*/\nconst listEvents = async (params, options) => {\n\treturn customFetch(getListEventsUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetEventUrl = (id, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/events/${encodeURIComponent(String(id))}?${stringifiedParams}` : `${getProxyPath()}/events/${encodeURIComponent(String(id))}`;\n};\n/**\n* Loads a single event by `(project_id, id)`. Requires `events.read`.\n* Events are not registered in `resource_scope_index`; project scope is\n* required on the query (ADR 049). Misses and cross-project ids return 404.\n*\n* Pre-claim projects return 404 (stored events stay invisible until claim).\n* @summary Get event by ID\n*/\nconst getEvent = async (id, params, options) => {\n\treturn customFetch(getGetEventUrl(id, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetVariablesUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`;\n};\n/**\n* Returns the project's variables, keyed by name, each with its value per\n* kind. With `kind`, only that kind's values are returned.\n*\n* Secret values are not returned. A secret appears as `{\"secret\": true}`,\n* which says a value is held without disclosing it.\n* @summary Get variables\n*/\nconst getVariables = async (params, options) => {\n\treturn customFetch(getGetVariablesUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getUpdateVariablesUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/variables?${stringifiedParams}` : `${getProxyPath()}/variables`;\n};\n/**\n* Enters, replaces and removes the project's variables for the requested\n* kind. Names not in the body are untouched. Existing deployments keep the\n* values they froze.\n*\n* Without `kind`, a plain value is written for both kinds. A secret is\n* written for `primary` only and removes the name's `preview` value, so a\n* preview never keeps a plaintext copy; set a preview secret with\n* `kind=preview`. `null` removes the name from both.\n*\n* A bare scalar enters a non-secret value. `{\"value\": …, \"secret\": true}`\n* stores the value encrypted under the project's active `secret` key, after\n* which it can be referenced but not read back. `null` removes the name\n* (RFC 7386), which is how several variables are removed in one request;\n* removing a name the project does not hold is a no-op rather than an error.\n*\n* The body is applied whole or not at all, so a rejected request leaves the\n* project's variables exactly as they were. Writing the same name twice\n* replaces the value rather than duplicating it, which makes a retry safe.\n* @summary Update variables\n*/\nconst updateVariables = async (updateVariablesBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getUpdateVariablesUrl(params), {\n\t\t...options,\n\t\tmethod: \"PATCH\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(updateVariablesBody)\n\t});\n};\nconst getGetVariableUrl = (variableName, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`;\n};\n/**\n* Reads one variable by name, with its value per kind. A name with no\n* value for the requested kind answers `var.not_found`. A secret reads\n* back as `{\"secret\": true}`.\n* @summary Get a variable\n*/\nconst getVariable = async (variableName, params, options) => {\n\treturn customFetch(getGetVariableUrl(variableName, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getDeleteVariableUrl = (variableName, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}?${stringifiedParams}` : `${getProxyPath()}/variables/${encodeURIComponent(String(variableName))}`;\n};\n/**\n* Removes a variable for the requested kind, or for both kinds without\n* `kind`. A name with no value for that kind answers `var.not_found`.\n* Existing deployments keep the values they froze.\n* @summary Delete a variable\n*/\nconst deleteVariable = async (variableName, params, options) => {\n\treturn customFetch(getDeleteVariableUrl(variableName, params), {\n\t\t...options,\n\t\tmethod: \"DELETE\"\n\t});\n};\nconst getCreateDeploymentUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`;\n};\n/**\n* Makes a release live on a set of targets by recording a deployment. The\n* two happen atomically: when the call returns, every target serves the\n* named release and the record exists; on any failure every target keeps\n* serving what it served and no record is written.\n*\n* The release is named by exactly one of `release_id` or `content_hash`\n* (both or neither answers `400` with `dep.invalid`), and must already\n* exist in the project: deploying never assembles a release. An\n* unknown release id or digest answers `404` with `rel.not_found`, and a\n* revoked release answers `409` with `rel.revoked`.\n*\n* `targets` lists `primary`, which expands to every primary origin of the\n* project, and exact origins. An origin that is neither a primary origin\n* of the project nor matches one of its preview patterns answers `403`\n* with `proj.origin_not_allowed`, and `primary` on a project with no\n* primary origin answers `400` with `dep.invalid`. The deployment records\n* the resolved origins, sorted, never the keyword.\n*\n* A deployment to preview URLs creates the preview for each of them, or\n* renews it when it exists, in the same transaction, with the expiry set\n* from `ttl`; each target in the response carries that expiry. It always\n* writes a new deployment, answering `201`, even when the URLs already\n* serve the release: that record is the renewal. Primary origins and\n* preview URLs cannot be mixed in one deployment: that answers `400` with\n* `dep.invalid`.\n*\n* A deployment freezes the variable values the project stores for its\n* kind: primary origins use the primary values, preview URLs the preview\n* values, with no fallback from one to the other. A release that\n* references a variable with no value for that kind answers `400` with\n* `dep.variables_missing`, naming the kind and every missing variable, and\n* nothing is written.\n*\n* A deployment to primary origins is idempotent on what is served: when\n* every resolved target already serves the release with the same frozen\n* variable values, nothing changes and the call answers `200` with the\n* newest deployment to those targets, so a re-run of `zitadel deploy` on\n* unchanged content is a no-op end to end. The same release with a\n* changed variable value is a new deployment.\n* Anything else writes a new record covering all of the resolved targets,\n* including the same release returning after something else was served in\n* between: the log is append-only, and each record is one act of making a\n* release live.\n*\n* `expected_deployment_id` guards against racing another deploy: when\n* present, the write only happens if the newest deployment to any of the\n* resolved targets still is the one named, and a mismatch answers `409`\n* with `dep.conflict`, carrying the actual newest deployment.\n* @summary Create a deployment\n*/\nconst createDeployment = async (createDeploymentBody, params, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getCreateDeploymentUrl(params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(createDeploymentBody)\n\t});\n};\nconst getListDeploymentsUrl = (params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (Array.isArray(value) && [\"expand\"].includes(key)) {\n\t\t\tvalue.forEach((v) => {\n\t\t\t\tnormalizedParams.append(key, v === null ? \"null\" : String(v));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/deployments?${stringifiedParams}` : `${getProxyPath()}/deployments`;\n};\n/**\n* Lists deployments newest first: what ran where, and when.\n*\n* By default the list is the history: every deployment of the project, each\n* with every target it made the release live on. With `origin`, it is the\n* history of that origin alone, and its first row is the deployment the\n* origin serves.\n*\n* With `live=true`, the list is what is served now: the newest deployment\n* to each target, each carrying only the targets it still serves. A\n* preview URL is served only while its preview is live, and its\n* `expires_at` is the expiry its newest deployment set, which is the\n* preview's current one. A deployment every target of which has since\n* been replaced, or whose previews have all expired or been removed, does\n* not appear. Combined with `origin`, the live view is the one deployment\n* that origin serves, or empty.\n*\n* `expand: [\"release\"]` embeds the release each deployment made live, so a\n* history renders with each entry's content without resolving `release_id`\n* one by one. Expanding requires `release.read` and does not affect the\n* ordering or the page tokens.\n* @summary List deployments\n*/\nconst listDeployments = async (params, options) => {\n\treturn customFetch(getListDeploymentsUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetDeploymentByIdUrl = (deploymentId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}`;\n};\n/**\n* Reads one deployment record.\n*\n* The lookup is scoped to the project in `project_id`: a deployment id\n* belonging to another project answers not found exactly as an unknown id\n* does, so the endpoint cannot be used to probe for deployments in projects\n* the caller cannot read.\n* @summary Get a deployment by id\n*/\nconst getDeploymentById = async (deploymentId, params, options) => {\n\treturn customFetch(getGetDeploymentByIdUrl(deploymentId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getRollbackDeploymentUrl = (deploymentId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/rollback`;\n};\n/**\n* Re-deploys the deployment named in the path: a new deployment with the\n* same `release_id` and the same `targets`, `reason: rollback`, and\n* `rollback_to` in its metadata naming the deployment it re-applied. The\n* variable values that deployment resolved are re-applied with it, so the\n* targets serve exactly what they served then. The history is append-only,\n* so the deployments in between stay in it.\n*\n* Only a deployment to primary origins can be rolled back. One whose\n* targets were preview URLs answers `400` with `dep.invalid`; deploy to\n* the preview again instead. Every target must still be a primary origin\n* of the project, as `POST /deployments` requires of an exact origin:\n* when one is not, the request answers `403` with\n* `proj.origin_not_allowed` naming it, and nothing changes. There is no\n* narrowing to some of the targets: to roll back one origin, deploy the\n* earlier release to it with `POST /deployments`.\n*\n* When every target already serves the deployment's release, nothing\n* changes and the call answers `200` with the newest deployment to the\n* targets.\n*\n* The release must not be revoked: a revoked one answers `409` with\n* `rel.revoked`. An unknown deployment id, or one of another project,\n* answers `404` with `dep.not_found`.\n*\n* A rollback never answers `dep.variables_missing`: the release and the\n* frozen values it re-applies passed that check together when the named\n* deployment was made.\n* @summary Roll back to a deployment\n*/\nconst rollbackDeployment = async (deploymentId, params, rollbackDeploymentBody, options) => {\n\tconst getHeaders = (h) => {\n\t\tif (!h) return {};\n\t\tif (h instanceof Headers) return Object.fromEntries(h.entries());\n\t\tif (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));\n\t\tconst headers = {};\n\t\tfor (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;\n\t\treturn headers;\n\t};\n\treturn customFetch(getRollbackDeploymentUrl(deploymentId, params), {\n\t\t...options,\n\t\tmethod: \"POST\",\n\t\theaders: {\n\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t...getHeaders(options?.headers)\n\t\t},\n\t\tbody: JSON.stringify(rollbackDeploymentBody)\n\t});\n};\nconst getGetDeploymentVariablesUrl = (deploymentId, params) => {\n\tconst normalizedParams = new URLSearchParams();\n\tObject.entries(params || {}).forEach(([key, value]) => {\n\t\tif (value !== void 0) normalizedParams.append(key, value === null ? \"null\" : String(value));\n\t});\n\tconst stringifiedParams = normalizedParams.toString();\n\treturn stringifiedParams.length > 0 ? `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/variables?${stringifiedParams}` : `${getProxyPath()}/deployments/${encodeURIComponent(String(deploymentId))}/variables`;\n};\n/**\n* Returns the variable values the deployment froze when it was made. Later\n* changes to the project's variables do not affect them. A secret reads\n* back as `{\"secret\": true}`.\n* @summary Get a deployment's variables\n*/\nconst getDeploymentVariables = async (deploymentId, params, options) => {\n\treturn customFetch(getGetDeploymentVariablesUrl(deploymentId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\n//#endregion\nexport { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetHealthUrl, getGetIdpByIdUrl, getGetIdpRevisionByIdUrl, getGetLiveUrl, getGetMySessionCsrfTokenUrl, getGetMySessionUrl, getGetMyUserSchemaUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGetVariableUrl, getGetVariablesUrl, getGrant, getHealth, getIdpById, getIdpRevisionById, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListDeploymentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListIdpRevisionsUrl, getListMyProjectsUrl, getListMyTeamsUrl, getListPreviewsUrl, getListReleasesUrl, getListSchemasUrl, getListUserIdentityLinksUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getMySession, getMySessionCsrfToken, getMyUser, getMyUserSchema, getPatchMyUserUrl, getPatchProjectUrl, getPatchUserByIDUrl, getProject, getQueryGrantsUrl, getQueryIdpsUrl, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getReleaseById, getRemoveOriginUrl, getRemovePreviewUrl, getRevokeMySessionUrl, getRevokeReleaseUrl, getRevokeSessionUrl, getRollbackDeploymentUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateTeamUrl, getUpdateVariablesUrl, getUserByID, getVariable, getVariables, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listDeployments, listEvents, listFlowDefinitions, listIdpRevisions, listMyProjects, listMyTeams, listPreviews, listReleases, listSchemas, listUserIdentityLinks, listUserPasskeys, listUserTeams, patchMyUser, patchProject, patchUserByID, queryGrants, queryIdps, queryProjects, querySessions, queryTeams, queryUsers, removeOrigin, removePreview, revokeMySession, revokeRelease, revokeSession, rollbackDeployment, setUserPassword, submitFlowStep, zitadelNextGen_exports as t, updateTeam, updateVariables, verifyChallengeProof };\n\n//# sourceMappingURL=zitadelNextGen.mjs.map","import { setProxyPath } from \"./base-url.mjs\";\nimport { setApiAuthToken } from \"./auth.mjs\";\nimport { setRequestPolicy } from \"./fetch.mjs\";\nimport { t as zitadelNextGen_exports } from \"../generated/endpoints/zitadelNextGen.mjs\";\n//#region src/runtime/api-factory.ts\n/**\n* Factory for the typed Zitadel client every consumer reaches for.\n*\n* Wraps the orval-generated endpoints in a {@link Proxy} so each\n* generated function sees the right base URL and (optionally) the\n* right bearer token at call time — without the caller having to\n* thread either through every operation, and without exposing the\n* module-globals (`setProxyPath` / `setApiAuthToken`) as part of the\n* public API.\n*\n* Per-instance isolation: multiple clients can coexist in one process\n* (different servers, different tokens). Their Proxy `get` traps set\n* the globals synchronously before invoking the underlying generated\n* function, which reads them at the top of `customFetch` before any\n* `await`. Two clients running interleaved within a single JS turn\n* are safe; two clients running in parallel across awaits could\n* clobber each other — not a pattern any current consumer uses.\n*/\n/**\n* Build a typed Zitadel client pre-bound to a base URL and (optionally)\n* a bearer token. Every method on the returned object mirrors a\n* generated orval function:\n*\n* const client = createZitadelClient({ baseUrl, token });\n* await client.createProject({ origins: [] });\n* await client.createSchema(body, { project_id });\n*/\nfunction createZitadelClient(opts) {\n\tlet baseUrl = opts.baseUrl;\n\twhile (baseUrl.endsWith(\"/\")) baseUrl = baseUrl.slice(0, -1);\n\treturn new Proxy(zitadelNextGen_exports, { get(target, prop, receiver) {\n\t\tconst value = Reflect.get(target, prop, receiver);\n\t\tif (typeof value !== \"function\") return value;\n\t\treturn (...args) => {\n\t\t\tsetProxyPath(baseUrl);\n\t\t\tsetApiAuthToken(opts.token);\n\t\t\tsetRequestPolicy({\n\t\t\t\tsignal: opts.signal,\n\t\t\t\ttimeoutMs: opts.timeoutMs\n\t\t\t});\n\t\t\treturn value(...args);\n\t\t};\n\t} });\n}\n/**\n* Legacy entry point: builds a client with only the base URL set, no\n* token. Components and SDKs that don't carry an auth token (browser\n* flows authenticated by platform cookies) still consume this name.\n* Equivalent to `createZitadelClient({ baseUrl: apiBase })`.\n*/\nfunction createApi(apiBase) {\n\treturn createZitadelClient({ baseUrl: apiBase });\n}\n//#endregion\nexport { createApi, createZitadelClient };\n\n//# sourceMappingURL=api-factory.mjs.map","import { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\n//#region defaults/default-human-user.json\nvar default_human_user_default = {\n\ttitle: \"DefaultHumanUserSchema\",\n\t$schema: \"https://json-schema.org/draft/2020-12/schema\",\n\tmetaSchema: \"${SERVER_URL}/user-schema.json\",\n\t$id: \"${USER_SCHEMA_URL}\",\n\tobjectType: \"human-user\",\n\tkind: \"user-schema\",\n\ttype: \"object\",\n\t\"x-identifier\": \"email\",\n\tdescription: \"The default editable schema for human users.\",\n\t\"x-auth-methods\": {\n\t\t\"password\": { \"enabled\": true },\n\t\t\"passkey\": { \"enabled\": true }\n\t},\n\trequired: [\"email\"],\n\tproperties: { \"email\": {\n\t\t\"type\": \"string\",\n\t\t\"format\": \"email\",\n\t\t\"x-unique\": \"project\",\n\t\t\"description\": \"The user's email address.\"\n\t} }\n};\n//#endregion\n//#region defaults/default-login.json\nvar default_login_default = {\n\t$schema: \"../meta/flow-definition.json\",\n\tname: \"default-login\",\n\tstatus: \"active\",\n\tuser_schema: \"human-user\",\n\tpurposes: {\n\t\t\"login\": \"identifier\",\n\t\t\"register\": \"register\"\n\t},\n\tsteps: [\n\t\t{\n\t\t\t\"name\": \"identifier\",\n\t\t\t\"fields\": [\"email\"],\n\t\t\t\"actions\": [{\n\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\"primary\": true,\n\t\t\t\t\"text_key\": \"identifier.action.continue\"\n\t\t\t}, {\n\t\t\t\t\"name\": \"register\",\n\t\t\t\t\"kind\": \"navigate\",\n\t\t\t\t\"primary\": false,\n\t\t\t\t\"text_key\": \"identifier.action.register.link\"\n\t\t\t}],\n\t\t\t\"transitions\": {\n\t\t\t\t\"submit\": { \"target\": \"password\" },\n\t\t\t\t\"user_not_found\": { \"target\": \"register\" },\n\t\t\t\t\"register\": {\n\t\t\t\t\t\"target\": \"register\",\n\t\t\t\t\t\"purpose\": \"register\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"password\",\n\t\t\t\"fields\": [\"x-auth-methods#password\"],\n\t\t\t\"actions\": [{\n\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\"primary\": true,\n\t\t\t\t\"text_key\": \"password.action.signin\"\n\t\t\t}],\n\t\t\t\"transitions\": { \"submit\": { \"target\": \"done\" } }\n\t\t},\n\t\t{\n\t\t\t\"name\": \"register\",\n\t\t\t\"fields\": [\"email\"],\n\t\t\t\"actions\": [{\n\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\"primary\": true,\n\t\t\t\t\"text_key\": \"register.action.password\"\n\t\t\t}, {\n\t\t\t\t\"name\": \"sign_in\",\n\t\t\t\t\"kind\": \"navigate\",\n\t\t\t\t\"primary\": false,\n\t\t\t\t\"text_key\": \"register.action.sign_in.link\"\n\t\t\t}],\n\t\t\t\"transitions\": {\n\t\t\t\t\"submit\": { \"target\": \"register-password\" },\n\t\t\t\t\"user_already_exists\": { \"target\": \"password\" },\n\t\t\t\t\"sign_in\": {\n\t\t\t\t\t\"target\": \"identifier\",\n\t\t\t\t\t\"purpose\": \"login\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"register-password\",\n\t\t\t\"fields\": [\"x-auth-methods#password\"],\n\t\t\t\"actions\": [{\n\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\"primary\": true,\n\t\t\t\t\"text_key\": \"register-password.action.submit\"\n\t\t\t}],\n\t\t\t\"on_success\": \"create_user\",\n\t\t\t\"transitions\": {\n\t\t\t\t\"submit\": { \"target\": \"done\" },\n\t\t\t\t\"user_already_exists\": { \"target\": \"password\" }\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"done\",\n\t\t\t\"complete\": \"show\"\n\t\t}\n\t]\n};\n//#endregion\n//#region defaults/presets/passkey-first/human-user.json\nvar human_user_default = {\n\ttitle: \"DefaultHumanUserSchema\",\n\t$schema: \"https://json-schema.org/draft/2020-12/schema\",\n\tmetaSchema: \"${SERVER_URL}/user-schema.json\",\n\t$id: \"${USER_SCHEMA_URL}\",\n\tobjectType: \"human-user\",\n\tkind: \"user-schema\",\n\ttype: \"object\",\n\t\"x-identifier\": \"email\",\n\tdescription: \"The default editable schema for human users (passkey-first sign-in).\",\n\t\"x-auth-methods\": {\n\t\t\"passkey\": { \"enabled\": true },\n\t\t\"password\": { \"enabled\": true }\n\t},\n\trequired: [\"email\"],\n\tproperties: { \"email\": {\n\t\t\"type\": \"string\",\n\t\t\"format\": \"email\",\n\t\t\"x-unique\": \"project\",\n\t\t\"description\": \"The user's email address.\"\n\t} }\n};\n//#endregion\n//#region defaults/presets/passkey-first/login.json\nvar login_default = {\n\t$schema: \"../meta/flow-definition.json\",\n\tname: \"default-login\",\n\tstatus: \"active\",\n\tuser_schema: \"human-user\",\n\tpurposes: {\n\t\t\"login\": \"passkey-first\",\n\t\t\"register\": \"register\"\n\t},\n\tsteps: [\n\t\t{\n\t\t\t\"name\": \"passkey-first\",\n\t\t\t\"fields\": [],\n\t\t\t\"actions\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"passkey\",\n\t\t\t\t\t\"kind\": \"passkey\",\n\t\t\t\t\t\"primary\": true,\n\t\t\t\t\t\"text_key\": \"passkey-first.action.passkey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"email_fallback\",\n\t\t\t\t\t\"kind\": \"navigate\",\n\t\t\t\t\t\"primary\": false,\n\t\t\t\t\t\"text_key\": \"passkey-first.action.email_fallback\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"register\",\n\t\t\t\t\t\"kind\": \"navigate\",\n\t\t\t\t\t\"primary\": false,\n\t\t\t\t\t\"text_key\": \"identifier.action.register.link\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"transitions\": {\n\t\t\t\t\"passkey\": { \"target\": \"done\" },\n\t\t\t\t\"email_fallback\": { \"target\": \"identifier\" },\n\t\t\t\t\"user_not_found\": { \"target\": \"register\" },\n\t\t\t\t\"register\": {\n\t\t\t\t\t\"target\": \"register\",\n\t\t\t\t\t\"purpose\": \"register\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"identifier\",\n\t\t\t\"fields\": [\"email\"],\n\t\t\t\"actions\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\t\"primary\": true,\n\t\t\t\t\t\"text_key\": \"identifier.action.continue\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"passkey\",\n\t\t\t\t\t\"kind\": \"passkey\",\n\t\t\t\t\t\"primary\": false,\n\t\t\t\t\t\"text_key\": \"identifier.action.passkey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"register\",\n\t\t\t\t\t\"kind\": \"navigate\",\n\t\t\t\t\t\"primary\": false,\n\t\t\t\t\t\"text_key\": \"identifier.action.register.link\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"transitions\": {\n\t\t\t\t\"submit\": { \"target\": \"password\" },\n\t\t\t\t\"passkey\": { \"target\": \"done\" },\n\t\t\t\t\"user_not_found\": { \"target\": \"register\" },\n\t\t\t\t\"register\": {\n\t\t\t\t\t\"target\": \"register\",\n\t\t\t\t\t\"purpose\": \"register\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"password\",\n\t\t\t\"fields\": [\"x-auth-methods#password\"],\n\t\t\t\"actions\": [{\n\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\"primary\": true,\n\t\t\t\t\"text_key\": \"password.action.signin\"\n\t\t\t}, {\n\t\t\t\t\"name\": \"passkey\",\n\t\t\t\t\"kind\": \"passkey\",\n\t\t\t\t\"primary\": false,\n\t\t\t\t\"text_key\": \"password.action.passkey\"\n\t\t\t}],\n\t\t\t\"transitions\": {\n\t\t\t\t\"submit\": { \"target\": \"done\" },\n\t\t\t\t\"passkey\": { \"target\": \"done\" }\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"register\",\n\t\t\t\"fields\": [\"email\"],\n\t\t\t\"actions\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"passkey_register\",\n\t\t\t\t\t\"kind\": \"passkey_register\",\n\t\t\t\t\t\"primary\": true,\n\t\t\t\t\t\"text_key\": \"register.action.passkey\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\t\"primary\": false,\n\t\t\t\t\t\"text_key\": \"register.action.password\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"sign_in\",\n\t\t\t\t\t\"kind\": \"navigate\",\n\t\t\t\t\t\"primary\": false,\n\t\t\t\t\t\"text_key\": \"register.action.sign_in.link\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"transitions\": {\n\t\t\t\t\"passkey_register\": { \"target\": \"done\" },\n\t\t\t\t\"submit\": { \"target\": \"register-password\" },\n\t\t\t\t\"user_already_exists\": { \"target\": \"password\" },\n\t\t\t\t\"sign_in\": {\n\t\t\t\t\t\"target\": \"passkey-first\",\n\t\t\t\t\t\"purpose\": \"login\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"register-password\",\n\t\t\t\"fields\": [\"x-auth-methods#password\"],\n\t\t\t\"actions\": [{\n\t\t\t\t\"name\": \"submit\",\n\t\t\t\t\"kind\": \"submit\",\n\t\t\t\t\"primary\": true,\n\t\t\t\t\"text_key\": \"register-password.action.submit\"\n\t\t\t}],\n\t\t\t\"on_success\": \"create_user\",\n\t\t\t\"transitions\": {\n\t\t\t\t\"submit\": { \"target\": \"done\" },\n\t\t\t\t\"user_already_exists\": { \"target\": \"password\" }\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"name\": \"done\",\n\t\t\t\"complete\": \"show\"\n\t\t}\n\t]\n};\n//#endregion\n//#region src/readmes.ts\n/**\n* README content the CLI copies to `.zitadel/schemas/README.md` during setup.\n* Source of truth is `packages/config/defaults/README-schemas.md`; the Go\n* server-side embed reads the same file (see `defaults.go`).\n*/\nfunction schemasReadmeContent() {\n\treturn readFileSync(readmeUrl(\"README-schemas.md\"), \"utf8\");\n}\n/**\n* README content the CLI copies to `.zitadel/flows/README.md` during setup.\n* Source of truth is `packages/config/defaults/README-flows.md`.\n*/\nfunction flowsReadmeContent() {\n\treturn readFileSync(readmeUrl(\"README-flows.md\"), \"utf8\");\n}\n/**\n* README content the CLI copies to `.zitadel/branding/README.md` when a\n* branding design is ejected. Source of truth is\n* `packages/config/defaults/README-branding.md`.\n*/\nfunction brandingReadmeContent() {\n\treturn readFileSync(readmeUrl(\"README-branding.md\"), \"utf8\");\n}\nfunction readmeUrl(filename) {\n\treturn fileURLToPath(new URL(`../defaults/${filename}`, import.meta.url));\n}\n//#endregion\n//#region src/defaults.ts\nconst DEFAULT_BUILTIN_SCHEMA_BASE = \"https://zitadel.com/schemas/v1\";\nconst DEFAULT_FLOW_SCHEMA_URI = `${DEFAULT_BUILTIN_SCHEMA_BASE}/flow-definition.json`;\nconst DEFAULT_SCHEMA_CONFIG_PATH = \".zitadel/schemas/default-human-user.json\";\nconst DEFAULT_FLOW_CONFIG_PATH = \".zitadel/flows/default-login.json\";\nconst DEFAULT_BRANDING_CONFIG_PATH = \".zitadel/branding/branding.json\";\nconst DEFAULT_BRANDING_TEMPLATE_PATH = \".zitadel/branding/login.liquid\";\n/**\n* Named schema+flow bundles `zitadel setup` can scaffold (#448: the prompt\n* fires before any `.zitadel/` file is written; each preset maps to a\n* pre-defined bundle the CLI copies on first setup). `password-first` is\n* today's default; `passkey-first` puts a passkey ceremony on the login\n* entry step with an email→password fallback path.\n*/\nconst SETUP_PRESETS = [\"password-first\", \"passkey-first\"];\nconst DEFAULT_SETUP_PRESET = \"password-first\";\nconst PRESET_TEMPLATES = {\n\t\"password-first\": {\n\t\tschema: default_human_user_default,\n\t\tflow: default_login_default\n\t},\n\t\"passkey-first\": {\n\t\tschema: human_user_default,\n\t\tflow: login_default\n\t}\n};\nfunction presetTemplates(preset) {\n\tif (!Object.hasOwn(PRESET_TEMPLATES, preset)) throw new Error(`unknown setup preset ${JSON.stringify(preset)} (known presets: ${SETUP_PRESETS.join(\", \")})`);\n\treturn PRESET_TEMPLATES[preset];\n}\n/**\n* Widget-template starting points `zitadel branding eject --design <name>`\n* scaffolds into `.zitadel/branding/` (setup never does, #1039). Only\n* widget structure belongs here: `centered` is the bundled default card and\n* `minimal` the same form without card chrome. Page layouts (the former\n* `split`, `split-right`, `hero`) were page chrome and live in the embedding\n* application instead; revisions already published from them keep rendering\n* (see docs/design/branding/customization-strategy.md). Add a design here\n* only when it changes the widget's structure, not the page around it.\n*/\nconst BRANDING_DESIGNS = [\"centered\", \"minimal\"];\nconst DEFAULT_BRANDING_DESIGN = \"centered\";\n/**\n* Descriptor `layout` each design's `branding.json` carries. Both shipped\n* designs are widget structure and carry `centered`; the wire enum still has\n* `split` for revisions published from the retired page-layout designs\n* (#1039), which no catalog entry produces any more.\n*/\nconst DESIGN_LAYOUTS = {\n\tcentered: \"centered\",\n\tminimal: \"centered\"\n};\n/**\n* Renders the scaffold files for a branding design. The `centered` template\n* is a drift-tested copy of the bundled default in `@zitadel/components`;\n* `minimal` is an authored variant of it.\n*/\nfunction getDefaultBrandingConfig(design = DEFAULT_BRANDING_DESIGN) {\n\tif (!Object.hasOwn(DESIGN_LAYOUTS, design)) throw new Error(`unknown branding design ${JSON.stringify(design)} (known designs: ${BRANDING_DESIGNS.join(\", \")})`);\n\tconst known = design;\n\treturn {\n\t\tbranding: {\n\t\t\tlayout: DESIGN_LAYOUTS[known],\n\t\t\tliquid_template: { $file: \"./login.liquid\" }\n\t\t},\n\t\ttemplate: readFileSync(packageFilePath(`../defaults/branding/${known}/login.liquid`), \"utf8\")\n\t};\n}\n/**\n* Resolves a package-relative file to a real filesystem path. Vite-driven\n* runtimes (vitest in dependent packages) rewrite `import.meta.url` to a\n* `/@fs/...` URL, which `fileURLToPath` passes through verbatim — strip the\n* prefix so `readFileSync` gets an actual path.\n*/\nfunction packageFilePath(relative) {\n\tconst path = fileURLToPath(new URL(relative, import.meta.url));\n\treturn path.startsWith(\"/@fs/\") ? path.slice(4) : path;\n}\n/**\n* The second setup axis (#448): *who* signs in, orthogonal to the sign-in\n* preset (*how* they sign in). The sign-in preset owns the flow shape and\n* auth methods; the use case owns which profile fields the schema collects.\n* Composing the two keeps us at one field catalog + one flow-per-preset\n* instead of a bundle per (use case × preset) pair. `minimal` is the\n* default and never blocks non-interactive runs.\n*/\nconst SETUP_USE_CASES = [\n\t\"minimal\",\n\t\"consumer\",\n\t\"business\"\n];\nconst DEFAULT_SETUP_USE_CASE = \"minimal\";\n/**\n* Fields each use case collects, in register/display order. `email` is\n* always first and stays the only required property; the rest are optional\n* profile attributes gathered on the flow's register step. `givenName`/\n* `familyName` are the attributes the backend reads for a user's identity\n* (`internal/domain/user.go`); `companyName` is stored as a plain user\n* attribute today — there is no org/team model behind it yet.\n*/\nconst USE_CASE_FIELDS = {\n\tminimal: [\"email\"],\n\tconsumer: [\n\t\t\"email\",\n\t\t\"givenName\",\n\t\t\"familyName\"\n\t],\n\tbusiness: [\n\t\t\"email\",\n\t\t\"givenName\",\n\t\t\"familyName\",\n\t\t\"companyName\"\n\t]\n};\n/**\n* JSON-Schema bodies for the optional profile fields the CLI composes in per\n* use case. The shipped templates are an email-only baseline (shared verbatim\n* with the Go server fallback), so this catalog owns every field beyond\n* `email`. Authored in the templates' style — no `x-claim`, since the backend\n* maps identity by attribute name and the user-property meta-schema defines no\n* claim keyword. `givenName`/`familyName` are the attributes the backend reads\n* for a user's identity (`internal/domain/user.go`).\n*/\nconst EXTRA_FIELD_BODIES = {\n\tgivenName: {\n\t\ttype: \"string\",\n\t\tmaxLength: 50,\n\t\tdescription: \"The user's given (first) name.\"\n\t},\n\tfamilyName: {\n\t\ttype: \"string\",\n\t\tmaxLength: 50,\n\t\tdescription: \"The user's family (last) name.\"\n\t},\n\tcompanyName: {\n\t\ttype: \"string\",\n\t\tmaxLength: 200,\n\t\tdescription: \"The user's company name.\"\n\t}\n};\nfunction useCaseFields(useCase) {\n\tif (!Object.hasOwn(USE_CASE_FIELDS, useCase)) throw new Error(`unknown setup use case ${JSON.stringify(useCase)} (known use cases: ${SETUP_USE_CASES.join(\", \")})`);\n\treturn USE_CASE_FIELDS[useCase];\n}\n/**\n* The body for one use-case field: reuse the template's authored body when it\n* has one (so composed schemas match the shipped defaults for shared fields),\n* else the extra catalog, else a generic editable string so composition stays\n* total for any field a future use case introduces.\n*/\nfunction fieldBody(field, templateProps) {\n\tif (Object.hasOwn(templateProps, field)) return { ...templateProps[field] };\n\tif (Object.hasOwn(EXTRA_FIELD_BODIES, field)) return { ...EXTRA_FIELD_BODIES[field] };\n\treturn {\n\t\ttype: \"string\",\n\t\tdescription: `The user's ${field}.`\n\t};\n}\n/**\n* Narrow a rendered schema to the chosen use case: keep the preset-owned\n* header and `x-auth-methods`, but replace `properties`/`required` with the\n* use case's field set. `email` is the sole required property.\n*/\nfunction applyUseCaseToSchema(schema, useCase) {\n\tconst templateProps = schema.properties ?? {};\n\tconst properties = {};\n\tfor (const field of useCaseFields(useCase)) properties[field] = fieldBody(field, templateProps);\n\treturn {\n\t\t...schema,\n\t\trequired: [\"email\"],\n\t\tproperties\n\t};\n}\n/**\n* Derive the flow's register-step fields from the use case rather than\n* copying a hard-coded list into every bundle (#448): the register step\n* collects exactly what the schema defines. Other steps are untouched.\n*/\nfunction applyUseCaseToFlow(flow, useCase) {\n\tconst fields = [...useCaseFields(useCase)];\n\tconst steps = flow.steps.map((step) => step.name === \"register\" ? {\n\t\t...step,\n\t\tfields\n\t} : step);\n\treturn {\n\t\t...flow,\n\t\tsteps\n\t};\n}\nfunction defaultHumanUserSchemaUrl(builtinSchemaBase = DEFAULT_BUILTIN_SCHEMA_BASE) {\n\treturn `${trimTrailingSlash(builtinSchemaBase)}/default-human-user.json`;\n}\nfunction getDefaultHumanUserSchema(options = {}) {\n\tconst builtinSchemaBase = trimTrailingSlash(options.builtinSchemaBase ?? \"https://zitadel.com/schemas/v1\");\n\treturn applyUseCaseToSchema(renderTemplate(presetTemplates(options.preset ?? \"password-first\").schema, {\n\t\tSERVER_URL: builtinSchemaBase,\n\t\tUSER_SCHEMA_URL: options.userSchemaUrl ?? defaultHumanUserSchemaUrl(builtinSchemaBase)\n\t}), options.useCase ?? \"minimal\");\n}\nfunction getDefaultLoginFlow(options = {}) {\n\tconst builtinSchemaBase = trimTrailingSlash(options.builtinSchemaBase ?? \"https://zitadel.com/schemas/v1\");\n\treturn applyUseCaseToFlow(renderTemplate(presetTemplates(options.preset ?? \"password-first\").flow, { SERVER_URL: builtinSchemaBase }), options.useCase ?? \"minimal\");\n}\nfunction renderTemplate(value, replacements) {\n\tif (Array.isArray(value)) return value.map((item) => renderTemplate(item, replacements));\n\tif (value !== null && typeof value === \"object\") return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, renderTemplate(item, replacements)]));\n\tif (typeof value === \"string\") return value.replaceAll(/\\$\\{([A-Z_]+)\\}/g, (match, name) => {\n\t\treturn replacements[name] ?? match;\n\t});\n\treturn value;\n}\nfunction trimTrailingSlash(value) {\n\tlet trimmed = value;\n\twhile (trimmed.endsWith(\"/\")) trimmed = trimmed.slice(0, -1);\n\treturn trimmed;\n}\n//#endregion\nexport { brandingReadmeContent as _, DEFAULT_BUILTIN_SCHEMA_BASE as a, DEFAULT_SCHEMA_CONFIG_PATH as c, SETUP_PRESETS as d, SETUP_USE_CASES as f, getDefaultLoginFlow as g, getDefaultHumanUserSchema as h, DEFAULT_BRANDING_TEMPLATE_PATH as i, DEFAULT_SETUP_PRESET as l, getDefaultBrandingConfig as m, DEFAULT_BRANDING_CONFIG_PATH as n, DEFAULT_FLOW_CONFIG_PATH as o, defaultHumanUserSchemaUrl as p, DEFAULT_BRANDING_DESIGN as r, DEFAULT_FLOW_SCHEMA_URI as s, BRANDING_DESIGNS as t, DEFAULT_SETUP_USE_CASE as u, flowsReadmeContent as v, schemasReadmeContent as y };\n\n//# sourceMappingURL=defaults-B3SfaQPb.mjs.map","import { createZitadelClient, type ZitadelClient } from \"@zitadel/api/client\";\nimport {\n DEFAULT_FLOW_SCHEMA_URI,\n getDefaultHumanUserSchema,\n getDefaultLoginFlow,\n type SetupPreset,\n type SetupUseCase,\n} from \"@zitadel/config/defaults\";\n\nexport interface BootstrapProjectOptions {\n baseUrl: string;\n projectName?: string;\n /**\n * Origins of the apps that will proxy to this instance. The backend's\n * origin check rejects forwarded requests from unregistered origins.\n */\n appOrigins?: string[];\n preset?: SetupPreset;\n useCase?: SetupUseCase;\n}\n\nexport interface BootstrappedProject {\n projectId: string;\n projectSecret: string;\n previewSecret?: string;\n schemaId: string;\n flowId: string;\n}\n\nconst DEFAULT_PROJECT_NAME = \"zitadel-testing\";\n\n/**\n * Server-side half of `zitadel setup`, without any file scaffolding:\n * `POST /projects` is unauthenticated and mints the projectSecret used as the\n * bearer for everything else; the schema is uploaded without `$id` so the\n * server assigns an opaque id, which the flow must then reference.\n */\nexport async function bootstrapProject(\n options: BootstrapProjectOptions,\n): Promise<BootstrappedProject> {\n const { baseUrl } = options;\n const unauthenticated = createZitadelClient({ baseUrl });\n const project = (await unauthenticated.createProject({\n name: options.projectName ?? DEFAULT_PROJECT_NAME,\n origins: (options.appOrigins ?? []).map((pattern) => ({\n pattern,\n kind: \"preview\" as const,\n })),\n seed_defaults: false,\n } as Parameters<ZitadelClient[\"createProject\"]>[0])) as Record<string, unknown>;\n const projectId = requireString(project.id, \"project id\");\n const projectSecret = requireString(project.project_secret, \"project secret\");\n const previewSecret =\n typeof project.preview_secret === \"string\" ? project.preview_secret : undefined;\n\n const client = createZitadelClient({ baseUrl, token: projectSecret });\n\n const { $id: _templateId, ...schemaBody } = getDefaultHumanUserSchema({\n preset: options.preset,\n useCase: options.useCase,\n }) as { $id?: string } & Record<string, unknown>;\n void _templateId;\n const schema = (await client.createSchema(\n schemaBody as Parameters<ZitadelClient[\"createSchema\"]>[0],\n { project_id: projectId },\n )) as Record<string, unknown>;\n const schemaId = requireString(schema.id, \"schema id\");\n\n const flowBody = getDefaultLoginFlow({\n preset: options.preset,\n useCase: options.useCase,\n });\n const flow = (await client.createFlowDefinition({\n project_id: projectId,\n schema_uri: DEFAULT_FLOW_SCHEMA_URI,\n flow_definition: flowBody,\n } as Parameters<ZitadelClient[\"createFlowDefinition\"]>[0])) as Record<string, unknown>;\n const flowId = requireString(flow.id, \"flow definition id\");\n\n return { projectId, projectSecret, previewSecret, schemaId, flowId };\n}\n\nexport function requireString(value: unknown, label: string): string {\n if (typeof value === \"string\" && value.length > 0) {\n return value;\n }\n throw new Error(`Missing ${label} in server response.`);\n}\n","import { spawn } from \"node:child_process\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\n\nexport interface RunCliOptions {\n args: string[];\n env?: NodeJS.ProcessEnv;\n /** Test seam / escape hatch: alternative CLI entry script. */\n bin?: string;\n timeoutMs?: number;\n}\n\nexport interface RunCliResult {\n exitCode: number;\n stdout: string;\n stderr: string;\n}\n\nconst DEFAULT_TIMEOUT_MS = 120_000;\n\nexport function resolveCliBin(): string {\n const require = createRequire(import.meta.url);\n const pkgPath = require.resolve(\"@zitadel/cli/package.json\");\n const pkg = require(pkgPath) as { bin?: Record<string, string> };\n const rel = pkg.bin?.zitadel;\n if (!rel) {\n throw new Error(\"@zitadel/cli does not declare a `zitadel` bin entry\");\n }\n return join(dirname(pkgPath), rel);\n}\n\nexport function runCli(options: RunCliOptions): Promise<RunCliResult> {\n const bin = options.bin ?? resolveCliBin();\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n return new Promise((resolve, reject) => {\n const child = spawn(process.execPath, [bin, ...options.args], {\n env: { ...process.env, ...options.env },\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n let stdout = \"\";\n let stderr = \"\";\n child.stdout.setEncoding(\"utf8\");\n child.stdout.on(\"data\", (chunk: string) => {\n stdout += chunk;\n });\n child.stderr.setEncoding(\"utf8\");\n child.stderr.on(\"data\", (chunk: string) => {\n stderr += chunk;\n });\n const timer = setTimeout(() => {\n child.kill(\"SIGKILL\");\n reject(\n new Error(\n `zitadel ${options.args[0] ?? \"\"} timed out after ${timeoutMs}ms\\n${tail(stderr)}`,\n ),\n );\n }, timeoutMs);\n timer.unref();\n child.on(\"error\", (error) => {\n clearTimeout(timer);\n reject(error);\n });\n child.on(\"close\", (code) => {\n clearTimeout(timer);\n resolve({ exitCode: code ?? -1, stdout, stderr });\n });\n });\n}\n\nexport function tail(text: string, lines = 20): string {\n return text.split(\"\\n\").slice(-lines).join(\"\\n\").trim();\n}\n","export interface CliEnvelope<TData> {\n cli_version?: string;\n command?: string;\n source?: string;\n status: string;\n data: TData;\n warnings?: string[];\n /** Error envelopes (`status: \"error\"`) carry remediation guidance. */\n code?: string;\n message?: string;\n hint?: string;\n next_commands?: string[];\n}\n\n/**\n * Render an error envelope's remediation fields for humans — the CLI's\n * `hint`/`next_commands` are the actionable part of a failure (e.g. \"Reinstall\n * @zitadel/cli so npm can install @zitadel/server\"), so surface them instead\n * of a raw stdout dump. Returns undefined when the envelope has no message.\n */\nexport function describeEnvelopeError(envelope: CliEnvelope<unknown>): string | undefined {\n if (typeof envelope.message !== \"string\" || envelope.message.length === 0) {\n return undefined;\n }\n const lines = [envelope.code ? `${envelope.code}: ${envelope.message}` : envelope.message];\n if (envelope.hint) {\n lines.push(`hint: ${envelope.hint}`);\n }\n if (envelope.next_commands && envelope.next_commands.length > 0) {\n lines.push(`next: ${envelope.next_commands.join(\" | \")}`);\n }\n return lines.join(\"\\n\");\n}\n\nexport interface StartEnvelopeData {\n runtime: {\n backend: string;\n pid: number;\n port: number;\n data_dir: string;\n log_path: string;\n };\n urls: {\n api: string;\n console: string;\n login: string;\n };\n}\n\nexport function parseCliEnvelope<TData>(stdout: string, context: string): CliEnvelope<TData> {\n const start = stdout.indexOf(\"{\");\n const end = stdout.lastIndexOf(\"}\");\n if (start === -1 || end <= start) {\n throw new Error(\n `${context}: expected a JSON envelope on stdout, got:\\n${stdout.trim() || \"(empty)\"}`,\n );\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(stdout.slice(start, end + 1));\n } catch (error) {\n throw new Error(\n `${context}: failed to parse JSON envelope: ${(error as Error).message}\\n${stdout.trim()}`,\n { cause: error },\n );\n }\n if (\n typeof parsed !== \"object\" ||\n parsed === null ||\n typeof (parsed as { status?: unknown }).status !== \"string\"\n ) {\n throw new Error(`${context}: stdout JSON is not a CLI envelope:\\n${stdout.trim()}`);\n }\n return parsed as CliEnvelope<TData>;\n}\n","import { createServer } from \"node:net\";\n\n/**\n * Ask the OS for a free TCP port. The port is released before returning, so a\n * racing process could grab it; the CLI's own preflight surfaces that as\n * E_PORT_IN_USE, which is loud rather than corrupting.\n */\nexport function getFreePort(): Promise<number> {\n return new Promise((resolve, reject) => {\n const server = createServer();\n server.unref();\n server.on(\"error\", reject);\n server.listen(0, \"127.0.0.1\", () => {\n const address = server.address();\n if (address === null || typeof address === \"string\") {\n server.close();\n reject(new Error(\"could not determine a free port\"));\n return;\n }\n const { port } = address;\n server.close((err) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(port);\n });\n });\n });\n}\n","import { mkdtemp, rm } from \"node:fs/promises\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\n\nimport { runCli, tail, type RunCliResult } from \"./cli\";\nimport {\n describeEnvelopeError,\n parseCliEnvelope,\n type CliEnvelope,\n type StartEnvelopeData,\n} from \"./envelope\";\nimport { getFreePort } from \"./ports\";\nimport type { LocalZitadelRuntime } from \"./types\";\n\nexport interface BootServerOptions {\n /** TCP port for the instance; defaults to an OS-assigned free port. */\n port?: number;\n /**\n * State directory. Defaults to a fresh temp dir that is removed on stop;\n * a caller-provided dir is never removed.\n */\n dir?: string;\n /** Forwarded as ZITADEL_SERVER_BINARY (in-repo runs use dist/server/nextgen). */\n serverBinary?: string;\n /** Keep the owned temp dir after stop (debugging). */\n keep?: boolean;\n /** Test seam: alternative CLI entry script. */\n cliBin?: string;\n timeoutMs?: number;\n}\n\nexport interface BootedServer {\n baseUrl: string;\n runtime: LocalZitadelRuntime;\n stop(): Promise<void>;\n}\n\n/**\n * Boot an ephemeral local server by shelling out to `zitadel start` and parse\n * its JSON envelope. The CLI owns the subtle parts (port preflight, health\n * wait, process-group stop), so this module stays a thin adapter; swapping it\n * for direct library calls later must not change the shape returned here.\n */\nexport async function bootLocalServer(options: BootServerOptions = {}): Promise<BootedServer> {\n const ownsDir = options.dir === undefined;\n const dir = options.dir ?? (await mkdtemp(join(tmpdir(), \"zitadel-testing-\")));\n const port = options.port ?? (await getFreePort());\n const env: NodeJS.ProcessEnv = {};\n if (options.serverBinary) {\n env.ZITADEL_SERVER_BINARY = options.serverBinary;\n }\n\n const result = await runCli({\n args: [\"start\", \"--port\", String(port), \"--non-interactive\", \"--json\", \"-c\", dir],\n bin: options.cliBin,\n env,\n timeoutMs: options.timeoutMs,\n });\n if (result.exitCode !== 0) {\n // Keep the dir on failure: server.log inside it is the diagnostic.\n throw new Error(\n `zitadel start exited with code ${result.exitCode}.\\n` +\n `${failureDetail(result)}\\n` +\n `state dir kept for inspection: ${dir}`,\n );\n }\n const stopViaCli = async (): Promise<void> => {\n const stopResult = await runCli({\n args: [\"stop\", \"--non-interactive\", \"--json\", \"-c\", dir],\n bin: options.cliBin,\n env,\n timeoutMs: options.timeoutMs,\n });\n if (stopResult.exitCode !== 0) {\n throw new Error(\n `zitadel stop exited with code ${stopResult.exitCode}.\\n` +\n `${failureDetail(stopResult)}\\n` +\n `state dir kept for inspection: ${dir}`,\n );\n }\n };\n\n let envelope: CliEnvelope<StartEnvelopeData>;\n try {\n envelope = parseCliEnvelope<StartEnvelopeData>(result.stdout, \"zitadel start\");\n if (envelope.status !== \"ok\") {\n throw new Error(\n `zitadel start reported status \"${envelope.status}\":\\n` +\n `${describeEnvelopeError(envelope) ?? tail(result.stdout)}`,\n );\n }\n } catch (error) {\n const startError = new Error(\n `zitadel start produced unusable output.\\n` +\n `reason: ${error instanceof Error ? error.message : String(error)}\\n` +\n `stdout: ${tail(result.stdout) || \"(empty)\"}\\n` +\n `stderr: ${tail(result.stderr) || \"(empty)\"}\\n` +\n `state dir kept for inspection: ${dir}`,\n { cause: error },\n );\n // start exited 0, so a server may well be running despite the unusable\n // output — stop it instead of orphaning it.\n try {\n await stopViaCli();\n } catch (stopError) {\n // Both errors are preserved in AggregateError.errors, which the rule\n // below cannot model.\n throw new AggregateError(\n [startError, stopError],\n `${startError.message}\\nStopping the possibly-running instance also failed: ${\n stopError instanceof Error ? stopError.message : String(stopError)\n }`,\n );\n }\n throw startError;\n }\n\n const { runtime, urls } = envelope.data;\n const runStop = async (): Promise<void> => {\n await stopViaCli();\n if (ownsDir && !options.keep) {\n await rm(dir, { recursive: true, force: true });\n }\n };\n // Memoize the in-flight stop so concurrent callers await the same cleanup,\n // and reset on failure so a failed stop can be retried instead of silently\n // leaving the server behind.\n let stopPromise: Promise<void> | undefined;\n const stop = (): Promise<void> => {\n stopPromise ??= runStop().catch((error: unknown) => {\n stopPromise = undefined;\n throw error;\n });\n return stopPromise;\n };\n\n return {\n baseUrl: urls.api,\n runtime: {\n port: runtime.port,\n pid: runtime.pid,\n dir,\n logPath: runtime.log_path,\n },\n stop,\n };\n}\n\n/**\n * A failed CLI run usually still prints an error envelope; its\n * message/hint/next_commands beat raw output tails (e.g. a fresh install\n * missing @zitadel/server gets \"Reinstall @zitadel/cli\" instead of a stack).\n */\nfunction failureDetail(result: RunCliResult): string {\n try {\n const described = describeEnvelopeError(parseCliEnvelope<unknown>(result.stdout, \"zitadel\"));\n if (described) {\n return described;\n }\n } catch {\n // stdout carried no envelope; fall back to the raw tails.\n }\n return `stdout: ${tail(result.stdout) || \"(empty)\"}\\nstderr: ${tail(result.stderr) || \"(empty)\"}`;\n}\n","import { randomUUID } from \"node:crypto\";\n\nimport type { ZitadelClient } from \"@zitadel/api/client\";\n\nimport { requireString } from \"./bootstrap\";\nimport type { Identity, SeededUser, SeedUserInput, SeedUsersTemplate } from \"./types\";\n\nexport interface SeedContext {\n projectId: string;\n schemaId: string;\n}\n\n/**\n * A unique unused email + password. Nothing is created on the instance —\n * this is the input for registration-flow specs, which must prove the flow\n * creates the user. It needs no instance either, so both entry points export\n * it for specs that run without `withZitadel()`; `seed.identity()` and\n * `zitadel.identity()` call this function.\n */\nexport function identity(): Identity {\n return {\n email: `e2e-${randomUUID().slice(0, 8)}@example.com`,\n password: `Pw!${randomUUID()}`,\n };\n}\n\n/**\n * Create a user that can immediately complete the password login flow:\n * `POST /users` (the body carries `schema: <schema id>` and the schema-defined\n * content under `attributes`) followed by `PUT /users/{id}/password`.\n *\n * Defaults mint a unique email per call (email is x-unique per project), which\n * is what makes per-test seeding parallel-safe on a shared instance.\n */\nexport async function seedUser(\n client: ZitadelClient,\n context: SeedContext,\n input: SeedUserInput = {},\n): Promise<SeededUser> {\n const fresh = identity();\n const email = input.email ?? fresh.email;\n const password = input.password ?? fresh.password;\n // `email` wins over the templated attributes: the returned SeededUser must\n // never disagree with what was actually created, since a silently overridden\n // email would yield credentials that cannot log in.\n const user = (await client.createUser(\n {\n schema: context.schemaId,\n attributes: { ...input.attributes, email },\n },\n { project_id: context.projectId },\n )) as Record<string, unknown>;\n const id = requireString(user.id, \"user id\");\n await client.setUserPassword(id, { password });\n return { id, email, password };\n}\n\n/**\n * Seed `count` users sequentially. The template makes fixture data\n * deterministic per index (stable emails/names keep screenshot diffs about\n * code, not reshuffled data — the `console:dev-real` pattern); untemplated\n * fields fall back to the unique defaults. Name-like attributes need a\n * schema that declares them (`useCase: \"consumer\"` or wider).\n */\nexport async function seedUsers(\n client: ZitadelClient,\n context: SeedContext,\n count: number,\n template: SeedUsersTemplate = {},\n): Promise<SeededUser[]> {\n const users: SeededUser[] = [];\n for (let index = 0; index < count; index += 1) {\n users.push(\n await seedUser(client, context, {\n email: template.email?.(index),\n password: template.password?.(index),\n attributes: template.attributes?.(index),\n }),\n );\n }\n return users;\n}\n","import type { ZitadelClient } from \"@zitadel/api/client\";\nimport type { CreateFlow201, CreateFlow201StepFieldsItem } from \"@zitadel/api/generated/model\";\n\nimport type { SeedContext } from \"./seed\";\nimport type { InstanceHandle, MintedSession, SeededUser } from \"./types\";\n\n/**\n * Mirrors the server's session cookie (internal/api/session.go): the name a\n * direct call to the server sends, and the one an app keeps behind a proxy that\n * passes the server's cookie through, such as an SPA's in production.\n */\nexport const SESSION_COOKIE_NAME = \"__nextgen_session\";\n\n/**\n * The cookie an app keeps its session in on its own origin behind a server SDK\n * (Next.js, Nuxt, SvelteKit, SolidStart, TanStack Start, Qwik Router) or the dev\n * proxy `zitadel setup` writes for an SPA: `__nextgen_session_<projectId>`. The\n * proxy renames the server's cookie, so the apps and the Console on one host\n * keep a session each (ADR 073).\n *\n * Mirrors `sessionCookieName` in `@zitadel/sdk-core`, including the\n * percent-encoding of every byte outside `[A-Za-z0-9_-]`.\n */\nexport function sessionCookieName(projectId: string): string {\n let name = `${SESSION_COOKIE_NAME}_`;\n for (const byte of new TextEncoder().encode(projectId)) {\n const char = String.fromCharCode(byte);\n name += /[A-Za-z0-9_-]/.test(char)\n ? char\n : `%${byte.toString(16).toUpperCase().padStart(2, \"0\")}`;\n }\n return name;\n}\n\nconst MAX_FLOW_STEPS = 6;\n\nexport interface MintSessionOptions {\n /** Forwarded to `POST /flow`; the project's default flow when omitted. */\n flowDefinitionName?: string;\n /** Origin header for flow calls (the project's origin check enforces it). */\n origin?: string;\n}\n\n/**\n * Drive the real login flow headlessly for a seeded password user and\n * exchange the terminal handoff for a session: exactly what `<zitadel-login>`\n * does, minus the rendering. Supports flows whose steps only ask for the\n * user's email and password (the shipped `password-first` presets); any step\n * demanding more — a challenge, an unknown field — fails loudly by design.\n *\n * Flow calls use raw fetch instead of the typed client because the flow is\n * stateless through the sealed `_zflow` cookie (internal/api/flow.go): every\n * response re-seals the flow state into Set-Cookie, and submits are rejected\n * without it. Browsers round-trip it implicitly; here a one-cookie jar does.\n */\nexport async function mintSession(\n client: ZitadelClient,\n handle: Pick<InstanceHandle, \"baseUrl\" | \"projectSecret\">,\n context: SeedContext,\n user: SeededUser,\n options: MintSessionOptions = {},\n): Promise<MintedSession> {\n const values: Record<string, string> = { email: user.email, password: user.password };\n const jar = new FlowCookieJar();\n const origin = options.origin;\n\n let response = await flowFetch(handle, jar, origin, \"/flow\", {\n project_id: context.projectId,\n purpose: \"login\",\n ...(options.flowDefinitionName ? { flow_definition_name: options.flowDefinitionName } : {}),\n });\n\n for (let hop = 0; hop < MAX_FLOW_STEPS; hop += 1) {\n if (response.handoff_token) {\n const exchanged = await client.exchangeHandoff(\n { handoff_token: response.handoff_token },\n { project_id: context.projectId },\n );\n return {\n user,\n sessionToken: exchanged.session_token,\n expiresAt: exchanged.session.expires_at,\n cookie: {\n name: SESSION_COOKIE_NAME,\n value: exchanged.session_token,\n httpOnly: true,\n secure: true,\n sameSite: \"Lax\",\n path: \"/\",\n },\n };\n }\n response = await flowFetch(\n handle,\n jar,\n origin,\n `/flow/${encodeURIComponent(response.id)}/submit`,\n {\n session_token: response.session_token,\n action: \"submit\",\n fields: collectFields(response, values),\n },\n );\n }\n\n throw new Error(\n `seed.session: flow did not complete within ${MAX_FLOW_STEPS} steps ` +\n `(last step: ${describeStep(response)}).`,\n );\n}\n\n/** One-cookie jar for the sealed `_zflow` flow-state cookie. */\nclass FlowCookieJar {\n private cookie: string | undefined;\n\n absorb(response: Response): void {\n for (const raw of response.headers.getSetCookie()) {\n const [pair] = raw.split(\";\", 1);\n if (pair?.startsWith(\"_zflow=\")) {\n this.cookie = pair;\n }\n }\n }\n\n header(): Record<string, string> {\n return this.cookie ? { cookie: this.cookie } : {};\n }\n}\n\nasync function flowFetch(\n handle: Pick<InstanceHandle, \"baseUrl\" | \"projectSecret\">,\n jar: FlowCookieJar,\n origin: string | undefined,\n path: string,\n body: Record<string, unknown>,\n): Promise<CreateFlow201> {\n const response = await fetch(`${handle.baseUrl}${path}`, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n authorization: `Bearer ${handle.projectSecret}`,\n // The project's origin allowlist applies to flow calls; send the app\n // origin the way a browser request through the app would carry it.\n ...(origin ? { origin } : {}),\n ...jar.header(),\n },\n body: JSON.stringify(body),\n });\n jar.absorb(response);\n const parsed = (await response.json().catch(() => undefined)) as CreateFlow201 | undefined;\n if (!response.ok || !parsed) {\n const detail = parsed && typeof parsed === \"object\" ? ` — ${JSON.stringify(parsed)}` : \"\";\n // An origin-allowlist rejection without an Origin header is a\n // configuration gap, not a flow problem — say how to close it. (No eager\n // check: a project with an empty allowlist may accept originless calls.)\n const hint =\n !origin && /origin/i.test(detail)\n ? \"\\nNo Origin header was sent: pass `origin` to seedSession() (the Playwright \" +\n \"fixtures pass the suite's baseURL) or `appOrigins` to startLocalZitadel().\"\n : \"\";\n throw new Error(`seed.session: POST ${path} returned ${response.status}${detail}${hint}`);\n }\n return parsed;\n}\n\n/**\n * Fill exactly the fields the current step declares — the orchestrator's\n * convention — from the known email/password values. An unknown required\n * field means this flow needs more than a password login can provide.\n */\nfunction collectFields(\n response: CreateFlow201,\n values: Record<string, string>,\n): Record<string, string> {\n const fields: Record<string, string> = {};\n for (const field of response.step.fields ?? []) {\n const value = values[fieldKey(field)];\n if (value === undefined) {\n throw new Error(\n `seed.session supports password flows only; step ${describeStep(response)} ` +\n `declares field \"${field.name}\", which the kit cannot fill. ` +\n `Log in through the UI for flows with additional factors.`,\n );\n }\n fields[field.name] = value;\n }\n return fields;\n}\n\n/**\n * Steps name credential fields with schema pointers (e.g.\n * `x-auth-methods#password`); match on the trailing segment so the value map\n * stays the plain `{ email, password }` a caller thinks in.\n */\nfunction fieldKey(field: CreateFlow201StepFieldsItem): string {\n const name = field.name;\n const tail = name.split(/[#/.]/).at(-1) ?? name;\n return tail.toLowerCase();\n}\n\nfunction describeStep(response: CreateFlow201): string {\n const name = response.step.name ?? \"(unnamed)\";\n const declared = (response.step.fields ?? []).map((field) => field.name).join(\", \");\n return `\"${name}\"${declared ? ` [fields: ${declared}]` : \"\"}`;\n}\n","import { createZitadelClient } from \"@zitadel/api/client\";\n\nimport { applyAppEnvTemplate, nextAppEnv } from \"./app-env\";\nimport { bootstrapProject, type BootstrapProjectOptions } from \"./bootstrap\";\nimport { bootLocalServer, type BootServerOptions } from \"./lifecycle\";\nimport { identity, seedUser, seedUsers } from \"./seed\";\nimport { mintSession } from \"./session\";\nimport type { ConnectedZitadel, InstanceHandle, LocalZitadel } from \"./types\";\n\nexport type StartLocalZitadelOptions = BootServerOptions & Omit<BootstrapProjectOptions, \"baseUrl\">;\n\n/**\n * Attach to an already-bootstrapped instance/project. Lifecycle-free on\n * purpose: this is the entry point for Playwright workers (via the handshake\n * file) and, later, for seeding remote instances.\n */\nexport function connectZitadel(handle: InstanceHandle): ConnectedZitadel {\n const api = createZitadelClient({ baseUrl: handle.baseUrl, token: handle.projectSecret });\n const context = { projectId: handle.projectId, schemaId: handle.schemaId };\n const connected: ConnectedZitadel = {\n handle,\n api,\n // The Next-shaped convenience view; other frameworks apply their own\n // template to `handle` (see AppEnvTemplate).\n appEnv: applyAppEnvTemplate(nextAppEnv, handle),\n seedUser: (input) => seedUser(api, context, input),\n seedUsers: (count, template) => seedUsers(api, context, count, template),\n identity,\n seedSession: async (input = {}) => {\n const { user: existing, flowDefinitionName, origin, ...userInput } = input;\n const user = existing ?? (await seedUser(api, context, userInput));\n return mintSession(api, handle, context, user, {\n flowDefinitionName,\n origin: origin ?? handle.appOrigin,\n });\n },\n };\n return connected;\n}\n\n/**\n * Boot an ephemeral local instance (binary runtime + SQLite by default, no\n * Docker) and bootstrap a project + default schema + login flow on it. The\n * result can seed loginable password users immediately.\n */\nexport async function startLocalZitadel(\n options: StartLocalZitadelOptions = {},\n): Promise<LocalZitadel> {\n const server = await bootLocalServer(options);\n let bootstrapped: Awaited<ReturnType<typeof bootstrapProject>>;\n try {\n bootstrapped = await bootstrapProject({\n baseUrl: server.baseUrl,\n projectName: options.projectName,\n appOrigins: options.appOrigins,\n preset: options.preset,\n useCase: options.useCase,\n });\n } catch (error) {\n try {\n await server.stop();\n } catch (stopError) {\n // Both errors are preserved in AggregateError.errors, which the rule\n // below cannot model.\n throw new AggregateError(\n [error, stopError],\n \"bootstrap failed, and stopping the booted instance also failed\",\n );\n }\n throw error;\n }\n const handle: InstanceHandle = {\n baseUrl: server.baseUrl,\n projectId: bootstrapped.projectId,\n projectSecret: bootstrapped.projectSecret,\n schemaId: bootstrapped.schemaId,\n previewSecret: bootstrapped.previewSecret,\n appOrigin: options.appOrigins?.[0],\n };\n return {\n ...connectZitadel(handle),\n runtime: server.runtime,\n stop: server.stop,\n [Symbol.asyncDispose]: server.stop,\n };\n}\n\nexport { applyAppEnvTemplate, nextAppEnv } from \"./app-env\";\nexport type { AppEnvTemplate } from \"./app-env\";\nexport { bootstrapProject } from \"./bootstrap\";\nexport type { BootstrapProjectOptions, BootstrappedProject } from \"./bootstrap\";\nexport { readHandshakeSync, waitForHandshake, writeHandshake } from \"./handshake\";\nexport { bootLocalServer } from \"./lifecycle\";\nexport type { BootedServer, BootServerOptions } from \"./lifecycle\";\nexport { identity } from \"./seed\";\nexport { SESSION_COOKIE_NAME, sessionCookieName } from \"./session\";\nexport type {\n ConnectedZitadel,\n Identity,\n InstanceHandle,\n LocalZitadel,\n LocalZitadelRuntime,\n MintedSession,\n PlatformCredentials,\n SeededUser,\n SeedSessionInput,\n SeedUserInput,\n SeedUsersTemplate,\n SessionCookie,\n} from \"./types\";\n"],"mappings":";;;;;;;;;;;AACA,IAAI,YAAY;AAChB,SAAS,eAAe;CACvB,OAAO;AACR;AACA,SAAS,aAAa,MAAM;CAC3B,YAAY;AACb;;;;;;;;;;;;;ACIA,IAAI;AACJ,SAAS,kBAAkB;CAC1B,OAAO;AACR;AACA,SAAS,gBAAgB,OAAO;CAC/B,eAAe;AAChB;;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,YAAY,OAAO,IAAI,wBAAwB;AACrD,SAAS,WAAW;CACnB,MAAM,SAAS;CACf,MAAM,WAAW,OAAO;CACxB,IAAI,UAAU,OAAO;CACrB,MAAM,OAAO,CAAC;CACd,OAAO,aAAa;CACpB,OAAO;AACR;;AAiBA,SAAS,gBAAgB,QAAQ;CAChC,MAAM,OAAO,SAAS;CACtB,OAAO,WAAW,KAAK,KAAK,KAAK,gBAAgB,SAAS,KAAK,QAAQ,KAAK;AAC7E;;AAuBA,SAAS,2BAA2B,QAAQ;CAC3C,MAAM,OAAO,SAAS;CACtB,OAAO,WAAW,KAAK,KAAK,KAAK,kBAAkB,SAAS,KAAK,aAAa,KAAK;AACpF;;;;ACxFA,MAAM,cAAc;AACpB,MAAM,+BAA+B,IAAI,IAAI;CAC5C;CACA;CACA;AACD,CAAC;;AAED,MAAM,eAAe;;;;;;;;;;;;AAYrB,IAAI,WAAW,cAAc,MAAM;CAClC;CACA;CACA;CACA,YAAY,QAAQ,KAAK,MAAM,SAAS;EACvC,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,KAAK,MAAM;EACX,KAAK,OAAO;CACb;AACD;;;;;;;;;;;AAWA,IAAI,eAAe,cAAc,MAAM;CACtC;;CAEA;CACA,YAAY,KAAK,QAAQ,SAAS,SAAS;EAC1C,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO;EACZ,KAAK,MAAM;EACX,KAAK,S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