@authhero/adapter-interfaces 4.3.0 → 4.5.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 +170 -6
- package/dist/adapter-interfaces.mjs +188 -157
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/adapters/ActionExecutions.d.ts +8 -0
- package/dist/types/adapters/ScimConfigurations.d.ts +7 -0
- package/dist/types/adapters/ScimExternalIds.d.ts +7 -0
- package/dist/types/adapters/ScimTokens.d.ts +9 -0
- package/dist/types/adapters/index.d.ts +16 -0
- package/dist/types/types/Connection.d.ts +4 -4
- package/dist/types/types/Forms.d.ts +48 -0
- package/dist/types/types/PromptSetting.d.ts +1 -0
- package/dist/types/types/ScimConfiguration.d.ts +30 -0
- package/dist/types/types/ScimExternalId.d.ts +21 -0
- package/dist/types/types/ScimToken.d.ts +19 -0
- package/dist/types/types/User.d.ts +3 -0
- package/dist/types/types/auth0/UserResponse.d.ts +1 -0
- package/dist/types/types/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -2,4 +2,12 @@ import { ActionExecution, ActionExecutionInsert } from "../types";
|
|
|
2
2
|
export interface ActionExecutionsAdapter {
|
|
3
3
|
create: (tenant_id: string, execution: ActionExecutionInsert) => Promise<ActionExecution>;
|
|
4
4
|
get: (tenant_id: string, execution_id: string) => Promise<ActionExecution | null>;
|
|
5
|
+
/**
|
|
6
|
+
* Delete executions created before `olderThan` (ISO-8601), across all
|
|
7
|
+
* tenants. Returns the number of rows deleted.
|
|
8
|
+
*
|
|
9
|
+
* Optional because some backends expire rows themselves (DynamoDB TTL,
|
|
10
|
+
* Analytics Engine dataset retention) and have nothing to sweep.
|
|
11
|
+
*/
|
|
12
|
+
cleanup?: (olderThan: string) => Promise<number>;
|
|
5
13
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ScimConfiguration, ScimConfigurationInsert } from "../types/ScimConfiguration";
|
|
2
|
+
export interface ScimConfigurationsAdapter {
|
|
3
|
+
create: (tenant_id: string, configuration: ScimConfigurationInsert) => Promise<ScimConfiguration>;
|
|
4
|
+
get: (tenant_id: string, connection_id: string) => Promise<ScimConfiguration | null>;
|
|
5
|
+
update: (tenant_id: string, connection_id: string, configuration: Partial<ScimConfigurationInsert>) => Promise<boolean>;
|
|
6
|
+
remove: (tenant_id: string, connection_id: string) => Promise<boolean>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ScimExternalId, ScimExternalIdInsert } from "../types/ScimExternalId";
|
|
2
|
+
export interface ScimExternalIdsAdapter {
|
|
3
|
+
create: (tenant_id: string, externalId: ScimExternalIdInsert) => Promise<ScimExternalId>;
|
|
4
|
+
getByExternalId: (tenant_id: string, connection_id: string, external_id: string) => Promise<ScimExternalId | null>;
|
|
5
|
+
getByUserId: (tenant_id: string, connection_id: string, user_id: string) => Promise<ScimExternalId | null>;
|
|
6
|
+
remove: (tenant_id: string, connection_id: string, user_id: string) => Promise<boolean>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScimToken, ScimTokenInsert } from "../types/ScimToken";
|
|
2
|
+
export interface ScimTokensAdapter {
|
|
3
|
+
create: (tenant_id: string, token: ScimTokenInsert) => Promise<ScimToken>;
|
|
4
|
+
get: (tenant_id: string, token_id: string) => Promise<ScimToken | null>;
|
|
5
|
+
getByHash: (tenant_id: string, token_hash: string) => Promise<ScimToken | null>;
|
|
6
|
+
listByConnection: (tenant_id: string, connection_id: string) => Promise<ScimToken[]>;
|
|
7
|
+
markUsed: (tenant_id: string, token_id: string, last_used_at: string) => Promise<boolean>;
|
|
8
|
+
remove: (tenant_id: string, token_id: string) => Promise<boolean>;
|
|
9
|
+
}
|
|
@@ -25,6 +25,9 @@ import { ThemesAdapter } from "./Themes";
|
|
|
25
25
|
import { LoginSessionsAdapter } from "./LoginSessions";
|
|
26
26
|
import { PromptSettingsAdapter } from "./PromptSettings";
|
|
27
27
|
import { ProxyRoutesAdapter } from "./ProxyRoutes";
|
|
28
|
+
import { ScimConfigurationsAdapter } from "./ScimConfigurations";
|
|
29
|
+
import { ScimTokensAdapter } from "./ScimTokens";
|
|
30
|
+
import { ScimExternalIdsAdapter } from "./ScimExternalIds";
|
|
28
31
|
import { EmailProvidersAdapter } from "./EmailProviders";
|
|
29
32
|
import { EmailTemplatesAdapter } from "./EmailTemplates";
|
|
30
33
|
import { RefreshTokensAdapter } from "./RefreshTokens";
|
|
@@ -102,6 +105,16 @@ export interface DataAdapters {
|
|
|
102
105
|
* directly from the database or by calling this management API.
|
|
103
106
|
*/
|
|
104
107
|
proxyRoutes?: ProxyRoutesAdapter;
|
|
108
|
+
/**
|
|
109
|
+
* Optional SCIM 2.0 inbound-provisioning adapters (issue #1191). When all
|
|
110
|
+
* three are set, AuthHero exposes the SCIM configuration management API and
|
|
111
|
+
* (Phase 2) the `/scim/v2` provisioning endpoints. `scimConfigurations`
|
|
112
|
+
* holds one config per connection, `scimTokens` the hashed bearer tokens,
|
|
113
|
+
* and `scimExternalIds` the IdP `externalId` → `user_id` lookup table.
|
|
114
|
+
*/
|
|
115
|
+
scimConfigurations?: ScimConfigurationsAdapter;
|
|
116
|
+
scimTokens?: ScimTokensAdapter;
|
|
117
|
+
scimExternalIds?: ScimExternalIdsAdapter;
|
|
105
118
|
refreshTokens: RefreshTokensAdapter;
|
|
106
119
|
resourceServers: ResourceServersAdapter;
|
|
107
120
|
rolePermissions: RolePermissionsAdapter;
|
|
@@ -260,6 +273,9 @@ export * from "./Logs";
|
|
|
260
273
|
export * from "./Passwords";
|
|
261
274
|
export * from "./PromptSettings";
|
|
262
275
|
export * from "./ProxyRoutes";
|
|
276
|
+
export * from "./ScimConfigurations";
|
|
277
|
+
export * from "./ScimTokens";
|
|
278
|
+
export * from "./ScimExternalIds";
|
|
263
279
|
export * from "./ResourceServers";
|
|
264
280
|
export * from "./Roles";
|
|
265
281
|
export * from "./Sessions";
|
|
@@ -298,8 +298,8 @@ export declare const connectionInsertSchema: z.ZodObject<{
|
|
|
298
298
|
}>>;
|
|
299
299
|
}, z.core.$strip>>>;
|
|
300
300
|
enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
301
|
-
response_type: z.ZodOptional<z.
|
|
302
|
-
response_mode: z.ZodOptional<z.
|
|
301
|
+
response_type: z.ZodOptional<z.ZodEnum<typeof AuthorizationResponseType>>;
|
|
302
|
+
response_mode: z.ZodOptional<z.ZodEnum<typeof AuthorizationResponseMode>>;
|
|
303
303
|
is_domain_connection: z.ZodOptional<z.ZodBoolean>;
|
|
304
304
|
show_as_button: z.ZodOptional<z.ZodBoolean>;
|
|
305
305
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -460,8 +460,8 @@ export declare const connectionSchema: z.ZodObject<{
|
|
|
460
460
|
}>>;
|
|
461
461
|
}, z.core.$strip>>>;
|
|
462
462
|
enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
463
|
-
response_type: z.ZodOptional<z.
|
|
464
|
-
response_mode: z.ZodOptional<z.
|
|
463
|
+
response_type: z.ZodOptional<z.ZodEnum<typeof AuthorizationResponseType>>;
|
|
464
|
+
response_mode: z.ZodOptional<z.ZodEnum<typeof AuthorizationResponseMode>>;
|
|
465
465
|
is_domain_connection: z.ZodOptional<z.ZodBoolean>;
|
|
466
466
|
show_as_button: z.ZodOptional<z.ZodBoolean>;
|
|
467
467
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -354,6 +354,8 @@ declare const emailField: z.ZodObject<{
|
|
|
354
354
|
config: z.ZodOptional<z.ZodObject<{
|
|
355
355
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
356
356
|
default_value: z.ZodOptional<z.ZodString>;
|
|
357
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
358
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
357
359
|
}, z.core.$strip>>;
|
|
358
360
|
}, z.core.$strip>;
|
|
359
361
|
declare const fileField: z.ZodObject<{
|
|
@@ -516,6 +518,8 @@ declare const socialField: z.ZodObject<{
|
|
|
516
518
|
display_name: z.ZodOptional<z.ZodString>;
|
|
517
519
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
518
520
|
href: z.ZodOptional<z.ZodString>;
|
|
521
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
522
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
519
523
|
}, z.core.$strip>>>;
|
|
520
524
|
}, z.core.$strip>>;
|
|
521
525
|
}, z.core.$strip>;
|
|
@@ -571,6 +575,8 @@ declare const textField: z.ZodObject<{
|
|
|
571
575
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
572
576
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
573
577
|
default_value: z.ZodOptional<z.ZodString>;
|
|
578
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
574
580
|
}, z.core.$strip>>;
|
|
575
581
|
}, z.core.$strip>;
|
|
576
582
|
declare const countryField: z.ZodObject<{
|
|
@@ -995,6 +1001,8 @@ export declare const fieldComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
995
1001
|
config: z.ZodOptional<z.ZodObject<{
|
|
996
1002
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
997
1003
|
default_value: z.ZodOptional<z.ZodString>;
|
|
1004
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
1005
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
998
1006
|
}, z.core.$strip>>;
|
|
999
1007
|
}, z.core.$strip>, z.ZodObject<{
|
|
1000
1008
|
id: z.ZodString;
|
|
@@ -1151,6 +1159,8 @@ export declare const fieldComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1151
1159
|
display_name: z.ZodOptional<z.ZodString>;
|
|
1152
1160
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
1153
1161
|
href: z.ZodOptional<z.ZodString>;
|
|
1162
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
1163
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
1154
1164
|
}, z.core.$strip>>>;
|
|
1155
1165
|
}, z.core.$strip>>;
|
|
1156
1166
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1204,6 +1214,8 @@ export declare const fieldComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1204
1214
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
1205
1215
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
1206
1216
|
default_value: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
1218
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
1207
1219
|
}, z.core.$strip>>;
|
|
1208
1220
|
}, z.core.$strip>, z.ZodObject<{
|
|
1209
1221
|
id: z.ZodString;
|
|
@@ -1594,6 +1606,8 @@ export declare const formNodeComponentDefinition: z.ZodUnion<readonly [z.ZodDisc
|
|
|
1594
1606
|
config: z.ZodOptional<z.ZodObject<{
|
|
1595
1607
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1596
1608
|
default_value: z.ZodOptional<z.ZodString>;
|
|
1609
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
1610
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
1597
1611
|
}, z.core.$strip>>;
|
|
1598
1612
|
}, z.core.$strip>, z.ZodObject<{
|
|
1599
1613
|
id: z.ZodString;
|
|
@@ -1750,6 +1764,8 @@ export declare const formNodeComponentDefinition: z.ZodUnion<readonly [z.ZodDisc
|
|
|
1750
1764
|
display_name: z.ZodOptional<z.ZodString>;
|
|
1751
1765
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
1752
1766
|
href: z.ZodOptional<z.ZodString>;
|
|
1767
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
1768
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
1753
1769
|
}, z.core.$strip>>>;
|
|
1754
1770
|
}, z.core.$strip>>;
|
|
1755
1771
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1803,6 +1819,8 @@ export declare const formNodeComponentDefinition: z.ZodUnion<readonly [z.ZodDisc
|
|
|
1803
1819
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
1804
1820
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
1805
1821
|
default_value: z.ZodOptional<z.ZodString>;
|
|
1822
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
1823
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
1806
1824
|
}, z.core.$strip>>;
|
|
1807
1825
|
}, z.core.$strip>, z.ZodObject<{
|
|
1808
1826
|
id: z.ZodString;
|
|
@@ -2284,6 +2302,8 @@ declare const stepNodeSchema: z.ZodObject<{
|
|
|
2284
2302
|
config: z.ZodOptional<z.ZodObject<{
|
|
2285
2303
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
2286
2304
|
default_value: z.ZodOptional<z.ZodString>;
|
|
2305
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
2306
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
2287
2307
|
}, z.core.$strip>>;
|
|
2288
2308
|
}, z.core.$strip>, z.ZodObject<{
|
|
2289
2309
|
id: z.ZodString;
|
|
@@ -2440,6 +2460,8 @@ declare const stepNodeSchema: z.ZodObject<{
|
|
|
2440
2460
|
display_name: z.ZodOptional<z.ZodString>;
|
|
2441
2461
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
2442
2462
|
href: z.ZodOptional<z.ZodString>;
|
|
2463
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
2464
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
2443
2465
|
}, z.core.$strip>>>;
|
|
2444
2466
|
}, z.core.$strip>>;
|
|
2445
2467
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2493,6 +2515,8 @@ declare const stepNodeSchema: z.ZodObject<{
|
|
|
2493
2515
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
2494
2516
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
2495
2517
|
default_value: z.ZodOptional<z.ZodString>;
|
|
2518
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
2519
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
2496
2520
|
}, z.core.$strip>>;
|
|
2497
2521
|
}, z.core.$strip>, z.ZodObject<{
|
|
2498
2522
|
id: z.ZodString;
|
|
@@ -2921,6 +2945,8 @@ export declare const formNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2921
2945
|
config: z.ZodOptional<z.ZodObject<{
|
|
2922
2946
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
2923
2947
|
default_value: z.ZodOptional<z.ZodString>;
|
|
2948
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
2949
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
2924
2950
|
}, z.core.$strip>>;
|
|
2925
2951
|
}, z.core.$strip>, z.ZodObject<{
|
|
2926
2952
|
id: z.ZodString;
|
|
@@ -3077,6 +3103,8 @@ export declare const formNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3077
3103
|
display_name: z.ZodOptional<z.ZodString>;
|
|
3078
3104
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
3079
3105
|
href: z.ZodOptional<z.ZodString>;
|
|
3106
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
3107
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
3080
3108
|
}, z.core.$strip>>>;
|
|
3081
3109
|
}, z.core.$strip>>;
|
|
3082
3110
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3130,6 +3158,8 @@ export declare const formNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3130
3158
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
3131
3159
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
3132
3160
|
default_value: z.ZodOptional<z.ZodString>;
|
|
3161
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
3162
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
3133
3163
|
}, z.core.$strip>>;
|
|
3134
3164
|
}, z.core.$strip>, z.ZodObject<{
|
|
3135
3165
|
id: z.ZodString;
|
|
@@ -3576,6 +3606,8 @@ export declare const formInsertSchema: z.ZodObject<{
|
|
|
3576
3606
|
config: z.ZodOptional<z.ZodObject<{
|
|
3577
3607
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
3578
3608
|
default_value: z.ZodOptional<z.ZodString>;
|
|
3609
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
3610
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
3579
3611
|
}, z.core.$strip>>;
|
|
3580
3612
|
}, z.core.$strip>, z.ZodObject<{
|
|
3581
3613
|
id: z.ZodString;
|
|
@@ -3732,6 +3764,8 @@ export declare const formInsertSchema: z.ZodObject<{
|
|
|
3732
3764
|
display_name: z.ZodOptional<z.ZodString>;
|
|
3733
3765
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
3734
3766
|
href: z.ZodOptional<z.ZodString>;
|
|
3767
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
3768
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
3735
3769
|
}, z.core.$strip>>>;
|
|
3736
3770
|
}, z.core.$strip>>;
|
|
3737
3771
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -3785,6 +3819,8 @@ export declare const formInsertSchema: z.ZodObject<{
|
|
|
3785
3819
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
3786
3820
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
3787
3821
|
default_value: z.ZodOptional<z.ZodString>;
|
|
3822
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
3823
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
3788
3824
|
}, z.core.$strip>>;
|
|
3789
3825
|
}, z.core.$strip>, z.ZodObject<{
|
|
3790
3826
|
id: z.ZodString;
|
|
@@ -4263,6 +4299,8 @@ export declare const formSchema: z.ZodObject<{
|
|
|
4263
4299
|
config: z.ZodOptional<z.ZodObject<{
|
|
4264
4300
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
4265
4301
|
default_value: z.ZodOptional<z.ZodString>;
|
|
4302
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
4303
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
4266
4304
|
}, z.core.$strip>>;
|
|
4267
4305
|
}, z.core.$strip>, z.ZodObject<{
|
|
4268
4306
|
id: z.ZodString;
|
|
@@ -4419,6 +4457,8 @@ export declare const formSchema: z.ZodObject<{
|
|
|
4419
4457
|
display_name: z.ZodOptional<z.ZodString>;
|
|
4420
4458
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
4421
4459
|
href: z.ZodOptional<z.ZodString>;
|
|
4460
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
4461
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
4422
4462
|
}, z.core.$strip>>>;
|
|
4423
4463
|
}, z.core.$strip>>;
|
|
4424
4464
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -4472,6 +4512,8 @@ export declare const formSchema: z.ZodObject<{
|
|
|
4472
4512
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
4473
4513
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
4474
4514
|
default_value: z.ZodOptional<z.ZodString>;
|
|
4515
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
4516
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
4475
4517
|
}, z.core.$strip>>;
|
|
4476
4518
|
}, z.core.$strip>, z.ZodObject<{
|
|
4477
4519
|
id: z.ZodString;
|
|
@@ -4941,6 +4983,8 @@ export declare const uiScreenSchema: z.ZodObject<{
|
|
|
4941
4983
|
config: z.ZodOptional<z.ZodObject<{
|
|
4942
4984
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
4943
4985
|
default_value: z.ZodOptional<z.ZodString>;
|
|
4986
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
4987
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
4944
4988
|
}, z.core.$strip>>;
|
|
4945
4989
|
}, z.core.$strip>, z.ZodObject<{
|
|
4946
4990
|
id: z.ZodString;
|
|
@@ -5097,6 +5141,8 @@ export declare const uiScreenSchema: z.ZodObject<{
|
|
|
5097
5141
|
display_name: z.ZodOptional<z.ZodString>;
|
|
5098
5142
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
5099
5143
|
href: z.ZodOptional<z.ZodString>;
|
|
5144
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
5145
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
5100
5146
|
}, z.core.$strip>>>;
|
|
5101
5147
|
}, z.core.$strip>>;
|
|
5102
5148
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -5150,6 +5196,8 @@ export declare const uiScreenSchema: z.ZodObject<{
|
|
|
5150
5196
|
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
5151
5197
|
max_length: z.ZodOptional<z.ZodNumber>;
|
|
5152
5198
|
default_value: z.ZodOptional<z.ZodString>;
|
|
5199
|
+
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
5200
|
+
last_used_label: z.ZodOptional<z.ZodString>;
|
|
5153
5201
|
}, z.core.$strip>>;
|
|
5154
5202
|
}, z.core.$strip>, z.ZodObject<{
|
|
5155
5203
|
id: z.ZodString;
|
|
@@ -6,6 +6,7 @@ export declare const promptSettingSchema: z.ZodObject<{
|
|
|
6
6
|
}>>;
|
|
7
7
|
identifier_first: z.ZodDefault<z.ZodBoolean>;
|
|
8
8
|
password_first: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
show_last_used_connection: z.ZodDefault<z.ZodBoolean>;
|
|
9
10
|
webauthn_platform_first_factor: z.ZodBoolean;
|
|
10
11
|
}, z.core.$strip>;
|
|
11
12
|
export type PromptSetting = z.infer<typeof promptSettingSchema>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
/**
|
|
3
|
+
* One attribute-mapping entry translating a SCIM resource attribute to an
|
|
4
|
+
* AuthHero user field. Mirrors Auth0's SCIM `mapping` shape (`{ scim, auth0 }`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const scimMappingEntrySchema: z.ZodObject<{
|
|
7
|
+
scim: z.ZodString;
|
|
8
|
+
auth0: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ScimMappingEntry = z.infer<typeof scimMappingEntrySchema>;
|
|
11
|
+
export declare const scimConfigurationInsertSchema: z.ZodObject<{
|
|
12
|
+
connection_id: z.ZodString;
|
|
13
|
+
user_id_attribute: z.ZodDefault<z.ZodString>;
|
|
14
|
+
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
15
|
+
scim: z.ZodString;
|
|
16
|
+
auth0: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type ScimConfigurationInsert = z.infer<typeof scimConfigurationInsertSchema>;
|
|
20
|
+
export declare const scimConfigurationSchema: z.ZodObject<{
|
|
21
|
+
created_at: z.ZodString;
|
|
22
|
+
updated_at: z.ZodString;
|
|
23
|
+
connection_id: z.ZodString;
|
|
24
|
+
user_id_attribute: z.ZodDefault<z.ZodString>;
|
|
25
|
+
mapping: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
26
|
+
scim: z.ZodString;
|
|
27
|
+
auth0: z.ZodString;
|
|
28
|
+
}, z.core.$strip>>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type ScimConfiguration = z.infer<typeof scimConfigurationSchema>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
/**
|
|
3
|
+
* Maps an IdP-assigned SCIM `externalId` to an AuthHero `user_id`, scoped to a
|
|
4
|
+
* connection. Kept out of the shared user schema so the (per-connection) SCIM
|
|
5
|
+
* concern stays isolated and a linked user can carry external ids from more
|
|
6
|
+
* than one SCIM connection. IdPs look users up by `externalId eq "…"` before
|
|
7
|
+
* creating, so this must be queryable by (connection_id, external_id).
|
|
8
|
+
*/
|
|
9
|
+
export declare const scimExternalIdInsertSchema: z.ZodObject<{
|
|
10
|
+
connection_id: z.ZodString;
|
|
11
|
+
external_id: z.ZodString;
|
|
12
|
+
user_id: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type ScimExternalIdInsert = z.infer<typeof scimExternalIdInsertSchema>;
|
|
15
|
+
export declare const scimExternalIdSchema: z.ZodObject<{
|
|
16
|
+
created_at: z.ZodString;
|
|
17
|
+
connection_id: z.ZodString;
|
|
18
|
+
external_id: z.ZodString;
|
|
19
|
+
user_id: z.ZodString;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type ScimExternalId = z.infer<typeof scimExternalIdSchema>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const scimTokenInsertSchema: z.ZodObject<{
|
|
3
|
+
token_id: z.ZodString;
|
|
4
|
+
connection_id: z.ZodString;
|
|
5
|
+
token_hash: z.ZodString;
|
|
6
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
7
|
+
valid_until: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type ScimTokenInsert = z.infer<typeof scimTokenInsertSchema>;
|
|
10
|
+
export declare const scimTokenSchema: z.ZodObject<{
|
|
11
|
+
created_at: z.ZodString;
|
|
12
|
+
last_used_at: z.ZodOptional<z.ZodString>;
|
|
13
|
+
token_id: z.ZodString;
|
|
14
|
+
connection_id: z.ZodString;
|
|
15
|
+
token_hash: z.ZodString;
|
|
16
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
17
|
+
valid_until: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type ScimToken = z.infer<typeof scimTokenSchema>;
|
|
@@ -79,6 +79,7 @@ export declare const userInsertSchema: z.ZodObject<{
|
|
|
79
79
|
provider: z.ZodOptional<z.ZodString>;
|
|
80
80
|
connection: z.ZodString;
|
|
81
81
|
is_social: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
blocked: z.ZodOptional<z.ZodBoolean>;
|
|
82
83
|
registration_completed_at: z.ZodOptional<z.ZodString>;
|
|
83
84
|
password: z.ZodOptional<z.ZodObject<{
|
|
84
85
|
hash: z.ZodString;
|
|
@@ -120,6 +121,7 @@ export declare const userSchema: z.ZodObject<{
|
|
|
120
121
|
verify_email: z.ZodOptional<z.ZodBoolean>;
|
|
121
122
|
last_ip: z.ZodOptional<z.ZodString>;
|
|
122
123
|
last_login: z.ZodOptional<z.ZodString>;
|
|
124
|
+
blocked: z.ZodOptional<z.ZodBoolean>;
|
|
123
125
|
registration_completed_at: z.ZodOptional<z.ZodString>;
|
|
124
126
|
created_at: z.ZodString;
|
|
125
127
|
updated_at: z.ZodString;
|
|
@@ -194,6 +196,7 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
|
|
|
194
196
|
last_ip: z.ZodOptional<z.ZodString>;
|
|
195
197
|
last_login: z.ZodOptional<z.ZodString>;
|
|
196
198
|
is_social: z.ZodBoolean;
|
|
199
|
+
blocked: z.ZodOptional<z.ZodBoolean>;
|
|
197
200
|
login_count: z.ZodDefault<z.ZodNumber>;
|
|
198
201
|
identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
202
|
connection: z.ZodString;
|
|
@@ -6,6 +6,7 @@ export interface PostUsersBody extends BaseUser {
|
|
|
6
6
|
username?: string;
|
|
7
7
|
connection?: string;
|
|
8
8
|
email_verified?: boolean;
|
|
9
|
+
blocked?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const userResponseSchema: z.ZodObject<{
|
|
11
12
|
email: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
@@ -37,6 +37,9 @@ export * from "./User";
|
|
|
37
37
|
export * from "./Theme";
|
|
38
38
|
export * from "./PromptSetting";
|
|
39
39
|
export * from "./ProxyRoute";
|
|
40
|
+
export * from "./ScimConfiguration";
|
|
41
|
+
export * from "./ScimToken";
|
|
42
|
+
export * from "./ScimExternalId";
|
|
40
43
|
export * from "./EmailProvider";
|
|
41
44
|
export * from "./EmailTemplate";
|
|
42
45
|
export * from "./RefreshTokens";
|