@logto/schemas 1.11.0 → 1.13.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 (158) hide show
  1. package/alterations/1.12.0-1700031616-update-org-role-foreign-keys.ts +35 -0
  2. package/alterations/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.ts +21 -0
  3. package/alterations/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.ts +20 -0
  4. package/alterations/1.13.0-1702274830-add-new-third-party-column-to-applications-table.ts +20 -0
  5. package/alterations/1.13.0-1702372401-add-application-permissions-tables.ts +93 -0
  6. package/alterations/1.13.0-1702544178-sync-tenant-orgs.ts +296 -0
  7. package/alterations/1.13.0-1702871078-protected-application-type.ts +24 -0
  8. package/alterations/1.13.0-1702877515-protected-app-configs.ts +18 -0
  9. package/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts +61 -0
  10. package/alterations/1.13.0-1703229996-daily-token-usage.ts +62 -0
  11. package/alterations/1.13.0-1703230000-update-tenant-roles.ts +94 -0
  12. package/alterations/1.13.0-1704692973-remove-legacy-resources.ts +147 -0
  13. package/alterations/1.13.0-1704934999-add-magic-links-table.ts +37 -0
  14. package/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts +78 -0
  15. package/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts +62 -0
  16. package/alterations/1.13.0-1705991158-update-invitation-indices.ts +32 -0
  17. package/alterations/1.13.0-1706449174-update-organization-invitation-column.ts +24 -0
  18. package/alterations/1.13.0-1706510290-protected-app-host-index.ts +21 -0
  19. package/alterations/1.13.0-1706512952-restore-get-started-page.ts +17 -0
  20. package/alterations/1.13.0-1706528755-remove-magic-links.ts +46 -0
  21. package/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts +21 -0
  22. package/alterations/utils/1704934999-tables.ts +49 -0
  23. package/alterations/utils/README.md +9 -0
  24. package/alterations-js/1.12.0-1700031616-update-org-role-foreign-keys.d.ts +3 -0
  25. package/alterations-js/1.12.0-1700031616-update-org-role-foreign-keys.js +31 -0
  26. package/alterations-js/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.d.ts +3 -0
  27. package/alterations-js/1.12.0-1701054133-add-unique-constraint-to-the-sso-connector-name.js +17 -0
  28. package/alterations-js/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.d.ts +3 -0
  29. package/alterations-js/1.12.0-1701245520-add-single-sign-on-enabled-flag-to-sie.js +16 -0
  30. package/alterations-js/1.13.0-1702274830-add-new-third-party-column-to-applications-table.d.ts +3 -0
  31. package/alterations-js/1.13.0-1702274830-add-new-third-party-column-to-applications-table.js +16 -0
  32. package/alterations-js/1.13.0-1702372401-add-application-permissions-tables.d.ts +3 -0
  33. package/alterations-js/1.13.0-1702372401-add-application-permissions-tables.js +79 -0
  34. package/alterations-js/1.13.0-1702544178-sync-tenant-orgs.d.ts +18 -0
  35. package/alterations-js/1.13.0-1702544178-sync-tenant-orgs.js +225 -0
  36. package/alterations-js/1.13.0-1702871078-protected-application-type.d.ts +3 -0
  37. package/alterations-js/1.13.0-1702871078-protected-application-type.js +20 -0
  38. package/alterations-js/1.13.0-1702877515-protected-app-configs.d.ts +3 -0
  39. package/alterations-js/1.13.0-1702877515-protected-app-configs.js +14 -0
  40. package/alterations-js/1.13.0-1702978120-application-sign-in-experience-table.d.ts +3 -0
  41. package/alterations-js/1.13.0-1702978120-application-sign-in-experience-table.js +51 -0
  42. package/alterations-js/1.13.0-1703229996-daily-token-usage.d.ts +3 -0
  43. package/alterations-js/1.13.0-1703229996-daily-token-usage.js +51 -0
  44. package/alterations-js/1.13.0-1703230000-update-tenant-roles.d.ts +11 -0
  45. package/alterations-js/1.13.0-1703230000-update-tenant-roles.js +87 -0
  46. package/alterations-js/1.13.0-1704692973-remove-legacy-resources.d.ts +3 -0
  47. package/alterations-js/1.13.0-1704692973-remove-legacy-resources.js +124 -0
  48. package/alterations-js/1.13.0-1704934999-add-magic-links-table.d.ts +3 -0
  49. package/alterations-js/1.13.0-1704934999-add-magic-links-table.js +32 -0
  50. package/alterations-js/1.13.0-1704935001-add-organization-invitation-tables.d.ts +3 -0
  51. package/alterations-js/1.13.0-1704935001-add-organization-invitation-tables.js +72 -0
  52. package/alterations-js/1.13.0-1705288654-add-application-user-consent-organizations-table.d.ts +3 -0
  53. package/alterations-js/1.13.0-1705288654-add-application-user-consent-organizations-table.js +52 -0
  54. package/alterations-js/1.13.0-1705991158-update-invitation-indices.d.ts +7 -0
  55. package/alterations-js/1.13.0-1705991158-update-invitation-indices.js +27 -0
  56. package/alterations-js/1.13.0-1706449174-update-organization-invitation-column.d.ts +3 -0
  57. package/alterations-js/1.13.0-1706449174-update-organization-invitation-column.js +20 -0
  58. package/alterations-js/1.13.0-1706510290-protected-app-host-index.d.ts +3 -0
  59. package/alterations-js/1.13.0-1706510290-protected-app-host-index.js +17 -0
  60. package/alterations-js/1.13.0-1706512952-restore-get-started-page.d.ts +3 -0
  61. package/alterations-js/1.13.0-1706512952-restore-get-started-page.js +13 -0
  62. package/alterations-js/1.13.0-1706528755-remove-magic-links.d.ts +3 -0
  63. package/alterations-js/1.13.0-1706528755-remove-magic-links.js +41 -0
  64. package/alterations-js/1.13.0-1706585206-protected-app-custom-domain-unique.d.ts +3 -0
  65. package/alterations-js/1.13.0-1706585206-protected-app-custom-domain-unique.js +17 -0
  66. package/alterations-js/utils/1704934999-tables.d.ts +11 -0
  67. package/alterations-js/utils/1704934999-tables.js +43 -0
  68. package/lib/consts/index.d.ts +1 -0
  69. package/lib/consts/index.js +1 -0
  70. package/lib/consts/subscriptions.d.ts +6 -0
  71. package/lib/consts/subscriptions.js +7 -0
  72. package/lib/db-entries/application-sign-in-experience.d.ts +26 -0
  73. package/lib/db-entries/application-sign-in-experience.js +42 -0
  74. package/lib/db-entries/application-user-consent-organization-scope.d.ts +24 -0
  75. package/lib/db-entries/application-user-consent-organization-scope.js +29 -0
  76. package/lib/db-entries/application-user-consent-organization.d.ts +22 -0
  77. package/lib/db-entries/application-user-consent-organization.js +33 -0
  78. package/lib/db-entries/application-user-consent-resource-scope.d.ts +24 -0
  79. package/lib/db-entries/application-user-consent-resource-scope.js +29 -0
  80. package/lib/db-entries/application-user-consent-user-scope.d.ts +24 -0
  81. package/lib/db-entries/application-user-consent-user-scope.js +29 -0
  82. package/lib/db-entries/application.d.ts +6 -2
  83. package/lib/db-entries/application.js +9 -1
  84. package/lib/db-entries/custom-types.d.ts +8 -1
  85. package/lib/db-entries/custom-types.js +8 -0
  86. package/lib/db-entries/daily-token-usage.d.ts +20 -0
  87. package/lib/db-entries/daily-token-usage.js +33 -0
  88. package/lib/db-entries/index.d.ts +8 -0
  89. package/lib/db-entries/index.js +8 -0
  90. package/lib/db-entries/organization-invitation-role-relation.d.ts +24 -0
  91. package/lib/db-entries/organization-invitation-role-relation.js +29 -0
  92. package/lib/db-entries/organization-invitation.d.ts +53 -0
  93. package/lib/db-entries/organization-invitation.js +58 -0
  94. package/lib/db-entries/sign-in-experience.d.ts +3 -1
  95. package/lib/db-entries/sign-in-experience.js +4 -0
  96. package/lib/db-entries/sso-connector.d.ts +2 -2
  97. package/lib/foundations/jsonb-types/applications.d.ts +380 -0
  98. package/lib/foundations/jsonb-types/applications.js +29 -0
  99. package/lib/foundations/jsonb-types/custom-domain.d.ts +37 -89
  100. package/lib/foundations/jsonb-types/custom-domain.js +4 -9
  101. package/lib/foundations/jsonb-types/index.d.ts +1 -0
  102. package/lib/foundations/jsonb-types/index.js +1 -0
  103. package/lib/foundations/jsonb-types/sso-connector.d.ts +3 -0
  104. package/lib/foundations/jsonb-types/sso-connector.js +1 -0
  105. package/lib/models/tenants.d.ts +1 -1
  106. package/lib/seeds/application.d.ts +1 -1
  107. package/lib/seeds/application.js +3 -1
  108. package/lib/seeds/cloud-api.d.ts +0 -2
  109. package/lib/seeds/cloud-api.js +0 -3
  110. package/lib/seeds/management-api.d.ts +77 -6
  111. package/lib/seeds/management-api.js +14 -10
  112. package/lib/types/application.d.ts +576 -1
  113. package/lib/types/application.js +42 -1
  114. package/lib/types/connector.js +1 -1
  115. package/lib/types/consent.d.ts +568 -0
  116. package/lib/types/consent.js +47 -0
  117. package/lib/types/domain.d.ts +21 -65
  118. package/lib/types/hook.d.ts +1 -0
  119. package/lib/types/index.d.ts +3 -0
  120. package/lib/types/index.js +3 -0
  121. package/lib/types/interactions.d.ts +6 -6
  122. package/lib/types/logto-config.d.ts +32 -6
  123. package/lib/types/logto-config.js +12 -2
  124. package/lib/types/mapi-proxy.d.ts +30 -0
  125. package/lib/types/mapi-proxy.js +49 -0
  126. package/lib/types/organization.d.ts +10 -1
  127. package/lib/types/organization.js +4 -1
  128. package/lib/types/sso-connector.d.ts +63 -66
  129. package/lib/types/sso-connector.js +41 -7
  130. package/lib/types/system.d.ts +28 -1
  131. package/lib/types/system.js +17 -0
  132. package/lib/types/tenant-organization.d.ts +107 -0
  133. package/lib/types/tenant-organization.js +145 -0
  134. package/lib/types/tenant.d.ts +0 -1
  135. package/lib/types/tenant.js +2 -1
  136. package/lib/types/user-assets.d.ts +5 -5
  137. package/lib/types/user-assets.js +1 -0
  138. package/lib/types/user.d.ts +17 -15
  139. package/lib/types/user.js +2 -2
  140. package/lib/utils/domain.d.ts +10 -0
  141. package/lib/utils/domain.js +28 -0
  142. package/lib/utils/domain.test.d.ts +1 -0
  143. package/lib/utils/domain.test.js +34 -0
  144. package/lib/utils/index.d.ts +1 -0
  145. package/lib/utils/index.js +1 -0
  146. package/package.json +15 -15
  147. package/tables/application_sign_in_experiences.sql +15 -0
  148. package/tables/application_user_consent_organization_scopes.sql +14 -0
  149. package/tables/application_user_consent_organizations.sql +16 -0
  150. package/tables/application_user_consent_resource_scopes.sql +14 -0
  151. package/tables/application_user_consent_user_scopes.sql +13 -0
  152. package/tables/applications.sql +16 -1
  153. package/tables/daily_token_usage.sql +11 -0
  154. package/tables/organization_invitation_role_relations.sql +14 -0
  155. package/tables/organization_invitations.sql +36 -0
  156. package/tables/organization_role_user_relations.sql +8 -6
  157. package/tables/sign_in_experiences.sql +1 -0
  158. package/tables/sso_connectors.sql +4 -2
