@zitadel/config 1.0.0-alpha.21 → 1.0.0-alpha.23

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 (49) hide show
  1. package/README.md +2 -0
  2. package/defaults/README-branding.md +1 -1
  3. package/defaults/README-flows.md +9 -4
  4. package/defaults/default-login.json +0 -27
  5. package/dist/branding-contrast.d.mts +107 -0
  6. package/dist/branding-contrast.d.mts.map +1 -0
  7. package/dist/branding-contrast.mjs +229 -0
  8. package/dist/branding-contrast.mjs.map +1 -0
  9. package/dist/css-color.d.mts +36 -0
  10. package/dist/css-color.d.mts.map +1 -0
  11. package/dist/css-color.mjs +231 -0
  12. package/dist/css-color.mjs.map +1 -0
  13. package/dist/{defaults-Bh4_xVbh.d.mts → defaults-BxGCGdqS.d.mts} +5 -3
  14. package/dist/defaults-BxGCGdqS.d.mts.map +1 -0
  15. package/dist/{defaults-DPq0o3iU.mjs → defaults-DV6hY2KT.mjs} +25 -53
  16. package/dist/defaults-DV6hY2KT.mjs.map +1 -0
  17. package/dist/defaults.d.mts +1 -1
  18. package/dist/defaults.mjs +1 -1
  19. package/dist/index.d.mts +3 -3
  20. package/dist/index.mjs +4 -4
  21. package/dist/meta-schemas-OowgSUfU.mjs +1173 -0
  22. package/dist/meta-schemas-OowgSUfU.mjs.map +1 -0
  23. package/dist/meta-schemas.d.mts +4 -3
  24. package/dist/meta-schemas.d.mts.map +1 -1
  25. package/dist/meta-schemas.mjs +1 -1
  26. package/dist/schemas-7oNU25Qz.mjs +173 -0
  27. package/dist/schemas-7oNU25Qz.mjs.map +1 -0
  28. package/dist/schemas.d.mts +12 -5
  29. package/dist/schemas.d.mts.map +1 -1
  30. package/dist/schemas.mjs +3 -69
  31. package/dist/validate.d.mts +8 -2
  32. package/dist/validate.d.mts.map +1 -1
  33. package/dist/validate.mjs +9 -2
  34. package/dist/validate.mjs.map +1 -1
  35. package/meta-schemas/auth-method.json +1 -0
  36. package/meta-schemas/auth-methods.json +5 -3
  37. package/meta-schemas/branding.json +268 -19
  38. package/meta-schemas/flow-definition.json +375 -171
  39. package/meta-schemas/idp-connection.json +397 -0
  40. package/meta-schemas/property-name.json +1 -0
  41. package/meta-schemas/sso-auth-method.json +54 -0
  42. package/meta-schemas/user-property.json +10 -13
  43. package/meta-schemas/user-schema.json +20 -13
  44. package/package.json +18 -5
  45. package/dist/defaults-Bh4_xVbh.d.mts.map +0 -1
  46. package/dist/defaults-DPq0o3iU.mjs.map +0 -1
  47. package/dist/meta-schemas-z4IlqbLd.mjs +0 -531
  48. package/dist/meta-schemas-z4IlqbLd.mjs.map +0 -1
  49. package/dist/schemas.mjs.map +0 -1
