@zitadel/components 0.1.0-alpha.16 → 0.1.0-alpha.18

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 (36) hide show
  1. package/README.md +89 -20
  2. package/dist/atoms/index.d.mts +1 -1
  3. package/dist/atoms/index.mjs +1 -1
  4. package/dist/{atoms-C-zXJjaz.mjs → atoms-5-wYIl88.mjs} +295 -190
  5. package/dist/atoms-5-wYIl88.mjs.map +1 -0
  6. package/dist/default-Bnjy2dJB.mjs +6 -0
  7. package/dist/default-Bnjy2dJB.mjs.map +1 -0
  8. package/dist/{index-BniwXaIC.d.mts → index-BRGZPZ2y.d.mts} +111 -1
  9. package/dist/index-BRGZPZ2y.d.mts.map +1 -0
  10. package/dist/{index-D1eMaWbY.d.mts → index-CsJiPZtJ.d.mts} +438 -210
  11. package/dist/index-CsJiPZtJ.d.mts.map +1 -0
  12. package/dist/{index-BwQLFs9R.d.mts → index-DIGjtG4z.d.mts} +1642 -1027
  13. package/dist/index-DIGjtG4z.d.mts.map +1 -0
  14. package/dist/index.d.mts +5 -5
  15. package/dist/index.mjs +5 -5
  16. package/dist/jsx.d.ts +63 -0
  17. package/dist/manifests.mjs +1 -1
  18. package/dist/orchestrator/index.d.mts +3 -3
  19. package/dist/orchestrator/index.mjs +3 -3
  20. package/dist/{orchestrator-BN2nT9FZ.mjs → orchestrator-CctLkpmB.mjs} +1229 -767
  21. package/dist/orchestrator-CctLkpmB.mjs.map +1 -0
  22. package/dist/standalone.mjs +2552 -1291
  23. package/dist/tokens/index.d.mts +1 -1
  24. package/dist/tokens/index.mjs +1 -1
  25. package/dist/tokens-BV-PPbQd.mjs +356 -0
  26. package/dist/tokens-BV-PPbQd.mjs.map +1 -0
  27. package/package.json +14 -10
  28. package/dist/atoms-C-zXJjaz.mjs.map +0 -1
  29. package/dist/default-BoC3JEsO.mjs +0 -6
  30. package/dist/default-BoC3JEsO.mjs.map +0 -1
  31. package/dist/index-BniwXaIC.d.mts.map +0 -1
  32. package/dist/index-BwQLFs9R.d.mts.map +0 -1
  33. package/dist/index-D1eMaWbY.d.mts.map +0 -1
  34. package/dist/orchestrator-BN2nT9FZ.mjs.map +0 -1
  35. package/dist/tokens-CbH2s1jV.mjs +0 -246
  36. package/dist/tokens-CbH2s1jV.mjs.map +0 -1
@@ -1,59 +1,13 @@
1
- import { $ as ExchangeHandoff200, A as CreateFlow201StepGates, At as ListFlowDefinitionsParams, B as CreateSchemaBody, Bt as QueryProjectsBody, C as CreateFlow201, Ct as GetUserByIDParams, D as CreateFlow201StepActionsItem, Dt as IssueChallenge201, E as CreateFlow201Step, Et as IntrospectBody, F as CreateFlowDefinitionBody, Ft as ListUsers200Item, G as CreateTeamBody, Gt as SubmitFlowEventBody, H as CreateSession201, Ht as RevokeTokenBody, I as CreateHandoff200, It as ListUsersParams, J as CreateUserBody, Jt as UpdateFlowDefinition200, K as CreateTeamParams, Kt as SubmitFlowStep200, L as CreateProject201, Lt as PatchProject200, M as CreateFlowBody, Mt as ListSchemasParams, N as CreateFlowBodyPurpose, Nt as ListSessions200, O as CreateFlow201StepChallenge, Ot as IssueChallengeBody, P as CreateFlowDefinition201, Pt as ListSessionsParams, Q as EndSessionParams, Qt as VerifyChallengeProofBody, R as CreateProjectBody, Rt as PatchProjectBody, S as CreateAuthAttemptBody, St as GetUserByID200, T as CreateFlow201BrandingLayout, Tt as Introspect200, U as CreateSessionBody, Ut as SetUserPasswordBody, V as CreateSchemaParams, Vt as RevokeSessionParams, W as CreateTeam201, Wt as SetUserPasswordParams, X as DeactivateFlowDefinitionParams, Xt as UpdateFlowDefinitionParams, Y as CreateUserParams, Yt as UpdateFlowDefinitionBody, Z as DeleteFlowDefinitionParams, Zt as VerifyChallengeProof200, _ as AuthorizeDevice200, _t as GetSessionParams, at as GetFlowStep200, b as AuthorizeGetParams, bt as GetToken200, ct as GetLiveDefault, dt as GetOpenIDConfiguration200, et as ExchangeHandoffBody, ft as GetProject200, g as ActivateFlowDefinitionParams, gt as GetSession200, ht as GetSchemaByIdParams, it as GetFlowDefinitionParams, j as CreateFlow201StepSsoProvidersItem, jt as ListSchemas200Item, k as CreateFlow201StepFieldsItem, kt as ListFlowDefinitions200, lt as GetMySession200, mt as GetSchemaById200, nt as GetAuthAttempt200, ot as GetHealthDefault, pt as GetReadyDefault, q as CreateUser201, qt as SubmitFlowStepBody, rt as GetFlowDefinition200, st as GetKeys200, tt as ExchangeHandoffParams, ut as GetMyUser200, v as AuthorizeDeviceParams, vt as GetTeam200, w as CreateFlow201Branding, wt as GetUserInfo200, x as CreateAuthAttempt201, xt as GetTokenBody, y as AuthorizeGetDefault, yt as GetTeamParams, z as CreateSchema201, zt as QueryProjects200 } from "./index-BwQLFs9R.mjs";
1
+ import { $ as ExchangeHandoff200, $t as SubmitFlowStepBody, A as CreateFlow201StepGates, At as ListFlowDefinitionsParams, B as CreateSchemaBody, Bt as PatchProjectBody, C as CreateFlow201, Ct as GetUserByIDParams, D as CreateFlow201StepActionsItem, Dt as ListBranding200Item, E as CreateFlow201Step, Et as IssueChallengeBody, F as CreateFlowDefinitionBody, Ft as ListUserTeams200, G as CreateTeamBody, Gt as QuerySessionsParams, H as CreateSession201, Ht as QueryProjectsBody, I as CreateHandoff200, It as ListUserTeamsParams, J as CreateUserBody, Jt as QueryTeamsParams, K as CreateTeamParams, Kt as QueryTeams200, L as CreateProject201, Lt as ListUsers200, M as CreateFlowBody, Mt as ListSchemasParams, N as CreateFlowBodyPurpose, Nt as ListUserPasskeys200, O as CreateFlow201StepChallenge, Ot as ListBrandingParams, P as CreateFlowDefinition201, Pt as ListUserPasskeysParams, Q as DeleteUserByIDParams, Qt as SubmitFlowStep200, R as CreateProjectBody, Rt as ListUsersParams, S as CreateBrandingParams, St as GetUserByID200, T as CreateFlow201BrandingLayout, Tt as IssueChallenge201, U as CreateSessionBody, Ut as QuerySessions200, V as CreateSchemaParams, Vt as QueryProjects200, W as CreateTeam201, Wt as QuerySessionsBody, X as DeleteFlowDefinitionParams, Xt as SetUserPasswordBody, Y as CreateUserParams, Yt as RevokeSessionParams, Z as DeleteTeamParams, Zt as SetUserPasswordParams, _ as CompleteClaimBody, _t as GetSchemaByIdParams, an as UpdateTeamParams, at as GetClaimStatus200, b as CreateBranding201, bt as GetTeam200, ct as GetFlowDefinitionParams, dt as GetLiveDefault, en as UpdateFlowDefinition200, et as ExchangeHandoffBody, ft as GetMySession200, g as CompleteClaim200, gt as GetSchemaById200, ht as GetReadyDefault, in as UpdateTeamBody, it as GetBrandingByIdParams, j as CreateFlow201StepSsoProvidersItem, jt as ListSchemas200Item, k as CreateFlow201StepFieldsItem, kt as ListFlowDefinitions200, lt as GetFlowStep200, mt as GetProject200, nn as UpdateFlowDefinitionParams, nt as GetAuthAttempt200, on as VerifyChallengeProof200, ot as GetClaimStatusParams, pt as GetMyUser200, q as CreateUser201, qt as QueryTeamsBody, rn as UpdateTeam200, rt as GetBrandingById200, sn as VerifyChallengeProofBody, st as GetFlowDefinition200, tn as UpdateFlowDefinitionBody, tt as ExchangeHandoffParams, ut as GetHealthDefault, v as CreateAuthAttempt201, vt as GetSession200, w as CreateFlow201Branding, wt as InitClaim201, x as CreateBrandingBody, xt as GetTeamParams, y as CreateAuthAttemptBody, yt as GetSessionParams, z as CreateSchema201, zt as PatchProject200 } from "./index-DIGjtG4z.mjs";
2
2
  import * as _$lit from "lit";
