@fleetless/contracts 5.3.0-next.1 → 6.0.0-next.2
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/CHANGELOG.md +108 -33
- package/artifacts/openapi.json +2053 -784
- package/artifacts/routes.json +1680 -323
- package/artifacts/schema/accept-team-invite-request.schema.json +13 -7
- package/artifacts/schema/app-auth-config.schema.json +108 -4
- package/artifacts/schema/app-hosted-pages.schema.json +33 -0
- package/artifacts/schema/app-invitation.schema.json +5 -12
- package/artifacts/schema/app-mail-template-list-response.schema.json +4 -3
- package/artifacts/schema/app-mail-template.schema.json +3 -2
- package/artifacts/schema/app-sign-in-methods.schema.json +19 -0
- package/artifacts/schema/app-user-list-response.schema.json +36 -0
- package/artifacts/schema/app-user.schema.json +36 -0
- package/artifacts/schema/audit-query.schema.json +0 -6
- package/artifacts/schema/auth-me-response.schema.json +27 -0
- package/artifacts/schema/auth-ok.schema.json +13 -1
- package/artifacts/schema/client-accept-invitation-request.schema.json +3 -4
- package/artifacts/schema/client-identity.schema.json +13 -1
- package/artifacts/schema/client-login-code-request.schema.json +24 -0
- package/artifacts/schema/client-login-code-verify-request.schema.json +30 -0
- package/artifacts/schema/client-provider-list-response.schema.json +22 -2
- package/artifacts/schema/client-register-request.schema.json +3 -4
- package/artifacts/schema/client-sign-in-result.schema.json +55 -0
- package/artifacts/schema/client-two-factor-disable-request.schema.json +15 -0
- package/artifacts/schema/client-two-factor-setup-confirm-request.schema.json +20 -0
- package/artifacts/schema/client-two-factor-setup-confirm-response.schema.json +49 -0
- package/artifacts/schema/client-two-factor-setup-request.schema.json +12 -0
- package/artifacts/schema/client-two-factor-verify-request.schema.json +25 -0
- package/artifacts/schema/create-app-invitation-request.schema.json +1 -1
- package/artifacts/schema/create-passkey-request.schema.json +25 -0
- package/artifacts/schema/create-passkey-response.schema.json +84 -0
- package/artifacts/schema/developer-passkey.schema.json +56 -0
- package/artifacts/schema/developer-two-factor.schema.json +105 -0
- package/artifacts/schema/fleetless-user-list-response.schema.json +22 -0
- package/artifacts/schema/fleetless-user.schema.json +22 -0
- package/artifacts/schema/invalid-code-details.schema.json +16 -0
- package/artifacts/schema/job-actor.schema.json +1 -15
- package/artifacts/schema/job-run-list-response.schema.json +1 -15
- package/artifacts/schema/job-run.schema.json +1 -15
- package/artifacts/schema/org.schema.json +5 -0
- package/artifacts/schema/patch-org-request.schema.json +5 -3
- package/artifacts/schema/patch-org-response.schema.json +5 -0
- package/artifacts/schema/put-app-auth-look-request.schema.json +22 -0
- package/artifacts/schema/put-app-auth-mcp-request.schema.json +1 -14
- package/artifacts/schema/put-app-auth-sign-in-request.schema.json +39 -0
- package/artifacts/schema/put-app-auth-urls-request.schema.json +31 -4
- package/artifacts/schema/recovery-codes-response.schema.json +20 -0
- package/artifacts/schema/{role-rename-request.schema.json → rename-passkey-request.schema.json} +2 -2
- package/artifacts/schema/role-list-response.schema.json +1 -1
- package/artifacts/schema/role.schema.json +1 -1
- package/artifacts/schema/totp-confirm-request.schema.json +15 -0
- package/artifacts/schema/totp-confirm-response.schema.json +27 -0
- package/artifacts/schema/two-factor-challenge.schema.json +24 -0
- package/artifacts/schema/two-factor-setup-response.schema.json +21 -0
- package/artifacts/schema/webauthn-options-response.schema.json +18 -0
- package/dist/app-users.d.ts +154 -35
- package/dist/app-users.js +177 -46
- package/dist/apps.d.ts +2 -38
- package/dist/apps.js +3 -46
- package/dist/audit.d.ts +0 -1
- package/dist/audit.js +0 -13
- package/dist/client-auth.d.ts +133 -24
- package/dist/client-auth.js +139 -28
- package/dist/config.d.ts +2 -2
- package/dist/errors.d.ts +10 -1
- package/dist/errors.js +37 -38
- package/dist/identity.d.ts +175 -128
- package/dist/identity.js +192 -106
- package/dist/index.d.ts +11 -13
- package/dist/index.js +12 -10
- package/dist/jobs.d.ts +0 -3
- package/dist/jobs.js +0 -16
- package/dist/protocol.d.ts +1 -1
- package/dist/realtime.d.ts +1 -0
- package/dist/rest.d.ts +2 -2
- package/dist/rest.js +17 -28
- package/dist/routes.d.ts +26 -0
- package/dist/routes.js +528 -234
- package/package.json +1 -1
- package/artifacts/schema/developer-login-request.schema.json +0 -19
- package/artifacts/schema/feedback-request.schema.json +0 -34
- package/artifacts/schema/feedback-response.schema.json +0 -27
- package/artifacts/schema/password-reset-confirm.schema.json +0 -19
- package/artifacts/schema/password-reset-request.schema.json +0 -14
- package/artifacts/schema/role-delete-query.schema.json +0 -13
- package/artifacts/schema/role-in-use-details.schema.json +0 -28
- package/artifacts/schema/sign-up-request.schema.json +0 -26
- package/artifacts/schema/sign-up-response.schema.json +0 -127
- package/dist/feedback.d.ts +0 -42
- package/dist/feedback.js +0 -35
|
@@ -7,16 +7,22 @@
|
|
|
7
7
|
"minLength": 1,
|
|
8
8
|
"description": "The opaque invitation token from the link. Unknown, expired and already-accepted all collapse into `410 token_spent` — telling them apart would say whether a token ever existed."
|
|
9
9
|
},
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
"display_name": {
|
|
11
|
+
"description": "An optional name, overriding whatever the invitation pre-filled. Absent keeps it.",
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 120
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "null"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
15
22
|
}
|
|
16
23
|
},
|
|
17
24
|
"required": [
|
|
18
|
-
"token"
|
|
19
|
-
"password"
|
|
25
|
+
"token"
|
|
20
26
|
],
|
|
21
27
|
"additionalProperties": false
|
|
22
28
|
}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"type": "null"
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
"description": "The page in the developer's app that accepts an invitation, with `{token}` where the token goes. `null`
|
|
43
|
+
"description": "The page in the developer's app that accepts an invitation, with `{token}` where the token goes. `null` means the hosted page in `hosted_pages` is used."
|
|
44
44
|
},
|
|
45
45
|
"verify_url": {
|
|
46
46
|
"anyOf": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"type": "null"
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
"description": "The page that confirms a new address, with `{token}` where the token goes.
|
|
55
|
+
"description": "The page that confirms a new address, with `{token}` where the token goes. `null` means the hosted page in `hosted_pages` is used."
|
|
56
56
|
},
|
|
57
57
|
"reset_url": {
|
|
58
58
|
"anyOf": [
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"type": "null"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
|
-
"description": "The page that takes a new password, with `{token}` where the token goes."
|
|
67
|
+
"description": "The page that takes a new password, with `{token}` where the token goes. `null` means the hosted page in `hosted_pages` is used."
|
|
68
68
|
},
|
|
69
69
|
"mcp_login_url": {
|
|
70
70
|
"anyOf": [
|
|
@@ -76,7 +76,105 @@
|
|
|
76
76
|
"type": "null"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
|
-
"description": "The page an MCP authorization redirects to, with `{interaction}` where the interaction id goes. Not a token: the id names a pending request the server already holds, and the app authenticates the user itself before approving it."
|
|
79
|
+
"description": "The page an MCP authorization redirects to, with `{interaction}` where the interaction id goes. Not a token: the id names a pending request the server already holds, and the app authenticates the user itself before approving it. `null` means the hosted MCP sign-in in `hosted_pages` is used."
|
|
80
|
+
},
|
|
81
|
+
"app_url": {
|
|
82
|
+
"anyOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "string",
|
|
85
|
+
"maxLength": 500,
|
|
86
|
+
"format": "uri"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "null"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"description": "The app's own home page, linked as `Open <app>` when a hosted flow is done. `null` makes the hosted done page say `You can close this tab`."
|
|
93
|
+
},
|
|
94
|
+
"sign_in_methods": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"password": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"description": "Whether app users may sign in with a password. Off refuses `POST /api/client/login` with `method_not_allowed`, and registration and invitations then take no password."
|
|
100
|
+
},
|
|
101
|
+
"email_code": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"description": "Whether app users may sign in with a six-digit code mailed to them, valid ten minutes. A code needs no URL, so it works in local development and in an app with no web UI."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"password",
|
|
108
|
+
"email_code"
|
|
109
|
+
],
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"description": "Which sign-in methods the app offers: password, emailed code, or both — at least one. Identity providers stay on top of either. The default is password only."
|
|
112
|
+
},
|
|
113
|
+
"two_factor": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": [
|
|
116
|
+
"off",
|
|
117
|
+
"optional",
|
|
118
|
+
"required"
|
|
119
|
+
],
|
|
120
|
+
"description": "Whether the app asks for an authenticator code: `off` (the default), `optional` or `required`. A person with a confirmed authenticator is asked at every sign-in whatever the policy; a sign-in through an identity provider is never asked."
|
|
121
|
+
},
|
|
122
|
+
"hosted_logo_url": {
|
|
123
|
+
"anyOf": [
|
|
124
|
+
{
|
|
125
|
+
"type": "string",
|
|
126
|
+
"format": "uri"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "null"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"description": "Where the hosted pages load the app's logo from, `<portal>/app/<identifier>/logo`, or `null` when no logo is stored. **Read-only** — the logo is written through `PUT /api/apps/:id/auth-config/logo`."
|
|
133
|
+
},
|
|
134
|
+
"hosted_accent": {
|
|
135
|
+
"anyOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "string",
|
|
138
|
+
"pattern": "^#[0-9a-f]{6}$"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "null"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"description": "The accent colour of the hosted pages, `#rrggbb` in lowercase, or `null` for the neutral shell's own."
|
|
145
|
+
},
|
|
146
|
+
"hosted_pages": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": {
|
|
149
|
+
"invite_url": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"format": "uri",
|
|
152
|
+
"description": "The hosted invitation page, `<portal>/app/<identifier>/invite/{token}`."
|
|
153
|
+
},
|
|
154
|
+
"verify_url": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"format": "uri",
|
|
157
|
+
"description": "The hosted email-confirmation page, `<portal>/app/<identifier>/verify/{token}`."
|
|
158
|
+
},
|
|
159
|
+
"reset_url": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"format": "uri",
|
|
162
|
+
"description": "The hosted new-password page, `<portal>/app/<identifier>/reset/{token}`."
|
|
163
|
+
},
|
|
164
|
+
"mcp_login_url": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"format": "uri",
|
|
167
|
+
"description": "The hosted MCP sign-in, `<portal>/app/<identifier>/mcp/{interaction}`."
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"required": [
|
|
171
|
+
"invite_url",
|
|
172
|
+
"verify_url",
|
|
173
|
+
"reset_url",
|
|
174
|
+
"mcp_login_url"
|
|
175
|
+
],
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"description": "The Fleetless-hosted pages an unset URL falls back to, as templates. **Read-only**: minted by the cloud from the auth portal and the app's identifier."
|
|
80
178
|
},
|
|
81
179
|
"oidc_callback_url": {
|
|
82
180
|
"type": "string",
|
|
@@ -99,6 +197,12 @@
|
|
|
99
197
|
"verify_url",
|
|
100
198
|
"reset_url",
|
|
101
199
|
"mcp_login_url",
|
|
200
|
+
"app_url",
|
|
201
|
+
"sign_in_methods",
|
|
202
|
+
"two_factor",
|
|
203
|
+
"hosted_logo_url",
|
|
204
|
+
"hosted_accent",
|
|
205
|
+
"hosted_pages",
|
|
102
206
|
"oidc_callback_url",
|
|
103
207
|
"updated_at"
|
|
104
208
|
],
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"invite_url": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"format": "uri",
|
|
8
|
+
"description": "The hosted invitation page, `<portal>/app/<identifier>/invite/{token}`."
|
|
9
|
+
},
|
|
10
|
+
"verify_url": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "uri",
|
|
13
|
+
"description": "The hosted email-confirmation page, `<portal>/app/<identifier>/verify/{token}`."
|
|
14
|
+
},
|
|
15
|
+
"reset_url": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uri",
|
|
18
|
+
"description": "The hosted new-password page, `<portal>/app/<identifier>/reset/{token}`."
|
|
19
|
+
},
|
|
20
|
+
"mcp_login_url": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"format": "uri",
|
|
23
|
+
"description": "The hosted MCP sign-in, `<portal>/app/<identifier>/mcp/{interaction}`."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": [
|
|
27
|
+
"invite_url",
|
|
28
|
+
"verify_url",
|
|
29
|
+
"reset_url",
|
|
30
|
+
"mcp_login_url"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
@@ -33,17 +33,10 @@
|
|
|
33
33
|
"description": "When the token stops working. Seven days from issue; an expired token answers exactly as an unknown one does."
|
|
34
34
|
},
|
|
35
35
|
"accept_url": {
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"format": "uri"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"type": "null"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"description": "The link to give the invitee, built from the app's `invite_url` with the token substituted for `{token}`. **`null` when the app has configured no `invite_url`** — there is nowhere for the link to point, and Fleetless serves no page of its own for an app user. Bounded like every other URL that gets mailed, logged and rendered."
|
|
36
|
+
"type": "string",
|
|
37
|
+
"maxLength": 500,
|
|
38
|
+
"format": "uri",
|
|
39
|
+
"description": "The link to give the invitee: the app's `invite_url` with the token substituted for `{token}`, or the Fleetless-hosted invitation page when the app has configured none. Bounded like every other URL that gets mailed, logged and rendered."
|
|
47
40
|
},
|
|
48
41
|
"mail": {
|
|
49
42
|
"type": "string",
|
|
@@ -53,7 +46,7 @@
|
|
|
53
46
|
"not_configured",
|
|
54
47
|
"failed"
|
|
55
48
|
],
|
|
56
|
-
"description": "What happened to the mail: `sent` means the SMTP server accepted it, not that it was delivered; `not_requested` means none was attempted
|
|
49
|
+
"description": "What happened to the mail: `sent` means the SMTP server accepted it, not that it was delivered; `not_requested` means none was attempted because the caller asked for none; `not_configured` is an expected state and not a failure; `failed` is the one worth somebody's attention."
|
|
57
50
|
}
|
|
58
51
|
},
|
|
59
52
|
"required": [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
5
|
"templates": {
|
|
6
|
-
"maxItems":
|
|
6
|
+
"maxItems": 4,
|
|
7
7
|
"type": "array",
|
|
8
8
|
"items": {
|
|
9
9
|
"type": "object",
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
"enum": [
|
|
14
14
|
"invite",
|
|
15
15
|
"verify",
|
|
16
|
-
"reset"
|
|
16
|
+
"reset",
|
|
17
|
+
"login_code"
|
|
17
18
|
],
|
|
18
|
-
"description": "Which of the
|
|
19
|
+
"description": "Which of the four mails this template replaces."
|
|
19
20
|
},
|
|
20
21
|
"subject": {
|
|
21
22
|
"type": "string",
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
"enum": [
|
|
8
8
|
"invite",
|
|
9
9
|
"verify",
|
|
10
|
-
"reset"
|
|
10
|
+
"reset",
|
|
11
|
+
"login_code"
|
|
11
12
|
],
|
|
12
|
-
"description": "Which of the
|
|
13
|
+
"description": "Which of the four mails this template replaces."
|
|
13
14
|
},
|
|
14
15
|
"subject": {
|
|
15
16
|
"type": "string",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"password": {
|
|
6
|
+
"type": "boolean",
|
|
7
|
+
"description": "Whether app users may sign in with a password. Off refuses `POST /api/client/login` with `method_not_allowed`, and registration and invitations then take no password."
|
|
8
|
+
},
|
|
9
|
+
"email_code": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Whether app users may sign in with a six-digit code mailed to them, valid ten minutes. A code needs no URL, so it works in local development and in an app with no web UI."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required": [
|
|
15
|
+
"password",
|
|
16
|
+
"email_code"
|
|
17
|
+
],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -80,6 +80,41 @@
|
|
|
80
80
|
],
|
|
81
81
|
"description": "When this user last signed in, or `null` if they never have. Required and nullable rather than optional, so *never logged in* stays distinguishable from *this field was not loaded*."
|
|
82
82
|
},
|
|
83
|
+
"two_factor": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"enabled": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "Whether the account has a confirmed authenticator app (TOTP). When it has, every sign-in that yields a session asks for a code as well — whatever the app's policy — except a sign-in through an identity provider, which owns that sign-in."
|
|
89
|
+
},
|
|
90
|
+
"enabled_at": {
|
|
91
|
+
"anyOf": [
|
|
92
|
+
{
|
|
93
|
+
"type": "string",
|
|
94
|
+
"format": "date-time",
|
|
95
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "null"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"description": "When the authenticator was confirmed, or `null` while `enabled` is `false`."
|
|
102
|
+
},
|
|
103
|
+
"recovery_codes_left": {
|
|
104
|
+
"type": "integer",
|
|
105
|
+
"minimum": 0,
|
|
106
|
+
"maximum": 10,
|
|
107
|
+
"description": "How many of the ten single-use recovery codes are still unspent. `0` while `enabled` is `false`."
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"enabled",
|
|
112
|
+
"enabled_at",
|
|
113
|
+
"recovery_codes_left"
|
|
114
|
+
],
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"description": "The account's second factor, as a developer's user list shows it. No secret and no code travels here; resetting it is `DELETE /api/apps/:id/users/:userId/two-factor`."
|
|
117
|
+
},
|
|
83
118
|
"created_at": {
|
|
84
119
|
"type": "string",
|
|
85
120
|
"format": "date-time",
|
|
@@ -97,6 +132,7 @@
|
|
|
97
132
|
"has_password",
|
|
98
133
|
"providers",
|
|
99
134
|
"last_login_at",
|
|
135
|
+
"two_factor",
|
|
100
136
|
"created_at"
|
|
101
137
|
],
|
|
102
138
|
"additionalProperties": false
|
|
@@ -75,6 +75,41 @@
|
|
|
75
75
|
],
|
|
76
76
|
"description": "When this user last signed in, or `null` if they never have. Required and nullable rather than optional, so *never logged in* stays distinguishable from *this field was not loaded*."
|
|
77
77
|
},
|
|
78
|
+
"two_factor": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"enabled": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"description": "Whether the account has a confirmed authenticator app (TOTP). When it has, every sign-in that yields a session asks for a code as well — whatever the app's policy — except a sign-in through an identity provider, which owns that sign-in."
|
|
84
|
+
},
|
|
85
|
+
"enabled_at": {
|
|
86
|
+
"anyOf": [
|
|
87
|
+
{
|
|
88
|
+
"type": "string",
|
|
89
|
+
"format": "date-time",
|
|
90
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "null"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"description": "When the authenticator was confirmed, or `null` while `enabled` is `false`."
|
|
97
|
+
},
|
|
98
|
+
"recovery_codes_left": {
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"minimum": 0,
|
|
101
|
+
"maximum": 10,
|
|
102
|
+
"description": "How many of the ten single-use recovery codes are still unspent. `0` while `enabled` is `false`."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"enabled",
|
|
107
|
+
"enabled_at",
|
|
108
|
+
"recovery_codes_left"
|
|
109
|
+
],
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"description": "The account's second factor, as a developer's user list shows it. No secret and no code travels here; resetting it is `DELETE /api/apps/:id/users/:userId/two-factor`."
|
|
112
|
+
},
|
|
78
113
|
"created_at": {
|
|
79
114
|
"type": "string",
|
|
80
115
|
"format": "date-time",
|
|
@@ -92,6 +127,7 @@
|
|
|
92
127
|
"has_password",
|
|
93
128
|
"providers",
|
|
94
129
|
"last_login_at",
|
|
130
|
+
"two_factor",
|
|
95
131
|
"created_at"
|
|
96
132
|
],
|
|
97
133
|
"additionalProperties": false
|
|
@@ -48,12 +48,6 @@
|
|
|
48
48
|
"minLength": 1,
|
|
49
49
|
"maxLength": 40
|
|
50
50
|
},
|
|
51
|
-
"target_id": {
|
|
52
|
-
"description": "Events whose target is this id; for a robot also the events that name it in `details.robot_id` (`action.invoked`, `service.called`, …), so a robot's events include what was started on it.",
|
|
53
|
-
"type": "string",
|
|
54
|
-
"minLength": 1,
|
|
55
|
-
"maxLength": 200
|
|
56
|
-
},
|
|
57
51
|
"from_ms": {
|
|
58
52
|
"anyOf": [
|
|
59
53
|
{
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"maxLength": 120,
|
|
18
18
|
"description": "The organisation's display name. Free text, changed through `PATCH /api/org`."
|
|
19
19
|
},
|
|
20
|
+
"require_two_factor": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Whether every member must have a second factor — a passkey or an authenticator app. A member without one sets it up at their next sign-in, before any session exists; nobody is signed out when it is switched on. It covers the console and the central MCP endpoint; server keys and robot bridges are not people and are not affected. Owners change it through `PATCH /api/org`."
|
|
23
|
+
},
|
|
20
24
|
"created_at": {
|
|
21
25
|
"type": "string",
|
|
22
26
|
"format": "date-time",
|
|
@@ -27,6 +31,7 @@
|
|
|
27
31
|
"required": [
|
|
28
32
|
"id",
|
|
29
33
|
"name",
|
|
34
|
+
"require_two_factor",
|
|
30
35
|
"created_at"
|
|
31
36
|
],
|
|
32
37
|
"additionalProperties": false
|
|
@@ -73,6 +78,27 @@
|
|
|
73
78
|
],
|
|
74
79
|
"description": "The console powers this person holds. **Required** — every Fleetless user has a tier; it was optional only while the org also held people with no console powers to grade, and that pool is gone."
|
|
75
80
|
},
|
|
81
|
+
"two_factor": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"passkeys": {
|
|
85
|
+
"type": "integer",
|
|
86
|
+
"minimum": 0,
|
|
87
|
+
"maximum": 9007199254740991,
|
|
88
|
+
"description": "How many passkeys the person has registered."
|
|
89
|
+
},
|
|
90
|
+
"authenticator": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Whether the person has a confirmed authenticator app."
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"passkeys",
|
|
97
|
+
"authenticator"
|
|
98
|
+
],
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"description": "The person's second factors, as the team list shows them: none, passkeys, an authenticator, or both. No credential travels here. An owner resets them through `DELETE /api/org/users/:id/two-factor`."
|
|
101
|
+
},
|
|
76
102
|
"created_at": {
|
|
77
103
|
"type": "string",
|
|
78
104
|
"format": "date-time",
|
|
@@ -86,6 +112,7 @@
|
|
|
86
112
|
"email",
|
|
87
113
|
"display_name",
|
|
88
114
|
"tier",
|
|
115
|
+
"two_factor",
|
|
89
116
|
"created_at"
|
|
90
117
|
],
|
|
91
118
|
"additionalProperties": false
|
|
@@ -95,6 +95,17 @@
|
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
97
|
"description": "The address of the Fleetless user or app user behind this session, and `null` for a server key, which is not a person."
|
|
98
|
+
},
|
|
99
|
+
"two_factor_enabled": {
|
|
100
|
+
"anyOf": [
|
|
101
|
+
{
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "null"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"description": "Whether the app user has a confirmed authenticator, so the app's account settings can offer to turn it on or off. `null` unless `kind` is `app_user`."
|
|
98
109
|
}
|
|
99
110
|
},
|
|
100
111
|
"required": [
|
|
@@ -104,7 +115,8 @@
|
|
|
104
115
|
"server_key_id",
|
|
105
116
|
"app_id",
|
|
106
117
|
"role_id",
|
|
107
|
-
"email"
|
|
118
|
+
"email",
|
|
119
|
+
"two_factor_enabled"
|
|
108
120
|
]
|
|
109
121
|
}
|
|
110
122
|
},
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"description": "The opaque token from the invitation link, valid seven days. Unknown, expired, revoked and already-accepted all answer `410 token_spent`."
|
|
9
9
|
},
|
|
10
10
|
"password": {
|
|
11
|
+
"description": "The password the new account will use, at least 12 characters. **Required while the app's password method is on, refused while it is off** — both as `400 validation_error` naming `password`. An email-code-only app accepts invitations without one.",
|
|
11
12
|
"type": "string",
|
|
12
13
|
"minLength": 12,
|
|
13
|
-
"maxLength": 256
|
|
14
|
-
"description": "The password the new account will use."
|
|
14
|
+
"maxLength": 256
|
|
15
15
|
},
|
|
16
16
|
"display_name": {
|
|
17
17
|
"description": "An optional name, overriding whatever the invitation pre-filled.",
|
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"required": [
|
|
31
|
-
"token"
|
|
32
|
-
"password"
|
|
31
|
+
"token"
|
|
33
32
|
],
|
|
34
33
|
"additionalProperties": false
|
|
35
34
|
}
|
|
@@ -88,6 +88,17 @@
|
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
90
|
"description": "The address of the Fleetless user or app user behind this session, and `null` for a server key, which is not a person."
|
|
91
|
+
},
|
|
92
|
+
"two_factor_enabled": {
|
|
93
|
+
"anyOf": [
|
|
94
|
+
{
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "null"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"description": "Whether the app user has a confirmed authenticator, so the app's account settings can offer to turn it on or off. `null` unless `kind` is `app_user`."
|
|
91
102
|
}
|
|
92
103
|
},
|
|
93
104
|
"required": [
|
|
@@ -97,7 +108,8 @@
|
|
|
97
108
|
"server_key_id",
|
|
98
109
|
"app_id",
|
|
99
110
|
"role_id",
|
|
100
|
-
"email"
|
|
111
|
+
"email",
|
|
112
|
+
"two_factor_enabled"
|
|
101
113
|
],
|
|
102
114
|
"additionalProperties": false
|
|
103
115
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"app_identifier": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 2,
|
|
8
|
+
"maxLength": 63,
|
|
9
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$",
|
|
10
|
+
"description": "The app to sign in to. An identifier no app carries is `404 not_found`; the address is never the subject of a refusal."
|
|
11
|
+
},
|
|
12
|
+
"email": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "email",
|
|
15
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
16
|
+
"description": "The address to mail the code to, trimmed and compared case-insensitively. `202` whether or not it names an account of this app."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": [
|
|
20
|
+
"app_identifier",
|
|
21
|
+
"email"
|
|
22
|
+
],
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"app_identifier": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 2,
|
|
8
|
+
"maxLength": 63,
|
|
9
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$",
|
|
10
|
+
"description": "The app the code was requested for."
|
|
11
|
+
},
|
|
12
|
+
"email": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "email",
|
|
15
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
16
|
+
"description": "The address the code was mailed to, as typed when it was requested; trimmed and compared case-insensitively."
|
|
17
|
+
},
|
|
18
|
+
"code": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^\\d{6}$",
|
|
21
|
+
"description": "The six digits from the mail, exactly — leading zeros included, no spaces."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"required": [
|
|
25
|
+
"app_identifier",
|
|
26
|
+
"email",
|
|
27
|
+
"code"
|
|
28
|
+
],
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
}
|
|
@@ -24,11 +24,31 @@
|
|
|
24
24
|
],
|
|
25
25
|
"additionalProperties": false
|
|
26
26
|
},
|
|
27
|
-
"description": "The app's **enabled** providers, slug and display name only. An app with none answers an empty array, which is the state of an app that offers password
|
|
27
|
+
"description": "The app's **enabled** providers, slug and display name only. An app with none answers an empty array, which is the state of an app that offers password or code sign-in alone."
|
|
28
|
+
},
|
|
29
|
+
"sign_in_methods": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"password": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"description": "Whether app users may sign in with a password. Off refuses `POST /api/client/login` with `method_not_allowed`, and registration and invitations then take no password."
|
|
35
|
+
},
|
|
36
|
+
"email_code": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Whether app users may sign in with a six-digit code mailed to them, valid ten minutes. A code needs no URL, so it works in local development and in an app with no web UI."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": [
|
|
42
|
+
"password",
|
|
43
|
+
"email_code"
|
|
44
|
+
],
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"description": "Which of password and emailed code the app accepts, so its sign-in page draws the right fields without guessing. The same value the developer set; public, like the provider buttons."
|
|
28
47
|
}
|
|
29
48
|
},
|
|
30
49
|
"required": [
|
|
31
|
-
"providers"
|
|
50
|
+
"providers",
|
|
51
|
+
"sign_in_methods"
|
|
32
52
|
],
|
|
33
53
|
"additionalProperties": false
|
|
34
54
|
}
|