@zitadel/config 0.1.0-alpha.16 → 0.1.0-alpha.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaults/README-branding.md +62 -0
- package/defaults/README-flows.md +0 -8
- package/defaults/branding/centered/login.liquid +164 -0
- package/defaults/branding/hero/login.liquid +222 -0
- package/defaults/branding/minimal/login.liquid +154 -0
- package/defaults/branding/split/login.liquid +178 -0
- package/defaults/branding/split-right/login.liquid +178 -0
- package/defaults/default-human-user.json +0 -15
- package/defaults/default-login.json +1 -4
- package/defaults/presets/passkey-first/human-user.json +0 -15
- package/defaults/presets/passkey-first/login.json +1 -4
- package/dist/defaults-Bh4_xVbh.d.mts +84 -0
- package/dist/defaults-Bh4_xVbh.d.mts.map +1 -0
- package/dist/{defaults-BQej3KIY.mjs → defaults-CXTnFMHj.mjs} +193 -65
- package/dist/defaults-CXTnFMHj.mjs.map +1 -0
- package/dist/defaults.d.mts +2 -2
- package/dist/defaults.mjs +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +5 -4
- package/dist/{meta-schemas-8nlyVL7g.mjs → meta-schemas-B4YiHAX_.mjs} +71 -3
- package/dist/meta-schemas-B4YiHAX_.mjs.map +1 -0
- package/dist/meta-schemas.d.mts +6 -1
- package/dist/meta-schemas.d.mts.map +1 -1
- package/dist/meta-schemas.mjs +2 -2
- package/dist/schemas.d.mts +14 -1
- package/dist/schemas.d.mts.map +1 -1
- package/dist/schemas.mjs +60 -2
- package/dist/schemas.mjs.map +1 -1
- package/dist/template.d.mts +76 -0
- package/dist/template.d.mts.map +1 -0
- package/dist/template.mjs +145 -0
- package/dist/template.mjs.map +1 -0
- package/dist/validate.d.mts.map +1 -1
- package/dist/validate.mjs +6 -1
- package/dist/validate.mjs.map +1 -1
- package/meta-schemas/branding.json +52 -0
- package/meta-schemas/property-name.json +7 -0
- package/meta-schemas/user-property.json +6 -1
- package/meta-schemas/user-schema.json +4 -1
- package/package.json +12 -4
- package/dist/defaults-BQej3KIY.mjs.map +0 -1
- package/dist/defaults-CSjBjBkQ.d.mts +0 -41
- package/dist/defaults-CSjBjBkQ.d.mts.map +0 -1
- package/dist/meta-schemas-8nlyVL7g.mjs.map +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<zl-page-shell data-zl-template-root>
|
|
2
|
+
<div class="zl-split">
|
|
3
|
+
<aside class="zl-split__brand">
|
|
4
|
+
{% if branding.logo_url %}
|
|
5
|
+
<img class="zl-split__logo" src="{{ branding.logo_url }}" alt="" />
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% if branding.hero_url %}
|
|
8
|
+
<img class="zl-split__hero" src="{{ branding.hero_url }}" alt="" />
|
|
9
|
+
{% endif %}
|
|
10
|
+
</aside>
|
|
11
|
+
<section class="zl-split__form">
|
|
12
|
+
{% if branding.logo_url %}
|
|
13
|
+
<img class="zl-split__compact" src="{{ branding.logo_url }}" alt="" />
|
|
14
|
+
{% elsif branding.hero_url %}
|
|
15
|
+
<img class="zl-split__compact zl-split__compact--hero" src="{{ branding.hero_url }}" alt="" />
|
|
16
|
+
{% endif %}
|
|
17
|
+
<zl-card>
|
|
18
|
+
<h1 slot="header" class="zl-card-title">{{ step.texts.title_key | t: identity.display_name }}</h1>
|
|
19
|
+
{% if step.texts.description_key %}
|
|
20
|
+
{% assign card_subtitle = step.texts.description_key | t: identity.display_name %}
|
|
21
|
+
{% if card_subtitle != "" %}
|
|
22
|
+
<p slot="header" class="zl-card-subtitle">{{ card_subtitle }}</p>
|
|
23
|
+
{% endif %}
|
|
24
|
+
{% endif %}
|
|
25
|
+
|
|
26
|
+
{% if errors and errors.size > 0 %}
|
|
27
|
+
{% for err in errors %}
|
|
28
|
+
{% if err | formLevelError %}
|
|
29
|
+
{% assign alert_heading = err.text_key | alertHeading %}
|
|
30
|
+
{% assign alert_body = err.text_key | alertBody %}
|
|
31
|
+
<zl-alert severity="error" dismissible data-zl-step-error{% if alert_heading != "" %} heading="{{ alert_heading | t }}"{% endif %}>
|
|
32
|
+
{% if alert_body != "" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}
|
|
33
|
+
</zl-alert>
|
|
34
|
+
{% endif %}
|
|
35
|
+
{% endfor %}
|
|
36
|
+
{% endif %}
|
|
37
|
+
|
|
38
|
+
{% for f in fields %}
|
|
39
|
+
{% assign field_placeholder = f.text_key | fieldPlaceholder %}
|
|
40
|
+
{% assign field_help = f.text_key | fieldHelp %}
|
|
41
|
+
{% assign field_err = f.name | fieldError: errors %}
|
|
42
|
+
{% case f.type %}
|
|
43
|
+
{% when 'checkbox' %}
|
|
44
|
+
<zl-checkbox
|
|
45
|
+
name="{{ f.name }}"
|
|
46
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
47
|
+
label="{{ f.text_key | t }}"
|
|
48
|
+
value="true"
|
|
49
|
+
{% if f.value %}checked{% endif %}
|
|
50
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
51
|
+
></zl-checkbox>
|
|
52
|
+
{% when 'select' %}
|
|
53
|
+
<zl-select
|
|
54
|
+
name="{{ f.name }}"
|
|
55
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
56
|
+
label="{{ f.text_key | t }}"
|
|
57
|
+
value="{{ f.value }}"
|
|
58
|
+
options='{{ f.validation.enum | selectOptions | json }}'
|
|
59
|
+
{% if f.required %}required{% endif %}
|
|
60
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
61
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
62
|
+
></zl-select>
|
|
63
|
+
{% else %}
|
|
64
|
+
{% assign autocomplete_val = '' %}
|
|
65
|
+
{% if f.name == 'email' %}
|
|
66
|
+
{% assign autocomplete_val = 'email' %}
|
|
67
|
+
{% elsif f.type == 'password' and step.name contains 'register' %}
|
|
68
|
+
{% assign autocomplete_val = 'new-password' %}
|
|
69
|
+
{% elsif f.type == 'password' %}
|
|
70
|
+
{% assign autocomplete_val = 'current-password' %}
|
|
71
|
+
{% endif %}
|
|
72
|
+
<zl-field
|
|
73
|
+
name="{{ f.name }}"
|
|
74
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
75
|
+
label="{{ f.text_key | t }}"
|
|
76
|
+
type="{{ f.type }}"
|
|
77
|
+
value="{{ f.value }}"
|
|
78
|
+
{% if autocomplete_val != '' %}autocomplete="{{ autocomplete_val }}"{% endif %}
|
|
79
|
+
{% if f.required %}required{% endif %}
|
|
80
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
81
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
82
|
+
>
|
|
83
|
+
{% if field_help != "" %}
|
|
84
|
+
<span slot="help">{{ field_help }}</span>
|
|
85
|
+
{% endif %}
|
|
86
|
+
</zl-field>
|
|
87
|
+
{% endcase %}
|
|
88
|
+
{% endfor %}
|
|
89
|
+
|
|
90
|
+
{% assign recover = actions | where: "name", "recover" | first %}
|
|
91
|
+
{% if recover %}
|
|
92
|
+
<p class="zl-card-forgot">
|
|
93
|
+
<a href="#" class="zl-card-forgot__link" data-action="recover">{{ recover.text_key | t }}</a>
|
|
94
|
+
</p>
|
|
95
|
+
{% endif %}
|
|
96
|
+
|
|
97
|
+
{% for a in actions %}
|
|
98
|
+
{% if a.primary %}
|
|
99
|
+
<zl-button
|
|
100
|
+
hierarchy="primary"
|
|
101
|
+
size="medium"
|
|
102
|
+
type="submit"
|
|
103
|
+
block
|
|
104
|
+
action="{{ a.name }}"
|
|
105
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
106
|
+
label="{{ a.text_key | t }}"
|
|
107
|
+
{% if loading %}loading{% endif %}
|
|
108
|
+
></zl-button>
|
|
109
|
+
{% endif %}
|
|
110
|
+
{% endfor %}
|
|
111
|
+
|
|
112
|
+
{% for a in actions %}
|
|
113
|
+
{% unless a.primary or a.kind == 'back' or a.name == 'passkey' or a.name == 'register' or a.name == 'sign_in' or a.name == 'recover' %}
|
|
114
|
+
<zl-button
|
|
115
|
+
hierarchy="secondary"
|
|
116
|
+
size="medium"
|
|
117
|
+
type="button"
|
|
118
|
+
block
|
|
119
|
+
action="{{ a.name }}"
|
|
120
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
121
|
+
label="{{ a.text_key | t }}"
|
|
122
|
+
></zl-button>
|
|
123
|
+
{% endunless %}
|
|
124
|
+
{% endfor %}
|
|
125
|
+
|
|
126
|
+
{% assign passkey = actions | where: "name", "passkey" | first %}
|
|
127
|
+
{% if passkey %}
|
|
128
|
+
{% unless passkey.primary %}
|
|
129
|
+
<zl-button
|
|
130
|
+
hierarchy="secondary"
|
|
131
|
+
size="medium"
|
|
132
|
+
block
|
|
133
|
+
action="passkey"
|
|
134
|
+
data-testid="zitadel-action-passkey"
|
|
135
|
+
label="{{ passkey.text_key | t }}"
|
|
136
|
+
></zl-button>
|
|
137
|
+
{% endunless %}
|
|
138
|
+
{% endif %}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
{% assign register = actions | where: "name", "register" | first %}
|
|
142
|
+
{% if register %}
|
|
143
|
+
<p class="zl-card-nav">
|
|
144
|
+
{{ 'identifier.action.register.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="register" data-testid="zitadel-action-register-link">{{ 'identifier.action.register.link' | t }}</a>
|
|
145
|
+
</p>
|
|
146
|
+
{% endif %}
|
|
147
|
+
|
|
148
|
+
{% assign sign_in = actions | where: "name", "sign_in" | first %}
|
|
149
|
+
{% if sign_in %}
|
|
150
|
+
<p class="zl-card-nav">
|
|
151
|
+
{{ 'register.action.sign_in.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="sign_in" data-testid="zitadel-action-sign_in-link">{{ 'register.action.sign_in.link' | t }}</a>
|
|
152
|
+
</p>
|
|
153
|
+
{% endif %}
|
|
154
|
+
|
|
155
|
+
{% if challenge %}
|
|
156
|
+
{% if challenge.method == "passkey" or challenge.method == "passkey_register" %}
|
|
157
|
+
{% assign ceremony = "authenticate" %}
|
|
158
|
+
{% assign submit_method = challenge.method %}
|
|
159
|
+
{% if challenge.method == "passkey_register" or challenge.options.user %}
|
|
160
|
+
{% assign ceremony = "register" %}
|
|
161
|
+
{% assign submit_method = "passkey_register" %}
|
|
162
|
+
{% endif %}
|
|
163
|
+
<zl-passkey
|
|
164
|
+
ceremony="{{ ceremony }}"
|
|
165
|
+
method="{{ submit_method }}"
|
|
166
|
+
challenge-id="{{ challenge.challenge_id }}"
|
|
167
|
+
options='{{ challenge.options | json }}'
|
|
168
|
+
pending-label="{{ 'passkey.pending.status' | t }}"
|
|
169
|
+
cancel-label="{{ 'action.cancel' | t }}"
|
|
170
|
+
></zl-passkey>
|
|
171
|
+
{% endif %}
|
|
172
|
+
{% endif %}
|
|
173
|
+
|
|
174
|
+
{% mandatory_gates %}
|
|
175
|
+
</zl-card>
|
|
176
|
+
</section>
|
|
177
|
+
</div>
|
|
178
|
+
</zl-page-shell>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<zl-page-shell data-zl-template-root>
|
|
2
|
+
<div class="zl-split zl-split--right">
|
|
3
|
+
<aside class="zl-split__brand">
|
|
4
|
+
{% if branding.logo_url %}
|
|
5
|
+
<img class="zl-split__logo" src="{{ branding.logo_url }}" alt="" />
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% if branding.hero_url %}
|
|
8
|
+
<img class="zl-split__hero" src="{{ branding.hero_url }}" alt="" />
|
|
9
|
+
{% endif %}
|
|
10
|
+
</aside>
|
|
11
|
+
<section class="zl-split__form">
|
|
12
|
+
{% if branding.logo_url %}
|
|
13
|
+
<img class="zl-split__compact" src="{{ branding.logo_url }}" alt="" />
|
|
14
|
+
{% elsif branding.hero_url %}
|
|
15
|
+
<img class="zl-split__compact zl-split__compact--hero" src="{{ branding.hero_url }}" alt="" />
|
|
16
|
+
{% endif %}
|
|
17
|
+
<zl-card>
|
|
18
|
+
<h1 slot="header" class="zl-card-title">{{ step.texts.title_key | t: identity.display_name }}</h1>
|
|
19
|
+
{% if step.texts.description_key %}
|
|
20
|
+
{% assign card_subtitle = step.texts.description_key | t: identity.display_name %}
|
|
21
|
+
{% if card_subtitle != "" %}
|
|
22
|
+
<p slot="header" class="zl-card-subtitle">{{ card_subtitle }}</p>
|
|
23
|
+
{% endif %}
|
|
24
|
+
{% endif %}
|
|
25
|
+
|
|
26
|
+
{% if errors and errors.size > 0 %}
|
|
27
|
+
{% for err in errors %}
|
|
28
|
+
{% if err | formLevelError %}
|
|
29
|
+
{% assign alert_heading = err.text_key | alertHeading %}
|
|
30
|
+
{% assign alert_body = err.text_key | alertBody %}
|
|
31
|
+
<zl-alert severity="error" dismissible data-zl-step-error{% if alert_heading != "" %} heading="{{ alert_heading | t }}"{% endif %}>
|
|
32
|
+
{% if alert_body != "" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}
|
|
33
|
+
</zl-alert>
|
|
34
|
+
{% endif %}
|
|
35
|
+
{% endfor %}
|
|
36
|
+
{% endif %}
|
|
37
|
+
|
|
38
|
+
{% for f in fields %}
|
|
39
|
+
{% assign field_placeholder = f.text_key | fieldPlaceholder %}
|
|
40
|
+
{% assign field_help = f.text_key | fieldHelp %}
|
|
41
|
+
{% assign field_err = f.name | fieldError: errors %}
|
|
42
|
+
{% case f.type %}
|
|
43
|
+
{% when 'checkbox' %}
|
|
44
|
+
<zl-checkbox
|
|
45
|
+
name="{{ f.name }}"
|
|
46
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
47
|
+
label="{{ f.text_key | t }}"
|
|
48
|
+
value="true"
|
|
49
|
+
{% if f.value %}checked{% endif %}
|
|
50
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
51
|
+
></zl-checkbox>
|
|
52
|
+
{% when 'select' %}
|
|
53
|
+
<zl-select
|
|
54
|
+
name="{{ f.name }}"
|
|
55
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
56
|
+
label="{{ f.text_key | t }}"
|
|
57
|
+
value="{{ f.value }}"
|
|
58
|
+
options='{{ f.validation.enum | selectOptions | json }}'
|
|
59
|
+
{% if f.required %}required{% endif %}
|
|
60
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
61
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
62
|
+
></zl-select>
|
|
63
|
+
{% else %}
|
|
64
|
+
{% assign autocomplete_val = '' %}
|
|
65
|
+
{% if f.name == 'email' %}
|
|
66
|
+
{% assign autocomplete_val = 'email' %}
|
|
67
|
+
{% elsif f.type == 'password' and step.name contains 'register' %}
|
|
68
|
+
{% assign autocomplete_val = 'new-password' %}
|
|
69
|
+
{% elsif f.type == 'password' %}
|
|
70
|
+
{% assign autocomplete_val = 'current-password' %}
|
|
71
|
+
{% endif %}
|
|
72
|
+
<zl-field
|
|
73
|
+
name="{{ f.name }}"
|
|
74
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
75
|
+
label="{{ f.text_key | t }}"
|
|
76
|
+
type="{{ f.type }}"
|
|
77
|
+
value="{{ f.value }}"
|
|
78
|
+
{% if autocomplete_val != '' %}autocomplete="{{ autocomplete_val }}"{% endif %}
|
|
79
|
+
{% if f.required %}required{% endif %}
|
|
80
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
81
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
82
|
+
>
|
|
83
|
+
{% if field_help != "" %}
|
|
84
|
+
<span slot="help">{{ field_help }}</span>
|
|
85
|
+
{% endif %}
|
|
86
|
+
</zl-field>
|
|
87
|
+
{% endcase %}
|
|
88
|
+
{% endfor %}
|
|
89
|
+
|
|
90
|
+
{% assign recover = actions | where: "name", "recover" | first %}
|
|
91
|
+
{% if recover %}
|
|
92
|
+
<p class="zl-card-forgot">
|
|
93
|
+
<a href="#" class="zl-card-forgot__link" data-action="recover">{{ recover.text_key | t }}</a>
|
|
94
|
+
</p>
|
|
95
|
+
{% endif %}
|
|
96
|
+
|
|
97
|
+
{% for a in actions %}
|
|
98
|
+
{% if a.primary %}
|
|
99
|
+
<zl-button
|
|
100
|
+
hierarchy="primary"
|
|
101
|
+
size="medium"
|
|
102
|
+
type="submit"
|
|
103
|
+
block
|
|
104
|
+
action="{{ a.name }}"
|
|
105
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
106
|
+
label="{{ a.text_key | t }}"
|
|
107
|
+
{% if loading %}loading{% endif %}
|
|
108
|
+
></zl-button>
|
|
109
|
+
{% endif %}
|
|
110
|
+
{% endfor %}
|
|
111
|
+
|
|
112
|
+
{% for a in actions %}
|
|
113
|
+
{% unless a.primary or a.kind == 'back' or a.name == 'passkey' or a.name == 'register' or a.name == 'sign_in' or a.name == 'recover' %}
|
|
114
|
+
<zl-button
|
|
115
|
+
hierarchy="secondary"
|
|
116
|
+
size="medium"
|
|
117
|
+
type="button"
|
|
118
|
+
block
|
|
119
|
+
action="{{ a.name }}"
|
|
120
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
121
|
+
label="{{ a.text_key | t }}"
|
|
122
|
+
></zl-button>
|
|
123
|
+
{% endunless %}
|
|
124
|
+
{% endfor %}
|
|
125
|
+
|
|
126
|
+
{% assign passkey = actions | where: "name", "passkey" | first %}
|
|
127
|
+
{% if passkey %}
|
|
128
|
+
{% unless passkey.primary %}
|
|
129
|
+
<zl-button
|
|
130
|
+
hierarchy="secondary"
|
|
131
|
+
size="medium"
|
|
132
|
+
block
|
|
133
|
+
action="passkey"
|
|
134
|
+
data-testid="zitadel-action-passkey"
|
|
135
|
+
label="{{ passkey.text_key | t }}"
|
|
136
|
+
></zl-button>
|
|
137
|
+
{% endunless %}
|
|
138
|
+
{% endif %}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
{% assign register = actions | where: "name", "register" | first %}
|
|
142
|
+
{% if register %}
|
|
143
|
+
<p class="zl-card-nav">
|
|
144
|
+
{{ 'identifier.action.register.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="register" data-testid="zitadel-action-register-link">{{ 'identifier.action.register.link' | t }}</a>
|
|
145
|
+
</p>
|
|
146
|
+
{% endif %}
|
|
147
|
+
|
|
148
|
+
{% assign sign_in = actions | where: "name", "sign_in" | first %}
|
|
149
|
+
{% if sign_in %}
|
|
150
|
+
<p class="zl-card-nav">
|
|
151
|
+
{{ 'register.action.sign_in.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="sign_in" data-testid="zitadel-action-sign_in-link">{{ 'register.action.sign_in.link' | t }}</a>
|
|
152
|
+
</p>
|
|
153
|
+
{% endif %}
|
|
154
|
+
|
|
155
|
+
{% if challenge %}
|
|
156
|
+
{% if challenge.method == "passkey" or challenge.method == "passkey_register" %}
|
|
157
|
+
{% assign ceremony = "authenticate" %}
|
|
158
|
+
{% assign submit_method = challenge.method %}
|
|
159
|
+
{% if challenge.method == "passkey_register" or challenge.options.user %}
|
|
160
|
+
{% assign ceremony = "register" %}
|
|
161
|
+
{% assign submit_method = "passkey_register" %}
|
|
162
|
+
{% endif %}
|
|
163
|
+
<zl-passkey
|
|
164
|
+
ceremony="{{ ceremony }}"
|
|
165
|
+
method="{{ submit_method }}"
|
|
166
|
+
challenge-id="{{ challenge.challenge_id }}"
|
|
167
|
+
options='{{ challenge.options | json }}'
|
|
168
|
+
pending-label="{{ 'passkey.pending.status' | t }}"
|
|
169
|
+
cancel-label="{{ 'action.cancel' | t }}"
|
|
170
|
+
></zl-passkey>
|
|
171
|
+
{% endif %}
|
|
172
|
+
{% endif %}
|
|
173
|
+
|
|
174
|
+
{% mandatory_gates %}
|
|
175
|
+
</zl-card>
|
|
176
|
+
</section>
|
|
177
|
+
</div>
|
|
178
|
+
</zl-page-shell>
|
|
@@ -26,21 +26,6 @@
|
|
|
26
26
|
"format": "email",
|
|
27
27
|
"x-unique": "project",
|
|
28
28
|
"description": "The user's email address."
|
|
29
|
-
},
|
|
30
|
-
"givenName": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"maxLength": 50,
|
|
33
|
-
"description": "The user's given (first) name."
|
|
34
|
-
},
|
|
35
|
-
"familyName": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"maxLength": 50,
|
|
38
|
-
"description": "The user's family (last) name."
|
|
39
|
-
},
|
|
40
|
-
"dateOfBirth": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"format": "date",
|
|
43
|
-
"description": "The user's date of birth (ISO 8601, YYYY-MM-DD)."
|
|
44
29
|
}
|
|
45
30
|
}
|
|
46
31
|
}
|
|
@@ -26,21 +26,6 @@
|
|
|
26
26
|
"format": "email",
|
|
27
27
|
"x-unique": "project",
|
|
28
28
|
"description": "The user's email address."
|
|
29
|
-
},
|
|
30
|
-
"givenName": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"maxLength": 50,
|
|
33
|
-
"description": "The user's given (first) name."
|
|
34
|
-
},
|
|
35
|
-
"familyName": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"maxLength": 50,
|
|
38
|
-
"description": "The user's family (last) name."
|
|
39
|
-
},
|
|
40
|
-
"dateOfBirth": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"format": "date",
|
|
43
|
-
"description": "The user's date of birth (ISO 8601, YYYY-MM-DD)."
|
|
44
29
|
}
|
|
45
30
|
}
|
|
46
31
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { CreateFlowDefinitionBodyFlowDefinition, CreateSchemaBody } from "@zitadel/api/generated/model";
|
|
2
|
+
|
|
3
|
+
//#region src/readmes.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* README content the CLI copies to `.zitadel/schemas/README.md` during setup.
|
|
6
|
+
* Source of truth is `packages/config/defaults/README-schemas.md`; the Go
|
|
7
|
+
* server-side embed reads the same file (see `defaults.go`).
|
|
8
|
+
*/
|
|
9
|
+
declare function schemasReadmeContent(): string;
|
|
10
|
+
/**
|
|
11
|
+
* README content the CLI copies to `.zitadel/flows/README.md` during setup.
|
|
12
|
+
* Source of truth is `packages/config/defaults/README-flows.md`.
|
|
13
|
+
*/
|
|
14
|
+
declare function flowsReadmeContent(): string;
|
|
15
|
+
/**
|
|
16
|
+
* README content the CLI copies to `.zitadel/branding/README.md` when a
|
|
17
|
+
* branding design is ejected. Source of truth is
|
|
18
|
+
* `packages/config/defaults/README-branding.md`.
|
|
19
|
+
*/
|
|
20
|
+
declare function brandingReadmeContent(): string;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/defaults.d.ts
|
|
23
|
+
declare const DEFAULT_BUILTIN_SCHEMA_BASE = "https://nextgen.com/api/schemas";
|
|
24
|
+
declare const DEFAULT_FLOW_SCHEMA_URI = "https://nextgen.com/flow-definition.json";
|
|
25
|
+
declare const DEFAULT_SCHEMA_CONFIG_PATH = ".zitadel/schemas/default-human-user.json";
|
|
26
|
+
declare const DEFAULT_FLOW_CONFIG_PATH = ".zitadel/flows/default-login.json";
|
|
27
|
+
declare const DEFAULT_BRANDING_CONFIG_PATH = ".zitadel/branding/branding.json";
|
|
28
|
+
declare const DEFAULT_BRANDING_TEMPLATE_PATH = ".zitadel/branding/login.liquid";
|
|
29
|
+
/**
|
|
30
|
+
* Named schema+flow bundles `zitadel setup` can scaffold (#448: the prompt
|
|
31
|
+
* fires before any `.zitadel/` file is written; each preset maps to a
|
|
32
|
+
* pre-defined bundle the CLI copies on first setup). `password-first` is
|
|
33
|
+
* today's default; `passkey-first` puts a passkey ceremony on the login
|
|
34
|
+
* entry step with an email→password fallback path.
|
|
35
|
+
*/
|
|
36
|
+
declare const SETUP_PRESETS: readonly ["password-first", "passkey-first"];
|
|
37
|
+
type SetupPreset = (typeof SETUP_PRESETS)[number];
|
|
38
|
+
declare const DEFAULT_SETUP_PRESET: SetupPreset;
|
|
39
|
+
/**
|
|
40
|
+
* Login-design starting points `zitadel branding eject --design <name>` (and
|
|
41
|
+
* `zitadel setup --design <name>`) scaffold into `.zitadel/branding/`. A
|
|
42
|
+
* design is a full Liquid template plus the descriptor `layout` it degrades
|
|
43
|
+
* to — the wire `layout` enum stays `centered | split`, richer designs are
|
|
44
|
+
* delivered as templates (ADR 040).
|
|
45
|
+
*/
|
|
46
|
+
declare const BRANDING_DESIGNS: readonly ["centered", "split", "split-right", "hero", "minimal"];
|
|
47
|
+
type BrandingDesign = (typeof BRANDING_DESIGNS)[number];
|
|
48
|
+
declare const DEFAULT_BRANDING_DESIGN: BrandingDesign;
|
|
49
|
+
type DefaultBrandingConfig = {
|
|
50
|
+
/** The `.zitadel/branding/branding.json` descriptor body (sans `$schema`). */branding: {
|
|
51
|
+
layout: "centered" | "split";
|
|
52
|
+
liquid_template_file: string;
|
|
53
|
+
}; /** The `.zitadel/branding/login.liquid` template content. */
|
|
54
|
+
template: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Renders the scaffold files for a branding design. The `centered` template
|
|
58
|
+
* is a drift-tested copy of the bundled default in `@zitadel/components`;
|
|
59
|
+
* the other designs are authored variants of it.
|
|
60
|
+
*/
|
|
61
|
+
declare function getDefaultBrandingConfig(design?: string): DefaultBrandingConfig;
|
|
62
|
+
/**
|
|
63
|
+
* The second setup axis (#448): *who* signs in, orthogonal to the sign-in
|
|
64
|
+
* preset (*how* they sign in). The sign-in preset owns the flow shape and
|
|
65
|
+
* auth methods; the use case owns which profile fields the schema collects.
|
|
66
|
+
* Composing the two keeps us at one field catalog + one flow-per-preset
|
|
67
|
+
* instead of a bundle per (use case × preset) pair. `minimal` is the
|
|
68
|
+
* default and never blocks non-interactive runs.
|
|
69
|
+
*/
|
|
70
|
+
declare const SETUP_USE_CASES: readonly ["minimal", "consumer", "business"];
|
|
71
|
+
type SetupUseCase = (typeof SETUP_USE_CASES)[number];
|
|
72
|
+
declare const DEFAULT_SETUP_USE_CASE: SetupUseCase;
|
|
73
|
+
type DefaultConfigRenderOptions = {
|
|
74
|
+
builtinSchemaBase?: string;
|
|
75
|
+
userSchemaUrl?: string; /** Which flow/auth bundle to render; defaults to {@link DEFAULT_SETUP_PRESET}. */
|
|
76
|
+
preset?: string; /** Which field set to collect; defaults to {@link DEFAULT_SETUP_USE_CASE}. */
|
|
77
|
+
useCase?: string;
|
|
78
|
+
};
|
|
79
|
+
declare function defaultHumanUserSchemaUrl(builtinSchemaBase?: string): string;
|
|
80
|
+
declare function getDefaultHumanUserSchema(options?: DefaultConfigRenderOptions): CreateSchemaBody;
|
|
81
|
+
declare function getDefaultLoginFlow(options?: DefaultConfigRenderOptions): CreateFlowDefinitionBodyFlowDefinition;
|
|
82
|
+
//#endregion
|
|
83
|
+
export { flowsReadmeContent as C, brandingReadmeContent as S, SetupUseCase as _, DEFAULT_BRANDING_TEMPLATE_PATH as a, getDefaultHumanUserSchema as b, DEFAULT_FLOW_SCHEMA_URI as c, DEFAULT_SETUP_USE_CASE as d, DefaultBrandingConfig as f, SetupPreset as g, SETUP_USE_CASES as h, DEFAULT_BRANDING_DESIGN as i, DEFAULT_SCHEMA_CONFIG_PATH as l, SETUP_PRESETS as m, BrandingDesign as n, DEFAULT_BUILTIN_SCHEMA_BASE as o, DefaultConfigRenderOptions as p, DEFAULT_BRANDING_CONFIG_PATH as r, DEFAULT_FLOW_CONFIG_PATH as s, BRANDING_DESIGNS as t, DEFAULT_SETUP_PRESET as u, defaultHumanUserSchemaUrl as v, schemasReadmeContent as w, getDefaultLoginFlow as x, getDefaultBrandingConfig as y };
|
|
84
|
+
//# sourceMappingURL=defaults-Bh4_xVbh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults-Bh4_xVbh.d.mts","names":[],"sources":["../src/readmes.ts","../src/defaults.ts"],"mappings":";;;;;;AAQA;;iBAAgB,oBAAA,CAAA;;;AAQhB;;iBAAgB,kBAAA,CAAA;;;AAShB;;;iBAAgB,qBAAA,CAAA;;;cCFH,2BAAA;AAAA,cACA,uBAAA;AAAA,cACA,0BAAA;AAAA,cACA,wBAAA;AAAA,cACA,4BAAA;AAAA,cACA,8BAAA;ADZb;;;;;AASA;;AATA,cCqBa,aAAA;AAAA,KAED,WAAA,WAAsB,aAAA;AAAA,cAErB,oBAAA,EAAsB,WAAA;;;;AAlBnC;;;;cAkDa,gBAAA;AAAA,KAED,cAAA,WAAyB,gBAAA;AAAA,cAExB,uBAAA,EAAyB,cAAA;AAAA,KAW1B,qBAAA;EAhEwB,8EAkElC,QAAA;IACE,MAAA;IACA,oBAAA;EAAA,GAnEmC;EAsErC,QAAA;AAAA;;;;;AApEF;iBA4EgB,wBAAA,CACd,MAAA,YACC,qBAAA;;;;AA7EH;;;;;cAgHa,eAAA;AAAA,KAED,YAAA,WAAuB,eAAA;AAAA,cAEtB,sBAAA,EAAwB,YAAA;AAAA,KA0GzB,0BAAA;EACV,iBAAA;EACA,aAAA,WArNqB;EAuNrB,MAAA,WAvNgC;EAyNhC,OAAA;AAAA;AAAA,iBAGc,yBAAA,CACd,iBAAA;AAAA,iBAKc,yBAAA,CACd,OAAA,GAAS,0BAAA,GACR,gBAAA;AAAA,iBAca,mBAAA,CACd,OAAA,GAAS,0BAAA,GACR,sCAAA"}
|