3
3
  import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, nothing } from "lit";
4
4
  import layoutChromeCss from "./templates/layout-chrome.css?inline";
5
5
 
6
- //#region ../api/dist/zitadelNextGen-CXFZoHGo.d.mts
6
+ //#region ../api/dist/zitadelNextGen-BCljAZpG.d.mts
7
7
  //#region src/generated/endpoints/zitadelNextGen.d.ts
8
8
  declare namespace zitadelNextGen_d_exports {
9
- export { activateFlowDefinition, authorizeDevice, authorizeGet, createAuthAttempt, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deactivateFlowDefinition, deleteFlowDefinition, endSession, exchangeHandoff, getActivateFlowDefinitionUrl, getAuthAttempt, getAuthorizeDeviceUrl, getAuthorizeGetUrl, getCreateAuthAttemptUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeactivateFlowDefinitionUrl, getDeleteFlowDefinitionUrl, getEndSessionUrl, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetKeysUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetOpenIDConfigurationUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetTokenUrl, getGetUserByIDUrl, getGetUserInfoUrl, getHealth, getIntrospectUrl, getIssueChallengeUrl, getKeys, getListFlowDefinitionsUrl, getListSchemasUrl, getListSessionsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getOpenIDConfiguration, getPatchProjectUrl, getProject, getQueryProjectsUrl, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getRevokeTokenUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowEventUrl, getSubmitFlowStepUrl, getTeam, getToken, getUpdateFlowDefinitionUrl, getUserByID, getUserInfo, getVerifyChallengeProofUrl, introspect, issueChallenge, listFlowDefinitions, listSchemas, listSessions, listUsers, patchProject, queryProjects, revokeMySession, revokeSession, revokeToken, setUserPassword, submitFlowEvent, submitFlowStep, updateFlowDefinition, verifyChallengeProof };
9
+ export { completeClaim, createAuthAttempt, createBranding, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, deleteTeam, deleteUserByID, exchangeHandoff, getAuthAttempt, getBrandingById, getClaimStatus, getCompleteClaimUrl, getCreateAuthAttemptUrl, getCreateBrandingUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, getDeleteFlowDefinitionUrl, getDeleteTeamUrl, getDeleteUserByIDUrl, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListFlowDefinitionsUrl, getListSchemasUrl, getListUserPasskeysUrl, getListUserTeamsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getPatchProjectUrl, getProject, getQueryProjectsUrl, getQuerySessionsUrl, getQueryTeamsUrl, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowStepUrl, getTeam, getUpdateFlowDefinitionUrl, getUpdateTeamUrl, getUserByID, getVerifyChallengeProofUrl, initClaim, issueChallenge, listBranding, listFlowDefinitions, listSchemas, listUserPasskeys, listUserTeams, listUsers, patchProject, queryProjects, querySessions, queryTeams, revokeMySession, revokeSession, setUserPassword, submitFlowStep, updateFlowDefinition, updateTeam, verifyChallengeProof };
10
10
  }
11
- declare const getGetOpenIDConfigurationUrl: () => string;
12
- /**
13
- * Retrieve the OpenID Connect configuration
14
- * @summary Get OpenID Connect configuration
15
- */
16
- declare const getOpenIDConfiguration: (options?: RequestInit) => Promise<GetOpenIDConfiguration200>;
17
- declare const getAuthorizeGetUrl: (params: AuthorizeGetParams) => string;
18
- /**
19
- * @summary Authorize a user
20
- */
21
- declare const authorizeGet: (params: AuthorizeGetParams, options?: RequestInit) => Promise<AuthorizeGetDefault>;
22
- declare const getAuthorizeDeviceUrl: (params: AuthorizeDeviceParams) => string;
23
- /**
24
- * @summary Authorize a device
25
- */
26
- declare const authorizeDevice: (params: AuthorizeDeviceParams, options?: RequestInit) => Promise<AuthorizeDevice200>;
27
- declare const getEndSessionUrl: (params?: EndSessionParams) => string;
28
- /**
29
- * @summary End a session
30
- */
31
- declare const endSession: (params?: EndSessionParams, options?: RequestInit) => Promise<void>;
32
- declare const getIntrospectUrl: () => string;
33
- /**
34
- * @summary Introspect a token
35
- */
36
- declare const introspect: (introspectBody: IntrospectBody, options?: RequestInit) => Promise<Introspect200>;
37
- declare const getGetKeysUrl: () => string;
38
- /**
39
- * @summary Get public keys
40
- */
41
- declare const getKeys: (options?: RequestInit) => Promise<GetKeys200>;
42
- declare const getRevokeTokenUrl: () => string;
43
- /**
44
- * @summary Revoke an access token or refresh token
45
- */
46
- declare const revokeToken: (revokeTokenBody: RevokeTokenBody, options?: RequestInit) => Promise<void>;
47
- declare const getGetTokenUrl: () => string;
48
- /**
49
- * @summary Get access token
50
- */
51
- declare const getToken: (getTokenBody: GetTokenBody, options?: RequestInit) => Promise<GetToken200>;
52
- declare const getGetUserInfoUrl: () => string;
53
- /**
54
- * @summary Get user info
55
- */
56
- declare const getUserInfo: (options?: RequestInit) => Promise<GetUserInfo200>;
57
11
  declare const getGetHealthUrl: () => string;
58
12
  /**
59
13
  * Check whether the server is healthy
@@ -81,17 +35,40 @@ declare const getListUsersUrl: (params?: ListUsersParams) => string;
81
35
  /**
82
36
  * @summary List users
83
37
  */
84
- declare const listUsers: (params?: ListUsersParams, options?: RequestInit) => Promise<ListUsers200Item[]>;
38
+ declare const listUsers: (params?: ListUsersParams, options?: RequestInit) => Promise<ListUsers200>;
85
39
  declare const getGetUserByIDUrl: (userId: string, params: GetUserByIDParams) => string;
86
40
  /**
87
41
  * @summary Get user by ID
88
42
  */
89
43
  declare const getUserByID: (userId: string, params: GetUserByIDParams, options?: RequestInit) => Promise<GetUserByID200>;
