@zitadel/components 0.1.0-alpha.17 → 0.1.0-alpha.19

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 +99 -26
  2. package/dist/atoms/index.d.mts +1 -1
  3. package/dist/atoms/index.mjs +1 -1
  4. package/dist/{atoms-KC7OJWXZ.mjs → atoms-B6QmUAzo.mjs} +264 -189
  5. package/dist/atoms-B6QmUAzo.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-DSZnfOJH.d.mts → index-CAi5gsHK.d.mts} +4789 -2181
  9. package/dist/index-CAi5gsHK.d.mts.map +1 -0
  10. package/dist/{index-DjYJwejg.d.mts → index-Ce_81oFH.d.mts} +505 -230
  11. package/dist/index-Ce_81oFH.d.mts.map +1 -0
  12. package/dist/{index-BniwXaIC.d.mts → index-Dgc94IMN.d.mts} +113 -1
  13. package/dist/index-Dgc94IMN.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 +67 -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-BWqJw4Yl.mjs → orchestrator-CsHP57zo.mjs} +2847 -2272
  21. package/dist/orchestrator-CsHP57zo.mjs.map +1 -0
  22. package/dist/standalone.mjs +8340 -6946
  23. package/dist/tokens/index.d.mts +1 -1
  24. package/dist/tokens/index.mjs +1 -1
  25. package/dist/tokens-DSnSf1mf.mjs +358 -0
  26. package/dist/tokens-DSnSf1mf.mjs.map +1 -0
  27. package/package.json +14 -10
  28. package/dist/atoms-KC7OJWXZ.mjs.map +0 -1
  29. package/dist/default-CfF7GoLv.mjs +0 -6
  30. package/dist/default-CfF7GoLv.mjs.map +0 -1
  31. package/dist/index-BniwXaIC.d.mts.map +0 -1
  32. package/dist/index-DSZnfOJH.d.mts.map +0 -1
  33. package/dist/index-DjYJwejg.d.mts.map +0 -1
  34. package/dist/orchestrator-BWqJw4Yl.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-DSZnfOJH.mjs";
1
+ import { $ as GetAuthAttempt200, $t as VerifyChallengeProof200, A as CreateFlow201StepGates, At as ListUserPasskeys200, B as CreateSchemaBody, Bt as QuerySessions200, C as CreateFlow201, Ct as ListBrandingParams, D as CreateFlow201StepActionsItem, Dt as ListFlowDefinitionsParams, E as CreateFlow201Step, Et as ListFlowDefinitions200, F as CreateFlowDefinitionBody, Ft as ListUsersParams, G as CreateTeamBody, Gt as QueryTeamsParams, H as CreateSession201, Ht as QuerySessionsParams, I as CreateHandoff200, It as PatchProject200, J as CreateUserBody, Jt as SubmitFlowStepBody, K as CreateTeamParams, Kt as SetUserPasswordBody, L as CreateProject201, Lt as PatchProjectBody, M as CreateFlowBody, Mt as ListUserTeams200, N as CreateFlowBodyPurpose, Nt as ListUserTeamsParams, O as CreateFlow201StepChallenge, Ot as ListSchemas200Item, P as CreateFlowDefinition201, Pt as ListUsers200, Q as ExchangeHandoffParams, Qt as UpdateTeamBody, R as CreateProjectBody, Rt as QueryProjects200, S as CreateBrandingParams, St as ListBranding200Item, T as CreateFlow201BrandingLayout, Tt as ListEventsParams, U as CreateSessionBody, Ut as QueryTeams200, V as CreateSchemaParams, Vt as QuerySessionsBody, W as CreateTeam201, Wt as QueryTeamsBody, X as ExchangeHandoff200, Xt as UpdateFlowDefinitionBody, Y as CreateUserParams, Yt as UpdateFlowDefinition200, Z as ExchangeHandoffBody, Zt as UpdateTeam200, _ as CompleteClaimBody, _t as GetUserByID200, at as GetFlowDefinition200, b as CreateBranding201, bt as IssueChallenge201, ct as GetLiveDefault, dt as GetProject200, en as VerifyChallengeProofBody, et as GetBrandingById200, ft as GetReadyDefault, g as CompleteClaim200, gt as GetTeam200, ht as GetSession200, it as GetEventParams, j as CreateFlow201StepSsoProvidersItem, jt as ListUserPasskeysParams, k as CreateFlow201StepFieldsItem, kt as ListSchemasParams, lt as GetMySession200, mt as GetSchemaByIdParams, nt as GetClaimStatusParams, ot as GetFlowStep200, pt as GetSchemaById200, q as CreateUser201, qt as SubmitFlowStep200, rt as GetEvent200, st as GetHealthDefault, tt as GetClaimStatus200, ut as GetMyUser200, v as CreateAuthAttempt201, vt as GetUserByIDParams, w as CreateFlow201Branding, wt as ListEvents200, x as CreateBrandingBody, xt as IssueChallengeBody, y as CreateAuthAttemptBody, yt as InitClaim201, z as CreateSchema201, zt as QueryProjectsBody } from "./index-CAi5gsHK.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-fcgWBw_N.d.mts
6
+ //#region ../api/dist/zitadelNextGen-BkDpEAS9.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, getEvent, getExchangeHandoffUrl, getFlowDefinition, getFlowStep, getGetAuthAttemptUrl, getGetBrandingByIdUrl, getGetClaimStatusUrl, getGetEventUrl, getGetFlowDefinitionUrl, getGetFlowStepUrl, getGetHealthUrl, getGetLiveUrl, getGetMySessionUrl, getGetMyUserUrl, getGetProjectUrl, getGetReadyUrl, getGetSchemaByIdUrl, getGetSessionUrl, getGetTeamUrl, getGetUserByIDUrl, getHealth, getInitClaimUrl, getIssueChallengeUrl, getListBrandingUrl, getListEventsUrl, 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, listEvents, 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[]>;
85
- declare const getGetUserByIDUrl: (userId: string, params: GetUserByIDParams) => string;
38
+ declare const listUsers: (params?: ListUsersParams, options?: RequestInit) => Promise<ListUsers200>;
39
+ declare const getGetUserByIDUrl: (userId: string, params?: GetUserByIDParams) => string;
86
40
  /**
87
41
  * @summary Get user by ID
88
42
  */
