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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +135 -72
  2. package/dist/atoms/index.d.mts +2 -2
  3. package/dist/atoms/index.mjs +2 -2
  4. package/dist/atoms-DSxjEHca.mjs +2268 -0
  5. package/dist/atoms-DSxjEHca.mjs.map +1 -0
  6. package/dist/default-Dnjq9iBt.mjs +6 -0
  7. package/dist/default-Dnjq9iBt.mjs.map +1 -0
  8. package/dist/index-BlxTxXK8.d.mts +449 -0
  9. package/dist/index-BlxTxXK8.d.mts.map +1 -0
  10. package/dist/index-DFdR16-D.d.mts +1599 -0
  11. package/dist/index-DFdR16-D.d.mts.map +1 -0
  12. package/dist/index-Dx8rvpNs.d.mts +14844 -0
  13. package/dist/index-Dx8rvpNs.d.mts.map +1 -0
  14. package/dist/index.d.mts +22 -8
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +5 -5
  17. package/dist/jsx.d.ts +67 -0
  18. package/dist/manifests.d.mts.map +1 -1
  19. package/dist/manifests.mjs +4 -2
  20. package/dist/manifests.mjs.map +1 -1
  21. package/dist/orchestrator/index.d.mts +3 -3
  22. package/dist/orchestrator/index.mjs +3 -3
  23. package/dist/orchestrator-DG-YwFFE.mjs +5008 -0
  24. package/dist/orchestrator-DG-YwFFE.mjs.map +1 -0
  25. package/dist/standalone.mjs +9172 -5871
  26. package/dist/tokens/index.d.mts +1 -1
  27. package/dist/tokens/index.mjs +1 -1
  28. package/dist/tokens-T4N9VJz3.mjs +452 -0
  29. package/dist/tokens-T4N9VJz3.mjs.map +1 -0
  30. package/package.json +13 -12
  31. package/dist/atoms-B25wiDqb.mjs +0 -1464
  32. package/dist/atoms-B25wiDqb.mjs.map +0 -1
  33. package/dist/default-Cpl78hQN.mjs +0 -6
  34. package/dist/default-Cpl78hQN.mjs.map +0 -1
  35. package/dist/index-DB_JTtln.d.mts +0 -1000
  36. package/dist/index-DB_JTtln.d.mts.map +0 -1
  37. package/dist/index-DVDCrfkv.d.mts +0 -7396
  38. package/dist/index-DVDCrfkv.d.mts.map +0 -1
  39. package/dist/index-EJengPPu.d.mts +0 -249
  40. package/dist/index-EJengPPu.d.mts.map +0 -1
  41. package/dist/orchestrator-CW9zixuw.mjs +0 -3362
  42. package/dist/orchestrator-CW9zixuw.mjs.map +0 -1
  43. package/dist/tokens-BQ_augxi.mjs +0 -244
  44. package/dist/tokens-BQ_augxi.mjs.map +0 -1