44
+ declare const getDeleteUserByIDUrl: (userId: string, params: DeleteUserByIDParams) => string;
45
+ /**
46
+ * @summary Delete user by ID
47
+ */
48
+ declare const deleteUserByID: (userId: string, params: DeleteUserByIDParams, options?: RequestInit) => Promise<void>;
49
+ declare const getListUserPasskeysUrl: (userId: string, params: ListUserPasskeysParams) => string;
50
+ /**
51
+ * @summary List user passkeys
52
+ */
53
+ declare const listUserPasskeys: (userId: string, params: ListUserPasskeysParams, options?: RequestInit) => Promise<ListUserPasskeys200>;
90
54
  declare const getSetUserPasswordUrl: (userId: string, params: SetUserPasswordParams) => string;
91
55
  /**
92
56
  * @summary Set user password
93
57
  */
94
58
  declare const setUserPassword: (userId: string, setUserPasswordBody: SetUserPasswordBody, params: SetUserPasswordParams, options?: RequestInit) => Promise<void>;
59
+ declare const getListUserTeamsUrl: (userId: string, params: ListUserTeamsParams) => string;
60
+ /**
61
+ * The user's team roster, ordered by team name. Each entry carries the
62
+ team's name, so a client renders a page without resolving ids one by one.
63
+
64
+ This is the N:N roster and it is not lifecycle ownership: the single team
65
+ that owns the user's lifecycle is reported as `metadata.lifecycle_owner_team_id`
66
+ on the user read endpoints. Memberships the user was removed from are not
67
+ returned.
68
+
69
+ * @summary List the teams a user belongs to
70
+ */
71
+ declare const listUserTeams: (userId: string, params: ListUserTeamsParams, options?: RequestInit) => Promise<ListUserTeams200>;
95
72
  declare const getGetMyUserUrl: () => string;
96
73
  /**
97
74
  * @summary Get my user information
@@ -104,7 +81,7 @@ the first capability step. Creates a new session implicitly unless
104
81
  `session_id` is provided (for step-up / reauth on an existing session).
105
82
 
106
83
  The response contains an `id` field — the flow handle. Use it as the path
107
- parameter for all subsequent `/flow/{id}/submit` and `/flow/{id}/event` calls.
84
+ parameter for all subsequent `/flow/{id}/submit` calls.
108
85
 
109
86
  The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
110
87
  the flow's orchestration state (current step, collected data, history).
@@ -155,14 +132,6 @@ frontend never sees a `complete` for intermediate flows.
155
132
  * @summary Submit step data and advance
156
133
  */
157
134
  declare const submitFlowStep: (id: string, submitFlowStepBody: SubmitFlowStepBody, options?: RequestInit) => Promise<SubmitFlowStep200>;
158
- declare const getSubmitFlowEventUrl: (id: string) => string;
159
- /**
160
- * Submits telemetry or fingerprint data from the frontend.
161
- Does not advance the state machine. Used for risk evaluation.
162
-
163
- * @summary Submit client-side event
164
- */
165
- declare const submitFlowEvent: (id: string, submitFlowEventBody: SubmitFlowEventBody, options?: RequestInit) => Promise<void>;
166
135
  declare const getCreateAuthAttemptUrl: () => string;
167
136
  /**
168
137
  * Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
@@ -257,6 +226,37 @@ declare const getPatchProjectUrl: (projectId: string) => string;
257
226
  * @summary Update project
258
227
  */
259
228
  declare const patchProject: (projectId: string, patchProjectBody: PatchProjectBody, options?: RequestInit) => Promise<PatchProject200>;
229
+ declare const getInitClaimUrl: (projectId: string) => string;
230
+ /**
231
+ * Starts a claim challenge for an unclaimed project. Authenticated by the
232
+ project secret, this mints a single-use, short-lived challenge and returns
233
+ the `claim_url` the developer opens in a browser to complete the claim,
234
+ together with the `challenge_id` the CLI polls with. The exact expiry is
235
+ carried by `expires_at` on the response.
236
+
237
+ * @summary Initialize a project claim
238
+ */
239
+ declare const initClaim: (projectId: string, options?: RequestInit) => Promise<InitClaim201>;
240
+ declare const getGetClaimStatusUrl: (projectId: string, params: GetClaimStatusParams) => string;
241
+ /**
242
+ * Polled by the CLI while a browser completes the claim. Authorized by the
243
+ project secret that initiated the challenge. Returns `pending`, or
244
+ `completed` with the owning team, the claim timestamp, and the dashboard
245
+ URL once the browser leg has finished.
246
+
247
+ * @summary Get claim status
248
+ */
249
+ declare const getClaimStatus: (projectId: string, params: GetClaimStatusParams, options?: RequestInit) => Promise<GetClaimStatus200>;
250
+ declare const getCompleteClaimUrl: (projectId: string) => string;
251
+ /**
252
+ * Called by the browser after the developer authenticates on the claim page.
253
+ Authenticated by the `__nextgen_session` cookie, it attaches the project to
254
+ the developer's personal team using the `challenge_id` from the claim URL as
255
+ its single-use, browser-safe authorization.
256
+
257
+ * @summary Complete a project claim
258
+ */
259
+ declare const completeClaim: (projectId: string, completeClaimBody: CompleteClaimBody, options?: RequestInit) => Promise<CompleteClaim200>;
260
260
  declare const getCreateSessionUrl: () => string;
261
261
  /**
262
262
  * Creates an anonymous session shell with no user and no factors (`state: building`).
@@ -267,8 +267,16 @@ Use this explicitly when you want to:
267
267
  can be correlated with the eventual authenticated session from the start.
268
268
  - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
269
269
 
270
- The returned `session_token` authorises GET and DELETE on this session.
271
- It is superseded when a handoff exchange completes — clients must replace it at that point.
270
+ Creating a session is an app-plane operation on the project credential
271
+ (`session.write`). The returned `session_token` is a session credential for the
272
+ end-user client, not a management scope: it is delivered as the
273
+ `__nextgen_session` cookie and authorises the self-service operations
274
+ `GET /sessions/me` and `DELETE /sessions/me` (`nextgenSession` scheme). The
275
+ by-id operations `GET /sessions/{session_id}` and `DELETE /sessions/{session_id}`
276
+ are operator endpoints and require `session.read` / `session.delete` instead.
277
+
278
+ The `session_token` is superseded when a handoff exchange completes — clients must
279
+ replace it at that point.
272
280
 
273
281
  Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
274
282
  full session TTL when the first authentication factor is written via a completing `auth_attempt`.
@@ -276,14 +284,15 @@ full session TTL when the first authentication factor is written via a completin
276
284
  * @summary Create an anonymous session shell
277
285
  */
278
286
  declare const createSession: (createSessionBody: CreateSessionBody, options?: RequestInit) => Promise<CreateSession201>;
279
- declare const getListSessionsUrl: (params: ListSessionsParams) => string;
287
+ declare const getQuerySessionsUrl: (params: QuerySessionsParams) => string;
280
288
  /**
281
- * Returns a paginated list of sessions for a project.
282
- Requires a project service key (OAuth2 client credentials).
289
+ * Returns the sessions of a project, paginated with a cursor.
290
+ Sessions of every lifecycle state are returned; each carries its `state`.
291
+ Requires `session.read` permission.
283
292
 
284
- * @summary List sessions
293
+ * @summary Query sessions
285
294
  */
286
- declare const listSessions: (params: ListSessionsParams, options?: RequestInit) => Promise<ListSessions200>;
295
+ declare const querySessions: (querySessionsBody: QuerySessionsBody, params: QuerySessionsParams, options?: RequestInit) => Promise<QuerySessions200>;
287
296
  declare const getExchangeHandoffUrl: (params: ExchangeHandoffParams) => string;