@@ -0,0 +1,58 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ import { z } from 'zod';
3
+ import { OrganizationInvitationStatus } from './custom-types.js';
4
+ const createGuard = z.object({
5
+ tenantId: z.string().max(21).optional(),
6
+ id: z.string().min(1).max(21),
7
+ inviterId: z.string().max(21).nullable().optional(),
8
+ invitee: z.string().min(1).max(256),
9
+ acceptedUserId: z.string().max(21).nullable().optional(),
10
+ organizationId: z.string().min(1).max(21),
11
+ status: z.nativeEnum(OrganizationInvitationStatus),
12
+ createdAt: z.number().optional(),
13
+ updatedAt: z.number().optional(),
14
+ expiresAt: z.number(),
15
+ });
16
+ const guard = z.object({
17
+ tenantId: z.string().max(21),
18
+ id: z.string().min(1).max(21),
19
+ inviterId: z.string().max(21).nullable(),
20
+ invitee: z.string().min(1).max(256),
21
+ acceptedUserId: z.string().max(21).nullable(),
22
+ organizationId: z.string().min(1).max(21),
23
+ status: z.nativeEnum(OrganizationInvitationStatus),
24
+ createdAt: z.number(),
25
+ updatedAt: z.number(),
26
+ expiresAt: z.number(),
27
+ });
28
+ export const OrganizationInvitations = Object.freeze({
29
+ table: 'organization_invitations',
30
+ tableSingular: 'organization_invitation',
31
+ fields: {
32
+ tenantId: 'tenant_id',
33
+ id: 'id',
34
+ inviterId: 'inviter_id',
35
+ invitee: 'invitee',
36
+ acceptedUserId: 'accepted_user_id',
37
+ organizationId: 'organization_id',
38
+ status: 'status',
39
+ createdAt: 'created_at',
40
+ updatedAt: 'updated_at',
41
+ expiresAt: 'expires_at',
42
+ },
43
+ fieldKeys: [
44
+ 'tenantId',
45
+ 'id',
46
+ 'inviterId',
47
+ 'invitee',
48
+ 'acceptedUserId',
49
+ 'organizationId',
50
+ 'status',
51
+ 'createdAt',
52
+ 'updatedAt',
53
+ 'expiresAt',
54
+ ],
55
+ createGuard,
56
+ guard,
57
+ updateGuard: guard.partial(),
58
+ });
@@ -21,6 +21,7 @@ export type CreateSignInExperience = {
21
21
  customContent?: CustomContent;
22
22
  passwordPolicy?: PartialPasswordPolicy;
23
23
  mfa?: Mfa;
24
+ singleSignOnEnabled?: boolean;
24
25
  };
