@zitadel/config 0.1.0-alpha.17 → 0.1.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/defaults/README-branding.md +62 -0
  2. package/defaults/branding/centered/login.liquid +164 -0
  3. package/defaults/branding/hero/login.liquid +222 -0
  4. package/defaults/branding/minimal/login.liquid +154 -0
  5. package/defaults/branding/split/login.liquid +178 -0
  6. package/defaults/branding/split-right/login.liquid +178 -0
  7. package/defaults/default-human-user.json +0 -15
  8. package/defaults/default-login.json +1 -4
  9. package/defaults/presets/passkey-first/human-user.json +0 -15
  10. package/defaults/presets/passkey-first/login.json +1 -4
  11. package/dist/defaults-Bh4_xVbh.d.mts +84 -0
  12. package/dist/defaults-Bh4_xVbh.d.mts.map +1 -0
  13. package/dist/{defaults-BQej3KIY.mjs → defaults-CXTnFMHj.mjs} +193 -65
  14. package/dist/defaults-CXTnFMHj.mjs.map +1 -0
  15. package/dist/defaults.d.mts +2 -2
  16. package/dist/defaults.mjs +2 -2
  17. package/dist/index.d.mts +5 -4
  18. package/dist/index.mjs +5 -4
  19. package/dist/{meta-schemas-8nlyVL7g.mjs → meta-schemas-B4YiHAX_.mjs} +71 -3
  20. package/dist/meta-schemas-B4YiHAX_.mjs.map +1 -0
  21. package/dist/meta-schemas.d.mts +6 -1
  22. package/dist/meta-schemas.d.mts.map +1 -1
  23. package/dist/meta-schemas.mjs +2 -2
  24. package/dist/schemas.d.mts +14 -1
  25. package/dist/schemas.d.mts.map +1 -1
  26. package/dist/schemas.mjs +60 -2
  27. package/dist/schemas.mjs.map +1 -1
  28. package/dist/template.d.mts +76 -0
  29. package/dist/template.d.mts.map +1 -0
  30. package/dist/template.mjs +145 -0
  31. package/dist/template.mjs.map +1 -0
  32. package/meta-schemas/branding.json +52 -0
  33. package/meta-schemas/property-name.json +7 -0
  34. package/meta-schemas/user-property.json +6 -1
  35. package/meta-schemas/user-schema.json +4 -1
  36. package/package.json +12 -4
  37. package/dist/defaults-BQej3KIY.mjs.map +0 -1
  38. package/dist/defaults-CSjBjBkQ.d.mts +0 -41
  39. package/dist/defaults-CSjBjBkQ.d.mts.map +0 -1
  40. package/dist/meta-schemas-8nlyVL7g.mjs.map +0 -1
@@ -21,29 +21,12 @@ var default_human_user_default = {
21
21
  }
22
22
  },
23
23
  required: ["email"],
24
- properties: {
25
- "email": {
26
- "type": "string",
27
- "format": "email",
28
- "x-unique": "project",
29
- "description": "The user's email address."
30
- },
31
- "givenName": {
32
- "type": "string",
33
- "maxLength": 50,
34
- "description": "The user's given (first) name."
35
- },
36
- "familyName": {
37
- "type": "string",
38
- "maxLength": 50,
39
- "description": "The user's family (last) name."
40
- },
41
- "dateOfBirth": {
42
- "type": "string",
43
- "format": "date",
44
- "description": "The user's date of birth (ISO 8601, YYYY-MM-DD)."
45
- }
46
- }
24
+ properties: { "email": {
25
+ "type": "string",
26
+ "format": "email",
27
+ "x-unique": "project",
28
+ "description": "The user's email address."
29
+ } }
47
30
  };
48
31
  //#endregion
49
32
  //#region defaults/default-login.json
@@ -98,12 +81,7 @@ var default_login_default = {
98
81
  },