288
297
  /**
289
298
  * Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
@@ -321,10 +330,15 @@ against the same `session_id`) to restore a dropped assurance level.
321
330
  declare const getSession: (sessionId: string, params: GetSessionParams, options?: RequestInit) => Promise<GetSession200>;
322
331
  declare const getRevokeSessionUrl: (sessionId: string, params: RevokeSessionParams) => string;
323
332
  /**
324
- * Revokes the session immediately (`state: revoked`). This is the logout operation.
333
+ * Permanently deletes the session, terminating it immediately.
334
+
335
+ This is the operator revoke path and requires the `session.delete` scope on a
336
+ project-bound credential. End-user logout with the `__nextgen_session` cookie is
337
+ `DELETE /sessions/me` (`nextgenSession` scheme).
325
338
 
326
- The session_token issued at creation (or superseded by a handoff exchange) is required.
327
- After revocation, any tokens derived from this session are invalidated.
339
+ Idempotent: deleting a session that does not exist (or was already deleted)
340
+ still returns 204. After deletion, any tokens derived from the session are
341
+ invalidated.
328
342
 
329
343
  * @summary Revoke session
330
344
  */
@@ -343,20 +357,24 @@ against the same `session_id`) to restore a dropped assurance level.
343
357
  declare const getMySession: (options?: RequestInit) => Promise<GetMySession200>;
344
358
  declare const getRevokeMySessionUrl: () => string;
345
359
  /**
346
- * Revokes the session immediately (`state: revoked`). This is the logout operation.
360
+ * Logs out by permanently deleting the session.
347
361
 
348
- The __nextgen_session cookie issued at creation (or superseded by a handoff exchange) is required.
349
- After revocation, any tokens derived from this session are invalidated including the cookie itself, which is cleared in the response.
362
+ The `__nextgen_session` cookie issued at creation (or superseded by a handoff
363
+ exchange) is required. Idempotent: if the session is already gone this still
364
+ returns 204. Any tokens derived from the session are invalidated, and the
365
+ cookie itself is cleared in the response.
350
366
 
351
367
  * @summary Revoke my session
352
368
  */
353
369
  declare const revokeMySession: (options?: RequestInit) => Promise<void>;
354
370
  declare const getCreateSchemaUrl: (params: CreateSchemaParams) => string;
355
371
  /**
356
- * Create a new schema. The schema definition must include a unique $id field,
357
- which will be used to identify the schema in future requests. The $id must
358
- be a valid URI and should ideally point to the location where the schema
359
- can be accessed.
372
+ * Create a new schema. The optional `$id` field is the JSON Schema document
373
+ URI used to identify the schema in future requests (GitOps-stable identity,
374
+ not a free-form resource primary key). When `$id` is omitted, the server
375
+ generates a `sch_*` URL. When provided, `$id` must be unique within the
376
+ project and should ideally be a valid URI pointing at where the schema can
377
+ be accessed.
360
378
 
361
379
  The schema can either be a concrete schema, e.g. a user schema, or a
362
380
  schema-url which will be resolved by the server.
@@ -420,35 +438,79 @@ If the flow definition is the last active flow definition for a given purpose, t
420
438
  * @summary Delete a flow definition by id
421
439
  */
422
440
  declare const deleteFlowDefinition: (id: string, params: DeleteFlowDefinitionParams, options?: RequestInit) => Promise<void>;
423
- declare const getActivateFlowDefinitionUrl: (id: string, params: ActivateFlowDefinitionParams) => string;
441
+ declare const getCreateTeamUrl: (params: CreateTeamParams) => string;
424
442
  /**
425
- * Activate a flow definition by transitioning it from a `draft` state to an `active` state.
426
- Alternatively, the status of a flow definition can also be set via the `POST /flow_definitions` and `PUT /flow_definitions/{id}` endpoints by setting the `status` attribute in the flow definition payload.
443
+ * @summary Create team
444
+ */
445
+ declare const createTeam: (createTeamBody: CreateTeamBody, params: CreateTeamParams, options?: RequestInit) => Promise<CreateTeam201>;
446
+ declare const getQueryTeamsUrl: (params: QueryTeamsParams) => string;
447
+ /**
448
+ * Returns the teams of a project, paginated with a cursor.
449
+ Teams of every lifecycle status are returned; each carries its `status`.
427
450
 
428
- * @summary Activate a flow definition by ID.
451
+ * @summary Query teams
429
452
  */
430
- declare const activateFlowDefinition: (id: string, params: ActivateFlowDefinitionParams, options?: RequestInit) => Promise<void>;
431
- declare const getDeactivateFlowDefinitionUrl: (id: string, params: DeactivateFlowDefinitionParams) => string;
453
+ declare const queryTeams: (queryTeamsBody: QueryTeamsBody, params: QueryTeamsParams, options?: RequestInit) => Promise<QueryTeams200>;
454
+ declare const getGetTeamUrl: (teamId: string, params: GetTeamParams) => string;
432
455
  /**
433
- * Deactivates a flow definition in the `active` state by transitioning it to the `draft` state.
434
- Flow definitions in `draft` state cannot be used to start new flows. Existing flows that use the deactivated flow definition must gracefully handle this.
435
- Alternatively, the status of a flow definition can also be set via the `POST /flow_definitions` and `PUT /flow_definitions/{id}` endpoints by setting the `status` attribute in the flow definition payload.
456
+ * Returns a Team by its id.
436
457
 
437
- * @summary Deactivate a flow definition by ID.
458
+ * @summary Get team
438
459
  */
439
- declare const deactivateFlowDefinition: (id: string, params: DeactivateFlowDefinitionParams, options?: RequestInit) => Promise<void>;
440
- declare const getCreateTeamUrl: (params: CreateTeamParams) => string;
460
+ declare const getTeam: (teamId: string, params: GetTeamParams, options?: RequestInit) => Promise<GetTeam200>;
461
+ declare const getDeleteTeamUrl: (teamId: string, params: DeleteTeamParams) => string;
441
462
  /**
442
- * @summary Create team
463
+ * Deactivates the team.
464
+
465
+ The team is tombstoned rather than erased: it stays readable through
466
+ getTeam with status `deactivated`. Its memberships are removed and the
467
+ users whose lifecycle it owns are deactivated with it.
468
+
469
+ The request is idempotent. Deleting a team that is already deactivated
470
+ or doesn't exist succeeds without changing anything.
471
+
472
+ * @summary Delete team
443
473
  */
444
- declare const createTeam: (params: CreateTeamParams, createTeamBody?: CreateTeamBody, options?: RequestInit) => Promise<CreateTeam201>;
445
- declare const getGetTeamUrl: (teamId: string, params: GetTeamParams) => string;
474
+ declare const deleteTeam: (teamId: string, params: DeleteTeamParams, options?: RequestInit) => Promise<void>;
475
+ declare const getUpdateTeamUrl: (teamId: string, params: UpdateTeamParams) => string;
446
476
  /**
447
- * Returns the current state of a team.
477
+ * Update team. Only active teams can be updated.
448
478
 
449
- * @summary Get team
479
+ * @summary Update team
450
480
  */