89
- declare const getUserByID: (userId: string, params: GetUserByIDParams, options?: RequestInit) => Promise<GetUserByID200>;
90
- declare const getSetUserPasswordUrl: (userId: string, params: SetUserPasswordParams) => string;
43
+ declare const getUserByID: (userId: string, params?: GetUserByIDParams, options?: RequestInit) => Promise<GetUserByID200>;
44
+ declare const getDeleteUserByIDUrl: (userId: string) => string;
45
+ /**
46
+ * @summary Delete user by ID
47
+ */
48
+ declare const deleteUserByID: (userId: string, 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>;
54
+ declare const getSetUserPasswordUrl: (userId: string) => string;
91
55
  /**
92
56
  * @summary Set user password
93
57
  */
94
- declare const setUserPassword: (userId: string, setUserPasswordBody: SetUserPasswordBody, params: SetUserPasswordParams, options?: RequestInit) => Promise<void>;
58
+ declare const setUserPassword: (userId: string, setUserPasswordBody: SetUserPasswordBody, 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`
@@ -307,7 +316,7 @@ Requires a project service key (OAuth2 client credentials).
307
316
  * @summary Exchange handoff token for a session
308
317
  */
309
318
  declare const exchangeHandoff: (exchangeHandoffBody: ExchangeHandoffBody, params: ExchangeHandoffParams, options?: RequestInit) => Promise<ExchangeHandoff200>;
310
- declare const getGetSessionUrl: (sessionId: string, params: GetSessionParams) => string;
319
+ declare const getGetSessionUrl: (sessionId: string) => string;
311
320
  /**
312
321
  * Returns the current state of a session including its factors and all currently
313
322
  satisfied assurance levels.
@@ -318,17 +327,22 @@ against the same `session_id`) to restore a dropped assurance level.
318
327
 
319
328
  * @summary Get session state
320
329
  */
321
- declare const getSession: (sessionId: string, params: GetSessionParams, options?: RequestInit) => Promise<GetSession200>;
322
- declare const getRevokeSessionUrl: (sessionId: string, params: RevokeSessionParams) => string;
330
+ declare const getSession: (sessionId: string, options?: RequestInit) => Promise<GetSession200>;
331
+ declare const getRevokeSessionUrl: (sessionId: string) => 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
  */
331
- declare const revokeSession: (sessionId: string, params: RevokeSessionParams, options?: RequestInit) => Promise<void>;
345
+ declare const revokeSession: (sessionId: string, options?: RequestInit) => Promise<void>;
332
346
  declare const getGetMySessionUrl: () => string;
333
347
  /**
334
348
  * Returns the current state of the current session including its factors and all currently
@@ -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.
@@ -372,12 +390,12 @@ supports pagination and filtering based on schema attributes.
372
390
  * @summary List all schemas
373
391
  */
374
392
  declare const listSchemas: (params: ListSchemasParams, options?: RequestInit) => Promise<ListSchemas200Item[]>;
375
- declare const getGetSchemaByIdUrl: (id: string, params: GetSchemaByIdParams) => string;
393
+ declare const getGetSchemaByIdUrl: (id: string, params?: GetSchemaByIdParams) => string;
376
394
  /**
377
395
  * Get a schema by its ID. This will return the default revision of the schema.
378
396
  * @summary Get schema by ID
379
397
  */
380
- declare const getSchemaById: (id: string, params: GetSchemaByIdParams, options?: RequestInit) => Promise<GetSchemaById200>;
398
+ declare const getSchemaById: (id: string, params?: GetSchemaByIdParams, options?: RequestInit) => Promise<GetSchemaById200>;
381
399
  declare const getCreateFlowDefinitionUrl: () => string;
382
400
  /**
383
401
  * Creates a new flow definition.
@@ -397,21 +415,21 @@ This endpoint can be used to view existing flow definitions and their configurat
397
415
  * @summary List flow definitions
398
416
  */
399
417
  declare const listFlowDefinitions: (params: ListFlowDefinitionsParams, options?: RequestInit) => Promise<ListFlowDefinitions200>;
400
- declare const getGetFlowDefinitionUrl: (id: string, params: GetFlowDefinitionParams) => string;
418
+ declare const getGetFlowDefinitionUrl: (id: string) => string;
401
419
  /**
402
420
  * Get a flow definition by id
403
421
  * @summary Get a flow definition by id
404
422
  */
405
- declare const getFlowDefinition: (id: string, params: GetFlowDefinitionParams, options?: RequestInit) => Promise<GetFlowDefinition200>;
406
- declare const getUpdateFlowDefinitionUrl: (id: string, params: UpdateFlowDefinitionParams) => string;
423
+ declare const getFlowDefinition: (id: string, options?: RequestInit) => Promise<GetFlowDefinition200>;
424
+ declare const getUpdateFlowDefinitionUrl: (id: string) => string;
407
425
  /**
408
426
  * Update a flow definition by id. This endpoint replaces the existing flow definition.
409
427
  If `flow_definition.status` is omitted, the current status is preserved
410
428
 
411
429
  * @summary Update a flow definition by id
412
430
  */
413
- declare const updateFlowDefinition: (id: string, updateFlowDefinitionBody: UpdateFlowDefinitionBody, params: UpdateFlowDefinitionParams, options?: RequestInit) => Promise<UpdateFlowDefinition200>;
414
- declare const getDeleteFlowDefinitionUrl: (id: string, params: DeleteFlowDefinitionParams) => string;
431
+ declare const updateFlowDefinition: (id: string, updateFlowDefinitionBody: UpdateFlowDefinitionBody, options?: RequestInit) => Promise<UpdateFlowDefinition200>;
432
+ declare const getDeleteFlowDefinitionUrl: (id: string) => string;
415
433
  /**
416
434
  * Delete a flow definition by id.
417
435
  If the flow definition is currently being used by a flow, the deletion will fail.
@@ -419,36 +437,107 @@ If the flow definition is the last active flow definition for a given purpose, t
419
437
 
420
438
  * @summary Delete a flow definition by id
421
439
  */
422
- declare const deleteFlowDefinition: (id: string, params: DeleteFlowDefinitionParams, options?: RequestInit) => Promise<void>;
423
- declare const getActivateFlowDefinitionUrl: (id: string, params: ActivateFlowDefinitionParams) => string;
440
+ declare const deleteFlowDefinition: (id: string, options?: RequestInit) => Promise<void>;
441
+ declare const getCreateTeamUrl: (params: CreateTeamParams) => string;
442
+ /**
443
+ * @summary Create team
444
+ */
445
+ declare const createTeam: (createTeamBody: CreateTeamBody, params: CreateTeamParams, options?: RequestInit) => Promise<CreateTeam201>;
446
+ declare const getQueryTeamsUrl: (params: QueryTeamsParams) => string;
424
447
  /**
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.
448
+ * Returns the teams of a project, paginated with a cursor.
427
449
 
428
- * @summary Activate a flow definition by ID.
450
+ * @summary Query teams
429
451
  */
430
- declare const activateFlowDefinition: (id: string, params: ActivateFlowDefinitionParams, options?: RequestInit) => Promise<void>;
431
- declare const getDeactivateFlowDefinitionUrl: (id: string, params: DeactivateFlowDefinitionParams) => string;
452
+ declare const queryTeams: (queryTeamsBody: QueryTeamsBody, params: QueryTeamsParams, options?: RequestInit) => Promise<QueryTeams200>;
453
+ declare const getGetTeamUrl: (teamId: string) => string;
432
454
  /**
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.
455
+ * Returns a Team by its id.
436
456
 
437
- * @summary Deactivate a flow definition by ID.
457
+ * @summary Get team
438
458
  */
439
- declare const deactivateFlowDefinition: (id: string, params: DeactivateFlowDefinitionParams, options?: RequestInit) => Promise<void>;
440
- declare const getCreateTeamUrl: (params: CreateTeamParams) => string;
459
+ declare const getTeam: (teamId: string, options?: RequestInit) => Promise<GetTeam200>;
460
+ declare const getDeleteTeamUrl: (teamId: string) => string;
441
461
  /**
442
- * @summary Create team
462
+ * Deactivates the team.
463
+
464
+ The team is tombstoned rather than erased: it stays readable through
465
+ getTeam with status `deactivated`. Its memberships are removed and the
466
+ users whose lifecycle it owns are deactivated with it.
467
+
468
+ The request is idempotent. Deleting a team that is already deactivated
469
+ or doesn't exist succeeds without changing anything.
470
+
471
+ * @summary Delete team
443
472
  */
444
- declare const createTeam: (params: CreateTeamParams, createTeamBody?: CreateTeamBody, options?: RequestInit) => Promise<CreateTeam201>;
445
- declare const getGetTeamUrl: (teamId: string, params: GetTeamParams) => string;
473
+ declare const deleteTeam: (teamId: string, options?: RequestInit) => Promise<void>;
474
+ declare const getUpdateTeamUrl: (teamId: string) => string;
446
475
  /**
447
- * Returns the current state of a team.
476
+ * Update team. Only active teams can be updated.
448
477
 
449
- * @summary Get team
478
+ * @summary Update team
450
479
  */
451
- declare const getTeam: (teamId: string, params: GetTeamParams, options?: RequestInit) => Promise<GetTeam200>; //#endregion
480
+ declare const updateTeam: (teamId: string, updateTeamBody: UpdateTeamBody, options?: RequestInit) => Promise<UpdateTeam200>;
481
+ declare const getCreateBrandingUrl: (params: CreateBrandingParams) => string;
482
+ /**
483
+ * Publishes a new immutable branding revision for the project. Branding
484
+ revisions cannot be updated or deleted; every edit publishes a new
485
+ revision, and flow responses resolve the latest revision per project
486
+ (see ADR 040).
487
+
488
+ The `liquid_template` is validated lexically on save (size, encoding,
489
+ banned patterns such as `<script>` tags, inline event handlers, and the
490
+ `| raw` filter). Authoritative LiquidJS validation runs at authoring
491
+ time via `zitadel plan` / `zitadel apply`.
492
+
493
+ * @summary Publish a new branding revision
494
+ */
495
+ declare const createBranding: (createBrandingBody: CreateBrandingBody, params: CreateBrandingParams, options?: RequestInit) => Promise<CreateBranding201>;
496
+ declare const getListBrandingUrl: (params: ListBrandingParams) => string;
497
+ /**
498
+ * Lists branding revisions for the project, newest first, capped at the
499
+ 100 most recent. The first entry is the revision flow responses
500
+ currently resolve. Deliberately unpaginated in v1 — list endpoints
501
+ gain a real query mechanism together (ADR 031); advertising pagination
502
+ parameters the server ignores would be worse than none.
503
+
504
+ * @summary List branding revisions
505
+ */
506
+ declare const listBranding: (params: ListBrandingParams, options?: RequestInit) => Promise<ListBranding200Item[]>;
507
+ declare const getGetBrandingByIdUrl: (id: string) => string;
508
+ /**
509
+ * Retrieves a single branding revision, including its stored configuration.
510
+ * @summary Get a branding revision by ID
511
+ */
512
+ declare const getBrandingById: (id: string, options?: RequestInit) => Promise<GetBrandingById200>;
513
+ declare const getListEventsUrl: (params: ListEventsParams) => string;
514
+ /**
515
+ * Returns project-scoped audit events, newest-first by keyset on
516
+ `(created_at, id)` (ADR 027 / ADR 049). Pass `order=asc` for oldest-first.
517
+ Requires `events.read`.
518
+
519
+ Pre-claim projects return an empty list (events are stored but not
520
+ visible until claim succeeds). Team-scoped credentials see only events
521
+ whose emit-time `team_id` matches the credential team (enforced when
522
+ team-scoped tokens exist).
523
+
524
+ Clients discriminate each item via `event_type` (OpenAPI Event oneOf) —
525
+ see docs/design/api/events-catalog.md.
526
+
527
+ * @summary List events
528
+ */
529
+ declare const listEvents: (params: ListEventsParams, options?: RequestInit) => Promise<ListEvents200>;
530
+ declare const getGetEventUrl: (id: string, params: GetEventParams) => string;
531
+ /**
532
+ * Loads a single event by `(project_id, id)`. Requires `events.read`.
533
+ Events are not registered in `resource_scope_index`; project scope is
534
+ required on the query (ADR 049). Misses and cross-project ids return 404.
535
+
536
+ Pre-claim projects return 404 (stored events stay invisible until claim).
537
+
538
+ * @summary Get event by ID
539
+ */
540
+ declare const getEvent: (id: string, params: GetEventParams, options?: RequestInit) => Promise<GetEvent200>; //#endregion
452
541
  //#endregion
453
542
  //#region ../api/dist/runtime/api-factory.d.mts
454
543
  //#region src/runtime/api-factory.d.ts
@@ -473,6 +562,8 @@ interface ZitadelProject {
473
562
  readonly projectId: string;
474
563
  /** Full URL of the Zitadel auth backend. */
475
564
  readonly url?: string;
565
+ /** The project's publishable key (ADR 036), sent as the bearer when set. */
566
+ readonly publishableKey?: string;
476
567
  }
477
568
  /**
478
569
  * Initializes app-wide SDK configuration and returns the frozen
@@ -510,9 +601,163 @@ declare const de: Locale;
510
601
  //#region src/orchestrator/locales/it.d.ts
511
602
  declare const it: Locale;
512
603
  //#endregion
604
+ //#region src/orchestrator/locales/business.d.ts
605
+ declare const businessLocales: Readonly<Record<string, Partial<Locale>>>;
606
+ //#endregion
513
607
  //#region src/orchestrator/locales/index.d.ts
514
608
  declare const builtinLocales: Readonly<Record<string, Locale>>;
515
609
  //#endregion
610
+ //#region src/orchestrator/branding.d.ts
611
+ type FlowLayout = CreateFlow201BrandingLayout;
612
+ type BrandingPalette = {
613
+ primary?: string;
614
+ on_primary?: string;
615
+ background?: string;
616
+ surface?: string;
617
+ muted?: string;
618
+ border?: string;
619
+ text?: string;
620
+ text_muted?: string;
621
+ link?: string;
622
+ success?: string;
623
+ warning?: string;
624
+ error?: string;
625
+ };
626
+ type BrandingTypography = {
627
+ font_family?: string;
628
+ font_family_mono?: string;
629
+ scale?: number;
630
+ };
631
+ type BrandingShape = {
632
+ radius?: "none" | "sm" | "md" | "lg" | "full";
633
+ density?: "compact" | "regular" | "comfortable";
634
+ };
635
+ type BrandingTheme = {
636
+ mode?: "light" | "dark" | "auto";
637
+ dark?: {
638
+ palette?: BrandingPalette;
639
+ };
640
+ };
641
+ type BrandingAssets = {
642
+ logo_dark?: string;
643
+ favicon?: string;
644
+ background_image?: string;
645
+ };
646
+ /**
647
+ * Wire shape (`CreateFlow201Branding`) plus the v2 client-only extension.
648
+ * Structurally a superset, so any `CreateFlow201Branding` payload from the
649
+ * wire is assignable to `Branding` without a cast.
650
+ *
651
+ * `attribution.show_zitadel` controls the "Secured with Zitadel" pill in
652
+ * the orchestrator footer. Tenants set it to `false` only when they have a
653
+ * licence that permits removing attribution (community / OSS deployments
654
+ * always show it). The flag intentionally lives on `Branding` so it can
655
+ * be overridden per-flow alongside the rest of the visual surface.
656
+ */
657
+ type Branding = CreateFlow201Branding & {
658
+ palette?: BrandingPalette;
659
+ typography?: BrandingTypography;
660
+ shape?: BrandingShape;
661
+ assets?: BrandingAssets;
662
+ theme?: BrandingTheme;
663
+ attribution?: BrandingAttribution;
664
+ };
665
+ type BrandingAttribution = {
666
+ show_zitadel?: boolean;
667
+ custom_link?: {
668
+ label: string;
669
+ href: string;
670
+ };
671
+ };
672
+ //#endregion
673
+ //#region src/orchestrator/theme-controller.d.ts
674
+ type ResolvedTheme = "light" | "dark";
675
+ /** Theme inputs a caller may express, before resolution. */
676
+ type ThemeMode = "light" | "dark" | "auto";
677
+ declare class ThemeController implements ReactiveController {
678
+ private readonly host;
679
+ private branding;
680
+ /** Element-level `theme` property — the embedding developer's explicit call. */
681
+ private explicitMode;
682
+ /** Used when neither the element nor the branding payload names a mode. */
683
+ private fallbackMode;
684
+ private mediaQuery;
685
+ private _theme;
686
+ constructor(host: ReactiveControllerHost);
687
+ get theme(): ResolvedTheme;
688
+ setBranding(branding: Branding | undefined): void;
689
+ /**
690
+ * Sets the element-level preference and the fallback used when neither the
691
+ * element nor the branding payload names a mode. Precedence, strongest
692
+ * first: element `theme` property → `branding.theme.mode` → fallback. The
693
+ * element wins because the page embedding the widget knows its own surface
694
+ * better than the tenant's stored branding does.
695
+ */
696
+ setModePreference(explicit: ThemeMode | undefined, fallback: ThemeMode): void;
697
+ hostConnected(): void;
698
+ hostDisconnected(): void;
699
+ private refresh;
700
+ private attach;
701
+ private detach;
702
+ private onMediaChange;
703
+ private update;
704
+ }
705
+ //#endregion
706
+ //#region src/orchestrator/surface.d.ts
707
+ /**
708
+ * Shared base for the orchestrator host elements (`<zitadel-login>`,
709
+ * `<zitadel-session>`) that render a themable page/widget surface.
710
+ *
711
+ * Owns the `variant` / `theme` public properties, the {@link ThemeController},
712
+ * and the per-update surface application (base tokens, branding overrides,
713
+ * font links, and the `data-theme` host stamp). Subclasses call
714
+ * {@link applySurfaceTheme} from their `willUpdate` so the resolved theme is
715
+ * committed in the same update cycle that reads it.
716
+ *
717
+ * Not a registered custom element — purely an implementation-sharing base.
718
+ */
719
+ declare class ZitadelSurface extends LitElement {
720
+ /**
721
+ * Sizing/chrome mode. Components size to content; pages compose them —
722
+ * so the default is `widget`: content-sized, transparent host, no
723
+ * document-level default-font injection. Dedicated routes — the hosted
724
+ * shell and the scaffolded pages — opt into `page`, which claims the
725
+ * viewport, paints the surface background, and ships the brand font.
726
+ * Fine-grained height override in both modes: `--zl-page-min-height`.
727
+ */
728
+ accessor variant: "widget" | "page";
729
+ /**
730
+ * Colour mode: `light`, `dark`, or `auto` (follow `prefers-color-scheme`).
731
+ * Empty means "not stated", and resolution falls through to the tenant's
732
+ * `branding.theme.mode`, then to a variant-derived default — `dark` for
733
+ * `page` (the hosted design system surface) and `auto` for `widget`, so an
734
+ * embedded widget matches the visitor's preference instead of forcing a
735
+ * dark card onto a light page. Set it explicitly when your app's surface
736
+ * is fixed: `<zitadel-login theme="light">`.
737
+ */
738
+ accessor theme: "" | ThemeMode;
739
+ /**
740
+ * Visually hide the surface's own heading block (the step title and
741
+ * subtitle on `<zitadel-login>`, the heading line on
742
+ * `<zitadel-session>`) while keeping it in the accessibility tree. For
743
+ * embedders whose page already carries the heading — a brand-voice
744
+ * "Welcome back" above the card — so the widget doesn't repeat it.
745
+ * Reflected so host-page CSS and DOM assertions can key off the
746
+ * attribute, like `variant`.
747
+ */
748
+ accessor suppressHeader: boolean;
749
+ protected readonly themeController: ThemeController;
750
+ /**
751
+ * Resolve the active theme and commit it to this element's surface: adopt
752
+ * the base token sheet, layer the branding overrides, manage the
753
+ * document-level font links, and stamp `data-theme` / `data-theme-dark` on
754
+ * the host so token lookups (and host-page selectors) flip with the mode.
755
+ * `branding` is `undefined` for surfaces without a tenant payload — the
756
+ * theme then resolves through the element preference and variant fallback.
757
+ */
758
+ protected applySurfaceTheme(branding: Branding | undefined): void;
759
+ }
760
+ //#endregion
516
761
  //#region src/orchestrator/zitadel-login.d.ts
517
762
  /**
518
763
  * `<zitadel-login>` — the auth-UI orchestrator.
@@ -546,7 +791,7 @@ declare const builtinLocales: Readonly<Record<string, Locale>>;
546
791
  * - `docs/design/branding/form-participation.md`
547
792
  * - `docs/design/flowengine/template-security.md`
548
793
  */
549
- declare class ZitadelLogin extends LitElement {
794
+ declare class ZitadelLogin extends ZitadelSurface {
550
795
  static shadowRootOptions: ShadowRootInit;
551
796
  static styles: _$lit.CSSResult;
552
797
  accessor purpose: CreateFlowBodyPurpose;
@@ -602,24 +847,24 @@ declare class ZitadelLogin extends LitElement {
602
847
  */
603
848
  accessor lang: string;
604
849
  /**
605
- * Custom locale dictionaries keyed by language code. When set, these take
606
- * precedence over the built-in dictionaries for matching language codes.
850
+ * Custom locale dictionaries keyed by language code. Entries may be
851
+ * partial — each is merged over the built-in dictionary for its language,
852
+ * so a preset like {@link businessLocales} (or a hand-written subset) is
853
+ * directly assignable:
607
854
  *
608
855
  * ```ts
609
- * import { en } from "@zitadel/components";
610
- * const locales = {
611
- * en: { ...en, "identifier.title": "Welcome" },
612
- * de: myGermanDict,
613
- * };
856
+ * import { businessLocales } from "@zitadel/components";
857
+ * loginElement.locales = businessLocales;
858
+ * // or override individual keys:
859
+ * loginElement.locales = { en: { "identifier.title": "Welcome" } };
614
860
  * ```
615
861
  */
616
- accessor locales: Record<string, Locale> | undefined;
862
+ accessor locales: Readonly<Record<string, Partial<Locale>>> | undefined;
617
863
  private accessor response;
618
864
  private accessor branding;
619
865
  private accessor loading;
620
866
  private accessor startupError;
621
867
  private accessor formValues;
622
- private readonly themeController;
623
868
  private engine;
624
869
  private readonly sanitise;
625
870
  /**
@@ -627,7 +872,28 @@ declare class ZitadelLogin extends LitElement {
627
872
  * every `formValues` change otherwise re-parses the same template.
628
873
  */
629
874
  private tenantTemplateCache;
875
+ /**
876
+ * Whether the widget currently owns a same-document history entry (the
877
+ * "sentinel"). The sentinel exists so the browser's back gesture fires
878
+ * `popstate` instead of leaving the page. Exactly one sentinel is on
879
+ * the stack at a time: it is pushed when a step with a `kind: "back"`
880
+ * action renders, re-armed by `onPopState` after the browser consumes
881
+ * it, and retired by `applyResponse` when a step without a back action
882
+ * renders. The entry reuses the current URL, so the host page's
883
+ * location (including any hash-router fragment) is never modified.
884
+ */
885
+ private armed;
886
+ /**
887
+ * Set immediately before a self-initiated `history.back()` so the
888
+ * resulting `popstate` is ignored instead of being interpreted as a
889
+ * user back gesture.
890
+ */
891
+ private ignoreNextPop;
892
+ /** Bound `popstate` handler stored for cleanup in `disconnectedCallback`. */
893
+ private readonly handlePopState;
630
894
  createRenderRoot(): HTMLElement | DocumentFragment;
895
+ connectedCallback(): void;
896
+ disconnectedCallback(): void;
631
897
  /**
632
898
  * Start the flow after the first render rather than in `connectedCallback`.
633
899
  * Frameworks that wrap web components (e.g. `@lit/react` in the console)
@@ -653,10 +919,15 @@ declare class ZitadelLogin extends LitElement {
653
919
  updated(changed: PropertyValues<this>): void;
654
920
  /**
655
921
  * Apply captured values and move focus once the new step has fully
656
- * rendered. This commit produces the step's `zl-field`/`zl-button` atoms,
657
- * but those render their own shadow DOM on a later microtask — so await
658
- * this element's update *and* the child atoms' first render before touching
659
- * them, rather than guessing a frame with `requestAnimationFrame`.
922
+ * rendered. This commit produces the step's field/action atoms, but those
923
+ * render their own shadow DOM on a later microtask — so await this element's
924
+ * update *and* the child atoms' first render before touching them, rather
925
+ * than guessing a frame with `requestAnimationFrame`.
926
+ *
927
+ * Focus on the *initial* response is page-mode-only: a dedicated login
928
+ * route should focus its first field, but a widget embedded further down
929
+ * an arbitrary page must not steal focus and scroll-jump on load. Step
930
+ * swaps are user-initiated, so focus moves in both modes.
660
931
  */
661
932
  private hydrateStepAfterRender;
662
933
  render(): _$lit.TemplateResult<1>;
@@ -714,9 +985,34 @@ declare class ZitadelLogin extends LitElement {
714
985
  * `family_name` when the register step ran.
715
986
  */
716
987
  private deriveIdentity;
988
+ /** All rendered input atoms exposing the `formValue` contract. */
989
+ private fieldAtoms;
717
990
  private applyValuesToFields;
718
- private captureValuesFromFields;
719
- private currentFieldValue;
991
+ /**
992
+ * Names of the current step's `required` fields whose captured value is
993
+ * empty. Reads each atom's live `formValue` (the getter reflects the native
994
+ * control, so autofill that skipped `input` events is still seen), so this
995
+ * is browser-independent and does not rely on native constraint validation.
996
+ */
997
+ private missingRequiredFields;
998
+ /**
999
+ * Surface a client-side required-field error using the server's own
1000
+ * validation dialect (`error.<field>_required`, "; "-joined), so it flows
1001
+ * through the same localisation and inline/banner routing as a real
1002
+ * backend rejection — no native browser bubble. Idempotent: re-running with
1003
+ * the same keys (both submit entry points fire on one click) is a no-op.
1004
+ */
1005
+ private reportRequiredErrors;
1006
+ /**
1007
+ * Snapshot the current step's field values straight from the rendered input
1008
+ * atoms through their uniform `formValue` contract. Tag-agnostic: every
1009
+ * form-participating atom is read the same way, so a new field type needs no
1010
+ * change here. Declared fields default to "" so the backend still runs its
1011
+ * required-checks and challenge dispatch instead of silently advancing on a
1012
+ * field-less payload. Captured values are folded into `formValues` for
1013
+ * cross-step identity (the signed-in greeting) and post-error restoration.
1014
+ */
1015
+ private collectSubmitFields;
720
1016
  /**
721
1017
  * True once the user retired the current step error by editing a field or
722
1018
  * dismissing the alert. Deliberately NON-reactive: consulting reactive
@@ -729,7 +1025,16 @@ declare class ZitadelLogin extends LitElement {
729
1025
  */
730
1026
  private stepErrorDismissed;
731
1027
  private handleAtomInput;
732
- /** `zl-change` from <zl-checkbox>/<zl-select>: only error clearing. */
1028
+ /**
1029
+ * `zl-change` from <zl-checkbox>/<zl-select>. Persist the atom's value into
1030
+ * `formValues` — mirroring `handleAtomInput` for text fields — so a later
1031
+ * step re-render (a validation error re-parses the template via `unsafeHTML`
1032
+ * and rebuilds the atoms) restores the selection/checked state through
1033
+ * `applyValuesToFields` instead of dropping back to the template default.
1034
+ * Reads the live `formValue` off the atom rather than the event's `value`
1035
+ * token, because an unchecked checkbox reports "" there but keeps its token
1036
+ * in the detail. Also clears stale errors on the edited field.
1037
+ */
733
1038
  private handleAtomEdited;
734
1039
  /** Explicit dismiss of the step-error alert (it removes itself). */
735
1040
  private handleAlertDismiss;
@@ -740,6 +1045,7 @@ declare class ZitadelLogin extends LitElement {
740
1045
  * Imperative on purpose; see {@link stepErrorDismissed}.
741
1046
  */
742
1047
  private clearStaleErrors;
1048
+ /** Mirror a value onto the matching rendered atom (used after atom events). */
743
1049
  private syncFieldElementValue;
744
1050
  private handleAtomSubmit;
745
1051
  /** Secondary navigation rows (`data-action` on `.zl-card-nav__link`). */
@@ -766,8 +1072,36 @@ declare class ZitadelLogin extends LitElement {
766
1072
  */
767
1073
  private handlePasskeyError;
768
1074
  private findPrimaryAction;
1075
+ /**
1076
+ * On the initial paint, only a field earns focus: script-moved focus with
1077
+ * no prior interaction matches `:focus-visible`, so autofocusing a button
1078
+ * on a field-less step (passkey-first) paints a ring that reads as a
1079
+ * pre-selected state. Step swaps keep button focus — there the browser
1080
+ * derives the modality from the user's actual input.
1081
+ */
769
1082
  private moveFocusToFirstField;
770
1083
  private submit;
1084
+ /**
1085
+ * Handle the browser's back/forward gesture (ADR 022). When `popstate`
1086
+ * fires:
1087
+ *
1088
+ * - **Self-initiated** (`ignoreNextPop`) → `applyResponse` is retiring
1089
+ * the sentinel; ignore.
1090
+ * - **Back press while armed** → the browser consumed the sentinel.
1091
+ * Re-arm it immediately — so the stack shape is identical on every
1092
+ * step and repeated presses behave the same at any flow depth — then
1093
+ * submit the step's `kind: "back"` action.
1094
+ * - **Landing on the sentinel while armed** → the host page pushed an
1095
+ * entry above the sentinel (e.g. an in-page `#anchor` click) and the
1096
+ * user backed out of it. They are back where the widget expects them
1097
+ * — not asking the flow to go back; do nothing.
1098
+ * - **Forward press onto a retired sentinel** (it survives as a forward
1099
+ * entry after `history.back()`) → bounce back: flow state is
1100
+ * server-authoritative, the browser cannot skip ahead
1101
+ * (ADR 022 §Edge cases).
1102
+ * - Anything else is host-page traversal — leave the browser alone.
1103
+ */
1104
+ private onPopState;
771
1105
  private handleTransportError;
772
1106
  }
773
1107
  declare global {
@@ -793,9 +1127,7 @@ declare global {
793
1127
  * action, and calls the typed `revokeMySession` operation in `@zitadel/api`
794
1128
  * (`DELETE /sessions/me`). The server clears the session cookie via
795
1129
  * `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.)
1130
+ * and optionally navigates to `post-sign-out-url`.
799
1131
  *
800
1132
  * ## Template-slot mode
801
1133
  *
@@ -837,12 +1169,13 @@ declare class ZitadelLogout extends LitElement {
837
1169
  /** URL to navigate to after a successful sign-out. */
838
1170
  accessor postSignOutUrl: string;
839
1171
  /**
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.
1172
+ * Colour mode: `light`, `dark`, or `auto` (follow `prefers-color-scheme`).
1173
+ * Empty means "not stated" and defaults to `auto` the control lives
1174
+ * inside the app's own chrome, so it follows the visitor's preference
1175
+ * rather than forcing the dark login surface. Set it explicitly when the
1176
+ * surrounding app surface is fixed: `<zitadel-logout theme="dark">`.
844
1177
  */
845
- accessor clientId: string;
1178
+ accessor theme: "" | ThemeMode;
846
1179
  private accessor displayName;
847
1180
  private accessor displayEmail;
848
1181
  private accessor displayUserId;
@@ -853,8 +1186,10 @@ declare class ZitadelLogout extends LitElement {
853
1186
  private pendingTemplate;
854
1187
  private projectedContainer;
855
1188
  private identityRequested;
1189
+ private readonly themeController;
856
1190
  connectedCallback(): void;
857
1191
  disconnectedCallback(): void;
1192
+ willUpdate(): void;
858
1193
  updated(): void;
859
1194
  /** Declarative config read from this element's attributes. */
860
1195
  private get projectAttrs();
@@ -890,13 +1225,6 @@ declare class ZitadelLogout extends LitElement {
890
1225
  * `zitadel-signout` and optionally navigates to `postSignOutUrl`.
891
1226
  */
892
1227
  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
1228
  private handleSignOutClick;
901
1229
  render(): _$lit.TemplateResult<1> | typeof nothing;
902
1230
  }
@@ -908,7 +1236,7 @@ declare global {
908
1236
  //#endregion
909
1237
  //#region src/orchestrator/zitadel-session.d.ts
910
1238
  /**
911
- * `<zitadel-session>` — the full-screen "signed in" card.
1239
+ * `<zitadel-session>` — the "signed in" card.
912
1240
  *
913
1241
  * Renders the post-sign-in confirmation surface (Figma `7355:8959`): a
914
1242
  * centred auth card reading "Signed in as {identity}" with a **Sign out**
@@ -916,6 +1244,14 @@ declare global {
916
1244
  * `<zl-button>` atoms as the `<zitadel-login>` orchestrator, so it inherits
917
1245
  * tenant branding tokens with no hardcoded colour, radius, or shadow.
918
1246
  *
1247
+ * Like `<zitadel-login>` it is widget-first: the default `variant="widget"`
1248
+ * is content-sized and transparent so the card drops into an app's own
1249
+ * page; dedicated signed-in routes opt into `variant="page"`, which claims
1250
+ * the viewport and paints the surface background (the page paint lives on
1251
+ * the internal `<zl-page-shell>`). `theme` resolves through the shared
1252
+ * surface base — explicit value, else `dark` for `page` / `auto` for
1253
+ * `widget`.
1254
+ *
919
1255
  * This is the companion surface to `<zitadel-login>` for the "go straight to
920
1256
  * /login" flow: the orchestrator signs the user in and redirects here (or to
921
1257
  * the consumer's own page); this element proves the session and offers a way
@@ -938,7 +1274,7 @@ declare global {
938
1274
  * destination contract is still being decided. Consumers redirect after
939
1275
  * sign-in via the `<zitadel-login>` `post-sign-in-url`.
940
1276
  */
941
- declare class ZitadelSession extends LitElement {
1277
+ declare class ZitadelSession extends ZitadelSurface {
942
1278
  static styles: _$lit.CSSResult[];
943
1279
  /**
944
1280
  * SDK project handle returned by `configureZitadel()`. Set from JS (or a
@@ -967,6 +1303,7 @@ declare class ZitadelSession extends LitElement {
967
1303
  connectedCallback(): void;
968
1304
  /** Single identity line: human-readable name, then email, then user_id. */
969
1305
  private get identityLabel();
1306
+ willUpdate(): void;
970
1307
  updated(): void;
971
1308
  /** Declarative config read from this element's attributes. */
972
1309
  private get projectAttrs();
@@ -992,88 +1329,6 @@ declare global {
992
1329
  }
993
1330
  } //# sourceMappingURL=zitadel-session.d.ts.map
994
1331
  //#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
1332
  //#region src/orchestrator/branding-to-tokens.d.ts
1078
1333
  type BrandingToTokensOptions = {
1079
1334
  resolvedTheme?: ResolvedTheme;
@@ -1093,12 +1348,22 @@ declare function buildBrandingStylesheet(branding: Branding | undefined, options
1093
1348
  * root) so the base values exist before branding patches them.
1094
1349
  */
1095
1350
  declare function applyBrandingTokens(shadowRoot: ShadowRoot, branding: Branding | undefined, resolvedTheme: ResolvedTheme): void;
1351
+ /**
1352
+ * Standalone branding→theme resolution for callers outside the orchestrator
1353
+ * (SSR, tests, embedders composing atoms by hand). `<zitadel-login>` itself
1354
+ * uses {@link ThemeController}, which layers the element's `theme` property
1355
+ * and a variant-derived fallback on top of the same branding input.
1356
+ *
1357
+ * Defaults to dark: the design system's primary surface, and the mode a
1358
+ * hosted login page renders when a tenant states no preference.
1359
+ */
1096
1360
  declare function resolveTheme(branding: Branding | undefined): ResolvedTheme;
1097
1361
  //#endregion
1098
1362
  //#region src/orchestrator/font-loader.d.ts
1099
1363
  /**
1100
1364
  * 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).
1365
+ * to withdraw this surface's registration (e.g. when a flow resolves with no
1366
+ * tenant font); the link disappears once no surface registers a URL.
1102
1367
  */
1103
1368
  declare function applyFontUrl(shadowRoot: ShadowRoot, fontUrl: string | null | undefined): void;
1104
1369
  //#endregion
@@ -1141,7 +1406,10 @@ type BrandingValidationResult = {
1141
1406
  branding: Branding | undefined;
1142
1407
  issues: readonly string[];
1143
1408
  };
1144
- declare function validateBranding(input: Branding | undefined): BrandingValidationResult;
1409
+ type BrandingValidationContext = {
1410
+ /** Origin of the document that will paint the branding payload. */renderingOrigin?: string;
1411
+ };
1412
+ declare function validateBranding(input: Branding | undefined, context?: BrandingValidationContext): BrandingValidationResult;
1145
1413
  //#endregion
1146
1414
  //#region src/orchestrator/template-context.d.ts
1147
1415
  type FlowMessage = {
@@ -1152,6 +1420,13 @@ type FlowError = {
1152
1420
  code?: string;
1153
1421
  text_key?: string;
1154
1422
  message?: string;
1423
+ /**
1424
+ * Name of the step field this error targets. When set (and the step renders
1425
+ * that field), the template routes the error inline under the control via
1426
+ * the `fieldError` filter; when absent it renders in the form-level banner
1427
+ * (`formLevelError`). See `localiseFlowErrorKeys` in `liquid.ts`.
1428
+ */
1429
+ field?: string;
1155
1430
  };
1156
1431
  type FlowIdentity = {
1157
1432
  display_name?: string;
@@ -1180,5 +1455,5 @@ type LiquidContext = {
1180
1455
  loading: boolean;
1181
1456
  };
1182
1457
  //#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-DjYJwejg.d.mts.map
1458
+ 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 };
1459
+ //# sourceMappingURL=index-Ce_81oFH.d.mts.map