@logto/schemas 1.31.0 → 1.33.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 (49) hide show
  1. package/alterations/1.32.0-1756370721-align-app-and-org-sign-in-exp-configs.ts +28 -0
  2. package/alterations/1.32.0-1756954492-add-default-to-forgot-password-methods.ts +35 -0
  3. package/alterations/1.32.0-1759041888-add-tenant-date-index-to-daily-active-users-table.ts +18 -0
  4. package/alterations/1.33.0-1760427166-add-applications-type-index.ts +19 -0
  5. package/alterations/1.33.0-1760427167-add-roles-type-index.ts +19 -0
  6. package/alterations/1.33.0-1761283464-add-hide-logto-branding-column.ts +20 -0
  7. package/alterations-js/1.32.0-1756370721-align-app-and-org-sign-in-exp-configs.js +24 -0
  8. package/alterations-js/1.32.0-1756954492-add-default-to-forgot-password-methods.js +29 -0
  9. package/alterations-js/1.32.0-1759041888-add-tenant-date-index-to-daily-active-users-table.js +15 -0
  10. package/alterations-js/1.33.0-1760427166-add-applications-type-index.js +15 -0
  11. package/alterations-js/1.33.0-1760427167-add-roles-type-index.js +15 -0
  12. package/alterations-js/1.33.0-1761283464-add-hide-logto-branding-column.js +16 -0
  13. package/lib/consts/index.d.ts +1 -0
  14. package/lib/consts/index.js +1 -0
  15. package/lib/consts/oidc.d.ts +11 -0
  16. package/lib/consts/oidc.js +8 -0
  17. package/lib/consts/product-event.d.ts +99 -0
  18. package/lib/consts/product-event.js +102 -0
  19. package/lib/db-entries/application-sign-in-experience.d.ts +3 -1
  20. package/lib/db-entries/application-sign-in-experience.js +4 -0
  21. package/lib/db-entries/organization.d.ts +10 -2
  22. package/lib/db-entries/organization.js +9 -1
  23. package/lib/db-entries/sign-in-experience.d.ts +3 -1
  24. package/lib/db-entries/sign-in-experience.js +4 -0
  25. package/lib/foundations/jsonb-types/users.d.ts +9 -0
  26. package/lib/foundations/jsonb-types/users.js +1 -0
  27. package/lib/seeds/sign-in-experience.js +1 -0
  28. package/lib/types/application.d.ts +3 -0
  29. package/lib/types/consent.d.ts +25 -0
  30. package/lib/types/cookie.d.ts +4 -0
  31. package/lib/types/cookie.js +1 -1
  32. package/lib/types/custom-profile-fields.d.ts +2 -0
  33. package/lib/types/interactions.d.ts +6 -0
  34. package/lib/types/interactions.js +1 -0
  35. package/lib/types/logto-config/index.d.ts +64 -40
  36. package/lib/types/logto-config/jwt-customizer.d.ts +134 -70
  37. package/lib/types/mfa.d.ts +2 -2
  38. package/lib/types/sign-in-experience.d.ts +5 -2
  39. package/lib/types/ssr.d.ts +1 -0
  40. package/lib/types/user.d.ts +6 -0
  41. package/lib/types/verification-records/web-authn-verification.d.ts +16 -2
  42. package/lib/types/verification-records/web-authn-verification.js +2 -0
  43. package/package.json +5 -5
  44. package/tables/application_sign_in_experiences.sql +1 -0
  45. package/tables/applications.sql +3 -0
  46. package/tables/daily_active_users.sql +3 -0
  47. package/tables/organizations.sql +4 -0
  48. package/tables/roles.sql +3 -0
  49. package/tables/sign_in_experiences.sql +2 -1
