@zitadel/components 0.1.0-alpha.9 → 1.0.0-alpha.21

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.
Files changed (44) hide show
  1. package/README.md +135 -72
  2. package/dist/atoms/index.d.mts +2 -2
  3. package/dist/atoms/index.mjs +2 -2
  4. package/dist/atoms-DSxjEHca.mjs +2268 -0
  5. package/dist/atoms-DSxjEHca.mjs.map +1 -0
  6. package/dist/default-Dnjq9iBt.mjs +6 -0
  7. package/dist/default-Dnjq9iBt.mjs.map +1 -0
  8. package/dist/index-BlxTxXK8.d.mts +449 -0
  9. package/dist/index-BlxTxXK8.d.mts.map +1 -0
  10. package/dist/index-DFdR16-D.d.mts +1599 -0
  11. package/dist/index-DFdR16-D.d.mts.map +1 -0
  12. package/dist/index-Dx8rvpNs.d.mts +14844 -0
  13. package/dist/index-Dx8rvpNs.d.mts.map +1 -0
  14. package/dist/index.d.mts +22 -8
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +5 -5
  17. package/dist/jsx.d.ts +67 -0
  18. package/dist/manifests.d.mts.map +1 -1
  19. package/dist/manifests.mjs +4 -2
  20. package/dist/manifests.mjs.map +1 -1
  21. package/dist/orchestrator/index.d.mts +3 -3
  22. package/dist/orchestrator/index.mjs +3 -3
  23. package/dist/orchestrator-DG-YwFFE.mjs +5008 -0
  24. package/dist/orchestrator-DG-YwFFE.mjs.map +1 -0
  25. package/dist/standalone.mjs +9172 -5871
  26. package/dist/tokens/index.d.mts +1 -1
  27. package/dist/tokens/index.mjs +1 -1
  28. package/dist/tokens-T4N9VJz3.mjs +452 -0
  29. package/dist/tokens-T4N9VJz3.mjs.map +1 -0
  30. package/package.json +13 -12
  31. package/dist/atoms-B25wiDqb.mjs +0 -1464
  32. package/dist/atoms-B25wiDqb.mjs.map +0 -1
  33. package/dist/default-Cpl78hQN.mjs +0 -6
  34. package/dist/default-Cpl78hQN.mjs.map +0 -1
  35. package/dist/index-DB_JTtln.d.mts +0 -1000
  36. package/dist/index-DB_JTtln.d.mts.map +0 -1
  37. package/dist/index-DVDCrfkv.d.mts +0 -7396
  38. package/dist/index-DVDCrfkv.d.mts.map +0 -1
  39. package/dist/index-EJengPPu.d.mts +0 -249
  40. package/dist/index-EJengPPu.d.mts.map +0 -1
  41. package/dist/orchestrator-CW9zixuw.mjs +0 -3362
  42. package/dist/orchestrator-CW9zixuw.mjs.map +0 -1
  43. package/dist/tokens-BQ_augxi.mjs +0 -244
  44. package/dist/tokens-BQ_augxi.mjs.map +0 -1
