@logto/schemas 1.32.0 → 1.34.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.
Files changed (33) hide show
  1. package/alterations/1.33.0-1760427166-add-applications-type-index.ts +19 -0
  2. package/alterations/1.33.0-1760427167-add-roles-type-index.ts +19 -0
  3. package/alterations/1.33.0-1761283464-add-hide-logto-branding-column.ts +20 -0
  4. package/alterations/1.34.0-1762338508-add-organization-roles-type-index.ts +19 -0
  5. package/alterations/1.34.0-1764164658-add-applications-roles-include-indexes.ts +38 -0
  6. package/alterations/1.34.0-1764236036-remove-applications-roles-include-indexes.ts +38 -0
  7. package/alterations-js/1.33.0-1760427166-add-applications-type-index.js +15 -0
  8. package/alterations-js/1.33.0-1760427167-add-roles-type-index.js +15 -0
  9. package/alterations-js/1.33.0-1761283464-add-hide-logto-branding-column.js +16 -0
  10. package/alterations-js/1.34.0-1762338508-add-organization-roles-type-index.js +15 -0
  11. package/alterations-js/1.34.0-1764164658-add-applications-roles-include-indexes.js +30 -0
  12. package/alterations-js/1.34.0-1764236036-remove-applications-roles-include-indexes.js +30 -0
  13. package/lib/consts/index.d.ts +1 -0
  14. package/lib/consts/index.js +1 -0
  15. package/lib/consts/product-event.d.ts +99 -0
  16. package/lib/consts/product-event.js +102 -0
  17. package/lib/db-entries/sign-in-experience.d.ts +3 -1
  18. package/lib/db-entries/sign-in-experience.js +4 -0
  19. package/lib/foundations/jsonb-types/hooks.d.ts +6 -4
  20. package/lib/foundations/jsonb-types/hooks.js +3 -1
  21. package/lib/foundations/jsonb-types/oidc-module.js +1 -1
  22. package/lib/seeds/application.d.ts +6 -0
  23. package/lib/seeds/application.js +23 -4
  24. package/lib/seeds/sign-in-experience.js +1 -0
  25. package/lib/types/domain.d.ts +4 -2
  26. package/lib/types/domain.js +2 -0
  27. package/lib/types/hook.d.ts +7 -4
  28. package/lib/types/sign-in-experience.d.ts +3 -0
  29. package/package.json +5 -5
  30. package/tables/applications.sql +3 -0
  31. package/tables/organization_roles.sql +3 -0
  32. package/tables/roles.sql +3 -0
  33. package/tables/sign_in_experiences.sql +1 -0
