@logto/schemas 1.28.0 → 1.29.0
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/alterations/1.29.0-1748832174-add-webauthn-related-origins.ts +20 -0
- package/alterations/1.29.0-1749005587-user-sso-identities-table-add-updated-at-column.ts +31 -0
- package/alterations/1.29.0-1749026308-add-oidc-session-extension-table.ts +41 -0
- package/alterations/1.29.0-1749523818-add-custom-profile-fields.ts +58 -0
- package/alterations/1.29.0-1749724664-drop-sie-order-constraint-from-custom-profile-fields.ts +20 -0
- package/alterations/1.29.0-1750663091-change-user-password-encrypted-length.ts +18 -0
- package/alterations/1.29.0-1750744518-add-secrets-table.ts +50 -0
- package/alterations/1.29.0-1750744539-add-secret-connector-relations-table.ts +109 -0
- package/alterations-js/1.29.0-1748832174-add-webauthn-related-origins.js +16 -0
- package/alterations-js/1.29.0-1749005587-user-sso-identities-table-add-updated-at-column.js +25 -0
- package/alterations-js/1.29.0-1749026308-add-oidc-session-extension-table.js +33 -0
- package/alterations-js/1.29.0-1749523818-add-custom-profile-fields.js +52 -0
- package/alterations-js/1.29.0-1749724664-drop-sie-order-constraint-from-custom-profile-fields.js +16 -0
- package/alterations-js/1.29.0-1750663091-change-user-password-encrypted-length.js +14 -0
- package/alterations-js/1.29.0-1750744518-add-secrets-table.js +42 -0
- package/alterations-js/1.29.0-1750744539-add-secret-connector-relations-table.js +99 -0
- package/lib/db-entries/account-center.d.ts +4 -2
- package/lib/db-entries/account-center.js +5 -1
- package/lib/db-entries/custom-profile-field.d.ts +32 -0
- package/lib/db-entries/custom-profile-field.js +58 -0
- package/lib/db-entries/index.d.ts +4 -0
- package/lib/db-entries/index.js +4 -0
- package/lib/db-entries/oidc-session-extension.d.ts +24 -0
- package/lib/db-entries/oidc-session-extension.js +42 -0
- package/lib/db-entries/secret-connector-relation.d.ts +40 -0
- package/lib/db-entries/secret-connector-relation.js +49 -0
- package/lib/db-entries/secret.d.ts +44 -0
- package/lib/db-entries/secret.js +62 -0
- package/lib/db-entries/user-sso-identity.d.ts +5 -1
- package/lib/db-entries/user-sso-identity.js +4 -0
- package/lib/db-entries/user.js +2 -2
- package/lib/foundations/jsonb-types/account-centers.d.ts +5 -0
- package/lib/foundations/jsonb-types/account-centers.js +2 -0
- package/lib/foundations/jsonb-types/custom-profile-fields.d.ts +116 -0
- package/lib/foundations/jsonb-types/custom-profile-fields.js +36 -0
- package/lib/foundations/jsonb-types/index.d.ts +2 -1
- package/lib/foundations/jsonb-types/index.js +2 -1
- package/lib/foundations/jsonb-types/secrets.d.ts +9 -0
- package/lib/foundations/jsonb-types/secrets.js +10 -0
- package/lib/foundations/jsonb-types/users.d.ts +32 -0
- package/lib/foundations/jsonb-types/users.js +11 -10
- package/lib/types/consent.d.ts +4 -0
- package/lib/types/custom-profile-fields.d.ts +1310 -0
- package/lib/types/custom-profile-fields.js +123 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -0
- package/lib/types/interactions.d.ts +6 -0
- package/lib/types/interactions.js +1 -0
- package/lib/types/log/interaction.d.ts +2 -1
- package/lib/types/logto-config/index.d.ts +1104 -18
- package/lib/types/logto-config/jwt-customizer.d.ts +2396 -24
- package/lib/types/logto-config/jwt-customizer.js +50 -1
- package/lib/types/logto-config/oidc-provider.d.ts +6 -6
- package/lib/types/mfa.d.ts +10 -10
- package/lib/types/sign-in-experience.d.ts +2 -2
- package/lib/types/sso-connector.d.ts +23 -0
- package/lib/types/sso-connector.js +3 -0
- package/lib/types/tenant.d.ts +1 -0
- package/lib/types/tenant.js +1 -0
- package/lib/types/user.d.ts +11 -0
- package/lib/types/user.js +3 -0
- package/lib/types/verification-records/backup-code-verification.d.ts +29 -0
- package/lib/types/verification-records/backup-code-verification.js +9 -0
- package/lib/types/verification-records/code-verification.d.ts +89 -0
- package/lib/types/verification-records/code-verification.js +22 -0
- package/lib/types/verification-records/enterprise-sso-verification.d.ts +68 -0
- package/lib/types/verification-records/enterprise-sso-verification.js +10 -0
- package/lib/types/verification-records/index.d.ts +16 -0
- package/lib/types/verification-records/index.js +16 -0
- package/lib/types/verification-records/new-password-identity-verification.d.ts +54 -0
- package/lib/types/verification-records/new-password-identity-verification.js +16 -0
- package/lib/types/verification-records/one-time-token-verification.d.ts +55 -0
- package/lib/types/verification-records/one-time-token-verification.js +13 -0
- package/lib/types/verification-records/password-verification.d.ts +40 -0
- package/lib/types/verification-records/password-verification.js +9 -0
- package/lib/types/verification-records/social-verification.d.ts +106 -0
- package/lib/types/verification-records/social-verification.js +10 -0
- package/lib/types/verification-records/totp-verification.d.ts +29 -0
- package/lib/types/verification-records/totp-verification.js +9 -0
- package/lib/types/verification-records/web-authn-verification.d.ts +80 -0
- package/lib/types/verification-records/web-authn-verification.js +12 -0
- package/package.json +1 -1
- package/tables/account_centers.sql +1 -0
- package/tables/connectors.sql +2 -0
- package/tables/custom_profile_fields.sql +31 -0
- package/tables/oidc_model_instances.sql +2 -0
- package/tables/oidc_session_extensions.sql +18 -0
- package/tables/secret_connector_relations.sql +78 -0
- package/tables/secrets.sql +26 -0
- package/tables/user_sso_identities.sql +8 -0
- package/tables/users.sql +1 -1
- /package/lib/{foundations/jsonb-types/verification-records.d.ts → types/verification-records/verification-type.d.ts} +0 -0
- /package/lib/{foundations/jsonb-types/verification-records.js → types/verification-records/verification-type.js} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare enum CustomProfileFieldType {
|
|
3
|
+
Text = "Text",
|
|
4
|
+
Number = "Number",
|
|
5
|
+
Date = "Date",
|
|
6
|
+
Checkbox = "Checkbox",
|
|
7
|
+
Select = "Select",
|
|
8
|
+
Url = "Url",
|
|
9
|
+
Regex = "Regex",
|
|
10
|
+
Address = "Address",
|
|
11
|
+
Fullname = "Fullname"
|
|
12
|
+
}
|
|
13
|
+
export declare const customProfileFieldTypeGuard: z.ZodNativeEnum<typeof CustomProfileFieldType>;
|
|
14
|
+
export declare const fieldOptionGuard: z.ZodObject<{
|
|
15
|
+
label: z.ZodString;
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}, {
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type FieldOption = z.infer<typeof fieldOptionGuard>;
|
|
25
|
+
export declare const fieldOptionsGuard: z.ZodArray<z.ZodObject<{
|
|
26
|
+
label: z.ZodString;
|
|
27
|
+
value: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}, {
|
|
32
|
+
value: string;
|
|
33
|
+
label: string;
|
|
34
|
+
}>, "many">;
|
|
35
|
+
export type FieldOptions = z.infer<typeof fieldOptionsGuard>;
|
|
36
|
+
export declare const fieldPartGuard: z.ZodObject<{
|
|
37
|
+
key: z.ZodString;
|
|
38
|
+
enabled: z.ZodBoolean;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
key: string;
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
}, {
|
|
43
|
+
key: string;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
export type FieldPart = z.infer<typeof fieldPartGuard>;
|
|
47
|
+
export declare const fieldPartsGuard: z.ZodArray<z.ZodObject<{
|
|
48
|
+
key: z.ZodString;
|
|
49
|
+
enabled: z.ZodBoolean;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
key: string;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
}, {
|
|
54
|
+
key: string;
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
}>, "many">;
|
|
57
|
+
export type FieldParts = z.infer<typeof fieldPartsGuard>;
|
|
58
|
+
export declare const customProfileFieldConfigGuard: z.ZodObject<{
|
|
59
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
60
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
format: z.ZodOptional<z.ZodString>;
|
|
65
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
label: z.ZodString;
|
|
67
|
+
value: z.ZodString;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
value: string;
|
|
70
|
+
label: string;
|
|
71
|
+
}, {
|
|
72
|
+
value: string;
|
|
73
|
+
label: string;
|
|
74
|
+
}>, "many">>;
|
|
75
|
+
parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
+
key: z.ZodString;
|
|
77
|
+
enabled: z.ZodBoolean;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
key: string;
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
}, {
|
|
82
|
+
key: string;
|
|
83
|
+
enabled: boolean;
|
|
84
|
+
}>, "many">>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
options?: {
|
|
87
|
+
value: string;
|
|
88
|
+
label: string;
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
minLength?: number | undefined;
|
|
91
|
+
maxLength?: number | undefined;
|
|
92
|
+
placeholder?: string | undefined;
|
|
93
|
+
minValue?: number | undefined;
|
|
94
|
+
maxValue?: number | undefined;
|
|
95
|
+
format?: string | undefined;
|
|
96
|
+
parts?: {
|
|
97
|
+
key: string;
|
|
98
|
+
enabled: boolean;
|
|
99
|
+
}[] | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
options?: {
|
|
102
|
+
value: string;
|
|
103
|
+
label: string;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
minLength?: number | undefined;
|
|
106
|
+
maxLength?: number | undefined;
|
|
107
|
+
placeholder?: string | undefined;
|
|
108
|
+
minValue?: number | undefined;
|
|
109
|
+
maxValue?: number | undefined;
|
|
110
|
+
format?: string | undefined;
|
|
111
|
+
parts?: {
|
|
112
|
+
key: string;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
}[] | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
export type CustomProfileFieldConfig = z.infer<typeof customProfileFieldConfigGuard>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export var CustomProfileFieldType;
|
|
3
|
+
(function (CustomProfileFieldType) {
|
|
4
|
+
/* Primitive types */
|
|
5
|
+
CustomProfileFieldType["Text"] = "Text";
|
|
6
|
+
CustomProfileFieldType["Number"] = "Number";
|
|
7
|
+
CustomProfileFieldType["Date"] = "Date";
|
|
8
|
+
CustomProfileFieldType["Checkbox"] = "Checkbox";
|
|
9
|
+
CustomProfileFieldType["Select"] = "Select";
|
|
10
|
+
CustomProfileFieldType["Url"] = "Url";
|
|
11
|
+
CustomProfileFieldType["Regex"] = "Regex";
|
|
12
|
+
/* Composite types */
|
|
13
|
+
CustomProfileFieldType["Address"] = "Address";
|
|
14
|
+
CustomProfileFieldType["Fullname"] = "Fullname";
|
|
15
|
+
})(CustomProfileFieldType || (CustomProfileFieldType = {}));
|
|
16
|
+
export const customProfileFieldTypeGuard = z.nativeEnum(CustomProfileFieldType);
|
|
17
|
+
export const fieldOptionGuard = z.object({
|
|
18
|
+
label: z.string(),
|
|
19
|
+
value: z.string(),
|
|
20
|
+
});
|
|
21
|
+
export const fieldOptionsGuard = fieldOptionGuard.array();
|
|
22
|
+
export const fieldPartGuard = z.object({
|
|
23
|
+
key: z.string(),
|
|
24
|
+
enabled: z.boolean(),
|
|
25
|
+
});
|
|
26
|
+
export const fieldPartsGuard = fieldPartGuard.array();
|
|
27
|
+
export const customProfileFieldConfigGuard = z.object({
|
|
28
|
+
placeholder: z.string().max(256).optional(),
|
|
29
|
+
minLength: z.number().int().optional(),
|
|
30
|
+
maxLength: z.number().int().optional(),
|
|
31
|
+
minValue: z.number().int().optional(),
|
|
32
|
+
maxValue: z.number().int().optional(),
|
|
33
|
+
format: z.string().max(128).optional(),
|
|
34
|
+
options: fieldOptionsGuard.optional(),
|
|
35
|
+
parts: fieldPartsGuard.optional(),
|
|
36
|
+
});
|
|
@@ -8,12 +8,13 @@ export * from './sentinel.js';
|
|
|
8
8
|
export * from './users.js';
|
|
9
9
|
export * from './sso-connector.js';
|
|
10
10
|
export * from './applications.js';
|
|
11
|
-
export * from './verification-records.js';
|
|
12
11
|
export * from './account-centers.js';
|
|
13
12
|
export * from './saml-application-configs.js';
|
|
14
13
|
export * from './saml-application-sessions.js';
|
|
15
14
|
export * from './email-templates.js';
|
|
16
15
|
export * from './one-time-tokens.js';
|
|
17
16
|
export * from './captcha.js';
|
|
17
|
+
export * from './custom-profile-fields.js';
|
|
18
|
+
export * from './secrets.js';
|
|
18
19
|
export { configurableConnectorMetadataGuard, type ConfigurableConnectorMetadata, jsonGuard, jsonObjectGuard, } from '@logto/connector-kit';
|
|
19
20
|
export type { Json, JsonObject } from '@withtyped/server';
|
|
@@ -8,11 +8,12 @@ export * from './sentinel.js';
|
|
|
8
8
|
export * from './users.js';
|
|
9
9
|
export * from './sso-connector.js';
|
|
10
10
|
export * from './applications.js';
|
|
11
|
-
export * from './verification-records.js';
|
|
12
11
|
export * from './account-centers.js';
|
|
13
12
|
export * from './saml-application-configs.js';
|
|
14
13
|
export * from './saml-application-sessions.js';
|
|
15
14
|
export * from './email-templates.js';
|
|
16
15
|
export * from './one-time-tokens.js';
|
|
17
16
|
export * from './captcha.js';
|
|
17
|
+
export * from './custom-profile-fields.js';
|
|
18
|
+
export * from './secrets.js';
|
|
18
19
|
export { configurableConnectorMetadataGuard, jsonGuard, jsonObjectGuard, } from '@logto/connector-kit';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare enum SecretType {
|
|
3
|
+
/**
|
|
4
|
+
* A federated token set is a collection of OAuth tokens from the third-party providers.
|
|
5
|
+
* Use these tokens to get access to the third-party APIs.
|
|
6
|
+
*/
|
|
7
|
+
FederatedTokenSet = "federated_token_set"
|
|
8
|
+
}
|
|
9
|
+
export declare const secretTypeGuard: z.ZodNativeEnum<typeof SecretType>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export var SecretType;
|
|
3
|
+
(function (SecretType) {
|
|
4
|
+
/**
|
|
5
|
+
* A federated token set is a collection of OAuth tokens from the third-party providers.
|
|
6
|
+
* Use these tokens to get access to the third-party APIs.
|
|
7
|
+
*/
|
|
8
|
+
SecretType["FederatedTokenSet"] = "federated_token_set";
|
|
9
|
+
})(SecretType || (SecretType = {}));
|
|
10
|
+
export const secretTypeGuard = z.nativeEnum(SecretType);
|
|
@@ -21,6 +21,28 @@ export type UserProfile = Partial<{
|
|
|
21
21
|
country: string;
|
|
22
22
|
}>;
|
|
23
23
|
}>;
|
|
24
|
+
export declare const addressGuard: z.ZodObject<{
|
|
25
|
+
formatted: z.ZodOptional<z.ZodString>;
|
|
26
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
27
|
+
locality: z.ZodOptional<z.ZodString>;
|
|
28
|
+
region: z.ZodOptional<z.ZodString>;
|
|
29
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
30
|
+
country: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
formatted?: string | undefined;
|
|
33
|
+
streetAddress?: string | undefined;
|
|
34
|
+
locality?: string | undefined;
|
|
35
|
+
region?: string | undefined;
|
|
36
|
+
postalCode?: string | undefined;
|
|
37
|
+
country?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
formatted?: string | undefined;
|
|
40
|
+
streetAddress?: string | undefined;
|
|
41
|
+
locality?: string | undefined;
|
|
42
|
+
region?: string | undefined;
|
|
43
|
+
postalCode?: string | undefined;
|
|
44
|
+
country?: string | undefined;
|
|
45
|
+
}>;
|
|
24
46
|
export declare const userProfileGuard: z.ZodObject<{
|
|
25
47
|
familyName: z.ZodOptional<z.ZodString>;
|
|
26
48
|
givenName: z.ZodOptional<z.ZodString>;
|
|
@@ -97,6 +119,7 @@ export declare const userProfileGuard: z.ZodObject<{
|
|
|
97
119
|
} | undefined;
|
|
98
120
|
}>;
|
|
99
121
|
export declare const userProfileKeys: readonly ["familyName", "givenName", "middleName", "nickname", "preferredUsername", "profile", "website", "gender", "birthdate", "zoneinfo", "locale", "address"];
|
|
122
|
+
export declare const userProfileAddressKeys: readonly ["formatted", "streetAddress", "locality", "region", "postalCode", "country"];
|
|
100
123
|
export declare const roleNamesGuard: z.ZodArray<z.ZodString, "many">;
|
|
101
124
|
export declare const identityGuard: z.ZodObject<{
|
|
102
125
|
userId: z.ZodString;
|
|
@@ -152,6 +175,7 @@ export declare const mfaVerificationWebAuthn: z.ZodObject<{
|
|
|
152
175
|
transports: z.ZodOptional<z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">>;
|
|
153
176
|
counter: z.ZodNumber;
|
|
154
177
|
agent: z.ZodString;
|
|
178
|
+
name: z.ZodOptional<z.ZodString>;
|
|
155
179
|
id: z.ZodString;
|
|
156
180
|
createdAt: z.ZodString;
|
|
157
181
|
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -164,6 +188,7 @@ export declare const mfaVerificationWebAuthn: z.ZodObject<{
|
|
|
164
188
|
publicKey: string;
|
|
165
189
|
counter: number;
|
|
166
190
|
agent: string;
|
|
191
|
+
name?: string | undefined;
|
|
167
192
|
lastUsedAt?: string | undefined;
|
|
168
193
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
169
194
|
}, {
|
|
@@ -174,6 +199,7 @@ export declare const mfaVerificationWebAuthn: z.ZodObject<{
|
|
|
174
199
|
publicKey: string;
|
|
175
200
|
counter: number;
|
|
176
201
|
agent: string;
|
|
202
|
+
name?: string | undefined;
|
|
177
203
|
lastUsedAt?: string | undefined;
|
|
178
204
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
179
205
|
}>;
|
|
@@ -237,6 +263,7 @@ export declare const mfaVerificationGuard: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
237
263
|
transports: z.ZodOptional<z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">>;
|
|
238
264
|
counter: z.ZodNumber;
|
|
239
265
|
agent: z.ZodString;
|
|
266
|
+
name: z.ZodOptional<z.ZodString>;
|
|
240
267
|
id: z.ZodString;
|
|
241
268
|
createdAt: z.ZodString;
|
|
242
269
|
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -249,6 +276,7 @@ export declare const mfaVerificationGuard: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
249
276
|
publicKey: string;
|
|
250
277
|
counter: number;
|
|
251
278
|
agent: string;
|
|
279
|
+
name?: string | undefined;
|
|
252
280
|
lastUsedAt?: string | undefined;
|
|
253
281
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
254
282
|
}, {
|
|
@@ -259,6 +287,7 @@ export declare const mfaVerificationGuard: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
259
287
|
publicKey: string;
|
|
260
288
|
counter: number;
|
|
261
289
|
agent: string;
|
|
290
|
+
name?: string | undefined;
|
|
262
291
|
lastUsedAt?: string | undefined;
|
|
263
292
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
264
293
|
}>, z.ZodObject<{
|
|
@@ -320,6 +349,7 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
|
|
|
320
349
|
transports: z.ZodOptional<z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">>;
|
|
321
350
|
counter: z.ZodNumber;
|
|
322
351
|
agent: z.ZodString;
|
|
352
|
+
name: z.ZodOptional<z.ZodString>;
|
|
323
353
|
id: z.ZodString;
|
|
324
354
|
createdAt: z.ZodString;
|
|
325
355
|
lastUsedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -332,6 +362,7 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
|
|
|
332
362
|
publicKey: string;
|
|
333
363
|
counter: number;
|
|
334
364
|
agent: string;
|
|
365
|
+
name?: string | undefined;
|
|
335
366
|
lastUsedAt?: string | undefined;
|
|
336
367
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
337
368
|
}, {
|
|
@@ -342,6 +373,7 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
|
|
|
342
373
|
publicKey: string;
|
|
343
374
|
counter: number;
|
|
344
375
|
agent: string;
|
|
376
|
+
name?: string | undefined;
|
|
345
377
|
lastUsedAt?: string | undefined;
|
|
346
378
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
347
379
|
}>, z.ZodObject<{
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { jsonObjectGuard } from '@logto/connector-kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { MfaFactor } from './sign-in-experience.js';
|
|
4
|
+
export const addressGuard = z.object({
|
|
5
|
+
formatted: z.string().optional(),
|
|
6
|
+
streetAddress: z.string().optional(),
|
|
7
|
+
locality: z.string().optional(),
|
|
8
|
+
region: z.string().optional(),
|
|
9
|
+
postalCode: z.string().optional(),
|
|
10
|
+
country: z.string().optional(),
|
|
11
|
+
});
|
|
4
12
|
export const userProfileGuard = z.object({
|
|
5
13
|
familyName: z.string(),
|
|
6
14
|
givenName: z.string(),
|
|
@@ -13,18 +21,10 @@ export const userProfileGuard = z.object({
|
|
|
13
21
|
birthdate: z.string(),
|
|
14
22
|
zoneinfo: z.string(),
|
|
15
23
|
locale: z.string(),
|
|
16
|
-
address:
|
|
17
|
-
.object({
|
|
18
|
-
formatted: z.string(),
|
|
19
|
-
streetAddress: z.string(),
|
|
20
|
-
locality: z.string(),
|
|
21
|
-
region: z.string(),
|
|
22
|
-
postalCode: z.string(),
|
|
23
|
-
country: z.string(),
|
|
24
|
-
})
|
|
25
|
-
.partial(),
|
|
24
|
+
address: addressGuard,
|
|
26
25
|
}).partial();
|
|
27
26
|
export const userProfileKeys = Object.freeze(userProfileGuard.keyof().options);
|
|
27
|
+
export const userProfileAddressKeys = Object.freeze(addressGuard.keyof().options);
|
|
28
28
|
export const roleNamesGuard = z.string().array();
|
|
29
29
|
export const identityGuard = z.object({
|
|
30
30
|
userId: z.string(),
|
|
@@ -58,6 +58,7 @@ export const mfaVerificationWebAuthn = z.object({
|
|
|
58
58
|
transports: webAuthnTransportGuard.array().optional(),
|
|
59
59
|
counter: z.number(),
|
|
60
60
|
agent: z.string(),
|
|
61
|
+
name: z.string().optional(),
|
|
61
62
|
});
|
|
62
63
|
export const mfaVerificationBackupCode = z.object({
|
|
63
64
|
type: z.literal(MfaFactor.BackupCode),
|
package/lib/types/consent.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare const publicUserInfoGuard: z.ZodObject<Pick<{
|
|
|
77
77
|
publicKey: string;
|
|
78
78
|
counter: number;
|
|
79
79
|
agent: string;
|
|
80
|
+
name?: string | undefined;
|
|
80
81
|
lastUsedAt?: string | undefined;
|
|
81
82
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
82
83
|
} | {
|
|
@@ -102,6 +103,7 @@ export declare const publicUserInfoGuard: z.ZodObject<Pick<{
|
|
|
102
103
|
publicKey: string;
|
|
103
104
|
counter: number;
|
|
104
105
|
agent: string;
|
|
106
|
+
name?: string | undefined;
|
|
105
107
|
lastUsedAt?: string | undefined;
|
|
106
108
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
107
109
|
} | {
|
|
@@ -643,6 +645,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
643
645
|
publicKey: string;
|
|
644
646
|
counter: number;
|
|
645
647
|
agent: string;
|
|
648
|
+
name?: string | undefined;
|
|
646
649
|
lastUsedAt?: string | undefined;
|
|
647
650
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
648
651
|
} | {
|
|
@@ -668,6 +671,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
668
671
|
publicKey: string;
|
|
669
672
|
counter: number;
|
|
670
673
|
agent: string;
|
|
674
|
+
name?: string | undefined;
|
|
671
675
|
lastUsedAt?: string | undefined;
|
|
672
676
|
transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
|
|
673
677
|
} | {
|