@logto/schemas 1.35.0 → 1.36.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 (56) hide show
  1. package/alterations/1.36.0-1767193412-allow-token-exchange.ts +34 -0
  2. package/alterations/1.36.0-1767859553-passkey-sign-in.ts +21 -0
  3. package/alterations/1.36.0-1768192304-enable-account-center-for-admin-tenant.ts +32 -0
  4. package/alterations/1.36.0-1768464306-enable-mfa-for-admin-tenant.ts +30 -0
  5. package/alterations/1.36.0-1768758295-add-user-geo-location.ts +32 -0
  6. package/alterations/1.36.0-1768891516-add-user-sign-in-countries-table.ts +33 -0
  7. package/alterations/1.36.0-1769067642-add-adaptive-mfa-configuration.ts +19 -0
  8. package/alterations/1.36.0-1769172677-enable-organization-mfa-policy-for-admin-tenant.ts +31 -0
  9. package/alterations-js/1.36.0-1767193412-allow-token-exchange.js +30 -0
  10. package/alterations-js/1.36.0-1767859553-passkey-sign-in.js +17 -0
  11. package/alterations-js/1.36.0-1768192304-enable-account-center-for-admin-tenant.js +27 -0
  12. package/alterations-js/1.36.0-1768464306-enable-mfa-for-admin-tenant.js +25 -0
  13. package/alterations-js/1.36.0-1768758295-add-user-geo-location.js +27 -0
  14. package/alterations-js/1.36.0-1768891516-add-user-sign-in-countries-table.js +28 -0
  15. package/alterations-js/1.36.0-1769067642-add-adaptive-mfa-configuration.js +15 -0
  16. package/alterations-js/1.36.0-1769172677-enable-organization-mfa-policy-for-admin-tenant.js +26 -0
  17. package/lib/db-entries/index.d.ts +2 -0
  18. package/lib/db-entries/index.js +2 -0
  19. package/lib/db-entries/sign-in-experience.d.ts +6 -2
  20. package/lib/db-entries/sign-in-experience.js +9 -1
  21. package/lib/db-entries/user-geo-location.d.ts +24 -0
  22. package/lib/db-entries/user-geo-location.js +37 -0
  23. package/lib/db-entries/user-sign-in-country.d.ts +24 -0
  24. package/lib/db-entries/user-sign-in-country.js +33 -0
  25. package/lib/foundations/jsonb-types/account-centers.d.ts +2 -2
  26. package/lib/foundations/jsonb-types/logs.d.ts +703 -0
  27. package/lib/foundations/jsonb-types/logs.js +52 -0
  28. package/lib/foundations/jsonb-types/oidc-module.d.ts +15 -3
  29. package/lib/foundations/jsonb-types/oidc-module.js +15 -3
  30. package/lib/foundations/jsonb-types/saml-application-configs.d.ts +1 -1
  31. package/lib/foundations/jsonb-types/sentinel.d.ts +13 -1
  32. package/lib/foundations/jsonb-types/sentinel.js +12 -0
  33. package/lib/foundations/jsonb-types/sign-in-experience.d.ts +59 -0
  34. package/lib/foundations/jsonb-types/sign-in-experience.js +11 -0
  35. package/lib/seeds/account-center.d.ts +6 -0
  36. package/lib/seeds/account-center.js +24 -0
  37. package/lib/seeds/cloud-api.d.ts +3 -1
  38. package/lib/seeds/cloud-api.js +2 -0
  39. package/lib/seeds/sign-in-experience.js +6 -1
  40. package/lib/types/application.d.ts +6 -0
  41. package/lib/types/consent.d.ts +4 -0
  42. package/lib/types/custom-profile-fields.d.ts +3 -3
  43. package/lib/types/hook.d.ts +2 -2
  44. package/lib/types/interactions.d.ts +2 -2
  45. package/lib/types/log/index.d.ts +12 -6
  46. package/lib/types/log/interaction.d.ts +5 -1
  47. package/lib/types/logto-config/index.d.ts +9 -9
  48. package/lib/types/logto-config/jwt-customizer.d.ts +17 -17
  49. package/lib/types/saml-application.d.ts +7 -7
  50. package/lib/types/sign-in-experience.d.ts +6 -0
  51. package/lib/types/user.d.ts +7 -7
  52. package/package.json +5 -5
  53. package/tables/sign_in_experiences.sql +2 -0
  54. package/tables/user_geo_locations.sql +14 -0
  55. package/tables/user_sign_in_countries.sql +16 -0
  56. package/tables/users.sql +3 -0
@@ -0,0 +1,33 @@
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
+ userId: z.string().min(1).max(12),
6
+ country: z.string().min(1).max(16),
7
+ lastSignInAt: z.number().optional(),
8
+ });
9
+ const guard = z.object({
10
+ tenantId: z.string().max(21),
11
+ userId: z.string().min(1).max(12),
12
+ country: z.string().min(1).max(16),
13
+ lastSignInAt: z.number(),
14
+ });
15
+ export const UserSignInCountries = Object.freeze({
16
+ table: 'user_sign_in_countries',
17
+ tableSingular: 'user_sign_in_country',
18
+ fields: {
19
+ tenantId: 'tenant_id',
20
+ userId: 'user_id',
21
+ country: 'country',
22
+ lastSignInAt: 'last_sign_in_at',
23
+ },
24
+ fieldKeys: [
25
+ 'tenantId',
26
+ 'userId',
27
+ 'country',
28
+ 'lastSignInAt',
29
+ ],
30
+ createGuard,
31
+ guard,
32
+ updateGuard: guard.partial(),
33
+ });
@@ -22,8 +22,8 @@ export declare const accountCenterFieldControlGuard: z.ZodObject<{
22
22
  mfa: z.ZodOptional<z.ZodNativeEnum<typeof AccountCenterControlValue>>;
23
23
  }, "strip", z.ZodTypeAny, {
24
24
  name?: AccountCenterControlValue | undefined;
25
- username?: AccountCenterControlValue | undefined;
26
25
  email?: AccountCenterControlValue | undefined;
26
+ username?: AccountCenterControlValue | undefined;
27
27
  phone?: AccountCenterControlValue | undefined;
28
28
  password?: AccountCenterControlValue | undefined;
29
29
  profile?: AccountCenterControlValue | undefined;
@@ -33,8 +33,8 @@ export declare const accountCenterFieldControlGuard: z.ZodObject<{
33
33
  mfa?: AccountCenterControlValue | undefined;
34
34
  }, {
35
35
  name?: AccountCenterControlValue | undefined;
36
- username?: AccountCenterControlValue | undefined;
37
36
  email?: AccountCenterControlValue | undefined;
37
+ username?: AccountCenterControlValue | undefined;
38
38
  phone?: AccountCenterControlValue | undefined;
39
39
  password?: AccountCenterControlValue | undefined;
40
40
  profile?: AccountCenterControlValue | undefined;