@authhero/adapter-interfaces 4.20.0 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-interfaces.cjs +1 -1
- package/dist/adapter-interfaces.d.ts +404 -25
- package/dist/adapter-interfaces.mjs +514 -478
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/adapters/OrganizationConnections.d.ts +15 -0
- package/dist/types/adapters/Outbox.d.ts +5 -0
- package/dist/types/adapters/RefreshTokens.d.ts +1 -13
- package/dist/types/adapters/Tenants.d.ts +1 -0
- package/dist/types/adapters/UserPermissions.d.ts +14 -0
- package/dist/types/adapters/UserRoles.d.ts +14 -0
- package/dist/types/types/Action.d.ts +48 -4
- package/dist/types/types/AuditEvent.d.ts +59 -0
- package/dist/types/types/Branding.d.ts +11 -0
- package/dist/types/types/ConfigInheritance.d.ts +39 -0
- package/dist/types/types/Connection.d.ts +22 -0
- package/dist/types/types/EmailProvider.d.ts +11 -0
- package/dist/types/types/Hook.d.ts +110 -0
- package/dist/types/types/Logs.d.ts +3 -2
- package/dist/types/types/PromptSetting.d.ts +11 -0
- package/dist/types/types/ResourceServer.d.ts +36 -3
- package/dist/types/types/Tenant.d.ts +2 -0
- package/dist/types/types/User.d.ts +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { OrganizationConnection, OrganizationConnectionInsert } from "../types";
|
|
2
2
|
import { CreateOptions } from "../types/ImportMetadata";
|
|
3
|
+
import { ListParams } from "../types/ListParams";
|
|
4
|
+
export interface ListOrganizationConnectionsCheckpointResponse {
|
|
5
|
+
connections: OrganizationConnection[];
|
|
6
|
+
/** Opaque checkpoint cursor for the next page; absent on the last page. */
|
|
7
|
+
next?: string;
|
|
8
|
+
}
|
|
3
9
|
export interface OrganizationConnectionsAdapter {
|
|
4
10
|
create(tenant_id: string, organization_id: string, params: OrganizationConnectionInsert, options?: CreateOptions): Promise<OrganizationConnection>;
|
|
5
11
|
list(tenant_id: string, organization_id: string): Promise<OrganizationConnection[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Checkpoint (from/take) pagination over an organization's enabled
|
|
14
|
+
* connections, ordered by connection id ascending (unique per organization).
|
|
15
|
+
* Separate from `list` because that returns a bare array with nowhere to
|
|
16
|
+
* carry `next`. Optional so existing adapter implementations keep compiling;
|
|
17
|
+
* the management API answers checkpoint requests with 501 when it is
|
|
18
|
+
* missing.
|
|
19
|
+
*/
|
|
20
|
+
listCheckpoint?(tenant_id: string, organization_id: string, params?: ListParams): Promise<ListOrganizationConnectionsCheckpointResponse>;
|
|
6
21
|
get(tenant_id: string, organization_id: string, connection_id: string): Promise<OrganizationConnection | null>;
|
|
7
22
|
update(tenant_id: string, organization_id: string, connection_id: string, params: Partial<Omit<OrganizationConnectionInsert, "connection_id">>): Promise<OrganizationConnection | null>;
|
|
8
23
|
remove(tenant_id: string, organization_id: string, connection_id: string): Promise<boolean>;
|
|
@@ -21,6 +21,11 @@ export interface ListFailedEventsResponse {
|
|
|
21
21
|
start: number;
|
|
22
22
|
limit: number;
|
|
23
23
|
length: number;
|
|
24
|
+
/**
|
|
25
|
+
* Opaque keyset cursor for the next page. Set only when the caller paginated
|
|
26
|
+
* with from/take and more rows may follow.
|
|
27
|
+
*/
|
|
28
|
+
next?: string;
|
|
24
29
|
}
|
|
25
30
|
export interface OutboxAdapter {
|
|
26
31
|
/** Write an audit event to the outbox. Returns the event ID. */
|
|
@@ -16,18 +16,6 @@ export interface RefreshTokenListParams extends ListParams {
|
|
|
16
16
|
export interface ListRefreshTokenResponse extends Totals {
|
|
17
17
|
refresh_tokens: RefreshToken[];
|
|
18
18
|
}
|
|
19
|
-
export interface UpdateRefreshTokenOptions {
|
|
20
|
-
/**
|
|
21
|
-
* When provided, the adapter also extends the parent login_session's
|
|
22
|
-
* `expires_at` to `expires_at` (only if the current value is smaller).
|
|
23
|
-
* The caller is expected to compute the new expiry so the adapter can
|
|
24
|
-
* avoid a read-before-write and parallelise the two UPDATEs.
|
|
25
|
-
*/
|
|
26
|
-
loginSessionBump?: {
|
|
27
|
-
login_id: string;
|
|
28
|
-
expires_at: string;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
19
|
/**
|
|
32
20
|
* Update payload for a refresh token.
|
|
33
21
|
*
|
|
@@ -55,7 +43,7 @@ export interface RefreshTokensAdapter {
|
|
|
55
43
|
*/
|
|
56
44
|
getByLookup: (tenant_id: string, token_lookup: string) => Promise<RefreshToken | null>;
|
|
57
45
|
list(tenant_id: string, params?: RefreshTokenListParams): Promise<ListRefreshTokenResponse>;
|
|
58
|
-
update: (tenant_id: string, id: string, refresh_token: RefreshTokenUpdate
|
|
46
|
+
update: (tenant_id: string, id: string, refresh_token: RefreshTokenUpdate) => Promise<boolean>;
|
|
59
47
|
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
60
48
|
/**
|
|
61
49
|
* Soft-revoke every refresh token belonging to a user that isn't already
|
|
@@ -9,6 +9,7 @@ export interface CreateTenantParams {
|
|
|
9
9
|
id?: string;
|
|
10
10
|
session_lifetime?: number;
|
|
11
11
|
idle_session_lifetime?: number;
|
|
12
|
+
parent_tenant_id?: string | null;
|
|
12
13
|
deployment_type?: "shared" | "wfp";
|
|
13
14
|
provisioning_state?: "pending" | "ready" | "failed";
|
|
14
15
|
provisioning_error?: string;
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { ListParams } from "../types/ListParams";
|
|
2
2
|
import { UserPermissionInsert, UserPermissionWithDetailsList } from "../types";
|
|
3
3
|
import { CreateOptions } from "../types/ImportMetadata";
|
|
4
|
+
export interface ListUserPermissionsCheckpointResponse {
|
|
5
|
+
permissions: UserPermissionWithDetailsList;
|
|
6
|
+
/** Opaque checkpoint cursor for the next page; absent on the last page. */
|
|
7
|
+
next?: string;
|
|
8
|
+
}
|
|
4
9
|
export interface UserPermissionsAdapter {
|
|
5
10
|
create(tenant_id: string, user_id: string, permission: UserPermissionInsert, organization_id?: string, options?: CreateOptions): Promise<boolean>;
|
|
6
11
|
remove(tenant_id: string, user_id: string, permission: Pick<UserPermissionInsert, "resource_server_identifier" | "permission_name">, organization_id?: string): Promise<boolean>;
|
|
7
12
|
list(tenant_id: string, user_id: string, params?: ListParams, organization_id?: string): Promise<UserPermissionWithDetailsList>;
|
|
13
|
+
/**
|
|
14
|
+
* Checkpoint (from/take) pagination over a user's permissions, ordered by
|
|
15
|
+
* (resource_server_identifier, permission_name, organization_id) ascending —
|
|
16
|
+
* the composite key. Separate from `list` because that returns a bare array
|
|
17
|
+
* with nowhere to carry `next`. Optional so existing adapter implementations
|
|
18
|
+
* keep compiling; the management API answers checkpoint requests with 501
|
|
19
|
+
* when it is missing.
|
|
20
|
+
*/
|
|
21
|
+
listCheckpoint?(tenant_id: string, user_id: string, params?: ListParams, organization_id?: string): Promise<ListUserPermissionsCheckpointResponse>;
|
|
8
22
|
}
|
|
@@ -7,6 +7,11 @@ export interface ListUserRolesResponse {
|
|
|
7
7
|
limit: number;
|
|
8
8
|
length: number;
|
|
9
9
|
}
|
|
10
|
+
export interface ListUserRolesCheckpointResponse {
|
|
11
|
+
roles: Role[];
|
|
12
|
+
/** Opaque checkpoint cursor for the next page; absent on the last page. */
|
|
13
|
+
next?: string;
|
|
14
|
+
}
|
|
10
15
|
export interface ListRoleUsersResponse {
|
|
11
16
|
/** Distinct user ids holding the role, ordered by user_id ascending. */
|
|
12
17
|
userIds: string[];
|
|
@@ -35,6 +40,15 @@ export interface UserRolesAdapter {
|
|
|
35
40
|
* lookups (see #1198).
|
|
36
41
|
*/
|
|
37
42
|
list(tenantId: string, userId: string, params?: ListParams, organizationId?: string): Promise<Role[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Checkpoint (from/take) pagination over the roles assigned to a user,
|
|
45
|
+
* ordered by role id ascending. Roles are distinct: one held under several
|
|
46
|
+
* organization scopes appears once (unlike `list`, which returns one row per
|
|
47
|
+
* assignment). `organizationId` filters exactly as it does for `list`.
|
|
48
|
+
* Optional so existing adapter implementations keep compiling; the
|
|
49
|
+
* management API answers checkpoint requests with 501 when it is missing.
|
|
50
|
+
*/
|
|
51
|
+
listCheckpoint?(tenantId: string, userId: string, params?: ListParams, organizationId?: string): Promise<ListUserRolesCheckpointResponse>;
|
|
38
52
|
/**
|
|
39
53
|
* List the distinct users assigned to a role, across all organization
|
|
40
54
|
* scopes (a user holding the role in several organizations appears once).
|
|
@@ -12,6 +12,18 @@ export declare const actionSecretSchema: z.ZodObject<{
|
|
|
12
12
|
value: z.ZodOptional<z.ZodString>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
export declare const actionInsertSchema: z.ZodObject<{
|
|
15
|
+
inherit: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
local: "local";
|
|
18
|
+
shared: "shared";
|
|
19
|
+
platform: "platform";
|
|
20
|
+
}>>;
|
|
21
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
none: "none";
|
|
23
|
+
secrets: "secrets";
|
|
24
|
+
fields: "fields";
|
|
25
|
+
}>>;
|
|
26
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
15
27
|
name: z.ZodString;
|
|
16
28
|
code: z.ZodString;
|
|
17
29
|
supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -28,10 +40,21 @@ export declare const actionInsertSchema: z.ZodObject<{
|
|
|
28
40
|
value: z.ZodOptional<z.ZodString>;
|
|
29
41
|
}, z.core.$strip>>>;
|
|
30
42
|
is_system: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
-
inherit: z.ZodOptional<z.ZodBoolean>;
|
|
32
43
|
}, z.core.$strip>;
|
|
33
44
|
export type ActionInsert = z.infer<typeof actionInsertSchema>;
|
|
34
45
|
export declare const actionUpdateSchema: z.ZodObject<{
|
|
46
|
+
inherit: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
47
|
+
scope: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
local: "local";
|
|
49
|
+
shared: "shared";
|
|
50
|
+
platform: "platform";
|
|
51
|
+
}>>>;
|
|
52
|
+
override: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
none: "none";
|
|
54
|
+
secrets: "secrets";
|
|
55
|
+
fields: "fields";
|
|
56
|
+
}>>>;
|
|
57
|
+
enforce: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
35
58
|
name: z.ZodOptional<z.ZodString>;
|
|
36
59
|
code: z.ZodOptional<z.ZodString>;
|
|
37
60
|
supported_triggers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -48,7 +71,6 @@ export declare const actionUpdateSchema: z.ZodObject<{
|
|
|
48
71
|
value: z.ZodOptional<z.ZodString>;
|
|
49
72
|
}, z.core.$strip>>>>;
|
|
50
73
|
is_system: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
51
|
-
inherit: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
52
74
|
status: z.ZodOptional<z.ZodEnum<{
|
|
53
75
|
draft: "draft";
|
|
54
76
|
built: "built";
|
|
@@ -57,6 +79,18 @@ export declare const actionUpdateSchema: z.ZodObject<{
|
|
|
57
79
|
}, z.core.$strip>;
|
|
58
80
|
export type ActionUpdate = z.infer<typeof actionUpdateSchema>;
|
|
59
81
|
export declare const actionSchema: z.ZodObject<{
|
|
82
|
+
inherit: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
84
|
+
local: "local";
|
|
85
|
+
shared: "shared";
|
|
86
|
+
platform: "platform";
|
|
87
|
+
}>>;
|
|
88
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
none: "none";
|
|
90
|
+
secrets: "secrets";
|
|
91
|
+
fields: "fields";
|
|
92
|
+
}>>;
|
|
93
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
60
94
|
name: z.ZodString;
|
|
61
95
|
code: z.ZodString;
|
|
62
96
|
supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -69,7 +103,6 @@ export declare const actionSchema: z.ZodObject<{
|
|
|
69
103
|
version: z.ZodString;
|
|
70
104
|
}, z.core.$strip>>>;
|
|
71
105
|
is_system: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
-
inherit: z.ZodOptional<z.ZodBoolean>;
|
|
73
106
|
id: z.ZodString;
|
|
74
107
|
tenant_id: z.ZodString;
|
|
75
108
|
status: z.ZodDefault<z.ZodEnum<{
|
|
@@ -98,6 +131,18 @@ export declare const actionSecretNameSchema: z.ZodObject<{
|
|
|
98
131
|
* system enforce it rather than relying on every handler remembering.
|
|
99
132
|
*/
|
|
100
133
|
export declare const actionResponseSchema: z.ZodObject<{
|
|
134
|
+
inherit: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
136
|
+
local: "local";
|
|
137
|
+
shared: "shared";
|
|
138
|
+
platform: "platform";
|
|
139
|
+
}>>;
|
|
140
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
141
|
+
none: "none";
|
|
142
|
+
secrets: "secrets";
|
|
143
|
+
fields: "fields";
|
|
144
|
+
}>>;
|
|
145
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
101
146
|
name: z.ZodString;
|
|
102
147
|
code: z.ZodString;
|
|
103
148
|
supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -110,7 +155,6 @@ export declare const actionResponseSchema: z.ZodObject<{
|
|
|
110
155
|
version: z.ZodString;
|
|
111
156
|
}, z.core.$strip>>>;
|
|
112
157
|
is_system: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
inherit: z.ZodOptional<z.ZodBoolean>;
|
|
114
158
|
id: z.ZodString;
|
|
115
159
|
tenant_id: z.ZodString;
|
|
116
160
|
status: z.ZodDefault<z.ZodEnum<{
|
|
@@ -33,6 +33,25 @@ export declare const targetSchema: z.ZodObject<{
|
|
|
33
33
|
}, z.core.$strip>>>;
|
|
34
34
|
}, z.core.$strip>;
|
|
35
35
|
export type Target = z.infer<typeof targetSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* The authenticated caller of a bearer-token request, mirroring Auth0's
|
|
38
|
+
* `details.request.auth` on `sapi` logs. `user` is set when the token was
|
|
39
|
+
* issued to a user and omitted for client-credentials tokens. Absent on
|
|
40
|
+
* requests that carry no bearer token, such as login flows.
|
|
41
|
+
*/
|
|
42
|
+
export declare const requestAuthSchema: z.ZodObject<{
|
|
43
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
user_id: z.ZodString;
|
|
45
|
+
name: z.ZodOptional<z.ZodString>;
|
|
46
|
+
email: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
strategy: z.ZodString;
|
|
49
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
jti: z.ZodOptional<z.ZodString>;
|
|
51
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type RequestAuth = z.infer<typeof requestAuthSchema>;
|
|
36
55
|
export declare const requestContextSchema: z.ZodObject<{
|
|
37
56
|
method: z.ZodString;
|
|
38
57
|
path: z.ZodString;
|
|
@@ -43,6 +62,18 @@ export declare const requestContextSchema: z.ZodObject<{
|
|
|
43
62
|
correlation_id: z.ZodOptional<z.ZodString>;
|
|
44
63
|
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
45
64
|
authorization_url: z.ZodOptional<z.ZodString>;
|
|
65
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
user_id: z.ZodString;
|
|
68
|
+
name: z.ZodOptional<z.ZodString>;
|
|
69
|
+
email: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
strategy: z.ZodString;
|
|
72
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
73
|
+
jti: z.ZodOptional<z.ZodString>;
|
|
74
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
46
77
|
}, z.core.$strip>;
|
|
47
78
|
export type RequestContext = z.infer<typeof requestContextSchema>;
|
|
48
79
|
export declare const responseContextSchema: z.ZodObject<{
|
|
@@ -109,6 +140,18 @@ export declare const auditEventInsertSchema: z.ZodObject<{
|
|
|
109
140
|
correlation_id: z.ZodOptional<z.ZodString>;
|
|
110
141
|
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
111
142
|
authorization_url: z.ZodOptional<z.ZodString>;
|
|
143
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
user_id: z.ZodString;
|
|
146
|
+
name: z.ZodOptional<z.ZodString>;
|
|
147
|
+
email: z.ZodOptional<z.ZodString>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
strategy: z.ZodString;
|
|
150
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
jti: z.ZodOptional<z.ZodString>;
|
|
152
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
}, z.core.$strip>>;
|
|
112
155
|
}, z.core.$strip>;
|
|
113
156
|
response: z.ZodOptional<z.ZodObject<{
|
|
114
157
|
status_code: z.ZodNumber;
|
|
@@ -137,6 +180,8 @@ export declare const auditEventInsertSchema: z.ZodObject<{
|
|
|
137
180
|
hostname: z.ZodString;
|
|
138
181
|
is_mobile: z.ZodOptional<z.ZodBoolean>;
|
|
139
182
|
execution_id: z.ZodOptional<z.ZodString>;
|
|
183
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
184
|
+
login_session_id: z.ZodOptional<z.ZodString>;
|
|
140
185
|
timestamp: z.ZodString;
|
|
141
186
|
}, z.core.$strip>;
|
|
142
187
|
export type AuditEventInsert = z.infer<typeof auditEventInsertSchema>;
|
|
@@ -186,6 +231,18 @@ export declare const auditEventSchema: z.ZodObject<{
|
|
|
186
231
|
correlation_id: z.ZodOptional<z.ZodString>;
|
|
187
232
|
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
188
233
|
authorization_url: z.ZodOptional<z.ZodString>;
|
|
234
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
user_id: z.ZodString;
|
|
237
|
+
name: z.ZodOptional<z.ZodString>;
|
|
238
|
+
email: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
strategy: z.ZodString;
|
|
241
|
+
credentials: z.ZodOptional<z.ZodObject<{
|
|
242
|
+
jti: z.ZodOptional<z.ZodString>;
|
|
243
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
}, z.core.$strip>>;
|
|
189
246
|
}, z.core.$strip>;
|
|
190
247
|
response: z.ZodOptional<z.ZodObject<{
|
|
191
248
|
status_code: z.ZodNumber;
|
|
@@ -214,6 +271,8 @@ export declare const auditEventSchema: z.ZodObject<{
|
|
|
214
271
|
hostname: z.ZodString;
|
|
215
272
|
is_mobile: z.ZodOptional<z.ZodBoolean>;
|
|
216
273
|
execution_id: z.ZodOptional<z.ZodString>;
|
|
274
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
275
|
+
login_session_id: z.ZodOptional<z.ZodString>;
|
|
217
276
|
timestamp: z.ZodString;
|
|
218
277
|
id: z.ZodString;
|
|
219
278
|
}, z.core.$strip>;
|
|
@@ -20,5 +20,16 @@ export declare const brandingSchema: z.ZodObject<{
|
|
|
20
20
|
light: "light";
|
|
21
21
|
auto: "auto";
|
|
22
22
|
}>>;
|
|
23
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
local: "local";
|
|
25
|
+
shared: "shared";
|
|
26
|
+
platform: "platform";
|
|
27
|
+
}>>;
|
|
28
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
none: "none";
|
|
30
|
+
secrets: "secrets";
|
|
31
|
+
fields: "fields";
|
|
32
|
+
}>>;
|
|
33
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
23
34
|
}, z.core.$strip>;
|
|
24
35
|
export type Branding = z.infer<typeof brandingSchema>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
/**
|
|
3
|
+
* Publishing properties for tenant config inheritance
|
|
4
|
+
* (docs/design/tenant-config-inheritance.md, section 3.2).
|
|
5
|
+
*
|
|
6
|
+
* Unset (null/undefined) reads as `scope: "local"`, `override: "none"`,
|
|
7
|
+
* `enforce: false`, which is today's behaviour.
|
|
8
|
+
*/
|
|
9
|
+
export declare const configScopeSchema: z.ZodEnum<{
|
|
10
|
+
local: "local";
|
|
11
|
+
shared: "shared";
|
|
12
|
+
platform: "platform";
|
|
13
|
+
}>;
|
|
14
|
+
export type ConfigScope = z.infer<typeof configScopeSchema>;
|
|
15
|
+
export declare const configOverrideSchema: z.ZodEnum<{
|
|
16
|
+
none: "none";
|
|
17
|
+
secrets: "secrets";
|
|
18
|
+
fields: "fields";
|
|
19
|
+
}>;
|
|
20
|
+
export type ConfigOverride = z.infer<typeof configOverrideSchema>;
|
|
21
|
+
export declare const configInheritanceShape: {
|
|
22
|
+
/**
|
|
23
|
+
* `local`: not published. `shared`: visible to child tenants, who may copy
|
|
24
|
+
* or override it. `platform`: hidden from and locked for children, run only.
|
|
25
|
+
*/
|
|
26
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
local: "local";
|
|
28
|
+
shared: "shared";
|
|
29
|
+
platform: "platform";
|
|
30
|
+
}>>;
|
|
31
|
+
/** What a child may change on a `shared` row. */
|
|
32
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
none: "none";
|
|
34
|
+
secrets: "secrets";
|
|
35
|
+
fields: "fields";
|
|
36
|
+
}>>;
|
|
37
|
+
/** A child cannot disable or delete the row. */
|
|
38
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
};
|
|
@@ -151,6 +151,17 @@ export declare const connectionOptionsSchema: z.ZodObject<{
|
|
|
151
151
|
}>>;
|
|
152
152
|
}, z.core.$strip>;
|
|
153
153
|
export declare const connectionInsertSchema: z.ZodObject<{
|
|
154
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
local: "local";
|
|
156
|
+
shared: "shared";
|
|
157
|
+
platform: "platform";
|
|
158
|
+
}>>;
|
|
159
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
none: "none";
|
|
161
|
+
secrets: "secrets";
|
|
162
|
+
fields: "fields";
|
|
163
|
+
}>>;
|
|
164
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
154
165
|
id: z.ZodOptional<z.ZodString>;
|
|
155
166
|
name: z.ZodString;
|
|
156
167
|
display_name: z.ZodOptional<z.ZodString>;
|
|
@@ -317,6 +328,17 @@ export type ConnectionInsert = z.infer<typeof connectionInsertSchema>;
|
|
|
317
328
|
export declare const connectionSchema: z.ZodObject<{
|
|
318
329
|
created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
319
330
|
updated_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
331
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
332
|
+
local: "local";
|
|
333
|
+
shared: "shared";
|
|
334
|
+
platform: "platform";
|
|
335
|
+
}>>;
|
|
336
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
337
|
+
none: "none";
|
|
338
|
+
secrets: "secrets";
|
|
339
|
+
fields: "fields";
|
|
340
|
+
}>>;
|
|
341
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
320
342
|
id: z.ZodOptional<z.ZodString>;
|
|
321
343
|
name: z.ZodString;
|
|
322
344
|
display_name: z.ZodOptional<z.ZodString>;
|
|
@@ -5,5 +5,16 @@ export declare const emailProviderSchema: z.ZodObject<{
|
|
|
5
5
|
default_from_address: z.ZodOptional<z.ZodString>;
|
|
6
6
|
credentials: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
7
7
|
settings: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
8
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
local: "local";
|
|
10
|
+
shared: "shared";
|
|
11
|
+
platform: "platform";
|
|
12
|
+
}>>;
|
|
13
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
none: "none";
|
|
15
|
+
secrets: "secrets";
|
|
16
|
+
fields: "fields";
|
|
17
|
+
}>>;
|
|
18
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
8
19
|
}, z.core.$strip>;
|
|
9
20
|
export type EmailProvider = z.infer<typeof emailProviderSchema>;
|
|
@@ -48,6 +48,17 @@ export declare const hookInsertSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
48
48
|
"post-user-deletion": "post-user-deletion";
|
|
49
49
|
}>;
|
|
50
50
|
url: z.ZodString;
|
|
51
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
local: "local";
|
|
53
|
+
shared: "shared";
|
|
54
|
+
platform: "platform";
|
|
55
|
+
}>>;
|
|
56
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
none: "none";
|
|
58
|
+
secrets: "secrets";
|
|
59
|
+
fields: "fields";
|
|
60
|
+
}>>;
|
|
61
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
51
62
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
52
63
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
53
64
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -58,6 +69,17 @@ export declare const hookInsertSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
58
69
|
"post-user-login": "post-user-login";
|
|
59
70
|
}>;
|
|
60
71
|
form_id: z.ZodString;
|
|
72
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
local: "local";
|
|
74
|
+
shared: "shared";
|
|
75
|
+
platform: "platform";
|
|
76
|
+
}>>;
|
|
77
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
none: "none";
|
|
79
|
+
secrets: "secrets";
|
|
80
|
+
fields: "fields";
|
|
81
|
+
}>>;
|
|
82
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
61
83
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
62
84
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
63
85
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -75,6 +97,17 @@ export declare const hookInsertSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
75
97
|
"set-preferred-username": "set-preferred-username";
|
|
76
98
|
"account-linking": "account-linking";
|
|
77
99
|
}>;
|
|
100
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
local: "local";
|
|
102
|
+
shared: "shared";
|
|
103
|
+
platform: "platform";
|
|
104
|
+
}>>;
|
|
105
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
none: "none";
|
|
107
|
+
secrets: "secrets";
|
|
108
|
+
fields: "fields";
|
|
109
|
+
}>>;
|
|
110
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
78
111
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
79
112
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
80
113
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -88,6 +121,17 @@ export declare const hookInsertSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
88
121
|
"credentials-exchange": "credentials-exchange";
|
|
89
122
|
}>;
|
|
90
123
|
code_id: z.ZodString;
|
|
124
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
local: "local";
|
|
126
|
+
shared: "shared";
|
|
127
|
+
platform: "platform";
|
|
128
|
+
}>>;
|
|
129
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
130
|
+
none: "none";
|
|
131
|
+
secrets: "secrets";
|
|
132
|
+
fields: "fields";
|
|
133
|
+
}>>;
|
|
134
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
91
135
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
92
136
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
93
137
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -101,6 +145,17 @@ export declare const hookInsertSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
101
145
|
impersonate: "impersonate";
|
|
102
146
|
}>;
|
|
103
147
|
permission_required: z.ZodOptional<z.ZodString>;
|
|
148
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
local: "local";
|
|
150
|
+
shared: "shared";
|
|
151
|
+
platform: "platform";
|
|
152
|
+
}>>;
|
|
153
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
154
|
+
none: "none";
|
|
155
|
+
secrets: "secrets";
|
|
156
|
+
fields: "fields";
|
|
157
|
+
}>>;
|
|
158
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
104
159
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
105
160
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
106
161
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -118,6 +173,17 @@ export declare const hookSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
118
173
|
"pre-user-deletion": "pre-user-deletion";
|
|
119
174
|
"post-user-deletion": "post-user-deletion";
|
|
120
175
|
}>;
|
|
176
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
local: "local";
|
|
178
|
+
shared: "shared";
|
|
179
|
+
platform: "platform";
|
|
180
|
+
}>>;
|
|
181
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
none: "none";
|
|
183
|
+
secrets: "secrets";
|
|
184
|
+
fields: "fields";
|
|
185
|
+
}>>;
|
|
186
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
121
187
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
122
188
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
123
189
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -130,6 +196,17 @@ export declare const hookSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
130
196
|
trigger_id: z.ZodEnum<{
|
|
131
197
|
"post-user-login": "post-user-login";
|
|
132
198
|
}>;
|
|
199
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
local: "local";
|
|
201
|
+
shared: "shared";
|
|
202
|
+
platform: "platform";
|
|
203
|
+
}>>;
|
|
204
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
none: "none";
|
|
206
|
+
secrets: "secrets";
|
|
207
|
+
fields: "fields";
|
|
208
|
+
}>>;
|
|
209
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
133
210
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
134
211
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
135
212
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -145,6 +222,17 @@ export declare const hookSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
145
222
|
"post-user-update": "post-user-update";
|
|
146
223
|
"credentials-exchange": "credentials-exchange";
|
|
147
224
|
}>;
|
|
225
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
226
|
+
local: "local";
|
|
227
|
+
shared: "shared";
|
|
228
|
+
platform: "platform";
|
|
229
|
+
}>>;
|
|
230
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
none: "none";
|
|
232
|
+
secrets: "secrets";
|
|
233
|
+
fields: "fields";
|
|
234
|
+
}>>;
|
|
235
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
148
236
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
149
237
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
150
238
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -164,6 +252,17 @@ export declare const hookSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
164
252
|
"post-user-login": "post-user-login";
|
|
165
253
|
"credentials-exchange": "credentials-exchange";
|
|
166
254
|
}>;
|
|
255
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
256
|
+
local: "local";
|
|
257
|
+
shared: "shared";
|
|
258
|
+
platform: "platform";
|
|
259
|
+
}>>;
|
|
260
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
261
|
+
none: "none";
|
|
262
|
+
secrets: "secrets";
|
|
263
|
+
fields: "fields";
|
|
264
|
+
}>>;
|
|
265
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
167
266
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
168
267
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
169
268
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
@@ -176,6 +275,17 @@ export declare const hookSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
176
275
|
trigger_id: z.ZodEnum<{
|
|
177
276
|
"post-user-login": "post-user-login";
|
|
178
277
|
}>;
|
|
278
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
279
|
+
local: "local";
|
|
280
|
+
shared: "shared";
|
|
281
|
+
platform: "platform";
|
|
282
|
+
}>>;
|
|
283
|
+
override: z.ZodOptional<z.ZodEnum<{
|
|
284
|
+
none: "none";
|
|
285
|
+
secrets: "secrets";
|
|
286
|
+
fields: "fields";
|
|
287
|
+
}>>;
|
|
288
|
+
enforce: z.ZodOptional<z.ZodBoolean>;
|
|
179
289
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
180
290
|
synchronous: z.ZodDefault<z.ZodBoolean>;
|
|
181
291
|
priority: z.ZodOptional<z.ZodNumber>;
|