@zitadel/testing 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"src-BxDa7FSy.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-Cuaveyma.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\t/**\n\t* The server's ID for the request, from its `X-Request-Id` header: the\n\t* reference that finds the request in the server's logs, to show beside the\n\t* error. `undefined` when the response carried none, as from a proxy.\n\t*/\n\trequestId;\n\tconstructor(status, url, body, message, requestId) {\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\tthis.requestId = requestId;\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, res.headers.get(\"x-request-id\") || void 0);\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\tevaluatePolicy: () => evaluatePolicy,\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\tgetEvaluatePolicyUrl: () => getEvaluatePolicyUrl,\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\tgetGetIdpByIdUrl: () => getGetIdpByIdUrl,\n\tgetGetIdpRevisionByIdUrl: () => getGetIdpRevisionByIdUrl,\n\tgetGetLiveUrl: () => getGetLiveUrl,\n\tgetGetMyPasswordStateUrl: () => getGetMyPasswordStateUrl,\n\tgetGetMySessionCsrfTokenUrl: () => getGetMySessionCsrfTokenUrl,\n\tgetGetMySessionUrl: () => getGetMySessionUrl,\n\tgetGetMyUserSchemaUrl: () => getGetMyUserSchemaUrl,\n\tgetGetMyUserUrl: () => getGetMyUserUrl,\n\tgetGetPolicyRevisionUrl: () => getGetPolicyRevisionUrl,\n\tgetGetPolicyUrl: () => getGetPolicyUrl,\n\tgetGetProjectUrl: () => getGetProjectUrl,\n\tgetGetReadyUrl: () => getGetReadyUrl,\n\tgetGetReleaseByIdUrl: () => getGetReleaseByIdUrl,\n\tgetGetSchemaByIdUrl: () => getGetSchemaByIdUrl,\n\tgetGetSessionUrl: () => getGetSessionUrl,\n\tgetGetTeamUrl: () => getGetTeamUrl,\n\tgetGetUserByIDUrl: () => getGetUserByIDUrl,\n\tgetGetUserPasswordStateUrl: () => getGetUserPasswordStateUrl,\n\tgetGetVariableUrl: () => getGetVariableUrl,\n\tgetGetVariablesUrl: () => getGetVariablesUrl,\n\tgetGrant: () => getGrant,\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\tgetListMyIdentityLinksUrl: () => getListMyIdentityLinksUrl,\n\tgetListMyPasskeysUrl: () => getListMyPasskeysUrl,\n\tgetListMyProjectsUrl: () => getListMyProjectsUrl,\n\tgetListMyTeamsUrl: () => getListMyTeamsUrl,\n\tgetListPoliciesUrl: () => getListPoliciesUrl,\n\tgetListPolicyRevisionsUrl: () => getListPolicyRevisionsUrl,\n\tgetListPreviewsUrl: () => getListPreviewsUrl,\n\tgetListProjectAdminsUrl: () => getListProjectAdminsUrl,\n\tgetListReleasesUrl: () => getListReleasesUrl,\n\tgetListSchemasUrl: () => getListSchemasUrl,\n\tgetListUserIdentityLinksUrl: () => getListUserIdentityLinksUrl,\n\tgetListUserPasskeysUrl: () => getListUserPasskeysUrl,\n\tgetListUserTeamsUrl: () => getListUserTeamsUrl,\n\tgetLive: () => getLive,\n\tgetMyPasswordState: () => getMyPasswordState,\n\tgetMySession: () => getMySession,\n\tgetMySessionCsrfToken: () => getMySessionCsrfToken,\n\tgetMyUser: () => getMyUser,\n\tgetMyUserSchema: () => getMyUserSchema,\n\tgetPatchMyUserUrl: () => getPatchMyUserUrl,\n\tgetPatchProjectUrl: () => getPatchProjectUrl,\n\tgetPatchUserByIDUrl: () => getPatchUserByIDUrl,\n\tgetPolicy: () => getPolicy,\n\tgetPolicyRevision: () => getPolicyRevision,\n\tgetProject: () => getProject,\n\tgetPublishPolicyUrl: () => getPublishPolicyUrl,\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\tgetUserPasswordState: () => getUserPasswordState,\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\tlistMyIdentityLinks: () => listMyIdentityLinks,\n\tlistMyPasskeys: () => listMyPasskeys,\n\tlistMyProjects: () => listMyProjects,\n\tlistMyTeams: () => listMyTeams,\n\tlistPolicies: () => listPolicies,\n\tlistPolicyRevisions: () => listPolicyRevisions,\n\tlistPreviews: () => listPreviews,\n\tlistProjectAdmins: () => listProjectAdmins,\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\tpublishPolicy: () => publishPolicy,\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 getGetLiveUrl = () => {\n\treturn `${getProxyPath()}/livez`;\n};\n/**\n* Answers `ok` while the server process serves HTTP, and checks nothing behind it.\n*\n* Point a liveness probe here. It never checks the database, so an outage\n* of the database does not restart every instance; `GET /readyz` takes an\n* instance out of rotation instead.\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* Answers whether the server can serve requests, which takes its database answering within a second.\n*\n* Point a readiness probe here, so that a server whose database does not\n* answer gets no requests until it does. The check is one round trip to the\n* database.\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, removes them from every team they belong to, and revokes\n* every grant they hold, on any project.\n*\n* The user is removed, not deactivated, and the deletion emits `user.deleted`,\n* plus `authz.revoked` for each grant on that grant's project.\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 getGetUserPasswordStateUrl = (userId) => {\n\treturn `${getProxyPath()}/users/${encodeURIComponent(String(userId))}/password`;\n};\n/**\n* Reports when the user's current password was set, and leaves `set_at` out\n* when the user has none. The password and its hash are never returned;\n* setting one is `PUT` on the same path.\n* @summary Get user password state\n*/\nconst getUserPasswordState = async (userId, options) => {\n\treturn customFetch(getGetUserPasswordStateUrl(userId), {\n\t\t...options,\n\t\tmethod: \"GET\"\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 getListMyIdentityLinksUrl = (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/identity_links?${stringifiedParams}` : `${getProxyPath()}/users/me/identity_links`;\n};\n/**\n* The identity provider accounts a sign-in linked to the signed-in user,\n* oldest first. The provider's subject and claims are never returned.\n*\n* With `project_id`, the links are listed only when the session belongs to\n* that project.\n* @summary List the provider accounts linked to me\n*/\nconst listMyIdentityLinks = async (params, options) => {\n\treturn customFetch(getListMyIdentityLinksUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getListMyPasskeysUrl = (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/passkeys?${stringifiedParams}` : `${getProxyPath()}/users/me/passkeys`;\n};\n/**\n* The signed-in user's own passkeys, newest first, paginated with a cursor.\n* Each passkey carries its id, its name and when it was registered, never the\n* credential itself.\n*\n* With `project_id`, the passkeys are listed only when the session belongs to\n* that project.\n* @summary List my passkeys\n*/\nconst listMyPasskeys = async (params, options) => {\n\treturn customFetch(getListMyPasskeysUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetMyPasswordStateUrl = (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/password?${stringifiedParams}` : `${getProxyPath()}/users/me/password`;\n};\n/**\n* Reports when the signed-in user's current password was set, and leaves\n* `set_at` out when they have none. The password and its hash are never\n* returned.\n*\n* With `project_id`, the state is read only when the session belongs to that\n* project.\n* @summary Get my password state\n*/\nconst getMyPasswordState = async (params, options) => {\n\treturn customFetch(getGetMyPasswordStateUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\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 can act on: those they hold an active grant\n* on, either directly or through a team they are a member of. For a platform\n* operator (ADR 075) that is every project of the deployment. Ordered by\n* project id and paged with an 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 `name_contains`, only the projects whose name contains that text are\n* listed. The search runs on the server together with the grants, so it\n* reaches every project the user can act on, however many there are, and\n* pages like the full list.\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, together with that session's `session_token`\n* (for step-up / reauth on an existing session).\n*\n* The browser `Origin` header selects which deployment serves this attempt:\n* the gate admits the origin against the project's origin patterns and live\n* previews, the newest deployment to that exact origin is the target, and\n* that deployment's release supplies flow definitions, user schemas and\n* branding. The resolved deployment is sealed into the `_zflow` cookie so\n* later steps keep the same configuration. An origin that matches no pattern\n* answers `403` with `proj.origin_not_allowed`; one that matches a preview\n* pattern with no live preview answers `403` with `proj.preview_not_live`;\n* nothing deployed to the target answers `409` with `rel.not_deployed`; a\n* revoked release answers `409` with `rel.revoked`. A request with no\n* `Origin` passes the gate and still needs a deployment target. A loopback\n* origin passes it too, and so does the server's own origin, from which its\n* console previews a project's login; a step submitted from the server's\n* own origin is still refused unless the project lists it.\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*\n* Reuses the deployment sealed into `_zflow` at `createFlow`; it does not\n* re-resolve from `Origin`. If that release was revoked since the attempt\n* started, the response is `409` with `rel.revoked`.\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*\n* Reuses the deployment sealed into `_zflow` at `createFlow`; it does not\n* re-resolve from `Origin`. If that release was revoked since the attempt\n* started, the response is `409` with `rel.revoked`.\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 and that session's session_token to add factors to an existing session.\n*\n* The project comes from the project secret. A body `project_id` that disagrees\n* answers `403` with `proj.mismatch`. Sealed `deployment_id` / `release_id` are\n* filled only when create runs with a runtime resolution already on the\n* context (the flow create path); this HTTP entry point does not resolve\n* Origin or refuse a revoked release itself.\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*\n* Revoke refusal for a sealed release happens at handoff exchange, not here.\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 getListProjectAdminsUrl = (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))}/admins?${stringifiedParams}` : `${getProxyPath()}/projects/${encodeURIComponent(String(projectId))}/admins`;\n};\n/**\n* Lists the people who can administer the project, and how each of them\n* gets that access. A person appears once, with one entry in `sources` per\n* way they hold it:\n*\n* - `owning_team`: an active member of the team that owns the project\n* (ADR 054 §2). Removing a grant does not remove this access; it ends\n* only when the person leaves the team or the project changes owner.\n* - `grant`: an unexpired `admin` grant on the project, either to the\n* person (`grant_id` only) or to a team they are an active member of\n* (`grant_id` and `team`). Revoking that grant removes this source.\n*\n* The list follows the authorization check: team membership is read from\n* the same membership projection the check expands, so a person who left a\n* team, or whose team or user was deactivated, is not listed through it.\n* Grants that expired or carry a lower role are left out. A person whose\n* only access is a `viewer` or `editor` grant is not an admin and is not\n* listed. Like the check, the list does not look at a person's user status\n* beyond that, so a direct grant to a suspended person is listed.\n*\n* A person whose access comes only through teams the caller is not a\n* member of is left out, and a team the caller is not in is named by\n* `team_id` only. The grant to such a team still shows in the project's\n* grants.\n*\n* Ordered by `user_id` and paginated with `page_token`.\n*\n* Accepts either a project secret (`oauth2`) or a user-bound Console\n* session cookie (`nextgenSession`) that can read the project.\n* @summary List project admins\n*/\nconst listProjectAdmins = async (projectId, params, options) => {\n\treturn customFetch(getListProjectAdminsUrl(projectId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\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*\n* The project comes from the project secret. A query `project_id` that\n* disagrees answers `403` with `proj.mismatch`. The exchange resolves a\n* deployment the same way as other runtime operations; with no browser\n* `Origin` and nothing deployed to the resolved target the response is\n* `409` with `rel.not_deployed`. A revoked release answers `409` with\n* `rel.revoked`.\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 (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()}/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 getListPoliciesUrl = (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()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`;\n};\n/**\n* Lists the project's policies, one per operation, each as its newest\n* revision, ordered by `created_at` (first publish) and then `id`. Filter\n* by `operation` to read the policy of one operation; a project that never\n* published one gets an empty list.\n*\n* The lookup is scoped to the project in `project_id`.\n* @summary List policies\n*/\nconst listPolicies = async (params, options) => {\n\treturn customFetch(getListPoliciesUrl(params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getPublishPolicyUrl = (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()}/policies?${stringifiedParams}` : `${getProxyPath()}/policies`;\n};\n/**\n* Publishes the project's policy for an operation as a new immutable\n* revision, creating the policy on its first publish. The newest revision\n* applies to the next time the operation runs; nothing already stored is\n* re-evaluated, so a stricter password policy applies the next time a\n* password is set.\n*\n* The request is typed by `operation`: an unknown operation or setting, or\n* a value of the wrong type or outside its bounds, answers `req.invalid`\n* like any malformed request. The operation's template then checks the\n* config again, together with the rules that relate settings to each other\n* (a `min_length` above `max_length`), and answers `pol.invalid`. Its\n* `details.details.violations` lists everything that failed, settings\n* first, then rules: `{\"setting\": \"min_length\"}` for one setting, or\n* `{\"config_rule\": \"min_length_not_above_max_length\", \"settings\":\n* [\"min_length\", \"max_length\"]}` for a rule across settings, with the\n* settings it reads. A setting left out is off, and `{}` switches every\n* rule off; there are no defaults.\n* @summary Publish a policy\n*/\nconst publishPolicy = async (publishPolicyBody, 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(getPublishPolicyUrl(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(publishPolicyBody)\n\t});\n};\nconst getEvaluatePolicyUrl = (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()}/policies/evaluate?${stringifiedParams}` : `${getProxyPath()}/policies/evaluate`;\n};\n/**\n* Evaluates a policy config against one request, without side effects, and\n* answers the decision the operation would reach. Nothing is read from or\n* written to the project: the config is the one in the body, checked\n* exactly as a publish checks it, so an invalid config answers `pol.invalid`\n* with the same violations.\n*\n* `input` is what the operation's request carries, in the operation's own\n* terms (a password, not its length): the server derives what the policy\n* checks with the code the live operation runs, guards included. `facts`\n* states what the operation would look up at runtime, such as whether the\n* candidate matches one of the user's kept passwords.\n*\n* The decision and the names of the failed rules hold wherever the\n* operation runs. `code` and `violations` are what an API call answers; a\n* login flow shows the same rules as field errors on the password field\n* (`error.x-auth-methods#password_<rule>` in `step.error`).\n*\n* Which policy a project or release applies is not decided here: read it\n* and pass its config.\n*\n* The caller needs read access to the project in `project_id`.\n* @summary Evaluate a policy\n*/\nconst evaluatePolicy = async (evaluatePolicyBody, 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(getEvaluatePolicyUrl(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(evaluatePolicyBody)\n\t});\n};\nconst getGetPolicyUrl = (policyId, 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()}/policies/${encodeURIComponent(String(policyId))}?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}`;\n};\n/**\n* Reads a policy as its newest revision, the one that applies the next time\n* its operation runs.\n*\n* The lookup is scoped to the project in `project_id`: a policy of another\n* project answers not found exactly as an unknown id does.\n* @summary Get a policy\n*/\nconst getPolicy = async (policyId, params, options) => {\n\treturn customFetch(getGetPolicyUrl(policyId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getListPolicyRevisionsUrl = (policyId, 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()}/policies/${encodeURIComponent(String(policyId))}/revisions?${stringifiedParams}` : `${getProxyPath()}/policies/${encodeURIComponent(String(policyId))}/revisions`;\n};\n/**\n* Returns every revision of one policy, 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`: a policy of another\n* project answers not found exactly as an unknown id does.\n* @summary List the revisions of a policy\n*/\nconst listPolicyRevisions = async (policyId, params, options) => {\n\treturn customFetch(getListPolicyRevisionsUrl(policyId, params), {\n\t\t...options,\n\t\tmethod: \"GET\"\n\t});\n};\nconst getGetPolicyRevisionUrl = (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()}/policies/revisions/${encodeURIComponent(String(revisionId))}?${stringifiedParams}` : `${getProxyPath()}/policies/revisions/${encodeURIComponent(String(revisionId))}`;\n};\n/**\n* Reads one revision of a policy, newest or not.\n*\n* The lookup is scoped to the project in `project_id`: a revision of another\n* project answers not found exactly as an unknown id does.\n* @summary Get a policy revision\n*/\nconst getPolicyRevision = async (revisionId, params, options) => {\n\treturn customFetch(getGetPolicyRevisionUrl(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. A policy whose config matches only an\n* older revision allocates a new one too, so a request that resolves no\n* release, which reads the newest revision, applies it as well. 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`, `idp.write` and\n* `policy.write`, as the 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 its targets by recording a deployment,\n* atomically: on success every target serves the release and the record\n* exists; on failure nothing changes and no record is written.\n*\n* Name the release by exactly one of `release_id` or `content_hash`; it\n* must already exist in the project. `targets` is `primary` or preview\n* URLs. The deployment freezes the project's variable values for its kind,\n* with no fallback between primary and preview values.\n*\n* A deployment to `primary` changes nothing when the project's newest\n* primary deployment has the same release and frozen values and covers\n* exactly the current primary origins: the call answers `200` with that\n* deployment. Any other request writes a new deployment and answers `201`;\n* for preview URLs that record renews their previews.\n*\n* Failures:\n* - `400 dep.invalid`: both or neither of `release_id` and `content_hash`;\n* a primary origin named exactly; `primary` mixed with preview URLs;\n* `primary` on a project with no primary origin; `ttl` with `primary`;\n* `ttl` above 365 days (`P365D`).\n* - `400 dep.variables_missing`: a referenced variable has no value for\n* the kind; `details` names the kind and every missing variable.\n* - `403 proj.origin_not_allowed`: a preview URL matches no preview\n* pattern, or is a loopback URL.\n* - `404 rel.not_found`: the release id or digest names no release here.\n* - `409 dep.conflict`: `expected_deployment_id` is not the deployment\n* this write replaces; `details.deployment` is that deployment.\n* - `409 rel.revoked`: the release is revoked.\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 what ran where, and when.\n*\n* By default the list is the history, newest first: every deployment of\n* the project with every target it made the release live on. With\n* `origin`, the history of that origin alone.\n*\n* With `live=true`, the list is what is served now, newest first: the\n* project's newest primary deployment, narrowed to origins that are still\n* primary, and the newest deployment to each live preview URL, narrowed to\n* the URLs it still serves. Combined with `origin`, it is the one\n* deployment that origin serves, or empty.\n*\n* `expand: [\"release\"]` embeds the release each deployment made live; it\n* requires `release.read` and does not change the ordering or the page\n* 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 release of the deployment named in the path to `primary`,\n* with the variable values it froze: a new deployment with `reason:\n* rollback` and `rollback_to` naming it. Like any deployment to `primary`,\n* it covers every current primary origin. Idempotent like a deployment to\n* `primary`: when nothing would change it answers `200` with the newest\n* primary deployment.\n*\n* Failures:\n* - `400 dep.invalid`: the deployment went to preview URLs (deploy to the\n* preview again instead), or the project has no primary origin.\n* - `404 dep.not_found`: no deployment of the project has that id.\n* - `409 dep.conflict`: `expected_deployment_id` is not the project's\n* newest primary deployment; `details.deployment` is that deployment.\n* - `409 rel.revoked`: the release is revoked.\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, evaluatePolicy, 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, getEvaluatePolicyUrl, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetIdpByIdUrl, getGetIdpRevisionByIdUrl, getGetLiveUrl, getGetMyPasswordStateUrl, getGetMySessionCsrfTokenUrl, getGetMySessionUrl, getGetMyUserSchemaUrl, getGetMyUserUrl, getGetPolicyRevisionUrl, getGetPolicyUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGetUserPasswordStateUrl, getGetVariableUrl, getGetVariablesUrl, getGrant, getIdpById, getIdpRevisionById, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListDeploymentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListIdpRevisionsUrl, getListMyIdentityLinksUrl, getListMyPasskeysUrl, getListMyProjectsUrl, getListMyTeamsUrl, getListPoliciesUrl, getListPolicyRevisionsUrl, getListPreviewsUrl, getListProjectAdminsUrl, getListReleasesUrl, getListSchemasUrl, getListUserIdentityLinksUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getMyPasswordState, getMySession, getMySessionCsrfToken, getMyUser, getMyUserSchema, getPatchMyUserUrl, getPatchProjectUrl, getPatchUserByIDUrl, getPolicy, getPolicyRevision, getProject, getPublishPolicyUrl, getQueryGrantsUrl, getQueryIdpsUrl, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getReleaseById, getRemoveOriginUrl, getRemovePreviewUrl, getRevokeMySessionUrl, getRevokeReleaseUrl, getRevokeSessionUrl, getRollbackDeploymentUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateTeamUrl, getUpdateVariablesUrl, getUserByID, getUserPasswordState, getVariable, getVariables, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listDeployments, listEvents, listFlowDefinitions, listIdpRevisions, listMyIdentityLinks, listMyPasskeys, listMyProjects, listMyTeams, listPolicies, listPolicyRevisions, listPreviews, listProjectAdmins, listReleases, listSchemas, listUserIdentityLinks, listUserPasskeys, listUserTeams, patchMyUser, patchProject, patchUserByID, publishPolicy, 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}\n/**\n* README content the CLI copies to `.zitadel/policies/README.md` during setup.\n* Source of truth is `packages/config/defaults/README-policies.md`.\n*/\nfunction policiesReadmeContent() {\n\treturn readFileSync(readmeUrl(\"README-policies.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* The fields a user's display name is made of, in order. A schema designates\n* those its use case collects as `x-display`, so a session names the user\n* (\"Ada Lovelace\") rather than leaving the app only their email.\n*/\nconst DISPLAY_FIELDS = [\"givenName\", \"familyName\"];\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, and designate its name fields as `x-display`. `email`\n* is the sole required property.\n*/\nfunction applyUseCaseToSchema(schema, useCase) {\n\tconst templateProps = schema.properties ?? {};\n\tconst fields = useCaseFields(useCase);\n\tconst properties = {};\n\tfor (const field of fields) properties[field] = fieldBody(field, templateProps);\n\tconst display = DISPLAY_FIELDS.filter((field) => fields.includes(field));\n\treturn {\n\t\t...schema,\n\t\trequired: [\"email\"],\n\t\tproperties,\n\t\t...display.length > 0 ? { \"x-display\": display } : {}\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, schemasReadmeContent as b, 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, policiesReadmeContent as y };\n\n//# sourceMappingURL=defaults-Cuaveyma.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 };\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,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