@@ -1,1000 +0,0 @@
1
- import { $ as GetFlowStep200, A as CreateFlowDefinitionBody, At as RevokeTokenBody, B as CreateTeamBody, Bt as VerifyChallengeProofBody, C as CreateFlow201StepChallenge, Ct as ListFlowDefinitions200, D as CreateFlowBody, Dt as ListUsers200Item, E as CreateFlow201StepSsoProvidersItem, Et as ListSessionsParams, F as CreateSchemaBody, Ft as SubmitFlowStepBody, G as DeleteFlowDefinitionParams, H as CreateUser201, I as CreateSchemaParams, It as UpdateFlowDefinition200, J as ExchangeHandoffBody, K as EndSessionParams, L as CreateSession201, Lt as UpdateFlowDefinitionBody, M as CreateProject201, Mt as SetUserPasswordParams, N as CreateProjectBody, Nt as SubmitFlowEventBody, O as CreateFlowBodyPurpose, Ot as ListUsersParams, P as CreateSchema201, Pt as SubmitFlowStep200, Q as GetFlowDefinitionParams, R as CreateSessionBody, Rt as UpdateFlowDefinitionParams, S as CreateFlow201StepActionsItem, St as IssueChallengeBody, T as CreateFlow201StepGates, Tt as ListSessions200, U as CreateUserBody, V as CreateTeamParams, W as CreateUserParams, X as GetAuthAttempt200, Y as ExchangeHandoffParams, Z as GetFlowDefinition200, _ as CreateAuthAttemptBody, _t as GetUserByIDParams, at as GetOpenIDConfiguration200, b as CreateFlow201BrandingLayout, bt as IntrospectBody, ct as GetSchemaById200, dt as GetSessionParams, et as GetHealthDefault, f as AuthorizeDevice200, ft as GetTeam200, g as CreateAuthAttempt201, gt as GetUserByID200, h as AuthorizeGetParams, ht as GetTokenBody, it as GetMyUser200, j as CreateHandoff200, jt as SetUserPasswordBody, k as CreateFlowDefinition201, kt as RevokeSessionParams, lt as GetSchemaByIdParams, m as AuthorizeGetDefault, mt as GetToken200, nt as GetLiveDefault, ot as GetProject200, p as AuthorizeDeviceParams, pt as GetTeamParams, q as ExchangeHandoff200, rt as GetMySession200, st as GetReadyDefault, tt as GetKeys200, ut as GetSession200, v as CreateFlow201, vt as GetUserInfo200, w as CreateFlow201StepFieldsItem, wt as ListFlowDefinitionsParams, x as CreateFlow201Step, xt as IssueChallenge201, y as CreateFlow201Branding, yt as Introspect200, z as CreateTeam201, zt as VerifyChallengeProof200 } from "./index-DVDCrfkv.mjs";
2
- import * as _$lit from "lit";
3
- import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost, nothing } from "lit";
4
- import layoutChromeCss from "./templates/layout-chrome.css?inline";
5
-
6
- //#region ../api/dist/zitadelNextGen-BS4VE7_Y.d.mts
7
- //#region src/generated/endpoints/zitadelNextGen.d.ts
8
- declare namespace zitadelNextGen_d_exports {
9
- export { authorizeDevice, authorizeGet, createAuthAttempt, createFlow, createFlowDefinition, createHandoff, createProject, createSchema, createSession, createTeam, createUser, deleteFlowDefinition, endSession, exchangeHandoff, getAuthAttempt, getAuthorizeDeviceUrl, getAuthorizeGetUrl, getCreateAuthAttemptUrl, getCreateFlowDefinitionUrl, getCreateFlowUrl, getCreateHandoffUrl, getCreateProjectUrl, getCreateSchemaUrl, getCreateSessionUrl, getCreateTeamUrl, getCreateUserUrl, 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, getListSessionsUrl, getListUsersUrl, getLive, getMySession, getMyUser, getOpenIDConfiguration, getProject, getReady, getRevokeMySessionUrl, getRevokeSessionUrl, getRevokeTokenUrl, getSchemaById, getSession, getSetUserPasswordUrl, getSubmitFlowEventUrl, getSubmitFlowStepUrl, getTeam, getToken, getUpdateFlowDefinitionUrl, getUserByID, getUserInfo, getVerifyChallengeProofUrl, introspect, issueChallenge, listFlowDefinitions, listSessions, listUsers, revokeMySession, revokeSession, revokeToken, setUserPassword, submitFlowEvent, submitFlowStep, updateFlowDefinition, verifyChallengeProof };
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 accesstoken
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
- declare const getGetHealthUrl: () => string;
58
- /**
59
- * Check whether the server is healthy
60
- * @summary Check server health
61
- */
62
- declare const getHealth: (options?: RequestInit) => Promise<GetHealthDefault>;
63
- declare const getGetLiveUrl: () => string;
64
- /**
65
- * Check whether the server is started
66
- * @summary Check server liveness
67
- */
68
- declare const getLive: (options?: RequestInit) => Promise<GetLiveDefault>;
69
- declare const getGetReadyUrl: () => string;
70
- /**
71
- * Check whether the server is ready to accept requests
72
- * @summary Check server readiness
73
- */
74
- declare const getReady: (options?: RequestInit) => Promise<GetReadyDefault>;
75
- declare const getCreateUserUrl: (params: CreateUserParams) => string;
76
- /**
77
- * @summary Create user
78
- */
79
- declare const createUser: (createUserBody: CreateUserBody, params: CreateUserParams, options?: RequestInit) => Promise<CreateUser201>;
80
- declare const getListUsersUrl: (params?: ListUsersParams) => string;
81
- /**
82
- * @summary List users
83
- */
84
- declare const listUsers: (params?: ListUsersParams, options?: RequestInit) => Promise<ListUsers200Item[]>;
85
- declare const getGetUserByIDUrl: (userId: string, params: GetUserByIDParams) => string;
86
- /**
87
- * @summary Get user by ID
88
- */
89
- declare const getUserByID: (userId: string, params: GetUserByIDParams, options?: RequestInit) => Promise<GetUserByID200>;
90
- declare const getSetUserPasswordUrl: (userId: string, params: SetUserPasswordParams) => string;
91
- /**
92
- * @summary Set user password
93
- */
94
- declare const setUserPassword: (userId: string, setUserPasswordBody: SetUserPasswordBody, params: SetUserPasswordParams, options?: RequestInit) => Promise<void>;
95
- declare const getGetMyUserUrl: () => string;
96
- /**
97
- * @summary Get my user information
98
- */
99
- declare const getMyUser: (options?: RequestInit) => Promise<GetMyUser200>;
100
- declare const getCreateFlowUrl: () => string;
101
- /**
102
- * Resolves a flow definition based on purpose + audience context and returns
103
- the first capability step. Creates a new session implicitly unless
104
- `session_id` is provided (for step-up / reauth on an existing session).
105
-
106
- 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.
108
-
109
- The response also sets an encrypted `HttpOnly` cookie (`_zflow`) containing
110
- the flow's orchestration state (current step, collected data, history).
111
- The server is stateless between requests — all flow state lives in this
112
- cookie. The browser sends it automatically on subsequent requests.
113
-
114
- * @summary Start a new flow
115
- */
116
- declare const createFlow: (createFlowBody: CreateFlowBody, options?: RequestInit) => Promise<CreateFlow201>;
117
- declare const getGetFlowStepUrl: (id: string) => string;
118
- /**
119
- * Returns the current capability step without advancing the state machine.
120
- Useful for page reloads or re-rendering after a network error.
121
-
122
- * @summary Get current step (re-render)
123
- */
124
- declare const getFlowStep: (id: string, options?: RequestInit) => Promise<GetFlowStep200>;
125
- declare const getSubmitFlowStepUrl: (id: string) => string;
126
- /**
127
- * Submits user input for the current step. The server validates,
128
- processes (e.g., verifies a credential), advances the state machine
129
- through any invisible steps, and returns the next visible step.
130
-
131
- The response sets an updated encrypted `HttpOnly` cookie (`_zflow`)
132
- with the new flow state. The server is stateless — all orchestration
133
- state is carried in this cookie between requests.
134
-
135
- **Important:** The `id` in the response may differ from the `id` used in
136
- the request. This happens when a flow pivots (pushes a new flow onto the
137
- stack) or when a stacked flow completes (auto-pops to the parent flow).
138
- Always use the `id` from the latest response for the next request.
139
-
140
- ## Flow completion
141
-
142
- When `step.type` is `complete`, the flow is terminal. The `step.behavior`
143
- field tells the frontend what to do:
144
-
145
- | `behavior` | Action |
146
- |------------- |------------------------------------------------------------|
147
- | `redirect` | Navigate to `redirect_uri` (OIDC/SAML auth request done). |
148
- | `show` | Render the step as a success screen (e.g., registration). |
149
-
150
- A `complete` step is only returned when the **entire flow stack** is done.
151
- If a stacked flow (e.g., recovery pivoted from login) finishes, the server
152
- auto-pops to the parent flow and returns the parent's next step — the
153
- frontend never sees a `complete` for intermediate flows.
154
-
155
- * @summary Submit step data and advance
156
- */
157
- 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
- declare const getCreateAuthAttemptUrl: () => string;
167
- /**
168
- * Starts a new authentication attempt. This is the entry point for the auth_attempts state machine.
169
-
170
- An attempt is an ephemeral (15-minute TTL) state machine that drives a single authentication round.
171
- It accepts factor challenges, verifies proofs, and completes into a session or handoff token.
172
-
173
- Accepts a project_id and challenge_nonce (from POST /bootstrap/challenge). For step-up re-auth,
174
- also include session_id to add factors to an existing session.
175
-
176
- * @summary Create a new authentication attempt
177
- */
178
- declare const createAuthAttempt: (createAuthAttemptBody: CreateAuthAttemptBody, options?: RequestInit) => Promise<CreateAuthAttempt201>;
179
- declare const getGetAuthAttemptUrl: (attemptId: string) => string;
180
- /**
181
- * Polls the current state of an authentication attempt.
182
-
183
- Returns the attempt's state, available factors for the next challenge,
184
- challenges issued so far, and any errors preventing progress.
185
-
186
- Use this for polling during long-running factor verifications (e.g., waiting for
187
- a federated IdP callback or a device flow).
188
-
189
- * @summary Get authentication attempt state
190
- */
191
- declare const getAuthAttempt: (attemptId: string, options?: RequestInit) => Promise<GetAuthAttempt200>;
192
- declare const getIssueChallengeUrl: (attemptId: string) => string;
193
- /**
194
- * Issues a single-factor verification challenge within an auth attempt.
195
-
196
- This advances the authentication state machine by requesting a specific factor method
197
- (password, passkey, TOTP, OTP via SMS, etc.). The server responds with challenge details
198
- including method, metadata, and any UI hints. The client then verifies the proof
199
- by calling POST /auth_attempts/{attempt_id}/challenges/{challenge_id}/verify.
200
-
201
- * @summary Issue a factor challenge
202
- */
203
- declare const issueChallenge: (attemptId: string, issueChallengeBody: IssueChallengeBody, options?: RequestInit) => Promise<IssueChallenge201>;
204
- declare const getVerifyChallengeProofUrl: (attemptId: string, challengeId: string) => string;
205
- /**
206
- * Submits a proof (credential, code, assertion) to verify a factor challenge.
207
-
208
- The proof format depends on the challenge method. For example:
209
- - `password` method: { password: "…" }
210
- - `totp` method: { totp: { code: "123456" } }
211
- - `passkey` method: { passkey: { assertion: "…" } }
212
- - `recovery_code` method: { recovery_code: "…" }
213
-
214
- On successful verification, the factor is written to the auth attempt.
215
- The attempt moves to the next pending challenge or completes if all required factors are verified.
216
-
217
- * @summary Verify a factor proof
218
- */
219
- declare const verifyChallengeProof: (attemptId: string, challengeId: string, verifyChallengeProofBody: VerifyChallengeProofBody, options?: RequestInit) => Promise<VerifyChallengeProof200>;
220
- declare const getCreateHandoffUrl: (attemptId: string) => string;
221
- /**
222
- * Completes the authentication attempt and mints a `handoff_token`.
223
-
224
- Call this after all required factors have been verified and the attempt is in `completed` state.
225
- The handoff token is short-lived (≤60 seconds) and must be exchanged at
226
- POST /sessions/exchange to receive the final session and session_token.
227
-
228
- The handoff token is:
229
- - Single-use (atomic exchange, no retry)
230
- - Audience-bound (requires matching project key for exchange)
231
- - Idempotency-safe within a 5-minute window (see conventions)
232
-
233
- * @summary Complete authentication and create handoff token
234
- */
235
- declare const createHandoff: (attemptId: string, options?: RequestInit) => Promise<CreateHandoff200>;
236
- declare const getCreateProjectUrl: () => string;
237
- /**
238
- * @summary Create project
239
- */
240
- declare const createProject: (createProjectBody: CreateProjectBody, options?: RequestInit) => Promise<CreateProject201>;
241
- declare const getGetProjectUrl: (projectId: string) => string;
242
- /**
243
- * Returns the current state of a project.
244
-
245
- * @summary Get project
246
- */
247
- declare const getProject: (projectId: string, options?: RequestInit) => Promise<GetProject200>;
248
- declare const getCreateSessionUrl: () => string;
249
- /**
250
- * Creates an anonymous session shell with no user and no factors (`state: building`).
251
-
252
- This is optional — an `auth_attempt` will create a session implicitly if none is provided.
253
- Use this explicitly when you want to:
254
- - Pre-allocate a `session_id` before the user is known, so device/telemetry signals
255
- can be correlated with the eventual authenticated session from the start.
256
- - Track anonymous state (bot detection, device fingerprint) that survives until authentication.
257
-
258
- The returned `session_token` authorises GET and DELETE on this session.
259
- It is superseded when a handoff exchange completes — clients must replace it at that point.
260
-
261
- Anonymous sessions expire aggressively (10-minute TTL). The TTL resets to the configured
262
- full session TTL when the first authentication factor is written via a completing `auth_attempt`.
263
-
264
- * @summary Create an anonymous session shell
265
- */
266
- declare const createSession: (createSessionBody: CreateSessionBody, options?: RequestInit) => Promise<CreateSession201>;
267
- declare const getListSessionsUrl: (params: ListSessionsParams) => string;
268
- /**
269
- * Returns a paginated list of sessions for a project.
270
- Requires a project service key (OAuth2 client credentials).
271
-
272
- * @summary List sessions
273
- */
274
- declare const listSessions: (params: ListSessionsParams, options?: RequestInit) => Promise<ListSessions200>;
275
- declare const getExchangeHandoffUrl: (params: ExchangeHandoffParams) => string;
276
- /**
277
- * Consumes a one-time `handoff_token` minted by `POST /auth_attempts/{id}/handoff`
278
- and returns the resulting session and a `session_token`.
279
-
280
- The server resolves the originating `auth_attempt` from the token and then:
281
-
282
- | Originating auth_attempt | Outcome |
283
- |---|---|
284
- | No `session_id` | A new authenticated session is **created**. |
285
- | `session_id` points to an anonymous shell | Existing session is **upgraded** — user and factors written in, TTL reset to full session TTL. |
286
- | `session_id` points to an active session (step-up) | Existing session is **upgraded** — new factors merged, `assurance_levels[]` expanded. |
287
-
288
- The response shape is identical in all three cases.
289
-
290
- The `session_token` supersedes any previously issued `session_token` for the same session.
291
- Clients must replace their stored token at this point.
292
-
293
- Requires a project service key (OAuth2 client credentials).
294
-
295
- * @summary Exchange handoff token for a session
296
- */
297
- declare const exchangeHandoff: (exchangeHandoffBody: ExchangeHandoffBody, params: ExchangeHandoffParams, options?: RequestInit) => Promise<ExchangeHandoff200>;
298
- declare const getGetSessionUrl: (sessionId: string, params: GetSessionParams) => string;
299
- /**
300
- * Returns the current state of a session including its factors and all currently
301
- satisfied assurance levels.
302
-
303
- `assurance_levels[]` may shrink over time as factor freshness windows expire,
304
- without the session itself expiring. Use step-up authentication (a new `auth_attempt`
305
- against the same `session_id`) to restore a dropped assurance level.
306
-
307
- * @summary Get session state
308
- */
309
- declare const getSession: (sessionId: string, params: GetSessionParams, options?: RequestInit) => Promise<GetSession200>;
310
- declare const getRevokeSessionUrl: (sessionId: string, params: RevokeSessionParams) => string;
311
- /**
312
- * Revokes the session immediately (`state: revoked`). This is the logout operation.
313
-
314
- The session_token issued at creation (or superseded by a handoff exchange) is required.
315
- After revocation, any tokens derived from this session are invalidated.
316
-
317
- * @summary Revoke session
318
- */
319
- declare const revokeSession: (sessionId: string, params: RevokeSessionParams, options?: RequestInit) => Promise<void>;
320
- declare const getGetMySessionUrl: () => string;
321
- /**
322
- * Returns the current state of the current session including its factors and all currently
323
- satisfied assurance levels.
324
-
325
- `assurance_levels[]` may shrink over time as factor freshness windows expire,
326
- without the session itself expiring. Use step-up authentication (a new `auth_attempt`
327
- against the same `session_id`) to restore a dropped assurance level.
328
-
329
- * @summary Get my session state
330
- */
331
- declare const getMySession: (options?: RequestInit) => Promise<GetMySession200>;
332
- declare const getRevokeMySessionUrl: () => string;
333
- /**
334
- * Revokes the session immediately (`state: revoked`). This is the logout operation.
335
-
336
- The __nextgen_session cookie issued at creation (or superseded by a handoff exchange) is required.
337
- After revocation, any tokens derived from this session are invalidated including the cookie itself, which is cleared in the response.
338
-
339
- * @summary Revoke my session
340
- */
341
- declare const revokeMySession: (options?: RequestInit) => Promise<void>;
342
- declare const getCreateSchemaUrl: (params: CreateSchemaParams) => string;
343
- /**
344
- * Create a new schema. The schema definition must include a unique $id field,
345
- which will be used to identify the schema in future requests. The $id must
346
- be a valid URI and should ideally point to the location where the schema
347
- can be accessed.
348
-
349
- The schema can either be a concrete schema, e.g. a user schema, or a
350
- schema-url which will be resolved by the server.
351
-
352
- * @summary Create new schema
353
- */
354
- declare const createSchema: (createSchemaBody: CreateSchemaBody, params: CreateSchemaParams, options?: RequestInit) => Promise<CreateSchema201>;
355
- declare const getGetSchemaByIdUrl: (id: string, params: GetSchemaByIdParams) => string;
356
- /**
357
- * Get a schema by its ID. This will return the default revision of the schema.
358
- * @summary Get schema by ID
359
- */
360
- declare const getSchemaById: (id: string, params: GetSchemaByIdParams, options?: RequestInit) => Promise<GetSchemaById200>;
361
- declare const getCreateFlowDefinitionUrl: () => string;
362
- /**
363
- * Creates a new flow definition.
364
- Flow definitions are templates that define the sequence of steps (capabilities)
365
- for a particular user journey (e.g., registration, login, password reset).
366
-
367
- Flow definitions are created based on the flow meta schema, which includes the flow's purpose, audience, and the steps involved.
368
-
369
- * @summary Create a new flow definition
370
- */
371
- declare const createFlowDefinition: (createFlowDefinitionBody: CreateFlowDefinitionBody, options?: RequestInit) => Promise<CreateFlowDefinition201>;
372
- declare const getListFlowDefinitionsUrl: (params: ListFlowDefinitionsParams) => string;
373
- /**
374
- * Retrieves a list of all flow definitions.
375
- This endpoint can be used to view existing flow definitions and their configurations.
376
-
377
- * @summary List flow definitions
378
- */
379
- declare const listFlowDefinitions: (params: ListFlowDefinitionsParams, options?: RequestInit) => Promise<ListFlowDefinitions200>;
380
- declare const getGetFlowDefinitionUrl: (id: string, params: GetFlowDefinitionParams) => string;
381
- /**
382
- * Get a flow definition by id
383
- * @summary Get a flow definition by id
384
- */
385
- declare const getFlowDefinition: (id: string, params: GetFlowDefinitionParams, options?: RequestInit) => Promise<GetFlowDefinition200>;
386
- declare const getUpdateFlowDefinitionUrl: (id: string, params: UpdateFlowDefinitionParams) => string;
387
- /**
388
- * Update a flow definition by id
389
- * @summary Update a flow definition by id
390
- */
391
- declare const updateFlowDefinition: (id: string, updateFlowDefinitionBody: UpdateFlowDefinitionBody, params: UpdateFlowDefinitionParams, options?: RequestInit) => Promise<UpdateFlowDefinition200>;
392
- declare const getDeleteFlowDefinitionUrl: (id: string, params: DeleteFlowDefinitionParams) => string;
393
- /**
394
- * Delete a flow definition by id
395
- * @summary Delete a flow definition by id
396
- */
397
- declare const deleteFlowDefinition: (id: string, params: DeleteFlowDefinitionParams, options?: RequestInit) => Promise<void>;
398
- declare const getCreateTeamUrl: (params: CreateTeamParams) => string;
399
- /**
400
- * @summary Create team
401
- */
402
- declare const createTeam: (params: CreateTeamParams, createTeamBody?: CreateTeamBody, options?: RequestInit) => Promise<CreateTeam201>;
403
- declare const getGetTeamUrl: (teamId: string, params: GetTeamParams) => string;
404
- /**
405
- * Returns the current state of a team.
406
-
407
- * @summary Get team
408
- */
409
- declare const getTeam: (teamId: string, params: GetTeamParams, options?: RequestInit) => Promise<GetTeam200>; //#endregion
410
- //#endregion
411
- //#region ../api/dist/runtime/api-factory.d.mts
412
- //#region src/runtime/api-factory.d.ts
413
- /**
414
- * Typed Zitadel client returned by {@link createZitadelClient}.
415
- * Mirrors the orval-generated endpoints module 1:1.
416
- */
417
- type ZitadelClient = typeof zitadelNextGen_d_exports;
418
- /** Re-exported under the legacy name some consumers (`runtime/config.ts`) still import. */
419
- type ZitadelApi = ZitadelClient;
420
- /** Options for {@link createZitadelClient}. */
421
- //#endregion
422
- //#region ../api/dist/runtime/config.d.mts
423
- /**
424
- * The initialized project handle returned by {@link configureZitadel}.
425
- * Pure data — use factory functions like {@link getApi} to derive services.
426
- */
427
- interface ZitadelProject {
428
- /** Proxy path for API requests. */
429
- readonly proxyPath: string;
430
- /** Project ID passed to flow creation. */
431
- readonly projectId: string;
432
- /** Full URL of the Zitadel auth backend. */
433
- readonly url?: string;
434
- }
435
- /**
436
- * Initializes app-wide SDK configuration and returns the frozen
437
- * {@link ZitadelProject} handle.
438
- *
439
- * Write-once — subsequent calls with the same values return the original
440
- * handle; calls with different values log a warning and return the
441
- * original. This prevents accidental overwrites while remaining safe
442
- * for HMR and framework double-mounts.
443
- */
444
- //#endregion
445
- //#region src/orchestrator/locales/en.d.ts
446
- /**
447
- * Minimal English locale dictionary.
448
- *
449
- * The `| t` filter looks up `text_key` strings here. Missing keys fall through
450
- * to the raw key (matches the spec in
451
- * `docs/design/flowengine/flow-engine-guide.md`).
452
- *
453
- * Text keys are auto-generated by the server from the flow definition:
454
- * - Step titles: `<step>.title`
455
- * - Step descriptions: `<step>.description`
456
- * - Field labels: `<step>.field.<field>`
457
- * - Action labels: `<step>.action.<action>`
458
- *
459
- * Copy aligned to Figma screens file `xkvBjkOJ8ENuHdTGZHXezK` (May 2026).
460
- * MVP only — multi-locale support is deferred.
461
- */
462
- declare const en: Record<string, string>;
463
- type Locale = Record<string, string>;
464
- //#endregion
465
- //#region src/orchestrator/locales/de.d.ts
466
- declare const de: Locale;
467
- //#endregion
468
- //#region src/orchestrator/locales/it.d.ts
469
- declare const it: Locale;
470
- //#endregion
471
- //#region src/orchestrator/locales/index.d.ts
472
- declare const builtinLocales: Readonly<Record<string, Locale>>;
473
- //#endregion
474
- //#region src/orchestrator/zitadel-login.d.ts
475
- /**
476
- * `<zitadel-login>` — the auth-UI orchestrator.
477
- *
478
- * Drives the typed `@zitadel/api` Flow API directly: `POST /flow`
479
- * starts a flow, `POST /flow/{id}/submit` advances it. Renders each step
480
- * through LiquidJS, sanitises the output via DOMPurify, and mounts the
481
- * result inside a real `<form>` element in its Shadow DOM via Lit's
482
- * `unsafeHTML` directive. Atom CustomEvents (`zl-input` / `zl-submit`)
483
- * and the form's native `submit` event feed back into the
484
- * submit cycle.
485
- *
486
- * Form participation: the orchestrator owns the `<form>` so Enter submits,
487
- * browsers offer "save password" prompts, and password managers / autofill
488
- * see a real form. Each `<zl-field>` is form-associated (see
489
- * `docs/design/branding/form-participation.md`) so its value participates in
490
- * the form even though it lives inside its own shadow root. The shadow root
491
- * also delegates focus, and after each step swap focus moves to the first
492
- * field so screen-reader and keyboard users land in a sensible spot.
493
- *
494
- * Session/state: the server is stateless between requests — a `_zflow`
495
- * HttpOnly cookie carries orchestration state. We always run with
496
- * `credentials: "include"` (set in `api-client.ts`). The flow handle (`id`)
497
- * may rotate on pivots/pops; we re-read it from every response.
498
- *
499
- * Spec sources:
500
- * - `docs/design/flowengine/flow-engine-guide.md`
501
- * - `docs/design/branding/templates.md`
502
- * - `docs/design/branding/tokens.md`
503
- * - `docs/design/branding/schema.md`
504
- * - `docs/design/branding/form-participation.md`
505
- * - `docs/design/flowengine/template-security.md`
506
- */
507
- declare class ZitadelLogin extends LitElement {
508
- static shadowRootOptions: ShadowRootInit;
509
- static styles: _$lit.CSSResult;
510
- accessor purpose: CreateFlowBodyPurpose;
511
- /**
512
- * SDK project handle returned by `configureZitadel()`. Set from JS (or a
513
- * framework binding). When set, takes precedence over both the
514
- * `project-id`/`proxy-path`/`url` attributes and the global singleton from
515
- * `getZitadelConfig()`.
516
- */
517
- accessor project: ZitadelProject | undefined;
518
- /**
519
- * Project ID, set declaratively in HTML. Lets the component be configured on
520
- * a plain page without JS or `configureZitadel()`. Ignored when the `project`
521
- * property or a `configureZitadel()` global is set. See {@link projectAttrs}.
522
- */
523
- accessor projectId: string;
524
- /**
525
- * Proxy path for API requests (e.g. `/__nextgen`), set declaratively in HTML.
526
- * Defaults to `/__nextgen` when omitted, matching `configureZitadel()`.
527
- */
528
- accessor proxyPath: string;
529
- /**
530
- * Full URL of the Zitadel auth backend, set declaratively in HTML. Optional —
531
- * not needed in client-only setups.
532
- */
533
- accessor url: string;
534
- /**
535
- * URL to navigate to after a successful embedded sign-in. When set, the
536
- * orchestrator exchanges the terminal `handoff_token` via the generated
537
- * API client (setting the session cookie) and then performs a full
538
- * navigation to this URL so host middleware can observe the cookie.
539
- * For `complete: "redirect"` the orchestrator follows `redirect_uri`
540
- * instead and does not run the exchange.
541
- */
542
- accessor postSignInUrl: string;
543
- /**
544
- * Existing flow handle to resume rather than start a new flow. When set,
545
- * the orchestrator hits `GET /flow/{id}` instead of `POST /flow` on
546
- * mount, so a page reload after a network blip can re-render the same
547
- * step without losing collected state.
548
- */
549
- accessor resumeFlowId: string;
550
- /**
551
- * BCP 47 language tag (e.g. `"de"`, `"en-US"`). The widget resolves this
552
- * to a built-in locale dictionary. Falls back to auto-detection from
553
- * `document.documentElement.lang` or `navigator.language` when empty.
554
- */
555
- accessor lang: string;
556
- /**
557
- * Custom locale dictionaries keyed by language code. When set, these take
558
- * precedence over the built-in dictionaries for matching language codes.
559
- *
560
- * ```ts
561
- * import { en } from "@zitadel/components";
562
- * const locales = {
563
- * en: { ...en, "identifier.title": "Welcome" },
564
- * de: myGermanDict,
565
- * };
566
- * ```
567
- */
568
- accessor locales: Record<string, Locale> | undefined;
569
- private accessor response;
570
- private accessor branding;
571
- private accessor loading;
572
- private accessor startupError;
573
- private accessor formValues;
574
- private readonly themeController;
575
- private engine;
576
- private readonly sanitise;
577
- /**
578
- * Cached compiled tenant template, keyed by source string. Re-rendering on
579
- * every `formValues` change otherwise re-parses the same template.
580
- */
581
- private tenantTemplateCache;
582
- createRenderRoot(): HTMLElement | DocumentFragment;
583
- /**
584
- * Start the flow after the first render rather than in `connectedCallback`.
585
- * Frameworks that wrap web components (e.g. `@lit/react` in the console)
586
- * attach the element first and then assign object properties (`branding`,
587
- * `locale`) via setters. `connectedCallback` runs synchronously on attach
588
- * — before any setters from a wrapper's effects/refs — so reading those
589
- * properties there sees stale defaults. `firstUpdated` runs after Lit's
590
- * first render, by which time setters from the wrapping framework have
591
- * fired.
592
- */
593
- protected firstUpdated(): void;
594
- /**
595
- * Resolves the effective locale dictionary. The built-in dictionary for the
596
- * resolved language is used as the base; entries from the `locales` map (if
597
- * set) are spread on top so partial overrides work without importing and
598
- * spreading the full base dictionary.
599
- *
600
- * Priority: explicit `lang` attr → `navigator.language` (user preference)
601
- * → `document.documentElement.lang` (page default) → English fallback.
602
- */
603
- private resolveLocale;
604
- willUpdate(changed: PropertyValues<this>): void;
605
- updated(changed: PropertyValues<this>): void;
606
- /**
607
- * Apply captured values and move focus once the new step has fully
608
- * rendered. This commit produces the step's `zl-field`/`zl-button` atoms,
609
- * but those render their own shadow DOM on a later microtask — so await
610
- * this element's update *and* the child atoms' first render before touching
611
- * them, rather than guessing a frame with `requestAnimationFrame`.
612
- */
613
- private hydrateStepAfterRender;
614
- render(): _$lit.TemplateResult<1>;
615
- /**
616
- * Inject the attribution badge into the rendered template's
617
- * `<zl-page-shell>` footer slot. The attribution must live INSIDE the
618
- * page-shell so it sits within the 100vh viewport rhythm (matching the
619
- * Figma sign-in frame where the pill sits 24px below the card, both
620
- * centred on the page). It can't be a sibling of the page-shell because
621
- * the page-shell already occupies the full viewport height.
622
- *
623
- * This markup is appended AFTER `renderStep` has sanitised the Liquid
624
- * output, so it is not run through DOMPurify. It is orchestrator-owned and
625
- * any tenant-supplied values (`custom_link`) are escaped via `escapeHtml`.
626
- */
627
- private injectAttribution;
628
- /**
629
- * "Secured with Zitadel" attribution chrome injected into every
630
- * template's page-shell footer slot. Controlled by
631
- * `branding.attribution.show_zitadel` — defaults to `true` for
632
- * community / OSS deployments. Licensed tenants can suppress the badge
633
- * entirely or swap it for a `custom_link` value.
634
- */
635
- private renderAttributionHtml;
636
- /** Declarative config read from this element's attributes. */
637
- private get projectAttrs();
638
- private startFlow;
639
- private applyResponse;
640
- /**
641
- * Acts on terminal flow steps. The wire surfaces two kinds of completion:
642
- *
643
- * - `step.complete === "redirect"` — navigate the browser to
644
- * `response.redirect_uri` (OIDC/SAML `auth_request_id` resolved). This
645
- * takes precedence over `post-sign-in-url`.
646
- * - `step.complete === "show"` — when `post-sign-in-url` is set, exchange
647
- * the `handoff_token` for a session cookie and navigate there.
648
- *
649
- * `zitadel-flow-complete` is always emitted so hosts with custom post-sign-in
650
- * flows can handle the handoff themselves when `post-sign-in-url` is omitted.
651
- */
652
- private maybeCompleteFlow;
653
- private renderStep;
654
- /**
655
- * Build a `FlowIdentity` from the orchestrator's captured form values so
656
- * the signed-in template can greet the user by email without the API
657
- * having to round-trip identity claims. Email comes from the
658
- * identifier step; display name composes from `given_name` /
659
- * `family_name` when the register step ran.
660
- */
661
- private deriveIdentity;
662
- private applyValuesToFields;
663
- private captureValuesFromFields;
664
- private currentFieldValue;
665
- private handleAtomInput;
666
- private syncFieldElementValue;
667
- private handleAtomSubmit;
668
- /** Secondary navigation rows (`data-action` on `.zl-card-nav__link`). */
669
- private handleDelegatedAction;
670
- private handleFormSubmit;
671
- /**
672
- * Handle a successful WebAuthn ceremony. Auto-submit with the proof
673
- * as `challenge_response` so the flow advances without extra user
674
- * interaction — the ceremony IS the factor verification (ADR 013).
675
- */
676
- private handlePasskeyResult;
677
- /**
678
- * Handle a WebAuthn ceremony error. Re-render the current step with
679
- * an error message so the user sees feedback and can retry or skip.
680
- *
681
- * Guard: if the step already carries the same error key, skip the update.
682
- * Mutating `this.response` triggers `unsafeHTML` to replace the DOM tree,
683
- * which reconnects a fresh `<zl-passkey>` that immediately re-starts the
684
- * ceremony — creating an infinite loop. The guard breaks the cycle.
685
- *
686
- * We also strip the `challenge` from the step so the template does not
687
- * render a new `<zl-passkey>` on re-render. Without this, the first
688
- * cancel would trigger a second ceremony (the guard prevents a third).
689
- */
690
- private handlePasskeyError;
691
- private findPrimaryAction;
692
- private moveFocusToFirstField;
693
- private submit;
694
- private handleTransportError;
695
- }
696
- declare global {
697
- interface HTMLElementTagNameMap {
698
- "zitadel-login": ZitadelLogin;
699
- }
700
- } //# sourceMappingURL=zitadel-login.d.ts.map
701
- //#endregion
702
- //#region src/orchestrator/zitadel-logout.d.ts
703
- /**
704
- * `<zitadel-logout>` — orchestrator-tier element that lets the signed-in user
705
- * sign out without touching the flow API.
706
- *
707
- * Reads the user's display name + email from the `__nextgen_display` cookie
708
- * (set by the auth backend on sign-in), renders an avatar trigger with a
709
- * dropdown that exposes a "Sign out" action, and calls the typed
710
- * `revokeMySession` operation in `@zitadel/api`
711
- * (`DELETE /sessions/me`). The server clears the session cookie via
712
- * `Set-Cookie: Max-Age=0`; on success the element fires `zitadel-signout`
713
- * and optionally navigates to `post-sign-out-url`. (`getEndSessionUrl()`
714
- * additionally exposes the OIDC end-session URL for consumers that prefer a
715
- * user-agent-driven redirect.)
716
- *
717
- * ## Template-slot mode
718
- *
719
- * When the consumer projects a `<template>` child the element renders the
720
- * template's clone into its light DOM with `{{name}}`, `{{email}}`, and
721
- * `{{initial}}` substituted. Any element with `data-action="logout"` inside
722
- * the cloned template triggers the sign-out flow. This mirrors the
723
- * placeholder `<nextgen-logout>`'s contract so existing markup keeps working.
724
- *
725
- * Default styles consume the `--zl-*` design tokens so tenant branding
726
- * applies automatically — there is no hardcoded brand colour, radius, or
727
- * shadow.
728
- */
729
- declare class ZitadelLogout extends LitElement {
730
- static styles: _$lit.CSSResult[];
731
- /**
732
- * SDK project handle returned by `configureZitadel()`. Set from JS (or a
733
- * framework binding). When set, takes precedence over both the
734
- * `project-id`/`proxy-path`/`url` attributes and the global singleton from
735
- * `getZitadelConfig()`.
736
- */
737
- accessor project: ZitadelProject | undefined;
738
- /**
739
- * Project ID, set declaratively in HTML. Lets the component be configured on
740
- * a plain page without JS or `configureZitadel()`. Ignored when the `project`
741
- * property or a `configureZitadel()` global is set.
742
- */
743
- accessor projectId: string;
744
- /**
745
- * Proxy path for API requests (e.g. `/__nextgen`), set declaratively in HTML.
746
- * Defaults to `/__nextgen` when omitted, matching `configureZitadel()`.
747
- */
748
- accessor proxyPath: string;
749
- /**
750
- * Full URL of the Zitadel auth backend, set declaratively in HTML. Optional —
751
- * not needed in client-only setups.
752
- */
753
- accessor url: string;
754
- /** URL to navigate to after a successful sign-out. */
755
- accessor postSignOutUrl: string;
756
- /**
757
- * OIDC `client_id` to forward as a query parameter on the end-session
758
- * request, mirroring the standard end-session contract. Optional —
759
- * leaving this empty is fine when the backend can resolve the client
760
- * from the session cookie alone.
761
- */
762
- accessor clientId: string;
763
- private accessor displayName;
764
- private accessor displayEmail;
765
- private accessor open;
766
- private accessor loading;
767
- private accessor errorMessage;
768
- private templateMode;
769
- connectedCallback(): void;
770
- disconnectedCallback(): void;
771
- updated(): void;
772
- /**
773
- * Decodes the `__nextgen_display` cookie (base64-encoded JSON, set by the
774
- * auth backend on sign-in) and populates `displayName` / `displayEmail`.
775
- * A missing or malformed cookie is intentionally non-fatal — the dropdown
776
- * still renders, just with empty values.
777
- */
778
- private readDisplayCookie;
779
- private get initial();
780
- /**
781
- * Clones a consumer-supplied `<template>` into the light DOM, fills the
782
- * `{{name}}`, `{{email}}`, and `{{initial}}` tokens via a TreeWalker, and
783
- * wires every element with `data-action="logout"` to trigger sign-out.
784
- * Light-DOM mounting is deliberate so the consumer's existing CSS applies.
785
- */
786
- private renderTemplate;
787
- private readonly handleDocumentClick;
788
- private readonly handleDocumentKeydown;
789
- private toggleOpen;
790
- /**
791
- * Calls `DELETE /sessions/me` (`revokeMySession`) with `credentials: "include"`.
792
- * The server validates the `__nextgen_session` cookie, deletes the session, and
793
- * clears the cookie via `Set-Cookie: Max-Age=0`. On success this element fires
794
- * `zitadel-signout` and optionally navigates to `postSignOutUrl`.
795
- */
796
- /** Declarative config read from this element's attributes. */
797
- private get projectAttrs();
798
- private doLogout;
799
- /**
800
- * Returns the absolute URL the end-session request will hit. Useful for
801
- * test assertions and for consumers that prefer to navigate the browser
802
- * directly (instead of fetching) so the OIDC session-end redirect is
803
- * driven by the user agent.
804
- */
805
- getEndSessionUrl(): string;
806
- private handleSignOutClick;
807
- render(): _$lit.TemplateResult<1> | typeof nothing;
808
- }
809
- declare global {
810
- interface HTMLElementTagNameMap {
811
- "zitadel-logout": ZitadelLogout;
812
- }
813
- } //# sourceMappingURL=zitadel-logout.d.ts.map
814
- //#endregion
815
- //#region src/orchestrator/branding.d.ts
816
- type FlowLayout = CreateFlow201BrandingLayout;
817
- type BrandingPalette = {
818
- primary?: string;
819
- on_primary?: string;
820
- background?: string;
821
- surface?: string;
822
- muted?: string;
823
- border?: string;
824
- text?: string;
825
- text_muted?: string;
826
- link?: string;
827
- success?: string;
828
- warning?: string;
829
- error?: string;
830
- };
831
- type BrandingTypography = {
832
- font_family?: string;
833
- font_family_mono?: string;
834
- scale?: number;
835
- };
836
- type BrandingShape = {
837
- radius?: "none" | "sm" | "md" | "lg" | "full";
838
- density?: "compact" | "regular" | "comfortable";
839
- };
840
- type BrandingTheme = {
841
- mode?: "light" | "dark" | "auto";
842
- dark?: {
843
- palette?: BrandingPalette;
844
- };
845
- };
846
- type BrandingAssets = {
847
- logo_dark?: string;
848
- favicon?: string;
849
- background_image?: string;
850
- };
851
- /**
852
- * Wire shape (`CreateFlow201Branding`) plus the v2 client-only extension.
853
- * Structurally a superset, so any `CreateFlow201Branding` payload from the
854
- * wire is assignable to `Branding` without a cast.
855
- *
856
- * `attribution.show_zitadel` controls the "Secured with Zitadel" pill in
857
- * the orchestrator footer. Tenants set it to `false` only when they have a
858
- * licence that permits removing attribution (community / OSS deployments
859
- * always show it). The flag intentionally lives on `Branding` so it can
860
- * be overridden per-flow alongside the rest of the visual surface.
861
- */
862
- type Branding = CreateFlow201Branding & {
863
- palette?: BrandingPalette;
864
- typography?: BrandingTypography;
865
- shape?: BrandingShape;
866
- assets?: BrandingAssets;
867
- theme?: BrandingTheme;
868
- attribution?: BrandingAttribution;
869
- };
870
- type BrandingAttribution = {
871
- show_zitadel?: boolean;
872
- custom_link?: {
873
- label: string;
874
- href: string;
875
- };
876
- };
877
- //#endregion
878
- //#region src/orchestrator/theme-controller.d.ts
879
- type ResolvedTheme = "light" | "dark";
880
- declare class ThemeController implements ReactiveController {
881
- private readonly host;
882
- private branding;
883
- private mediaQuery;
884
- private _theme;
885
- constructor(host: ReactiveControllerHost);
886
- get theme(): ResolvedTheme;
887
- setBranding(branding: Branding | undefined): void;
888
- hostConnected(): void;
889
- hostDisconnected(): void;
890
- private refresh;
891
- private attach;
892
- private detach;
893
- private onMediaChange;
894
- private update;
895
- }
896
- //#endregion
897
- //#region src/orchestrator/branding-to-tokens.d.ts
898
- type BrandingToTokensOptions = {
899
- resolvedTheme?: ResolvedTheme;
900
- };
901
- /**
902
- * Build a CSS string of `:host { --zl-* }` declarations from a Branding
903
- * payload. Light values land on `:host`; dark overrides land on
904
- * `:host([data-theme="dark"])`.
905
- */
906
- declare function buildBrandingStylesheet(branding: Branding | undefined, options?: BrandingToTokensOptions): string;
907
- /**
908
- * Apply a branding payload as a `--zl-*` overrides layer on top of the base
909
- * token sheet. Subsequent calls replace the previous override sheet so a new
910
- * branding payload paints cleanly without leaking older declarations.
911
- *
912
- * Callers should run `applyBaseTokens(shadowRoot)` first (once per shadow
913
- * root) so the base values exist before branding patches them.
914
- */
915
- declare function applyBrandingTokens(shadowRoot: ShadowRoot, branding: Branding | undefined, resolvedTheme: ResolvedTheme): void;
916
- declare function resolveTheme(branding: Branding | undefined): ResolvedTheme;
917
- //#endregion
918
- //#region src/orchestrator/font-loader.d.ts
919
- declare function applyFontUrl(shadowRoot: ShadowRoot, fontUrl: string | null | undefined): void;
920
- //#endregion
921
- //#region src/orchestrator/template-names.d.ts
922
- /**
923
- * Names of the bundled Liquid templates the `<zitadel-login>` orchestrator
924
- * registers.
925
- *
926
- * This lives in its own module — separate from `liquid.ts` — so the public
927
- * barrel can re-export `TEMPLATE_NAMES` without dragging LiquidJS' `Liquid`
928
- * type (and its Node ambient-type requirements) into the published
929
- * declaration surface. See `liquid.ts` / the orchestrator barrel.
930
- */
931
- declare const TEMPLATE_NAMES: {
932
- readonly default: "default";
933
- readonly authForm: "auth-form";
934
- readonly passkeyUpsell: "passkey-upsell";
935
- readonly signedIn: "signed-in";
936
- };
937
- //#endregion
938
- //#region src/orchestrator/mandatory-gates.d.ts
939
- declare const MANDATORY_GATES_MARKER = "ZL_MANDATORY_GATES";
940
- declare const mandatoryGatesMarkerComment = "<!--ZL_MANDATORY_GATES-->";
941
- declare function patchMandatoryGates(html: string, step: CreateFlow201Step, locale: Locale): string;
942
- //#endregion
943
- //#region src/orchestrator/sanitiser.d.ts
944
- /**
945
- * Returns a sanitiser bound to the current manifest registry. Callers should
946
- * cache the result; rebuilding is cheap but allocates a fresh DOMPurify config.
947
- */
948
- declare function createSanitiser(): (html: string) => string;
949
- //#endregion
950
- //#region src/orchestrator/api-client.d.ts
951
- declare function startFlow(api: ZitadelApi, input: CreateFlowBody): Promise<CreateFlow201>;
952
- declare function submitStep(api: ZitadelApi, id: string, body: SubmitFlowStepBody): Promise<CreateFlow201>;
953
- declare function getCurrentStep(api: ZitadelApi, id: string): Promise<CreateFlow201>;
954
- //#endregion
955
- //#region src/orchestrator/branding-validator.d.ts
956
- type BrandingValidationResult = {
957
- branding: Branding | undefined;
958
- issues: readonly string[];
959
- };
960
- declare function validateBranding(input: Branding | undefined): BrandingValidationResult;
961
- //#endregion
962
- //#region src/orchestrator/template-context.d.ts
963
- type FlowMessage = {
964
- level: "info" | "warning";
965
- text_key: string;
966
- };
967
- type FlowError = {
968
- code?: string;
969
- text_key?: string;
970
- message?: string;
971
- };
972
- type FlowIdentity = {
973
- display_name?: string;
974
- email_address?: string;
975
- avatar_url?: string;
976
- };
977
- /**
978
- * Liquid render context. The orchestrator builds this from the wire
979
- * `CreateFlow201` payload before invoking the engine.
980
- *
981
- * Capability dictionaries point at the orval wire shapes directly. The only
982
- * client-only pieces are `messages`, `identity`, `errors`, the resolved
983
- * `branding` (v2 superset), and `loading`.
984
- */
985
- type LiquidContext = {
986
- step: Pick<CreateFlow201Step, "name" | "complete" | "texts">;
987
- fields: readonly CreateFlow201StepFieldsItem[];
988
- actions: readonly CreateFlow201StepActionsItem[];
989
- gates: CreateFlow201StepGates;
990
- sso_providers: readonly CreateFlow201StepSsoProvidersItem[];
991
- challenge: CreateFlow201StepChallenge | null;
992
- messages: readonly FlowMessage[];
993
- identity: FlowIdentity | null;
994
- errors: readonly FlowError[];
995
- branding: Branding | Record<string, never>;
996
- loading: boolean;
997
- };
998
- //#endregion
999
- export { ZitadelLogout as A, BrandingAssets as C, BrandingTheme as D, BrandingShape as E, Locale as F, en as I, builtinLocales as M, it as N, BrandingTypography as O, de 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, ZitadelLogin 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 };
1000
- //# sourceMappingURL=index-DB_JTtln.d.mts.map