@logto/schemas 1.41.0 → 1.43.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.42.0-1783916980-add-domain-verification-files.ts +20 -0
- package/alterations/1.42.0-1784619793-add-service-logs-created-at-index.ts +33 -0
- package/alterations/1.42.0-1784620000-add-saml-sso-connector-signing-keys-table.ts +38 -0
- package/alterations/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.ts +33 -0
- package/alterations/1.43.0-1785481546-add-tenant-aware-scope-indexes.ts +33 -0
- package/alterations/1.43.0-1785488115-add-cimd-permission-ceiling-tables.ts +77 -0
- package/alterations/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.ts +27 -0
- package/alterations/1.43.0-1785835991-add-cimd-client-identifier-columns.ts +31 -0
- package/alterations/1.43.0-1786325989-add-cimd-grant-organizations-table.ts +54 -0
- package/alterations/1.43.0-1786333495-add-trusted-devices.ts +57 -0
- package/alterations/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.ts +28 -0
- package/alterations/1.43.0-1786414712-add-service-logs-email-indexes.ts +34 -0
- package/alterations/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.ts +43 -0
- package/alterations/utils/1704934999-tables.ts +22 -1
- package/alterations-js/1.42.0-1783916980-add-domain-verification-files.js +16 -0
- package/alterations-js/1.42.0-1784619793-add-service-logs-created-at-index.js +29 -0
- package/alterations-js/1.42.0-1784620000-add-saml-sso-connector-signing-keys-table.js +33 -0
- package/alterations-js/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.js +28 -0
- package/alterations-js/1.43.0-1785481546-add-tenant-aware-scope-indexes.js +28 -0
- package/alterations-js/1.43.0-1785488115-add-cimd-permission-ceiling-tables.js +69 -0
- package/alterations-js/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.js +23 -0
- package/alterations-js/1.43.0-1785835991-add-cimd-client-identifier-columns.js +27 -0
- package/alterations-js/1.43.0-1786325989-add-cimd-grant-organizations-table.js +49 -0
- package/alterations-js/1.43.0-1786333495-add-trusted-devices.js +50 -0
- package/alterations-js/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.js +24 -0
- package/alterations-js/1.43.0-1786414712-add-service-logs-email-indexes.js +30 -0
- package/alterations-js/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.js +38 -0
- package/alterations-js/utils/1704934999-tables.js +19 -1
- package/lib/consts/experience.d.ts +1 -0
- package/lib/consts/experience.js +1 -0
- package/lib/consts/index.d.ts +1 -0
- package/lib/consts/index.js +1 -0
- package/lib/consts/product-event.d.ts +5 -1
- package/lib/consts/product-event.js +4 -0
- package/lib/consts/social-state.d.ts +12 -0
- package/lib/consts/social-state.js +12 -0
- package/lib/db-entries/cimd-grant-client-snapshot.d.ts +32 -0
- package/lib/db-entries/cimd-grant-client-snapshot.js +45 -0
- package/lib/db-entries/cimd-grant-organization.d.ts +30 -0
- package/lib/db-entries/cimd-grant-organization.js +37 -0
- package/lib/db-entries/cimd-organization-resource-scope.d.ts +20 -0
- package/lib/db-entries/cimd-organization-resource-scope.js +25 -0
- package/lib/db-entries/cimd-organization-scope.d.ts +20 -0
- package/lib/db-entries/cimd-organization-scope.js +25 -0
- package/lib/db-entries/cimd-resource-scope.d.ts +20 -0
- package/lib/db-entries/cimd-resource-scope.js +25 -0
- package/lib/db-entries/cimd-user-scope.d.ts +20 -0
- package/lib/db-entries/cimd-user-scope.js +25 -0
- package/lib/db-entries/domain.d.ts +4 -2
- package/lib/db-entries/domain.js +5 -1
- package/lib/db-entries/index.d.ts +8 -0
- package/lib/db-entries/index.js +8 -0
- package/lib/db-entries/oidc-session-extension.d.ts +3 -1
- package/lib/db-entries/oidc-session-extension.js +4 -0
- package/lib/db-entries/organization.d.ts +5 -1
- package/lib/db-entries/organization.js +4 -0
- package/lib/db-entries/saml-sso-connector-signing-key.d.ts +32 -0
- package/lib/db-entries/saml-sso-connector-signing-key.js +49 -0
- package/lib/db-entries/sign-in-experience.d.ts +4 -2
- package/lib/db-entries/sign-in-experience.js +5 -1
- package/lib/db-entries/trusted-device.d.ts +36 -0
- package/lib/db-entries/trusted-device.js +62 -0
- package/lib/db-entries/user.d.ts +3 -1
- package/lib/db-entries/user.js +4 -0
- package/lib/foundations/jsonb-types/account-centers.d.ts +3 -0
- package/lib/foundations/jsonb-types/account-centers.js +1 -0
- package/lib/foundations/jsonb-types/account-centers.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/account-centers.test.js +13 -0
- package/lib/foundations/jsonb-types/custom-domain.d.ts +57 -0
- package/lib/foundations/jsonb-types/custom-domain.js +51 -0
- package/lib/foundations/jsonb-types/custom-domain.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/custom-domain.test.js +38 -0
- package/lib/foundations/jsonb-types/hooks.d.ts +9 -5
- package/lib/foundations/jsonb-types/hooks.js +8 -0
- package/lib/foundations/jsonb-types/logs.d.ts +18 -0
- package/lib/foundations/jsonb-types/logs.js +6 -0
- package/lib/foundations/jsonb-types/one-time-tokens.d.ts +5 -0
- package/lib/foundations/jsonb-types/one-time-tokens.js +2 -0
- package/lib/foundations/jsonb-types/sign-in-experience.d.ts +39 -4
- package/lib/foundations/jsonb-types/sign-in-experience.js +10 -0
- package/lib/foundations/jsonb-types/sign-in-experience.test.js +17 -1
- package/lib/types/application.d.ts +131 -1
- package/lib/types/application.js +8 -0
- package/lib/types/connector.d.ts +8 -0
- package/lib/types/consent.d.ts +16 -190
- package/lib/types/consent.js +10 -1
- package/lib/types/custom-profile-fields.d.ts +2 -1
- package/lib/types/domain.d.ts +9 -0
- package/lib/types/hook.d.ts +37 -5
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/interaction-event.d.ts +11 -0
- package/lib/types/interaction-event.js +12 -0
- package/lib/types/interactions.d.ts +2 -11
- package/lib/types/interactions.js +2 -11
- package/lib/types/log/action.d.ts +7 -0
- package/lib/types/log/action.js +6 -0
- package/lib/types/log/index.d.ts +8 -2
- package/lib/types/log/index.js +2 -0
- package/lib/types/log/trusted-device.d.ts +7 -0
- package/lib/types/log/trusted-device.js +6 -0
- package/lib/types/logto-config/action.d.ts +963 -0
- package/lib/types/logto-config/action.js +77 -0
- package/lib/types/logto-config/index.d.ts +68 -26
- package/lib/types/logto-config/index.js +20 -7
- package/lib/types/logto-config/index.test.js +32 -9
- package/lib/types/logto-config/jwt-customizer.d.ts +60 -10
- package/lib/types/logto-config/jwt-customizer.js +1 -1
- package/lib/types/logto-config/oidc-provider.d.ts +2 -2
- package/lib/types/organization.d.ts +136 -1
- package/lib/types/organization.js +3 -2
- package/lib/types/service-log.d.ts +14 -1
- package/lib/types/service-log.js +13 -0
- package/lib/types/sign-in-experience.d.ts +18 -10
- package/lib/types/sign-in-experience.js +2 -1
- package/lib/types/sso-connector.d.ts +58 -0
- package/lib/types/sso-connector.js +12 -0
- package/lib/types/system.d.ts +2 -2
- package/lib/types/trusted-device.d.ts +67 -0
- package/lib/types/trusted-device.js +16 -0
- package/lib/types/user-sessions.d.ts +117 -238
- package/lib/types/user-sessions.js +9 -4
- package/lib/types/user.d.ts +10 -3
- package/lib/types/user.js +1 -0
- package/lib/types/verification-records/one-time-token-verification.d.ts +5 -0
- package/lib/utils/cimd.d.ts +14 -0
- package/lib/utils/cimd.js +14 -0
- package/lib/utils/cimd.test.d.ts +1 -0
- package/lib/utils/cimd.test.js +9 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/package.json +7 -7
- package/tables/cimd_grant_client_snapshots.sql +27 -0
- package/tables/cimd_grant_organizations.sql +38 -0
- package/tables/cimd_organization_resource_scopes.sql +16 -0
- package/tables/cimd_organization_scopes.sql +15 -0
- package/tables/cimd_resource_scopes.sql +15 -0
- package/tables/cimd_user_scopes.sql +13 -0
- package/tables/domains.sql +1 -0
- package/tables/oidc_model_instances.sql +5 -0
- package/tables/oidc_session_extensions.sql +5 -0
- package/tables/organization_scopes.sql +4 -0
- package/tables/organizations.sql +2 -0
- package/tables/saml_sso_connector_signing_keys.sql +21 -0
- package/tables/scopes.sql +4 -0
- package/tables/service_logs.sql +19 -0
- package/tables/sign_in_experiences.sql +1 -0
- package/tables/trusted_devices.sql +25 -0
- package/tables/users.sql +1 -0
- package/lib/types/logto-config/inline-hook.d.ts +0 -76
- package/lib/types/logto-config/inline-hook.js +0 -25
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GeneratedSchema } from './../foundations/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The organization scopes (permissions) that client ID metadata document (CIMD) clients of the tenant can request. Rows are an allowlist: an empty table allows nothing (deny-all), and an unrestricted state is not expressible.
|
|
4
|
+
*
|
|
5
|
+
* @remarks This is a type for database creation.
|
|
6
|
+
* @see {@link CimdOrganizationScope} for the original type.
|
|
7
|
+
*/
|
|
8
|
+
export type CreateCimdOrganizationScope = {
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
/** The globally unique identifier of the organization scope. */
|
|
11
|
+
organizationScopeId: string;
|
|
12
|
+
};
|
|
13
|
+
/** The organization scopes (permissions) that client ID metadata document (CIMD) clients of the tenant can request. Rows are an allowlist: an empty table allows nothing (deny-all), and an unrestricted state is not expressible. */
|
|
14
|
+
export type CimdOrganizationScope = {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
/** The globally unique identifier of the organization scope. */
|
|
17
|
+
organizationScopeId: string;
|
|
18
|
+
};
|
|
19
|
+
export type CimdOrganizationScopeKeys = 'tenantId' | 'organizationScopeId';
|
|
20
|
+
export declare const CimdOrganizationScopes: GeneratedSchema<CimdOrganizationScopeKeys, CreateCimdOrganizationScope, CimdOrganizationScope, 'cimd_organization_scopes', 'cimd_organization_scope'>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const createGuard = z.object({
|
|
4
|
+
tenantId: z.string().max(21).optional(),
|
|
5
|
+
organizationScopeId: z.string().min(1).max(21),
|
|
6
|
+
});
|
|
7
|
+
const guard = z.object({
|
|
8
|
+
tenantId: z.string().max(21),
|
|
9
|
+
organizationScopeId: z.string().min(1).max(21),
|
|
10
|
+
});
|
|
11
|
+
export const CimdOrganizationScopes = Object.freeze({
|
|
12
|
+
table: 'cimd_organization_scopes',
|
|
13
|
+
tableSingular: 'cimd_organization_scope',
|
|
14
|
+
fields: {
|
|
15
|
+
tenantId: 'tenant_id',
|
|
16
|
+
organizationScopeId: 'organization_scope_id',
|
|
17
|
+
},
|
|
18
|
+
fieldKeys: [
|
|
19
|
+
'tenantId',
|
|
20
|
+
'organizationScopeId',
|
|
21
|
+
],
|
|
22
|
+
createGuard,
|
|
23
|
+
guard,
|
|
24
|
+
updateGuard: guard.partial(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GeneratedSchema } from './../foundations/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The API resource scopes (permissions) that client ID metadata document (CIMD) clients of the tenant can request. Rows are an allowlist: an empty table allows nothing (deny-all), and an unrestricted state is not expressible.
|
|
4
|
+
*
|
|
5
|
+
* @remarks This is a type for database creation.
|
|
6
|
+
* @see {@link CimdResourceScope} for the original type.
|
|
7
|
+
*/
|
|
8
|
+
export type CreateCimdResourceScope = {
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
/** The globally unique identifier of the API resource scope. */
|
|
11
|
+
scopeId: string;
|
|
12
|
+
};
|
|
13
|
+
/** The API resource scopes (permissions) that client ID metadata document (CIMD) clients of the tenant can request. Rows are an allowlist: an empty table allows nothing (deny-all), and an unrestricted state is not expressible. */
|
|
14
|
+
export type CimdResourceScope = {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
/** The globally unique identifier of the API resource scope. */
|
|
17
|
+
scopeId: string;
|
|
18
|
+
};
|
|
19
|
+
export type CimdResourceScopeKeys = 'tenantId' | 'scopeId';
|
|
20
|
+
export declare const CimdResourceScopes: GeneratedSchema<CimdResourceScopeKeys, CreateCimdResourceScope, CimdResourceScope, 'cimd_resource_scopes', 'cimd_resource_scope'>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const createGuard = z.object({
|
|
4
|
+
tenantId: z.string().max(21).optional(),
|
|
5
|
+
scopeId: z.string().min(1).max(21),
|
|
6
|
+
});
|
|
7
|
+
const guard = z.object({
|
|
8
|
+
tenantId: z.string().max(21),
|
|
9
|
+
scopeId: z.string().min(1).max(21),
|
|
10
|
+
});
|
|
11
|
+
export const CimdResourceScopes = Object.freeze({
|
|
12
|
+
table: 'cimd_resource_scopes',
|
|
13
|
+
tableSingular: 'cimd_resource_scope',
|
|
14
|
+
fields: {
|
|
15
|
+
tenantId: 'tenant_id',
|
|
16
|
+
scopeId: 'scope_id',
|
|
17
|
+
},
|
|
18
|
+
fieldKeys: [
|
|
19
|
+
'tenantId',
|
|
20
|
+
'scopeId',
|
|
21
|
+
],
|
|
22
|
+
createGuard,
|
|
23
|
+
guard,
|
|
24
|
+
updateGuard: guard.partial(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GeneratedSchema } from './../foundations/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The user scopes (permissions) that client ID metadata document (CIMD) clients of the tenant can request. Rows are an allowlist: an empty table allows nothing (deny-all), and an unrestricted state is not expressible.
|
|
4
|
+
*
|
|
5
|
+
* @remarks This is a type for database creation.
|
|
6
|
+
* @see {@link CimdUserScope} for the original type.
|
|
7
|
+
*/
|
|
8
|
+
export type CreateCimdUserScope = {
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
/** The unique UserScope enum value @see (@logto/core-kit/open-id.js) for more details */
|
|
11
|
+
userScope: string;
|
|
12
|
+
};
|
|
13
|
+
/** The user scopes (permissions) that client ID metadata document (CIMD) clients of the tenant can request. Rows are an allowlist: an empty table allows nothing (deny-all), and an unrestricted state is not expressible. */
|
|
14
|
+
export type CimdUserScope = {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
/** The unique UserScope enum value @see (@logto/core-kit/open-id.js) for more details */
|
|
17
|
+
userScope: string;
|
|
18
|
+
};
|
|
19
|
+
export type CimdUserScopeKeys = 'tenantId' | 'userScope';
|
|
20
|
+
export declare const CimdUserScopes: GeneratedSchema<CimdUserScopeKeys, CreateCimdUserScope, CimdUserScope, 'cimd_user_scopes', 'cimd_user_scope'>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const createGuard = z.object({
|
|
4
|
+
tenantId: z.string().max(21).optional(),
|
|
5
|
+
userScope: z.string().min(1).max(64),
|
|
6
|
+
});
|
|
7
|
+
const guard = z.object({
|
|
8
|
+
tenantId: z.string().max(21),
|
|
9
|
+
userScope: z.string().min(1).max(64),
|
|
10
|
+
});
|
|
11
|
+
export const CimdUserScopes = Object.freeze({
|
|
12
|
+
table: 'cimd_user_scopes',
|
|
13
|
+
tableSingular: 'cimd_user_scope',
|
|
14
|
+
fields: {
|
|
15
|
+
tenantId: 'tenant_id',
|
|
16
|
+
userScope: 'user_scope',
|
|
17
|
+
},
|
|
18
|
+
fieldKeys: [
|
|
19
|
+
'tenantId',
|
|
20
|
+
'userScope',
|
|
21
|
+
],
|
|
22
|
+
createGuard,
|
|
23
|
+
guard,
|
|
24
|
+
updateGuard: guard.partial(),
|
|
25
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DomainStatus, DomainDnsRecords, CloudflareData, GeneratedSchema } from './../foundations/index.js';
|
|
1
|
+
import { DomainStatus, DomainDnsRecords, DomainVerificationFiles, CloudflareData, GeneratedSchema } from './../foundations/index.js';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @remarks This is a type for database creation.
|
|
@@ -11,6 +11,7 @@ export type CreateDomain = {
|
|
|
11
11
|
status?: DomainStatus;
|
|
12
12
|
errorMessage?: string | null;
|
|
13
13
|
dnsRecords?: DomainDnsRecords;
|
|
14
|
+
verificationFiles?: DomainVerificationFiles;
|
|
14
15
|
cloudflareData?: CloudflareData | null;
|
|
15
16
|
updatedAt?: number;
|
|
16
17
|
createdAt?: number;
|
|
@@ -22,9 +23,10 @@ export type Domain = {
|
|
|
22
23
|
status: DomainStatus;
|
|
23
24
|
errorMessage: string | null;
|
|
24
25
|
dnsRecords: DomainDnsRecords;
|
|
26
|
+
verificationFiles: DomainVerificationFiles;
|
|
25
27
|
cloudflareData: CloudflareData | null;
|
|
26
28
|
updatedAt: number;
|
|
27
29
|
createdAt: number;
|
|
28
30
|
};
|
|
29
|
-
export type DomainKeys = 'tenantId' | 'id' | 'domain' | 'status' | 'errorMessage' | 'dnsRecords' | 'cloudflareData' | 'updatedAt' | 'createdAt';
|
|
31
|
+
export type DomainKeys = 'tenantId' | 'id' | 'domain' | 'status' | 'errorMessage' | 'dnsRecords' | 'verificationFiles' | 'cloudflareData' | 'updatedAt' | 'createdAt';
|
|
30
32
|
export declare const Domains: GeneratedSchema<DomainKeys, CreateDomain, Domain, 'domains', 'domain'>;
|
package/lib/db-entries/domain.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { domainStatusGuard, domainDnsRecordsGuard, cloudflareDataGuard } from './../foundations/index.js';
|
|
3
|
+
import { domainStatusGuard, domainDnsRecordsGuard, domainVerificationFilesGuard, cloudflareDataGuard } from './../foundations/index.js';
|
|
4
4
|
const createGuard = z.object({
|
|
5
5
|
tenantId: z.string().max(21).optional(),
|
|
6
6
|
id: z.string().min(1).max(21),
|
|
@@ -8,6 +8,7 @@ const createGuard = z.object({
|
|
|
8
8
|
status: domainStatusGuard.optional(),
|
|
9
9
|
errorMessage: z.string().max(1024).nullable().optional(),
|
|
10
10
|
dnsRecords: domainDnsRecordsGuard.optional(),
|
|
11
|
+
verificationFiles: domainVerificationFilesGuard.optional(),
|
|
11
12
|
cloudflareData: cloudflareDataGuard.nullable().optional(),
|
|
12
13
|
updatedAt: z.number().optional(),
|
|
13
14
|
createdAt: z.number().optional(),
|
|
@@ -19,6 +20,7 @@ const guard = z.object({
|
|
|
19
20
|
status: domainStatusGuard,
|
|
20
21
|
errorMessage: z.string().max(1024).nullable(),
|
|
21
22
|
dnsRecords: domainDnsRecordsGuard,
|
|
23
|
+
verificationFiles: domainVerificationFilesGuard,
|
|
22
24
|
cloudflareData: cloudflareDataGuard.nullable(),
|
|
23
25
|
updatedAt: z.number(),
|
|
24
26
|
createdAt: z.number(),
|
|
@@ -33,6 +35,7 @@ export const Domains = Object.freeze({
|
|
|
33
35
|
status: 'status',
|
|
34
36
|
errorMessage: 'error_message',
|
|
35
37
|
dnsRecords: 'dns_records',
|
|
38
|
+
verificationFiles: 'verification_files',
|
|
36
39
|
cloudflareData: 'cloudflare_data',
|
|
37
40
|
updatedAt: 'updated_at',
|
|
38
41
|
createdAt: 'created_at',
|
|
@@ -44,6 +47,7 @@ export const Domains = Object.freeze({
|
|
|
44
47
|
'status',
|
|
45
48
|
'errorMessage',
|
|
46
49
|
'dnsRecords',
|
|
50
|
+
'verificationFiles',
|
|
47
51
|
'cloudflareData',
|
|
48
52
|
'updatedAt',
|
|
49
53
|
'createdAt',
|
|
@@ -19,6 +19,12 @@ export * from './application-user-consent-user-scope.js';
|
|
|
19
19
|
export * from './application.js';
|
|
20
20
|
export * from './applications-role.js';
|
|
21
21
|
export * from './captcha-provider.js';
|
|
22
|
+
export * from './cimd-grant-client-snapshot.js';
|
|
23
|
+
export * from './cimd-grant-organization.js';
|
|
24
|
+
export * from './cimd-organization-resource-scope.js';
|
|
25
|
+
export * from './cimd-organization-scope.js';
|
|
26
|
+
export * from './cimd-resource-scope.js';
|
|
27
|
+
export * from './cimd-user-scope.js';
|
|
22
28
|
export * from './connector.js';
|
|
23
29
|
export * from './custom-phrase.js';
|
|
24
30
|
export * from './custom-profile-field.js';
|
|
@@ -55,6 +61,7 @@ export * from './roles-scope.js';
|
|
|
55
61
|
export * from './saml-application-config.js';
|
|
56
62
|
export * from './saml-application-secret.js';
|
|
57
63
|
export * from './saml-application-session.js';
|
|
64
|
+
export * from './saml-sso-connector-signing-key.js';
|
|
58
65
|
export * from './scope.js';
|
|
59
66
|
export * from './secret-enterprise-sso-connector-relation.js';
|
|
60
67
|
export * from './secret-social-connector-relation.js';
|
|
@@ -66,6 +73,7 @@ export * from './sso-connector-idp-initiated-auth-config.js';
|
|
|
66
73
|
export * from './sso-connector.js';
|
|
67
74
|
export * from './subject-token.js';
|
|
68
75
|
export * from './system.js';
|
|
76
|
+
export * from './trusted-device.js';
|
|
69
77
|
export * from './user-geo-location.js';
|
|
70
78
|
export * from './user-sign-in-country.js';
|
|
71
79
|
export * from './user-sso-identity.js';
|
package/lib/db-entries/index.js
CHANGED
|
@@ -20,6 +20,12 @@ export * from './application-user-consent-user-scope.js';
|
|
|
20
20
|
export * from './application.js';
|
|
21
21
|
export * from './applications-role.js';
|
|
22
22
|
export * from './captcha-provider.js';
|
|
23
|
+
export * from './cimd-grant-client-snapshot.js';
|
|
24
|
+
export * from './cimd-grant-organization.js';
|
|
25
|
+
export * from './cimd-organization-resource-scope.js';
|
|
26
|
+
export * from './cimd-organization-scope.js';
|
|
27
|
+
export * from './cimd-resource-scope.js';
|
|
28
|
+
export * from './cimd-user-scope.js';
|
|
23
29
|
export * from './connector.js';
|
|
24
30
|
export * from './custom-phrase.js';
|
|
25
31
|
export * from './custom-profile-field.js';
|
|
@@ -56,6 +62,7 @@ export * from './roles-scope.js';
|
|
|
56
62
|
export * from './saml-application-config.js';
|
|
57
63
|
export * from './saml-application-secret.js';
|
|
58
64
|
export * from './saml-application-session.js';
|
|
65
|
+
export * from './saml-sso-connector-signing-key.js';
|
|
59
66
|
export * from './scope.js';
|
|
60
67
|
export * from './secret-enterprise-sso-connector-relation.js';
|
|
61
68
|
export * from './secret-social-connector-relation.js';
|
|
@@ -67,6 +74,7 @@ export * from './sso-connector-idp-initiated-auth-config.js';
|
|
|
67
74
|
export * from './sso-connector.js';
|
|
68
75
|
export * from './subject-token.js';
|
|
69
76
|
export * from './system.js';
|
|
77
|
+
export * from './trusted-device.js';
|
|
70
78
|
export * from './user-geo-location.js';
|
|
71
79
|
export * from './user-sign-in-country.js';
|
|
72
80
|
export * from './user-sso-identity.js';
|
|
@@ -10,6 +10,7 @@ export type CreateOidcSessionExtension = {
|
|
|
10
10
|
accountId: string;
|
|
11
11
|
lastSubmission?: JsonObject;
|
|
12
12
|
clientId?: string | null;
|
|
13
|
+
cimdClientId?: string | null;
|
|
13
14
|
createdAt?: number;
|
|
14
15
|
updatedAt?: number;
|
|
15
16
|
};
|
|
@@ -19,8 +20,9 @@ export type OidcSessionExtension = {
|
|
|
19
20
|
accountId: string;
|
|
20
21
|
lastSubmission: JsonObject;
|
|
21
22
|
clientId: string | null;
|
|
23
|
+
cimdClientId: string | null;
|
|
22
24
|
createdAt: number;
|
|
23
25
|
updatedAt: number;
|
|
24
26
|
};
|
|
25
|
-
export type OidcSessionExtensionKeys = 'tenantId' | 'sessionUid' | 'accountId' | 'lastSubmission' | 'clientId' | 'createdAt' | 'updatedAt';
|
|
27
|
+
export type OidcSessionExtensionKeys = 'tenantId' | 'sessionUid' | 'accountId' | 'lastSubmission' | 'clientId' | 'cimdClientId' | 'createdAt' | 'updatedAt';
|
|
26
28
|
export declare const OidcSessionExtensions: GeneratedSchema<OidcSessionExtensionKeys, CreateOidcSessionExtension, OidcSessionExtension, 'oidc_session_extensions', 'oidc_session_extension'>;
|
|
@@ -7,6 +7,7 @@ const createGuard = z.object({
|
|
|
7
7
|
accountId: z.string().min(1).max(12),
|
|
8
8
|
lastSubmission: jsonObjectGuard.optional(),
|
|
9
9
|
clientId: z.string().max(21).nullable().optional(),
|
|
10
|
+
cimdClientId: z.string().max(2048).nullable().optional(),
|
|
10
11
|
createdAt: z.number().optional(),
|
|
11
12
|
updatedAt: z.number().optional(),
|
|
12
13
|
});
|
|
@@ -16,6 +17,7 @@ const guard = z.object({
|
|
|
16
17
|
accountId: z.string().min(1).max(12),
|
|
17
18
|
lastSubmission: jsonObjectGuard,
|
|
18
19
|
clientId: z.string().max(21).nullable(),
|
|
20
|
+
cimdClientId: z.string().max(2048).nullable(),
|
|
19
21
|
createdAt: z.number(),
|
|
20
22
|
updatedAt: z.number(),
|
|
21
23
|
});
|
|
@@ -28,6 +30,7 @@ export const OidcSessionExtensions = Object.freeze({
|
|
|
28
30
|
accountId: 'account_id',
|
|
29
31
|
lastSubmission: 'last_submission',
|
|
30
32
|
clientId: 'client_id',
|
|
33
|
+
cimdClientId: 'cimd_client_id',
|
|
31
34
|
createdAt: 'created_at',
|
|
32
35
|
updatedAt: 'updated_at',
|
|
33
36
|
},
|
|
@@ -37,6 +40,7 @@ export const OidcSessionExtensions = Object.freeze({
|
|
|
37
40
|
'accountId',
|
|
38
41
|
'lastSubmission',
|
|
39
42
|
'clientId',
|
|
43
|
+
'cimdClientId',
|
|
40
44
|
'createdAt',
|
|
41
45
|
'updatedAt',
|
|
42
46
|
],
|
|
@@ -17,6 +17,8 @@ export type CreateOrganization = {
|
|
|
17
17
|
customData?: JsonObject;
|
|
18
18
|
/** Whether multi-factor authentication configuration is required for the members of the organization. */
|
|
19
19
|
isMfaRequired?: boolean;
|
|
20
|
+
/** Whether trusted devices are allowed for members of the organization. */
|
|
21
|
+
isTrustedDeviceAllowed?: boolean;
|
|
20
22
|
/** The organization's branding color configuration. */
|
|
21
23
|
color?: PartialColor;
|
|
22
24
|
/** The organization's branding configuration. */
|
|
@@ -39,6 +41,8 @@ export type Organization = {
|
|
|
39
41
|
customData: JsonObject;
|
|
40
42
|
/** Whether multi-factor authentication configuration is required for the members of the organization. */
|
|
41
43
|
isMfaRequired: boolean;
|
|
44
|
+
/** Whether trusted devices are allowed for members of the organization. */
|
|
45
|
+
isTrustedDeviceAllowed: boolean;
|
|
42
46
|
/** The organization's branding color configuration. */
|
|
43
47
|
color: PartialColor;
|
|
44
48
|
/** The organization's branding configuration. */
|
|
@@ -48,5 +52,5 @@ export type Organization = {
|
|
|
48
52
|
/** When the organization was created. */
|
|
49
53
|
createdAt: number;
|
|
50
54
|
};
|
|
51
|
-
export type OrganizationKeys = 'tenantId' | 'id' | 'name' | 'description' | 'customData' | 'isMfaRequired' | 'color' | 'branding' | 'customCss' | 'createdAt';
|
|
55
|
+
export type OrganizationKeys = 'tenantId' | 'id' | 'name' | 'description' | 'customData' | 'isMfaRequired' | 'isTrustedDeviceAllowed' | 'color' | 'branding' | 'customCss' | 'createdAt';
|
|
52
56
|
export declare const Organizations: GeneratedSchema<OrganizationKeys, CreateOrganization, Organization, 'organizations', 'organization'>;
|
|
@@ -8,6 +8,7 @@ const createGuard = z.object({
|
|
|
8
8
|
description: z.string().max(256).nullable().optional(),
|
|
9
9
|
customData: jsonObjectGuard.optional(),
|
|
10
10
|
isMfaRequired: z.boolean().optional(),
|
|
11
|
+
isTrustedDeviceAllowed: z.boolean().optional(),
|
|
11
12
|
color: partialColorGuard.optional(),
|
|
12
13
|
branding: brandingGuard.optional(),
|
|
13
14
|
customCss: z.string().nullable().optional(),
|
|
@@ -20,6 +21,7 @@ const guard = z.object({
|
|
|
20
21
|
description: z.string().max(256).nullable(),
|
|
21
22
|
customData: jsonObjectGuard,
|
|
22
23
|
isMfaRequired: z.boolean(),
|
|
24
|
+
isTrustedDeviceAllowed: z.boolean(),
|
|
23
25
|
color: partialColorGuard,
|
|
24
26
|
branding: brandingGuard,
|
|
25
27
|
customCss: z.string().nullable(),
|
|
@@ -35,6 +37,7 @@ export const Organizations = Object.freeze({
|
|
|
35
37
|
description: 'description',
|
|
36
38
|
customData: 'custom_data',
|
|
37
39
|
isMfaRequired: 'is_mfa_required',
|
|
40
|
+
isTrustedDeviceAllowed: 'is_trusted_device_allowed',
|
|
38
41
|
color: 'color',
|
|
39
42
|
branding: 'branding',
|
|
40
43
|
customCss: 'custom_css',
|
|
@@ -47,6 +50,7 @@ export const Organizations = Object.freeze({
|
|
|
47
50
|
'description',
|
|
48
51
|
'customData',
|
|
49
52
|
'isMfaRequired',
|
|
53
|
+
'isTrustedDeviceAllowed',
|
|
50
54
|
'color',
|
|
51
55
|
'branding',
|
|
52
56
|
'customCss',
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GeneratedSchema } from './../foundations/index.js';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @remarks This is a type for database creation.
|
|
5
|
+
* @see {@link SamlSsoConnectorSigningKey} for the original type.
|
|
6
|
+
*/
|
|
7
|
+
export type CreateSamlSsoConnectorSigningKey = {
|
|
8
|
+
id: string;
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
ssoConnectorId: string;
|
|
11
|
+
/** The SP private key (plaintext PEM) used to sign the SAML AuthnRequest. Tenant-isolated by RLS and never returned by the API. */
|
|
12
|
+
privateKey: string;
|
|
13
|
+
/** The PEM-encoded self-signed SP certificate matching the private key. Public and safe to expose. */
|
|
14
|
+
certificate: string;
|
|
15
|
+
createdAt?: number;
|
|
16
|
+
expiresAt: number;
|
|
17
|
+
active: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type SamlSsoConnectorSigningKey = {
|
|
20
|
+
id: string;
|
|
21
|
+
tenantId: string;
|
|
22
|
+
ssoConnectorId: string;
|
|
23
|
+
/** The SP private key (plaintext PEM) used to sign the SAML AuthnRequest. Tenant-isolated by RLS and never returned by the API. */
|
|
24
|
+
privateKey: string;
|
|
25
|
+
/** The PEM-encoded self-signed SP certificate matching the private key. Public and safe to expose. */
|
|
26
|
+
certificate: string;
|
|
27
|
+
createdAt: number;
|
|
28
|
+
expiresAt: number;
|
|
29
|
+
active: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type SamlSsoConnectorSigningKeyKeys = 'id' | 'tenantId' | 'ssoConnectorId' | 'privateKey' | 'certificate' | 'createdAt' | 'expiresAt' | 'active';
|
|
32
|
+
export declare const SamlSsoConnectorSigningKeys: GeneratedSchema<SamlSsoConnectorSigningKeyKeys, CreateSamlSsoConnectorSigningKey, SamlSsoConnectorSigningKey, 'saml_sso_connector_signing_keys', 'saml_sso_connector_signing_key'>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const createGuard = z.object({
|
|
4
|
+
id: z.string().min(1).max(21),
|
|
5
|
+
tenantId: z.string().max(21).optional(),
|
|
6
|
+
ssoConnectorId: z.string().min(1).max(128),
|
|
7
|
+
privateKey: z.string().min(1),
|
|
8
|
+
certificate: z.string().min(1),
|
|
9
|
+
createdAt: z.number().optional(),
|
|
10
|
+
expiresAt: z.number(),
|
|
11
|
+
active: z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
const guard = z.object({
|
|
14
|
+
id: z.string().min(1).max(21),
|
|
15
|
+
tenantId: z.string().max(21),
|
|
16
|
+
ssoConnectorId: z.string().min(1).max(128),
|
|
17
|
+
privateKey: z.string().min(1),
|
|
18
|
+
certificate: z.string().min(1),
|
|
19
|
+
createdAt: z.number(),
|
|
20
|
+
expiresAt: z.number(),
|
|
21
|
+
active: z.boolean(),
|
|
22
|
+
});
|
|
23
|
+
export const SamlSsoConnectorSigningKeys = Object.freeze({
|
|
24
|
+
table: 'saml_sso_connector_signing_keys',
|
|
25
|
+
tableSingular: 'saml_sso_connector_signing_key',
|
|
26
|
+
fields: {
|
|
27
|
+
id: 'id',
|
|
28
|
+
tenantId: 'tenant_id',
|
|
29
|
+
ssoConnectorId: 'sso_connector_id',
|
|
30
|
+
privateKey: 'private_key',
|
|
31
|
+
certificate: 'certificate',
|
|
32
|
+
createdAt: 'created_at',
|
|
33
|
+
expiresAt: 'expires_at',
|
|
34
|
+
active: 'active',
|
|
35
|
+
},
|
|
36
|
+
fieldKeys: [
|
|
37
|
+
'id',
|
|
38
|
+
'tenantId',
|
|
39
|
+
'ssoConnectorId',
|
|
40
|
+
'privateKey',
|
|
41
|
+
'certificate',
|
|
42
|
+
'createdAt',
|
|
43
|
+
'expiresAt',
|
|
44
|
+
'active',
|
|
45
|
+
],
|
|
46
|
+
createGuard,
|
|
47
|
+
guard,
|
|
48
|
+
updateGuard: guard.partial(),
|
|
49
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, Branding, LanguageInfo, SignIn, SignUp, SocialSignIn, ConnectorTargets, CustomContent, CustomUiAssets, CustomUiCsp, PartialPasswordPolicy, Mfa, AdaptiveMfa, CaptchaPolicy, SentinelPolicy, EmailBlocklistPolicy, VerificationCodePolicy, ForgotPasswordMethods, PasskeySignIn, SignUpProfileFields, PasswordExpirationPolicy, UsernamePolicy, GeneratedSchema } from './../foundations/index.js';
|
|
1
|
+
import { Color, Branding, LanguageInfo, SignIn, SignUp, SocialSignIn, ConnectorTargets, CustomContent, CustomUiAssets, CustomUiCsp, PartialPasswordPolicy, Mfa, AdaptiveMfa, TrustedDevicePolicy, CaptchaPolicy, SentinelPolicy, EmailBlocklistPolicy, VerificationCodePolicy, ForgotPasswordMethods, PasskeySignIn, SignUpProfileFields, PasswordExpirationPolicy, UsernamePolicy, GeneratedSchema } from './../foundations/index.js';
|
|
2
2
|
import { AgreeToTermsPolicy, SignInMode } from './custom-types.js';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
@@ -28,6 +28,7 @@ export type CreateSignInExperience = {
|
|
|
28
28
|
passwordPolicy?: PartialPasswordPolicy;
|
|
29
29
|
mfa?: Mfa;
|
|
30
30
|
adaptiveMfa?: AdaptiveMfa;
|
|
31
|
+
trustedDevice?: TrustedDevicePolicy;
|
|
31
32
|
singleSignOnEnabled?: boolean;
|
|
32
33
|
supportEmail?: string | null;
|
|
33
34
|
supportWebsiteUrl?: string | null;
|
|
@@ -66,6 +67,7 @@ export type SignInExperience = {
|
|
|
66
67
|
passwordPolicy: PartialPasswordPolicy;
|
|
67
68
|
mfa: Mfa;
|
|
68
69
|
adaptiveMfa: AdaptiveMfa;
|
|
70
|
+
trustedDevice: TrustedDevicePolicy;
|
|
69
71
|
singleSignOnEnabled: boolean;
|
|
70
72
|
supportEmail: string | null;
|
|
71
73
|
supportWebsiteUrl: string | null;
|
|
@@ -81,5 +83,5 @@ export type SignInExperience = {
|
|
|
81
83
|
passwordExpiration: PasswordExpirationPolicy;
|
|
82
84
|
usernamePolicy: UsernamePolicy;
|
|
83
85
|
};
|
|
84
|
-
export type SignInExperienceKeys = 'tenantId' | 'id' | 'color' | 'branding' | 'hideLogtoBranding' | 'languageInfo' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'agreeToTermsPolicy' | 'signIn' | 'signUp' | 'socialSignIn' | 'socialSignInConnectorTargets' | 'signInMode' | 'customCss' | 'customContent' | 'customUiAssets' | 'customUiCsp' | 'passwordPolicy' | 'mfa' | 'adaptiveMfa' | 'singleSignOnEnabled' | 'supportEmail' | 'supportWebsiteUrl' | 'unknownSessionRedirectUrl' | 'captchaPolicy' | 'sentinelPolicy' | 'emailBlocklistPolicy' | 'verificationCodePolicy' | 'forgotPasswordMethods' | 'passkeySignIn' | 'signUpProfileFields' | 'passwordExpiration' | 'usernamePolicy';
|
|
86
|
+
export type SignInExperienceKeys = 'tenantId' | 'id' | 'color' | 'branding' | 'hideLogtoBranding' | 'languageInfo' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'agreeToTermsPolicy' | 'signIn' | 'signUp' | 'socialSignIn' | 'socialSignInConnectorTargets' | 'signInMode' | 'customCss' | 'customContent' | 'customUiAssets' | 'customUiCsp' | 'passwordPolicy' | 'mfa' | 'adaptiveMfa' | 'trustedDevice' | 'singleSignOnEnabled' | 'supportEmail' | 'supportWebsiteUrl' | 'unknownSessionRedirectUrl' | 'captchaPolicy' | 'sentinelPolicy' | 'emailBlocklistPolicy' | 'verificationCodePolicy' | 'forgotPasswordMethods' | 'passkeySignIn' | 'signUpProfileFields' | 'passwordExpiration' | 'usernamePolicy';
|
|
85
87
|
export declare const SignInExperiences: GeneratedSchema<SignInExperienceKeys, CreateSignInExperience, SignInExperience, 'sign_in_experiences', 'sign_in_experience'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { colorGuard, brandingGuard, languageInfoGuard, signInGuard, signUpGuard, socialSignInGuard, connectorTargetsGuard, customContentGuard, customUiAssetsGuard, customUiCspGuard, partialPasswordPolicyGuard, mfaGuard, adaptiveMfaGuard, captchaPolicyGuard, sentinelPolicyGuard, emailBlocklistPolicyGuard, verificationCodePolicyGuard, forgotPasswordMethodsGuard, passkeySignInGuard, signUpProfileFieldsGuard, passwordExpirationPolicyGuard, usernamePolicyGuard } from './../foundations/index.js';
|
|
3
|
+
import { colorGuard, brandingGuard, languageInfoGuard, signInGuard, signUpGuard, socialSignInGuard, connectorTargetsGuard, customContentGuard, customUiAssetsGuard, customUiCspGuard, partialPasswordPolicyGuard, mfaGuard, adaptiveMfaGuard, trustedDevicePolicyGuard, captchaPolicyGuard, sentinelPolicyGuard, emailBlocklistPolicyGuard, verificationCodePolicyGuard, forgotPasswordMethodsGuard, passkeySignInGuard, signUpProfileFieldsGuard, passwordExpirationPolicyGuard, usernamePolicyGuard } from './../foundations/index.js';
|
|
4
4
|
import { AgreeToTermsPolicy, SignInMode } from './custom-types.js';
|
|
5
5
|
const createGuard = z.object({
|
|
6
6
|
tenantId: z.string().max(21).optional(),
|
|
@@ -24,6 +24,7 @@ const createGuard = z.object({
|
|
|
24
24
|
passwordPolicy: partialPasswordPolicyGuard.optional(),
|
|
25
25
|
mfa: mfaGuard.optional(),
|
|
26
26
|
adaptiveMfa: adaptiveMfaGuard.optional(),
|
|
27
|
+
trustedDevice: trustedDevicePolicyGuard.optional(),
|
|
27
28
|
singleSignOnEnabled: z.boolean().optional(),
|
|
28
29
|
supportEmail: z.string().nullable().optional(),
|
|
29
30
|
supportWebsiteUrl: z.string().nullable().optional(),
|
|
@@ -60,6 +61,7 @@ const guard = z.object({
|
|
|
60
61
|
passwordPolicy: partialPasswordPolicyGuard,
|
|
61
62
|
mfa: mfaGuard,
|
|
62
63
|
adaptiveMfa: adaptiveMfaGuard,
|
|
64
|
+
trustedDevice: trustedDevicePolicyGuard,
|
|
63
65
|
singleSignOnEnabled: z.boolean(),
|
|
64
66
|
supportEmail: z.string().nullable(),
|
|
65
67
|
supportWebsiteUrl: z.string().nullable(),
|
|
@@ -99,6 +101,7 @@ export const SignInExperiences = Object.freeze({
|
|
|
99
101
|
passwordPolicy: 'password_policy',
|
|
100
102
|
mfa: 'mfa',
|
|
101
103
|
adaptiveMfa: 'adaptive_mfa',
|
|
104
|
+
trustedDevice: 'trusted_device',
|
|
102
105
|
singleSignOnEnabled: 'single_sign_on_enabled',
|
|
103
106
|
supportEmail: 'support_email',
|
|
104
107
|
supportWebsiteUrl: 'support_website_url',
|
|
@@ -135,6 +138,7 @@ export const SignInExperiences = Object.freeze({
|
|
|
135
138
|
'passwordPolicy',
|
|
136
139
|
'mfa',
|
|
137
140
|
'adaptiveMfa',
|
|
141
|
+
'trustedDevice',
|
|
138
142
|
'singleSignOnEnabled',
|
|
139
143
|
'supportEmail',
|
|
140
144
|
'supportWebsiteUrl',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BufferLike, GeneratedSchema } from './../foundations/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* A revocable server-side credential that can fulfill sign-in MFA for a user.
|
|
4
|
+
*
|
|
5
|
+
* @remarks This is a type for database creation.
|
|
6
|
+
* @see {@link TrustedDevice} for the original type.
|
|
7
|
+
*/
|
|
8
|
+
export type CreateTrustedDevice = {
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
id: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
secretHash: BufferLike;
|
|
13
|
+
userAgent?: string | null;
|
|
14
|
+
ip?: string | null;
|
|
15
|
+
country?: string | null;
|
|
16
|
+
city?: string | null;
|
|
17
|
+
createdAt?: number;
|
|
18
|
+
lastUsedAt?: number;
|
|
19
|
+
expiresAt: number;
|
|
20
|
+
};
|
|
21
|
+
/** A revocable server-side credential that can fulfill sign-in MFA for a user. */
|
|
22
|
+
export type TrustedDevice = {
|
|
23
|
+
tenantId: string;
|
|
24
|
+
id: string;
|
|
25
|
+
userId: string;
|
|
26
|
+
secretHash: BufferLike;
|
|
27
|
+
userAgent: string | null;
|
|
28
|
+
ip: string | null;
|
|
29
|
+
country: string | null;
|
|
30
|
+
city: string | null;
|
|
31
|
+
createdAt: number;
|
|
32
|
+
lastUsedAt: number;
|
|
33
|
+
expiresAt: number;
|
|
34
|
+
};
|
|
35
|
+
export type TrustedDeviceKeys = 'tenantId' | 'id' | 'userId' | 'secretHash' | 'userAgent' | 'ip' | 'country' | 'city' | 'createdAt' | 'lastUsedAt' | 'expiresAt';
|
|
36
|
+
export declare const TrustedDevices: GeneratedSchema<TrustedDeviceKeys, CreateTrustedDevice, TrustedDevice, 'trusted_devices', 'trusted_device'>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { bufferLikeGuard } from './../foundations/index.js';
|
|
4
|
+
const createGuard = z.object({
|
|
5
|
+
tenantId: z.string().max(21).optional(),
|
|
6
|
+
id: z.string().min(1).max(21),
|
|
7
|
+
userId: z.string().min(1).max(12),
|
|
8
|
+
secretHash: bufferLikeGuard,
|
|
9
|
+
userAgent: z.string().nullable().optional(),
|
|
10
|
+
ip: z.string().nullable().optional(),
|
|
11
|
+
country: z.string().max(16).nullable().optional(),
|
|
12
|
+
city: z.string().nullable().optional(),
|
|
13
|
+
createdAt: z.number().optional(),
|
|
14
|
+
lastUsedAt: z.number().optional(),
|
|
15
|
+
expiresAt: z.number(),
|
|
16
|
+
});
|
|
17
|
+
const guard = z.object({
|
|
18
|
+
tenantId: z.string().max(21),
|
|
19
|
+
id: z.string().min(1).max(21),
|
|
20
|
+
userId: z.string().min(1).max(12),
|
|
21
|
+
secretHash: bufferLikeGuard,
|
|
22
|
+
userAgent: z.string().nullable(),
|
|
23
|
+
ip: z.string().nullable(),
|
|
24
|
+
country: z.string().max(16).nullable(),
|
|
25
|
+
city: z.string().nullable(),
|
|
26
|
+
createdAt: z.number(),
|
|
27
|
+
lastUsedAt: z.number(),
|
|
28
|
+
expiresAt: z.number(),
|
|
29
|
+
});
|
|
30
|
+
export const TrustedDevices = Object.freeze({
|
|
31
|
+
table: 'trusted_devices',
|
|
32
|
+
tableSingular: 'trusted_device',
|
|
33
|
+
fields: {
|
|
34
|
+
tenantId: 'tenant_id',
|
|
35
|
+
id: 'id',
|
|
36
|
+
userId: 'user_id',
|
|
37
|
+
secretHash: 'secret_hash',
|
|
38
|
+
userAgent: 'user_agent',
|
|
39
|
+
ip: 'ip',
|
|
40
|
+
country: 'country',
|
|
41
|
+
city: 'city',
|
|
42
|
+
createdAt: 'created_at',
|
|
43
|
+
lastUsedAt: 'last_used_at',
|
|
44
|
+
expiresAt: 'expires_at',
|
|
45
|
+
},
|
|
46
|
+
fieldKeys: [
|
|
47
|
+
'tenantId',
|
|
48
|
+
'id',
|
|
49
|
+
'userId',
|
|
50
|
+
'secretHash',
|
|
51
|
+
'userAgent',
|
|
52
|
+
'ip',
|
|
53
|
+
'country',
|
|
54
|
+
'city',
|
|
55
|
+
'createdAt',
|
|
56
|
+
'lastUsedAt',
|
|
57
|
+
'expiresAt',
|
|
58
|
+
],
|
|
59
|
+
createGuard,
|
|
60
|
+
guard,
|
|
61
|
+
updateGuard: guard.partial(),
|
|
62
|
+
});
|
package/lib/db-entries/user.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export type CreateUser = {
|
|
|
19
19
|
/** Additional OpenID Connect standard claims that are not included in user's properties. */
|
|
20
20
|
profile?: UserProfile;
|
|
21
21
|
applicationId?: string | null;
|
|
22
|
+
cimdClientId?: string | null;
|
|
22
23
|
identities?: Identities;
|
|
23
24
|
customData?: JsonObject;
|
|
24
25
|
logtoConfig?: JsonObject;
|
|
@@ -44,6 +45,7 @@ export type User = {
|
|
|
44
45
|
/** Additional OpenID Connect standard claims that are not included in user's properties. */
|
|
45
46
|
profile: UserProfile;
|
|
46
47
|
applicationId: string | null;
|
|
48
|
+
cimdClientId: string | null;
|
|
47
49
|
identities: Identities;
|
|
48
50
|
customData: JsonObject;
|
|
49
51
|
logtoConfig: JsonObject;
|
|
@@ -55,5 +57,5 @@ export type User = {
|
|
|
55
57
|
createdAt: number;
|
|
56
58
|
updatedAt: number;
|
|
57
59
|
};
|
|
58
|
-
export type UserKeys = 'tenantId' | 'id' | 'username' | 'primaryEmail' | 'primaryPhone' | 'passwordEncrypted' | 'passwordEncryptionMethod' | 'name' | 'avatar' | 'profile' | 'applicationId' | 'identities' | 'customData' | 'logtoConfig' | 'mfaVerifications' | 'isSuspended' | 'isPasswordExpired' | 'lastSignInAt' | 'passwordUpdatedAt' | 'createdAt' | 'updatedAt';
|
|
60
|
+
export type UserKeys = 'tenantId' | 'id' | 'username' | 'primaryEmail' | 'primaryPhone' | 'passwordEncrypted' | 'passwordEncryptionMethod' | 'name' | 'avatar' | 'profile' | 'applicationId' | 'cimdClientId' | 'identities' | 'customData' | 'logtoConfig' | 'mfaVerifications' | 'isSuspended' | 'isPasswordExpired' | 'lastSignInAt' | 'passwordUpdatedAt' | 'createdAt' | 'updatedAt';
|
|
59
61
|
export declare const Users: GeneratedSchema<UserKeys, CreateUser, User, 'users', 'user'>;
|