@@ -0,0 +1,1173 @@
1
+ //#region meta-schemas/auth-method.json
2
+ var auth_method_default = {
3
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
4
+ $schema: "https://json-schema.org/draft/2020-12/schema",
5
+ title: "AuthMethod",
6
+ type: "object",
7
+ required: ["enabled"],
8
+ additionalProperties: false,
9
+ properties: { "enabled": {
10
+ "type": "boolean",
11
+ "description": "Whether the authentication method is enabled or not"
12
+ } }
13
+ };
14
+ //#endregion
15
+ //#region meta-schemas/auth-methods.json
16
+ var auth_methods_default = {
17
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
18
+ $schema: "https://json-schema.org/draft/2020-12/schema",
19
+ title: "AuthMethods",
20
+ type: "object",
21
+ description: "A list of authentication methods supported by the user definition.",
22
+ minProperties: 1,
23
+ additionalProperties: false,
24
+ properties: {
25
+ "password": { "$ref": "auth-method.json" },
26
+ "passkey": { "$ref": "auth-method.json" },
27
+ "magic_link": { "$ref": "auth-method.json" },
28
+ "sso": { "$ref": "sso-auth-method.json" },
29
+ "otp": { "$ref": "auth-method.json" }
30
+ }
31
+ };
32
+ //#endregion
33
+ //#region meta-schemas/branding.json
34
+ var branding_default = {
35
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
36
+ $schema: "https://json-schema.org/draft/2020-12/schema",
37
+ title: "Branding",
38
+ type: "object",
39
+ description: "Branding configuration, used in two places with one shape: as the request\nbody of `POST /branding`, which publishes it as a new immutable revision,\nand as a read-only projection on flow responses, which carries the\nproject's latest revision. Locally it is the `.zitadel/branding/` descriptor\nthat `zitadel apply` publishes.\n\nEvery field is optional. An omitted key uses Zitadel's maintained default,\nso a revision carrying one colour is as valid as one carrying the whole\nobject.\n",
40
+ additionalProperties: false,
41
+ properties: {
42
+ "$schema": {
43
+ "type": "string",
44
+ "description": "Editor affordance: path or URL of this file's JSON meta-schema, so an\neditor validates and autocompletes it. The CLI strips it before upload;\nthe platform ignores it.\n"
45
+ },
46
+ "layout": {
47
+ "type": "string",
48
+ "enum": ["centered", "split"],
49
+ "description": "Degrade preset (`centered` or `split`) the bundled default template\nbranches on, and the fallback when a custom template fails validation.\nNot the complete design catalog: all named designs (`centered`, `split`,\n`split-right`, `hero`, `minimal`) ship as templates and map onto one of\nthese two values; switch designs with\n`zitadel branding eject --design <name>` instead of editing this field.\nEjected templates may ignore it. Selects a template rather than restyling\nthe widget, so it is not an appearance control.\n",
50
+ "default": "centered"
51
+ },
52
+ "liquid_template": {
53
+ "description": "The LiquidJS template for rendering this step. The orchestrator renders\nit into its Shadow DOM with the capability dictionaries as context.\n",
54
+ "x-local": "file",
55
+ "anyOf": [{
56
+ "type": "string",
57
+ "maxLength": 131072
58
+ }, { "$ref": "#/$defs/LocalFileReference" }]
59
+ },
60
+ "logo_url": {
61
+ "type": "string",
62
+ "format": "uri",
63
+ "maxLength": 2048,
64
+ "description": "Fallback mark, used only when neither `theme.light.logo_url` nor\n`theme.dark.logo_url` is set. Prefer the per-side marks — one file\ncannot serve both surfaces.\n",
65
+ "pattern": "^([hH][tT][tT][pP][sS]://(?:\\[[0-9A-Fa-f:.]+\\]|[^/:?#@]+)(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)|[hH][tT][tT][pP]://([lL][oO][cC][aA][lL][hH][oO][sS][tT]|127\\.(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])|\\[::1\\])(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?([/?#]|$))"
66
+ },
67
+ "hero_url": {
68
+ "type": "string",
69
+ "format": "uri",
70
+ "maxLength": 2048,
71
+ "description": "Hero/background image URL, used by the split layout.",
72
+ "pattern": "^([hH][tT][tT][pP][sS]://(?:\\[[0-9A-Fa-f:.]+\\]|[^/:?#@]+)(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)|[hH][tT][tT][pP]://([lL][oO][cC][aA][lL][hH][oO][sS][tT]|127\\.(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])|\\[::1\\])(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?([/?#]|$))"
73
+ },
74
+ "theme": { "$ref": "#/$defs/BrandingTheme" },
75
+ "typography": { "$ref": "#/$defs/BrandingTypography" },
76
+ "shape": { "$ref": "#/$defs/BrandingShape" }
77
+ },
78
+ $defs: {
79
+ "LocalFileReference": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": ["$file"],
83
+ "properties": { "$file": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "description": "Path to the file whose content is this value, relative to the file holding the reference. The CLI inlines it before upload."
87
+ } }
88
+ },
89
+ "BrandingTheme": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "description": "The theme sides this project publishes, and which of them may run.\n\nPublishing one side makes it the only theme that resolves, even under `auto`\nor an operating-system preference for the other. Publishing both lets `auto`\nfollow the operating system, each side using its own logo and palette.\n\nThe element-level `theme` property overrides `mode`, but cannot select a\nside the project never published.\n",
93
+ "properties": {
94
+ "mode": {
95
+ "type": "string",
96
+ "enum": [
97
+ "light",
98
+ "dark",
99
+ "auto"
100
+ ],
101
+ "description": "Which published side may run. `auto` follows the operating system.\n",
102
+ "examples": ["auto"]
103
+ },
104
+ "light": { "$ref": "#/$defs/BrandingThemeSide" },
105
+ "dark": { "$ref": "#/$defs/BrandingThemeSide" }
106
+ }
107
+ },
108
+ "BrandingThemeSide": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "description": "One complete theme side. Light and dark are independent surfaces — neither\ninherits from the other, and a side that is absent is never used, whatever\n`mode` or the operating system asks for.\n",
112
+ "properties": {
113
+ "logo_url": {
114
+ "type": "string",
115
+ "format": "uri",
116
+ "maxLength": 2048,
117
+ "description": "The mark for this surface. A logo is never recoloured, so each side\ncarries its own file. Absent means no mark on this side, unless the\ntop-level `logo_url` is the only one set.\n",
118
+ "pattern": "^([hH][tT][tT][pP][sS]://(?:\\[[0-9A-Fa-f:.]+\\]|[^/:?#@]+)(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)|[hH][tT][tT][pP]://([lL][oO][cC][aA][lL][hH][oO][sS][tT]|127\\.(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])|\\[::1\\])(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?([/?#]|$))",
119
+ "examples": ["https://cdn.example.com/logo-on-light.svg"]
120
+ },
121
+ "palette": { "$ref": "#/$defs/BrandingPalette" }
122
+ }
123
+ },
124
+ "BrandingPalette": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "description": "Semantic colours for one theme side. An omitted key uses the maintained\ndefault for this side, never the other side's value.\n\nEvery value is a `BrandingColor`, which is where the accepted forms and the\nreason for them live; what each key paints is below.\n",
128
+ "properties": {
129
+ "primary": {
130
+ "$ref": "#/$defs/BrandingColor",
131
+ "description": "Brand colour, and the source the focus rings derive from."
132
+ },
133
+ "on_primary": {
134
+ "$ref": "#/$defs/BrandingColor",
135
+ "description": "Text and icons drawn on `primary`."
136
+ },
137
+ "background": {
138
+ "$ref": "#/$defs/BrandingColor",
139
+ "description": "The surface behind the card."
140
+ },
141
+ "surface": {
142
+ "$ref": "#/$defs/BrandingColor",
143
+ "description": "The card and popover surfaces."
144
+ },
145
+ "muted": {
146
+ "$ref": "#/$defs/BrandingColor",
147
+ "description": "Neutral fills — the secondary button, accents and muted panels."
148
+ },
149
+ "border": {
150
+ "$ref": "#/$defs/BrandingColor",
151
+ "description": "Card and control edges."
152
+ },
153
+ "text": {
154
+ "$ref": "#/$defs/BrandingColor",
155
+ "description": "Body text, and the foreground of every neutral surface — a side that\nsets `muted` without `text` keeps the default label colour on it.\n"
156
+ },
157
+ "text_muted": {
158
+ "$ref": "#/$defs/BrandingColor",
159
+ "description": "Secondary text."
160
+ },
161
+ "link": {
162
+ "$ref": "#/$defs/BrandingColor",
163
+ "description": "Link colour. Defaults to the surrounding text colour, so setting it\ntints exactly the links and nothing else.\n"
164
+ },
165
+ "success": {
166
+ "$ref": "#/$defs/BrandingColor",
167
+ "description": "Valid fields, success alerts and pills."
168
+ },
169
+ "warning": {
170
+ "$ref": "#/$defs/BrandingColor",
171
+ "description": "Warning surfaces. Persisted, but nothing renders it yet."
172
+ },
173
+ "error": {
174
+ "$ref": "#/$defs/BrandingColor",
175
+ "description": "Invalid fields, error alerts and pills."
176
+ }
177
+ }
178
+ },
179
+ "BrandingColor": {
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "maxLength": 128,
183
+ "description": "A colour on a theme side: hex (`#4F46E5`), a CSS colour name, or a colour\nfunction — `rgb()`, `rgba()`, `hsl()`, `hsla()`, `hwb()`, `lab()`, `lch()`,\n`oklab()`, `oklch()`, `color()` or `color-mix()`. `url()` and `var()` are\nrejected: the value is written into a stylesheet, so only forms that resolve\nto a colour are stored.\n\nThe pattern pins the shape — no semicolons, braces, comment markers or\nbackslashes, so a value cannot leave its declaration whatever it spells.\nWhich names CSS actually knows is the browser's business: an unrecognised\none is stored and paints nothing, rather than being refused here.\n",
184
+ "pattern": "^(?:#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|[a-zA-Z]{3,24}|[a-zA-Z][a-zA-Z-]{2,12}\\((?:[0-9a-zA-Z%.,+/# -]|[a-zA-Z][a-zA-Z-]{2,12}\\([0-9a-zA-Z%.,+/# -]*\\))*\\))$",
185
+ "examples": [
186
+ "#4F46E5",
187
+ "#fff",
188
+ "#4F46E5CC",
189
+ "rebeccapurple",
190
+ "currentColor",
191
+ "transparent",
192
+ "rgb(79 70 229)",
193
+ "rgba(79 70 229 / 50%)",
194
+ "oklch(0.7 0.15 250)",
195
+ "color-mix(in oklab, #4F46E5 40%, white)"
196
+ ]
197
+ },
198
+ "BrandingTypography": {
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "dependentRequired": { "font_url": ["font_family"] },
202
+ "description": "The typeface the login surface renders in. One face covers both body and\nheadings; separate heading and mono faces are not modelled yet.\n",
203
+ "properties": {
204
+ "font_family": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "maxLength": 256,
208
+ "pattern": "^ *(?:\"[^\"\\\\;{}]*\"|'[^'\\\\;{}]*'|[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*)(?: *, *(?:\"[^\"\\\\;{}]*\"|'[^'\\\\;{}]*'|[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*))* *$",
209
+ "description": "CSS font stack for body and heading text. Include a generic family so\nthe surface still renders when the named face is unavailable.\n\nComma-separated family names, each either an identifier (`Inter`,\n`ui-sans-serif`, `Helvetica Neue`) or a quoted name (`\"APK Futural\"`).\nAnything else is rejected — the stack is written into a stylesheet, so\nonly names are stored, and a quoted name must close the quote it opened.\n",
210
+ "examples": ["Inter, ui-sans-serif, sans-serif"]
211
+ },
212
+ "font_url": {
213
+ "type": "string",
214
+ "format": "uri",
215
+ "maxLength": 2048,
216
+ "description": "Stylesheet that loads `font_family` — a Google Fonts CSS URL, for\nexample. Must be https; unlike the logo and hero assets there is no\nloopback carve-out. Rejected without `font_family`, which would name\nnothing to paint with.\n\nStored but not applied to an embedded widget: the embedding page loads\nthe face, and Zitadel does not inject a stylesheet into a document it\ndoes not own.\n",
217
+ "pattern": "^[hH][tT][tT][pP][sS]://(?:\\[[0-9A-Fa-f:.]+\\]|[^/:?#@]+)(?::0*(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:[/?#]|$)",
218
+ "examples": ["https://fonts.googleapis.com/css2?family=Inter&display=swap"]
219
+ },
220
+ "scale": {
221
+ "type": "number",
222
+ "minimum": .75,
223
+ "maximum": 1.25,
224
+ "description": "Multiplier on the base text sizes, `1` when omitted.",
225
+ "examples": [1]
226
+ }
227
+ }
228
+ },
229
+ "BrandingShape": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "description": "Corner rounding, spacing and logo size. Shared across theme sides.\n",
233
+ "properties": {
234
+ "radius": {
235
+ "description": "Corner rounding for the card, inputs, buttons and alerts — either a\npreset name or an integer number of pixels. One value scales the whole\ncorner ramp in proportion, so the card stays rounder than the controls\ninside it.\n",
236
+ "oneOf": [{ "$ref": "#/$defs/BrandingRadiusPreset" }, {
237
+ "type": "integer",
238
+ "minimum": 0,
239
+ "maximum": 32
240
+ }],
241
+ "examples": [10]
242
+ },
243
+ "density": {
244
+ "type": "string",
245
+ "enum": [
246
+ "compact",
247
+ "regular",
248
+ "comfortable"
249
+ ],
250
+ "description": "Spacing and control height.",
251
+ "examples": ["regular"]
252
+ },
253
+ "logo_scale": {
254
+ "type": "number",
255
+ "minimum": .5,
256
+ "maximum": 2,
257
+ "description": "Multiplier on the logo's maximum height, `1` when omitted. The image keeps its intrinsic\naspect ratio inside that cap; no width, height or ratio is stored.\n",
258
+ "examples": [1]
259
+ }
260
+ }
261
+ },
262
+ "BrandingRadiusPreset": {
263
+ "type": "string",
264
+ "enum": [
265
+ "none",
266
+ "sm",
267
+ "md",
268
+ "lg",
269
+ "full"
270
+ ],
271
+ "description": "A named corner rounding: `none` (0), `sm` (4), `md` (8), `lg` (12), and\n`full` (pill). Send `full` for a pill rather than a large pixel value.\n",
272
+ "examples": ["md"]
273
+ }
274
+ }
275
+ };
276
+ //#endregion
277
+ //#region meta-schemas/flow-definition.json
278
+ var flow_definition_default = {
279
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
280
+ $schema: "https://json-schema.org/draft/2020-12/schema",
281
+ title: "FlowDefinition",
282
+ type: "object",
283
+ required: [
284
+ "name",
285
+ "status",
286
+ "user_schema",
287
+ "purposes",
288
+ "steps"
289
+ ],
290
+ description: "A flow definition is the server-side configuration that describes a complete\nauthentication or identity flow. It is NOT sent to the frontend — the flow\nengine evaluates it and produces FlowResponse payloads (steps with capability\ndictionaries) for the client.\n\nFlow definitions are created by administrators and stored in the project/team\nconfiguration hierarchy. The engine selects the matching definition based on\nthe purpose + audience when a flow is created via POST /flow.\n",
291
+ additionalProperties: false,
292
+ properties: {
293
+ "$schema": {
294
+ "type": "string",
295
+ "description": "Editor affordance: path or URL of this file's JSON meta-schema, so an\neditor validates and autocompletes it. The CLI strips it before upload;\nthe platform ignores it.\n"
296
+ },
297
+ "name": {
298
+ "type": "string",
299
+ "pattern": "^[a-z][a-z0-9-]*$",
300
+ "examples": ["standard-login", "combined-auth"],
301
+ "description": "Stable identifier for this flow, used as the target of cross-flow\n`switch` and `pivot` transitions. Every revision of a flow shares its\n`name`; publishing a definition under an existing `name` adds a\nrevision to that flow. Renaming is not supported — the `name` is part\nof the public contract another definition may reference. Acts as the\nhuman display label as well; no separate slug.\n"
302
+ },
303
+ "status": { "$ref": "#/$defs/FlowDefinitionStatus" },
304
+ "user_schema": {
305
+ "type": "string",
306
+ "description": "Server-assigned identifier of the user schema this flow operates on,\nas returned by `POST /schemas`. Opaque to the client — the shape is a\nserver implementation detail. Step `fields` reference properties\ndefined in the resolved schema; the engine resolves field types, validation, and\nimplicit outcomes from schema annotations at runtime.\n",
307
+ "examples": ["sch_01KWHF18816ZQESRCS7Z2STJ05"]
308
+ },
309
+ "purposes": {
310
+ "type": "object",
311
+ "description": "Maps each purpose this definition handles to its entry-point step.\nKeys are purpose names; values must match a `name` in `steps`. A\ndefinition can serve multiple purposes (e.g. a combined login/register\nflow) by listing one entry per purpose.\n",
312
+ "minProperties": 1,
313
+ "propertyNames": {
314
+ "type": "string",
315
+ "enum": [
316
+ "login",
317
+ "register",
318
+ "recovery",
319
+ "profiling",
320
+ "reauth",
321
+ "link_account"
322
+ ]
323
+ },
324
+ "additionalProperties": { "type": "string" },
325
+ "examples": [{ "login": "identify" }]
326
+ },
327
+ "audience": {
328
+ "$ref": "#/$defs/FlowAudience",
329
+ "examples": [{ "app_ids": ["app_saas"] }]
330
+ },
331
+ "steps": {
332
+ "type": "array",
333
+ "items": { "$ref": "#/$defs/FlowDefinitionStep" },
334
+ "minItems": 1,
335
+ "description": "Ordered list of steps in this flow. The order is for human readability —\nactual step sequencing is determined by transitions.\n",
336
+ "examples": [[
337
+ {
338
+ "name": "identify",
339
+ "fields": ["email"],
340
+ "actions": [{
341
+ "name": "submit",
342
+ "kind": "submit",
343
+ "primary": true
344
+ }],
345
+ "transitions": {
346
+ "submit": { "target": "authenticate" },
347
+ "user_not_found": {
348
+ "target": "register",
349
+ "action": "switch"
350
+ }
351
+ }
352
+ },
353
+ {
354
+ "name": "authenticate",
355
+ "fields": ["password"],
356
+ "actions": [{
357
+ "name": "submit",
358
+ "kind": "submit",
359
+ "primary": true
360
+ }],
361
+ "transitions": { "submit": { "target": "done" } }
362
+ },
363
+ {
364
+ "name": "done",
365
+ "complete": "redirect"
366
+ }
367
+ ]]
368
+ }
369
+ },
370
+ $defs: {
371
+ "FlowDefinitionStatus": {
372
+ "type": "string",
373
+ "enum": ["active", "draft"],
374
+ "description": "The lifecycle state of this flow definition. \n\nactive: The flow definition is ready to be used. The flow engine can select it for new flows.\ndraft: The engine will not select it for new flows, and existing flows must handle it gracefully if they reference this definition.\n\nA revision's status is fixed at creation. Publish a new revision to change it.\n"
375
+ },
376
+ "FlowAudience": {
377
+ "type": "object",
378
+ "additionalProperties": false,
379
+ "description": "Scopes which teams or apps this flow definition applies to. Empty or\nomitted fields mean \"no restriction\"; when both are empty the definition\nmatches every request in the project. The engine picks the most specific\nmatching definition: app > team > project-wide.\n",
380
+ "properties": {
381
+ "team_ids": {
382
+ "type": "array",
383
+ "items": { "type": "string" },
384
+ "description": "Restrict to specific teams (organizations). Empty means no team restriction.",
385
+ "uniqueItems": true,
386
+ "examples": [["team_acme"]]
387
+ },
388
+ "app_ids": {
389
+ "type": "array",
390
+ "items": { "type": "string" },
391
+ "description": "Restrict to specific applications. Empty means no app restriction.",
392
+ "uniqueItems": true,
393
+ "examples": [["app_saas"]]
394
+ }
395
+ }
396
+ },
397
+ "FlowDefinitionStep": {
398
+ "type": "object",
399
+ "required": ["name"],
400
+ "additionalProperties": false,
401
+ "not": { "anyOf": [
402
+ {
403
+ "required": ["sso_providers"],
404
+ "properties": { "sso_providers": { "minItems": 1 } },
405
+ "anyOf": [{ "not": { "required": ["transitions"] } }, { "properties": { "transitions": { "not": { "required": ["callback"] } } } }]
406
+ },
407
+ {
408
+ "required": ["complete"],
409
+ "anyOf": [
410
+ {
411
+ "required": ["fields"],
412
+ "properties": { "fields": { "minItems": 1 } }
413
+ },
414
+ {
415
+ "required": ["actions"],
416
+ "properties": { "actions": { "minItems": 1 } }
417
+ },
418
+ {
419
+ "required": ["sso_providers"],
420
+ "properties": { "sso_providers": { "minItems": 1 } }
421
+ },
422
+ {
423
+ "required": ["gates"],
424
+ "properties": { "gates": { "minProperties": 1 } }
425
+ },
426
+ {
427
+ "required": ["transitions"],
428
+ "properties": { "transitions": { "minProperties": 1 } }
429
+ }
430
+ ]
431
+ },
432
+ {
433
+ "not": { "required": ["complete"] },
434
+ "properties": {
435
+ "fields": { "maxItems": 0 },
436
+ "actions": { "maxItems": 0 },
437
+ "sso_providers": { "maxItems": 0 },
438
+ "gates": { "maxProperties": 0 },
439
+ "transitions": { "not": { "required": ["callback"] } }
440
+ }
441
+ }
442
+ ] },
443
+ "description": "A step in a flow definition. This is the admin-authored configuration,\nnot the runtime payload sent to the frontend.\n\nSteps are schema-driven: `fields` references properties from the flow's\nuser schema, and the engine resolves field metadata (type, validation,\nimplicit outcomes) from schema annotations at runtime.\n\nA step with only `complete` set is a terminal step. All other steps are\nrendered to the frontend as capability payloads.\n",
444
+ "properties": {
445
+ "name": {
446
+ "type": "string",
447
+ "description": "Unique step identifier within this flow. Used as transition targets\nand returned in the API response as `step.name`.\n",
448
+ "pattern": "^[a-z][a-z0-9_-]*$",
449
+ "examples": ["login"]
450
+ },
451
+ "fields": {
452
+ "type": "array",
453
+ "description": "Schema property names to collect from the user. Each entry references\na property in the flow's user schema. The engine resolves field type,\nvalidation rules, and implicit outcomes from schema annotations\n(e.g. a property with `x-unique` set implies a `user_not_found`\ntransition outcome).\n",
454
+ "items": { "type": "string" },
455
+ "uniqueItems": true,
456
+ "default": [],
457
+ "examples": [["email", "password"]]
458
+ },
459
+ "actions": {
460
+ "type": "array",
461
+ "description": "Ordered list of actions the user can take. The action name is what the\nfrontend sends back in the submit request. If omitted, the engine\nprovides a default `submit` action.\n",
462
+ "items": { "$ref": "#/$defs/StepAction" },
463
+ "default": [],
464
+ "examples": [[{
465
+ "name": "submit",
466
+ "kind": "submit",
467
+ "primary": true
468
+ }, {
469
+ "name": "forgot_password",
470
+ "kind": "navigate"
471
+ }]]
472
+ },
473
+ "gates": {
474
+ "type": "object",
475
+ "description": "Security gates that must be satisfied before submission. Keyed by gate\nname. Each gate selects a kind (e.g. \"captcha\") and provider-specific\nconfiguration. The engine may also inject gates dynamically based on\npolicy.\n",
476
+ "additionalProperties": { "$ref": "#/$defs/Gate" },
477
+ "default": {},
478
+ "examples": [{ "bot_check": {
479
+ "kind": "captcha",
480
+ "provider": "altcha"
481
+ } }]
482
+ },
483
+ "sso_providers": {
484
+ "type": "array",
485
+ "description": "Slugs of the identity provider connections this step offers, in display\norder. Each names the `slug` of a connection under `.zitadel/idps/`; the\nconnection carries the display name and template, so a rename there\nreaches every step without editing the flow. The rendered step the client\nreceives carries the resolved `{id, name, template}` objects instead.\n",
486
+ "uniqueItems": true,
487
+ "items": {
488
+ "type": "string",
489
+ "pattern": "^[a-z0-9][a-z0-9_-]*$",
490
+ "maxLength": 64
491
+ },
492
+ "default": [],
493
+ "examples": [["google"]]
494
+ },
495
+ "on_success": {
496
+ "type": "string",
497
+ "enum": ["create_user"],
498
+ "description": "Server-side mutation to execute when this step completes successfully.\nRuns after field validation passes, before the transition fires.\n\n- create_user: creates the user record (registration flows)\n",
499
+ "examples": ["create_user"]
500
+ },
501
+ "complete": {
502
+ "type": "string",
503
+ "enum": ["redirect", "show"],
504
+ "description": "Marks this as a terminal step. Tells the frontend what to do:\n- redirect: navigate to redirect_uri (OIDC/SAML callback done)\n- show: render as a success/info screen\n",
505
+ "examples": ["redirect"]
506
+ },
507
+ "transitions": {
508
+ "type": "object",
509
+ "description": "Maps action/outcome names to their transition descriptor.\n\nKeys match action names from the `actions` array. Additional keys\ncome from implicit outcomes based on schema annotations\n(e.g. `user_not_found` from `x-unique` fields) and engine\nevents (e.g. `sso`, `callback`).\n",
510
+ "additionalProperties": {
511
+ "type": "object",
512
+ "required": ["target"],
513
+ "properties": {
514
+ "target": {
515
+ "type": "string",
516
+ "description": "Step name within this flow (when `action` is null), or the name\nof another flow (when `action` is `switch` or `pivot`).\n",
517
+ "examples": ["password"]
518
+ },
519
+ "action": {
520
+ "oneOf": [{
521
+ "type": "string",
522
+ "enum": ["switch", "pivot"]
523
+ }, { "type": "null" }],
524
+ "description": "How to interpret `target`:\n- null (omitted): transition to a step in the current flow.\n- switch: replace the current flow with the target flow.\n No return — the current flow is discarded.\n Example: login ↔ register.\n- pivot: push the target flow onto the stack. The current flow\n is paused and resumes when the target flow completes (auto-pop).\n Example: login → recovery → back to login.\n"
525
+ },
526
+ "purpose": {
527
+ "oneOf": [{
528
+ "type": "string",
529
+ "enum": [
530
+ "login",
531
+ "register",
532
+ "recovery",
533
+ "profiling",
534
+ "reauth",
535
+ "link_account"
536
+ ]
537
+ }, { "type": "null" }],
538
+ "description": "Local re-purposing. When set, taking this transition changes the\nflow's current purpose to this value — the dispatch mode a step's\nchallenges run under — while the flow's original purpose stays\npinned. Must be a purpose this definition serves, and `target`\nmust be that purpose's entry step. Mutually exclusive with\n`action`: a transition either re-purposes within this flow or\ntargets another flow, never both.\nExample: a \"Sign up\" navigation on the login identifier step\n(`{ target: register, purpose: register }`).\n"
539
+ }
540
+ },
541
+ "additionalProperties": false,
542
+ "not": {
543
+ "required": ["purpose", "action"],
544
+ "properties": {
545
+ "purpose": { "type": "string" },
546
+ "action": { "type": "string" }
547
+ }
548
+ }
549
+ },
550
+ "examples": [{
551
+ "submit": { "target": "password" },
552
+ "recover": {
553
+ "target": "recovery",
554
+ "action": "pivot"
555
+ },
556
+ "register": {
557
+ "target": "register",
558
+ "action": "switch"
559
+ }
560
+ }]
561
+ }
562
+ }
563
+ },
564
+ "StepAction": {
565
+ "type": "object",
566
+ "required": ["name", "kind"],
567
+ "additionalProperties": false,
568
+ "description": "An action a flow author declares on a step of a flow definition. The\n`name` is sent back in the submit request as `action`; the engine resolves\nthe action's declared `kind` to decide how to handle the submission.\n",
569
+ "properties": {
570
+ "name": {
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "description": "Action identifier. Sent back in the submit request as `action`.",
574
+ "examples": ["submit"]
575
+ },
576
+ "kind": {
577
+ "type": "string",
578
+ "enum": [
579
+ "submit",
580
+ "passkey",
581
+ "passkey_register",
582
+ "navigate"
583
+ ],
584
+ "description": "Classifies how the engine handles this action. `back` is not declarable:\nthe engine injects it into runtime steps (see `flow-step-action.yaml`)\nwhenever going back is available.\n- `submit`: collect the step's fields and run validate/dispatch/on_success.\n- `passkey`: issue a WebAuthn assertion challenge; the matching transition\n fires once the returned assertion verifies.\n- `passkey_register`: issue a WebAuthn registration challenge; the matching\n transition fires once the returned attestation verifies.\n- `navigate`: route through the transition without running the input\n pipeline. Used for pure-routing actions declared in the flow definition.\n",
585
+ "examples": ["submit"]
586
+ },
587
+ "primary": {
588
+ "type": "boolean",
589
+ "default": false,
590
+ "description": "Marks this as the default/primary action. The runtime template uses\nthis hint to choose visual emphasis. At most one action per step\nshould be primary; this is not enforced here.\n",
591
+ "examples": [true]
592
+ },
593
+ "text_key": {
594
+ "type": "string",
595
+ "description": "Optional localization key override for the action's label. When\nomitted, the engine derives a key from the step and action names.\nDisplay text is resolved client-side from a locale dictionary, never\nby the engine.\n",
596
+ "examples": ["actions.signin.submit"]
597
+ }
598
+ }
599
+ },
600
+ "Gate": {
601
+ "type": "object",
602
+ "additionalProperties": false,
603
+ "required": ["kind", "provider"],
604
+ "description": "A security challenge that must be satisfied before this step's submission\nis accepted. The engine may also inject gates at runtime based on policy\nor risk evaluation.\n",
605
+ "properties": {
606
+ "kind": {
607
+ "type": "string",
608
+ "enum": ["captcha"],
609
+ "description": "The gate category. Only `captcha` is currently defined. Authenticator\nceremonies (e.g. passkey) are modelled as credential auth_attempts via\n`x-credential` on a field, not as gates.\n",
610
+ "examples": ["captcha"]
611
+ },
612
+ "provider": {
613
+ "type": "string",
614
+ "description": "Provider identifier within the gate kind — e.g. `altcha`, `turnstile`,\n`hcaptcha`. The engine looks up an implementation in its provider\nregistry.\n",
615
+ "examples": ["altcha"]
616
+ },
617
+ "config": {
618
+ "type": "object",
619
+ "description": "Provider-specific configuration consumed by the implementation when\nissuing the per-render challenge. Opaque to the engine.\n",
620
+ "additionalProperties": true,
621
+ "examples": [{ "site_key": "0x4AAAAAAA-example-site-key" }]
622
+ }
623
+ }
624
+ }
625
+ }
626
+ };
627
+ //#endregion
628
+ //#region meta-schemas/idp-connection.json
629
+ var idp_connection_default = {
630
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
631
+ $schema: "https://json-schema.org/draft/2020-12/schema",
632
+ title: "IdentityProviderConnection",
633
+ type: "object",
634
+ required: [
635
+ "slug",
636
+ "protocol",
637
+ "display_name"
638
+ ],
639
+ additionalProperties: false,
640
+ properties: {
641
+ "$schema": {
642
+ "type": "string",
643
+ "minLength": 1,
644
+ "description": "Editor affordance: path or URL of this schema so editors validate and autocomplete the file (scaffolded connection files point at `.zitadel/meta/idp-connection.json`). Ignored by the platform."
645
+ },
646
+ "slug": {
647
+ "type": "string",
648
+ "pattern": "^[a-z0-9][a-z0-9_-]*$",
649
+ "maxLength": 64,
650
+ "description": "Stable identifier, referenced by user schemas (x-auth-methods.sso.providers) and flow steps (sso_providers). Unique within the Project.",
651
+ "examples": [
652
+ "google",
653
+ "github",
654
+ "corp_idp"
655
+ ]
656
+ },
657
+ "protocol": {
658
+ "type": "string",
659
+ "enum": ["oidc", "oauth2"],
660
+ "description": "The protocol used by the identity provider."
661
+ },
662
+ "template": {
663
+ "type": "string",
664
+ "examples": [
665
+ "google",
666
+ "github",
667
+ "okta"
668
+ ],
669
+ "description": "Template hint for rendering the provider (logo, colors). Carries no protocol behavior: conduct comes only from the protocol blocks."
670
+ },
671
+ "display_name": {
672
+ "type": "string",
673
+ "minLength": 1,
674
+ "maxLength": 256,
675
+ "description": "Shown to the user on the sign-in button."
676
+ },
677
+ "subject_claim": {
678
+ "type": "string",
679
+ "minLength": 1,
680
+ "description": "Claim carrying the provider's stable subject identifier. Optional for OIDC (the engine uses `sub` per spec; override where `sub` is pairwise, e.g. Entra `oid`). Required for OAuth2 — no `sub` guarantee."
681
+ },
682
+ "claim_mapping": {
683
+ "type": "object",
684
+ "additionalProperties": {
685
+ "type": "string",
686
+ "pattern": "^[^$]"
687
+ },
688
+ "description": "Maps user-schema property names (keys) to provider claim names (values). A value is an exact top-level claim key: no path syntax, and a dot is part of the key, so nested claims (OIDC `address`, GitHub `plan`) are not addressable yet. `$`-prefixed strings and non-string values are reserved for future mapping forms. Add properties defined in the user schemas; unmatched entries are ignored."
689
+ },
690
+ "verified_claims": {
691
+ "type": "object",
692
+ "additionalProperties": { "anyOf": [
693
+ { "const": true },
694
+ { "const": "$supplementary_fetch" },
695
+ {
696
+ "type": "string",
697
+ "pattern": "^[^$]"
698
+ }
699
+ ] },
700
+ "description": "Maps a verifiable user-schema property to its verification source: a claim name (read the claim), the literal `true` (trust this provider unconditionally), or the `$`-pointer `\"$supplementary_fetch\"` (verified by the selected supplementary_fetch strategy per its contract - e.g. github_primary_email verifies `email` via primary && verified). Values starting with `$` are reserved; only `$supplementary_fetch` is defined. Distinct from claim_mapping, which carries values, not verification state.",
701
+ "examples": [
702
+ { "email": "email_verified" },
703
+ { "email": true },
704
+ { "email": "$supplementary_fetch" }
705
+ ]
706
+ },
707
+ "provisioning": {
708
+ "type": "object",
709
+ "additionalProperties": false,
710
+ "description": "How far this provider's data is trusted. `creation` defines what happens to a subject that has no account yet. With `disabled`, a user is not created. With `auto`, the user is created without a collection step when the mapped claims fill every required property of the schema. A required property with an `x-unique` scope must also arrive verified according to `verified_claims`. When a required property is missing or such a property is unverified, the collection step is shown instead, prefilled with the claims. Gating on other properties will be added when `x-verify` returns to the dialect. The following are deferred and will be added as additive changes. The `auto_only` value creates the user from complete claims or fails without collecting. The linking policy (`is_linking_allowed`, `auto_linking`), together with the account-linking journey. `is_auto_update`, together with per-property verification state.",
711
+ "properties": { "creation": {
712
+ "type": "string",
713
+ "enum": ["disabled", "auto"],
714
+ "default": "auto"
715
+ } }
716
+ },
717
+ "oidc": {
718
+ "type": "object",
719
+ "additionalProperties": false,
720
+ "description": "OIDC connection details. Endpoints come from discovery, but any may be supplied to override it, or to serve a provider that exposes no .well-known document.",
721
+ "required": [
722
+ "issuer",
723
+ "client_id",
724
+ "client_secret",
725
+ "scopes"
726
+ ],
727
+ "properties": {
728
+ "issuer": {
729
+ "type": "string",
730
+ "format": "uri",
731
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)(/[^\\s?#]*)?$",
732
+ "description": "Discovery base. Endpoints are resolved from its .well-known document unless overridden below."
733
+ },
734
+ "jwks_uri": {
735
+ "type": "string",
736
+ "format": "uri",
737
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
738
+ "description": "Overrides the JWKS endpoint from discovery. Required in practice when the provider exposes no .well-known document, since ID tokens cannot otherwise be validated."
739
+ },
740
+ "id_token_mapping": {
741
+ "type": "boolean",
742
+ "default": false,
743
+ "description": "Read user claims from the id_token instead of the userinfo endpoint, for providers that populate only the former."
744
+ },
745
+ "authorization_endpoint": {
746
+ "type": "string",
747
+ "format": "uri",
748
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
749
+ "description": "Overrides discovery."
750
+ },
751
+ "token_endpoint": {
752
+ "type": "string",
753
+ "format": "uri",
754
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
755
+ "description": "Overrides discovery."
756
+ },
757
+ "userinfo_endpoint": {
758
+ "type": "string",
759
+ "format": "uri",
760
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
761
+ "description": "Overrides discovery."
762
+ },
763
+ "client_id": {
764
+ "type": "string",
765
+ "minLength": 1,
766
+ "maxLength": 512,
767
+ "description": "Either a literal in case the same client is used in all environments, or a `${{ NAME }}` reference to a variable in case of separate clients per environment."
768
+ },
769
+ "client_secret": {
770
+ "type": "string",
771
+ "pattern": "^\\$\\{\\{ *[A-Za-z0-9_]+ *\\}\\}$",
772
+ "description": "A reference to the variable holding the client secret, never the secret itself. A secret may only be referenced as the entire value: text around the placeholder would be rendered into the resolved credential, so it is rejected. The engine resolves it against the environment serving the request."
773
+ },
774
+ "token_endpoint_auth_method": {
775
+ "type": "string",
776
+ "enum": ["client_secret_basic", "client_secret_post"],
777
+ "default": "client_secret_basic",
778
+ "description": "How the client authenticates at the token endpoint."
779
+ },
780
+ "scopes": {
781
+ "type": "array",
782
+ "items": {
783
+ "type": "string",
784
+ "minLength": 1
785
+ },
786
+ "uniqueItems": true,
787
+ "minItems": 1,
788
+ "contains": { "const": "openid" },
789
+ "default": [
790
+ "openid",
791
+ "profile",
792
+ "email"
793
+ ],
794
+ "description": "Must contain `openid` - without it the provider returns no id_token and the connection is not OIDC. Enforced by `required` + `contains`; the `default` is a UI-prefill hint only - validators never inject it, so an omitted `scopes` is rejected regardless."
795
+ },
796
+ "pkce_enabled": {
797
+ "type": "boolean",
798
+ "default": true,
799
+ "description": "Send PKCE (code_challenge/code_verifier). Providers that do not support PKCE typically ignore the parameters, so `true` is safe and future-proofs; set `false` only for a provider whose token endpoint rejects them."
800
+ },
801
+ "static_authorize_parameters": {
802
+ "type": "object",
803
+ "propertyNames": {
804
+ "minLength": 1,
805
+ "not": { "enum": [
806
+ "client_id",
807
+ "redirect_uri",
808
+ "response_type",
809
+ "scope",
810
+ "state",
811
+ "nonce",
812
+ "code_challenge",
813
+ "code_challenge_method",
814
+ "response_mode",
815
+ "request",
816
+ "request_uri",
817
+ "client_secret",
818
+ "client_assertion"
819
+ ] }
820
+ },
821
+ "additionalProperties": { "type": "string" },
822
+ "description": "Extra provider-specific authorize parameters (for example `prompt`). Engine-owned protocol parameters are reserved and rejected by `propertyNames`: the engine composes them itself, and an override of `state` or `nonce` would silently defeat CSRF and token binding. `client_secret` and `client_assertion` are rejected as they could be appended to the public authorize URL."
823
+ }
824
+ }
825
+ },
826
+ "oauth2": {
827
+ "type": "object",
828
+ "additionalProperties": false,
829
+ "description": "OAuth 2.0 connection details.",
830
+ "required": [
831
+ "authorization_endpoint",
832
+ "token_endpoint",
833
+ "userinfo_endpoint",
834
+ "client_id",
835
+ "client_secret"
836
+ ],
837
+ "properties": {
838
+ "authorization_endpoint": {
839
+ "type": "string",
840
+ "format": "uri",
841
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
842
+ "description": "Where the user is sent to authorize."
843
+ },
844
+ "token_endpoint": {
845
+ "type": "string",
846
+ "format": "uri",
847
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
848
+ "description": "Where the authorization code is exchanged."
849
+ },
850
+ "userinfo_endpoint": {
851
+ "type": "string",
852
+ "format": "uri",
853
+ "pattern": "^(https://[^\\s/?#]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]+)?)([/?][^\\s#]*)?$",
854
+ "description": "Where the authenticated user's profile is fetched."
855
+ },
856
+ "client_id": {
857
+ "type": "string",
858
+ "minLength": 1,
859
+ "maxLength": 512,
860
+ "description": "Either a literal in case the same client is used in all environments, or a `${{ NAME }}` reference to a variable in case of separate clients per environment."
861
+ },
862
+ "client_secret": {
863
+ "type": "string",
864
+ "pattern": "^\\$\\{\\{ *[A-Za-z0-9_]+ *\\}\\}$",
865
+ "description": "A reference to the variable holding the client secret, never the secret itself. A secret may only be referenced as the entire value: text around the placeholder would be rendered into the resolved credential, so it is rejected. The engine resolves it against the environment serving the request."
866
+ },
867
+ "token_endpoint_auth_method": {
868
+ "type": "string",
869
+ "enum": ["client_secret_basic", "client_secret_post"],
870
+ "default": "client_secret_basic",
871
+ "description": "How the client authenticates at the token endpoint."
872
+ },
873
+ "scopes": {
874
+ "type": "array",
875
+ "items": {
876
+ "type": "string",
877
+ "minLength": 1
878
+ },
879
+ "uniqueItems": true,
880
+ "description": "Provider-specific; OAuth 2.0 defines no universal scope."
881
+ },
882
+ "pkce_enabled": {
883
+ "type": "boolean",
884
+ "default": true,
885
+ "description": "Send PKCE (code_challenge/code_verifier). Providers that do not support PKCE typically ignore the parameters, so `true` is safe and future-proofs; set `false` only for a provider whose token endpoint rejects them."
886
+ },
887
+ "static_authorize_parameters": {
888
+ "type": "object",
889
+ "propertyNames": {
890
+ "minLength": 1,
891
+ "not": { "enum": [
892
+ "client_id",
893
+ "redirect_uri",
894
+ "response_type",
895
+ "scope",
896
+ "state",
897
+ "nonce",
898
+ "code_challenge",
899
+ "code_challenge_method",
900
+ "response_mode",
901
+ "request",
902
+ "request_uri",
903
+ "client_secret",
904
+ "client_assertion"
905
+ ] }
906
+ },
907
+ "additionalProperties": { "type": "string" },
908
+ "description": "Extra provider-specific authorize parameters (for example `prompt`). Engine-owned protocol parameters are reserved and rejected by `propertyNames`: the engine composes them itself, and an override of `state` or `nonce` would silently defeat CSRF and token binding. `client_secret` and `client_assertion` are rejected as they could be appended to the public authorize URL."
909
+ },
910
+ "supplementary_fetch": {
911
+ "type": "string",
912
+ "enum": ["github_primary_email"],
913
+ "description": "Provider-specific follow-up call after userinfo. New values are non-breaking."
914
+ }
915
+ },
916
+ "allOf": [{
917
+ "if": {
918
+ "properties": { "supplementary_fetch": { "const": "github_primary_email" } },
919
+ "required": ["supplementary_fetch"]
920
+ },
921
+ "then": {
922
+ "required": ["scopes"],
923
+ "properties": { "scopes": { "contains": { "const": "user:email" } } }
924
+ }
925
+ }]
926
+ }
927
+ },
928
+ allOf: [{
929
+ "if": {
930
+ "properties": { "protocol": { "const": "oidc" } },
931
+ "required": ["protocol"]
932
+ },
933
+ "then": {
934
+ "required": ["oidc"],
935
+ "properties": { "oauth2": false }
936
+ }
937
+ }, {
938
+ "if": {
939
+ "properties": { "protocol": { "const": "oauth2" } },
940
+ "required": ["protocol"]
941
+ },
942
+ "then": {
943
+ "required": ["oauth2", "subject_claim"],
944
+ "properties": { "oidc": false }
945
+ }
946
+ }]
947
+ };
948
+ //#endregion
949
+ //#region meta-schemas/property-name.json
950
+ var property_name_default = {
951
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
952
+ $schema: "https://json-schema.org/draft/2020-12/schema",
953
+ title: "PropertyName",
954
+ type: "string",
955
+ pattern: "^[^.]+$",
956
+ description: "The name of a single user attribute."
957
+ };
958
+ //#endregion
959
+ //#region meta-schemas/sso-auth-method.json
960
+ var sso_auth_method_default = {
961
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
962
+ $schema: "https://json-schema.org/draft/2020-12/schema",
963
+ title: "SSOAuthMethod",
964
+ type: "object",
965
+ required: ["enabled"],
966
+ additionalProperties: false,
967
+ properties: {
968
+ "enabled": {
969
+ "type": "boolean",
970
+ "description": "Whether the authentication method is enabled or not"
971
+ },
972
+ "providers": {
973
+ "type": "array",
974
+ "minItems": 1,
975
+ "uniqueItems": true,
976
+ "items": {
977
+ "type": "string",
978
+ "pattern": "^[a-z0-9][a-z0-9_-]*$",
979
+ "maxLength": 64,
980
+ "examples": [
981
+ "google",
982
+ "github",
983
+ "corp_idp"
984
+ ]
985
+ },
986
+ "description": "Slugs of the Project-level identity provider connections available to users of this schema. Each entry must match the `slug` of a connection under `.zitadel/idps/`; a connection existing does not by itself make it available here."
987
+ }
988
+ },
989
+ "if": {
990
+ "properties": { "enabled": { "const": true } },
991
+ "required": ["enabled"]
992
+ },
993
+ then: { "required": ["providers"] },
994
+ "else": { "not": { "required": ["providers"] } }
995
+ };
996
+ //#endregion
997
+ //#region meta-schemas/user-property.json
998
+ var user_property_default = {
999
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
1000
+ $schema: "https://json-schema.org/draft/2020-12/schema",
1001
+ title: "UserProperty",
1002
+ type: "object",
1003
+ description: "The meta-schema one property of a customer's user schema is validated\nagainst. The generated `user-property.json` adds\n`allOf: [{$ref: draft-2020-12}]`, which cannot live here because code\ngenerators choke on it.\n\nNative JSON Schema keywords such as `type`, `format`, `title` and `writeOnly`\nare accepted without being listed below. `writeOnly: true` is reserved for a\nvalue that may be written but is never returned by the read API; nothing\nenforces it today, so responses still include write-only properties.\n",
1004
+ additionalProperties: true,
1005
+ properties: {
1006
+ "x-unique": {
1007
+ "oneOf": [{
1008
+ "type": "string",
1009
+ "enum": [
1010
+ "unspecified",
1011
+ "project",
1012
+ "team"
1013
+ ]
1014
+ }, { "type": "null" }],
1015
+ "description": "The level of uniqueness for this property, if applicable"
1016
+ },
1017
+ "x-claim": {
1018
+ "oneOf": [{ "type": "string" }, { "type": "null" }],
1019
+ "description": "The claim name for this property, if applicable"
1020
+ },
1021
+ "x-audit": {
1022
+ "type": "boolean",
1023
+ "default": false,
1024
+ "description": "Whether this property's value may appear in audit event payloads. Audit\npayloads are deny-by-default: a property without this annotation\ncontributes its key but never its value.\n"
1025
+ },
1026
+ "properties": {
1027
+ "type": "object",
1028
+ "description": "A map of additional properties for the user definition, where the key is\nthe property name and the value is the property schema.\n",
1029
+ "propertyNames": { "$ref": "property-name.json" },
1030
+ "additionalProperties": { "$ref": "user-property.json" }
1031
+ }
1032
+ },
1033
+ allOf: [{ "$ref": "https://json-schema.org/draft/2020-12/schema" }]
1034
+ };
1035
+ //#endregion
1036
+ //#region meta-schemas/user-schema.json
1037
+ var user_schema_default = {
1038
+ $comment: "Code generated by scripts/generate-meta-schemas.ts; DO NOT EDIT.",
1039
+ $schema: "https://json-schema.org/draft/2020-12/schema",
1040
+ title: "UserSchema",
1041
+ type: "object",
1042
+ description: "The meta-schema a customer's user schema document is validated against.\nThe generated `user-schema.json` adds `allOf: [{$ref: draft-2020-12}]`,\nwhich cannot live here because code generators choke on it.\n",
1043
+ required: [
1044
+ "metaSchema",
1045
+ "kind",
1046
+ "x-auth-methods"
1047
+ ],
1048
+ additionalProperties: true,
1049
+ properties: {
1050
+ "$schema": {
1051
+ "type": "string",
1052
+ "const": "https://json-schema.org/draft/2020-12/schema",
1053
+ "description": "The JSON Schema version used for this schema."
1054
+ },
1055
+ "objectType": {
1056
+ "type": "string",
1057
+ "maxLength": 256,
1058
+ "description": "The type of user this schema describes. This is a customer chosen name.\n",
1059
+ "examples": ["human-user"]
1060
+ },
1061
+ "kind": {
1062
+ "type": "string",
1063
+ "const": "user-schema",
1064
+ "description": "Discriminator value for a user schema create request."
1065
+ },
1066
+ "metaSchema": {
1067
+ "type": "string",
1068
+ "format": "uri",
1069
+ "maxLength": 1024,
1070
+ "description": "The user Schema version used for this schema."
1071
+ },
1072
+ "x-auth-methods": { "$ref": "auth-methods.json" },
1073
+ "x-identifier": {
1074
+ "type": "string",
1075
+ "minLength": 1,
1076
+ "description": "Path of the leaf property whose value identifies a user (nested leaves\nare addressed by their dot-joined attribute path). The property must\ncarry `x-unique` \"project\". Required when an auth method needing\nidentifier-first dispatch (password) is enabled. Passkey is exempt:\ndiscoverable credentials identify the user through the assertion\nitself, so passkey-only and API-managed schemas may designate nothing;\nflows using identifier-first passkey are validated at the flow level\ninstead.\n",
1077
+ "examples": ["email"]
1078
+ },
1079
+ "x-display": {
1080
+ "type": "array",
1081
+ "minItems": 1,
1082
+ "items": {
1083
+ "type": "string",
1084
+ "minLength": 1
1085
+ },
1086
+ "description": "Ordered leaf property paths whose values, joined with a space, render\nthe user's display name.\n"
1087
+ },
1088
+ "properties": {
1089
+ "type": "object",
1090
+ "description": "A map of additional properties for the user definition, where the\nkey is the property name and the value is the property schema\n",
1091
+ "propertyNames": { "$ref": "property-name.json" },
1092
+ "additionalProperties": { "$ref": "user-property.json" }
1093
+ }
1094
+ },
1095
+ allOf: [{ "$ref": "https://json-schema.org/draft/2020-12/schema" }]
1096
+ };
1097
+ //#endregion
1098
+ //#region src/meta-schemas.ts
1099
+ /**
1100
+ * The dialect meta-schemas `zitadel setup` copies into a project's
1101
+ * `.zitadel/meta/` so the flow/schema dialect is machine-readable offline:
1102
+ * editors validate flow files against `flow-definition.json` via a relative
1103
+ * `$schema` pointer, and agents read the dialect files before authoring
1104
+ * edits — no docs crawl, no hosted schema required.
1105
+ *
1106
+ * The files under `meta-schemas/` are generated: `scripts/sync-meta-schemas.mjs`
1107
+ * copies them from `api/openapi/endpoints/schemas/*.json` (the files the
1108
+ * server embeds) ahead of build, typecheck and test. Those are generated in
1109
+ * turn from the OpenAPI YAML by `scripts/generate-meta-schemas.ts` at the repo
1110
+ * root, so the YAML is the only thing to edit.
1111
+ */
1112
+ /** Project-relative directory setup writes the meta-schemas to. */
1113
+ const META_SCHEMA_DIR = ".zitadel/meta";
1114
+ /**
1115
+ * The `$schema` value scaffolded flow files carry, relative to
1116
+ * `.zitadel/flows/` — resolves to `{@link META_SCHEMA_DIR}/flow-definition.json`.
1117
+ */
1118
+ const FLOW_FILE_SCHEMA_REF = "../meta/flow-definition.json";
1119
+ /**
1120
+ * The `$schema` value scaffolded branding files carry, relative to
1121
+ * `.zitadel/branding/` — resolves to `{@link META_SCHEMA_DIR}/branding.json`.
1122
+ */
1123
+ const BRANDING_FILE_SCHEMA_REF = "../meta/branding.json";
1124
+ /**
1125
+ * The dialect files to materialize, in write order. `auth-methods.json`,
1126
+ * `auth-method.json`, and `sso-auth-method.json` are pulled in by
1127
+ * `user-schema.json`'s relative `$ref`s — without them the copied dialect
1128
+ * cannot resolve offline.
1129
+ */
1130
+ function metaSchemaFiles() {
1131
+ return [
1132
+ {
1133
+ name: "flow-definition.json",
1134
+ body: flow_definition_default
1135
+ },
1136
+ {
1137
+ name: "user-schema.json",
1138
+ body: user_schema_default
1139
+ },
1140
+ {
1141
+ name: "user-property.json",
1142
+ body: user_property_default
1143
+ },
1144
+ {
1145
+ name: "property-name.json",
1146
+ body: property_name_default
1147
+ },
1148
+ {
1149
+ name: "auth-methods.json",
1150
+ body: auth_methods_default
1151
+ },
1152
+ {
1153
+ name: "auth-method.json",
1154
+ body: auth_method_default
1155
+ },
1156
+ {
1157
+ name: "sso-auth-method.json",
1158
+ body: sso_auth_method_default
1159
+ },
1160
+ {
1161
+ name: "idp-connection.json",
1162
+ body: idp_connection_default
1163
+ },
1164
+ {
1165
+ name: "branding.json",
1166
+ body: branding_default
1167
+ }
1168
+ ];
1169
+ }
1170
+ //#endregion
1171
+ export { metaSchemaFiles as i, FLOW_FILE_SCHEMA_REF as n, META_SCHEMA_DIR as r, BRANDING_FILE_SCHEMA_REF as t };
1172
+
1173
+ //# sourceMappingURL=meta-schemas-OowgSUfU.mjs.map