@@ -0,0 +1,28 @@
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 organizations
9
+ add column color jsonb not null default '{}'::jsonb,
10
+ add column custom_css text;
11
+ `);
12
+ await pool.query(sql`
13
+ alter table application_sign_in_experiences add column custom_css text;
14
+ `);
15
+ },
16
+ down: async (pool) => {
17
+ await pool.query(sql`
18
+ alter table organizations
19
+ drop column color,
20
+ drop column custom_css;
21
+ `);
22
+ await pool.query(sql`
23
+ alter table application_sign_in_experiences drop column custom_css;
24
+ `);
25
+ },
26
+ };
27
+
28
+ export default alteration;
@@ -0,0 +1,35 @@
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
+ // Set default value for new rows, but keep the column nullable
8
+ // to preserve existing null values as migration markers
9
+ await pool.query(sql`
10
+ alter table sign_in_experiences
11
+ alter column forgot_password_methods set default '[]'::jsonb;
12
+ `);
13
+
14
+ // Update default and admin tenant to [], bypass the alter comparison
15
+ await pool.query(sql`
16
+ update sign_in_experiences
17
+ set forgot_password_methods = '[]'::jsonb
18
+ where forgot_password_methods is null and (tenant_id = 'admin' or tenant_id = 'default');
19
+ `);
20
+ },
21
+ down: async (pool) => {
22
+ await pool.query(sql`
23
+ alter table sign_in_experiences
24
+ alter column forgot_password_methods drop default;
25
+ `);
26
+
27
+ await pool.query(sql`
28
+ update sign_in_experiences
29
+ set forgot_password_methods = null
30
+ where forgot_password_methods = '[]'::jsonb and (tenant_id = 'admin' or tenant_id = 'default');
31
+ `);
32
+ },
33
+ };
34
+
35
+ export default alteration;
@@ -0,0 +1,18 @@
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 daily_active_users__date
9
+ on daily_active_users (tenant_id, date);
10
+ `);
11
+ },
12
+ down: async (pool) => {
13
+ await pool.query(sql`
14
+ drop index daily_active_users__date;
15
+ `);
16
+ },
17
+ };
18
+ 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 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,24 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ alter table organizations
6
+ add column color jsonb not null default '{}'::jsonb,
7
+ add column custom_css text;
8
+ `);
9
+ await pool.query(sql `
10
+ alter table application_sign_in_experiences add column custom_css text;
11
+ `);
12
+ },
13
+ down: async (pool) => {
14
+ await pool.query(sql `
15
+ alter table organizations
16
+ drop column color,
17
+ drop column custom_css;
18
+ `);
19
+ await pool.query(sql `
20
+ alter table application_sign_in_experiences drop column custom_css;
21
+ `);
22
+ },
23
+ };
24
+ export default alteration;
@@ -0,0 +1,29 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ // Set default value for new rows, but keep the column nullable
5
+ // to preserve existing null values as migration markers
6
+ await pool.query(sql `
7
+ alter table sign_in_experiences
8
+ alter column forgot_password_methods set default '[]'::jsonb;
9
+ `);
10
+ // Update default and admin tenant to [], bypass the alter comparison
11
+ await pool.query(sql `
12
+ update sign_in_experiences
13
+ set forgot_password_methods = '[]'::jsonb
14
+ where forgot_password_methods is null and (tenant_id = 'admin' or tenant_id = 'default');
15
+ `);
16
+ },
17
+ down: async (pool) => {
18
+ await pool.query(sql `
19
+ alter table sign_in_experiences
20
+ alter column forgot_password_methods drop default;
21
+ `);
22
+ await pool.query(sql `
23
+ update sign_in_experiences
24
+ set forgot_password_methods = null
25
+ where forgot_password_methods = '[]'::jsonb and (tenant_id = 'admin' or tenant_id = 'default');
26
+ `);
27
+ },
28
+ };
29
+ 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 daily_active_users__date
6
+ on daily_active_users (tenant_id, date);
7
+ `);
8
+ },
9
+ down: async (pool) => {
10
+ await pool.query(sql `
11
+ drop index daily_active_users__date;
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 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;
@@ -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';
@@ -38,6 +38,13 @@ export declare enum ExtraParamsKey {
38
38
  * This can be used to pre-fill the identifier field **only on the first screen** of the sign-in/sign-up flow.
39
39
  */
40
40
  LoginHint = "login_hint",
41
+ /**
42
+ * The end-users preferred languages to use for the client application, represented as a space-separated list of BCP47 language tags.
43
+ * E.g. `en` or `en-US` or `en-US en`.
44
+ *
45
+ * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.13.2.1}
46
+ */
47
+ UiLocales = "ui_locales",
41
48
  /**
42
49
  * Specifies the identifier used in the identifier sign-in or identifier register page.
43
50
  *
@@ -80,6 +87,7 @@ export declare const extraParamsObjectGuard: z.ZodObject<{
80
87
  direct_sign_in: z.ZodOptional<z.ZodString>;
81
88
  organization_id: z.ZodOptional<z.ZodString>;
82
89
  login_hint: z.ZodOptional<z.ZodString>;
90
+ ui_locales: z.ZodOptional<z.ZodString>;
83
91
  identifier: z.ZodOptional<z.ZodString>;
84
92
  one_time_token: z.ZodOptional<z.ZodString>;
85
93
  google_one_tap_credential: z.ZodOptional<z.ZodString>;
@@ -89,6 +97,7 @@ export declare const extraParamsObjectGuard: z.ZodObject<{
89
97
  direct_sign_in?: string | undefined;
90
98
  organization_id?: string | undefined;
91
99
  login_hint?: string | undefined;
100
+ ui_locales?: string | undefined;
92
101
  identifier?: string | undefined;
93
102
  one_time_token?: string | undefined;
94
103
  google_one_tap_credential?: string | undefined;
@@ -98,6 +107,7 @@ export declare const extraParamsObjectGuard: z.ZodObject<{
98
107
  direct_sign_in?: string | undefined;
99
108
  organization_id?: string | undefined;
100
109
  login_hint?: string | undefined;
110
+ ui_locales?: string | undefined;
101
111
  identifier?: string | undefined;
102
112
  one_time_token?: string | undefined;
103
113
  google_one_tap_credential?: string | undefined;
@@ -108,6 +118,7 @@ export type ExtraParamsObject = Partial<{
108
118
  [ExtraParamsKey.DirectSignIn]: string;
109
119
  [ExtraParamsKey.OrganizationId]: string;
110
120
  [ExtraParamsKey.LoginHint]: string;
121
+ [ExtraParamsKey.UiLocales]: string;
111
122
  [ExtraParamsKey.Identifier]: string;
112
123
  [ExtraParamsKey.OneTimeToken]: string;
113
124
  [ExtraParamsKey.GoogleOneTapCredential]: string;
@@ -40,6 +40,13 @@ export var ExtraParamsKey;
40
40
  * This can be used to pre-fill the identifier field **only on the first screen** of the sign-in/sign-up flow.
41
41
  */
42
42
  ExtraParamsKey["LoginHint"] = "login_hint";
43
+ /**
44
+ * The end-users preferred languages to use for the client application, represented as a space-separated list of BCP47 language tags.
45
+ * E.g. `en` or `en-US` or `en-US en`.
46
+ *
47
+ * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.13.2.1}
48
+ */
49
+ ExtraParamsKey["UiLocales"] = "ui_locales";
43
50
  /**
44
51
  * Specifies the identifier used in the identifier sign-in or identifier register page.
45
52
  *
@@ -85,6 +92,7 @@ export const extraParamsObjectGuard = z
85
92
  [ExtraParamsKey.DirectSignIn]: z.string(),
86
93
  [ExtraParamsKey.OrganizationId]: z.string(),
87
94
  [ExtraParamsKey.LoginHint]: z.string(),
95
+ [ExtraParamsKey.UiLocales]: z.string(),
88
96
  [ExtraParamsKey.Identifier]: z.string(),
89
97
  [ExtraParamsKey.OneTimeToken]: z.string(),
90
98
  [ExtraParamsKey.GoogleOneTapCredential]: z.string(),
@@ -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 CreateApplicationSignInExperience = {
10
10
  applicationId: string;
11
11
  color?: PartialColor;
12
12
  branding?: Branding;
13
+ customCss?: string | null;
13
14
  termsOfUseUrl?: string | null;
14
15
  privacyPolicyUrl?: string | null;
15
16
  displayName?: string | null;
@@ -20,9 +21,10 @@ export type ApplicationSignInExperience = {
20
21
  applicationId: string;
21
22
  color: PartialColor;
22
23
  branding: Branding;
24
+ customCss: string | null;
23
25
  termsOfUseUrl: string | null;
24
26
  privacyPolicyUrl: string | null;
25
27
  displayName: string | null;
26
28
  };
27
- export type ApplicationSignInExperienceKeys = 'tenantId' | 'applicationId' | 'color' | 'branding' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'displayName';
29
+ export type ApplicationSignInExperienceKeys = 'tenantId' | 'applicationId' | 'color' | 'branding' | 'customCss' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'displayName';
28
30
  export declare const ApplicationSignInExperiences: GeneratedSchema<ApplicationSignInExperienceKeys, CreateApplicationSignInExperience, ApplicationSignInExperience, 'application_sign_in_experiences', 'application_sign_in_experience'>;
@@ -6,6 +6,7 @@ const createGuard = z.object({
6
6
  applicationId: z.string().min(1).max(21),
7
7
  color: partialColorGuard.optional(),
8
8
  branding: brandingGuard.optional(),
9
+ customCss: z.string().nullable().optional(),
9
10
  termsOfUseUrl: z.string().max(2048).nullable().optional(),
10
11
  privacyPolicyUrl: z.string().max(2048).nullable().optional(),
11
12
  displayName: z.string().max(256).nullable().optional(),
@@ -15,6 +16,7 @@ const guard = z.object({
15
16
  applicationId: z.string().min(1).max(21),
16
17
  color: partialColorGuard,
17
18
  branding: brandingGuard,
19
+ customCss: z.string().nullable(),
18
20
  termsOfUseUrl: z.string().max(2048).nullable(),
19
21
  privacyPolicyUrl: z.string().max(2048).nullable(),
20
22
  displayName: z.string().max(256).nullable(),
@@ -27,6 +29,7 @@ export const ApplicationSignInExperiences = Object.freeze({
27
29
  applicationId: 'application_id',
28
30
  color: 'color',
29
31
  branding: 'branding',
32
+ customCss: 'custom_css',
30
33
  termsOfUseUrl: 'terms_of_use_url',
31
34
  privacyPolicyUrl: 'privacy_policy_url',
32
35
  displayName: 'display_name',
@@ -36,6 +39,7 @@ export const ApplicationSignInExperiences = Object.freeze({
36
39
  'applicationId',
37
40
  'color',
38
41
  'branding',
42
+ 'customCss',
39
43
  'termsOfUseUrl',
40
44
  'privacyPolicyUrl',
41
45
  'displayName',
@@ -1,4 +1,4 @@
1
- import { JsonObject, Branding, GeneratedSchema } from './../foundations/index.js';
1
+ import { JsonObject, PartialColor, Branding, GeneratedSchema } from './../foundations/index.js';
2
2
  /**
3
3
  * Organizations defined by [RFC 0001](https://github.com/logto-io/rfcs/blob/HEAD/active/0001-organization.md).
4
4
  *
@@ -17,8 +17,12 @@ 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
+ /** The organization's branding color configuration. */
21
+ color?: PartialColor;
20
22
  /** The organization's branding configuration. */
21
23
  branding?: Branding;
24
+ /** The custom CSS of the organization. */
25
+ customCss?: string | null;
22
26
  /** When the organization was created. */
23
27
  createdAt?: number;
24
28
  };
@@ -35,10 +39,14 @@ export type Organization = {
35
39
  customData: JsonObject;
36
40
  /** Whether multi-factor authentication configuration is required for the members of the organization. */
37
41
  isMfaRequired: boolean;
42
+ /** The organization's branding color configuration. */
43
+ color: PartialColor;
38
44
  /** The organization's branding configuration. */
39
45
  branding: Branding;
46
+ /** The custom CSS of the organization. */
47
+ customCss: string | null;
40
48
  /** When the organization was created. */
41
49
  createdAt: number;
42
50
  };
43
- export type OrganizationKeys = 'tenantId' | 'id' | 'name' | 'description' | 'customData' | 'isMfaRequired' | 'branding' | 'createdAt';
51
+ export type OrganizationKeys = 'tenantId' | 'id' | 'name' | 'description' | 'customData' | 'isMfaRequired' | 'color' | 'branding' | 'customCss' | 'createdAt';
44
52
  export declare const Organizations: GeneratedSchema<OrganizationKeys, CreateOrganization, Organization, 'organizations', 'organization'>;