@@ -0,0 +1,19 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ create index applications__type
9
+ on applications (tenant_id, type);
10
+ `);
11
+ },
12
+ down: async (pool) => {
13
+ await pool.query(sql`
14
+ drop index applications__type;
15
+ `);
16
+ },
17
+ };
18
+
19
+ export default alteration;
@@ -0,0 +1,19 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ create index roles__type
9
+ on roles (tenant_id, type);
10
+ `);
11
+ },
12
+ down: async (pool) => {
13
+ await pool.query(sql`
14
+ drop index roles__type;
15
+ `);
16
+ },
17
+ };
18
+
19
+ export default alteration;
@@ -0,0 +1,20 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ alter table sign_in_experiences
9
+ add column hide_logto_branding boolean not null default false;
10
+ `);
11
+ },
12
+ down: async (pool) => {
13
+ await pool.query(sql`
14
+ alter table sign_in_experiences
15
+ drop column hide_logto_branding;
16
+ `);
17
+ },
18
+ };
19
+
20
+ export default alteration;
@@ -0,0 +1,19 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ create index organization_roles__type
9
+ on organization_roles (tenant_id, type);
10
+ `);
11
+ },
12
+ down: async (pool) => {
13
+ await pool.query(sql`
14
+ drop index organization_roles__type;
15
+ `);
16
+ },
17
+ };
18
+
19
+ export default alteration;
@@ -0,0 +1,38 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ create index applications__include_type_is_third_party
9
+ on applications (tenant_id) include (type, is_third_party);
10
+ `);
11
+
12
+ // Update table statistics to help query planner use the new index efficiently
13
+ await pool.query(sql`
14
+ analyze applications;
15
+ `);
16
+
17
+ await pool.query(sql`
18
+ create index roles__include_type_name
19
+ on roles (tenant_id) include (type, name);
20
+ `);
21
+
22
+ // Update table statistics to help query planner use the new index efficiently
23
+ await pool.query(sql`
24
+ analyze roles;
25
+ `);
26
+ },
27
+ down: async (pool) => {
28
+ await pool.query(sql`
29
+ drop index if exists applications__include_type_is_third_party;
30
+ `);
31
+
32
+ await pool.query(sql`
33
+ drop index if exists roles__include_type_name;
34
+ `);
35
+ },
36
+ };
37
+
38
+ export default alteration;
@@ -0,0 +1,38 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ drop index if exists applications__include_type_is_third_party;
9
+ `);
10
+
11
+ await pool.query(sql`
12
+ drop index if exists roles__include_type_name;
13
+ `);
14
+ },
15
+ down: async (pool) => {
16
+ await pool.query(sql`
17
+ create index applications__include_type_is_third_party
18
+ on applications (tenant_id) include (type, is_third_party);
19
+ `);
20
+
21
+ // Update table statistics to help query planner use the new index efficiently
22
+ await pool.query(sql`
23
+ analyze applications;
24
+ `);
25
+
26
+ await pool.query(sql`
27
+ create index roles__include_type_name
28
+ on roles (tenant_id) include (type, name);
29
+ `);
30
+
31
+ // Update table statistics to help query planner use the new index efficiently
32
+ await pool.query(sql`
33
+ analyze roles;
34
+ `);
35
+ },
36
+ };
37
+
38
+ export default alteration;
@@ -0,0 +1,15 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ create index applications__type
6
+ on applications (tenant_id, type);
7
+ `);
8
+ },
9
+ down: async (pool) => {
10
+ await pool.query(sql `
11
+ drop index applications__type;
12
+ `);
13
+ },
14
+ };
15
+ export default alteration;
@@ -0,0 +1,15 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ create index roles__type
6
+ on roles (tenant_id, type);
7
+ `);
8
+ },
9
+ down: async (pool) => {
10
+ await pool.query(sql `
11
+ drop index roles__type;
12
+ `);
13
+ },
14
+ };
15
+ export default alteration;
@@ -0,0 +1,16 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ alter table sign_in_experiences
6
+ add column hide_logto_branding boolean not null default false;
7
+ `);
8
+ },
9
+ down: async (pool) => {
10
+ await pool.query(sql `
11
+ alter table sign_in_experiences
12
+ drop column hide_logto_branding;
13
+ `);
14
+ },
15
+ };
16
+ export default alteration;
@@ -0,0 +1,15 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ create index organization_roles__type
6
+ on organization_roles (tenant_id, type);
7
+ `);
8
+ },
9
+ down: async (pool) => {
10
+ await pool.query(sql `
11
+ drop index organization_roles__type;
12
+ `);
13
+ },
14
+ };
15
+ export default alteration;
@@ -0,0 +1,30 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ create index applications__include_type_is_third_party
6
+ on applications (tenant_id) include (type, is_third_party);
7
+ `);
8
+ // Update table statistics to help query planner use the new index efficiently
9
+ await pool.query(sql `
10
+ analyze applications;
11
+ `);
12
+ await pool.query(sql `
13
+ create index roles__include_type_name
14
+ on roles (tenant_id) include (type, name);
15
+ `);
16
+ // Update table statistics to help query planner use the new index efficiently
17
+ await pool.query(sql `
18
+ analyze roles;
19
+ `);
20
+ },
21
+ down: async (pool) => {
22
+ await pool.query(sql `
23
+ drop index if exists applications__include_type_is_third_party;
24
+ `);
25
+ await pool.query(sql `
26
+ drop index if exists roles__include_type_name;
27
+ `);
28
+ },
29
+ };
30
+ export default alteration;
@@ -0,0 +1,30 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ drop index if exists applications__include_type_is_third_party;
6
+ `);
7
+ await pool.query(sql `
8
+ drop index if exists roles__include_type_name;
9
+ `);
10
+ },
11
+ down: async (pool) => {
12
+ await pool.query(sql `
13
+ create index applications__include_type_is_third_party
14
+ on applications (tenant_id) include (type, is_third_party);
15
+ `);
16
+ // Update table statistics to help query planner use the new index efficiently
17
+ await pool.query(sql `
18
+ analyze applications;
19
+ `);
20
+ await pool.query(sql `
21
+ create index roles__include_type_name
22
+ on roles (tenant_id) include (type, name);
23
+ `);
24
+ // Update table statistics to help query planner use the new index efficiently
25
+ await pool.query(sql `
26
+ analyze roles;
27
+ `);
28
+ },
29
+ };
30
+ export default alteration;
@@ -6,3 +6,4 @@ export * from './tenant.js';
6
6
  export * from './subscriptions.js';
7
7
  export * from './experience.js';
8
8
  export * from './sentinel.js';
9
+ export * from './product-event.js';
@@ -6,3 +6,4 @@ export * from './tenant.js';
6
6
  export * from './subscriptions.js';
7
7
  export * from './experience.js';
8
8
  export * from './sentinel.js';