451
- declare const getTeam: (teamId: string, params: GetTeamParams, options?: RequestInit) => Promise<GetTeam200>; //#endregion
481
+ declare const updateTeam: (teamId: string, updateTeamBody: UpdateTeamBody, params: UpdateTeamParams, options?: RequestInit) => Promise<UpdateTeam200>;
482
+ declare const getCreateBrandingUrl: (params: CreateBrandingParams) => string;
483
+ /**
484
+ * Publishes a new immutable branding revision for the project. Branding
485
+ revisions cannot be updated or deleted; every edit publishes a new
486
+ revision, and flow responses resolve the latest revision per project
487
+ (see ADR 040).
488
+
489
+ The `liquid_template` is validated lexically on save (size, encoding,
490
+ banned patterns such as `<script>` tags, inline event handlers, and the
491
+ `| raw` filter). Authoritative LiquidJS validation runs at authoring
492
+ time via `zitadel plan` / `zitadel apply`.
493
+
494
+ * @summary Publish a new branding revision
495
+ */
496
+ declare const createBranding: (createBrandingBody: CreateBrandingBody, params: CreateBrandingParams, options?: RequestInit) => Promise<CreateBranding201>;
497
+ declare const getListBrandingUrl: (params: ListBrandingParams) => string;
498
+ /**
499
+ * Lists branding revisions for the project, newest first, capped at the
500
+ 100 most recent. The first entry is the revision flow responses
501
+ currently resolve. Deliberately unpaginated in v1 — list endpoints
502
+ gain a real query mechanism together (ADR 031); advertising pagination
503
+ parameters the server ignores would be worse than none.
504
+
505
+ * @summary List branding revisions
506
+ */
507
+ declare const listBranding: (params: ListBrandingParams, options?: RequestInit) => Promise<ListBranding200Item[]>;
508
+ declare const getGetBrandingByIdUrl: (id: string, params: GetBrandingByIdParams) => string;
509
+ /**
510
+ * Retrieves a single branding revision, including its stored configuration.
511
+ * @summary Get a branding revision by ID
512
+ */
513
+ declare const getBrandingById: (id: string, params: GetBrandingByIdParams, options?: RequestInit) => Promise<GetBrandingById200>; //#endregion
452
514
  //#endregion
453
515
  //#region ../api/dist/runtime/api-factory.d.mts
454
516
  //#region src/runtime/api-factory.d.ts
@@ -473,6 +535,8 @@ interface ZitadelProject {
473
535
  readonly projectId: string;
474
536
  /** Full URL of the Zitadel auth backend. */
475
537
  readonly url?: string;
538
+ /** The project's publishable key (ADR 036), sent as the bearer when set. */
539
+ readonly publishableKey?: string;
476
540
  }
477
541
  /**
478
542
  * Initializes app-wide SDK configuration and returns the frozen
@@ -510,9 +574,153 @@ declare const de: Locale;
510
574
  //#region src/orchestrator/locales/it.d.ts
511
575
  declare const it: Locale;
512
576
  //#endregion
577
+ //#region src/orchestrator/locales/business.d.ts
578
+ declare const businessLocales: Readonly<Record<string, Partial<Locale>>>;
579
+ //#endregion
513
580
  //#region src/orchestrator/locales/index.d.ts
514
581
  declare const builtinLocales: Readonly<Record<string, Locale>>;
515
582
  //#endregion
583
+ //#region src/orchestrator/branding.d.ts
584
+ type FlowLayout = CreateFlow201BrandingLayout;
585
+ type BrandingPalette = {
586
+ primary?: string;
587
+ on_primary?: string;
588
+ background?: string;
589
+ surface?: string;
590
+ muted?: string;
591
+ border?: string;
592
+ text?: string;
593
+ text_muted?: string;
594
+ link?: string;
595
+ success?: string;
596
+ warning?: string;
597
+ error?: string;
598
+ };
599
+ type BrandingTypography = {
600
+ font_family?: string;
601
+ font_family_mono?: string;
602
+ scale?: number;
603
+ };
604
+ type BrandingShape = {
605
+ radius?: "none" | "sm" | "md" | "lg" | "full";
606
+ density?: "compact" | "regular" | "comfortable";
607
+ };
608
+ type BrandingTheme = {
609
+ mode?: "light" | "dark" | "auto";
610
+ dark?: {
611
+ palette?: BrandingPalette;
612
+ };
613
+ };
614
+ type BrandingAssets = {
615
+ logo_dark?: string;
616
+ favicon?: string;
617
+ background_image?: string;
618
+ };
619
+ /**
620
+ * Wire shape (`CreateFlow201Branding`) plus the v2 client-only extension.
621
+ * Structurally a superset, so any `CreateFlow201Branding` payload from the
622
+ * wire is assignable to `Branding` without a cast.
623
+ *
624
+ * `attribution.show_zitadel` controls the "Secured with Zitadel" pill in
625
+ * the orchestrator footer. Tenants set it to `false` only when they have a
626
+ * licence that permits removing attribution (community / OSS deployments
627
+ * always show it). The flag intentionally lives on `Branding` so it can
628
+ * be overridden per-flow alongside the rest of the visual surface.
629
+ */
630
+ type Branding = CreateFlow201Branding & {
631
+ palette?: BrandingPalette;
632
+ typography?: BrandingTypography;
633
+ shape?: BrandingShape;
634
+ assets?: BrandingAssets;
635
+ theme?: BrandingTheme;
636
+ attribution?: BrandingAttribution;
637
+ };
638
+ type BrandingAttribution = {
639
+ show_zitadel?: boolean;
640
+ custom_link?: {
641
+ label: string;
642
+ href: string;
643
+ };
644
+ };
645
+ //#endregion
646
+ //#region src/orchestrator/theme-controller.d.ts
647
+ type ResolvedTheme = "light" | "dark";
648
+ /** Theme inputs a caller may express, before resolution. */
649
+ type ThemeMode = "light" | "dark" | "auto";
650
+ declare class ThemeController implements ReactiveController {
651
+ private readonly host;
652
+ private branding;
653
+ /** Element-level `theme` property — the embedding developer's explicit call. */
654
+ private explicitMode;
655
+ /** Used when neither the element nor the branding payload names a mode. */
656
+ private fallbackMode;
657
+ private mediaQuery;
658
+ private _theme;
659
+ constructor(host: ReactiveControllerHost);
660
+ get theme(): ResolvedTheme;
661
+ setBranding(branding: Branding | undefined): void;
662
+ /**
663
+ * Sets the element-level preference and the fallback used when neither the
664
+ * element nor the branding payload names a mode. Precedence, strongest
665
+ * first: element `theme` property → `branding.theme.mode` → fallback. The
666
+ * element wins because the page embedding the widget knows its own surface
667
+ * better than the tenant's stored branding does.
668
+ */
669
+ setModePreference(explicit: ThemeMode | undefined, fallback: ThemeMode): void;
670
+ hostConnected(): void;
671
+ hostDisconnected(): void;
672
+ private refresh;
673
+ private attach;
674
+ private detach;
675
+ private onMediaChange;
676
+ private update;
677
+ }
678
+ //#endregion
679
+ //#region src/orchestrator/surface.d.ts
680
+ /**
681
+ * Shared base for the orchestrator host elements (`<zitadel-login>`,
682
+ * `<zitadel-session>`) that render a themable page/widget surface.
683
+ *
684
+ * Owns the `variant` / `theme` public properties, the {@link ThemeController},
685
+ * and the per-update surface application (base tokens, branding overrides,
686
+ * font links, and the `data-theme` host stamp). Subclasses call
687
+ * {@link applySurfaceTheme} from their `willUpdate` so the resolved theme is
688
+ * committed in the same update cycle that reads it.
689
+ *
690
+ * Not a registered custom element — purely an implementation-sharing base.
691
+ */
692
+ declare class ZitadelSurface extends LitElement {
693
+ /**
694
+ * Sizing/chrome mode. Components size to content; pages compose them —
695
+ * so the default is `widget`: content-sized, transparent host, no
696
+ * document-level default-font injection. Dedicated routes — the hosted
697
+ * shell and the scaffolded pages — opt into `page`, which claims the
698
+ * viewport, paints the surface background, and ships the brand font.
699
+ * Fine-grained height override in both modes: `--zl-page-min-height`.
700
+ */
701
+ accessor variant: "widget" | "page";
702
+ /**
703
+ * Colour mode: `light`, `dark`, or `auto` (follow `prefers-color-scheme`).
704
+ * Empty means "not stated", and resolution falls through to the tenant's
705
+ * `branding.theme.mode`, then to a variant-derived default — `dark` for
706
+ * `page` (the hosted design system surface) and `auto` for `widget`, so an
707
+ * embedded widget matches the visitor's preference instead of forcing a
708
+ * dark card onto a light page. Set it explicitly when your app's surface
709
+ * is fixed: `<zitadel-login theme="light">`.
710
+ */
711
+ accessor theme: "" | ThemeMode;
712
+ protected readonly themeController: ThemeController;
713
+ /**
714
+ * Resolve the active theme and commit it to this element's surface: adopt
715
+ * the base token sheet, layer the branding overrides, manage the
716
+ * document-level font links, and stamp `data-theme` / `data-theme-dark` on
717
+ * the host so token lookups (and host-page selectors) flip with the mode.
718
+ * `branding` is `undefined` for surfaces without a tenant payload — the
719
+ * theme then resolves through the element preference and variant fallback.
720
+ */
721
+ protected applySurfaceTheme(branding: Branding | undefined): void;
722
+ }
723
+ //#endregion
516
724
  //#region src/orchestrator/zitadel-login.d.ts