25
26
  export type SignInExperience = {
26
27
  tenantId: string;
@@ -38,6 +39,7 @@ export type SignInExperience = {
38
39
  customContent: CustomContent;
39
40
  passwordPolicy: PartialPasswordPolicy;
40
41
  mfa: Mfa;
42
+ singleSignOnEnabled: boolean;
41
43
  };
42
- export type SignInExperienceKeys = 'tenantId' | 'id' | 'color' | 'branding' | 'languageInfo' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'signIn' | 'signUp' | 'socialSignInConnectorTargets' | 'signInMode' | 'customCss' | 'customContent' | 'passwordPolicy' | 'mfa';
44
+ export type SignInExperienceKeys = 'tenantId' | 'id' | 'color' | 'branding' | 'languageInfo' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'signIn' | 'signUp' | 'socialSignInConnectorTargets' | 'signInMode' | 'customCss' | 'customContent' | 'passwordPolicy' | 'mfa' | 'singleSignOnEnabled';
43
45
  export declare const SignInExperiences: GeneratedSchema<SignInExperienceKeys, CreateSignInExperience, SignInExperience, 'sign_in_experiences', 'sign_in_experience'>;
@@ -18,6 +18,7 @@ const createGuard = z.object({
18
18
  customContent: customContentGuard.optional(),
19
19
  passwordPolicy: partialPasswordPolicyGuard.optional(),
20
20
  mfa: mfaGuard.optional(),
21
+ singleSignOnEnabled: z.boolean().optional(),
21
22
  });
22
23
  const guard = z.object({
23
24
  tenantId: z.string().max(21),
@@ -35,6 +36,7 @@ const guard = z.object({
35
36
  customContent: customContentGuard,
36
37
  passwordPolicy: partialPasswordPolicyGuard,
37
38
  mfa: mfaGuard,
39
+ singleSignOnEnabled: z.boolean(),
38
40
  });
39
41
  export const SignInExperiences = Object.freeze({
40
42
  table: 'sign_in_experiences',
@@ -55,6 +57,7 @@ export const SignInExperiences = Object.freeze({
55
57
  customContent: 'custom_content',
56
58
  passwordPolicy: 'password_policy',
57
59
  mfa: 'mfa',
60
+ singleSignOnEnabled: 'single_sign_on_enabled',
58
61
  },
59
62
  fieldKeys: [
60
63
  'tenantId',
@@ -72,6 +75,7 @@ export const SignInExperiences = Object.freeze({
72
75
  'customContent',
73
76
  'passwordPolicy',
74
77
  'mfa',
78
+ 'singleSignOnEnabled',
75
79
  ],
76
80
  createGuard,
77
81
  guard,
@@ -8,7 +8,7 @@ export type CreateSsoConnector = {
8
8
  tenantId?: string;
9
9
  /** The globally unique identifier of the SSO connector. */
10
10
  id: string;
11
- /** The connector factory name of the SSO provider. */
11
+ /** The identifier of connector's SSO provider */
12
12
  providerName: string;
13
13
  /** The name of the SSO provider for display. */
14
14
  connectorName: string;
@@ -27,7 +27,7 @@ export type SsoConnector = {
27
27
  tenantId: string;
28
28
  /** The globally unique identifier of the SSO connector. */
29
29
  id: string;
30
- /** The connector factory name of the SSO provider. */
30
+ /** The identifier of connector's SSO provider */
31
31
  providerName: string;
32
32
  /** The name of the SSO provider for display. */
33
33
  connectorName: string;
@@ -0,0 +1,380 @@
1
+ import { z } from 'zod';
2
+ export declare const customDomainGuard: z.ZodObject<{
3
+ domain: z.ZodString;
4
+ status: z.ZodNativeEnum<typeof import("./custom-domain.js").DomainStatus>;
5
+ errorMessage: z.ZodNullable<z.ZodString>;
6
+ dnsRecords: z.ZodArray<z.ZodObject<{
7
+ name: z.ZodString;
8
+ type: z.ZodString;
9
+ value: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ type: string;
12
+ value: string;
13
+ name: string;
14
+ }, {
15
+ type: string;
16
+ value: string;
17
+ name: string;
18
+ }>, "many">;
19
+ cloudflareData: z.ZodNullable<z.ZodObject<{
20
+ id: z.ZodString;
21
+ status: z.ZodString;
22
+ ssl: z.ZodObject<{
23
+ status: z.ZodString;
24
+ validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
25
+ message: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ message: string;
28
+ }, {
29
+ message: string;
30
+ }>, "many">>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ status: string;
33
+ validation_errors?: {
34
+ message: string;
35
+ }[] | undefined;
36
+ }, {
37
+ status: string;
38
+ validation_errors?: {
39
+ message: string;
40
+ }[] | undefined;
41
+ }>;
42
+ verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ status: string;
45
+ id: string;
46
+ ssl: {
47
+ status: string;
48
+ validation_errors?: {
49
+ message: string;
50
+ }[] | undefined;
51
+ };
52
+ verification_errors?: string[] | undefined;
53
+ }, {
54
+ status: string;
55
+ id: string;
56
+ ssl: {
57
+ status: string;
58
+ validation_errors?: {
59
+ message: string;
60
+ }[] | undefined;
61
+ };
62
+ verification_errors?: string[] | undefined;
63
+ }>>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ status: import("./custom-domain.js").DomainStatus;
66
+ domain: string;
67
+ errorMessage: string | null;
68
+ dnsRecords: {
69
+ type: string;
70
+ value: string;
71
+ name: string;
72
+ }[];
73
+ cloudflareData: {
74
+ status: string;
75
+ id: string;
76
+ ssl: {
77
+ status: string;
78
+ validation_errors?: {
79
+ message: string;
80
+ }[] | undefined;
81
+ };
82
+ verification_errors?: string[] | undefined;
83
+ } | null;
84
+ }, {
85
+ status: import("./custom-domain.js").DomainStatus;
86
+ domain: string;
87
+ errorMessage: string | null;
88
+ dnsRecords: {
89
+ type: string;
90
+ value: string;
91
+ name: string;
92
+ }[];
93
+ cloudflareData: {
94
+ status: string;
95
+ id: string;
96
+ ssl: {
97
+ status: string;
98
+ validation_errors?: {
99
+ message: string;
100
+ }[] | undefined;
101
+ };
102
+ verification_errors?: string[] | undefined;
103
+ } | null;
104
+ }>;
105
+ export declare const customDomainsGuard: z.ZodArray<z.ZodObject<{
106
+ domain: z.ZodString;
107
+ status: z.ZodNativeEnum<typeof import("./custom-domain.js").DomainStatus>;
108
+ errorMessage: z.ZodNullable<z.ZodString>;
109
+ dnsRecords: z.ZodArray<z.ZodObject<{
110
+ name: z.ZodString;
111
+ type: z.ZodString;
112
+ value: z.ZodString;
113
+ }, "strip", z.ZodTypeAny, {
114
+ type: string;
115
+ value: string;
116
+ name: string;
117
+ }, {
118
+ type: string;
119
+ value: string;
120
+ name: string;
121
+ }>, "many">;
122
+ cloudflareData: z.ZodNullable<z.ZodObject<{
123
+ id: z.ZodString;
124
+ status: z.ZodString;
125
+ ssl: z.ZodObject<{
126
+ status: z.ZodString;
127
+ validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
128
+ message: z.ZodString;
129
+ }, "strip", z.ZodTypeAny, {
130
+ message: string;
131
+ }, {
132
+ message: string;
133
+ }>, "many">>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ status: string;
136
+ validation_errors?: {
137
+ message: string;
138
+ }[] | undefined;
139
+ }, {
140
+ status: string;
141
+ validation_errors?: {
142
+ message: string;
143
+ }[] | undefined;
144
+ }>;
145
+ verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ status: string;
148
+ id: string;
149
+ ssl: {
150
+ status: string;
151
+ validation_errors?: {
152
+ message: string;
153
+ }[] | undefined;
154
+ };
155
+ verification_errors?: string[] | undefined;
156
+ }, {
157
+ status: string;
158
+ id: string;
159
+ ssl: {
160
+ status: string;
161
+ validation_errors?: {
162
+ message: string;
163
+ }[] | undefined;
164
+ };
165
+ verification_errors?: string[] | undefined;
166
+ }>>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ status: import("./custom-domain.js").DomainStatus;
169
+ domain: string;
170
+ errorMessage: string | null;
171
+ dnsRecords: {
172
+ type: string;
173
+ value: string;
174
+ name: string;
175
+ }[];
176
+ cloudflareData: {
177
+ status: string;
178
+ id: string;
179
+ ssl: {
180
+ status: string;
181
+ validation_errors?: {
182
+ message: string;
183
+ }[] | undefined;
184
+ };
185
+ verification_errors?: string[] | undefined;
186
+ } | null;
187
+ }, {
188
+ status: import("./custom-domain.js").DomainStatus;
189
+ domain: string;
190
+ errorMessage: string | null;
191
+ dnsRecords: {
192
+ type: string;
193
+ value: string;
194
+ name: string;
195
+ }[];
196
+ cloudflareData: {
197
+ status: string;
198
+ id: string;
199
+ ssl: {
200
+ status: string;
201
+ validation_errors?: {
202
+ message: string;
203
+ }[] | undefined;
204
+ };
205
+ verification_errors?: string[] | undefined;
206
+ } | null;
207
+ }>, "many">;
208
+ export type CustomDomain = z.infer<typeof customDomainGuard>;
209
+ export declare const protectedAppMetadataGuard: z.ZodObject<{
210
+ host: z.ZodString;
211
+ origin: z.ZodString;
212
+ sessionDuration: z.ZodNumber;
213
+ pageRules: z.ZodArray<z.ZodObject<{
214
+ path: z.ZodString;
215
+ }, "strip", z.ZodTypeAny, {
216
+ path: string;
217
+ }, {
218
+ path: string;
219
+ }>, "many">;
220
+ customDomains: z.ZodOptional<z.ZodArray<z.ZodObject<{
221
+ domain: z.ZodString;
222
+ status: z.ZodNativeEnum<typeof import("./custom-domain.js").DomainStatus>;
223
+ errorMessage: z.ZodNullable<z.ZodString>;
224
+ dnsRecords: z.ZodArray<z.ZodObject<{
225
+ name: z.ZodString;
226
+ type: z.ZodString;
227
+ value: z.ZodString;
228
+ }, "strip", z.ZodTypeAny, {
229
+ type: string;
230
+ value: string;
231
+ name: string;
232
+ }, {
233
+ type: string;
234
+ value: string;
235
+ name: string;
236
+ }>, "many">;
237
+ cloudflareData: z.ZodNullable<z.ZodObject<{
238
+ id: z.ZodString;
239
+ status: z.ZodString;
240
+ ssl: z.ZodObject<{
241
+ status: z.ZodString;
242
+ validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
243
+ message: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ message: string;
246
+ }, {
247
+ message: string;
248
+ }>, "many">>;
249
+ }, "strip", z.ZodTypeAny, {
250
+ status: string;
251
+ validation_errors?: {
252
+ message: string;
253
+ }[] | undefined;
254
+ }, {
255
+ status: string;
256
+ validation_errors?: {
257
+ message: string;
258
+ }[] | undefined;
259
+ }>;
260
+ verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ status: string;
263
+ id: string;
264
+ ssl: {
265
+ status: string;
266
+ validation_errors?: {
267
+ message: string;
268
+ }[] | undefined;
269
+ };
270
+ verification_errors?: string[] | undefined;
271
+ }, {
272
+ status: string;
273
+ id: string;
274
+ ssl: {
275
+ status: string;
276
+ validation_errors?: {
277
+ message: string;
278
+ }[] | undefined;
279
+ };
280
+ verification_errors?: string[] | undefined;
281
+ }>>;
282
+ }, "strip", z.ZodTypeAny, {
283
+ status: import("./custom-domain.js").DomainStatus;
284
+ domain: string;
285
+ errorMessage: string | null;
286
+ dnsRecords: {
287
+ type: string;
288
+ value: string;
289
+ name: string;
290
+ }[];
291
+ cloudflareData: {
292
+ status: string;
293
+ id: string;
294
+ ssl: {
295
+ status: string;
296
+ validation_errors?: {
297
+ message: string;
298
+ }[] | undefined;
299
+ };
300
+ verification_errors?: string[] | undefined;
301
+ } | null;
302
+ }, {
303
+ status: import("./custom-domain.js").DomainStatus;
304
+ domain: string;
305
+ errorMessage: string | null;
306
+ dnsRecords: {
307
+ type: string;
308
+ value: string;
309
+ name: string;
310
+ }[];
311
+ cloudflareData: {
312
+ status: string;
313
+ id: string;
314
+ ssl: {
315
+ status: string;
316
+ validation_errors?: {
317
+ message: string;
318
+ }[] | undefined;
319
+ };
320
+ verification_errors?: string[] | undefined;
321
+ } | null;
322
+ }>, "many">>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ host: string;
325
+ origin: string;
326
+ sessionDuration: number;
327
+ pageRules: {
328
+ path: string;
329
+ }[];
330
+ customDomains?: {
331
+ status: import("./custom-domain.js").DomainStatus;
332
+ domain: string;
333
+ errorMessage: string | null;
334
+ dnsRecords: {
335
+ type: string;
336
+ value: string;
337
+ name: string;
338
+ }[];
339
+ cloudflareData: {
340
+ status: string;
341
+ id: string;
342
+ ssl: {
343
+ status: string;
344
+ validation_errors?: {
345
+ message: string;
346
+ }[] | undefined;
347
+ };
348
+ verification_errors?: string[] | undefined;
349
+ } | null;
350
+ }[] | undefined;
351
+ }, {
352
+ host: string;
353
+ origin: string;
354
+ sessionDuration: number;
355
+ pageRules: {
356
+ path: string;
357
+ }[];
358
+ customDomains?: {
359
+ status: import("./custom-domain.js").DomainStatus;
360
+ domain: string;
361
+ errorMessage: string | null;
362
+ dnsRecords: {
363
+ type: string;
364
+ value: string;
365
+ name: string;
366
+ }[];
367
+ cloudflareData: {
368
+ status: string;
369
+ id: string;
370
+ ssl: {
371
+ status: string;
372
+ validation_errors?: {
373
+ message: string;
374
+ }[] | undefined;
375
+ };
376
+ verification_errors?: string[] | undefined;
377
+ } | null;
378
+ }[] | undefined;
379
+ }>;
380
+ export type ProtectedAppMetadata = z.infer<typeof protectedAppMetadataGuard>;
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { cloudflareDataGuard, domainDnsRecordsGuard, domainStatusGuard } from './custom-domain.js';
3
+ export const customDomainGuard = z.object({
4
+ /* The domain name, e.g app.example.com */
5
+ domain: z.string(),
6
+ /* The status of the domain in Cloudflare */
7
+ status: domainStatusGuard,
8
+ /* The error message if any */
9
+ errorMessage: z.string().nullable(),
10
+ /* The DNS records of the domain */
11
+ dnsRecords: domainDnsRecordsGuard,
12
+ /* The remote Cloudflare data */
13
+ cloudflareData: cloudflareDataGuard.nullable(),
14
+ });
15
+ export const customDomainsGuard = z.array(customDomainGuard);
16
+ export const protectedAppMetadataGuard = z.object({
17
+ /* The host of the site */
18
+ host: z.string(),
19
+ /* The origin of the site */
20
+ origin: z.string(),
21
+ /* Session duration in seconds */
22
+ sessionDuration: z.number(),
23
+ pageRules: z.array(z.object({
24
+ /* The path pattern (regex) to match */
25
+ path: z.string(),
26
+ })),
27
+ /* Custom domain */
28
+ customDomains: customDomainsGuard.optional(),
29
+ });
@@ -34,96 +34,44 @@ export declare const cloudflareDataGuard: z.ZodObject<{
34
34
  status: z.ZodString;
35
35
  validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
36
  message: z.ZodString;
37
- }, "strip", z.ZodUnknown, z.objectOutputType<{
38
- message: z.ZodString;
39
- }, z.ZodUnknown, "strip">, z.objectInputType<{
40
- message: z.ZodString;
41
- }, z.ZodUnknown, "strip">>, "many">>;
42
- }, "strip", z.ZodUnknown, z.objectOutputType<{
43
- status: z.ZodString;
44
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
- message: z.ZodString;
46
- }, "strip", z.ZodUnknown, z.objectOutputType<{
47
- message: z.ZodString;
48
- }, z.ZodUnknown, "strip">, z.objectInputType<{
49
- message: z.ZodString;
50
- }, z.ZodUnknown, "strip">>, "many">>;
51
- }, z.ZodUnknown, "strip">, z.objectInputType<{
52
- status: z.ZodString;
53
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
- message: z.ZodString;
55
- }, "strip", z.ZodUnknown, z.objectOutputType<{
56
- message: z.ZodString;
57
- }, z.ZodUnknown, "strip">, z.objectInputType<{
58
- message: z.ZodString;
59
- }, z.ZodUnknown, "strip">>, "many">>;
60
- }, z.ZodUnknown, "strip">>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ message: string;
39
+ }, {
40
+ message: string;
41
+ }>, "many">>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ status: string;
44
+ validation_errors?: {
45
+ message: string;
46
+ }[] | undefined;
47
+ }, {
48
+ status: string;
49
+ validation_errors?: {
50
+ message: string;
51
+ }[] | undefined;
52
+ }>;
61
53
  verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
62
- }, "strip", z.ZodUnknown, z.objectOutputType<{
63
- id: z.ZodString;
64
- status: z.ZodString;
65
- ssl: z.ZodObject<{
66
- status: z.ZodString;
67
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
68
- message: z.ZodString;
69
- }, "strip", z.ZodUnknown, z.objectOutputType<{
70
- message: z.ZodString;
71
- }, z.ZodUnknown, "strip">, z.objectInputType<{
72
- message: z.ZodString;
73
- }, z.ZodUnknown, "strip">>, "many">>;
74
- }, "strip", z.ZodUnknown, z.objectOutputType<{
75
- status: z.ZodString;
76
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
77
- message: z.ZodString;
78
- }, "strip", z.ZodUnknown, z.objectOutputType<{
79
- message: z.ZodString;
80
- }, z.ZodUnknown, "strip">, z.objectInputType<{
81
- message: z.ZodString;
82
- }, z.ZodUnknown, "strip">>, "many">>;
83
- }, z.ZodUnknown, "strip">, z.objectInputType<{
84
- status: z.ZodString;
85
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
86
- message: z.ZodString;
87
- }, "strip", z.ZodUnknown, z.objectOutputType<{
88
- message: z.ZodString;
89
- }, z.ZodUnknown, "strip">, z.objectInputType<{
90
- message: z.ZodString;
91
- }, z.ZodUnknown, "strip">>, "many">>;
92
- }, z.ZodUnknown, "strip">>;
93
- verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
- }, z.ZodUnknown, "strip">, z.objectInputType<{
95
- id: z.ZodString;
96
- status: z.ZodString;
97
- ssl: z.ZodObject<{
98
- status: z.ZodString;
99
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
- message: z.ZodString;
101
- }, "strip", z.ZodUnknown, z.objectOutputType<{
102
- message: z.ZodString;
103
- }, z.ZodUnknown, "strip">, z.objectInputType<{
104
- message: z.ZodString;
105
- }, z.ZodUnknown, "strip">>, "many">>;
106
- }, "strip", z.ZodUnknown, z.objectOutputType<{
107
- status: z.ZodString;
108
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
- message: z.ZodString;
110
- }, "strip", z.ZodUnknown, z.objectOutputType<{
111
- message: z.ZodString;
112
- }, z.ZodUnknown, "strip">, z.objectInputType<{
113
- message: z.ZodString;
114
- }, z.ZodUnknown, "strip">>, "many">>;
115
- }, z.ZodUnknown, "strip">, z.objectInputType<{
116
- status: z.ZodString;
117
- validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
118
- message: z.ZodString;
119
- }, "strip", z.ZodUnknown, z.objectOutputType<{
120
- message: z.ZodString;
121
- }, z.ZodUnknown, "strip">, z.objectInputType<{
122
- message: z.ZodString;
123
- }, z.ZodUnknown, "strip">>, "many">>;
124
- }, z.ZodUnknown, "strip">>;
125
- verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
126
- }, z.ZodUnknown, "strip">>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ status: string;
56
+ id: string;
57
+ ssl: {
58
+ status: string;
59
+ validation_errors?: {
60
+ message: string;
61
+ }[] | undefined;
62
+ };
63
+ verification_errors?: string[] | undefined;
64
+ }, {
65
+ status: string;
66
+ id: string;
67
+ ssl: {
68
+ status: string;
69
+ validation_errors?: {
70
+ message: string;
71
+ }[] | undefined;
72
+ };
73
+ verification_errors?: string[] | undefined;
74
+ }>;
127
75
  export type CloudflareData = z.infer<typeof cloudflareDataGuard>;
128
76
  export declare enum DomainStatus {
129
77
  PendingVerification = "PendingVerification",