99
82
  {
100
83
  "name": "register",
101
- "fields": [
102
- "email",
103
- "givenName",
104
- "familyName",
105
- "dateOfBirth"
106
- ],
84
+ "fields": ["email"],
107
85
  "actions": [{
108
86
  "name": "submit",
109
87
  "kind": "submit",
@@ -164,29 +142,12 @@ var human_user_default = {
164
142
  }
165
143
  },
166
144
  required: ["email"],
167
- properties: {
168
- "email": {
169
- "type": "string",
170
- "format": "email",
171
- "x-unique": "project",
172
- "description": "The user's email address."
173
- },
174
- "givenName": {
175
- "type": "string",
176
- "maxLength": 50,
177
- "description": "The user's given (first) name."
178
- },
179
- "familyName": {
180
- "type": "string",
181
- "maxLength": 50,
182
- "description": "The user's family (last) name."
183
- },
184
- "dateOfBirth": {
185
- "type": "string",
186
- "format": "date",
187
- "description": "The user's date of birth (ISO 8601, YYYY-MM-DD)."
188
- }
189
- }
145
+ properties: { "email": {
146
+ "type": "string",
147
+ "format": "email",
148
+ "x-unique": "project",
149
+ "description": "The user's email address."
150
+ } }
190
151
  };
191
152
  //#endregion
192
153
  //#region defaults/presets/passkey-first/login.json
@@ -261,12 +222,7 @@ var login_default = {
261
222
  },
262
223
  {
263
224
  "name": "register",
264
- "fields": [
265
- "email",
266
- "givenName",
267
- "familyName",
268
- "dateOfBirth"
269
- ],
225
+ "fields": ["email"],
270
226
  "actions": [{
271
227
  "name": "passkey_register",
272
228
  "kind": "passkey_register",
@@ -322,6 +278,14 @@ function schemasReadmeContent() {
322
278
  function flowsReadmeContent() {
323
279
  return readFileSync(readmeUrl("README-flows.md"), "utf8");
324
280
  }
281
+ /**
282
+ * README content the CLI copies to `.zitadel/branding/README.md` when a
283
+ * branding design is ejected. Source of truth is
284
+ * `packages/config/defaults/README-branding.md`.
285
+ */
286
+ function brandingReadmeContent() {
287
+ return readFileSync(readmeUrl("README-branding.md"), "utf8");
288
+ }
325
289
  function readmeUrl(filename) {
326
290
  return fileURLToPath(new URL(`../defaults/${filename}`, import.meta.url));
327
291
  }
@@ -331,6 +295,8 @@ const DEFAULT_BUILTIN_SCHEMA_BASE = "https://nextgen.com/api/schemas";
331
295
  const DEFAULT_FLOW_SCHEMA_URI = "https://nextgen.com/flow-definition.json";
332
296
  const DEFAULT_SCHEMA_CONFIG_PATH = ".zitadel/schemas/default-human-user.json";
333
297
  const DEFAULT_FLOW_CONFIG_PATH = ".zitadel/flows/default-login.json";
298
+ const DEFAULT_BRANDING_CONFIG_PATH = ".zitadel/branding/branding.json";
299
+ const DEFAULT_BRANDING_TEMPLATE_PATH = ".zitadel/branding/login.liquid";
334
300
  /**
335
301
  * Named schema+flow bundles `zitadel setup` can scaffold (#448: the prompt
336
302
  * fires before any `.zitadel/` file is written; each preset maps to a
@@ -354,22 +320,182 @@ function presetTemplates(preset) {
354
320
  if (!Object.hasOwn(PRESET_TEMPLATES, preset)) throw new Error(`unknown setup preset ${JSON.stringify(preset)} (known presets: ${SETUP_PRESETS.join(", ")})`);
355
321
  return PRESET_TEMPLATES[preset];
356
322
  }
323
+ /**
324
+ * Login-design starting points `zitadel branding eject --design <name>` (and
325
+ * `zitadel setup --design <name>`) scaffold into `.zitadel/branding/`. A
326
+ * design is a full Liquid template plus the descriptor `layout` it degrades
327
+ * to — the wire `layout` enum stays `centered | split`, richer designs are
328
+ * delivered as templates (ADR 040).
329
+ */
330
+ const BRANDING_DESIGNS = [
331
+ "centered",
332
+ "split",
333
+ "split-right",
334
+ "hero",
335
+ "minimal"
336
+ ];
337
+ const DEFAULT_BRANDING_DESIGN = "centered";
338
+ /** Descriptor `layout` each design degrades to when its template is rejected. */
339
+ const DESIGN_LAYOUTS = {
340
+ centered: "centered",
341
+ split: "split",
342
+ "split-right": "split",
343
+ hero: "split",
344
+ minimal: "centered"
345
+ };
346
+ /**
347
+ * Renders the scaffold files for a branding design. The `centered` template
348
+ * is a drift-tested copy of the bundled default in `@zitadel/components`;
349
+ * the other designs are authored variants of it.
350
+ */
351
+ function getDefaultBrandingConfig(design = DEFAULT_BRANDING_DESIGN) {
352
+ if (!Object.hasOwn(DESIGN_LAYOUTS, design)) throw new Error(`unknown branding design ${JSON.stringify(design)} (known designs: ${BRANDING_DESIGNS.join(", ")})`);
353
+ const known = design;
354
+ return {
355
+ branding: {
356
+ layout: DESIGN_LAYOUTS[known],
357
+ liquid_template_file: "./login.liquid"
358
+ },
359
+ template: readFileSync(packageFilePath(`../defaults/branding/${known}/login.liquid`), "utf8")
360
+ };
361
+ }
362
+ /**
363
+ * Resolves a package-relative file to a real filesystem path. Vite-driven
364
+ * runtimes (vitest in dependent packages) rewrite `import.meta.url` to a
365
+ * `/@fs/...` URL, which `fileURLToPath` passes through verbatim — strip the
366
+ * prefix so `readFileSync` gets an actual path.
367
+ */
368
+ function packageFilePath(relative) {
369
+ const path = fileURLToPath(new URL(relative, import.meta.url));
370
+ return path.startsWith("/@fs/") ? path.slice(4) : path;
371
+ }
372
+ /**
373
+ * The second setup axis (#448): *who* signs in, orthogonal to the sign-in
374
+ * preset (*how* they sign in). The sign-in preset owns the flow shape and
375
+ * auth methods; the use case owns which profile fields the schema collects.
376
+ * Composing the two keeps us at one field catalog + one flow-per-preset
377
+ * instead of a bundle per (use case × preset) pair. `minimal` is the
378
+ * default and never blocks non-interactive runs.
379
+ */
380
+ const SETUP_USE_CASES = [
381
+ "minimal",
382
+ "consumer",
383
+ "business"
384
+ ];
385
+ const DEFAULT_SETUP_USE_CASE = "minimal";
386
+ /**
387
+ * Fields each use case collects, in register/display order. `email` is
388
+ * always first and stays the only required property; the rest are optional
389
+ * profile attributes gathered on the flow's register step. `givenName`/
390
+ * `familyName` are the attributes the backend reads for a user's identity
391
+ * (`internal/domain/user.go`); `companyName` is stored as a plain user
392
+ * attribute today — there is no org/team model behind it yet.
393
+ */
394
+ const USE_CASE_FIELDS = {
395
+ minimal: ["email"],
396
+ consumer: [
397
+ "email",
398
+ "givenName",
399
+ "familyName"
400
+ ],
401
+ business: [
402
+ "email",
403
+ "givenName",
404
+ "familyName",
405
+ "companyName"
406
+ ]
407
+ };
408
+ /**
409
+ * JSON-Schema bodies for the optional profile fields the CLI composes in per
410
+ * use case. The shipped templates are an email-only baseline (shared verbatim
411
+ * with the Go server fallback), so this catalog owns every field beyond
412
+ * `email`. Authored in the templates' style — no `x-claim`, since the backend
413
+ * maps identity by attribute name and the user-property meta-schema defines no
414
+ * claim keyword. `givenName`/`familyName` are the attributes the backend reads
415
+ * for a user's identity (`internal/domain/user.go`).
416
+ */
417
+ const EXTRA_FIELD_BODIES = {
418
+ givenName: {
419
+ type: "string",
420
+ maxLength: 50,
421
+ description: "The user's given (first) name."
422
+ },
423
+ familyName: {
424
+ type: "string",
425
+ maxLength: 50,
426
+ description: "The user's family (last) name."
427
+ },
428
+ companyName: {
429
+ type: "string",
430
+ maxLength: 200,
431
+ description: "The user's company name."
432
+ }
433
+ };
434
+ function useCaseFields(useCase) {
435
+ if (!Object.hasOwn(USE_CASE_FIELDS, useCase)) throw new Error(`unknown setup use case ${JSON.stringify(useCase)} (known use cases: ${SETUP_USE_CASES.join(", ")})`);
436
+ return USE_CASE_FIELDS[useCase];
437
+ }
438
+ /**
439
+ * The body for one use-case field: reuse the template's authored body when it
440
+ * has one (so composed schemas match the shipped defaults for shared fields),
441
+ * else the extra catalog, else a generic editable string so composition stays
442
+ * total for any field a future use case introduces.
443
+ */
444
+ function fieldBody(field, templateProps) {
445
+ if (Object.hasOwn(templateProps, field)) return { ...templateProps[field] };
446
+ if (Object.hasOwn(EXTRA_FIELD_BODIES, field)) return { ...EXTRA_FIELD_BODIES[field] };
447
+ return {
448
+ type: "string",
449
+ description: `The user's ${field}.`
450
+ };
451
+ }
452
+ /**
453
+ * Narrow a rendered schema to the chosen use case: keep the preset-owned
454
+ * header and `x-auth-methods`, but replace `properties`/`required` with the
455
+ * use case's field set. `email` is the sole required property.
456
+ */
457
+ function applyUseCaseToSchema(schema, useCase) {
458
+ const templateProps = schema.properties ?? {};
459
+ const properties = {};
460
+ for (const field of useCaseFields(useCase)) properties[field] = fieldBody(field, templateProps);
461
+ return {
462
+ ...schema,
463
+ required: ["email"],
464
+ properties
465
+ };
466
+ }
467
+ /**
468
+ * Derive the flow's register-step fields from the use case rather than
469
+ * copying a hard-coded list into every bundle (#448): the register step
470
+ * collects exactly what the schema defines. Other steps are untouched.
471
+ */
472
+ function applyUseCaseToFlow(flow, useCase) {
473
+ const fields = [...useCaseFields(useCase)];
474
+ const steps = flow.steps.map((step) => step.name === "register" ? {
475
+ ...step,
476
+ fields
477
+ } : step);
478
+ return {
479
+ ...flow,
480
+ steps
481
+ };
482
+ }
357
483
  function defaultHumanUserSchemaUrl(builtinSchemaBase = DEFAULT_BUILTIN_SCHEMA_BASE) {
358
484
  return `${trimTrailingSlash(builtinSchemaBase)}/default-human-user.json`;
359
485
  }
360
486
  function getDefaultHumanUserSchema(options = {}) {
361
487
  const builtinSchemaBase = trimTrailingSlash(options.builtinSchemaBase ?? "https://nextgen.com/api/schemas");
362
- return renderTemplate(presetTemplates(options.preset ?? "password-first").schema, {
488
+ return applyUseCaseToSchema(renderTemplate(presetTemplates(options.preset ?? "password-first").schema, {
363
489
  SERVER_URL: builtinSchemaBase,
364
490
  USER_SCHEMA_URL: options.userSchemaUrl ?? defaultHumanUserSchemaUrl(builtinSchemaBase)
365
- });
491
+ }), options.useCase ?? "minimal");
366
492
  }
367
493
  function getDefaultLoginFlow(options = {}) {
368
494
  const builtinSchemaBase = trimTrailingSlash(options.builtinSchemaBase ?? "https://nextgen.com/api/schemas");
369
- return renderTemplate(presetTemplates(options.preset ?? "password-first").flow, {
495
+ return applyUseCaseToFlow(renderTemplate(presetTemplates(options.preset ?? "password-first").flow, {
370
496
  SERVER_URL: builtinSchemaBase,
371
497
  USER_SCHEMA_URL: options.userSchemaUrl ?? defaultHumanUserSchemaUrl(builtinSchemaBase)
372
- });
498
+ }), options.useCase ?? "minimal");
373
499
  }
374
500
  function renderTemplate(value, replacements) {
375
501
  if (Array.isArray(value)) return value.map((item) => renderTemplate(item, replacements));
@@ -380,9 +506,11 @@ function renderTemplate(value, replacements) {
380
506
  return value;
381
507
  }
382
508
  function trimTrailingSlash(value) {
383
- return value.replace(/\/+$/u, "");
509
+ let trimmed = value;
510
+ while (trimmed.endsWith("/")) trimmed = trimmed.slice(0, -1);
511
+ return trimmed;
384
512
  }
385
513
  //#endregion
386
- export { DEFAULT_SETUP_PRESET as a, getDefaultHumanUserSchema as c, schemasReadmeContent as d, DEFAULT_SCHEMA_CONFIG_PATH as i, getDefaultLoginFlow as l, DEFAULT_FLOW_CONFIG_PATH as n, SETUP_PRESETS as o, DEFAULT_FLOW_SCHEMA_URI as r, defaultHumanUserSchemaUrl as s, DEFAULT_BUILTIN_SCHEMA_BASE as t, flowsReadmeContent as u };
514
+ export { brandingReadmeContent as _, DEFAULT_BUILTIN_SCHEMA_BASE as a, DEFAULT_SCHEMA_CONFIG_PATH as c, SETUP_PRESETS as d, SETUP_USE_CASES as f, getDefaultLoginFlow as g, getDefaultHumanUserSchema as h, DEFAULT_BRANDING_TEMPLATE_PATH as i, DEFAULT_SETUP_PRESET as l, getDefaultBrandingConfig as m, DEFAULT_BRANDING_CONFIG_PATH as n, DEFAULT_FLOW_CONFIG_PATH as o, defaultHumanUserSchemaUrl as p, DEFAULT_BRANDING_DESIGN as r, DEFAULT_FLOW_SCHEMA_URI as s, BRANDING_DESIGNS as t, DEFAULT_SETUP_USE_CASE as u, flowsReadmeContent as v, schemasReadmeContent as y };
387
515
 
388
- //# sourceMappingURL=defaults-BQej3KIY.mjs.map
516
+ //# sourceMappingURL=defaults-CXTnFMHj.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults-CXTnFMHj.mjs","names":["defaultHumanUserSchemaTemplate","defaultLoginFlowTemplate","passkeyFirstHumanUserSchemaTemplate","passkeyFirstLoginFlowTemplate"],"sources":["../defaults/default-human-user.json","../defaults/default-login.json","../defaults/presets/passkey-first/human-user.json","../defaults/presets/passkey-first/login.json","../src/readmes.ts","../src/defaults.ts"],"sourcesContent":["","","","","import { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * README content the CLI copies to `.zitadel/schemas/README.md` during setup.\n * Source of truth is `packages/config/defaults/README-schemas.md`; the Go\n * server-side embed reads the same file (see `defaults.go`).\n */\nexport function schemasReadmeContent(): string {\n return readFileSync(readmeUrl(\"README-schemas.md\"), \"utf8\");\n}\n\n/**\n * README content the CLI copies to `.zitadel/flows/README.md` during setup.\n * Source of truth is `packages/config/defaults/README-flows.md`.\n */\nexport function flowsReadmeContent(): string {\n return readFileSync(readmeUrl(\"README-flows.md\"), \"utf8\");\n}\n\n/**\n * README content the CLI copies to `.zitadel/branding/README.md` when a\n * branding design is ejected. Source of truth is\n * `packages/config/defaults/README-branding.md`.\n */\nexport function brandingReadmeContent(): string {\n return readFileSync(readmeUrl(\"README-branding.md\"), \"utf8\");\n}\n\nfunction readmeUrl(filename: string): string {\n return fileURLToPath(new URL(`../defaults/${filename}`, import.meta.url));\n}\n","import { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\n\nimport type {\n CreateFlowDefinitionBodyFlowDefinition,\n CreateSchemaBody,\n} from \"@zitadel/api/generated/model\";\n\nimport defaultHumanUserSchemaTemplate from \"../defaults/default-human-user.json\" with {\n type: \"json\",\n};\nimport defaultLoginFlowTemplate from \"../defaults/default-login.json\" with {\n type: \"json\",\n};\nimport passkeyFirstHumanUserSchemaTemplate from \"../defaults/presets/passkey-first/human-user.json\" with {\n type: \"json\",\n};\nimport passkeyFirstLoginFlowTemplate from \"../defaults/presets/passkey-first/login.json\" with {\n type: \"json\",\n};\n\nexport { brandingReadmeContent, flowsReadmeContent, schemasReadmeContent } from \"./readmes.js\";\n\nexport const DEFAULT_BUILTIN_SCHEMA_BASE = \"https://nextgen.com/api/schemas\";\nexport const DEFAULT_FLOW_SCHEMA_URI = \"https://nextgen.com/flow-definition.json\";\nexport const DEFAULT_SCHEMA_CONFIG_PATH = \".zitadel/schemas/default-human-user.json\";\nexport const DEFAULT_FLOW_CONFIG_PATH = \".zitadel/flows/default-login.json\";\nexport const DEFAULT_BRANDING_CONFIG_PATH = \".zitadel/branding/branding.json\";\nexport const DEFAULT_BRANDING_TEMPLATE_PATH = \".zitadel/branding/login.liquid\";\n\n/**\n * Named schema+flow bundles `zitadel setup` can scaffold (#448: the prompt\n * fires before any `.zitadel/` file is written; each preset maps to a\n * pre-defined bundle the CLI copies on first setup). `password-first` is\n * today's default; `passkey-first` puts a passkey ceremony on the login\n * entry step with an email→password fallback path.\n */\nexport const SETUP_PRESETS = [\"password-first\", \"passkey-first\"] as const;\n\nexport type SetupPreset = (typeof SETUP_PRESETS)[number];\n\nexport const DEFAULT_SETUP_PRESET: SetupPreset = \"password-first\";\n\nconst PRESET_TEMPLATES: Record<SetupPreset, { schema: unknown; flow: unknown }> = {\n \"password-first\": {\n schema: defaultHumanUserSchemaTemplate,\n flow: defaultLoginFlowTemplate,\n },\n \"passkey-first\": {\n schema: passkeyFirstHumanUserSchemaTemplate,\n flow: passkeyFirstLoginFlowTemplate,\n },\n};\n\nfunction presetTemplates(preset: string): { schema: unknown; flow: unknown } {\n // Own-property check: indexing a plain object with an arbitrary string\n // would let \"__proto__\"/\"constructor\" resolve via the prototype chain\n // and bypass the unknown-preset error.\n if (!Object.hasOwn(PRESET_TEMPLATES, preset)) {\n throw new Error(\n `unknown setup preset ${JSON.stringify(preset)} (known presets: ${SETUP_PRESETS.join(\", \")})`,\n );\n }\n return PRESET_TEMPLATES[preset as SetupPreset];\n}\n\n/**\n * Login-design starting points `zitadel branding eject --design <name>` (and\n * `zitadel setup --design <name>`) scaffold into `.zitadel/branding/`. A\n * design is a full Liquid template plus the descriptor `layout` it degrades\n * to — the wire `layout` enum stays `centered | split`, richer designs are\n * delivered as templates (ADR 040).\n */\nexport const BRANDING_DESIGNS = [\"centered\", \"split\", \"split-right\", \"hero\", \"minimal\"] as const;\n\nexport type BrandingDesign = (typeof BRANDING_DESIGNS)[number];\n\nexport const DEFAULT_BRANDING_DESIGN: BrandingDesign = \"centered\";\n\n/** Descriptor `layout` each design degrades to when its template is rejected. */\nconst DESIGN_LAYOUTS: Record<BrandingDesign, \"centered\" | \"split\"> = {\n centered: \"centered\",\n split: \"split\",\n \"split-right\": \"split\",\n hero: \"split\",\n minimal: \"centered\",\n};\n\nexport type DefaultBrandingConfig = {\n /** The `.zitadel/branding/branding.json` descriptor body (sans `$schema`). */\n branding: {\n layout: \"centered\" | \"split\";\n liquid_template_file: string;\n };\n /** The `.zitadel/branding/login.liquid` template content. */\n template: string;\n};\n\n/**\n * Renders the scaffold files for a branding design. The `centered` template\n * is a drift-tested copy of the bundled default in `@zitadel/components`;\n * the other designs are authored variants of it.\n */\nexport function getDefaultBrandingConfig(\n design: string = DEFAULT_BRANDING_DESIGN,\n): DefaultBrandingConfig {\n if (!Object.hasOwn(DESIGN_LAYOUTS, design)) {\n throw new Error(\n `unknown branding design ${JSON.stringify(design)} (known designs: ${BRANDING_DESIGNS.join(\", \")})`,\n );\n }\n const known = design as BrandingDesign;\n return {\n branding: {\n layout: DESIGN_LAYOUTS[known],\n liquid_template_file: \"./login.liquid\",\n },\n template: readFileSync(packageFilePath(`../defaults/branding/${known}/login.liquid`), \"utf8\"),\n };\n}\n\n/**\n * Resolves a package-relative file to a real filesystem path. Vite-driven\n * runtimes (vitest in dependent packages) rewrite `import.meta.url` to a\n * `/@fs/...` URL, which `fileURLToPath` passes through verbatim — strip the\n * prefix so `readFileSync` gets an actual path.\n */\nfunction packageFilePath(relative: string): string {\n const path = fileURLToPath(new URL(relative, import.meta.url));\n return path.startsWith(\"/@fs/\") ? path.slice(\"/@fs\".length) : path;\n}\n\n/**\n * The second setup axis (#448): *who* signs in, orthogonal to the sign-in\n * preset (*how* they sign in). The sign-in preset owns the flow shape and\n * auth methods; the use case owns which profile fields the schema collects.\n * Composing the two keeps us at one field catalog + one flow-per-preset\n * instead of a bundle per (use case × preset) pair. `minimal` is the\n * default and never blocks non-interactive runs.\n */\nexport const SETUP_USE_CASES = [\"minimal\", \"consumer\", \"business\"] as const;\n\nexport type SetupUseCase = (typeof SETUP_USE_CASES)[number];\n\nexport const DEFAULT_SETUP_USE_CASE: SetupUseCase = \"minimal\";\n\n/**\n * Fields each use case collects, in register/display order. `email` is\n * always first and stays the only required property; the rest are optional\n * profile attributes gathered on the flow's register step. `givenName`/\n * `familyName` are the attributes the backend reads for a user's identity\n * (`internal/domain/user.go`); `companyName` is stored as a plain user\n * attribute today — there is no org/team model behind it yet.\n */\nconst USE_CASE_FIELDS: Record<SetupUseCase, readonly string[]> = {\n minimal: [\"email\"],\n consumer: [\"email\", \"givenName\", \"familyName\"],\n business: [\"email\", \"givenName\", \"familyName\", \"companyName\"],\n};\n\n/**\n * JSON-Schema bodies for the optional profile fields the CLI composes in per\n * use case. The shipped templates are an email-only baseline (shared verbatim\n * with the Go server fallback), so this catalog owns every field beyond\n * `email`. Authored in the templates' style — no `x-claim`, since the backend\n * maps identity by attribute name and the user-property meta-schema defines no\n * claim keyword. `givenName`/`familyName` are the attributes the backend reads\n * for a user's identity (`internal/domain/user.go`).\n */\nconst EXTRA_FIELD_BODIES: Record<string, Record<string, unknown>> = {\n givenName: {\n type: \"string\",\n maxLength: 50,\n description: \"The user's given (first) name.\",\n },\n familyName: {\n type: \"string\",\n maxLength: 50,\n description: \"The user's family (last) name.\",\n },\n companyName: {\n type: \"string\",\n maxLength: 200,\n description: \"The user's company name.\",\n },\n};\n\nfunction useCaseFields(useCase: string): readonly string[] {\n // Own-property check, same rationale as presetTemplates: keep prototype\n // keys (\"__proto__\" etc.) from resolving to a real field list.\n if (!Object.hasOwn(USE_CASE_FIELDS, useCase)) {\n throw new Error(\n `unknown setup use case ${JSON.stringify(useCase)} (known use cases: ${SETUP_USE_CASES.join(\", \")})`,\n );\n }\n return USE_CASE_FIELDS[useCase as SetupUseCase];\n}\n\n/**\n * The body for one use-case field: reuse the template's authored body when it\n * has one (so composed schemas match the shipped defaults for shared fields),\n * else the extra catalog, else a generic editable string so composition stays\n * total for any field a future use case introduces.\n */\nfunction fieldBody(\n field: string,\n templateProps: Record<string, Record<string, unknown>>,\n): Record<string, unknown> {\n if (Object.hasOwn(templateProps, field)) {\n return { ...templateProps[field] };\n }\n if (Object.hasOwn(EXTRA_FIELD_BODIES, field)) {\n return { ...EXTRA_FIELD_BODIES[field] };\n }\n return { type: \"string\", description: `The user's ${field}.` };\n}\n\n/**\n * Narrow a rendered schema to the chosen use case: keep the preset-owned\n * header and `x-auth-methods`, but replace `properties`/`required` with the\n * use case's field set. `email` is the sole required property.\n */\nfunction applyUseCaseToSchema(\n schema: Record<string, unknown>,\n useCase: string,\n): Record<string, unknown> {\n const templateProps = (schema.properties ?? {}) as Record<string, Record<string, unknown>>;\n const properties: Record<string, unknown> = {};\n for (const field of useCaseFields(useCase)) {\n properties[field] = fieldBody(field, templateProps);\n }\n return { ...schema, required: [\"email\"], properties };\n}\n\n/**\n * Derive the flow's register-step fields from the use case rather than\n * copying a hard-coded list into every bundle (#448): the register step\n * collects exactly what the schema defines. Other steps are untouched.\n */\nfunction applyUseCaseToFlow(\n flow: Record<string, unknown>,\n useCase: string,\n): Record<string, unknown> {\n const fields = [...useCaseFields(useCase)];\n const steps = (flow.steps as Array<Record<string, unknown>>).map((step) =>\n step.name === \"register\" ? { ...step, fields } : step,\n );\n return { ...flow, steps };\n}\n\nexport type DefaultConfigRenderOptions = {\n builtinSchemaBase?: string;\n userSchemaUrl?: string;\n /** Which flow/auth bundle to render; defaults to {@link DEFAULT_SETUP_PRESET}. */\n preset?: string;\n /** Which field set to collect; defaults to {@link DEFAULT_SETUP_USE_CASE}. */\n useCase?: string;\n};\n\nexport function defaultHumanUserSchemaUrl(\n builtinSchemaBase = DEFAULT_BUILTIN_SCHEMA_BASE,\n): string {\n return `${trimTrailingSlash(builtinSchemaBase)}/default-human-user.json`;\n}\n\nexport function getDefaultHumanUserSchema(\n options: DefaultConfigRenderOptions = {},\n): CreateSchemaBody {\n const builtinSchemaBase = trimTrailingSlash(\n options.builtinSchemaBase ?? DEFAULT_BUILTIN_SCHEMA_BASE,\n );\n const rendered = renderTemplate(presetTemplates(options.preset ?? DEFAULT_SETUP_PRESET).schema, {\n SERVER_URL: builtinSchemaBase,\n USER_SCHEMA_URL: options.userSchemaUrl ?? defaultHumanUserSchemaUrl(builtinSchemaBase),\n }) as Record<string, unknown>;\n return applyUseCaseToSchema(\n rendered,\n options.useCase ?? DEFAULT_SETUP_USE_CASE,\n ) as CreateSchemaBody;\n}\n\nexport function getDefaultLoginFlow(\n options: DefaultConfigRenderOptions = {},\n): CreateFlowDefinitionBodyFlowDefinition {\n const builtinSchemaBase = trimTrailingSlash(\n options.builtinSchemaBase ?? DEFAULT_BUILTIN_SCHEMA_BASE,\n );\n const rendered = renderTemplate(presetTemplates(options.preset ?? DEFAULT_SETUP_PRESET).flow, {\n SERVER_URL: builtinSchemaBase,\n USER_SCHEMA_URL: options.userSchemaUrl ?? defaultHumanUserSchemaUrl(builtinSchemaBase),\n }) as Record<string, unknown>;\n return applyUseCaseToFlow(\n rendered,\n options.useCase ?? DEFAULT_SETUP_USE_CASE,\n ) as CreateFlowDefinitionBodyFlowDefinition;\n}\n\nfunction renderTemplate(value: unknown, replacements: Record<string, string>): unknown {\n if (Array.isArray(value)) {\n return value.map((item) => renderTemplate(item, replacements));\n }\n if (value !== null && typeof value === \"object\") {\n return Object.fromEntries(\n Object.entries(value).map(([key, item]) => [key, renderTemplate(item, replacements)]),\n );\n }\n if (typeof value === \"string\") {\n return value.replaceAll(/\\$\\{([A-Z_]+)\\}/g, (match, name: string) => {\n return replacements[name] ?? match;\n });\n }\n return value;\n}\n\nfunction trimTrailingSlash(value: string): string {\n let trimmed = value;\n while (trimmed.endsWith(\"/\")) {\n trimmed = trimmed.slice(0, -1);\n }\n return trimmed;\n}\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import { a as DEFAULT_SETUP_PRESET, c as SetupPreset, d as getDefaultLoginFlow, f as flowsReadmeContent, i as DEFAULT_SCHEMA_CONFIG_PATH, l as defaultHumanUserSchemaUrl, n as DEFAULT_FLOW_CONFIG_PATH, o as DefaultConfigRenderOptions, p as schemasReadmeContent, r as DEFAULT_FLOW_SCHEMA_URI, s as SETUP_PRESETS, t as DEFAULT_BUILTIN_SCHEMA_BASE, u as getDefaultHumanUserSchema } from "./defaults-CSjBjBkQ.mjs";
2
- export { DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, DefaultConfigRenderOptions, SETUP_PRESETS, SetupPreset, defaultHumanUserSchemaUrl, flowsReadmeContent, getDefaultHumanUserSchema, getDefaultLoginFlow, schemasReadmeContent };
1
+ import { C as flowsReadmeContent, S as brandingReadmeContent, _ as SetupUseCase, a as DEFAULT_BRANDING_TEMPLATE_PATH, b as getDefaultHumanUserSchema, c as DEFAULT_FLOW_SCHEMA_URI, d as DEFAULT_SETUP_USE_CASE, f as DefaultBrandingConfig, g as SetupPreset, h as SETUP_USE_CASES, i as DEFAULT_BRANDING_DESIGN, l as DEFAULT_SCHEMA_CONFIG_PATH, m as SETUP_PRESETS, n as BrandingDesign, o as DEFAULT_BUILTIN_SCHEMA_BASE, p as DefaultConfigRenderOptions, r as DEFAULT_BRANDING_CONFIG_PATH, s as DEFAULT_FLOW_CONFIG_PATH, t as BRANDING_DESIGNS, u as DEFAULT_SETUP_PRESET, v as defaultHumanUserSchemaUrl, w as schemasReadmeContent, x as getDefaultLoginFlow, y as getDefaultBrandingConfig } from "./defaults-Bh4_xVbh.mjs";
2
+ export { BRANDING_DESIGNS, BrandingDesign, DEFAULT_BRANDING_CONFIG_PATH, DEFAULT_BRANDING_DESIGN, DEFAULT_BRANDING_TEMPLATE_PATH, DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, DEFAULT_SETUP_USE_CASE, DefaultBrandingConfig, DefaultConfigRenderOptions, SETUP_PRESETS, SETUP_USE_CASES, SetupPreset, SetupUseCase, brandingReadmeContent, defaultHumanUserSchemaUrl, flowsReadmeContent, getDefaultBrandingConfig, getDefaultHumanUserSchema, getDefaultLoginFlow, schemasReadmeContent };
package/dist/defaults.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as DEFAULT_SETUP_PRESET, c as getDefaultHumanUserSchema, d as schemasReadmeContent, i as DEFAULT_SCHEMA_CONFIG_PATH, l as getDefaultLoginFlow, n as DEFAULT_FLOW_CONFIG_PATH, o as SETUP_PRESETS, r as DEFAULT_FLOW_SCHEMA_URI, s as defaultHumanUserSchemaUrl, t as DEFAULT_BUILTIN_SCHEMA_BASE, u as flowsReadmeContent } from "./defaults-BQej3KIY.mjs";
2
- export { DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, SETUP_PRESETS, defaultHumanUserSchemaUrl, flowsReadmeContent, getDefaultHumanUserSchema, getDefaultLoginFlow, schemasReadmeContent };
1
+ import { _ as brandingReadmeContent, a as DEFAULT_BUILTIN_SCHEMA_BASE, c as DEFAULT_SCHEMA_CONFIG_PATH, d as SETUP_PRESETS, f as SETUP_USE_CASES, g as getDefaultLoginFlow, h as getDefaultHumanUserSchema, i as DEFAULT_BRANDING_TEMPLATE_PATH, l as DEFAULT_SETUP_PRESET, m as getDefaultBrandingConfig, n as DEFAULT_BRANDING_CONFIG_PATH, o as DEFAULT_FLOW_CONFIG_PATH, p as defaultHumanUserSchemaUrl, r as DEFAULT_BRANDING_DESIGN, s as DEFAULT_FLOW_SCHEMA_URI, t as BRANDING_DESIGNS, u as DEFAULT_SETUP_USE_CASE, v as flowsReadmeContent, y as schemasReadmeContent } from "./defaults-CXTnFMHj.mjs";
2
+ export { BRANDING_DESIGNS, DEFAULT_BRANDING_CONFIG_PATH, DEFAULT_BRANDING_DESIGN, DEFAULT_BRANDING_TEMPLATE_PATH, DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, DEFAULT_SETUP_USE_CASE, SETUP_PRESETS, SETUP_USE_CASES, brandingReadmeContent, defaultHumanUserSchemaUrl, flowsReadmeContent, getDefaultBrandingConfig, getDefaultHumanUserSchema, getDefaultLoginFlow, schemasReadmeContent };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
- import { a as DEFAULT_SETUP_PRESET, c as SetupPreset, d as getDefaultLoginFlow, f as flowsReadmeContent, i as DEFAULT_SCHEMA_CONFIG_PATH, l as defaultHumanUserSchemaUrl, n as DEFAULT_FLOW_CONFIG_PATH, o as DefaultConfigRenderOptions, p as schemasReadmeContent, r as DEFAULT_FLOW_SCHEMA_URI, s as SETUP_PRESETS, t as DEFAULT_BUILTIN_SCHEMA_BASE, u as getDefaultHumanUserSchema } from "./defaults-CSjBjBkQ.mjs";
2
- import { FLOW_FILE_SCHEMA_REF, META_SCHEMA_DIR, MetaSchemaFile, metaSchemaFiles } from "./meta-schemas.mjs";
1
+ import { C as flowsReadmeContent, S as brandingReadmeContent, _ as SetupUseCase, a as DEFAULT_BRANDING_TEMPLATE_PATH, b as getDefaultHumanUserSchema, c as DEFAULT_FLOW_SCHEMA_URI, d as DEFAULT_SETUP_USE_CASE, f as DefaultBrandingConfig, g as SetupPreset, h as SETUP_USE_CASES, i as DEFAULT_BRANDING_DESIGN, l as DEFAULT_SCHEMA_CONFIG_PATH, m as SETUP_PRESETS, n as BrandingDesign, o as DEFAULT_BUILTIN_SCHEMA_BASE, p as DefaultConfigRenderOptions, r as DEFAULT_BRANDING_CONFIG_PATH, s as DEFAULT_FLOW_CONFIG_PATH, t as BRANDING_DESIGNS, u as DEFAULT_SETUP_PRESET, v as defaultHumanUserSchemaUrl, w as schemasReadmeContent, x as getDefaultLoginFlow, y as getDefaultBrandingConfig } from "./defaults-Bh4_xVbh.mjs";
2
+ import { BRANDING_FILE_SCHEMA_REF, FLOW_FILE_SCHEMA_REF, META_SCHEMA_DIR, MetaSchemaFile, metaSchemaFiles } from "./meta-schemas.mjs";
3
3
  import { USER_PROPERTY_DEFAULTS, normalizeFlowBody, normalizeSchemaBody } from "./normalize.mjs";
4
- import { createFlowDefinitionRequestSchema, flowConfigSchema, schemaConfigSchema } from "./schemas.mjs";
4
+ import { brandingConfigSchema, brandingWireSchema, createFlowDefinitionRequestSchema, flowConfigSchema, schemaConfigSchema } from "./schemas.mjs";
5
+ import { BANNED_TEMPLATE_PATTERNS, MANDATORY_GATES_TAG, MAX_TEMPLATE_BYTES, TEMPLATE_TAGS, TEMPLATE_VALIDATION_RULES, TemplateValidationIssue, TemplateValidationRuleId, TemplateValidationSeverity, validateLoginTemplate } from "./template.mjs";
5
6
  import { FLOW_PURPOSES, FLOW_VALIDATION_RULES, FlowValidationIssue, FlowValidationRuleId, FlowValidationSeverity, PURPOSE_FLIP_TARGETS, RESERVED_OUTCOMES, validateFlowDefinition } from "./validate.mjs";
6
- export { DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, DefaultConfigRenderOptions, FLOW_FILE_SCHEMA_REF, FLOW_PURPOSES, FLOW_VALIDATION_RULES, FlowValidationIssue, FlowValidationRuleId, FlowValidationSeverity, META_SCHEMA_DIR, MetaSchemaFile, PURPOSE_FLIP_TARGETS, RESERVED_OUTCOMES, SETUP_PRESETS, SetupPreset, USER_PROPERTY_DEFAULTS, createFlowDefinitionRequestSchema, defaultHumanUserSchemaUrl, flowConfigSchema, flowsReadmeContent, getDefaultHumanUserSchema, getDefaultLoginFlow, metaSchemaFiles, normalizeFlowBody, normalizeSchemaBody, schemaConfigSchema, schemasReadmeContent, validateFlowDefinition };
7
+ export { BANNED_TEMPLATE_PATTERNS, BRANDING_DESIGNS, BRANDING_FILE_SCHEMA_REF, BrandingDesign, DEFAULT_BRANDING_CONFIG_PATH, DEFAULT_BRANDING_DESIGN, DEFAULT_BRANDING_TEMPLATE_PATH, DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, DEFAULT_SETUP_USE_CASE, DefaultBrandingConfig, DefaultConfigRenderOptions, FLOW_FILE_SCHEMA_REF, FLOW_PURPOSES, FLOW_VALIDATION_RULES, FlowValidationIssue, FlowValidationRuleId, FlowValidationSeverity, MANDATORY_GATES_TAG, MAX_TEMPLATE_BYTES, META_SCHEMA_DIR, MetaSchemaFile, PURPOSE_FLIP_TARGETS, RESERVED_OUTCOMES, SETUP_PRESETS, SETUP_USE_CASES, SetupPreset, SetupUseCase, TEMPLATE_TAGS, TEMPLATE_VALIDATION_RULES, TemplateValidationIssue, TemplateValidationRuleId, TemplateValidationSeverity, USER_PROPERTY_DEFAULTS, brandingConfigSchema, brandingReadmeContent, brandingWireSchema, createFlowDefinitionRequestSchema, defaultHumanUserSchemaUrl, flowConfigSchema, flowsReadmeContent, getDefaultBrandingConfig, getDefaultHumanUserSchema, getDefaultLoginFlow, metaSchemaFiles, normalizeFlowBody, normalizeSchemaBody, schemaConfigSchema, schemasReadmeContent, validateFlowDefinition, validateLoginTemplate };
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
- import { a as DEFAULT_SETUP_PRESET, c as getDefaultHumanUserSchema, d as schemasReadmeContent, i as DEFAULT_SCHEMA_CONFIG_PATH, l as getDefaultLoginFlow, n as DEFAULT_FLOW_CONFIG_PATH, o as SETUP_PRESETS, r as DEFAULT_FLOW_SCHEMA_URI, s as defaultHumanUserSchemaUrl, t as DEFAULT_BUILTIN_SCHEMA_BASE, u as flowsReadmeContent } from "./defaults-BQej3KIY.mjs";
2
- import { n as META_SCHEMA_DIR, r as metaSchemaFiles, t as FLOW_FILE_SCHEMA_REF } from "./meta-schemas-8nlyVL7g.mjs";
1
+ import { _ as brandingReadmeContent, a as DEFAULT_BUILTIN_SCHEMA_BASE, c as DEFAULT_SCHEMA_CONFIG_PATH, d as SETUP_PRESETS, f as SETUP_USE_CASES, g as getDefaultLoginFlow, h as getDefaultHumanUserSchema, i as DEFAULT_BRANDING_TEMPLATE_PATH, l as DEFAULT_SETUP_PRESET, m as getDefaultBrandingConfig, n as DEFAULT_BRANDING_CONFIG_PATH, o as DEFAULT_FLOW_CONFIG_PATH, p as defaultHumanUserSchemaUrl, r as DEFAULT_BRANDING_DESIGN, s as DEFAULT_FLOW_SCHEMA_URI, t as BRANDING_DESIGNS, u as DEFAULT_SETUP_USE_CASE, v as flowsReadmeContent, y as schemasReadmeContent } from "./defaults-CXTnFMHj.mjs";
2
+ import { i as metaSchemaFiles, n as FLOW_FILE_SCHEMA_REF, r as META_SCHEMA_DIR, t as BRANDING_FILE_SCHEMA_REF } from "./meta-schemas-B4YiHAX_.mjs";
3
3
  import { USER_PROPERTY_DEFAULTS, normalizeFlowBody, normalizeSchemaBody } from "./normalize.mjs";
4
- import { createFlowDefinitionRequestSchema, flowConfigSchema, schemaConfigSchema } from "./schemas.mjs";
4
+ import { brandingConfigSchema, brandingWireSchema, createFlowDefinitionRequestSchema, flowConfigSchema, schemaConfigSchema } from "./schemas.mjs";
5
+ import { BANNED_TEMPLATE_PATTERNS, MANDATORY_GATES_TAG, MAX_TEMPLATE_BYTES, TEMPLATE_TAGS, TEMPLATE_VALIDATION_RULES, validateLoginTemplate } from "./template.mjs";
5
6
  import { FLOW_PURPOSES, FLOW_VALIDATION_RULES, PURPOSE_FLIP_TARGETS, RESERVED_OUTCOMES, validateFlowDefinition } from "./validate.mjs";
6
- export { DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, FLOW_FILE_SCHEMA_REF, FLOW_PURPOSES, FLOW_VALIDATION_RULES, META_SCHEMA_DIR, PURPOSE_FLIP_TARGETS, RESERVED_OUTCOMES, SETUP_PRESETS, USER_PROPERTY_DEFAULTS, createFlowDefinitionRequestSchema, defaultHumanUserSchemaUrl, flowConfigSchema, flowsReadmeContent, getDefaultHumanUserSchema, getDefaultLoginFlow, metaSchemaFiles, normalizeFlowBody, normalizeSchemaBody, schemaConfigSchema, schemasReadmeContent, validateFlowDefinition };
7
+ export { BANNED_TEMPLATE_PATTERNS, BRANDING_DESIGNS, BRANDING_FILE_SCHEMA_REF, DEFAULT_BRANDING_CONFIG_PATH, DEFAULT_BRANDING_DESIGN, DEFAULT_BRANDING_TEMPLATE_PATH, DEFAULT_BUILTIN_SCHEMA_BASE, DEFAULT_FLOW_CONFIG_PATH, DEFAULT_FLOW_SCHEMA_URI, DEFAULT_SCHEMA_CONFIG_PATH, DEFAULT_SETUP_PRESET, DEFAULT_SETUP_USE_CASE, FLOW_FILE_SCHEMA_REF, FLOW_PURPOSES, FLOW_VALIDATION_RULES, MANDATORY_GATES_TAG, MAX_TEMPLATE_BYTES, META_SCHEMA_DIR, PURPOSE_FLIP_TARGETS, RESERVED_OUTCOMES, SETUP_PRESETS, SETUP_USE_CASES, TEMPLATE_TAGS, TEMPLATE_VALIDATION_RULES, USER_PROPERTY_DEFAULTS, brandingConfigSchema, brandingReadmeContent, brandingWireSchema, createFlowDefinitionRequestSchema, defaultHumanUserSchemaUrl, flowConfigSchema, flowsReadmeContent, getDefaultBrandingConfig, getDefaultHumanUserSchema, getDefaultLoginFlow, metaSchemaFiles, normalizeFlowBody, normalizeSchemaBody, schemaConfigSchema, schemasReadmeContent, validateFlowDefinition, validateLoginTemplate };
@@ -33,6 +33,50 @@ var auth_methods_default = {
33
33
  }
34
34
  };
35
35
  //#endregion
36
+ //#region meta-schemas/branding.json
37
+ var branding_default = {
38
+ $schema: "https://json-schema.org/draft/2020-12/schema",
39
+ title: "Branding",
40
+ description: "Local branding descriptor for the login UI. Carries the layout preset, asset URLs, and the LiquidJS template (by file reference or inline). `zitadel apply` publishes this as an immutable branding revision; flow responses resolve the latest revision per project (ADR 040). This schema describes the local configuration shape only.",
41
+ type: "object",
42
+ additionalProperties: false,
43
+ properties: {
44
+ "$schema": {
45
+ "type": "string",
46
+ "description": "Editor affordance: path or URL of this meta-schema so editors validate and autocomplete the file (scaffolded branding files point at `.zitadel/meta/branding.json`). Ignored by the platform."
47
+ },
48
+ "layout": {
49
+ "type": "string",
50
+ "enum": ["centered", "split"],
51
+ "default": "centered",
52
+ "description": "Layout preset the bundled default template branches on. Custom templates may ignore it; it also serves as the degrade target when a template fails component-side validation."
53
+ },
54
+ "liquid_template_file": {
55
+ "type": "string",
56
+ "examples": ["./login.liquid"],
57
+ "description": "Path to the LiquidJS template file, relative to this descriptor. The CLI inlines the file content into `liquid_template` when publishing, and writes server state back to the file. Mutually exclusive with `liquid_template`."
58
+ },
59
+ "liquid_template": {
60
+ "type": "string",
61
+ "maxLength": 131072,
62
+ "description": "Inline LiquidJS template string. Prefer `liquid_template_file` — a real `.liquid` file edits far better than a JSON-escaped string. Mutually exclusive with `liquid_template_file`."
63
+ },
64
+ "logo_url": {
65
+ "type": "string",
66
+ "format": "uri",
67
+ "pattern": "^[hH][tT][tT][pP][sS]://",
68
+ "description": "Logo URL (https required)."
69
+ },
70
+ "hero_url": {
71
+ "type": "string",
72
+ "format": "uri",
73
+ "pattern": "^[hH][tT][tT][pP][sS]://",
74
+ "description": "Hero/background image URL (https required), used by split designs."
75
+ }
76
+ },
77
+ not: { "required": ["liquid_template", "liquid_template_file"] }
78
+ };
79
+ //#endregion
36
80
  //#region meta-schemas/flow-definition.json
37
81
  var flow_definition_default = {
38
82
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -303,6 +347,15 @@ var flow_definition_default = {
303
347
  }
304
348
  };
305
349
  //#endregion
350
+ //#region meta-schemas/property-name.json
351
+ var property_name_default = {
352
+ $schema: "https://json-schema.org/draft/2020-12/schema",
353
+ title: "PropertyName",
354
+ type: "string",
355
+ pattern: "^[^.]+$",
356
+ description: "The name of a single user attribute."
357
+ };
358
+ //#endregion
306
359
  //#region meta-schemas/user-property.json
307
360
  var user_property_default = {
308
361
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -353,7 +406,8 @@ var user_property_default = {
353
406
  "properties": {
354
407
  "type": "object",
355
408
  "description": "A map of additional properties for the user definition, where the key is the property name and the value is the property schema",
356
- "additionalProperties": true
409
+ "propertyNames": { "$ref": "property-name.json" },
410
+ "additionalProperties": { "$ref": "user-property.json" }
357
411
  }
358
412
  }
359
413
  };
@@ -397,6 +451,7 @@ var user_schema_default = {
397
451
  "properties": {
398
452
  "type": "object",
399
453
  "description": "A map of additional properties for the user definition, where the key is the property name and the value is the property schema",
454
+ "propertyNames": { "$ref": "property-name.json" },
400
455
  "additionalProperties": { "$ref": "user-property.json" }
401
456
  }
402
457
  }
@@ -422,6 +477,11 @@ const META_SCHEMA_DIR = ".zitadel/meta";
422
477
  */
423
478
  const FLOW_FILE_SCHEMA_REF = "../meta/flow-definition.json";
424
479
  /**
480
+ * The `$schema` value scaffolded branding files carry, relative to
481
+ * `.zitadel/branding/` — resolves to `{@link META_SCHEMA_DIR}/branding.json`.
482
+ */
483
+ const BRANDING_FILE_SCHEMA_REF = "../meta/branding.json";
484
+ /**
425
485
  * The dialect files to materialize, in write order. `auth-methods.json` and
426
486
  * `auth-method.json` are pulled in by `user-schema.json`'s relative `$ref`s —
427
487
  * without them the copied dialect cannot resolve offline.
@@ -440,6 +500,10 @@ function metaSchemaFiles() {
440
500
  name: "user-property.json",
441
501
  body: user_property_default
442
502
  },
503
+ {
504
+ name: "property-name.json",
505
+ body: property_name_default
506
+ },
443
507
  {
444
508
  name: "auth-methods.json",
445
509
  body: auth_methods_default
@@ -447,10 +511,14 @@ function metaSchemaFiles() {
447
511
  {
448
512
  name: "auth-method.json",
449
513
  body: auth_method_default
514
+ },
515
+ {
516
+ name: "branding.json",
517
+ body: branding_default
450
518
  }
451
519
  ];
452
520
  }
453
521
  //#endregion
454
- export { META_SCHEMA_DIR as n, metaSchemaFiles as r, FLOW_FILE_SCHEMA_REF as t };
522
+ export { metaSchemaFiles as i, FLOW_FILE_SCHEMA_REF as n, META_SCHEMA_DIR as r, BRANDING_FILE_SCHEMA_REF as t };
455
523
 
456
- //# sourceMappingURL=meta-schemas-8nlyVL7g.mjs.map
524
+ //# sourceMappingURL=meta-schemas-B4YiHAX_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta-schemas-B4YiHAX_.mjs","names":["flowDefinitionMetaSchema","userSchemaMetaSchema","userPropertyMetaSchema","propertyNameMetaSchema","authMethodsMetaSchema","authMethodMetaSchema","brandingMetaSchema"],"sources":["../meta-schemas/auth-method.json","../meta-schemas/auth-methods.json","../meta-schemas/branding.json","../meta-schemas/flow-definition.json","../meta-schemas/property-name.json","../meta-schemas/user-property.json","../meta-schemas/user-schema.json","../src/meta-schemas.ts"],"sourcesContent":["","","","","","","","/**\n * The dialect meta-schemas `zitadel setup` copies into a project's\n * `.zitadel/meta/` so the flow/schema dialect is machine-readable offline:\n * editors validate flow files against `flow-definition.json` via a relative\n * `$schema` pointer, and agents read the dialect files before authoring\n * edits — no docs crawl, no hosted schema required.\n *\n * The files under `meta-schemas/` are committed copies of\n * `api/openapi/endpoints/schemas/*.json` (the source the server embeds);\n * a drift-audit test keeps them byte-identical in the monorepo.\n */\nimport authMethodMetaSchema from \"../meta-schemas/auth-method.json\" with {\n type: \"json\",\n};\nimport authMethodsMetaSchema from \"../meta-schemas/auth-methods.json\" with {\n type: \"json\",\n};\nimport brandingMetaSchema from \"../meta-schemas/branding.json\" with {\n type: \"json\",\n};\nimport flowDefinitionMetaSchema from \"../meta-schemas/flow-definition.json\" with {\n type: \"json\",\n};\nimport propertyNameMetaSchema from \"../meta-schemas/property-name.json\" with {\n type: \"json\",\n};\nimport userPropertyMetaSchema from \"../meta-schemas/user-property.json\" with {\n type: \"json\",\n};\nimport userSchemaMetaSchema from \"../meta-schemas/user-schema.json\" with {\n type: \"json\",\n};\n\n/** Project-relative directory setup writes the meta-schemas to. */\nexport const META_SCHEMA_DIR = \".zitadel/meta\";\n\n/**\n * The `$schema` value scaffolded flow files carry, relative to\n * `.zitadel/flows/` — resolves to `{@link META_SCHEMA_DIR}/flow-definition.json`.\n */\nexport const FLOW_FILE_SCHEMA_REF = \"../meta/flow-definition.json\";\n\n/**\n * The `$schema` value scaffolded branding files carry, relative to\n * `.zitadel/branding/` — resolves to `{@link META_SCHEMA_DIR}/branding.json`.\n */\nexport const BRANDING_FILE_SCHEMA_REF = \"../meta/branding.json\";\n\nexport type MetaSchemaFile = { name: string; body: object };\n\n/**\n * The dialect files to materialize, in write order. `auth-methods.json` and\n * `auth-method.json` are pulled in by `user-schema.json`'s relative `$ref`s —\n * without them the copied dialect cannot resolve offline.\n */\nexport function metaSchemaFiles(): ReadonlyArray<MetaSchemaFile> {\n return [\n { name: \"flow-definition.json\", body: flowDefinitionMetaSchema as object },\n { name: \"user-schema.json\", body: userSchemaMetaSchema as object },\n { name: \"user-property.json\", body: userPropertyMetaSchema as object },\n { name: \"property-name.json\", body: propertyNameMetaSchema as object },\n { name: \"auth-methods.json\", body: authMethodsMetaSchema as object },\n { name: \"auth-method.json\", body: authMethodMetaSchema as object },\n { name: \"branding.json\", body: brandingMetaSchema as object },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AOkCA,MAAa,kBAAkB;;;;;AAM/B,MAAa,uBAAuB;;;;;AAMpC,MAAa,2BAA2B;;;;;;AASxC,SAAgB,kBAAiD;AAC/D,QAAO;EACL;GAAE,MAAM;GAAwB,MAAMA;GAAoC;EAC1E;GAAE,MAAM;GAAoB,MAAMC;GAAgC;EAClE;GAAE,MAAM;GAAsB,MAAMC;GAAkC;EACtE;GAAE,MAAM;GAAsB,MAAMC;GAAkC;EACtE;GAAE,MAAM;GAAqB,MAAMC;GAAiC;EACpE;GAAE,MAAM;GAAoB,MAAMC;GAAgC;EAClE;GAAE,MAAM;GAAiB,MAAMC;GAA8B;EAC9D"}
@@ -6,6 +6,11 @@ declare const META_SCHEMA_DIR = ".zitadel/meta";
6
6
  * `.zitadel/flows/` — resolves to `{@link META_SCHEMA_DIR}/flow-definition.json`.
7
7
  */
8
8
  declare const FLOW_FILE_SCHEMA_REF = "../meta/flow-definition.json";
9
+ /**
10
+ * The `$schema` value scaffolded branding files carry, relative to
11
+ * `.zitadel/branding/` — resolves to `{@link META_SCHEMA_DIR}/branding.json`.
12
+ */
13
+ declare const BRANDING_FILE_SCHEMA_REF = "../meta/branding.json";
9
14
  type MetaSchemaFile = {
10
15
  name: string;
11
16
  body: object;
@@ -17,5 +22,5 @@ type MetaSchemaFile = {
17
22
  */
18
23
  declare function metaSchemaFiles(): ReadonlyArray<MetaSchemaFile>;
19
24
  //#endregion
20
- export { FLOW_FILE_SCHEMA_REF, META_SCHEMA_DIR, MetaSchemaFile, metaSchemaFiles };
25
+ export { BRANDING_FILE_SCHEMA_REF, FLOW_FILE_SCHEMA_REF, META_SCHEMA_DIR, MetaSchemaFile, metaSchemaFiles };
21
26
  //# sourceMappingURL=meta-schemas.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta-schemas.d.mts","names":[],"sources":["../src/meta-schemas.ts"],"mappings":";;cA4Ba,eAAA;;;;;cAMA,oBAAA;AAAA,KAED,cAAA;EAAmB,IAAA;EAAc,IAAA;AAAA;AAA7C;;;;;AAAA,iBAOgB,eAAA,CAAA,GAAmB,aAAA,CAAc,cAAA"}
1
+ {"version":3,"file":"meta-schemas.d.mts","names":[],"sources":["../src/meta-schemas.ts"],"mappings":";;cAkCa,eAAA;;;;;cAMA,oBAAA;;;;;cAMA,wBAAA;AAAA,KAED,cAAA;EAAmB,IAAA;EAAc,IAAA;AAAA;AAA7C;;;;;AAAA,iBAOgB,eAAA,CAAA,GAAmB,aAAA,CAAc,cAAA"}
@@ -1,2 +1,2 @@
1
- import { n as META_SCHEMA_DIR, r as metaSchemaFiles, t as FLOW_FILE_SCHEMA_REF } from "./meta-schemas-8nlyVL7g.mjs";
2
- export { FLOW_FILE_SCHEMA_REF, META_SCHEMA_DIR, metaSchemaFiles };
1
+ import { i as metaSchemaFiles, n as FLOW_FILE_SCHEMA_REF, r as META_SCHEMA_DIR, t as BRANDING_FILE_SCHEMA_REF } from "./meta-schemas-B4YiHAX_.mjs";
2
+ export { BRANDING_FILE_SCHEMA_REF, FLOW_FILE_SCHEMA_REF, META_SCHEMA_DIR, metaSchemaFiles };
@@ -1,7 +1,20 @@
1
+ import { z } from "zod";
2
+
1
3
  //#region src/schemas.d.ts
2
4
  declare const schemaConfigSchema: any;
3
5
  declare const flowConfigSchema: any;
4
6
  declare const createFlowDefinitionRequestSchema: any;
7
+ /** The wire shape of a branding revision (`POST /branding` request body). */
8
+ declare const brandingWireSchema: any;
9
+ /**
10
+ * The local `.zitadel/branding/*.json` dialect: the wire shape plus
11
+ * `liquid_template_file`, a descriptor-relative path the CLI inlines into
12
+ * `liquid_template` when publishing. Exactly one of the two template carriers
13
+ * may be present (the meta-schema `branding.json` mirrors this).
14
+ */
15
+ declare const brandingConfigSchema: z.ZodObject<{
16
+ [x: string]: any;
17
+ }, z.core.$strict>;
5
18
  //#endregion
6
- export { createFlowDefinitionRequestSchema, flowConfigSchema, schemaConfigSchema };
19
+ export { brandingConfigSchema, brandingWireSchema, createFlowDefinitionRequestSchema, flowConfigSchema, schemaConfigSchema };
7
20
  //# sourceMappingURL=schemas.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.mts","names":[],"sources":["../src/schemas.ts"],"mappings":";cAKa,kBAAA;AAAA,cACA,gBAAA;AAAA,cACA,iCAAA"}
1
+ {"version":3,"file":"schemas.d.mts","names":[],"sources":["../src/schemas.ts"],"mappings":";;;cAQa,kBAAA;AAAA,cACA,gBAAA;AAAA,cACA,iCAAA;;cAGA,kBAAA;;;AAJb;;;;cAYa,oBAAA,EAAoB,CAAA,CAAA,SAAA;EAAA;GAuC/B,CAAA,CAAA,IAAA,CAAA,OAAA"}