517
725
  /**
518
726
  * `<zitadel-login>` — the auth-UI orchestrator.
@@ -546,7 +754,7 @@ declare const builtinLocales: Readonly<Record<string, Locale>>;
546
754
  * - `docs/design/branding/form-participation.md`
547
755
  * - `docs/design/flowengine/template-security.md`
548
756
  */
549
- declare class ZitadelLogin extends LitElement {
757
+ declare class ZitadelLogin extends ZitadelSurface {
550
758
  static shadowRootOptions: ShadowRootInit;
551
759
  static styles: _$lit.CSSResult;
552
760
  accessor purpose: CreateFlowBodyPurpose;
@@ -602,24 +810,24 @@ declare class ZitadelLogin extends LitElement {
602
810
  */
603
811
  accessor lang: string;
604
812
  /**
605
- * Custom locale dictionaries keyed by language code. When set, these take
606
- * precedence over the built-in dictionaries for matching language codes.
813
+ * Custom locale dictionaries keyed by language code. Entries may be
814
+ * partial — each is merged over the built-in dictionary for its language,
815
+ * so a preset like {@link businessLocales} (or a hand-written subset) is
816
+ * directly assignable:
607
817
  *
608
818
  * ```ts
609
- * import { en } from "@zitadel/components";
610
- * const locales = {
611
- * en: { ...en, "identifier.title": "Welcome" },
612
- * de: myGermanDict,
613
- * };
819
+ * import { businessLocales } from "@zitadel/components";
820
+ * loginElement.locales = businessLocales;
821
+ * // or override individual keys:
822
+ * loginElement.locales = { en: { "identifier.title": "Welcome" } };
614
823
  * ```
615
824
  */
616
- accessor locales: Record<string, Locale> | undefined;
825
+ accessor locales: Readonly<Record<string, Partial<Locale>>> | undefined;
617
826
  private accessor response;
618
827
  private accessor branding;
619
828
  private accessor loading;
620
829
  private accessor startupError;
621
830
  private accessor formValues;
622
- private readonly themeController;
623
831
  private engine;
624
832
  private readonly sanitise;
625
833
  /**
@@ -627,7 +835,28 @@ declare class ZitadelLogin extends LitElement {
627
835
  * every `formValues` change otherwise re-parses the same template.
628
836
  */
629
837
  private tenantTemplateCache;
838
+ /**
839
+ * Whether the widget currently owns a same-document history entry (the
840
+ * "sentinel"). The sentinel exists so the browser's back gesture fires
841
+ * `popstate` instead of leaving the page. Exactly one sentinel is on
842
+ * the stack at a time: it is pushed when a step with a `kind: "back"`
843
+ * action renders, re-armed by `onPopState` after the browser consumes
844
+ * it, and retired by `applyResponse` when a step without a back action
845
+ * renders. The entry reuses the current URL, so the host page's
846
+ * location (including any hash-router fragment) is never modified.
847
+ */
848
+ private armed;
849
+ /**
850
+ * Set immediately before a self-initiated `history.back()` so the
851
+ * resulting `popstate` is ignored instead of being interpreted as a
852
+ * user back gesture.
853
+ */
854
+ private ignoreNextPop;
855
+ /** Bound `popstate` handler stored for cleanup in `disconnectedCallback`. */
856
+ private readonly handlePopState;
630
857
  createRenderRoot(): HTMLElement | DocumentFragment;
858
+ connectedCallback(): void;
859
+ disconnectedCallback(): void;
631
860
  /**
632
861
  * Start the flow after the first render rather than in `connectedCallback`.
633
862
  * Frameworks that wrap web components (e.g. `@lit/react` in the console)
@@ -657,6 +886,11 @@ declare class ZitadelLogin extends LitElement {
657
886
  * but those render their own shadow DOM on a later microtask — so await
658
887
  * this element's update *and* the child atoms' first render before touching
659
888
  * them, rather than guessing a frame with `requestAnimationFrame`.
889
+ *
890
+ * Focus on the *initial* response is page-mode-only: a dedicated login
891
+ * route should focus its first field, but a widget embedded further down
892
+ * an arbitrary page must not steal focus and scroll-jump on load. Step
893
+ * swaps are user-initiated, so focus moves in both modes.
660
894
  */
661
895
  private hydrateStepAfterRender;
662
896
  render(): _$lit.TemplateResult<1>;
@@ -714,9 +948,34 @@ declare class ZitadelLogin extends LitElement {
714
948
  * `family_name` when the register step ran.
715
949
  */
716
950
  private deriveIdentity;
951
+ /** All rendered input atoms exposing the `formValue` contract. */
952
+ private fieldAtoms;
717
953
  private applyValuesToFields;
718
- private captureValuesFromFields;
719
- private currentFieldValue;
954
+ /**
955
+ * Names of the current step's `required` fields whose captured value is
956
+ * empty. Reads each atom's live `formValue` (the getter reflects the native
957
+ * control, so autofill that skipped `input` events is still seen), so this
958
+ * is browser-independent and does not rely on native constraint validation.
959
+ */
960
+ private missingRequiredFields;
961
+ /**
962
+ * Surface a client-side required-field error using the server's own
963
+ * validation dialect (`error.<field>_required`, "; "-joined), so it flows
964
+ * through the same localisation and inline/banner routing as a real
965
+ * backend rejection — no native browser bubble. Idempotent: re-running with
966
+ * the same keys (both submit entry points fire on one click) is a no-op.
967
+ */
968
+ private reportRequiredErrors;
969
+ /**
970
+ * Snapshot the current step's field values straight from the rendered input
971
+ * atoms through their uniform `formValue` contract. Tag-agnostic: every
972
+ * form-participating atom is read the same way, so a new field type needs no
973
+ * change here. Declared fields default to "" so the backend still runs its
974
+ * required-checks and challenge dispatch instead of silently advancing on a
975
+ * field-less payload. Captured values are folded into `formValues` for
976
+ * cross-step identity (the signed-in greeting) and post-error restoration.
977
+ */
978
+ private collectSubmitFields;
720
979
  /**
721
980
  * True once the user retired the current step error by editing a field or
722
981
  * dismissing the alert. Deliberately NON-reactive: consulting reactive
@@ -729,7 +988,16 @@ declare class ZitadelLogin extends LitElement {
729
988
  */
730
989
  private stepErrorDismissed;
731
990
  private handleAtomInput;
732
- /** `zl-change` from <zl-checkbox>/<zl-select>: only error clearing. */
991
+ /**
992
+ * `zl-change` from <zl-checkbox>/<zl-select>. Persist the atom's value into
993
+ * `formValues` — mirroring `handleAtomInput` for text fields — so a later
994
+ * step re-render (a validation error re-parses the template via `unsafeHTML`
995
+ * and rebuilds the atoms) restores the selection/checked state through
996
+ * `applyValuesToFields` instead of dropping back to the template default.
997
+ * Reads the live `formValue` off the atom rather than the event's `value`
998
+ * token, because an unchecked checkbox reports "" there but keeps its token
999
+ * in the detail. Also clears stale errors on the edited field.
1000
+ */
733
1001
  private handleAtomEdited;
734
1002
  /** Explicit dismiss of the step-error alert (it removes itself). */
735
1003
  private handleAlertDismiss;
@@ -740,6 +1008,7 @@ declare class ZitadelLogin extends LitElement {
740
1008
  * Imperative on purpose; see {@link stepErrorDismissed}.
741
1009
  */
742
1010
  private clearStaleErrors;
1011
+ /** Mirror a value onto the matching rendered atom (used after atom events). */
743
1012
  private syncFieldElementValue;
744
1013
  private handleAtomSubmit;
745
1014
  /** Secondary navigation rows (`data-action` on `.zl-card-nav__link`). */
@@ -768,6 +1037,27 @@ declare class ZitadelLogin extends LitElement {
768
1037
  private findPrimaryAction;
769
1038
  private moveFocusToFirstField;
770
1039
  private submit;
1040
+ /**
1041
+ * Handle the browser's back/forward gesture (ADR 022). When `popstate`
1042
+ * fires:
1043
+ *
1044
+ * - **Self-initiated** (`ignoreNextPop`) → `applyResponse` is retiring
1045
+ * the sentinel; ignore.
1046
+ * - **Back press while armed** → the browser consumed the sentinel.
1047
+ * Re-arm it immediately — so the stack shape is identical on every
1048
+ * step and repeated presses behave the same at any flow depth — then
1049
+ * submit the step's `kind: "back"` action.
1050
+ * - **Landing on the sentinel while armed** → the host page pushed an
1051
+ * entry above the sentinel (e.g. an in-page `#anchor` click) and the
1052
+ * user backed out of it. They are back where the widget expects them
1053
+ * — not asking the flow to go back; do nothing.
1054
+ * - **Forward press onto a retired sentinel** (it survives as a forward
1055
+ * entry after `history.back()`) → bounce back: flow state is
1056
+ * server-authoritative, the browser cannot skip ahead
1057
+ * (ADR 022 §Edge cases).
1058
+ * - Anything else is host-page traversal — leave the browser alone.
1059
+ */
1060
+ private onPopState;
771
1061
  private handleTransportError;
772
1062
  }
773
1063
  declare global {
@@ -793,9 +1083,7 @@ declare global {
793
1083
  * action, and calls the typed `revokeMySession` operation in `@zitadel/api`
794
1084
  * (`DELETE /sessions/me`). The server clears the session cookie via
795
1085
  * `Set-Cookie: Max-Age=0`; on success the element fires `zitadel-signout`
796
- * and optionally navigates to `post-sign-out-url`. (`getEndSessionUrl()`
797
- * additionally exposes the OIDC end-session URL for consumers that prefer a
798
- * user-agent-driven redirect.)
1086
+ * and optionally navigates to `post-sign-out-url`.
799
1087
  *
800
1088
  * ## Template-slot mode
801
1089
  *
@@ -837,12 +1125,13 @@ declare class ZitadelLogout extends LitElement {
837
1125
  /** URL to navigate to after a successful sign-out. */
838
1126
  accessor postSignOutUrl: string;
839
1127
  /**
840
- * OIDC `client_id` to forward as a query parameter on the end-session
841
- * request, mirroring the standard end-session contract. Optional
842
- * leaving this empty is fine when the backend can resolve the client
843
- * from the session cookie alone.
1128
+ * Colour mode: `light`, `dark`, or `auto` (follow `prefers-color-scheme`).
1129
+ * Empty means "not stated" and defaults to `auto` the control lives
1130
+ * inside the app's own chrome, so it follows the visitor's preference
1131
+ * rather than forcing the dark login surface. Set it explicitly when the
1132
+ * surrounding app surface is fixed: `<zitadel-logout theme="dark">`.
844
1133
  */
845
- accessor clientId: string;
1134
+ accessor theme: "" | ThemeMode;
846
1135
  private accessor displayName;
847
1136
  private accessor displayEmail;
848
1137
  private accessor displayUserId;
@@ -853,8 +1142,10 @@ declare class ZitadelLogout extends LitElement {
853
1142
  private pendingTemplate;
854
1143
  private projectedContainer;
855
1144
  private identityRequested;
1145
+ private readonly themeController;
856
1146
  connectedCallback(): void;
857
1147
  disconnectedCallback(): void;
1148
+ willUpdate(): void;
858
1149
  updated(): void;
859
1150
  /** Declarative config read from this element's attributes. */
860
1151
  private get projectAttrs();
@@ -890,15 +1181,8 @@ declare class ZitadelLogout extends LitElement {
890
1181
  * `zitadel-signout` and optionally navigates to `postSignOutUrl`.
891
1182
  */
892
1183
  private doLogout;
893
- /**
894
- * Returns the absolute URL the end-session request will hit. Useful for
895
- * test assertions and for consumers that prefer to navigate the browser
896
- * directly (instead of fetching) so the OIDC session-end redirect is
897
- * driven by the user agent.
898
- */
899
- getEndSessionUrl(): string;
900
1184
  private handleSignOutClick;
901
- render(): typeof nothing | _$lit.TemplateResult<1>;
1185
+ render(): _$lit.TemplateResult<1> | typeof nothing;
902
1186
  }
903
1187
  declare global {
904
1188
  interface HTMLElementTagNameMap {
@@ -908,7 +1192,7 @@ declare global {
908
1192
  //#endregion
909
1193
  //#region src/orchestrator/zitadel-session.d.ts
910
1194
  /**
911
- * `<zitadel-session>` — the full-screen "signed in" card.
1195
+ * `<zitadel-session>` — the "signed in" card.
912
1196
  *
913
1197
  * Renders the post-sign-in confirmation surface (Figma `7355:8959`): a
914
1198
  * centred auth card reading "Signed in as {identity}" with a **Sign out**
@@ -916,6 +1200,14 @@ declare global {
916
1200
  * `<zl-button>` atoms as the `<zitadel-login>` orchestrator, so it inherits
917
1201
  * tenant branding tokens with no hardcoded colour, radius, or shadow.
918
1202
  *
1203
+ * Like `<zitadel-login>` it is widget-first: the default `variant="widget"`
1204
+ * is content-sized and transparent so the card drops into an app's own
1205
+ * page; dedicated signed-in routes opt into `variant="page"`, which claims
1206
+ * the viewport and paints the surface background (the page paint lives on
1207
+ * the internal `<zl-page-shell>`). `theme` resolves through the shared
1208
+ * surface base — explicit value, else `dark` for `page` / `auto` for
1209
+ * `widget`.
1210
+ *
919
1211
  * This is the companion surface to `<zitadel-login>` for the "go straight to
920
1212
  * /login" flow: the orchestrator signs the user in and redirects here (or to
921
1213
  * the consumer's own page); this element proves the session and offers a way
@@ -938,7 +1230,7 @@ declare global {
938
1230
  * destination contract is still being decided. Consumers redirect after
939
1231
  * sign-in via the `<zitadel-login>` `post-sign-in-url`.
940
1232
  */
941
- declare class ZitadelSession extends LitElement {
1233
+ declare class ZitadelSession extends ZitadelSurface {
942
1234
  static styles: _$lit.CSSResult[];
943
1235
  /**
944
1236
  * SDK project handle returned by `configureZitadel()`. Set from JS (or a
@@ -967,6 +1259,7 @@ declare class ZitadelSession extends LitElement {
967
1259
  connectedCallback(): void;
968
1260
  /** Single identity line: human-readable name, then email, then user_id. */
969
1261
  private get identityLabel();
1262
+ willUpdate(): void;
970
1263
  updated(): void;
971
1264
  /** Declarative config read from this element's attributes. */
972
1265
  private get projectAttrs();
@@ -992,88 +1285,6 @@ declare global {
992
1285
  }
993
1286
  } //# sourceMappingURL=zitadel-session.d.ts.map
994
1287
  //#endregion
995
- //#region src/orchestrator/branding.d.ts
996
- type FlowLayout = CreateFlow201BrandingLayout;
997
- type BrandingPalette = {
998
- primary?: string;
999
- on_primary?: string;
1000
- background?: string;
1001
- surface?: string;
1002
- muted?: string;
1003
- border?: string;
1004
- text?: string;
1005
- text_muted?: string;
1006
- link?: string;
1007
- success?: string;
1008
- warning?: string;
1009
- error?: string;
1010
- };
1011
- type BrandingTypography = {
1012
- font_family?: string;
1013
- font_family_mono?: string;
1014
- scale?: number;
1015
- };
1016
- type BrandingShape = {
1017
- radius?: "none" | "sm" | "md" | "lg" | "full";
1018
- density?: "compact" | "regular" | "comfortable";
1019
- };
1020
- type BrandingTheme = {
1021
- mode?: "light" | "dark" | "auto";
1022
- dark?: {
1023
- palette?: BrandingPalette;
1024
- };
1025
- };
1026
- type BrandingAssets = {
1027
- logo_dark?: string;
1028
- favicon?: string;
1029
- background_image?: string;
1030
- };
1031
- /**
1032
- * Wire shape (`CreateFlow201Branding`) plus the v2 client-only extension.
1033
- * Structurally a superset, so any `CreateFlow201Branding` payload from the
1034
- * wire is assignable to `Branding` without a cast.
1035
- *
1036
- * `attribution.show_zitadel` controls the "Secured with Zitadel" pill in
1037
- * the orchestrator footer. Tenants set it to `false` only when they have a
1038
- * licence that permits removing attribution (community / OSS deployments
1039
- * always show it). The flag intentionally lives on `Branding` so it can
1040
- * be overridden per-flow alongside the rest of the visual surface.
1041
- */
1042
- type Branding = CreateFlow201Branding & {
1043
- palette?: BrandingPalette;
1044
- typography?: BrandingTypography;
1045
- shape?: BrandingShape;
1046
- assets?: BrandingAssets;
1047
- theme?: BrandingTheme;
1048
- attribution?: BrandingAttribution;
1049
- };
1050
- type BrandingAttribution = {
1051
- show_zitadel?: boolean;
1052
- custom_link?: {
1053
- label: string;
1054
- href: string;
1055
- };
1056
- };
1057
- //#endregion
1058
- //#region src/orchestrator/theme-controller.d.ts
1059
- type ResolvedTheme = "light" | "dark";
1060
- declare class ThemeController implements ReactiveController {
1061
- private readonly host;
1062
- private branding;
1063
- private mediaQuery;
1064
- private _theme;
1065
- constructor(host: ReactiveControllerHost);
1066
- get theme(): ResolvedTheme;
1067
- setBranding(branding: Branding | undefined): void;
1068
- hostConnected(): void;
1069
- hostDisconnected(): void;
1070
- private refresh;
1071
- private attach;
1072
- private detach;
1073
- private onMediaChange;
1074
- private update;
1075
- }
1076
- //#endregion
1077
1288
  //#region src/orchestrator/branding-to-tokens.d.ts
1078
1289
  type BrandingToTokensOptions = {
1079
1290
  resolvedTheme?: ResolvedTheme;
@@ -1093,12 +1304,22 @@ declare function buildBrandingStylesheet(branding: Branding | undefined, options
1093
1304
  * root) so the base values exist before branding patches them.
1094
1305
  */
1095
1306
  declare function applyBrandingTokens(shadowRoot: ShadowRoot, branding: Branding | undefined, resolvedTheme: ResolvedTheme): void;
1307
+ /**
1308
+ * Standalone branding→theme resolution for callers outside the orchestrator
1309
+ * (SSR, tests, embedders composing atoms by hand). `<zitadel-login>` itself
1310
+ * uses {@link ThemeController}, which layers the element's `theme` property
1311
+ * and a variant-derived fallback on top of the same branding input.
1312
+ *
1313
+ * Defaults to dark: the design system's primary surface, and the mode a
1314
+ * hosted login page renders when a tenant states no preference.
1315
+ */
1096
1316
  declare function resolveTheme(branding: Branding | undefined): ResolvedTheme;
1097
1317
  //#endregion
1098
1318
  //#region src/orchestrator/font-loader.d.ts
1099
1319
  /**
1100
1320
  * Inject the tenant's `branding.font_url` stylesheet. Pass `null`/`undefined`
1101
- * to remove it (e.g. when a flow resolves with no tenant font).
1321
+ * to withdraw this surface's registration (e.g. when a flow resolves with no
1322
+ * tenant font); the link disappears once no surface registers a URL.
1102
1323
  */
1103
1324
  declare function applyFontUrl(shadowRoot: ShadowRoot, fontUrl: string | null | undefined): void;
1104
1325
  //#endregion
@@ -1152,6 +1373,13 @@ type FlowError = {
1152
1373
  code?: string;
1153
1374
  text_key?: string;
1154
1375
  message?: string;
1376
+ /**
1377
+ * Name of the step field this error targets. When set (and the step renders
1378
+ * that field), the template routes the error inline under the control via
1379
+ * the `fieldError` filter; when absent it renders in the form-level banner
1380
+ * (`formLevelError`). See `localiseFlowErrorKeys` in `liquid.ts`.
1381
+ */
1382
+ field?: string;
1155
1383
  };
1156
1384
  type FlowIdentity = {
1157
1385
  display_name?: string;
@@ -1180,5 +1408,5 @@ type LiquidContext = {
1180
1408
  loading: boolean;
1181
1409
  };
1182
1410
  //#endregion
1183
- export { ZitadelSession as A, BrandingAssets as C, BrandingTheme as D, BrandingShape as E, de as F, Locale as I, en as L, ZitadelLogin as M, builtinLocales as N, BrandingTypography as O, it as P, Branding as S, BrandingPalette as T, applyBrandingTokens as _, LiquidContext as a, ResolvedTheme as b, getCurrentStep as c, createSanitiser as d, MANDATORY_GATES_MARKER as f, applyFontUrl as g, TEMPLATE_NAMES as h, FlowMessage as i, ZitadelLogout as j, FlowLayout as k, startFlow as l, patchMandatoryGates as m, FlowError as n, BrandingValidationResult as o, mandatoryGatesMarkerComment as p, FlowIdentity as r, validateBranding as s, layoutChromeCss as t, submitStep as u, buildBrandingStylesheet as v, BrandingAttribution as w, ThemeController as x, resolveTheme as y };
1184
- //# sourceMappingURL=index-D1eMaWbY.d.mts.map
1411
+ export { BrandingShape as A, ResolvedTheme as C, BrandingAssets as D, Branding as E, businessLocales as F, it as I, de as L, BrandingTypography as M, FlowLayout as N, BrandingAttribution as O, builtinLocales as P, Locale as R, ZitadelLogin as S, ThemeMode as T, applyBrandingTokens as _, LiquidContext as a, ZitadelSession as b, getCurrentStep as c, createSanitiser as d, MANDATORY_GATES_MARKER as f, applyFontUrl as g, TEMPLATE_NAMES as h, FlowMessage as i, BrandingTheme as j, BrandingPalette as k, startFlow as l, patchMandatoryGates as m, FlowError as n, BrandingValidationResult as o, mandatoryGatesMarkerComment as p, FlowIdentity as r, validateBranding as s, layoutChromeCss as t, submitStep as u, buildBrandingStylesheet as v, ThemeController as w, ZitadelLogout as x, resolveTheme as y, en as z };
1412
+ //# sourceMappingURL=index-CsJiPZtJ.d.mts.map