9
+ export * from './product-event.js';
@@ -0,0 +1,99 @@
1
+ /**
2
+ * The product events that Logto Cloud uses for analytics and auditing.
3
+ *
4
+ * - All events should be in past tense, with the format of `<noun> <verb>`.
5
+ * - Unless otherwise specified, all events should contain tenant ID as the
6
+ * `tenant` group distinct ID.
7
+ *
8
+ * @remarks
9
+ * Events that are tracked in the cloud service will be marked with `@cloud`.
10
+ */
11
+ export declare enum ProductEvent {
12
+ /** @cloud */
13
+ TenantCreated = "tenant created",
14
+ /** @cloud */
15
+ TenantDeleted = "tenant deleted",
16
+ /**
17
+ * One or more collaborators have been invited to the Logto Cloud tenant.
18
+ *
19
+ * @cloud
20
+ */
21
+ CollaboratorInvited = "collaborator invited",
22
+ /**
23
+ * The Logto Cloud tenant has subscribed to the Pro plan. It may be the first time subscribing,
24
+ * switching from the Free plan, or converting from a dev tenant, etc.
25
+ *
26
+ * @cloud
27
+ */
28
+ ProPlanSubscribed = "pro plan subscribed",
29
+ /**
30
+ * The Logto Cloud tenant has canceled the Pro plan.
31
+ *
32
+ * @cloud
33
+ */
34
+ ProPlanCanceled = "pro plan canceled",
35
+ /**
36
+ * The Logto Cloud tenant has subscribed to the Free plan. This may happen when a tenant
37
+ * newly created or downgrading from the Pro plan.
38
+ *
39
+ * @cloud
40
+ */
41
+ FreePlanSubscribed = "free plan subscribed",
42
+ /**
43
+ * A user has been created in the admin tenant. Interactive and non-interactive creations are
44
+ * both included.
45
+ */
46
+ DeveloperCreated = "developer created",
47
+ /** A user has been deleted in the admin tenant. */
48
+ DeveloperDeleted = "developer deleted",
49
+ AccessTokenIssued = "access token issued",
50
+ AppCreated = "app created",
51
+ AppDeleted = "app deleted",
52
+ RoleCreated = "role created",
53
+ RoleDeleted = "role deleted",
54
+ ApiResourceCreated = "api resource created",
55
+ ApiResourceDeleted = "api resource deleted",
56
+ OrganizationCreated = "organization created",
57
+ OrganizationDeleted = "organization deleted",
58
+ OrganizationRoleCreated = "organization role created",
59
+ OrganizationRoleDeleted = "organization role deleted",
60
+ SsoConnectorCreated = "sso connector created",
61
+ SsoConnectorDeleted = "sso connector deleted",
62
+ PasswordlessConnectorUpdated = "passwordless connector updated",
63
+ SocialConnectorCreated = "connector created",
64
+ SocialConnectorDeleted = "connector deleted",
65
+ WebhookCreated = "webhook created",
66
+ WebhookDeleted = "webhook deleted",
67
+ CustomJwtDeployed = "custom jwt deployed",
68
+ MfaEnabled = "mfa enabled",
69
+ MfaDisabled = "mfa disabled",
70
+ CustomDomainCreated = "custom domain created",
71
+ CustomDomainDeleted = "custom domain deleted"
72
+ }
73
+ /** The PostHog groups for product events. */
74
+ export declare enum EventGroup {
75
+ Tenant = "tenant"
76
+ }
77
+ /**
78
+ * The static distinct ID for tenant-level events. This is used when the event is not
79
+ * associated with a specific user.
80
+ *
81
+ * @see {@link https://posthog.com/docs/product-analytics/group-analytics#advanced-server-side-only-capturing-group-events-without-a-user}
82
+ */
83
+ export declare const tenantEventDistinctId = "TENANT_EVENT";
84
+ /**
85
+ * The header that carries the cloud user ID in a request from Logto Cloud. This is useful for
86
+ * identifying the user who initiated the Management API request proxied by the cloud service.
87
+ */
88
+ export declare const cloudUserIdHeader = "logto-cloud-user-id";
89
+ /**
90
+ * The types of access tokens issued by Logto.
91
+ *
92
+ * Note that this is for internal use only and is different from other technical definitions of
93
+ * token types.
94
+ */
95
+ export declare enum ProductAccessTokenType {
96
+ Unknown = "unknown",
97
+ User = "user",
98
+ ClientCredentials = "client_credentials"
99
+ }
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The product events that Logto Cloud uses for analytics and auditing.
3
+ *
4
+ * - All events should be in past tense, with the format of `<noun> <verb>`.
5
+ * - Unless otherwise specified, all events should contain tenant ID as the
6
+ * `tenant` group distinct ID.
7
+ *
8
+ * @remarks
9
+ * Events that are tracked in the cloud service will be marked with `@cloud`.
10
+ */
11
+ export var ProductEvent;
12
+ (function (ProductEvent) {
13
+ /** @cloud */
14
+ ProductEvent["TenantCreated"] = "tenant created";
15
+ /** @cloud */
16
+ ProductEvent["TenantDeleted"] = "tenant deleted";
17
+ /**
18
+ * One or more collaborators have been invited to the Logto Cloud tenant.
19
+ *
20
+ * @cloud
21
+ */
22
+ ProductEvent["CollaboratorInvited"] = "collaborator invited";
23
+ /**
24
+ * The Logto Cloud tenant has subscribed to the Pro plan. It may be the first time subscribing,
25
+ * switching from the Free plan, or converting from a dev tenant, etc.
26
+ *
27
+ * @cloud
28
+ */
29
+ ProductEvent["ProPlanSubscribed"] = "pro plan subscribed";
30
+ /**
31
+ * The Logto Cloud tenant has canceled the Pro plan.
32
+ *
33
+ * @cloud
34
+ */
35
+ ProductEvent["ProPlanCanceled"] = "pro plan canceled";
36
+ /**
37
+ * The Logto Cloud tenant has subscribed to the Free plan. This may happen when a tenant
38
+ * newly created or downgrading from the Pro plan.
39
+ *
40
+ * @cloud
41
+ */
42
+ ProductEvent["FreePlanSubscribed"] = "free plan subscribed";
43
+ /**
44
+ * A user has been created in the admin tenant. Interactive and non-interactive creations are
45
+ * both included.
46
+ */
47
+ ProductEvent["DeveloperCreated"] = "developer created";
48
+ /** A user has been deleted in the admin tenant. */
49
+ ProductEvent["DeveloperDeleted"] = "developer deleted";
50
+ ProductEvent["AccessTokenIssued"] = "access token issued";
51
+ ProductEvent["AppCreated"] = "app created";
52
+ ProductEvent["AppDeleted"] = "app deleted";
53
+ ProductEvent["RoleCreated"] = "role created";
54
+ ProductEvent["RoleDeleted"] = "role deleted";
55
+ ProductEvent["ApiResourceCreated"] = "api resource created";
56
+ ProductEvent["ApiResourceDeleted"] = "api resource deleted";
57
+ ProductEvent["OrganizationCreated"] = "organization created";
58
+ ProductEvent["OrganizationDeleted"] = "organization deleted";
59
+ ProductEvent["OrganizationRoleCreated"] = "organization role created";
60
+ ProductEvent["OrganizationRoleDeleted"] = "organization role deleted";
61
+ ProductEvent["SsoConnectorCreated"] = "sso connector created";
62
+ ProductEvent["SsoConnectorDeleted"] = "sso connector deleted";
63
+ ProductEvent["PasswordlessConnectorUpdated"] = "passwordless connector updated";
64
+ ProductEvent["SocialConnectorCreated"] = "connector created";
65
+ ProductEvent["SocialConnectorDeleted"] = "connector deleted";
66
+ ProductEvent["WebhookCreated"] = "webhook created";
67
+ ProductEvent["WebhookDeleted"] = "webhook deleted";
68
+ ProductEvent["CustomJwtDeployed"] = "custom jwt deployed";
69
+ ProductEvent["MfaEnabled"] = "mfa enabled";
70
+ ProductEvent["MfaDisabled"] = "mfa disabled";
71
+ ProductEvent["CustomDomainCreated"] = "custom domain created";
72
+ ProductEvent["CustomDomainDeleted"] = "custom domain deleted";
73
+ })(ProductEvent || (ProductEvent = {}));
74
+ /** The PostHog groups for product events. */
75
+ export var EventGroup;
76
+ (function (EventGroup) {
77
+ EventGroup["Tenant"] = "tenant";
78
+ })(EventGroup || (EventGroup = {}));
79
+ /**
80
+ * The static distinct ID for tenant-level events. This is used when the event is not
81
+ * associated with a specific user.
82
+ *
83
+ * @see {@link https://posthog.com/docs/product-analytics/group-analytics#advanced-server-side-only-capturing-group-events-without-a-user}
84
+ */
85
+ export const tenantEventDistinctId = 'TENANT_EVENT';
86
+ /**
87
+ * The header that carries the cloud user ID in a request from Logto Cloud. This is useful for
88
+ * identifying the user who initiated the Management API request proxied by the cloud service.
89
+ */
90
+ export const cloudUserIdHeader = 'logto-cloud-user-id';
91
+ /**
92
+ * The types of access tokens issued by Logto.
93
+ *
94
+ * Note that this is for internal use only and is different from other technical definitions of
95
+ * token types.
96
+ */
97
+ export var ProductAccessTokenType;
98
+ (function (ProductAccessTokenType) {
99
+ ProductAccessTokenType["Unknown"] = "unknown";
100
+ ProductAccessTokenType["User"] = "user";
101
+ ProductAccessTokenType["ClientCredentials"] = "client_credentials";
102
+ })(ProductAccessTokenType || (ProductAccessTokenType = {}));
@@ -10,6 +10,7 @@ export type CreateSignInExperience = {
10
10
  id: string;
11
11
  color: Color;
12
12
  branding: Branding;
13
+ hideLogtoBranding?: boolean;
13
14
  languageInfo: LanguageInfo;
14
15
  termsOfUseUrl?: string | null;
15
16
  privacyPolicyUrl?: string | null;
@@ -39,6 +40,7 @@ export type SignInExperience = {
39
40
  id: string;
40
41
  color: Color;
41
42
  branding: Branding;
43
+ hideLogtoBranding: boolean;
42
44
  languageInfo: LanguageInfo;
43
45
  termsOfUseUrl: string | null;
44
46
  privacyPolicyUrl: string | null;
@@ -63,5 +65,5 @@ export type SignInExperience = {
63
65
  emailBlocklistPolicy: EmailBlocklistPolicy;
64
66
  forgotPasswordMethods: ForgotPasswordMethods | null;
65
67
  };
66
- export type SignInExperienceKeys = 'tenantId' | 'id' | 'color' | 'branding' | 'languageInfo' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'agreeToTermsPolicy' | 'signIn' | 'signUp' | 'socialSignIn' | 'socialSignInConnectorTargets' | 'signInMode' | 'customCss' | 'customContent' | 'customUiAssets' | 'passwordPolicy' | 'mfa' | 'singleSignOnEnabled' | 'supportEmail' | 'supportWebsiteUrl' | 'unknownSessionRedirectUrl' | 'captchaPolicy' | 'sentinelPolicy' | 'emailBlocklistPolicy' | 'forgotPasswordMethods';
68
+ export type SignInExperienceKeys = 'tenantId' | 'id' | 'color' | 'branding' | 'hideLogtoBranding' | 'languageInfo' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'agreeToTermsPolicy' | 'signIn' | 'signUp' | 'socialSignIn' | 'socialSignInConnectorTargets' | 'signInMode' | 'customCss' | 'customContent' | 'customUiAssets' | 'passwordPolicy' | 'mfa' | 'singleSignOnEnabled' | 'supportEmail' | 'supportWebsiteUrl' | 'unknownSessionRedirectUrl' | 'captchaPolicy' | 'sentinelPolicy' | 'emailBlocklistPolicy' | 'forgotPasswordMethods';
67
69
  export declare const SignInExperiences: GeneratedSchema<SignInExperienceKeys, CreateSignInExperience, SignInExperience, 'sign_in_experiences', 'sign_in_experience'>;
@@ -7,6 +7,7 @@ const createGuard = z.object({
7
7
  id: z.string().min(1).max(21),
8
8
  color: colorGuard,
9
9
  branding: brandingGuard,
10
+ hideLogtoBranding: z.boolean().optional(),
10
11
  languageInfo: languageInfoGuard,
11
12
  termsOfUseUrl: z.string().max(2048).nullable().optional(),
12
13
  privacyPolicyUrl: z.string().max(2048).nullable().optional(),
@@ -35,6 +36,7 @@ const guard = z.object({
35
36
  id: z.string().min(1).max(21),
36
37
  color: colorGuard,
37
38
  branding: brandingGuard,
39
+ hideLogtoBranding: z.boolean(),
38
40
  languageInfo: languageInfoGuard,
39
41
  termsOfUseUrl: z.string().max(2048).nullable(),
40
42
  privacyPolicyUrl: z.string().max(2048).nullable(),
@@ -66,6 +68,7 @@ export const SignInExperiences = Object.freeze({
66
68
  id: 'id',
67
69
  color: 'color',
68
70
  branding: 'branding',
71
+ hideLogtoBranding: 'hide_logto_branding',
69
72
  languageInfo: 'language_info',
70
73
  termsOfUseUrl: 'terms_of_use_url',
71
74
  privacyPolicyUrl: 'privacy_policy_url',
@@ -94,6 +97,7 @@ export const SignInExperiences = Object.freeze({
94
97
  'id',
95
98
  'color',
96
99
  'branding',
100
+ 'hideLogtoBranding',
97
101
  'languageInfo',
98
102
  'termsOfUseUrl',
99
103
  'privacyPolicyUrl',
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
- * We categorize the hook events into two types:
3
+ * We categorize the hook events into three types:
4
4
  *
5
5
  * InteractionHookEvent: The hook events that are triggered by user interactions.
6
6
  * DataHookEvent: The hook events that are triggered by Logto data mutations.
7
+ * ExceptionHookEvent: The hook events that are triggered on exceptions.
7
8
  */
8
9
  export declare enum InteractionHookEvent {
9
10
  PostRegister = "PostRegister",
@@ -28,13 +29,14 @@ declare enum DataHookDetailMutationType {
28
29
  type BasicDataHookEvent = `${DataHookSchema}.${DataHookBasicMutationType}`;
29
30
  type CustomDataHookMutableSchema = `${DataHookSchema}.Data` | `${DataHookSchema.User}.SuspensionStatus` | `${DataHookSchema.Role}.Scopes` | `${DataHookSchema.Organization}.Membership` | `${DataHookSchema.OrganizationRole}.Scopes`;
30
31
  type DataHookPropertyUpdateEvent = `${CustomDataHookMutableSchema}.${DataHookDetailMutationType.Updated}`;
32
+ export type ExceptionHookEvent = 'Identifier.Lockout';
31
33
  export type DataHookEvent = BasicDataHookEvent | DataHookPropertyUpdateEvent;
32
34
  /** The hook event values that can be registered. */
33
- export declare const hookEvents: readonly [InteractionHookEvent.PostRegister, InteractionHookEvent.PostSignIn, InteractionHookEvent.PostResetPassword, "User.Created", "User.Deleted", "User.Data.Updated", "User.SuspensionStatus.Updated", "Role.Created", "Role.Deleted", "Role.Data.Updated", "Role.Scopes.Updated", "Scope.Created", "Scope.Deleted", "Scope.Data.Updated", "Organization.Created", "Organization.Deleted", "Organization.Data.Updated", "Organization.Membership.Updated", "OrganizationRole.Created", "OrganizationRole.Deleted", "OrganizationRole.Data.Updated", "OrganizationRole.Scopes.Updated", "OrganizationScope.Created", "OrganizationScope.Deleted", "OrganizationScope.Data.Updated"];
35
+ export declare const hookEvents: readonly [InteractionHookEvent.PostRegister, InteractionHookEvent.PostSignIn, InteractionHookEvent.PostResetPassword, "User.Created", "User.Deleted", "User.Data.Updated", "User.SuspensionStatus.Updated", "Role.Created", "Role.Deleted", "Role.Data.Updated", "Role.Scopes.Updated", "Scope.Created", "Scope.Deleted", "Scope.Data.Updated", "Organization.Created", "Organization.Deleted", "Organization.Data.Updated", "Organization.Membership.Updated", "OrganizationRole.Created", "OrganizationRole.Deleted", "OrganizationRole.Data.Updated", "OrganizationRole.Scopes.Updated", "OrganizationScope.Created", "OrganizationScope.Deleted", "OrganizationScope.Data.Updated", "Identifier.Lockout"];
34
36
  /** The type of hook event values that can be registered. */
35
37
  export type HookEvent = (typeof hookEvents)[number];
36
- export declare const hookEventGuard: z.ZodEnum<[InteractionHookEvent.PostRegister, InteractionHookEvent.PostSignIn, InteractionHookEvent.PostResetPassword, "User.Created", "User.Deleted", "User.Data.Updated", "User.SuspensionStatus.Updated", "Role.Created", "Role.Deleted", "Role.Data.Updated", "Role.Scopes.Updated", "Scope.Created", "Scope.Deleted", "Scope.Data.Updated", "Organization.Created", "Organization.Deleted", "Organization.Data.Updated", "Organization.Membership.Updated", "OrganizationRole.Created", "OrganizationRole.Deleted", "OrganizationRole.Data.Updated", "OrganizationRole.Scopes.Updated", "OrganizationScope.Created", "OrganizationScope.Deleted", "OrganizationScope.Data.Updated"]>;
37
- export declare const hookEventsGuard: z.ZodArray<z.ZodEnum<[InteractionHookEvent.PostRegister, InteractionHookEvent.PostSignIn, InteractionHookEvent.PostResetPassword, "User.Created", "User.Deleted", "User.Data.Updated", "User.SuspensionStatus.Updated", "Role.Created", "Role.Deleted", "Role.Data.Updated", "Role.Scopes.Updated", "Scope.Created", "Scope.Deleted", "Scope.Data.Updated", "Organization.Created", "Organization.Deleted", "Organization.Data.Updated", "Organization.Membership.Updated", "OrganizationRole.Created", "OrganizationRole.Deleted", "OrganizationRole.Data.Updated", "OrganizationRole.Scopes.Updated", "OrganizationScope.Created", "OrganizationScope.Deleted", "OrganizationScope.Data.Updated"]>, "many">;
38
+ export declare const hookEventGuard: z.ZodEnum<[InteractionHookEvent.PostRegister, InteractionHookEvent.PostSignIn, InteractionHookEvent.PostResetPassword, "User.Created", "User.Deleted", "User.Data.Updated", "User.SuspensionStatus.Updated", "Role.Created", "Role.Deleted", "Role.Data.Updated", "Role.Scopes.Updated", "Scope.Created", "Scope.Deleted", "Scope.Data.Updated", "Organization.Created", "Organization.Deleted", "Organization.Data.Updated", "Organization.Membership.Updated", "OrganizationRole.Created", "OrganizationRole.Deleted", "OrganizationRole.Data.Updated", "OrganizationRole.Scopes.Updated", "OrganizationScope.Created", "OrganizationScope.Deleted", "OrganizationScope.Data.Updated", "Identifier.Lockout"]>;
39
+ export declare const hookEventsGuard: z.ZodArray<z.ZodEnum<[InteractionHookEvent.PostRegister, InteractionHookEvent.PostSignIn, InteractionHookEvent.PostResetPassword, "User.Created", "User.Deleted", "User.Data.Updated", "User.SuspensionStatus.Updated", "Role.Created", "Role.Deleted", "Role.Data.Updated", "Role.Scopes.Updated", "Scope.Created", "Scope.Deleted", "Scope.Data.Updated", "Organization.Created", "Organization.Deleted", "Organization.Data.Updated", "Organization.Membership.Updated", "OrganizationRole.Created", "OrganizationRole.Deleted", "OrganizationRole.Data.Updated", "OrganizationRole.Scopes.Updated", "OrganizationScope.Created", "OrganizationScope.Deleted", "OrganizationScope.Data.Updated", "Identifier.Lockout"]>, "many">;
38
40
  export type HookEvents = z.infer<typeof hookEventsGuard>;
39
41
  export declare const interactionHookEventGuard: z.ZodNativeEnum<typeof InteractionHookEvent>;
40
42
  /**
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
- * We categorize the hook events into two types:
3
+ * We categorize the hook events into three types:
4
4
  *
5
5
  * InteractionHookEvent: The hook events that are triggered by user interactions.
6
6
  * DataHookEvent: The hook events that are triggered by Logto data mutations.
7
+ * ExceptionHookEvent: The hook events that are triggered on exceptions.
7
8
  */
8
9
  // InteractionHookEvent
9
10
  export var InteractionHookEvent;
@@ -58,6 +59,7 @@ export const hookEvents = Object.freeze([
58
59
  'OrganizationScope.Created',
59
60
  'OrganizationScope.Deleted',
60
61
  'OrganizationScope.Data.Updated',
62
+ 'Identifier.Lockout',
61
63
  ]);
62
64
  export const hookEventGuard = z.enum(hookEvents);
63
65
  export const hookEventsGuard = hookEventGuard.array();
@@ -49,7 +49,7 @@ export const customClientMetadataGuard = z.object({
49
49
  [CustomClientMetadataKey.CorsAllowedOrigins]: z.string().min(1).array().optional(),
50
50
  [CustomClientMetadataKey.IdTokenTtl]: z.number().optional(),
51
51
  [CustomClientMetadataKey.RefreshTokenTtl]: z.number().optional(),
52
- [CustomClientMetadataKey.RefreshTokenTtlInDays]: z.number().int().min(1).max(90).optional(),
52
+ [CustomClientMetadataKey.RefreshTokenTtlInDays]: z.number().int().min(1).max(180).optional(),
53
53
  [CustomClientMetadataKey.TenantId]: z.string().optional(),
54
54
  [CustomClientMetadataKey.AlwaysIssueRefreshToken]: z.boolean().optional(),
55
55
  [CustomClientMetadataKey.RotateRefreshToken]: z.boolean().optional(),
@@ -6,7 +6,13 @@ import type { Application, CreateApplication, CreateApplicationsRole } from '../
6
6
  */
7
7
  export declare const adminConsoleApplicationId = "admin-console";
8
8
  export declare const demoAppApplicationId = "demo-app";
9
+ export declare const accountCenterApplicationId = "account-center";
9
10
  export declare const buildDemoAppDataForTenant: (tenantId: string) => Application;
11
+ export declare const buildAccountCenterAppDataForTenant: (tenantId: string) => Application;
12
+ export type BuiltInApplicationId = typeof demoAppApplicationId | typeof accountCenterApplicationId;
13
+ export declare const isBuiltInApplicationId: (applicationId: string) => applicationId is BuiltInApplicationId;
14
+ export declare const isBuiltInClientId: (applicationId: string) => applicationId is BuiltInApplicationId;
15
+ export declare const buildBuiltInApplicationDataForTenant: (tenantId: string, applicationId: BuiltInApplicationId) => Application;
10
16
  export declare const createDefaultAdminConsoleApplication: () => Readonly<CreateApplication>;
11
17
  export declare const createTenantMachineToMachineApplication: (tenantId: string) => Readonly<CreateApplication>;
12
18
  /** Create an entry to assign a role to an application in the admin tenant. */
@@ -8,12 +8,13 @@ import { adminTenantId } from './tenant.js';
8
8
  */
9
9
  export const adminConsoleApplicationId = 'admin-console';
10
10
  export const demoAppApplicationId = 'demo-app';
11
- export const buildDemoAppDataForTenant = (tenantId) => ({
11
+ export const accountCenterApplicationId = 'account-center';
12
+ const buildSpaApplicationData = (tenantId, { id, name, description, }) => ({
12
13
  tenantId,
13
- id: demoAppApplicationId,
14
- name: 'Live Preview',
14
+ id,
15
+ name,
15
16
  secret: 'N/A',
16
- description: 'Preview for Sign-in Experience.',
17
+ description,
17
18
  type: ApplicationType.SPA,
18
19
  oidcClientMetadata: { redirectUris: [], postLogoutRedirectUris: [] },
19
20
  customClientMetadata: {},
@@ -22,6 +23,24 @@ export const buildDemoAppDataForTenant = (tenantId) => ({
22
23
  createdAt: 0,
23
24
  customData: {},
24
25
  });
26
+ export const buildDemoAppDataForTenant = (tenantId) => buildSpaApplicationData(tenantId, {
27
+ id: demoAppApplicationId,
28
+ name: 'Live Preview',
29
+ description: 'Preview for Sign-in Experience.',
30
+ });
31
+ export const buildAccountCenterAppDataForTenant = (tenantId) => buildSpaApplicationData(tenantId, {
32
+ id: accountCenterApplicationId,
33
+ name: 'Account Center',
34
+ description: 'Placeholder application for Account Center.',
35
+ });
36
+ export const isBuiltInApplicationId = (applicationId) => applicationId === demoAppApplicationId || applicationId === accountCenterApplicationId;
37
+ export const isBuiltInClientId = isBuiltInApplicationId;
38
+ export const buildBuiltInApplicationDataForTenant = (tenantId, applicationId) => {
39
+ if (applicationId === demoAppApplicationId) {
40
+ return buildDemoAppDataForTenant(tenantId);
41
+ }
42
+ return buildAccountCenterAppDataForTenant(tenantId);
43
+ };
25
44
  export const createDefaultAdminConsoleApplication = () => Object.freeze({
26
45
  tenantId: adminTenantId,
27
46
  id: adminConsoleApplicationId,
@@ -15,6 +15,7 @@ export const createDefaultSignInExperience = (forTenantId, isCloud) => Object.fr
15
15
  logoUrl: isCloud ? undefined : 'https://logto.io/logo.svg',
16
16
  darkLogoUrl: isCloud ? undefined : 'https://logto.io/logo-dark.svg',
17
17
  },
18
+ hideLogtoBranding: false,
18
19
  languageInfo: {
19
20
  autoDetect: true,
20
21
  fallbackLanguage: 'en',
@@ -1,5 +1,5 @@
1
1
  import { type z } from 'zod';
2
- export declare const domainSelectFields: readonly ["id", "domain", "status", "errorMessage", "dnsRecords"];
2
+ export declare const domainSelectFields: readonly ["id", "domain", "status", "errorMessage", "dnsRecords", "createdAt"];
3
3
  export declare const domainResponseGuard: z.ZodObject<Pick<{
4
4
  tenantId: z.ZodType<string, z.ZodTypeDef, string>;
5
5
  id: z.ZodType<string, z.ZodTypeDef, string>;
@@ -38,15 +38,17 @@ export declare const domainResponseGuard: z.ZodObject<Pick<{
38
38
  } | null>;
39
39
  updatedAt: z.ZodType<number, z.ZodTypeDef, number>;
40
40
  createdAt: z.ZodType<number, z.ZodTypeDef, number>;
41
- }, "status" | "id" | "domain" | "errorMessage" | "dnsRecords">, "strip", z.ZodTypeAny, {
41
+ }, "status" | "id" | "createdAt" | "domain" | "errorMessage" | "dnsRecords">, "strip", z.ZodTypeAny, {
42
42
  status: import("../index.js").DomainStatus;
43
43
  id: string;
44
+ createdAt: number;
44
45
  domain: string;
45
46
  errorMessage: string | null;
46
47
  dnsRecords: import("../index.js").DomainDnsRecords;
47
48
  }, {
48
49
  status: import("../index.js").DomainStatus;
49
50
  id: string;
51
+ createdAt: number;
50
52
  domain: string;
51
53
  errorMessage: string | null;
52
54
  dnsRecords: import("../index.js").DomainDnsRecords;
@@ -5,6 +5,7 @@ export const domainSelectFields = Object.freeze([
5
5
  'status',
6
6
  'errorMessage',
7
7
  'dnsRecords',
8
+ 'createdAt',
8
9
  ]);
9
10
  export const domainResponseGuard = Domains.guard.pick({
10
11
  id: true,
@@ -12,4 +13,5 @@ export const domainResponseGuard = Domains.guard.pick({
12
13
  status: true,
13
14
  errorMessage: true,
14
15
  dnsRecords: true,
16
+ createdAt: true,
15
17
  });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { type Application, type User } from '../db-entries/index.js';
3
- import { type DataHookEvent, type InteractionHookEvent } from '../foundations/index.js';
3
+ import { type ExceptionHookEvent, type DataHookEvent, type InteractionHookEvent } from '../foundations/index.js';
4
4
  import { type InteractionEvent } from './interactions.js';
5
5
  import { type userInfoSelectFields } from './user.js';
6
6
  declare const hookExecutionStatsGuard: z.ZodObject<{
@@ -18,8 +18,8 @@ export declare const hookResponseGuard: z.ZodObject<{
18
18
  tenantId: z.ZodType<string, z.ZodTypeDef, string>;
19
19
  id: z.ZodType<string, z.ZodTypeDef, string>;
20
20
  name: z.ZodType<string, z.ZodTypeDef, string>;
21
- event: z.ZodType<"User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent | null, z.ZodTypeDef, "User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent | null>;
22
- events: z.ZodType<("User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent)[], z.ZodTypeDef, ("User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent)[]>;
21
+ event: z.ZodType<"User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent | "Identifier.Lockout" | null, z.ZodTypeDef, "User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent | "Identifier.Lockout" | null>;
22
+ events: z.ZodType<("User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent | "Identifier.Lockout")[], z.ZodTypeDef, ("User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | InteractionHookEvent | "Identifier.Lockout")[]>;
23
23
  config: z.ZodType<{
24
24
  url: string;
25
25
  headers?: Record<string, string> | undefined;
@@ -140,5 +140,8 @@ export type DataHookEventPayload = {
140
140
  userAgent?: string;
141
141
  data?: unknown;
142
142
  } & Partial<InteractionApiContextPayload> & Partial<ManagementApiContext> & Record<string, unknown>;
143
- export type HookEventPayload = InteractionHookEventPayload | DataHookEventPayload;
143
+ export type ExceptionHookEventPayload = Omit<DataHookEventPayload, 'event'> & {
144
+ event: ExceptionHookEvent;
145
+ };
146
+ export type HookEventPayload = InteractionHookEventPayload | DataHookEventPayload | ExceptionHookEventPayload;
144
147
  export {};
@@ -58,6 +58,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
58
58
  favicon?: string | undefined;
59
59
  darkFavicon?: string | undefined;
60
60
  }>;
61
+ hideLogtoBranding: z.ZodType<boolean, z.ZodTypeDef, boolean>;
61
62
  languageInfo: z.ZodType<{
62
63
  autoDetect: boolean;
63
64
  fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
@@ -690,6 +691,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
690
691
  customCss: string | null;
691
692
  termsOfUseUrl: string | null;
692
693
  privacyPolicyUrl: string | null;
694
+ hideLogtoBranding: boolean;
693
695
  languageInfo: import("../foundations/jsonb-types/sign-in-experience.js").LanguageInfo;
694
696
  agreeToTermsPolicy: import("../db-entries/custom-types.js").AgreeToTermsPolicy;
695
697
  signIn: import("../foundations/jsonb-types/sign-in-experience.js").SignIn;
@@ -881,6 +883,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
881
883
  customCss: string | null;
882
884
  termsOfUseUrl: string | null;
883
885
  privacyPolicyUrl: string | null;
886
+ hideLogtoBranding: boolean;
884
887
  languageInfo: import("../foundations/jsonb-types/sign-in-experience.js").LanguageInfo;
885
888
  agreeToTermsPolicy: import("../db-entries/custom-types.js").AgreeToTermsPolicy;
886
889
  signIn: import("../foundations/jsonb-types/sign-in-experience.js").SignIn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/schemas",
3
- "version": "1.32.0",
3
+ "version": "1.34.0",
4
4
  "author": "Silverhand Inc. <contact@silverhand.io>",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
@@ -65,12 +65,12 @@
65
65
  "dependencies": {
66
66
  "@withtyped/server": "^0.14.0",
67
67
  "nanoid": "^5.0.9",
68
- "@logto/core-kit": "^2.6.1",
69
68
  "@logto/connector-kit": "^4.6.0",
69
+ "@logto/core-kit": "^2.6.1",
70
+ "@logto/language-kit": "^1.2.0",
71
+ "@logto/phrases": "^1.23.0",
70
72
  "@logto/phrases-experience": "^1.12.0",
71
- "@logto/phrases": "^1.21.0",
72
- "@logto/shared": "^3.3.0",
73
- "@logto/language-kit": "^1.2.0"
73
+ "@logto/shared": "^3.3.0"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "zod": "3.24.3"
@@ -26,6 +26,9 @@ create index applications__id
26
26
  create index applications__is_third_party
27
27
  on applications (tenant_id, is_third_party);
28
28
 
29
+ create index applications__type
30
+ on applications (tenant_id, type);
31
+
29
32
  create unique index applications__protected_app_metadata_host
30
33
  on applications (
31
34
  (protected_app_metadata->>'host')
@@ -20,6 +20,9 @@ create table organization_roles (
20
20
  create index organization_roles__id
21
21
  on organization_roles (tenant_id, id);
22
22
 
23
+ create index organization_roles__type
24
+ on organization_roles (tenant_id, type);
25
+
23
26
  create function check_organization_role_type(role_id varchar(21), target_type role_type) returns boolean as
24
27
  $$ begin
25
28
  return (select type from organization_roles where id = role_id) = target_type;
package/tables/roles.sql CHANGED
@@ -19,6 +19,9 @@ create table roles (
19
19
  create index roles__id
20
20
  on roles (tenant_id, id);
21
21
 
22
+ create index roles__type
23
+ on roles (tenant_id, type);
24
+
22
25
  create function public.check_role_type(role_id varchar(21), target_type role_type) returns boolean as
23
26
  $$ begin
24
27
  return (select type from public.roles where id = role_id) = target_type;
@@ -7,6 +7,7 @@ create table sign_in_experiences (
7
7
  id varchar(21) not null,
8
8
  color jsonb /* @use Color */ not null,
9
9
  branding jsonb /* @use Branding */ not null,
10
+ hide_logto_branding boolean not null default false,
10
11
  language_info jsonb /* @use LanguageInfo */ not null,
11
12
  terms_of_use_url varchar(2048),
12
13
  privacy_policy_url varchar(2048),