@@ -0,0 +1,1599 @@
1
+ import { $ as CreateTeam201, $t as ListUserPasskeysParams, A as CreateFlow201StepChallenge, At as GetReleaseByIdParams, B as CreateGrantParams, Bt as ListBranding200Item, C as CreateBrandingBody, Ct as GetHealthDefault, D as CreateFlow201BrandingLayout, Dt as GetProject200, E as CreateFlow201Branding, Et as GetMyUser200, F as CreateFlowBodyPurpose, Ft as GetUserByID200, G as CreateRelease201, Gt as ListEventsParams, H as CreateProject201, Ht as ListEnvironments200, I as CreateFlowDefinition201, It as GetUserByIDParams, J as CreateSchema201, Jt as ListReleases200, K as CreateReleaseBody, Kt as ListFlowDefinitions200, L as CreateFlowDefinitionBody, Lt as InitClaim201, M as CreateFlow201StepGates, Mt as GetSchemaByIdParams, N as CreateFlow201StepSsoProvidersItem, Nt as GetSession200, O as CreateFlow201Step, Ot as GetReadyDefault, P as CreateFlowBody, Pt as GetTeam200, Q as CreateSessionBody, Qt as ListUserPasskeys200, R as CreateGrant201, Rt as IssueChallenge201, S as CreateBranding201, Sn as VerifyChallengeProofBody, St as GetGrantParams, T as CreateFlow201, Tt as GetMySession200, U as CreateProjectBody, Ut as ListEnvironmentsParams, V as CreateHandoff200, Vt as ListBrandingParams, W as CreateRelease200, Wt as ListEvents200, X as CreateSchemaParams, Xt as ListSchemas200, Y as CreateSchemaBody, Yt as ListReleasesParams, Z as CreateSession201, Zt as ListSchemasParams, _ as BeginUserPasskeyRegistrationBody, _n as UpdateFlowDefinition200, _t as GetEvent200, an as QueryProjectsBody, at as DeleteGrantParams, b as CreateAuthAttempt201, bn as UpdateTeamBody, bt as GetFlowStep200, cn as QuerySessionsParams, ct as ExchangeHandoffParams, dn as QueryTeamsParams, dt as GetAuthAttempt200, en as ListUserTeams200, et as CreateTeamBody, fn as QueryUsers200, ft as GetBrandingById200, g as BeginUserPasskeyRegistration201, gn as SubmitFlowStepBody, gt as GetEnvironmentByNameParams, hn as SubmitFlowStep200, ht as GetEnvironmentByName200, in as QueryProjects200, it as CreateUserParams, j as CreateFlow201StepFieldsItem, jt as GetSchemaById200, k as CreateFlow201StepActionsItem, kt as GetReleaseById200, ln as QueryTeams200, lt as FinishUserPasskeyRegistration201, mn as SetUserPasswordBody, mt as GetClaimStatusParams, nn as PatchProject200, nt as CreateUser201, on as QuerySessions200, ot as ExchangeHandoff200, pn as QueryUsersBody, pt as GetClaimStatus200, q as CreateReleaseParams, qt as ListFlowDefinitionsParams, rn as PatchProjectBody, rt as CreateUserBody, sn as QuerySessionsBody, st as ExchangeHandoffBody, tn as ListUserTeamsParams, tt as CreateTeamParams, un as QueryTeamsBody, ut as FinishUserPasskeyRegistrationBody, v as CompleteClaim200, vn as UpdateFlowDefinitionBody, vt as GetEventParams, w as CreateBrandingParams, wt as GetLiveDefault, x as CreateAuthAttemptBody, xn as VerifyChallengeProof200, xt as GetGrant200, y as CompleteClaimBody, yn as UpdateTeam200, yt as GetFlowDefinition200, z as CreateGrantBody, zt as IssueChallengeBody } from "./index-Dx8rvpNs.mjs";
2
+ import * as _$lit from "lit";
3
+ import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, nothing } from "lit";
4
+ import layoutChromeCss from "./templates/layout-chrome.css?inline";
5
+
6
+ //#region ../api/dist/zitadelNextGen-C8m49W5h.d.mts
7
+ //#region src/generated/endpoints/zitadelNextGen.d.ts
8
+ declare namespace zitadelNextGen_d_exports {
9
+ export { beginUserPasskeyRegistration, completeClaim, createAuthAttempt, createBranding, createFlow, createFlowDefinition, createGrant, createHandoff, createProject, createRelease, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, deleteGrant, deleteTeam, deleteUserByID, exchangeHandoff, finishUserPasskeyRegistration, getAuthAttempt, getBeginUserPasskeyRegistrationUrl, getBrandingById, getClaimStatus, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateGrantUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateReleaseUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteFlowDefinitionUrl, getDeleteGrantUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getEnvironmentByName, getEvent, getExchangeHandoffUrl, getFinishUserPasskeyRegistrationUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetEnvironmentByNameUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetGrantUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetReleaseByIdUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getGrant, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListEnvironmentsUrl, getListEventsUrl, getListFlowDefinitionsUrl, getListReleasesUrl, getListSchemasUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getLive, getMySession, getMyUser, getPatchProjectUrl, getProject, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getQueryUsersUrl, getReady, getReleaseById, getRevokeMySessionUrl, getRevokeSessionUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateFlowDefinitionUrl, getUpdateTeamUrl, getUserByID, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listEnvironments, listEvents, listFlowDefinitions, listReleases, listSchemas, listUserPasskeys, listUserTeams, patchProject, queryProjects, querySessions, queryTeams, queryUsers, revokeMySession, revokeSession, setUserPassword, submitFlowStep, updateFlowDefinition, updateTeam, verifyChallengeProof };
10
+ }
11
+ declare const getGetHealthUrl: () => string;
12
+ /**
13
+ * Check whether the server is healthy
14
+ * @summary Check server health
15
+ */
16
+ declare const getHealth: (options?: RequestInit) => Promise<GetHealthDefault>;
17
+ declare const getGetLiveUrl: () => string;
18
+ /**
19
+ * Check whether the server is started
20
+ * @summary Check server liveness
21
+ */
22
+ declare const getLive: (options?: RequestInit) => Promise<GetLiveDefault>;
23
+ declare const getGetReadyUrl: () => string;
24
+ /**
25
+ * Check whether the server is ready to accept requests
26
+ * @summary Check server readiness
27
+ */
28
+ declare const getReady: (options?: RequestInit) => Promise<GetReadyDefault>;
29
+ declare const getCreateUserUrl: (params: CreateUserParams) => string;
30
+ /**
31
+ * @summary Create user
32
+ */
33
+ declare const createUser: (createUserBody: CreateUserBody, params: CreateUserParams, options?: RequestInit) => Promise<CreateUser201>;
34
+ declare const getQueryUsersUrl: () => string;
35
+ /**
36
+ * Returns the users of a project, paginated with a cursor.
37
+
38
+ The project comes from the credential, not from a parameter: the operation
39
+ is bound to the token's own project by construction. This is why it takes
40
+ no `project_id`, unlike the other query endpoints.
41
+
42
+ * @summary Query users
43
+ */
44
+ declare const queryUsers: (queryUsersBody: QueryUsersBody, options?: RequestInit) => Promise<QueryUsers200>;
45
+ declare const getGetUserByIDUrl: (userId: string, params?: GetUserByIDParams) => string;
46
+ /**
47
+ * @summary Get user by ID
48
+ */
49
+ declare const getUserByID: (userId: string, params?: GetUserByIDParams, options?: RequestInit) => Promise<GetUserByID200>;
50
+ declare const getDeleteUserByIDUrl: (userId: string) => string;
51
+ /**
52
+ * @summary Delete user by ID
53
+ */
54
+ declare const deleteUserByID: (userId: string, options?: RequestInit) => Promise<void>;
55
+ declare const getListUserPasskeysUrl: (userId: string, params?: ListUserPasskeysParams) => string;
56
+ /**
57
+ * @summary List user passkeys
58
+ */
59
+ declare const listUserPasskeys: (userId: string, params?: ListUserPasskeysParams, options?: RequestInit) => Promise<ListUserPasskeys200>;
60
+ declare const getBeginUserPasskeyRegistrationUrl: (userId: string) => string;
61
+ /**
62
+ * Starts a WebAuthn registration ceremony for the user and returns the
63
+ creation options for `navigator.credentials.create()`. Complete the
64
+ ceremony with `POST /users/{user_id}/passkeys/registrations/{registration_id}` within
65
+ five minutes. Credentials already registered for the user are excluded
66
+ automatically.
67
+
68
+ * @summary Begin passkey registration
69
+ */
70
+ declare const beginUserPasskeyRegistration: (userId: string, beginUserPasskeyRegistrationBody: BeginUserPasskeyRegistrationBody, options?: RequestInit) => Promise<BeginUserPasskeyRegistration201>;
71
+ declare const getFinishUserPasskeyRegistrationUrl: (userId: string, registrationId: string) => string;
72
+ /**
73
+ * Verifies the attestation against the ceremony started by
74
+ `POST /users/{user_id}/passkeys/registrations` and persists the new credential. A
75
+ rejected attestation counts against the ceremony's failure budget and the
76
+ ceremony stays open for a retry. An expired ceremony surfaces as
77
+ `att.stale_challenge`; an unknown or already-consumed registration id
78
+ surfaces as `att.not_found`.
79
+
80
+ * @summary Finish passkey registration
81
+ */
82
+ declare const finishUserPasskeyRegistration: (userId: string, registrationId: string, finishUserPasskeyRegistrationBody: FinishUserPasskeyRegistrationBody, options?: RequestInit) => Promise<FinishUserPasskeyRegistration201>;
83
+ declare const getSetUserPasswordUrl: (userId: string) => string;
84
+ /**
85
+ * @summary Set user password
86
+ */
87
+ declare const setUserPassword: (userId: string, setUserPasswordBody: SetUserPasswordBody, options?: RequestInit) => Promise<void>;
88
+ declare const getListUserTeamsUrl: (userId: string, params?: ListUserTeamsParams) => string;
89
+ /**
90
+ * The user's team roster, ordered by team name. Each entry carries the
91
+ team's name, so a client renders a page without resolving ids one by one.
92
+
93
+ This is the N:N roster and it is not lifecycle ownership: the single team
94
+ that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
95
+ on the user read endpoints. Memberships the user was removed from are not
96
+ returned.
97
+
98
+ * @summary List the teams a user belongs to
99
+ */
100
+ declare const listUserTeams: (userId: string, params?: ListUserTeamsParams, options?: RequestInit) => Promise<ListUserTeams200>;
101
+ declare const getGetMyUserUrl: () => string;
102
+ /**
103
+ * @summary Get my user information
104
+ */
105
+ declare const getMyUser: (options?: RequestInit) => Promise<GetMyUser200>;
106
+ declare const getCreateFlowUrl: () => string;
107
+ /**
108
+ * Resolves a flow definition based on purpose + audience context and returns
109
+ the first capability step. Creates a new session implicitly unless
110
+ `session_id` is provided (for step-up / reauth on an existing session).
111
+
112
+ The response contains an `id` field — the flow handle. Use it as the path
113
+ parameter for all subsequent `/flow/{id}/submit` calls.
114
+
115
+ The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
116
+ the flow's orchestration state (current step, collected data, history).
117
+ The server is stateless between requests — all flow state lives in this
118
+ cookie. The browser sends it automatically on subsequent requests.
119
+
120
+ * @summary Start a new flow
121
+ */
122
+ declare const createFlow: (createFlowBody: CreateFlowBody, options?: RequestInit) => Promise<CreateFlow201>;
123
+ declare const getGetFlowStepUrl: (id: string) => string;
124
+ /**
125
+ * Returns the current capability step without advancing the state machine.
126
+ Useful for page reloads or re-rendering after a network error.
127
+
128
+ * @summary Get current step (re-render)
129
+ */
130
+ declare const getFlowStep: (id: string, options?: RequestInit) => Promise<GetFlowStep200>;
131
+ declare const getSubmitFlowStepUrl: (id: string) => string;
132
+ /**
133
+ * Submits user input for the current step. The server validates,
134
+ processes (e.g., verifies a credential), advances the state machine
135
+ through any invisible steps, and returns the next visible step.
136
+
137
+ The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
138
+ with the new flow state. The server is stateless — all orchestration
139
+ state is carried in this cookie between requests.
140
+
141
+ **Important:** The `id` in the response may differ from the `id` used in
142
+ the request. This happens when a flow pivots (pushes a new flow onto the
143
+ stack) or when a stacked flow completes (auto-pops to the parent flow).
144
+ Always use the `id` from the latest response for the next request.
145
+
146
+ ## Flow completion
147
+
148
+ When `step.type` is `complete`, the flow is terminal. The `step.behavior`
149
+ field tells the frontend what to do:
150
+
151
+ | `behavior` | Action |
152
+ |------------- |------------------------------------------------------------|
153
+ | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
154
+ | `show` | Render the step as a success screen (e.g., registration). |
155
+
156
+ A `complete` step is only returned when the **entire flow stack** is done.
157
+ If a stacked flow (e.g., recovery pivoted from login) finishes, the server
158
+ auto-pops to the parent flow and returns the parent's next step — the
159
+ frontend never sees a `complete` for intermediate flows.
160
+
161
+ * @summary Submit step data and advance
162
+ */
163
+ declare const submitFlowStep: (id: string, submitFlowStepBody: SubmitFlowStepBody, options?: RequestInit) => Promise<SubmitFlowStep200>;
164
+ declare const getCreateAuthAttemptUrl: () => string;
165
+ /**
166
+ * Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
167
+
168
+ An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
169
+ It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
170
+
171
+ Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
172
+ also include session_id to add factors to an existing session.
173
+
174
+ * @summary Create a new authentication attempt
175
+ */
176
+ declare const createAuthAttempt: (createAuthAttemptBody: CreateAuthAttemptBody, options?: RequestInit) => Promise<CreateAuthAttempt201>;
177
+ declare const getGetAuthAttemptUrl: (attemptId: string) => string;
178
+ /**
179
+ * Polls the current state of an authentication attempt.
180
+
181
+ Returns the attempt's state, available factors for the next challenge,
182
+ challenges issued so far, and any errors preventing progress.
183
+
184
+ Use this for polling during long-running factor verifications (e.g., waiting for
185
+ a federated IdP callback or a device flow).
186
+
187
+ * @summary Get authentication attempt state
188
+ */
189
+ declare const getAuthAttempt: (attemptId: string, options?: RequestInit) => Promise<GetAuthAttempt200>;
190
+ declare const getIssueChallengeUrl: (attemptId: string) => string;
191
+ /**
192
+ * Issues a single-factor verification challenge within an auth attempt.
193
+
194
+ This advances the authentication state machine by requesting a specific factor method
195
+ (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
196
+ including method, metadata, and any UI hints. The client then verifies the proof
197
+ by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
198
+
199
+ * @summary Issue a factor challenge
200
+ */
201
+ declare const issueChallenge: (attemptId: string, issueChallengeBody: IssueChallengeBody, options?: RequestInit) => Promise<IssueChallenge201>;
202
+ declare const getVerifyChallengeProofUrl: (attemptId: string, challengeId: string) => string;
203
+ /**
204
+ * Submits a proof (credential, code, assertion) to verify a factor challenge.
205
+
206
+ The proof format depends on the challenge method. For example:
207
+ - `password` method: { password: "…" }
208
+ - `totp` method: { totp: { code: "123456" } }
209
+ - `passkey` method: { passkey: { assertion: "…" } }
210
+ - `recovery_code` method: { recovery_code: "…" }
211
+
212
+ On successful verification, the factor is written to the auth attempt.
213
+ The attempt moves to the next pending challenge or completes if all required factors are verified.
214
+
215
+ * @summary Verify a factor proof
216
+ */
217
+ declare const verifyChallengeProof: (attemptId: string, challengeId: string, verifyChallengeProofBody: VerifyChallengeProofBody, options?: RequestInit) => Promise<VerifyChallengeProof200>;
218
+ declare const getCreateHandoffUrl: (attemptId: string) => string;
219
+ /**
220
+ * Completes the authentication attempt and mints a `handoff_token`.
221
+
222
+ Call this after all required factors have been verified and the attempt is in `completed` state.
223
+ The handoff token is short-lived (≤60 seconds) and must be exchanged at
224
+ POST /sessions/exchange to receive the final session and session_token.
225
+
226
+ The handoff token is:
227
+ - Single-use (atomic exchange, no retry)
228
+ - Audience-bound (requires matching project key for exchange)
229
+ - Idempotency-safe within a 5-minute window (see conventions)
230
+
231
+ * @summary Complete authentication and create handoff token
232
+ */
233
+ declare const createHandoff: (attemptId: string, options?: RequestInit) => Promise<CreateHandoff200>;
234
+ declare const getCreateProjectUrl: () => string;
235
+ /**
236
+ * @summary Create project
237
+ */
238
+ declare const createProject: (createProjectBody: CreateProjectBody, options?: RequestInit) => Promise<CreateProject201>;
239
+ declare const getQueryProjectsUrl: () => string;
240
+ /**
241
+ * @summary Query projects
242
+ */
243
+ declare const queryProjects: (queryProjectsBody: QueryProjectsBody, options?: RequestInit) => Promise<QueryProjects200>;
244
+ declare const getGetProjectUrl: (projectId: string) => string;
245
+ /**
246
+ * Returns the current state of a project.
247
+
248
+ * @summary Get project
249
+ */
250
+ declare const getProject: (projectId: string, options?: RequestInit) => Promise<GetProject200>;
251
+ declare const getPatchProjectUrl: (projectId: string) => string;
252
+ /**
253
+ * Updates the state of a project.
254
+
255
+ * @summary Update project
256
+ */
257
+ declare const patchProject: (projectId: string, patchProjectBody: PatchProjectBody, options?: RequestInit) => Promise<PatchProject200>;
258
+ declare const getInitClaimUrl: (projectId: string) => string;
259
+ /**
260
+ * Starts a claim challenge for an unclaimed project. Authenticated by the
261
+ project secret, this mints a single-use, short-lived challenge and returns
262
+ the `claim_url` the developer opens in a browser to complete the claim,
263
+ together with the `challenge_id` the CLI polls with. The exact expiry is
264
+ carried by `expires_at` on the response.
265
+
266
+ * @summary Initialize a project claim
267
+ */
268
+ declare const initClaim: (projectId: string, options?: RequestInit) => Promise<InitClaim201>;
269
+ declare const getGetClaimStatusUrl: (projectId: string, params: GetClaimStatusParams) => string;
270
+ /**
271
+ * Polled by the CLI while a browser completes the claim. Authorized by the
272
+ project secret that initiated the challenge. Returns `pending`, or
273
+ `completed` with the owning team, the claim timestamp, and the dashboard
274
+ URL once the browser leg has finished.
275
+
276
+ * @summary Get claim status
277
+ */
278
+ declare const getClaimStatus: (projectId: string, params: GetClaimStatusParams, options?: RequestInit) => Promise<GetClaimStatus200>;
279
+ declare const getCompleteClaimUrl: (projectId: string) => string;
280
+ /**
281
+ * Called by the browser after the developer authenticates on the claim page.
282
+ Authenticated by the `__nextgen_session` cookie, it attaches the project to
283
+ the developer's personal team using the `challenge_id` from the claim URL as
284
+ its single-use, browser-safe authorization.
285
+
286
+ * @summary Complete a project claim
287
+ */
288
+ declare const completeClaim: (projectId: string, completeClaimBody: CompleteClaimBody, options?: RequestInit) => Promise<CompleteClaim200>;
289
+ declare const getCreateSessionUrl: () => string;
290
+ /**
291
+ * Creates an anonymous session shell with no user and no factors (`state: building`).
292
+
293
+ This is optional — an `auth_attempt` will create a session implicitly if none is provided.
294
+ Use this explicitly when you want to:
295
+ - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
296
+ can be correlated with the eventual authenticated session from the start.
297
+ - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
298
+
299
+ Creating a session is an app-plane operation on the project credential
300
+ (`session.write`). The returned `session_token` is a session credential for the
301
+ end-user client, not a management scope: it is delivered as the
302
+ `__nextgen_session` cookie and authorises the self-service operations
303
+ `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
304
+ by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
305
+ are operator endpoints and require `session.read` / `session.delete` instead.
306
+
307
+ The `session_token` is superseded when a handoff exchange completes — clients must
308
+ replace it at that point.
309
+
310
+ Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
311
+ full session TTL when the first authentication factor is written via a completing `auth_attempt`.
312
+
313
+ * @summary Create an anonymous session shell
314
+ */
315
+ declare const createSession: (createSessionBody: CreateSessionBody, options?: RequestInit) => Promise<CreateSession201>;
316
+ declare const getQuerySessionsUrl: (params: QuerySessionsParams) => string;
317
+ /**
318
+ * Returns the sessions of a project, paginated with a cursor.
319
+ Sessions of every lifecycle state are returned; each carries its `state`.
320
+ Requires `session.read` permission.
321
+
322
+ * @summary Query sessions
323
+ */
324
+ declare const querySessions: (querySessionsBody: QuerySessionsBody, params: QuerySessionsParams, options?: RequestInit) => Promise<QuerySessions200>;
325
+ declare const getExchangeHandoffUrl: (params: ExchangeHandoffParams) => string;
326
+ /**
327
+ * Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
328
+ and returns the resulting session and a `session_token`.
329
+
330
+ The server resolves the originating `auth_attempt` from the token and then:
331
+
332
+ | Originating auth_attempt | Outcome |
333
+ |---|---|
334
+ | No `session_id` | A new authenticated session is **created**. |
335
+ | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
336
+ | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
337
+
338
+ The response shape is identical in all three cases.
339
+
340
+ The `session_token` supersedes any previously issued `session_token` for the same session.
341
+ Clients must replace their stored token at this point.
342
+
343
+ Requires a project service key (OAuth2 client credentials).
344
+
345
+ * @summary Exchange handoff token for a session
346
+ */
347
+ declare const exchangeHandoff: (exchangeHandoffBody: ExchangeHandoffBody, params: ExchangeHandoffParams, options?: RequestInit) => Promise<ExchangeHandoff200>;
348
+ declare const getGetSessionUrl: (sessionId: string) => string;
349
+ /**
350
+ * Returns the current state of a session including its factors and all currently
351
+ satisfied assurance levels.
352
+
353
+ `assurance_levels[]` may shrink over time as factor freshness windows expire,
354
+ without the session itself expiring. Use step-up authentication (a new `auth_attempt`
355
+ against the same `session_id`) to restore a dropped assurance level.
356
+
357
+ * @summary Get session state
358
+ */
359
+ declare const getSession: (sessionId: string, options?: RequestInit) => Promise<GetSession200>;
360
+ declare const getRevokeSessionUrl: (sessionId: string) => string;
361
+ /**
362
+ * Permanently deletes the session, terminating it immediately.
363
+
364
+ This is the operator revoke path and requires the `session.delete` scope on a
365
+ project-bound credential. End-user logout with the `__nextgen_session` cookie is
366
+ `DELETE /sessions/me` (`nextgenSession` scheme).
367
+
368
+ Idempotent: deleting a session that does not exist (or was already deleted)
369
+ still returns 204. After deletion, any tokens derived from the session are
370
+ invalidated.
371
+
372
+ * @summary Revoke session
373
+ */
374
+ declare const revokeSession: (sessionId: string, options?: RequestInit) => Promise<void>;
375
+ declare const getGetMySessionUrl: () => string;
376
+ /**
377
+ * Returns the current state of the current session including its factors and all currently
378
+ satisfied assurance levels.
379
+
380
+ `assurance_levels[]` may shrink over time as factor freshness windows expire,
381
+ without the session itself expiring. Use step-up authentication (a new `auth_attempt`
382
+ against the same `session_id`) to restore a dropped assurance level.
383
+
384
+ * @summary Get my session state
385
+ */
386
+ declare const getMySession: (options?: RequestInit) => Promise<GetMySession200>;
387
+ declare const getRevokeMySessionUrl: () => string;
388
+ /**
389
+ * Logs out by permanently deleting the session.
390
+
391
+ The `__nextgen_session` cookie issued at creation (or superseded by a handoff
392
+ exchange) is required. Idempotent: if the session is already gone this still
393
+ returns 204. Any tokens derived from the session are invalidated, and the
394
+ cookie itself is cleared in the response.
395
+
396
+ * @summary Revoke my session
397
+ */
398
+ declare const revokeMySession: (options?: RequestInit) => Promise<void>;
399
+ declare const getCreateSchemaUrl: (params: CreateSchemaParams) => string;
400
+ /**
401
+ * Create a new schema. The optional `$id` field is the JSON Schema document
402
+ URI used to identify the schema in future requests (GitOps-stable identity,
403
+ not a free-form resource primary key). When `$id` is omitted, the server
404
+ generates a `sch_*` URL. When provided, `$id` must be unique within the
405
+ project and should ideally be a valid URI pointing at where the schema can
406
+ be accessed.
407
+
408
+ The schema can either be a concrete schema, e.g. a user schema, or a
409
+ schema-url which will be resolved by the server.
410
+
411
+ * @summary Create new schema
412
+ */
413
+ declare const createSchema: (createSchemaBody: CreateSchemaBody, params: CreateSchemaParams, options?: RequestInit) => Promise<CreateSchema201>;
414
+ declare const getListSchemasUrl: (params: ListSchemasParams) => string;
415
+ /**
416
+ * Retrieve a list of all schemas available in the system. This endpoint
417
+ supports pagination and filtering based on schema attributes.
418
+
419
+ * @summary List all schemas
420
+ */
421
+ declare const listSchemas: (params: ListSchemasParams, options?: RequestInit) => Promise<ListSchemas200>;
422
+ declare const getGetSchemaByIdUrl: (id: string, params?: GetSchemaByIdParams) => string;
423
+ /**
424
+ * Get a schema by its ID. A schema ID identifies one immutable revision, so
425
+ this returns exactly that revision. To find the current revision of an
426
+ object type, list with `revisions=latest`.
427
+
428
+ * @summary Get schema by ID
429
+ */
430
+ declare const getSchemaById: (id: string, params?: GetSchemaByIdParams, options?: RequestInit) => Promise<GetSchemaById200>;
431
+ declare const getCreateFlowDefinitionUrl: () => string;
432
+ /**
433
+ * Creates a new flow definition.
434
+ Flow definitions are templates that define the sequence of steps (capabilities)
435
+ for a particular user journey (e.g., registration, login, password reset).
436
+
437
+ Flow definitions are created based on the flow definition schema, which includes the flow's purpose, audience, and the steps involved.
438
+
439
+ * @summary Create a new flow definition
440
+ */
441
+ declare const createFlowDefinition: (createFlowDefinitionBody: CreateFlowDefinitionBody, options?: RequestInit) => Promise<CreateFlowDefinition201>;
442
+ declare const getListFlowDefinitionsUrl: (params: ListFlowDefinitionsParams) => string;
443
+ /**
444
+ * Retrieves a list of all flow definitions.
445
+ This endpoint can be used to view existing flow definitions and their configurations.
446
+
447
+ * @summary List flow definitions
448
+ */
449
+ declare const listFlowDefinitions: (params: ListFlowDefinitionsParams, options?: RequestInit) => Promise<ListFlowDefinitions200>;
450
+ declare const getGetFlowDefinitionUrl: (id: string) => string;
451
+ /**
452
+ * Get a flow definition by id
453
+ * @summary Get a flow definition by id
454
+ */
455
+ declare const getFlowDefinition: (id: string, options?: RequestInit) => Promise<GetFlowDefinition200>;
456
+ declare const getUpdateFlowDefinitionUrl: (id: string) => string;
457
+ /**
458
+ * Update a flow definition by id. This endpoint replaces the existing flow definition.
459
+ If `flow_definition.status` is omitted, the current status is preserved
460
+
461
+ * @summary Update a flow definition by id
462
+ */
463
+ declare const updateFlowDefinition: (id: string, updateFlowDefinitionBody: UpdateFlowDefinitionBody, options?: RequestInit) => Promise<UpdateFlowDefinition200>;
464
+ declare const getDeleteFlowDefinitionUrl: (id: string) => string;
465
+ /**
466
+ * Delete a flow definition by id.
467
+ If the flow definition is currently being used by a flow, the deletion will fail.
468
+ If the flow definition is the last active flow definition for a given purpose, the deletion will fail to prevent disruption of new flows being started for that purpose.
469
+
470
+ * @summary Delete a flow definition by id
471
+ */
472
+ declare const deleteFlowDefinition: (id: string, options?: RequestInit) => Promise<void>;
473
+ declare const getCreateTeamUrl: (params: CreateTeamParams) => string;
474
+ /**
475
+ * @summary Create team
476
+ */
477
+ declare const createTeam: (createTeamBody: CreateTeamBody, params: CreateTeamParams, options?: RequestInit) => Promise<CreateTeam201>;
478
+ declare const getQueryTeamsUrl: (params: QueryTeamsParams) => string;
479
+ /**
480
+ * Returns the teams of a project, paginated with a cursor.
481
+
482
+ * @summary Query teams
483
+ */
484
+ declare const queryTeams: (queryTeamsBody: QueryTeamsBody, params: QueryTeamsParams, options?: RequestInit) => Promise<QueryTeams200>;
485
+ declare const getGetTeamUrl: (teamId: string) => string;
486
+ /**
487
+ * Returns a Team by its id.
488
+
489
+ * @summary Get team
490
+ */
491
+ declare const getTeam: (teamId: string, options?: RequestInit) => Promise<GetTeam200>;
492
+ declare const getDeleteTeamUrl: (teamId: string) => string;
493
+ /**
494
+ * Deactivates the team.
495
+
496
+ The team is tombstoned rather than erased: it stays readable through
497
+ getTeam with status `deactivated`. Its memberships are removed and the
498
+ users whose lifecycle it owns are deactivated with it.
499
+
500
+ The request is idempotent. Deleting a team that is already deactivated
501
+ or doesn't exist succeeds without changing anything.
502
+
503
+ * @summary Delete team
504
+ */
505
+ declare const deleteTeam: (teamId: string, options?: RequestInit) => Promise<void>;
506
+ declare const getUpdateTeamUrl: (teamId: string) => string;
507
+ /**
508
+ * Update team. Only active teams can be updated.
509
+
510
+ * @summary Update team
511
+ */
512
+ declare const updateTeam: (teamId: string, updateTeamBody: UpdateTeamBody, options?: RequestInit) => Promise<UpdateTeam200>;
513
+ declare const getListEnvironmentsUrl: (params: ListEnvironmentsParams) => string;
514
+ /**
515
+ * Lists the project's environments ordered by name.
516
+
517
+ * @summary List environments
518
+ */
519
+ declare const listEnvironments: (params: ListEnvironmentsParams, options?: RequestInit) => Promise<ListEnvironments200>;
520
+ declare const getGetEnvironmentByNameUrl: (name: string, params: GetEnvironmentByNameParams) => string;
521
+ /**
522
+ * Reads one environment of the project by its name.
523
+
524
+ The lookup is scoped to the project in `project_id`: a name that exists in
525
+ another project answers `env.not_found` exactly as an unused name does.
526
+
527
+ * @summary Get an environment by name
528
+ */
529
+ declare const getEnvironmentByName: (name: string, params: GetEnvironmentByNameParams, options?: RequestInit) => Promise<GetEnvironmentByName200>;
530
+ declare const getCreateBrandingUrl: (params: CreateBrandingParams) => string;
531
+ /**
532
+ * Publishes a new immutable branding revision for the project. Branding
533
+ revisions cannot be updated or deleted; every edit publishes a new
534
+ revision, and flow responses resolve the latest revision per project
535
+ (see ADR 040).
536
+
537
+ The `liquid_template` is validated lexically on save (size, encoding,
538
+ banned patterns such as `<script>` tags, inline event handlers, and the
539
+ `| raw` filter). Authoritative LiquidJS validation runs at authoring
540
+ time via `zitadel plan` / `zitadel apply`.
541
+
542
+ * @summary Publish a new branding revision
543
+ */
544
+ declare const createBranding: (createBrandingBody: CreateBrandingBody, params: CreateBrandingParams, options?: RequestInit) => Promise<CreateBranding201>;
545
+ declare const getListBrandingUrl: (params: ListBrandingParams) => string;
546
+ /**
547
+ * Lists branding revisions for the project, newest first, capped at the
548
+ 100 most recent. The first entry is the revision flow responses
549
+ currently resolve. Deliberately unpaginated in v1 — list endpoints
550
+ gain a real query mechanism together (ADR 031); advertising pagination
551
+ parameters the server ignores would be worse than none.
552
+
553
+ * @summary List branding revisions
554
+ */
555
+ declare const listBranding: (params: ListBrandingParams, options?: RequestInit) => Promise<ListBranding200Item[]>;
556
+ declare const getGetBrandingByIdUrl: (id: string) => string;
557
+ /**
558
+ * Retrieves a single branding revision, including its stored configuration.
559
+ * @summary Get a branding revision by ID
560
+ */
561
+ declare const getBrandingById: (id: string, options?: RequestInit) => Promise<GetBrandingById200>;
562
+ declare const getCreateReleaseUrl: (params: CreateReleaseParams) => string;
563
+ /**
564
+ * Bundles a release from revisions that already exist, supplied as
565
+ `(kind, revision_id)` pairs. No new revisions are allocated — use the
566
+ per-kind create endpoints for that, then pin the ids here.
567
+
568
+ Every referenced `revision_id` must exist in the project. Each one's handle
569
+ is read from the revision itself and recorded on the release, so a resource
570
+ is always pinned under the identity it declares.
571
+
572
+ Creating a release does not deploy it. A release is environment-agnostic
573
+ and the same release can later be deployed to any number of environments
574
+ unchanged.
575
+
576
+ Idempotent on the pinned set: metadata is excluded from the comparison, so
577
+ re-submitting the same revisions with a different `message` returns the
578
+ release that already pins them rather than creating a second one.
579
+
580
+ * @summary Create a release
581
+ */
582
+ declare const createRelease: (createReleaseBody: CreateReleaseBody, params: CreateReleaseParams, options?: RequestInit) => Promise<CreateRelease200 | CreateRelease201>;
583
+ declare const getListReleasesUrl: (params: ListReleasesParams) => string;
584
+ /**
585
+ * Lists the project's releases, newest first.
586
+
587
+ Entries carry metadata only — the pinned set is omitted. Read one release
588
+ with `GET /releases/{release_id}` to get its pointers.
589
+
590
+ * @summary List releases
591
+ */
592
+ declare const listReleases: (params: ListReleasesParams, options?: RequestInit) => Promise<ListReleases200>;
593
+ declare const getGetReleaseByIdUrl: (releaseId: string, params: GetReleaseByIdParams) => string;
594
+ /**
595
+ * Reads one release: its metadata and the `(kind, handle, revision_id)`
596
+ tuples it pins.
597
+
598
+ Does not embed resource content. Resolve each `revision_id` through the
599
+ per-kind read endpoints when the bytes are needed.
600
+
601
+ The lookup is scoped to the project in `project_id`: a release id belonging
602
+ to another project answers not found exactly as an unknown id does, so the
603
+ endpoint cannot be used to probe for releases in projects the caller cannot
604
+ read.
605
+
606
+ * @summary Get a release by id
607
+ */
608
+ declare const getReleaseById: (releaseId: string, params: GetReleaseByIdParams, options?: RequestInit) => Promise<GetReleaseById200>;
609
+ declare const getCreateGrantUrl: (params: CreateGrantParams) => string;
610
+ /**
611
+ * Bind a user or team to `project.viewer`, `project.editor`, or
612
+ `project.admin` on the project identified by the `project-id` header.
613
+ IDs are `asgn_<opaque>`. Owning-team (`project.team`) grants are not
614
+ created here — claim owns that path. An unrevoked grant with the same
615
+ principal and relation occupies the unique key even after `expires_at`;
616
+ DELETE it before re-creating.
617
+
618
+ * @summary Create grant
619
+ */
620
+ declare const createGrant: (createGrantBody: CreateGrantBody, params: CreateGrantParams, options?: RequestInit) => Promise<CreateGrant201>;
621
+ declare const getGetGrantUrl: (id: string, params: GetGrantParams) => string;
622
+ /**
623
+ * Loads a grant by `(project_id, id)` that this API manages (user or team
624
+ bound to viewer, editor, or admin) and that has not been revoked.
625
+ "Active" here means not revoked: expired grants stay visible so the
626
+ client can DELETE before re-granting the same binding. Authorization
627
+ still ignores expired grants. Grants are not registered in
628
+ `resource_scope_index`; project scope is required on the query (same as
629
+ events). Misses, revoked rows, project-secret setup (`sk_proj`),
630
+ owning-team (`relation=team`) rows, and cross-project ids return 404.
631
+
632
+ * @summary Get grant
633
+ */
634
+ declare const getGrant: (id: string, params: GetGrantParams, options?: RequestInit) => Promise<GetGrant200>;
635
+ declare const getDeleteGrantUrl: (id: string, params: DeleteGrantParams) => string;
636
+ /**
637
+ * Soft-revokes a grant this API manages and emits `authz.revoked`.
638
+ Already-revoked, missing, project-secret setup, and owning-team grants
639
+ return 404. The row is not un-revoked. Expired grants can still be
640
+ revoked so the unique binding can be reused.
641
+
642
+ * @summary Revoke grant
643
+ */
644
+ declare const deleteGrant: (id: string, params: DeleteGrantParams, options?: RequestInit) => Promise<void>;
645
+ declare const getListEventsUrl: (params: ListEventsParams) => string;
646
+ /**
647
+ * Returns project-scoped audit events, newest-first by keyset on
648
+ `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
649
+ Requires `events.read`.
650
+
651
+ Pre-claim projects return an empty list (events are stored but not
652
+ visible until claim succeeds). Team-scoped credentials see only events
653
+ whose emit-time `team_id` matches the credential team (enforced when
654
+ team-scoped tokens exist).
655
+
656
+ Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
657
+ see docs/design/api/events-catalog.md.
658
+
659
+ * @summary List events
660
+ */
661
+ declare const listEvents: (params: ListEventsParams, options?: RequestInit) => Promise<ListEvents200>;
662
+ declare const getGetEventUrl: (id: string, params: GetEventParams) => string;
663
+ /**
664
+ * Loads a single event by `(project_id, id)`. Requires `events.read`.
665
+ Events are not registered in `resource_scope_index`; project scope is
666
+ required on the query (ADR 049). Misses and cross-project ids return 404.
667
+
668
+ Pre-claim projects return 404 (stored events stay invisible until claim).
669
+
670
+ * @summary Get event by ID
671
+ */
672
+ declare const getEvent: (id: string, params: GetEventParams, options?: RequestInit) => Promise<GetEvent200>; //#endregion
673
+ //#endregion
674
+ //#region ../api/dist/runtime/api-factory.d.mts
675
+ //#region src/runtime/api-factory.d.ts
676
+ /**
677
+ * Typed Zitadel client returned by {@link createZitadelClient}.
678
+ * Mirrors the orval-generated endpoints module 1:1.
679
+ */
680
+ type ZitadelClient = typeof zitadelNextGen_d_exports;
681
+ /** Re-exported under the legacy name some consumers (`runtime/config.ts`) still import. */
682
+ type ZitadelApi = ZitadelClient;
683
+ /** Options for {@link createZitadelClient}. */
684
+ //#endregion
685
+ //#region ../api/dist/runtime/config.d.mts
686
+ /**
687
+ * The initialized project handle returned by {@link configureZitadel}.
688
+ * Pure data — use factory functions like {@link getApi} to derive services.
689
+ */
690
+ interface ZitadelProject {
691
+ /** Proxy path for API requests. */
692
+ readonly proxyPath: string;
693
+ /** Project ID passed to flow creation. */
694
+ readonly projectId: string;
695
+ /** Full URL of the Zitadel auth backend. */
696
+ readonly url?: string;
697
+ /** The project's publishable key (ADR 036), sent as the bearer when set. */
698
+ readonly publishableKey?: string;
699
+ }
700
+ /**
701
+ * Initializes app-wide SDK configuration and returns the frozen
702
+ * {@link ZitadelProject} handle.
703
+ *
704
+ * Write-once — subsequent calls with the same values return the original
705
+ * handle; calls with different values log a warning and return the
706
+ * original. This prevents accidental overwrites while remaining safe
707
+ * for HMR and framework double-mounts.
708
+ */
709
+ //#endregion
710
+ //#region src/orchestrator/locales/en.d.ts
711
+ /**
712
+ * Minimal English locale dictionary.
713
+ *
714
+ * The `| t` filter looks up `text_key` strings here. Missing keys fall through
715
+ * to the raw key (matches the spec in
716
+ * `docs/design/flowengine/flow-engine-guide.md`).
717
+ *
718
+ * Text keys are auto-generated by the server from the flow definition:
719
+ * - Step titles: `<step>.title`
720
+ * - Step descriptions: `<step>.description`
721
+ * - Field labels: `<step>.field.<field>`
722
+ * - Action labels: `<step>.action.<action>`
723
+ *
724
+ * Copy aligned to Figma screens file `xkvBjkOJ8ENuHdTGZHXezK` (May 2026).
725
+ * MVP only — multi-locale support is deferred.
726
+ */
727
+ declare const en: Record<string, string>;
728
+ type Locale = Record<string, string>;
729
+ //#endregion
730
+ //#region src/orchestrator/locales/de.d.ts
731
+ declare const de: Locale;
732
+ //#endregion
733
+ //#region src/orchestrator/locales/it.d.ts
734
+ declare const it: Locale;
735
+ //#endregion
736
+ //#region src/orchestrator/locales/business.d.ts
737
+ declare const businessLocales: Readonly<Record<string, Partial<Locale>>>;
738
+ //#endregion
739
+ //#region src/orchestrator/locales/index.d.ts
740
+ declare const builtinLocales: Readonly<Record<string, Locale>>;
741
+ //#endregion
742
+ //#region src/orchestrator/branding.d.ts
743
+ type FlowLayout = CreateFlow201BrandingLayout;
744
+ type BrandingPalette = {
745
+ primary?: string;
746
+ on_primary?: string;
747
+ background?: string;
748
+ surface?: string;
749
+ muted?: string;
750
+ border?: string;
751
+ text?: string;
752
+ text_muted?: string;
753
+ link?: string;
754
+ success?: string;
755
+ warning?: string;
756
+ error?: string;
757
+ };
758
+ type BrandingTypography = {
759
+ font_family?: string;
760
+ /**
761
+ * Display face for card titles and labels. Optional: without it a tenant's
762
+ * `font_family` sets the headings too, which is the single-font look most
763
+ * brands want. Naming it is how a brand keeps a separate display face.
764
+ */
765
+ font_family_heading?: string;
766
+ font_family_mono?: string;
767
+ scale?: number;
768
+ };
769
+ type BrandingShape = {
770
+ radius?: "none" | "sm" | "md" | "lg" | "full";
771
+ density?: "compact" | "regular" | "comfortable";
772
+ };
773
+ type BrandingTheme = {
774
+ mode?: "light" | "dark" | "auto";
775
+ dark?: {
776
+ palette?: BrandingPalette;
777
+ };
778
+ };
779
+ type BrandingAssets = {
780
+ logo_dark?: string;
781
+ favicon?: string;
782
+ background_image?: string;
783
+ };
784
+ /**
785
+ * Wire shape (`CreateFlow201Branding`) plus the v2 client-only extension.
786
+ * Structurally a superset, so any `CreateFlow201Branding` payload from the
787
+ * wire is assignable to `Branding` without a cast.
788
+ *
789
+ * `attribution.show_zitadel` controls the "Secured with Zitadel" pill in
790
+ * the orchestrator footer. Tenants set it to `false` only when they have a
791
+ * licence that permits removing attribution (community / OSS deployments
792
+ * always show it). The flag intentionally lives on `Branding` so it can
793
+ * be overridden per-flow alongside the rest of the visual surface.
794
+ */
795
+ type Branding = CreateFlow201Branding & {
796
+ palette?: BrandingPalette;
797
+ typography?: BrandingTypography;
798
+ shape?: BrandingShape;
799
+ assets?: BrandingAssets;
800
+ theme?: BrandingTheme;
801
+ attribution?: BrandingAttribution;
802
+ };
803
+ type BrandingAttribution = {
804
+ show_zitadel?: boolean;
805
+ custom_link?: {
806
+ label: string;
807
+ href: string;
808
+ };
809
+ };
810
+ //#endregion
811
+ //#region src/orchestrator/theme-controller.d.ts
812
+ type ResolvedTheme = "light" | "dark";
813
+ /** Theme inputs a caller may express, before resolution. */
814
+ type ThemeMode = "light" | "dark" | "auto";
815
+ declare class ThemeController implements ReactiveController {
816
+ private readonly host;
817
+ private branding;
818
+ /** Element-level `theme` property — the embedding developer's explicit call. */
819
+ private explicitMode;
820
+ /** Used when neither the element nor the branding payload names a mode. */
821
+ private fallbackMode;
822
+ private mediaQuery;
823
+ private _theme;
824
+ constructor(host: ReactiveControllerHost);
825
+ get theme(): ResolvedTheme;
826
+ setBranding(branding: Branding | undefined): void;
827
+ /**
828
+ * Sets the element-level preference and the fallback used when neither the
829
+ * element nor the branding payload names a mode. Precedence, strongest
830
+ * first: element `theme` property → `branding.theme.mode` → fallback. The
831
+ * element wins because the page embedding the widget knows its own surface
832
+ * better than the tenant's stored branding does.
833
+ */
834
+ setModePreference(explicit: ThemeMode | undefined, fallback: ThemeMode): void;
835
+ hostConnected(): void;
836
+ hostDisconnected(): void;
837
+ private refresh;
838
+ private attach;
839
+ private detach;
840
+ private onMediaChange;
841
+ private update;
842
+ }
843
+ //#endregion
844
+ //#region src/orchestrator/surface.d.ts
845
+ /**
846
+ * Shared base for the orchestrator host elements (`<zitadel-login>`,
847
+ * `<zitadel-session>`) that render a themable page/widget surface.
848
+ *
849
+ * Owns the `variant` / `theme` public properties, the {@link ThemeController},
850
+ * and the per-update surface application (base tokens, branding overrides,
851
+ * font links, and the `data-theme` host stamp). Subclasses call
852
+ * {@link applySurfaceTheme} from their `willUpdate` so the resolved theme is
853
+ * committed in the same update cycle that reads it.
854
+ *
855
+ * Not a registered custom element — purely an implementation-sharing base.
856
+ */
857
+ declare class ZitadelSurface extends LitElement {
858
+ /**
859
+ * Sizing/chrome mode. Components size to content; pages compose them —
860
+ * so the default is `widget`: content-sized, transparent host, no
861
+ * document-level default-font injection. Dedicated routes — the hosted
862
+ * shell and the scaffolded pages — opt into `page`, which claims the
863
+ * viewport, paints the surface background, and ships the brand font.
864
+ * Fine-grained height override in both modes: `--zl-page-min-height`.
865
+ */
866
+ accessor variant: "widget" | "page";
867
+ /**
868
+ * Colour mode: `light`, `dark`, or `auto` (follow `prefers-color-scheme`).
869
+ * Empty means "not stated", and resolution falls through to the tenant's
870
+ * `branding.theme.mode`, then to a variant-derived default — `dark` for
871
+ * `page` (the hosted design system surface) and `auto` for `widget`, so an
872
+ * embedded widget matches the visitor's preference instead of forcing a
873
+ * dark card onto a light page. Set it explicitly when your app's surface
874
+ * is fixed: `<zitadel-login theme="light">`.
875
+ */
876
+ accessor theme: "" | ThemeMode;
877
+ /**
878
+ * Visually hide the surface's own heading block (the step title and
879
+ * subtitle on `<zitadel-login>`, the heading line on
880
+ * `<zitadel-session>`) while keeping it in the accessibility tree. For
881
+ * embedders whose page already carries the heading — a brand-voice
882
+ * "Welcome back" above the card — so the widget doesn't repeat it.
883
+ * Reflected so host-page CSS and DOM assertions can key off the
884
+ * attribute, like `variant`.
885
+ */
886
+ accessor suppressHeader: boolean;
887
+ protected readonly themeController: ThemeController;
888
+ /**
889
+ * Resolve the active theme and commit it to this element's surface: adopt
890
+ * the base token sheet, layer the branding overrides, manage the
891
+ * document-level font links, and stamp `data-theme` / `data-theme-dark` on
892
+ * the host so token lookups (and host-page selectors) flip with the mode.
893
+ * `branding` is `undefined` for surfaces without a tenant payload — the
894
+ * theme then resolves through the element preference and variant fallback.
895
+ */
896
+ protected applySurfaceTheme(branding: Branding | undefined): void;
897
+ }
898
+ //#endregion
899
+ //#region src/orchestrator/zitadel-login.d.ts
900
+ /**
901
+ * `<zitadel-login>` — the auth-UI orchestrator.
902
+ *
903
+ * Drives the typed `@zitadel/api` Flow API directly: `POST /flow`
904
+ * starts a flow, `POST /flow/{id}/submit` advances it. Renders each step
905
+ * through LiquidJS, sanitises the output via DOMPurify, and mounts the
906
+ * result inside a real `<form>` element in its Shadow DOM via Lit's
907
+ * `unsafeHTML` directive. Atom CustomEvents (`zl-input` / `zl-submit`)
908
+ * and the form's native `submit` event feed back into the
909
+ * submit cycle.
910
+ *
911
+ * Form participation: the orchestrator owns the `<form>` so Enter submits,
912
+ * browsers offer "save password" prompts, and password managers / autofill
913
+ * see a real form. Each `<zl-field>` is form-associated (see
914
+ * `docs/design/branding/form-participation.md`) so its value participates in
915
+ * the form even though it lives inside its own shadow root. The shadow root
916
+ * also delegates focus, and after each step swap focus moves to the first
917
+ * field so screen-reader and keyboard users land in a sensible spot.
918
+ *
919
+ * Session/state: the server is stateless between requests — a `_zflow`
920
+ * HttpOnly cookie carries orchestration state. We always run with
921
+ * `credentials: "include"` (set in `api-client.ts`). The flow handle (`id`)
922
+ * may rotate on pivots/pops; we re-read it from every response.
923
+ *
924
+ * Spec sources:
925
+ * - `docs/design/flowengine/flow-engine-guide.md`
926
+ * - `docs/design/branding/templates.md`
927
+ * - `docs/design/branding/tokens.md`
928
+ * - `docs/design/branding/schema.md`
929
+ * - `docs/design/branding/form-participation.md`
930
+ * - `docs/design/flowengine/template-security.md`
931
+ */
932
+ declare class ZitadelLogin extends ZitadelSurface {
933
+ static shadowRootOptions: ShadowRootInit;
934
+ static styles: _$lit.CSSResult;
935
+ accessor purpose: CreateFlowBodyPurpose;
936
+ /**
937
+ * Name of the flow definition to run, matching the `name` in its flow
938
+ * file. When set, the server resolves that definition directly instead
939
+ * of picking one by audience. Omit to run the project's default flow.
940
+ */
941
+ accessor flowName: string;
942
+ /**
943
+ * SDK project handle returned by `configureZitadel()`. Set from JS (or a
944
+ * framework binding). When set, takes precedence over both the
945
+ * `project-id`/`proxy-path`/`url` attributes and the global singleton from
946
+ * `getZitadelConfig()`.
947
+ */
948
+ accessor project: ZitadelProject | undefined;
949
+ /**
950
+ * Project ID, set declaratively in HTML. Lets the component be configured on
951
+ * a plain page without JS or `configureZitadel()`. Ignored when the `project`
952
+ * property or a `configureZitadel()` global is set. See {@link projectAttrs}.
953
+ */
954
+ accessor projectId: string;
955
+ /**
956
+ * Proxy path for API requests (e.g. `/__nextgen`), set declaratively in HTML.
957
+ * Defaults to `/__nextgen` when omitted, matching `configureZitadel()`.
958
+ */
959
+ accessor proxyPath: string;
960
+ /**
961
+ * Full URL of the Zitadel auth backend, set declaratively in HTML. Optional —
962
+ * not needed in client-only setups.
963
+ */
964
+ accessor url: string;
965
+ /**
966
+ * URL to navigate to after a successful embedded sign-in. When set, the
967
+ * orchestrator exchanges the terminal `handoff_token` via the generated
968
+ * API client (setting the session cookie) and then performs a full
969
+ * navigation to this URL so host middleware can observe the cookie.
970
+ * For `complete: "redirect"` the orchestrator follows `redirect_uri`
971
+ * instead and does not run the exchange.
972
+ */
973
+ accessor postSignInUrl: string;
974
+ /**
975
+ * Existing flow handle to resume rather than start a new flow. When set,
976
+ * the orchestrator hits `GET /flow/{id}` instead of `POST /flow` on
977
+ * mount, so a page reload after a network blip can re-render the same
978
+ * step without losing collected state.
979
+ */
980
+ accessor resumeFlowId: string;
981
+ /**
982
+ * BCP 47 language tag (e.g. `"de"`, `"en-US"`). The widget resolves this
983
+ * to a built-in locale dictionary. Falls back to auto-detection from
984
+ * `document.documentElement.lang` or `navigator.language` when empty.
985
+ */
986
+ accessor lang: string;
987
+ /**
988
+ * Custom locale dictionaries keyed by language code. Entries may be
989
+ * partial — each is merged over the built-in dictionary for its language,
990
+ * so a preset like {@link businessLocales} (or a hand-written subset) is
991
+ * directly assignable:
992
+ *
993
+ * ```ts
994
+ * import { businessLocales } from "@zitadel/components";
995
+ * loginElement.locales = businessLocales;
996
+ * // or override individual keys:
997
+ * loginElement.locales = { en: { "identifier.title": "Welcome" } };
998
+ * ```
999
+ */
1000
+ accessor locales: Readonly<Record<string, Partial<Locale>>> | undefined;
1001
+ private accessor response;
1002
+ private accessor branding;
1003
+ private accessor loading;
1004
+ private accessor startupError;
1005
+ private accessor formValues;
1006
+ private engine;
1007
+ private readonly sanitise;
1008
+ /**
1009
+ * Cached compiled tenant template, keyed by source string. Re-rendering on
1010
+ * every `formValues` change otherwise re-parses the same template.
1011
+ */
1012
+ private tenantTemplateCache;
1013
+ /**
1014
+ * Whether the widget currently owns a same-document history entry (the
1015
+ * "sentinel"). The sentinel exists so the browser's back gesture fires
1016
+ * `popstate` instead of leaving the page. Exactly one sentinel is on
1017
+ * the stack at a time: it is pushed when a step with a `kind: "back"`
1018
+ * action renders, re-armed by `onPopState` after the browser consumes
1019
+ * it, and retired by `applyResponse` when a step without a back action
1020
+ * renders. The entry reuses the current URL, so the host page's
1021
+ * location (including any hash-router fragment) is never modified.
1022
+ */
1023
+ private armed;
1024
+ /**
1025
+ * Set immediately before a self-initiated `history.back()` so the
1026
+ * resulting `popstate` is ignored instead of being interpreted as a
1027
+ * user back gesture.
1028
+ */
1029
+ private ignoreNextPop;
1030
+ /** Bound `popstate` handler stored for cleanup in `disconnectedCallback`. */
1031
+ private readonly handlePopState;
1032
+ createRenderRoot(): HTMLElement | DocumentFragment;
1033
+ connectedCallback(): void;
1034
+ disconnectedCallback(): void;
1035
+ /**
1036
+ * Start the flow after the first render rather than in `connectedCallback`.
1037
+ * Frameworks that wrap web components (e.g. `@lit/react` in the console)
1038
+ * attach the element first and then assign object properties (`branding`,
1039
+ * `locale`) via setters. `connectedCallback` runs synchronously on attach
1040
+ * — before any setters from a wrapper's effects/refs — so reading those
1041
+ * properties there sees stale defaults. `firstUpdated` runs after Lit's
1042
+ * first render, by which time setters from the wrapping framework have
1043
+ * fired.
1044
+ */
1045
+ protected firstUpdated(): void;
1046
+ /**
1047
+ * Resolves the effective locale dictionary. The built-in dictionary for the
1048
+ * resolved language is used as the base; entries from the `locales` map (if
1049
+ * set) are spread on top so partial overrides work without importing and
1050
+ * spreading the full base dictionary.
1051
+ *
1052
+ * Priority: explicit `lang` attr → `navigator.language` (user preference)
1053
+ * → `document.documentElement.lang` (page default) → English fallback.
1054
+ */
1055
+ private resolveLocale;
1056
+ willUpdate(changed: PropertyValues<this>): void;
1057
+ updated(changed: PropertyValues<this>): void;
1058
+ /**
1059
+ * Apply captured values and move focus once the new step has fully
1060
+ * rendered. This commit produces the step's field/action atoms, but those
1061
+ * render their own shadow DOM on a later microtask — so await this element's
1062
+ * update *and* the child atoms' first render before touching them, rather
1063
+ * than guessing a frame with `requestAnimationFrame`.
1064
+ *
1065
+ * Focus on the *initial* response is page-mode-only: a dedicated login
1066
+ * route should focus its first field, but a widget embedded further down
1067
+ * an arbitrary page must not steal focus and scroll-jump on load. Step
1068
+ * swaps are user-initiated, so focus moves in both modes.
1069
+ */
1070
+ private hydrateStepAfterRender;
1071
+ render(): _$lit.TemplateResult<1>;
1072
+ /**
1073
+ * Inject the attribution badge into the rendered template's
1074
+ * `<zl-page-shell>` footer slot. The attribution must live INSIDE the
1075
+ * page-shell so it sits within the 100vh viewport rhythm (matching the
1076
+ * Figma sign-in frame where the pill sits 24px below the card, both
1077
+ * centred on the page). It can't be a sibling of the page-shell because
1078
+ * the page-shell already occupies the full viewport height.
1079
+ *
1080
+ * This markup is appended AFTER `renderStep` has sanitised the Liquid
1081
+ * output, so it is not run through DOMPurify. It is orchestrator-owned and
1082
+ * any tenant-supplied values (`custom_link`) are escaped via `escapeHtml`.
1083
+ */
1084
+ private injectAttribution;
1085
+ /**
1086
+ * "Secured with Zitadel" attribution chrome injected into every
1087
+ * template's page-shell footer slot. Controlled by
1088
+ * `branding.attribution.show_zitadel` — defaults to `true` for
1089
+ * community / OSS deployments. Licensed tenants can suppress the badge
1090
+ * entirely or swap it for a `custom_link` value.
1091
+ */
1092
+ private renderAttributionHtml;
1093
+ /** Declarative config read from this element's attributes. */
1094
+ private get projectAttrs();
1095
+ private startFlow;
1096
+ /**
1097
+ * When a `flow-name` lookup fails, the server's envelope only says
1098
+ * "not found" / "purpose mismatch" — it cannot know the name came from
1099
+ * an attribute. Rewrap those two codes with the attribute and the fix;
1100
+ * every other error passes through untouched.
1101
+ */
1102
+ private describeFlowSelectionError;
1103
+ private applyResponse;
1104
+ /**
1105
+ * Acts on terminal flow steps. The wire surfaces two kinds of completion:
1106
+ *
1107
+ * - `step.complete === "redirect"` — navigate the browser to
1108
+ * `response.redirect_uri` (OIDC/SAML `auth_request_id` resolved). This
1109
+ * takes precedence over `post-sign-in-url`.
1110
+ * - `step.complete === "show"` — when `post-sign-in-url` is set, exchange
1111
+ * the `handoff_token` for a session cookie and navigate there.
1112
+ *
1113
+ * `zitadel-flow-complete` is always emitted so hosts with custom post-sign-in
1114
+ * flows can handle the handoff themselves when `post-sign-in-url` is omitted.
1115
+ */
1116
+ private maybeCompleteFlow;
1117
+ private renderStep;
1118
+ /**
1119
+ * Build a `FlowIdentity` from the orchestrator's captured form values so
1120
+ * the signed-in template can greet the user by email without the API
1121
+ * having to round-trip identity claims. Email comes from the
1122
+ * identifier step; display name composes from `given_name` /
1123
+ * `family_name` when the register step ran.
1124
+ */
1125
+ private deriveIdentity;
1126
+ /** All rendered input atoms exposing the `formValue` contract. */
1127
+ private fieldAtoms;
1128
+ private applyValuesToFields;
1129
+ /**
1130
+ * Names of the current step's `required` fields whose captured value is
1131
+ * empty. Reads each atom's live `formValue` (the getter reflects the native
1132
+ * control, so autofill that skipped `input` events is still seen), so this
1133
+ * is browser-independent and does not rely on native constraint validation.
1134
+ */
1135
+ private missingRequiredFields;
1136
+ /**
1137
+ * Surface a client-side required-field error using the server's own
1138
+ * validation dialect (`error.<field>_required`, "; "-joined), so it flows
1139
+ * through the same localisation and inline/banner routing as a real
1140
+ * backend rejection — no native browser bubble. Idempotent: re-running with
1141
+ * the same keys (both submit entry points fire on one click) is a no-op.
1142
+ */
1143
+ private reportRequiredErrors;
1144
+ /**
1145
+ * Snapshot the current step's field values straight from the rendered input
1146
+ * atoms through their uniform `formValue` contract. Tag-agnostic: every
1147
+ * form-participating atom is read the same way, so a new field type needs no
1148
+ * change here. Declared fields default to "" so the backend still runs its
1149
+ * required-checks and challenge dispatch instead of silently advancing on a
1150
+ * field-less payload. Captured values are folded into `formValues` for
1151
+ * cross-step identity (the signed-in greeting) and post-error restoration.
1152
+ */
1153
+ private collectSubmitFields;
1154
+ /**
1155
+ * True once the user retired the current step error by editing a field or
1156
+ * dismissing the alert. Deliberately NON-reactive: consulting reactive
1157
+ * state in `renderStep` would change its output string on the first
1158
+ * post-dismiss keystroke, and `unsafeHTML` would rebuild the whole step
1159
+ * subtree — wiping typed values (`hydrateStepAfterRender` only re-applies
1160
+ * them on response changes) and reconnecting atoms. Reset on every new
1161
+ * response; consulted only by the `loading` re-render, which rebuilds
1162
+ * anyway.
1163
+ */
1164
+ private stepErrorDismissed;
1165
+ private handleAtomInput;
1166
+ /**
1167
+ * `zl-change` from <zl-checkbox>/<zl-select>. Persist the atom's value into
1168
+ * `formValues` — mirroring `handleAtomInput` for text fields — so a later
1169
+ * step re-render (a validation error re-parses the template via `unsafeHTML`
1170
+ * and rebuilds the atoms) restores the selection/checked state through
1171
+ * `applyValuesToFields` instead of dropping back to the template default.
1172
+ * Reads the live `formValue` off the atom rather than the event's `value`
1173
+ * token, because an unchecked checkbox reports "" there but keeps its token
1174
+ * in the detail. Also clears stale errors on the edited field.
1175
+ */
1176
+ private handleAtomEdited;
1177
+ /** Explicit dismiss of the step-error alert (it removes itself). */
1178
+ private handleAlertDismiss;
1179
+ /**
1180
+ * Retire the current step error after the user edits `fieldName`:
1181
+ * remove the form-level alert(s) and clear the edited field's inline
1182
+ * error — other fields' inline errors stay until they are edited.
1183
+ * Imperative on purpose; see {@link stepErrorDismissed}.
1184
+ */
1185
+ private clearStaleErrors;
1186
+ /** Mirror a value onto the matching rendered atom (used after atom events). */
1187
+ private syncFieldElementValue;
1188
+ private handleAtomSubmit;
1189
+ /** Secondary navigation rows (`data-action` on `.zl-card-nav__link`). */
1190
+ private handleDelegatedAction;
1191
+ private handleFormSubmit;
1192
+ /**
1193
+ * Handle a successful WebAuthn ceremony. Auto-submit with the proof
1194
+ * as `challenge_response` so the flow advances without extra user
1195
+ * interaction — the ceremony IS the factor verification (ADR 013).
1196
+ */
1197
+ private handlePasskeyResult;
1198
+ /**
1199
+ * Handle a WebAuthn ceremony error. Re-render the current step with
1200
+ * an error message so the user sees feedback and can retry or skip.
1201
+ *
1202
+ * Guard: if the step already carries the same error key, skip the update.
1203
+ * Mutating `this.response` triggers `unsafeHTML` to replace the DOM tree,
1204
+ * which reconnects a fresh `<zl-passkey>` that immediately re-starts the
1205
+ * ceremony — creating an infinite loop. The guard breaks the cycle.
1206
+ *
1207
+ * We also strip the `challenge` from the step so the template does not
1208
+ * render a new `<zl-passkey>` on re-render. Without this, the first
1209
+ * cancel would trigger a second ceremony (the guard prevents a third).
1210
+ */
1211
+ private handlePasskeyError;
1212
+ private findPrimaryAction;
1213
+ /**
1214
+ * On the initial paint, only a field earns focus: script-moved focus with
1215
+ * no prior interaction matches `:focus-visible`, so autofocusing a button
1216
+ * on a field-less step (passkey-first) paints a ring that reads as a
1217
+ * pre-selected state. Step swaps keep button focus — there the browser
1218
+ * derives the modality from the user's actual input.
1219
+ */
1220
+ private moveFocusToFirstField;
1221
+ private submit;
1222
+ /**
1223
+ * Handle the browser's back/forward gesture (ADR 022). When `popstate`
1224
+ * fires:
1225
+ *
1226
+ * - **Self-initiated** (`ignoreNextPop`) → `applyResponse` is retiring
1227
+ * the sentinel; ignore.
1228
+ * - **Back press while armed** → the browser consumed the sentinel.
1229
+ * Re-arm it immediately — so the stack shape is identical on every
1230
+ * step and repeated presses behave the same at any flow depth — then
1231
+ * submit the step's `kind: "back"` action.
1232
+ * - **Landing on the sentinel while armed** → the host page pushed an
1233
+ * entry above the sentinel (e.g. an in-page `#anchor` click) and the
1234
+ * user backed out of it. They are back where the widget expects them
1235
+ * — not asking the flow to go back; do nothing.
1236
+ * - **Forward press onto a retired sentinel** (it survives as a forward
1237
+ * entry after `history.back()`) → bounce back: flow state is
1238
+ * server-authoritative, the browser cannot skip ahead
1239
+ * (ADR 022 §Edge cases).
1240
+ * - Anything else is host-page traversal — leave the browser alone.
1241
+ */
1242
+ private onPopState;
1243
+ private handleTransportError;
1244
+ }
1245
+ declare global {
1246
+ interface HTMLElementTagNameMap {
1247
+ "zitadel-login": ZitadelLogin;
1248
+ }
1249
+ } //# sourceMappingURL=zitadel-login.d.ts.map
1250
+ //#endregion
1251
+ //#region src/orchestrator/zitadel-logout.d.ts
1252
+ /**
1253
+ * `<zitadel-logout>` — orchestrator-tier element that lets the signed-in user
1254
+ * sign out without touching the flow API.
1255
+ *
1256
+ * Reads the user's identity from the typed `getMySession` operation
1257
+ * (`GET /sessions/me`, credentialed) — the same source as `<zitadel-session>`,
1258
+ * so both signed-in surfaces stay consistent and work against the real backend.
1259
+ * The avatar/preview show `name`, then `email`, then the always-present
1260
+ * `user_id`. NOTE: the current server response includes only the `user_id`, so
1261
+ * the avatar falls back to the id until the backend returns a human-readable
1262
+ * `name`/`email`.
1263
+ *
1264
+ * It renders an avatar trigger with a dropdown that exposes a "Sign out"
1265
+ * action, and calls the typed `revokeMySession` operation in `@zitadel/api`
1266
+ * (`DELETE /sessions/me`). The server clears the session cookie via
1267
+ * `Set-Cookie: Max-Age=0`; on success the element fires `zitadel-signout`
1268
+ * and optionally navigates to `post-sign-out-url`.
1269
+ *
1270
+ * ## Template-slot mode
1271
+ *
1272
+ * When the consumer projects a `<template>` child the element renders the
1273
+ * template's clone into its light DOM with `{{display}}`, `{{identifier}}`,
1274
+ * and `{{initial}}` substituted (`{{name}}` and `{{email}}` fill as legacy
1275
+ * aliases of the first two). Any element with `data-action="logout"` inside
1276
+ * the cloned template triggers the sign-out flow. This mirrors the
1277
+ * placeholder `<nextgen-logout>`'s contract so existing markup keeps working.
1278
+ *
1279
+ * Default styles consume the `--zl-*` design tokens so tenant branding
1280
+ * applies automatically — there is no hardcoded brand colour, radius, or
1281
+ * shadow.
1282
+ */
1283
+ declare class ZitadelLogout extends LitElement {
1284
+ static styles: _$lit.CSSResult[];
1285
+ /**
1286
+ * SDK project handle returned by `configureZitadel()`. Set from JS (or a
1287
+ * framework binding). When set, takes precedence over both the
1288
+ * `project-id`/`proxy-path`/`url` attributes and the global singleton from
1289
+ * `getZitadelConfig()`.
1290
+ */
1291
+ accessor project: ZitadelProject | undefined;
1292
+ /**
1293
+ * Project ID, set declaratively in HTML. Lets the component be configured on
1294
+ * a plain page without JS or `configureZitadel()`. Ignored when the `project`
1295
+ * property or a `configureZitadel()` global is set.
1296
+ */
1297
+ accessor projectId: string;
1298
+ /**
1299
+ * Proxy path for API requests (e.g. `/__nextgen`), set declaratively in HTML.
1300
+ * Defaults to `/__nextgen` when omitted, matching `configureZitadel()`.
1301
+ */
1302
+ accessor proxyPath: string;
1303
+ /**
1304
+ * Full URL of the Zitadel auth backend, set declaratively in HTML. Optional —
1305
+ * not needed in client-only setups.
1306
+ */
1307
+ accessor url: string;
1308
+ /** URL to navigate to after a successful sign-out. */
1309
+ accessor postSignOutUrl: string;
1310
+ /**
1311
+ * Colour mode: `light`, `dark`, or `auto` (follow `prefers-color-scheme`).
1312
+ * Empty means "not stated" and defaults to `auto` — the control lives
1313
+ * inside the app's own chrome, so it follows the visitor's preference
1314
+ * rather than forcing the dark login surface. Set it explicitly when the
1315
+ * surrounding app surface is fixed: `<zitadel-logout theme="dark">`.
1316
+ */
1317
+ accessor theme: "" | ThemeMode;
1318
+ private accessor userDisplay;
1319
+ private accessor userIdentifier;
1320
+ private accessor userId;
1321
+ private accessor open;
1322
+ private accessor loading;
1323
+ private accessor errorMessage;
1324
+ private templateMode;
1325
+ private pendingTemplate;
1326
+ private projectedContainer;
1327
+ private identityRequested;
1328
+ private readonly themeController;
1329
+ connectedCallback(): void;
1330
+ disconnectedCallback(): void;
1331
+ willUpdate(): void;
1332
+ updated(): void;
1333
+ /** Declarative config read from this element's attributes. */
1334
+ private get projectAttrs();
1335
+ /**
1336
+ * Fetches the signed-in identity from `GET /sessions/me` once a project is
1337
+ * resolvable. No-ops until then (and on repeat calls) so framework property
1338
+ * timing doesn't matter and we never fire the request twice. A pending
1339
+ * `<template>` is already projected in `connectedCallback`, so when no config
1340
+ * is available yet the logout control still renders; it is re-projected with
1341
+ * the real identity once a later request succeeds.
1342
+ */
1343
+ private maybeLoadIdentity;
1344
+ private loadIdentity;
1345
+ private get initial();
1346
+ /**
1347
+ * Clones the consumer-supplied `<template>` into the light DOM, fills the
1348
+ * `{{display}}`, `{{identifier}}`, and `{{initial}}` tokens (plus the
1349
+ * legacy `{{name}}`/`{{email}}` aliases) via a TreeWalker, and
1350
+ * wires every element with `data-action="logout"` to trigger sign-out.
1351
+ * Light-DOM mounting is deliberate so the consumer's existing CSS applies.
1352
+ *
1353
+ * Re-runnable: each call replaces the previously projected clone, so a late
1354
+ * identity fetch (or a `project` assigned post-mount) updates the rendered
1355
+ * markup instead of leaving the placeholders stuck on their initial values.
1356
+ */
1357
+ private projectTemplate;
1358
+ private readonly handleDocumentClick;
1359
+ private readonly handleDocumentKeydown;
1360
+ private toggleOpen;
1361
+ /**
1362
+ * Calls `DELETE /sessions/me` (`revokeMySession`) with `credentials: "include"`.
1363
+ * The server validates the `__nextgen_session` cookie, deletes the session, and
1364
+ * clears the cookie via `Set-Cookie: Max-Age=0`. On success this element fires
1365
+ * `zitadel-signout` and optionally navigates to `postSignOutUrl`.
1366
+ */
1367
+ private doLogout;
1368
+ private handleSignOutClick;
1369
+ render(): _$lit.TemplateResult<1> | typeof nothing;
1370
+ }
1371
+ declare global {
1372
+ interface HTMLElementTagNameMap {
1373
+ "zitadel-logout": ZitadelLogout;
1374
+ }
1375
+ } //# sourceMappingURL=zitadel-logout.d.ts.map
1376
+ //#endregion
1377
+ //#region src/orchestrator/zitadel-session.d.ts
1378
+ /**
1379
+ * `<zitadel-session>` — the "signed in" card.
1380
+ *
1381
+ * Renders the post-sign-in confirmation surface (Figma `7355:8959`): a
1382
+ * centred auth card reading "Signed in as {identity}" with a **Sign out**
1383
+ * action. Composed from the same `<zl-page-shell>` / `<zl-card>` /
1384
+ * `<zl-button>` atoms as the `<zitadel-login>` orchestrator, so it inherits
1385
+ * tenant branding tokens with no hardcoded colour, radius, or shadow.
1386
+ *
1387
+ * Like `<zitadel-login>` it is widget-first: the default `variant="widget"`
1388
+ * is content-sized and transparent so the card drops into an app's own
1389
+ * page; dedicated signed-in routes opt into `variant="page"`, which claims
1390
+ * the viewport and paints the surface background (the page paint lives on
1391
+ * the internal `<zl-page-shell>`). `theme` resolves through the shared
1392
+ * surface base — explicit value, else `dark` for `page` / `auto` for
1393
+ * `widget`.
1394
+ *
1395
+ * This is the companion surface to `<zitadel-login>` for the "go straight to
1396
+ * /login" flow: the orchestrator signs the user in and redirects here (or to
1397
+ * the consumer's own page); this element proves the session and offers a way
1398
+ * back out. The in-app avatar menu lives in the separate `<zitadel-logout>`.
1399
+ *
1400
+ * - Identity is fetched from the typed `getMySession` operation
1401
+ * (`GET /sessions/me`), sent with credentials so the session cookie
1402
+ * authenticates it. The card shows `name`, then `email`, then the
1403
+ * always-present `user_id`. NOTE: the current server response includes only
1404
+ * the `user_id`, so the card displays the raw id until the backend returns a
1405
+ * human-readable `name`/`email` on `/sessions/me`. A failed or
1406
+ * unauthenticated request renders the card without an identity line rather
1407
+ * than throwing.
1408
+ * - **Sign out** calls the typed `revokeMySession` operation
1409
+ * (`DELETE /sessions/me`); the server clears the session cookie. On success
1410
+ * the element fires `zitadel-signout` (detail `{ display, identifier }`, matching the
1411
+ * shared SPA contract) and optionally navigates to `post-sign-out-url`.
1412
+ *
1413
+ * A "Continue" action is intentionally omitted for now: the post-sign-in
1414
+ * destination contract is still being decided. Consumers redirect after
1415
+ * sign-in via the `<zitadel-login>` `post-sign-in-url`.
1416
+ */
1417
+ declare class ZitadelSession extends ZitadelSurface {
1418
+ static styles: _$lit.CSSResult[];
1419
+ /**
1420
+ * SDK project handle returned by `configureZitadel()`. Set from JS (or a
1421
+ * framework binding). Takes precedence over the
1422
+ * `project-id`/`proxy-path`/`url` attributes and the global singleton.
1423
+ */
1424
+ accessor project: ZitadelProject | undefined;
1425
+ /** Project ID, set declaratively in HTML for no-JS configuration. */
1426
+ accessor projectId: string;
1427
+ /** Proxy path for API requests (e.g. `/__nextgen`), set declaratively in HTML. */
1428
+ accessor proxyPath: string;
1429
+ /** Full URL of the Zitadel auth backend, set declaratively in HTML. */
1430
+ accessor url: string;
1431
+ /** URL to navigate to after a successful sign-out. */
1432
+ accessor postSignOutUrl: string;
1433
+ /** Heading text. Defaults to the English label. */
1434
+ accessor heading: string;
1435
+ /** Sign-out action label. */
1436
+ accessor logoutLabel: string;
1437
+ private accessor userDisplay;
1438
+ private accessor userIdentifier;
1439
+ private accessor userId;
1440
+ private accessor loading;
1441
+ private accessor errorMessage;
1442
+ private identityRequested;
1443
+ connectedCallback(): void;
1444
+ /** Single identity line: human-readable name, then email, then user_id. */
1445
+ private get identityLabel();
1446
+ willUpdate(): void;
1447
+ updated(): void;
1448
+ /** Declarative config read from this element's attributes. */
1449
+ private get projectAttrs();
1450
+ /**
1451
+ * Fetches the signed-in identity from `GET /sessions/me` once a project is
1452
+ * resolvable. No-ops until then (and on repeat calls) so framework property
1453
+ * timing doesn't matter and we never fire the request twice.
1454
+ */
1455
+ private maybeLoadIdentity;
1456
+ private fetchIdentity;
1457
+ /**
1458
+ * Calls `DELETE /sessions/me` (`revokeMySession`) with credentials. On
1459
+ * success fires `zitadel-signout` and optionally navigates to
1460
+ * `postSignOutUrl`; on failure surfaces an inline error and stays put.
1461
+ */
1462
+ private doLogout;
1463
+ private handleLogout;
1464
+ render(): _$lit.TemplateResult<1>;
1465
+ }
1466
+ declare global {
1467
+ interface HTMLElementTagNameMap {
1468
+ "zitadel-session": ZitadelSession;
1469
+ }
1470
+ } //# sourceMappingURL=zitadel-session.d.ts.map
1471
+ //#endregion
1472
+ //#region src/orchestrator/branding-to-tokens.d.ts
1473
+ type BrandingToTokensOptions = {
1474
+ resolvedTheme?: ResolvedTheme;
1475
+ };
1476
+ /**
1477
+ * Build a CSS string of `:host { --zl-* }` declarations from a Branding
1478
+ * payload. Light values land on `:host`; dark overrides land on
1479
+ * `:host([data-theme="dark"])`.
1480
+ */
1481
+ declare function buildBrandingStylesheet(branding: Branding | undefined, options?: BrandingToTokensOptions): string;
1482
+ /**
1483
+ * Apply a branding payload as a `--zl-*` overrides layer on top of the base
1484
+ * token sheet. Subsequent calls replace the previous override sheet so a new
1485
+ * branding payload paints cleanly without leaking older declarations.
1486
+ *
1487
+ * Callers should run `applyBaseTokens(shadowRoot)` first (once per shadow
1488
+ * root) so the base values exist before branding patches them.
1489
+ */
1490
+ declare function applyBrandingTokens(shadowRoot: ShadowRoot, branding: Branding | undefined, resolvedTheme: ResolvedTheme): void;
1491
+ /**
1492
+ * Standalone branding→theme resolution for callers outside the orchestrator
1493
+ * (SSR, tests, embedders composing atoms by hand). `<zitadel-login>` itself
1494
+ * uses {@link ThemeController}, which layers the element's `theme` property
1495
+ * and a variant-derived fallback on top of the same branding input.
1496
+ *
1497
+ * Defaults to dark: the design system's primary surface, and the mode a
1498
+ * hosted login page renders when a tenant states no preference.
1499
+ */
1500
+ declare function resolveTheme(branding: Branding | undefined): ResolvedTheme;
1501
+ //#endregion
1502
+ //#region src/orchestrator/font-loader.d.ts
1503
+ /**
1504
+ * Inject the tenant's `branding.font_url` stylesheet. Pass `null`/`undefined`
1505
+ * to withdraw this surface's registration (e.g. when a flow resolves with no
1506
+ * tenant font); the link disappears once no surface registers a URL.
1507
+ */
1508
+ declare function applyFontUrl(shadowRoot: ShadowRoot, fontUrl: string | null | undefined): void;
1509
+ //#endregion
1510
+ //#region src/orchestrator/template-names.d.ts
1511
+ /**
1512
+ * Names of the bundled Liquid templates the `<zitadel-login>` orchestrator
1513
+ * registers.
1514
+ *
1515
+ * This lives in its own module — separate from `liquid.ts` — so the public
1516
+ * barrel can re-export `TEMPLATE_NAMES` without dragging LiquidJS' `Liquid`
1517
+ * type (and its Node ambient-type requirements) into the published
1518
+ * declaration surface. See `liquid.ts` / the orchestrator barrel.
1519
+ */
1520
+ declare const TEMPLATE_NAMES: {
1521
+ readonly default: "default";
1522
+ readonly authForm: "auth-form";
1523
+ readonly passkeyUpsell: "passkey-upsell";
1524
+ readonly signedIn: "signed-in";
1525
+ };
1526
+ //#endregion
1527
+ //#region src/orchestrator/mandatory-gates.d.ts
1528
+ declare const MANDATORY_GATES_MARKER = "ZL_MANDATORY_GATES";
1529
+ declare const mandatoryGatesMarkerComment = "<!--ZL_MANDATORY_GATES-->";
1530
+ declare function patchMandatoryGates(html: string, step: CreateFlow201Step, locale: Locale): string;
1531
+ //#endregion
1532
+ //#region src/orchestrator/sanitiser.d.ts
1533
+ /**
1534
+ * Returns a sanitiser bound to the current manifest registry. Callers should
1535
+ * cache the result; rebuilding is cheap but allocates a fresh DOMPurify config.
1536
+ */
1537
+ declare function createSanitiser(): (html: string) => string;
1538
+ //#endregion
1539
+ //#region src/orchestrator/api-client.d.ts
1540
+ declare function startFlow(api: ZitadelApi, input: CreateFlowBody): Promise<CreateFlow201>;
1541
+ declare function submitStep(api: ZitadelApi, id: string, body: SubmitFlowStepBody): Promise<CreateFlow201>;
1542
+ declare function getCurrentStep(api: ZitadelApi, id: string): Promise<CreateFlow201>;
1543
+ //#endregion
1544
+ //#region src/orchestrator/branding-validator.d.ts
1545
+ type BrandingValidationResult = {
1546
+ branding: Branding | undefined;
1547
+ issues: readonly string[];
1548
+ };
1549
+ type BrandingValidationContext = {
1550
+ /** Origin of the document that will paint the branding payload. */renderingOrigin?: string;
1551
+ };
1552
+ declare function validateBranding(input: Branding | undefined, context?: BrandingValidationContext): BrandingValidationResult;
1553
+ //#endregion
1554
+ //#region src/orchestrator/template-context.d.ts
1555
+ type FlowMessage = {
1556
+ level: "info" | "warning";
1557
+ text_key: string;
1558
+ };
1559
+ type FlowError = {
1560
+ code?: string;
1561
+ text_key?: string;
1562
+ message?: string;
1563
+ /**
1564
+ * Name of the step field this error targets. When set (and the step renders
1565
+ * that field), the template routes the error inline under the control via
1566
+ * the `fieldError` filter; when absent it renders in the form-level banner
1567
+ * (`formLevelError`). See `localiseFlowErrorKeys` in `liquid.ts`.
1568
+ */
1569
+ field?: string;
1570
+ };
1571
+ type FlowIdentity = {
1572
+ display_name?: string;
1573
+ email_address?: string;
1574
+ avatar_url?: string;
1575
+ };
1576
+ /**
1577
+ * Liquid render context. The orchestrator builds this from the wire
1578
+ * `CreateFlow201` payload before invoking the engine.
1579
+ *
1580
+ * Capability dictionaries point at the orval wire shapes directly. The only
1581
+ * client-only pieces are `messages`, `identity`, `errors`, the resolved
1582
+ * `branding` (v2 superset), and `loading`.
1583
+ */
1584
+ type LiquidContext = {
1585
+ step: Pick<CreateFlow201Step, "name" | "complete" | "texts">;
1586
+ fields: readonly CreateFlow201StepFieldsItem[];
1587
+ actions: readonly CreateFlow201StepActionsItem[];
1588
+ gates: CreateFlow201StepGates;
1589
+ sso_providers: readonly CreateFlow201StepSsoProvidersItem[];
1590
+ challenge: CreateFlow201StepChallenge | null;
1591
+ messages: readonly FlowMessage[];
1592
+ identity: FlowIdentity | null;
1593
+ errors: readonly FlowError[];
1594
+ branding: Branding | Record<string, never>;
1595
+ loading: boolean;
1596
+ };
1597
+ //#endregion
1598
+ export { BrandingPalette as A, en as B, ZitadelLogin as C, Branding as D, ThemeMode as E, builtinLocales as F, businessLocales as I, it as L, BrandingTheme as M, BrandingTypography as N, BrandingAssets as O, FlowLayout as P, de as R, ZitadelLogout as S, ThemeController as T, applyFontUrl as _, LiquidContext as a, resolveTheme as b, validateBranding as c, submitStep as d, createSanitiser as f, TEMPLATE_NAMES as g, patchMandatoryGates as h, FlowMessage as i, BrandingShape as j, BrandingAttribution as k, getCurrentStep as l, mandatoryGatesMarkerComment as m, FlowError as n, BrandingValidationContext as o, MANDATORY_GATES_MARKER as p, FlowIdentity as r, BrandingValidationResult as s, layoutChromeCss as t, startFlow as u, applyBrandingTokens as v, ResolvedTheme as w, ZitadelSession as x, buildBrandingStylesheet as y, Locale as z };
1599
+ //# sourceMappingURL=index-DFdR16-D.d.mts.map