@zitadel/api 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{fetch-DD3lSbnp.d.mts → fetch-CtYe0OvX.d.mts} +8 -2
- package/dist/fetch-CtYe0OvX.d.mts.map +1 -0
- package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
- package/dist/generated/endpoints/zitadelNextGen.mjs +228 -42
- package/dist/generated/endpoints/zitadelNextGen.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +15 -4
- package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs +3156 -1476
- package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +1282 -94
- package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs +1785 -641
- package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
- package/dist/generated/model/index.d.mts +2 -2
- package/dist/generated/model/index.mjs +72 -65
- package/dist/generated/model/index.mjs.map +1 -1
- package/dist/generated/operations.mjs +181 -29
- package/dist/generated/operations.mjs.map +1 -1
- package/dist/{index-DuuFQkA8.d.mts → index-D7-l5LV6.d.mts} +6051 -1072
- package/dist/index-D7-l5LV6.d.mts.map +1 -0
- package/dist/runtime/api-factory.d.mts +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +9 -2
- package/dist/runtime/fetch.mjs.map +1 -1
- package/dist/{zitadelNextGen-BdUDEEuX.d.mts → zitadelNextGen-Cw3DrCn1.d.mts} +135 -37
- package/dist/zitadelNextGen-Cw3DrCn1.d.mts.map +1 -0
- package/package.json +2 -2
- package/src/generated/endpoints/zitadelNextGen.faker.ts +37 -19
- package/src/generated/endpoints/zitadelNextGen.msw.ts +91 -13
- package/src/generated/endpoints/zitadelNextGen.ts +322 -52
- package/src/generated/endpoints/zitadelNextGen.zod.ts +1072 -123
- package/src/generated/model/addOriginDefault.ts +27 -0
- package/src/generated/model/beginUserPasskeyRegistrationDefault.ts +18 -0
- package/src/generated/model/buildRelease200PointersItem.ts +2 -0
- package/src/generated/model/buildRelease200PointersItemKind.ts +1 -0
- package/src/generated/model/buildRelease201PointersItem.ts +2 -0
- package/src/generated/model/buildRelease201PointersItemKind.ts +1 -0
- package/src/generated/model/buildRelease400DetailsResourcesItemKind.ts +1 -0
- package/src/generated/model/buildReleaseBody.ts +3 -3
- package/src/generated/model/buildReleaseBodyBundle.ts +20 -3
- package/src/generated/model/buildReleaseBodyBundlePoliciesItem.ts +47 -0
- package/src/generated/model/buildReleaseDefault.ts +36 -0
- package/src/generated/model/createAuthAttemptDefault.ts +27 -0
- package/src/generated/model/createBrandingDefault.ts +18 -0
- package/src/generated/model/createDeployment200ReleasePointersItem.ts +2 -0
- package/src/generated/model/createDeployment200ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/createDeployment201ReleasePointersItem.ts +2 -0
- package/src/generated/model/createDeployment201ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/createDeployment409.ts +3 -1
- package/src/generated/model/createDeploymentBody.ts +2 -4
- package/src/generated/model/createDeploymentDefault.ts +54 -0
- package/src/generated/model/createFlow201Step.ts +19 -0
- package/src/generated/model/createFlow201StepPurpose.ts +26 -0
- package/src/generated/model/createFlowDefault.ts +18 -0
- package/src/generated/model/createFlowDefinitionDefault.ts +18 -0
- package/src/generated/model/createGrant201Team.ts +4 -1
- package/src/generated/model/createGrantDefault.ts +18 -0
- package/src/generated/model/createHandoffDefault.ts +18 -0
- package/src/generated/model/createIdpDefault.ts +18 -0
- package/src/generated/model/createRelease200PointersItem.ts +2 -0
- package/src/generated/model/createRelease200PointersItemKind.ts +1 -0
- package/src/generated/model/createRelease201PointersItem.ts +2 -0
- package/src/generated/model/createRelease201PointersItemKind.ts +1 -0
- package/src/generated/model/createReleaseBodyPointersItemKind.ts +1 -0
- package/src/generated/model/createReleaseDefault.ts +18 -0
- package/src/generated/model/createSchemaDefault.ts +18 -0
- package/src/generated/model/createSessionDefault.ts +18 -0
- package/src/generated/model/createTeamDefault.ts +18 -0
- package/src/generated/model/createUserDefault.ts +18 -0
- package/src/generated/model/deleteGrantDefault.ts +18 -0
- package/src/generated/model/deleteTeamDefault.ts +18 -0
- package/src/generated/model/deleteUserByIDDefault.ts +18 -0
- package/src/generated/model/deleteVariableDefault.ts +18 -0
- package/src/generated/model/exchangeHandoffDefault.ts +36 -0
- package/src/generated/model/finishUserPasskeyRegistrationDefault.ts +18 -0
- package/src/generated/model/getAuthAttemptDefault.ts +18 -0
- package/src/generated/model/getBrandingByIdDefault.ts +18 -0
- package/src/generated/model/getClaimStatusDefault.ts +18 -0
- package/src/generated/model/getDeploymentById200ReleasePointersItem.ts +2 -0
- package/src/generated/model/getDeploymentById200ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/getDeploymentByIdDefault.ts +18 -0
- package/src/generated/model/getDeploymentVariablesDefault.ts +9 -0
- package/src/generated/model/getEvent200.ts +788 -0
- package/src/generated/model/getEventDefault.ts +18 -0
- package/src/generated/model/getFlowDefinitionDefault.ts +18 -0
- package/src/generated/model/getFlowStep200Step.ts +19 -0
- package/src/generated/model/getFlowStep200StepPurpose.ts +26 -0
- package/src/generated/model/getFlowStepDefault.ts +36 -0
- package/src/generated/model/getGrant200Team.ts +4 -1
- package/src/generated/model/getGrantDefault.ts +18 -0
- package/src/generated/model/getIdpByIdDefault.ts +18 -0
- package/src/generated/model/getIdpRevisionByIdDefault.ts +18 -0
- package/src/generated/model/getMyPasswordStateDefault.ts +18 -0
- package/src/generated/model/getMySessionCsrfTokenDefault.ts +18 -0
- package/src/generated/model/getMySessionDefault.ts +18 -0
- package/src/generated/model/getMyUserDefault.ts +18 -0
- package/src/generated/model/getMyUserSchemaDefault.ts +18 -0
- package/src/generated/model/getPolicy200.ts +62 -0
- package/src/generated/model/getPolicyDefault.ts +72 -0
- package/src/generated/model/getPolicyParams.ts +15 -0
- package/src/generated/model/getPolicyRevision200.ts +62 -0
- package/src/generated/model/getPolicyRevisionDefault.ts +72 -0
- package/src/generated/model/getPolicyRevisionParams.ts +15 -0
- package/src/generated/model/getProject200.ts +64 -6
- package/src/generated/model/getReleaseById200PointersItem.ts +2 -0
- package/src/generated/model/getReleaseById200PointersItemKind.ts +1 -0
- package/src/generated/model/getReleaseByIdDefault.ts +18 -0
- package/src/generated/model/getSchemaByIdDefault.ts +18 -0
- package/src/generated/model/getSessionDefault.ts +18 -0
- package/src/generated/model/getTeamDefault.ts +18 -0
- package/src/generated/model/getUserByIDDefault.ts +18 -0
- package/src/generated/model/getUserPasswordStateDefault.ts +18 -0
- package/src/generated/model/getVariableDefault.ts +18 -0
- package/src/generated/model/getVariablesDefault.ts +18 -0
- package/src/generated/model/index.ts +38 -21
- package/src/generated/model/initClaimDefault.ts +18 -0
- package/src/generated/model/issueChallengeDefault.ts +18 -0
- package/src/generated/model/listBrandingDefault.ts +18 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItem.ts +2 -0
- package/src/generated/model/listDeployments200DeploymentsItemReleasePointersItemKind.ts +1 -0
- package/src/generated/model/listDeploymentsDefault.ts +18 -0
- package/src/generated/model/listEvents200DataItem.ts +788 -0
- package/src/generated/model/listEventsDefault.ts +18 -0
- package/src/generated/model/listFlowDefinitionsDefault.ts +18 -0
- package/src/generated/model/listIdpRevisionsDefault.ts +18 -0
- package/src/generated/model/listMyIdentityLinksDefault.ts +18 -0
- package/src/generated/model/listMyPasskeysDefault.ts +18 -0
- package/src/generated/model/listMyProjectsDefault.ts +18 -0
- package/src/generated/model/listMyProjectsParams.ts +8 -0
- package/src/generated/model/listMyTeamsDefault.ts +18 -0
- package/src/generated/model/listPolicies200.ts +21 -0
- package/src/generated/model/listPolicies200PoliciesItem.ts +62 -0
- package/src/generated/model/listPoliciesDefault.ts +72 -0
- package/src/generated/model/listPoliciesOperation.ts +14 -0
- package/src/generated/model/listPoliciesParams.ts +33 -0
- package/src/generated/model/listPolicyRevisions200.ts +20 -0
- package/src/generated/model/listPolicyRevisions200RevisionsItem.ts +62 -0
- package/src/generated/model/listPolicyRevisionsDefault.ts +72 -0
- package/src/generated/model/listPolicyRevisionsParams.ts +28 -0
- package/src/generated/model/listPreviewsDefault.ts +9 -0
- package/src/generated/model/listProjectAdmins200.ts +20 -0
- package/src/generated/model/listProjectAdmins200AdminsItem.ts +31 -0
- package/src/generated/model/listProjectAdmins200AdminsItemSourcesItem.ts +57 -0
- package/src/generated/model/listProjectAdmins200AdminsItemUser.ts +40 -0
- package/src/generated/model/{createAuthAttempt409.ts → listProjectAdmins400.ts} +3 -3
- package/src/generated/model/{createAuthAttempt409Details.ts → listProjectAdmins400Details.ts} +1 -1
- package/src/generated/model/{issueChallenge409.ts → listProjectAdmins401.ts} +3 -3
- package/src/generated/model/{issueChallenge409Details.ts → listProjectAdmins401Details.ts} +1 -1
- package/src/generated/model/{getAuthAttempt409.ts → listProjectAdmins403.ts} +3 -3
- package/src/generated/model/{getHealth4xxDetails.ts → listProjectAdmins403Details.ts} +1 -1
- package/src/generated/model/{getHealth4xx.ts → listProjectAdmins404.ts} +3 -3
- package/src/generated/model/{getAuthAttempt409Details.ts → listProjectAdmins404Details.ts} +1 -1
- package/src/generated/model/listProjectAdminsDefault.ts +81 -0
- package/src/generated/model/listProjectAdminsParams.ts +23 -0
- package/src/generated/model/listReleasesDefault.ts +18 -0
- package/src/generated/model/listSchemasDefault.ts +18 -0
- package/src/generated/model/listUserIdentityLinksDefault.ts +18 -0
- package/src/generated/model/listUserPasskeysDefault.ts +18 -0
- package/src/generated/model/listUserTeamsDefault.ts +18 -0
- package/src/generated/model/patchMyUserDefault.ts +18 -0
- package/src/generated/model/patchProject200.ts +64 -6
- package/src/generated/model/patchProjectDefault.ts +18 -0
- package/src/generated/model/patchUserByIDDefault.ts +18 -0
- package/src/generated/model/publishPolicy201.ts +62 -0
- package/src/generated/model/publishPolicyBody.ts +47 -0
- package/src/generated/model/publishPolicyDefault.ts +99 -0
- package/src/generated/model/publishPolicyParams.ts +15 -0
- package/src/generated/model/queryGrants200GrantsItemTeam.ts +4 -1
- package/src/generated/model/queryGrantsDefault.ts +9 -0
- package/src/generated/model/queryIdpsDefault.ts +9 -0
- package/src/generated/model/queryProjectsDefault.ts +9 -0
- package/src/generated/model/querySessionsDefault.ts +9 -0
- package/src/generated/model/queryTeamsDefault.ts +9 -0
- package/src/generated/model/queryUsersDefault.ts +9 -0
- package/src/generated/model/removeOriginDefault.ts +27 -0
- package/src/generated/model/removePreviewDefault.ts +18 -0
- package/src/generated/model/revokeMySessionDefault.ts +18 -0
- package/src/generated/model/revokeRelease200PointersItem.ts +2 -0
- package/src/generated/model/revokeRelease200PointersItemKind.ts +1 -0
- package/src/generated/model/revokeRelease409DetailsOriginsItem.ts +9 -1
- package/src/generated/model/revokeReleaseDefault.ts +63 -0
- package/src/generated/model/revokeSessionDefault.ts +18 -0
- package/src/generated/model/rollbackDeployment200ReleasePointersItem.ts +2 -0
- package/src/generated/model/rollbackDeployment200ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/rollbackDeployment201ReleasePointersItem.ts +2 -0
- package/src/generated/model/rollbackDeployment201ReleasePointersItemKind.ts +1 -0
- package/src/generated/model/rollbackDeployment409.ts +3 -1
- package/src/generated/model/rollbackDeploymentDefault.ts +99 -0
- package/src/generated/model/setUserPasswordDefault.ts +18 -0
- package/src/generated/model/submitFlowStep200Step.ts +19 -0
- package/src/generated/model/submitFlowStep200StepPurpose.ts +26 -0
- package/src/generated/model/submitFlowStep400Step.ts +19 -0
- package/src/generated/model/submitFlowStep400StepPurpose.ts +26 -0
- package/src/generated/model/submitFlowStepDefault.ts +36 -0
- package/src/generated/model/updateTeamDefault.ts +18 -0
- package/src/generated/model/updateVariablesDefault.ts +18 -0
- package/src/generated/model/verifyChallengeProofDefault.ts +18 -0
- package/src/generated/operations.ts +189 -29
- package/src/runtime/config.spec.ts +2 -2
- package/src/runtime/fetch.spec.ts +13 -1
- package/src/runtime/fetch.ts +15 -2
- package/dist/fetch-DD3lSbnp.d.mts.map +0 -1
- package/dist/index-DuuFQkA8.d.mts.map +0 -1
- package/dist/zitadelNextGen-BdUDEEuX.d.mts.map +0 -1
- package/src/generated/model/getHealthDefault.ts +0 -27
- package/src/generated/model/getProject200OriginsItem.ts +0 -23
- package/src/generated/model/getProject200OriginsItemKind.ts +0 -15
- package/src/generated/model/getProject200PasswordHash.ts +0 -42
- package/src/generated/model/getProject200PasswordHashAlgorithm.ts +0 -24
- package/src/generated/model/getProject200PasswordHashParams.ts +0 -47
- package/src/generated/model/getProject200PasswordHashParamsHash.ts +0 -24
- package/src/generated/model/patchProject200OriginsItem.ts +0 -23
- package/src/generated/model/patchProject200OriginsItemKind.ts +0 -15
- package/src/generated/model/patchProject200PasswordHash.ts +0 -42
- package/src/generated/model/patchProject200PasswordHashAlgorithm.ts +0 -24
- package/src/generated/model/patchProject200PasswordHashParams.ts +0 -47
- package/src/generated/model/patchProject200PasswordHashParamsHash.ts +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.mjs","names":[],"sources":["../../src/runtime/fetch.ts"],"sourcesContent":["import { apiCsrfRejectionHandlerFor, apiCsrfTokenFor, getApiAuthToken } from \"./auth\";\n\n/** The header the session-bound CSRF token travels in (ADR 053 §5). */\nexport const CSRF_HEADER = \"X-Zitadel-CSRF\";\n\n// Mirrors the server's list (`httputil.IsSafeMethod` in `internal/httputil`).\nconst SAFE_METHODS = new Set([\"GET\", \"HEAD\", \"OPTIONS\"]);\n\n/** The code the server answers a refused CSRF check with. */\nconst CSRF_INVALID = \"auth.csrf_invalid\";\n\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 */\nexport class ApiError extends Error {\n readonly status: number;\n readonly url: string;\n readonly body: unknown;\n\n constructor(status: number, url: string, body: unknown, message: string) {\n super(message);\n this.name = \"ApiError\";\n this.status = status;\n this.url = url;\n this.body = body;\n }\n}\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 */\nexport class NetworkError extends Error {\n readonly url: string;\n /** `timeout` when a deadline cut the request off, `unreachable` otherwise. */\n readonly reason: \"unreachable\" | \"timeout\";\n\n constructor(\n url: string,\n reason: \"unreachable\" | \"timeout\",\n message: string,\n options?: ErrorOptions,\n ) {\n super(message, options);\n this.name = \"NetworkError\";\n this.url = url;\n this.reason = reason;\n }\n}\n\n/**\n * What every request a client makes is bound by. Set per call by\n * `createZitadelClient`, the same way as the base URL and token, and read at\n * the top of {@link customFetch} before its first `await`.\n */\nexport type RequestPolicy = {\n /** Aborts every request made while it is set; its reason is rethrown as is. */\n signal?: AbortSignal;\n /** Per-request deadline, covering the response body as well as the headers. */\n timeoutMs?: number;\n};\n\nlet requestPolicy: RequestPolicy = {};\n\nexport function setRequestPolicy(policy: RequestPolicy): void {\n requestPolicy = policy;\n}\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 */\nexport async function customFetch<T>(url: string, options: RequestInit): Promise<T> {\n // The client sets the policy per call, so it is read before the first await;\n // the retry below runs under the same policy as the first attempt.\n const policy = requestPolicy;\n const token = getApiAuthToken();\n const headers = new Headers(options.headers);\n if (token && !headers.has(\"authorization\")) {\n headers.set(\"authorization\", `Bearer ${token}`);\n }\n const method = (options.method ?? \"GET\").toUpperCase();\n const unsafe = !SAFE_METHODS.has(method) && !headers.has(CSRF_HEADER);\n // The token and the rejection handler belong to one server: a request to\n // any other origin gets neither.\n const target = originOf(url);\n const csrfToken = apiCsrfTokenFor(target);\n if (unsafe && csrfToken) {\n headers.set(CSRF_HEADER, csrfToken);\n }\n\n let { res, rawBody: parsed } = await request(url, { ...options, headers }, policy, readBody);\n\n // The token was stale (the session cookie changed under this page) or never\n // loaded. The app re-checks the session and hands back a fresh token only if\n // it still belongs to the same person; then the request is retried once. A\n // body that can be read only once cannot be sent again, so it is not retried.\n const onRejected = apiCsrfRejectionHandlerFor(target);\n if (\n unsafe &&\n onRejected &&\n res.status === 403 &&\n apiErrorCode(parsed) === CSRF_INVALID &&\n !isStream(options.body)\n ) {\n const fresh = await onRejected().catch(() => undefined);\n if (fresh && fresh !== csrfToken) {\n headers.set(CSRF_HEADER, fresh);\n ({ res, rawBody: parsed } = await request(url, { ...options, headers }, policy, readBody));\n }\n }\n\n if (!res.ok) {\n const message = `${options.method ?? \"GET\"} ${url} returned ${res.status}`;\n throw new ApiError(res.status, url, parsed, message);\n }\n\n return parsed as T;\n}\n\n/** The parsed body, or `undefined` for the spec's no-body responses. */\nasync function readBody(res: Response): Promise<unknown> {\n if ([204, 205, 304].includes(res.status)) return undefined;\n const rawBody = await res.text();\n return rawBody ? (safeJsonParse(rawBody) as unknown) : undefined;\n}\n\n/** The request's origin, resolved against the page for a relative URL. */\nfunction originOf(url: string): string | undefined {\n try {\n return new URL(url, (globalThis as { location?: { href?: string } }).location?.href).origin;\n } catch {\n return undefined;\n }\n}\n\nfunction isStream(body: RequestInit[\"body\"]): boolean {\n return typeof ReadableStream !== \"undefined\" && body instanceof ReadableStream;\n}\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 */\nexport async function request<R = undefined>(\n url: string,\n init: RequestInit,\n policy: RequestPolicy = {},\n read?: (res: Response) => Promise<R>,\n): Promise<{ res: Response; rawBody: R }> {\n const signals = [init.signal, policy.signal].filter((signal) => signal != null);\n if (policy.timeoutMs !== undefined) {\n signals.push(AbortSignal.timeout(policy.timeoutMs));\n }\n const signal = signals.length > 0 ? AbortSignal.any(signals) : undefined;\n const method = init.method ?? \"GET\";\n try {\n const res = await fetch(url, { ...init, signal });\n return { res, rawBody: (read ? await read(res) : undefined) as R };\n } catch (error) {\n if (signal?.aborted) {\n const reason: unknown = signal.reason;\n if (reason instanceof DOMException && reason.name === \"TimeoutError\") {\n throw new NetworkError(url, \"timeout\", `${method} ${url} timed out`, { cause: reason });\n }\n throw reason;\n }\n const code = errnoOf(error);\n throw new NetworkError(\n url,\n \"unreachable\",\n `${method} ${url} got no response${code ? ` (${code})` : \"\"}`,\n { cause: error },\n );\n }\n}\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: unknown): string | undefined {\n let node: unknown = error;\n for (let depth = 0; depth < 4 && typeof node === \"object\" && node !== null; depth += 1) {\n const { code, errors } = node as { code?: unknown; errors?: unknown };\n if (typeof code === \"string\") {\n return code;\n }\n node = Array.isArray(errors) ? errors[0] : (node as { cause?: unknown }).cause;\n }\n return undefined;\n}\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: string): unknown {\n try {\n return JSON.parse(text);\n } catch {\n return { raw: text };\n }\n}\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 */\nexport function apiErrorCode(errorOrBody: unknown): string | undefined {\n const body = errorOrBody instanceof ApiError ? errorOrBody.body : errorOrBody;\n return isRecord(body) && typeof body.code === \"string\" ? body.code : undefined;\n}\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 */\nexport function apiErrorMessage(error: ApiError): string {\n const body = error.body;\n if (!isRecord(body)) {\n return error.message;\n }\n const serverMessage = typeof body.message === \"string\" ? body.message : undefined;\n const detail = pickDetailString(body.details);\n if (!serverMessage) {\n return error.message;\n }\n return detail ? `${serverMessage}: ${detail}` : serverMessage;\n}\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: unknown): string | undefined {\n if (typeof details === \"string\") {\n return details;\n }\n if (isRecord(details)) {\n if (typeof details.details === \"string\") {\n return details.details;\n }\n if (typeof details.message === \"string\") {\n return details.message;\n }\n }\n return undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n"],"mappings":";;;AAGA,MAAa,cAAc;AAG3B,MAAM,+BAAe,IAAI,IAAI;CAAC;CAAO;CAAQ;AAAS,CAAC;;AAGvD,MAAM,eAAe;;;;;;;;;;;;AAarB,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,QAAgB,KAAa,MAAe,SAAiB;EACvE,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,KAAK,MAAM;EACX,KAAK,OAAO;CACd;AACF;;;;;;;;;;;AAYA,IAAa,eAAb,cAAkC,MAAM;CACtC;;CAEA;CAEA,YACE,KACA,QACA,SACA,SACA;EACA,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO;EACZ,KAAK,MAAM;EACX,KAAK,SAAS;CAChB;AACF;AAcA,IAAI,gBAA+B,CAAC;AAEpC,SAAgB,iBAAiB,QAA6B;CAC5D,gBAAgB;AAClB;;;;;;;;;;;;;;;;;;;;;;;AAwBA,eAAsB,YAAe,KAAa,SAAkC;CAGlF,MAAM,SAAS;CACf,MAAM,QAAQ,gBAAgB;CAC9B,MAAM,UAAU,IAAI,QAAQ,QAAQ,OAAO;CAC3C,IAAI,SAAS,CAAC,QAAQ,IAAI,eAAe,GACvC,QAAQ,IAAI,iBAAiB,UAAU,OAAO;CAEhD,MAAM,UAAU,QAAQ,UAAU,MAAA,CAAO,YAAY;CACrD,MAAM,SAAS,CAAC,aAAa,IAAI,MAAM,KAAK,CAAC,QAAQ,IAAA,gBAAe;CAGpE,MAAM,SAAS,SAAS,GAAG;CAC3B,MAAM,YAAY,gBAAgB,MAAM;CACxC,IAAI,UAAU,WACZ,QAAQ,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,OAAO,KAAA;AACvE;;;;;;;;AASA,SAAgB,gBAAgB,OAAyB;CACvD,MAAM,OAAO,MAAM;CACnB,IAAI,CAAC,SAAS,IAAI,GAChB,OAAO,MAAM;CAEf,MAAM,gBAAgB,OAAO,KAAK,YAAY,WAAW,KAAK,UAAU,KAAA;CACxE,MAAM,SAAS,iBAAiB,KAAK,OAAO;CAC5C,IAAI,CAAC,eACH,OAAO,MAAM;CAEf,OAAO,SAAS,GAAG,cAAc,IAAI,WAAW;AAClD;;;;;;;AAQA,SAAS,iBAAiB,SAAsC;CAC9D,IAAI,OAAO,YAAY,UACrB,OAAO;CAET,IAAI,SAAS,OAAO,GAAG;EACrB,IAAI,OAAO,QAAQ,YAAY,UAC7B,OAAO,QAAQ;EAEjB,IAAI,OAAO,QAAQ,YAAY,UAC7B,OAAO,QAAQ;CAEnB;AAEF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E"}
|
|
1
|
+
{"version":3,"file":"fetch.mjs","names":[],"sources":["../../src/runtime/fetch.ts"],"sourcesContent":["import { apiCsrfRejectionHandlerFor, apiCsrfTokenFor, getApiAuthToken } from \"./auth\";\n\n/** The header the session-bound CSRF token travels in (ADR 053 §5). */\nexport const CSRF_HEADER = \"X-Zitadel-CSRF\";\n\n// Mirrors the server's list (`httputil.IsSafeMethod` in `internal/httputil`).\nconst SAFE_METHODS = new Set([\"GET\", \"HEAD\", \"OPTIONS\"]);\n\n/** The code the server answers a refused CSRF check with. */\nconst CSRF_INVALID = \"auth.csrf_invalid\";\n\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 */\nexport class ApiError extends Error {\n readonly status: number;\n readonly url: string;\n readonly body: unknown;\n /**\n * The server's ID for the request, from its `X-Request-Id` header: the\n * reference that finds the request in the server's logs, to show beside the\n * error. `undefined` when the response carried none, as from a proxy.\n */\n readonly requestId: string | undefined;\n\n constructor(status: number, url: string, body: unknown, message: string, requestId?: string) {\n super(message);\n this.name = \"ApiError\";\n this.status = status;\n this.url = url;\n this.body = body;\n this.requestId = requestId;\n }\n}\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 */\nexport class NetworkError extends Error {\n readonly url: string;\n /** `timeout` when a deadline cut the request off, `unreachable` otherwise. */\n readonly reason: \"unreachable\" | \"timeout\";\n\n constructor(\n url: string,\n reason: \"unreachable\" | \"timeout\",\n message: string,\n options?: ErrorOptions,\n ) {\n super(message, options);\n this.name = \"NetworkError\";\n this.url = url;\n this.reason = reason;\n }\n}\n\n/**\n * What every request a client makes is bound by. Set per call by\n * `createZitadelClient`, the same way as the base URL and token, and read at\n * the top of {@link customFetch} before its first `await`.\n */\nexport type RequestPolicy = {\n /** Aborts every request made while it is set; its reason is rethrown as is. */\n signal?: AbortSignal;\n /** Per-request deadline, covering the response body as well as the headers. */\n timeoutMs?: number;\n};\n\nlet requestPolicy: RequestPolicy = {};\n\nexport function setRequestPolicy(policy: RequestPolicy): void {\n requestPolicy = policy;\n}\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 */\nexport async function customFetch<T>(url: string, options: RequestInit): Promise<T> {\n // The client sets the policy per call, so it is read before the first await;\n // the retry below runs under the same policy as the first attempt.\n const policy = requestPolicy;\n const token = getApiAuthToken();\n const headers = new Headers(options.headers);\n if (token && !headers.has(\"authorization\")) {\n headers.set(\"authorization\", `Bearer ${token}`);\n }\n const method = (options.method ?? \"GET\").toUpperCase();\n const unsafe = !SAFE_METHODS.has(method) && !headers.has(CSRF_HEADER);\n // The token and the rejection handler belong to one server: a request to\n // any other origin gets neither.\n const target = originOf(url);\n const csrfToken = apiCsrfTokenFor(target);\n if (unsafe && csrfToken) {\n headers.set(CSRF_HEADER, csrfToken);\n }\n\n let { res, rawBody: parsed } = await request(url, { ...options, headers }, policy, readBody);\n\n // The token was stale (the session cookie changed under this page) or never\n // loaded. The app re-checks the session and hands back a fresh token only if\n // it still belongs to the same person; then the request is retried once. A\n // body that can be read only once cannot be sent again, so it is not retried.\n const onRejected = apiCsrfRejectionHandlerFor(target);\n if (\n unsafe &&\n onRejected &&\n res.status === 403 &&\n apiErrorCode(parsed) === CSRF_INVALID &&\n !isStream(options.body)\n ) {\n const fresh = await onRejected().catch(() => undefined);\n if (fresh && fresh !== csrfToken) {\n headers.set(CSRF_HEADER, fresh);\n ({ res, rawBody: parsed } = await request(url, { ...options, headers }, policy, readBody));\n }\n }\n\n if (!res.ok) {\n const message = `${options.method ?? \"GET\"} ${url} returned ${res.status}`;\n throw new ApiError(\n res.status,\n url,\n parsed,\n message,\n res.headers.get(\"x-request-id\") || undefined,\n );\n }\n\n return parsed as T;\n}\n\n/** The parsed body, or `undefined` for the spec's no-body responses. */\nasync function readBody(res: Response): Promise<unknown> {\n if ([204, 205, 304].includes(res.status)) return undefined;\n const rawBody = await res.text();\n return rawBody ? (safeJsonParse(rawBody) as unknown) : undefined;\n}\n\n/** The request's origin, resolved against the page for a relative URL. */\nfunction originOf(url: string): string | undefined {\n try {\n return new URL(url, (globalThis as { location?: { href?: string } }).location?.href).origin;\n } catch {\n return undefined;\n }\n}\n\nfunction isStream(body: RequestInit[\"body\"]): boolean {\n return typeof ReadableStream !== \"undefined\" && body instanceof ReadableStream;\n}\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 */\nexport async function request<R = undefined>(\n url: string,\n init: RequestInit,\n policy: RequestPolicy = {},\n read?: (res: Response) => Promise<R>,\n): Promise<{ res: Response; rawBody: R }> {\n const signals = [init.signal, policy.signal].filter((signal) => signal != null);\n if (policy.timeoutMs !== undefined) {\n signals.push(AbortSignal.timeout(policy.timeoutMs));\n }\n const signal = signals.length > 0 ? AbortSignal.any(signals) : undefined;\n const method = init.method ?? \"GET\";\n try {\n const res = await fetch(url, { ...init, signal });\n return { res, rawBody: (read ? await read(res) : undefined) as R };\n } catch (error) {\n if (signal?.aborted) {\n const reason: unknown = signal.reason;\n if (reason instanceof DOMException && reason.name === \"TimeoutError\") {\n throw new NetworkError(url, \"timeout\", `${method} ${url} timed out`, { cause: reason });\n }\n throw reason;\n }\n const code = errnoOf(error);\n throw new NetworkError(\n url,\n \"unreachable\",\n `${method} ${url} got no response${code ? ` (${code})` : \"\"}`,\n { cause: error },\n );\n }\n}\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: unknown): string | undefined {\n let node: unknown = error;\n for (let depth = 0; depth < 4 && typeof node === \"object\" && node !== null; depth += 1) {\n const { code, errors } = node as { code?: unknown; errors?: unknown };\n if (typeof code === \"string\") {\n return code;\n }\n node = Array.isArray(errors) ? errors[0] : (node as { cause?: unknown }).cause;\n }\n return undefined;\n}\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: string): unknown {\n try {\n return JSON.parse(text);\n } catch {\n return { raw: text };\n }\n}\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 */\nexport function apiErrorCode(errorOrBody: unknown): string | undefined {\n const body = errorOrBody instanceof ApiError ? errorOrBody.body : errorOrBody;\n return isRecord(body) && typeof body.code === \"string\" ? body.code : undefined;\n}\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 */\nexport function apiErrorMessage(error: ApiError): string {\n const body = error.body;\n if (!isRecord(body)) {\n return error.message;\n }\n const serverMessage = typeof body.message === \"string\" ? body.message : undefined;\n const detail = pickDetailString(body.details);\n if (!serverMessage) {\n return error.message;\n }\n return detail ? `${serverMessage}: ${detail}` : serverMessage;\n}\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: unknown): string | undefined {\n if (typeof details === \"string\") {\n return details;\n }\n if (isRecord(details)) {\n if (typeof details.details === \"string\") {\n return details.details;\n }\n if (typeof details.message === \"string\") {\n return details.message;\n }\n }\n return undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n"],"mappings":";;;AAGA,MAAa,cAAc;AAG3B,MAAM,+BAAe,IAAI,IAAI;CAAC;CAAO;CAAQ;AAAS,CAAC;;AAGvD,MAAM,eAAe;;;;;;;;;;;;AAarB,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;;;;;;CAMA;CAEA,YAAY,QAAgB,KAAa,MAAe,SAAiB,WAAoB;EAC3F,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,KAAK,MAAM;EACX,KAAK,OAAO;EACZ,KAAK,YAAY;CACnB;AACF;;;;;;;;;;;AAYA,IAAa,eAAb,cAAkC,MAAM;CACtC;;CAEA;CAEA,YACE,KACA,QACA,SACA,SACA;EACA,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO;EACZ,KAAK,MAAM;EACX,KAAK,SAAS;CAChB;AACF;AAcA,IAAI,gBAA+B,CAAC;AAEpC,SAAgB,iBAAiB,QAA6B;CAC5D,gBAAgB;AAClB;;;;;;;;;;;;;;;;;;;;;;;AAwBA,eAAsB,YAAe,KAAa,SAAkC;CAGlF,MAAM,SAAS;CACf,MAAM,QAAQ,gBAAgB;CAC9B,MAAM,UAAU,IAAI,QAAQ,QAAQ,OAAO;CAC3C,IAAI,SAAS,CAAC,QAAQ,IAAI,eAAe,GACvC,QAAQ,IAAI,iBAAiB,UAAU,OAAO;CAEhD,MAAM,UAAU,QAAQ,UAAU,MAAA,CAAO,YAAY;CACrD,MAAM,SAAS,CAAC,aAAa,IAAI,MAAM,KA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E,KAAK,KAAK;CACrB;AACF;;;;;;AAOA,SAAgB,aAAa,aAA0C;CACrE,MAAM,OAAO,uBAAuB,WAAW,YAAY,OAAO;CAClE,OAAO,SAAS,IAAI,KAAK,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,KAAA;AACvE;;;;;;;;AASA,SAAgB,gBAAgB,OAAyB;CACvD,MAAM,OAAO,MAAM;CACnB,IAAI,CAAC,SAAS,IAAI,GAChB,OAAO,MAAM;CAEf,MAAM,gBAAgB,OAAO,KAAK,YAAY,WAAW,KAAK,UAAU,KAAA;CACxE,MAAM,SAAS,iBAAiB,KAAK,OAAO;CAC5C,IAAI,CAAC,eACH,OAAO,MAAM;CAEf,OAAO,SAAS,GAAG,cAAc,IAAI,WAAW;AAClD;;;;;;;AAQA,SAAS,iBAAiB,SAAsC;CAC9D,IAAI,OAAO,YAAY,UACrB,OAAO;CAET,IAAI,SAAS,OAAO,GAAG;EACrB,IAAI,OAAO,QAAQ,YAAY,UAC7B,OAAO,QAAQ;EAEjB,IAAI,OAAO,QAAQ,YAAY,UAC7B,OAAO,QAAQ;CAEnB;AAEF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E"}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { s as customFetch } from "./fetch-
|
|
1
|
+
import { $c as ListMyPasskeysParams, $f as GetMySessionParams, $r as QuerySessionsBody, $u as InitClaim201, $v as CreateReleaseParams, $y as CreateIdp200, Af as GetPolicy200, Ao as PatchProject200, Bh as GetDeploymentVariables200, Bv as CreateSession201, C as UpdateTeamBody, Cc as ListPoliciesParams, Cl as ListIdpRevisions200, Cy as CreateIdpParams, Df as GetPolicyRevision200, Ds as ListUserIdentityLinksParams, Ec as ListPolicies200, Fa as QueryGrants200, Fg as GetAuthAttempt200, GC as BuildReleaseParams, Gc as ListMyProjects200, Gf as GetMyUser200, Gi as QueryIdpsParams, Gs as ListSchemas200, H_ as DeleteGrantParams, Hu as IssueChallenge201, If as GetMyUserSchema200, Iu as ListBranding200Item, Iv as CreateSessionBody, Jr as QueryTeams200, KS as CreateBrandingBody, Kg as FinishUserPasskeyRegistrationBody, L as SubmitFlowStepBody, Lc as ListMyProjectsParams, Lh as GetEvent200, Li as QueryProjects200, MC as CompleteClaimBody, MS as CreateDeployment200, No as PatchMyUserBody, Np as GetIdpRevisionById200, Nv as CreateTeam201, Oc as ListMyTeamsParams, Od as GetUserByID200, Of as GetPolicyParams, P as UpdateTeam200, Pc as ListMyTeams200, Pl as ListFlowDefinitionsParams, Pm as GetFlowStep200, Pu as ListBrandingParams, Px as CreateFlow201, Q_ as CreateUserBody, Qa as PatchUserByIDBody, Qo as ListUserTeamsParams, Qv as CreateSchema201, Rh as GetDeploymentVariablesParams, Ru as IssueChallengeBody, Rw as BuildRelease201, Sd as GetUserByIDParams, Sg as GetBrandingById200, Si as QueryProjectsBody, Sn as RollbackDeployment200, Sp as GetLiveDefault, T_ as DeleteVariableParams, Tf as GetPolicyRevisionParams, Tp as GetIdpRevisionByIdParams, Ts as ListUserPasskeys200, Tx as CreateFlowBody, Ty as CreateIdpBody, Ub as CreateFlowDefinitionBody, Uh as GetDeploymentById200, Up as GetIdpByIdParams, Uw as BuildRelease200, Uy as CreateIdp201, Vd as GetTeam200, Vh as GetDeploymentByIdParams, Vl as ListFlowDefinitions200, Vs as ListSchemasParams, WC as CompleteClaim200, WS as CreateBrandingParams, Wn as RevokeRelease200, Wo as PatchMyUser200, X_ as CreateUserParams, Xa as PublishPolicy201, Xd as GetSession200, Ya as PublishPolicyBody, Yn as RevokeMySessionParams, Ys as ListReleasesParams, Yv as CreateSchemaParams, Yw as BeginUserPasskeyRegistrationBody, Zp as GetIdpById200, Zr as QuerySessionsParams, Zs as ListReleases200, Zt as SetUserPasswordBody, Zv as CreateSchemaBody, _c as ListPreviews200, _p as GetMyPasswordStateParams, a as VerifyChallengeProof200, aC as CreateBranding201, a_ as ExchangeHandoffParams, al as ListMyPasskeys200, ap as GetMySessionCsrfToken200, bS as CreateDeployment201, br as QueryUsers200, bt as SubmitFlowStep200, bv as CreateTeamBody, by as CreateProject201, ca as QueryIdps200, cg as GetClaimStatusParams, dT as AddOrigin201, dc as ListProjectAdmins200, df as GetReleaseById200, dh as GetFlowDefinition200, ed as GetVariablesParams, fS as CreateDeploymentBody, fb as CreateHandoff200, fi as QuerySessions200, g_ as ExchangeHandoff200, gf as GetReadyDefault, gm as GetGrant200, gu as ListEvents200, h as UpdateVariablesParams, hb as CreateGrantBody, hc as ListPreviewsParams, hl as ListIdpRevisionsParams, hy as CreateProjectBody, i_ as FinishUserPasskeyRegistration201, if as GetSchemaByIdParams, in as RollbackDeploymentParams, ir as QueryUsersParams, iy as CreateRelease201, jb as CreateGrant201, jf as GetMyUserSchemaParams, jo as PatchMyUserParams, jr as QueryTeamsBody, kh as GetEventParams, kr as QueryTeamsParams, lT as AddOriginBody, ld as GetVariable200, lf as GetReleaseByIdParams, lp as GetMySession200, ly as CreateRelease200, n as VerifyChallengeProofBody, oT as BeginUserPasskeyRegistration201, od as GetVariableParams, of as GetSchemaById200, on as RollbackDeploymentBody, or as QueryUsersBody, ou as ListEventsParams, ox as CreateFlowDefinition201, pb as CreateGrantParams, pl as ListMyIdentityLinks200, ps as ListUserPasskeysParams, qC as BuildReleaseBody, qa as PublishPolicyParams, qi as QueryIdpsBody, rd as GetVariables200, rr as RemoveOriginBody, s_ as ExchangeHandoffBody, sg as GetClaimWindow200, sl as ListMyIdentityLinksParams, sm as GetGrantParams, tc as ListProjectAdminsParams, tg as GetClaimWindowParams, tp as GetMySessionCsrfTokenParams, tr as RemovePreviewBody, ty as CreateReleaseBody, uS as CreateDeploymentParams, un as RollbackDeployment201, uo as PatchUserByID200, us as ListUserTeams200, uv as CreateUser201, v as UpdateVariablesBody, vC as CreateAuthAttemptBody, vg as GetClaimStatus200, vu as ListDeploymentsParams, vv as CreateTeamParams, wf as GetProject200, xC as CreateAuthAttempt201, xa as QueryGrantsBody, xc as ListPolicyRevisions200, xd as GetUserPasswordState200, xp as GetMyPasswordState200, xu as ListDeployments200, y as UpdateVariables200, ya as QueryGrantsParams, yc as ListPolicyRevisionsParams, yo as PatchProjectBody, zf as GetMyUserParams, zn as RevokeReleaseParams, zs as ListUserIdentityLinks200 } from "./index-D7-l5LV6.mjs";
|
|
2
|
+
import { s as customFetch } from "./fetch-CtYe0OvX.mjs";
|
|
3
3
|
declare namespace zitadelNextGen_d_exports {
|
|
4
|
-
export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl,
|
|
4
|
+
export { addOrigin, beginUserPasskeyRegistration, buildRelease, completeClaim, createAuthAttempt, createBranding, createDeployment, createFlow, createFlowDefinition, createGrant, createHandoff, createIdp, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteGrant, deleteTeam, deleteUserByID, deleteVariable, exchangeHandoff, finishUserPasskeyRegistration, getAddOriginUrl, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getBuildReleaseUrl, getClaimStatus, getClaimWindow, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateDeploymentUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateIdpUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getDeleteVariableUrl, getDeploymentById, getDeploymentVariables, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetClaimWindowUrl, getGetDeploymentByIdUrl, getGetDeploymentVariablesUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, 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, updateTeam, updateVariables, verifyChallengeProof };
|
|
5
5
|
}
|
|
6
|
-
declare const getGetHealthUrl: () => string;
|
|
7
|
-
/**
|
|
8
|
-
* Check whether the server is healthy
|
|
9
|
-
* @summary Check server health
|
|
10
|
-
*/
|
|
11
|
-
declare const getHealth: (options?: Parameters<typeof customFetch>[1]) => Promise<GetHealthDefault>;
|
|
12
6
|
declare const getGetLiveUrl: () => string;
|
|
13
7
|
/**
|
|
14
|
-
*
|
|
8
|
+
* Answers `ok` while the server process serves HTTP, and checks nothing behind it.
|
|
9
|
+
*
|
|
10
|
+
* Point a liveness probe here. It never checks the database, so an outage
|
|
11
|
+
* of the database does not restart every instance; `GET /readyz` takes an
|
|
12
|
+
* instance out of rotation instead.
|
|
15
13
|
* @summary Check server liveness
|
|
16
14
|
*/
|
|
17
15
|
declare const getLive: (options?: Parameters<typeof customFetch>[1]) => Promise<GetLiveDefault>;
|
|
18
16
|
declare const getGetReadyUrl: () => string;
|
|
19
17
|
/**
|
|
20
|
-
*
|
|
18
|
+
* Answers whether the server can serve requests, which takes its database answering within a second.
|
|
19
|
+
*
|
|
20
|
+
* Point a readiness probe here, so that a server whose database does not
|
|
21
|
+
* answer gets no requests until it does. The check is one round trip to the
|
|
22
|
+
* database.
|
|
21
23
|
* @summary Check server readiness
|
|
22
24
|
*/
|
|
23
25
|
declare const getReady: (options?: Parameters<typeof customFetch>[1]) => Promise<GetReadyDefault>;
|
|
@@ -197,14 +199,20 @@ declare const getGetMyPasswordStateUrl: (params?: GetMyPasswordStateParams) => s
|
|
|
197
199
|
declare const getMyPasswordState: (params?: GetMyPasswordStateParams, options?: Parameters<typeof customFetch>[1]) => Promise<GetMyPasswordState200>;
|
|
198
200
|
declare const getListMyProjectsUrl: (params?: ListMyProjectsParams) => string;
|
|
199
201
|
/**
|
|
200
|
-
* The projects the signed-in user
|
|
201
|
-
* through a team they are a member of.
|
|
202
|
-
*
|
|
202
|
+
* The projects the signed-in user can act on: those they hold an active grant
|
|
203
|
+
* on, either directly or through a team they are a member of. For a platform
|
|
204
|
+
* operator (ADR 075) that is every project of the deployment. Ordered by
|
|
205
|
+
* project id and paged with an opaque cursor.
|
|
203
206
|
*
|
|
204
207
|
* This is not the same question as `queryProjects`, which answers with the one
|
|
205
208
|
* project the calling credential is bound to. Here the session is the caller
|
|
206
209
|
* and the grants are the answer, so the list spans projects.
|
|
207
210
|
*
|
|
211
|
+
* With `name_contains`, only the projects whose name contains that text are
|
|
212
|
+
* listed. The search runs on the server together with the grants, so it
|
|
213
|
+
* reaches every project the user can act on, however many there are, and
|
|
214
|
+
* pages like the full list.
|
|
215
|
+
*
|
|
208
216
|
* With `project_id`, the projects are listed only when the session belongs to
|
|
209
217
|
* that project. It names the project the session was signed in to, not one to
|
|
210
218
|
* list.
|
|
@@ -246,7 +254,10 @@ declare const getCreateFlowUrl: () => string;
|
|
|
246
254
|
* pattern with no live preview answers `403` with `proj.preview_not_live`;
|
|
247
255
|
* nothing deployed to the target answers `409` with `rel.not_deployed`; a
|
|
248
256
|
* revoked release answers `409` with `rel.revoked`. A request with no
|
|
249
|
-
* `Origin` passes the gate and still needs a deployment target.
|
|
257
|
+
* `Origin` passes the gate and still needs a deployment target. A loopback
|
|
258
|
+
* origin passes it too, and so does the server's own origin, from which its
|
|
259
|
+
* console previews a project's login; a step submitted from the server's
|
|
260
|
+
* own origin is still refused unless the project lists it.
|
|
250
261
|
*
|
|
251
262
|
* The response contains an `id` field — the flow handle. Use it as the path
|
|
252
263
|
* parameter for all subsequent `/flow/{id}/submit` calls.
|
|
@@ -337,10 +348,10 @@ declare const getCreateAuthAttemptUrl: () => string;
|
|
|
337
348
|
* also include session_id and that session's session_token to add factors to an existing session.
|
|
338
349
|
*
|
|
339
350
|
* The project comes from the project secret. A body `project_id` that disagrees
|
|
340
|
-
* answers `403` with `proj.mismatch`.
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
351
|
+
* answers `403` with `proj.mismatch`. Sealed `deployment_id` / `release_id` are
|
|
352
|
+
* filled only when create runs with a runtime resolution already on the
|
|
353
|
+
* context (the flow create path); this HTTP entry point does not resolve
|
|
354
|
+
* Origin or refuse a revoked release itself.
|
|
344
355
|
* @summary Create a new authentication attempt
|
|
345
356
|
*/
|
|
346
357
|
declare const createAuthAttempt: (createAuthAttemptBody: CreateAuthAttemptBody, options?: Parameters<typeof customFetch>[1]) => Promise<CreateAuthAttempt201>;
|
|
@@ -353,9 +364,6 @@ declare const getGetAuthAttemptUrl: (attemptId: string) => string;
|
|
|
353
364
|
*
|
|
354
365
|
* Use this for polling during long-running factor verifications (e.g., waiting for
|
|
355
366
|
* a federated IdP callback or a device flow).
|
|
356
|
-
*
|
|
357
|
-
* Reuses the deployment sealed when the attempt was created. If that release
|
|
358
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
359
367
|
* @summary Get authentication attempt state
|
|
360
368
|
*/
|
|
361
369
|
declare const getAuthAttempt: (attemptId: string, options?: Parameters<typeof customFetch>[1]) => Promise<GetAuthAttempt200>;
|
|
@@ -367,9 +375,6 @@ declare const getIssueChallengeUrl: (attemptId: string) => string;
|
|
|
367
375
|
* (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
|
|
368
376
|
* including method, metadata, and any UI hints. The client then verifies the proof
|
|
369
377
|
* by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
|
|
370
|
-
*
|
|
371
|
-
* Reuses the deployment sealed when the attempt was created. If that release
|
|
372
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
373
378
|
* @summary Issue a factor challenge
|
|
374
379
|
*/
|
|
375
380
|
declare const issueChallenge: (attemptId: string, issueChallengeBody: IssueChallengeBody, options?: Parameters<typeof customFetch>[1]) => Promise<IssueChallenge201>;
|
|
@@ -385,9 +390,6 @@ declare const getVerifyChallengeProofUrl: (attemptId: string, challengeId: strin
|
|
|
385
390
|
*
|
|
386
391
|
* On successful verification, the factor is written to the auth attempt.
|
|
387
392
|
* The attempt moves to the next pending challenge or completes if all required factors are verified.
|
|
388
|
-
*
|
|
389
|
-
* Reuses the deployment sealed when the attempt was created. If that release
|
|
390
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
391
393
|
* @summary Verify a factor proof
|
|
392
394
|
*/
|
|
393
395
|
declare const verifyChallengeProof: (attemptId: string, challengeId: string, verifyChallengeProofBody: VerifyChallengeProofBody, options?: Parameters<typeof customFetch>[1]) => Promise<VerifyChallengeProof200>;
|
|
@@ -404,8 +406,7 @@ declare const getCreateHandoffUrl: (attemptId: string) => string;
|
|
|
404
406
|
* - Audience-bound (requires matching project key for exchange)
|
|
405
407
|
* - Idempotency-safe within a 5-minute window (see conventions)
|
|
406
408
|
*
|
|
407
|
-
*
|
|
408
|
-
* was revoked since, the response is `409` with `rel.revoked`.
|
|
409
|
+
* Revoke refusal for a sealed release happens at handoff exchange, not here.
|
|
409
410
|
* @summary Complete authentication and create handoff token
|
|
410
411
|
*/
|
|
411
412
|
declare const createHandoff: (attemptId: string, options?: Parameters<typeof customFetch>[1]) => Promise<CreateHandoff200>;
|
|
@@ -443,6 +444,39 @@ declare const getPatchProjectUrl: (projectId: string) => string;
|
|
|
443
444
|
* @summary Update project
|
|
444
445
|
*/
|
|
445
446
|
declare const patchProject: (projectId: string, patchProjectBody: PatchProjectBody, options?: Parameters<typeof customFetch>[1]) => Promise<PatchProject200>;
|
|
447
|
+
declare const getListProjectAdminsUrl: (projectId: string, params?: ListProjectAdminsParams) => string;
|
|
448
|
+
/**
|
|
449
|
+
* Lists the people who can administer the project, and how each of them
|
|
450
|
+
* gets that access. A person appears once, with one entry in `sources` per
|
|
451
|
+
* way they hold it:
|
|
452
|
+
*
|
|
453
|
+
* - `owning_team`: an active member of the team that owns the project
|
|
454
|
+
* (ADR 054 §2). Removing a grant does not remove this access; it ends
|
|
455
|
+
* only when the person leaves the team or the project changes owner.
|
|
456
|
+
* - `grant`: an unexpired `admin` grant on the project, either to the
|
|
457
|
+
* person (`grant_id` only) or to a team they are an active member of
|
|
458
|
+
* (`grant_id` and `team`). Revoking that grant removes this source.
|
|
459
|
+
*
|
|
460
|
+
* The list follows the authorization check: team membership is read from
|
|
461
|
+
* the same membership projection the check expands, so a person who left a
|
|
462
|
+
* team, or whose team or user was deactivated, is not listed through it.
|
|
463
|
+
* Grants that expired or carry a lower role are left out. A person whose
|
|
464
|
+
* only access is a `viewer` or `editor` grant is not an admin and is not
|
|
465
|
+
* listed. Like the check, the list does not look at a person's user status
|
|
466
|
+
* beyond that, so a direct grant to a suspended person is listed.
|
|
467
|
+
*
|
|
468
|
+
* A person whose access comes only through teams the caller is not a
|
|
469
|
+
* member of is left out, and a team the caller is not in is named by
|
|
470
|
+
* `team_id` only. The grant to such a team still shows in the project's
|
|
471
|
+
* grants.
|
|
472
|
+
*
|
|
473
|
+
* Ordered by `user_id` and paginated with `page_token`.
|
|
474
|
+
*
|
|
475
|
+
* Accepts either a project secret (`oauth2`) or a user-bound Console
|
|
476
|
+
* session cookie (`nextgenSession`) that can read the project.
|
|
477
|
+
* @summary List project admins
|
|
478
|
+
*/
|
|
479
|
+
declare const listProjectAdmins: (projectId: string, params?: ListProjectAdminsParams, options?: Parameters<typeof customFetch>[1]) => Promise<ListProjectAdmins200>;
|
|
446
480
|
declare const getInitClaimUrl: (projectId: string) => string;
|
|
447
481
|
/**
|
|
448
482
|
* Starts a claim challenge for an unclaimed project. Authenticated by the
|
|
@@ -867,6 +901,68 @@ declare const getGetIdpRevisionByIdUrl: (revisionId: string, params: GetIdpRevis
|
|
|
867
901
|
* @summary Get one revision of an identity provider connection
|
|
868
902
|
*/
|
|
869
903
|
declare const getIdpRevisionById: (revisionId: string, params: GetIdpRevisionByIdParams, options?: Parameters<typeof customFetch>[1]) => Promise<GetIdpRevisionById200>;
|
|
904
|
+
declare const getListPoliciesUrl: (params: ListPoliciesParams) => string;
|
|
905
|
+
/**
|
|
906
|
+
* Lists the project's policies, one per operation, each as its newest
|
|
907
|
+
* revision, ordered by `created_at` (first publish) and then `id`. Filter
|
|
908
|
+
* by `operation` to read the policy of one operation; a project that never
|
|
909
|
+
* published one gets an empty list.
|
|
910
|
+
*
|
|
911
|
+
* The lookup is scoped to the project in `project_id`.
|
|
912
|
+
* @summary List policies
|
|
913
|
+
*/
|
|
914
|
+
declare const listPolicies: (params: ListPoliciesParams, options?: Parameters<typeof customFetch>[1]) => Promise<ListPolicies200>;
|
|
915
|
+
declare const getPublishPolicyUrl: (params: PublishPolicyParams) => string;
|
|
916
|
+
/**
|
|
917
|
+
* Publishes the project's policy for an operation as a new immutable
|
|
918
|
+
* revision, creating the policy on its first publish. The newest revision
|
|
919
|
+
* applies to the next time the operation runs; nothing already stored is
|
|
920
|
+
* re-evaluated, so a stricter password policy applies the next time a
|
|
921
|
+
* password is set.
|
|
922
|
+
*
|
|
923
|
+
* The request is typed by `operation`: an unknown operation or setting, or
|
|
924
|
+
* a value of the wrong type or outside its bounds, answers `req.invalid`
|
|
925
|
+
* like any malformed request. The operation's template then checks the
|
|
926
|
+
* config again, together with the rules that relate settings to each other
|
|
927
|
+
* (a `min_length` above `max_length`), and answers `pol.invalid`. Its
|
|
928
|
+
* `details.details.violations` lists everything that failed, settings
|
|
929
|
+
* first, then rules: `{"setting": "min_length"}` for one setting, or
|
|
930
|
+
* `{"config_rule": "min_length_not_above_max_length", "settings":
|
|
931
|
+
* ["min_length", "max_length"]}` for a rule across settings, with the
|
|
932
|
+
* settings it reads. A setting left out is off, and `{}` switches every
|
|
933
|
+
* rule off; there are no defaults.
|
|
934
|
+
* @summary Publish a policy
|
|
935
|
+
*/
|
|
936
|
+
declare const publishPolicy: (publishPolicyBody: PublishPolicyBody, params: PublishPolicyParams, options?: Parameters<typeof customFetch>[1]) => Promise<PublishPolicy201>;
|
|
937
|
+
declare const getGetPolicyUrl: (policyId: string, params: GetPolicyParams) => string;
|
|
938
|
+
/**
|
|
939
|
+
* Reads a policy as its newest revision, the one that applies the next time
|
|
940
|
+
* its operation runs.
|
|
941
|
+
*
|
|
942
|
+
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
943
|
+
* project answers not found exactly as an unknown id does.
|
|
944
|
+
* @summary Get a policy
|
|
945
|
+
*/
|
|
946
|
+
declare const getPolicy: (policyId: string, params: GetPolicyParams, options?: Parameters<typeof customFetch>[1]) => Promise<GetPolicy200>;
|
|
947
|
+
declare const getListPolicyRevisionsUrl: (policyId: string, params: ListPolicyRevisionsParams) => string;
|
|
948
|
+
/**
|
|
949
|
+
* Returns every revision of one policy, newest first, paginated with a
|
|
950
|
+
* cursor. The order is fixed, so there is no `sorting`.
|
|
951
|
+
*
|
|
952
|
+
* The lookup is scoped to the project in `project_id`: a policy of another
|
|
953
|
+
* project answers not found exactly as an unknown id does.
|
|
954
|
+
* @summary List the revisions of a policy
|
|
955
|
+
*/
|
|
956
|
+
declare const listPolicyRevisions: (policyId: string, params: ListPolicyRevisionsParams, options?: Parameters<typeof customFetch>[1]) => Promise<ListPolicyRevisions200>;
|
|
957
|
+
declare const getGetPolicyRevisionUrl: (revisionId: string, params: GetPolicyRevisionParams) => string;
|
|
958
|
+
/**
|
|
959
|
+
* Reads one revision of a policy, newest or not.
|
|
960
|
+
*
|
|
961
|
+
* The lookup is scoped to the project in `project_id`: a revision of another
|
|
962
|
+
* project answers not found exactly as an unknown id does.
|
|
963
|
+
* @summary Get a policy revision
|
|
964
|
+
*/
|
|
965
|
+
declare const getPolicyRevision: (revisionId: string, params: GetPolicyRevisionParams, options?: Parameters<typeof customFetch>[1]) => Promise<GetPolicyRevision200>;
|
|
870
966
|
declare const getCreateReleaseUrl: (params: CreateReleaseParams) => string;
|
|
871
967
|
/**
|
|
872
968
|
* Assembles a release from existing revisions, given as
|
|
@@ -918,7 +1014,9 @@ declare const getBuildReleaseUrl: (params: BuildReleaseParams) => string;
|
|
|
918
1014
|
* allocates nothing, however long ago it was built. Otherwise every resource is compared against the
|
|
919
1015
|
* project's newest revision of the same handle: unchanged content reuses
|
|
920
1016
|
* that revision, changed content allocates a new one, and the request
|
|
921
|
-
* answers `201` with the new release.
|
|
1017
|
+
* answers `201` with the new release. A policy whose config matches only an
|
|
1018
|
+
* older revision allocates a new one too, so a request that resolves no
|
|
1019
|
+
* release, which reads the newest revision, applies it as well. Metadata is excluded from the
|
|
922
1020
|
* comparison, so the same content under a different `message` is the same
|
|
923
1021
|
* release.
|
|
924
1022
|
*
|
|
@@ -932,8 +1030,8 @@ declare const getBuildReleaseUrl: (params: BuildReleaseParams) => string;
|
|
|
932
1030
|
*
|
|
933
1031
|
* Building writes revisions, so besides `release.write` it needs the write
|
|
934
1032
|
* scope of every kind the bundle carries a resource of: `schema.write`,
|
|
935
|
-
* `flow_definition.write`, `branding.write
|
|
936
|
-
* per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
|
|
1033
|
+
* `flow_definition.write`, `branding.write`, `idp.write` and
|
|
1034
|
+
* `policy.write`, as the per-kind create endpoints do. A missing scope answers `403` with `rel.permission_denied`,
|
|
937
1035
|
* naming the kind. An empty kind needs no scope.
|
|
938
1036
|
*
|
|
939
1037
|
* Building a release does not deploy it. A release is not tied to an
|
|
@@ -1159,11 +1257,11 @@ declare const getCreateDeploymentUrl: (params: CreateDeploymentParams) => string
|
|
|
1159
1257
|
* - `400 dep.invalid`: both or neither of `release_id` and `content_hash`;
|
|
1160
1258
|
* a primary origin named exactly; `primary` mixed with preview URLs;
|
|
1161
1259
|
* `primary` on a project with no primary origin; `ttl` with `primary`;
|
|
1162
|
-
* `ttl` above
|
|
1260
|
+
* `ttl` above 365 days (`P365D`).
|
|
1163
1261
|
* - `400 dep.variables_missing`: a referenced variable has no value for
|
|
1164
1262
|
* the kind; `details` names the kind and every missing variable.
|
|
1165
1263
|
* - `403 proj.origin_not_allowed`: a preview URL matches no preview
|
|
1166
|
-
* pattern.
|
|
1264
|
+
* pattern, or is a loopback URL.
|
|
1167
1265
|
* - `404 rel.not_found`: the release id or digest names no release here.
|
|
1168
1266
|
* - `409 dep.conflict`: `expected_deployment_id` is not the deployment
|
|
1169
1267
|
* this write replaces; `details.deployment` is that deployment.
|
|
@@ -1230,5 +1328,5 @@ declare const getGetDeploymentVariablesUrl: (deploymentId: string, params: GetDe
|
|
|
1230
1328
|
*/
|
|
1231
1329
|
declare const getDeploymentVariables: (deploymentId: string, params: GetDeploymentVariablesParams, options?: Parameters<typeof customFetch>[1]) => Promise<GetDeploymentVariables200>;
|
|
1232
1330
|
//#endregion
|
|
1233
|
-
export { getEvent as $,
|
|
1234
|
-
//# sourceMappingURL=zitadelNextGen-
|
|
1331
|
+
export { getEvent as $, listPolicies as $n, getListSchemasUrl as $t, getClaimStatus as A, getSchemaById as An, getGetUserByIDUrl as At, getCreateIdpUrl as B, getVariables as Bn, getListDeploymentsUrl as Bt, exchangeHandoff as C, getReleaseById as Cn, rollbackDeployment as Cr, getGetPolicyUrl as Ct, getBeginUserPasskeyRegistrationUrl as D, getRevokeReleaseUrl as Dn, updateVariables as Dr, getGetSchemaByIdUrl as Dt, getAuthAttempt as E, getRevokeMySessionUrl as En, updateTeam as Er, getGetReleaseByIdUrl as Et, getCreateDeploymentUrl as F, getUpdateTeamUrl as Fn, getIdpById as Ft, getCreateTeamUrl as G, listDeployments as Gn, getListMyPasskeysUrl as Gt, getCreateReleaseUrl as H, initClaim as Hn, getListFlowDefinitionsUrl as Ht, getCreateFlowDefinitionUrl as I, getUpdateVariablesUrl as In, getIdpRevisionById as It, getDeleteTeamUrl as J, listIdpRevisions as Jn, getListPoliciesUrl as Jt, getCreateUserUrl as K, listEvents as Kn, getListMyProjectsUrl as Kt, getCreateFlowUrl as L, getUserByID as Ln, getInitClaimUrl as Lt, getCompleteClaimUrl as M, getSetUserPasswordUrl as Mn, getGetVariableUrl as Mt, getCreateAuthAttemptUrl as N, getSubmitFlowStepUrl as Nn, getGetVariablesUrl as Nt, getBrandingById as O, getRevokeSessionUrl as On, verifyChallengeProof as Or, getGetSessionUrl as Ot, getCreateBrandingUrl as P, getTeam as Pn, getGrant as Pt, getDeploymentVariables as Q, listMyTeams as Qn, getListReleasesUrl as Qt, getCreateGrantUrl as R, getUserPasswordState as Rn, getIssueChallengeUrl as Rt, deleteVariable as S, getReady as Sn, revokeSession as Sr, getGetPolicyRevisionUrl as St, getAddOriginUrl as T, getRemovePreviewUrl as Tn, submitFlowStep as Tr, getGetReadyUrl as Tt, getCreateSchemaUrl as U, issueChallenge as Un, getListIdpRevisionsUrl as Ut, getCreateProjectUrl as V, getVerifyChallengeProofUrl as Vn, getListEventsUrl as Vt, getCreateSessionUrl as W, listBranding as Wn, getListMyIdentityLinksUrl as Wt, getDeleteVariableUrl as X, listMyPasskeys as Xn, getListPreviewsUrl as Xt, getDeleteUserByIDUrl as Y, listMyIdentityLinks as Yn, getListPolicyRevisionsUrl as Yt, getDeploymentById as Z, listMyProjects as Zn, getListProjectAdminsUrl as Zt, createTeam as _, getQueryIdpsUrl as _n, queryUsers as _r, getGetMyPasswordStateUrl as _t, createAuthAttempt as a, getMySession as an, listUserIdentityLinks as ar, getGetBrandingByIdUrl as at, deleteTeam as b, getQueryTeamsUrl as bn, revokeMySession as br, getGetMyUserSchemaUrl as bt, createFlow as c, getMyUserSchema as cn, patchMyUser as cr, getGetDeploymentByIdUrl as ct, createHandoff as d, getPatchUserByIDUrl as dn, publishPolicy as dr, getGetFlowDefinitionUrl as dt, getListUserIdentityLinksUrl as en, listPolicyRevisions as er, getExchangeHandoffUrl as et, createIdp as f, getPolicy as fn, queryGrants as fr, getGetFlowStepUrl as ft, createSession as g, getQueryGrantsUrl as gn, queryTeams as gr, getGetLiveUrl as gt, createSchema as h, getPublishPolicyUrl as hn, querySessions as hr, getGetIdpRevisionByIdUrl as ht, completeClaim as i, getMyPasswordState as in, listSchemas as ir, getGetAuthAttemptUrl as it, getClaimWindow as j, getSession as jn, getGetUserPasswordStateUrl as jt, getBuildReleaseUrl as k, getRollbackDeploymentUrl as kn, zitadelNextGen_d_exports as kr, getGetTeamUrl as kt, createFlowDefinition as l, getPatchMyUserUrl as ln, patchProject as lr, getGetDeploymentVariablesUrl as lt, createRelease as m, getProject as mn, queryProjects as mr, getGetIdpByIdUrl as mt, beginUserPasskeyRegistration as n, getListUserTeamsUrl as nn, listProjectAdmins as nr, getFlowDefinition as nt, createBranding as o, getMySessionCsrfToken as on, listUserPasskeys as or, getGetClaimStatusUrl as ot, createProject as p, getPolicyRevision as pn, queryIdps as pr, getGetGrantUrl as pt, getDeleteGrantUrl as q, listFlowDefinitions as qn, getListMyTeamsUrl as qt, buildRelease as r, getLive as rn, listReleases as rr, getFlowStep as rt, createDeployment as s, getMyUser as sn, listUserTeams as sr, getGetClaimWindowUrl as st, addOrigin as t, getListUserPasskeysUrl as tn, listPreviews as tr, getFinishUserPasskeyRegistrationUrl as tt, createGrant as u, getPatchProjectUrl as un, patchUserByID as ur, getGetEventUrl as ut, createUser as v, getQueryProjectsUrl as vn, removeOrigin as vr, getGetMySessionCsrfTokenUrl as vt, finishUserPasskeyRegistration as w, getRemoveOriginUrl as wn, setUserPassword as wr, getGetProjectUrl as wt, deleteUserByID as x, getQueryUsersUrl as xn, revokeRelease as xr, getGetMyUserUrl as xt, deleteGrant as y, getQuerySessionsUrl as yn, removePreview as yr, getGetMySessionUrl as yt, getCreateHandoffUrl as z, getVariable as zn, getListBrandingUrl as zt };
|
|
1332
|
+
//# sourceMappingURL=zitadelNextGen-Cw3DrCn1.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zitadelNextGen-Cw3DrCn1.d.mts","names":[],"sources":["../src/generated/endpoints/zitadelNextGen.ts"],"mappings":";;;;;cA8Ma;;;;;;;;;cAgBA,UAAkB,UAAU,kBAAkB,oBAAkB,QAAQ;cAaxE;;;;;;;;;cAgBA,WAAmB,UAAU,kBAAkB,oBAAkB,QAAQ;cAazE,mBAAoB,QAAQ;;;;;;;;;cAuB5B,aAAoB,gBAAgB,gBAC7C,QAAQ,kBAAkB,UAAU,kBAAkB,oBAAkB,QAAQ;cA2BvE,mBAAoB,SAAS;;;;;;;;;;;;cA0B7B,aAAoB,gBAAgB,gBAC7C,SAAS,kBAAkB,UAAU,kBAAkB,oBAAkB,QAAQ;cA2BxE,oBAAqB,gBAC9B,SAAS;;;;;;;;cAsBA,cAAqB,gBAC9B,SAAS,mBAAmB,UAAU,kBAAkB,oBAAkB,QAAQ;cAazE,sBAAuB;;;;;;;;cAevB,gBAAuB,gBAChC,mBAAmB,mBAAmB,UAAU,kBAAkB,oBAAkB,QAAQ;cA2BnF,uBAAwB;;;;;;;;;cAgBxB,iBAAwB,gBAAgB,UAAU,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,QAAQ;;;;;;;;;;;;;;;;;;;cAyCjC,kBAAyB,QAAQ,uBAAuB,UAAU,kBAAkB,oBAAkB,QAAQ;cAa9G,0BAA2B,sBACpC,QAAQ;;;;;;;;;;cAwBC,oBAA2B,sBACpC,QAAQ,yBAAyB,UAAU,kBAAkB,oBAAkB,QAAQ;cAa9E,2BAA4B,sBACrC,QAAQ;;;;;;;;;;;;;;;;;;cAgCC,qBAA4B,sBACrC,QAAQ,0BACR,yBAAyB,wBAAwB,UAAU,kBAAkB,oBAAkB,QAAQ,wBAAwB;cA2BtH,+BAAgC,sBACzC,QAAQ;;;;;;;cAqBC,yBAAgC,sBACzC,QAAQ,8BAA8B,UAAU,kBAAkB,oBAAkB,QAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zitadel/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Generated TypeScript API client for the pre-release Zitadel preview.",
|
|
5
5
|
"homepage": "https://github.com/zitadel/nextgen/tree/main/packages/api#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"generate": "node ../../scripts/task-guard.mjs --mutex generated-sources -- orval --config orval.config.ts --clean",
|
|
104
|
-
"build": "tsdown",
|
|
104
|
+
"build": "tsdown && attw --pack . --profile=esm-only",
|
|
105
105
|
"test": "vitest run",
|
|
106
106
|
"test:all": "pnpm run test",
|
|
107
107
|
"typecheck": "tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.spec.json",
|