@authhero/adapter-interfaces 1.4.0 → 1.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 +141 -7
- package/dist/adapter-interfaces.mjs +438 -425
- package/package.json +1 -1
|
@@ -100,6 +100,84 @@ export declare const actionInsertSchema: z.ZodObject<{
|
|
|
100
100
|
}[] | undefined;
|
|
101
101
|
}>;
|
|
102
102
|
export type ActionInsert = z.infer<typeof actionInsertSchema>;
|
|
103
|
+
export declare const actionUpdateSchema: z.ZodObject<{
|
|
104
|
+
name: z.ZodOptional<z.ZodString>;
|
|
105
|
+
code: z.ZodOptional<z.ZodString>;
|
|
106
|
+
supported_triggers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
version: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
id: string;
|
|
111
|
+
version?: string | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
id: string;
|
|
114
|
+
version?: string | undefined;
|
|
115
|
+
}>, "many">>>;
|
|
116
|
+
runtime: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
117
|
+
dependencies: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
version: z.ZodString;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
version: string;
|
|
122
|
+
name: string;
|
|
123
|
+
}, {
|
|
124
|
+
version: string;
|
|
125
|
+
name: string;
|
|
126
|
+
}>, "many">>>;
|
|
127
|
+
secrets: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
value: z.ZodString;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
value: string;
|
|
132
|
+
name: string;
|
|
133
|
+
}, {
|
|
134
|
+
value: string;
|
|
135
|
+
name: string;
|
|
136
|
+
}>, "many">>>;
|
|
137
|
+
} & {
|
|
138
|
+
status: z.ZodOptional<z.ZodEnum<[
|
|
139
|
+
"draft",
|
|
140
|
+
"built"
|
|
141
|
+
]>>;
|
|
142
|
+
deployed_at: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
code?: string | undefined;
|
|
145
|
+
status?: "draft" | "built" | undefined;
|
|
146
|
+
name?: string | undefined;
|
|
147
|
+
supported_triggers?: {
|
|
148
|
+
id: string;
|
|
149
|
+
version?: string | undefined;
|
|
150
|
+
}[] | undefined;
|
|
151
|
+
runtime?: string | undefined;
|
|
152
|
+
dependencies?: {
|
|
153
|
+
version: string;
|
|
154
|
+
name: string;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
secrets?: {
|
|
157
|
+
value: string;
|
|
158
|
+
name: string;
|
|
159
|
+
}[] | undefined;
|
|
160
|
+
deployed_at?: string | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
code?: string | undefined;
|
|
163
|
+
status?: "draft" | "built" | undefined;
|
|
164
|
+
name?: string | undefined;
|
|
165
|
+
supported_triggers?: {
|
|
166
|
+
id: string;
|
|
167
|
+
version?: string | undefined;
|
|
168
|
+
}[] | undefined;
|
|
169
|
+
runtime?: string | undefined;
|
|
170
|
+
dependencies?: {
|
|
171
|
+
version: string;
|
|
172
|
+
name: string;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
secrets?: {
|
|
175
|
+
value: string;
|
|
176
|
+
name: string;
|
|
177
|
+
}[] | undefined;
|
|
178
|
+
deployed_at?: string | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
export type ActionUpdate = z.infer<typeof actionUpdateSchema>;
|
|
103
181
|
export declare const actionSchema: z.ZodObject<{
|
|
104
182
|
name: z.ZodString;
|
|
105
183
|
code: z.ZodString;
|
|
@@ -2474,7 +2552,7 @@ export declare const userSchema: z.ZodObject<{
|
|
|
2474
2552
|
}[] | undefined;
|
|
2475
2553
|
}>;
|
|
2476
2554
|
export type User = z.infer<typeof userSchema>;
|
|
2477
|
-
export declare const auth0UserResponseSchema: z.ZodObject<{
|
|
2555
|
+
export declare const auth0UserResponseSchema: z.ZodObject<Omit<{
|
|
2478
2556
|
user_id: z.ZodString;
|
|
2479
2557
|
provider: z.ZodString;
|
|
2480
2558
|
is_social: z.ZodBoolean;
|
|
@@ -2618,7 +2696,7 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
|
|
|
2618
2696
|
last_ip: z.ZodOptional<z.ZodString>;
|
|
2619
2697
|
last_login: z.ZodOptional<z.ZodString>;
|
|
2620
2698
|
registration_completed_at: z.ZodOptional<z.ZodString>;
|
|
2621
|
-
}, "strip", z.ZodTypeAny, {
|
|
2699
|
+
}, "registration_completed_at">, "strip", z.ZodTypeAny, {
|
|
2622
2700
|
created_at: string;
|
|
2623
2701
|
updated_at: string;
|
|
2624
2702
|
connection: string;
|
|
@@ -2659,7 +2737,6 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
|
|
|
2659
2737
|
verify_email?: boolean | undefined;
|
|
2660
2738
|
last_ip?: string | undefined;
|
|
2661
2739
|
last_login?: string | undefined;
|
|
2662
|
-
registration_completed_at?: string | undefined;
|
|
2663
2740
|
identities?: {
|
|
2664
2741
|
connection: string;
|
|
2665
2742
|
user_id: string;
|
|
@@ -2724,7 +2801,6 @@ export declare const auth0UserResponseSchema: z.ZodObject<{
|
|
|
2724
2801
|
verify_email?: boolean | undefined;
|
|
2725
2802
|
last_ip?: string | undefined;
|
|
2726
2803
|
last_login?: string | undefined;
|
|
2727
|
-
registration_completed_at?: string | undefined;
|
|
2728
2804
|
login_count?: number | undefined;
|
|
2729
2805
|
identities?: {
|
|
2730
2806
|
connection: string;
|
|
@@ -42927,6 +43003,22 @@ export declare enum LoginSessionState {
|
|
|
42927
43003
|
export declare const loginSessionStateSchema: z.ZodNativeEnum<typeof LoginSessionState>;
|
|
42928
43004
|
/** Continuation scope - which pages/actions are allowed during continuation */
|
|
42929
43005
|
export type ContinuationScope = "change-email" | "account" | "custom";
|
|
43006
|
+
/**
|
|
43007
|
+
* Strategy metadata persisted alongside the authenticated user so that
|
|
43008
|
+
* `/authorize/resume` can re-hydrate everything `createFrontChannelAuthResponse`
|
|
43009
|
+
* needs without the sub-flow having to keep that context in memory.
|
|
43010
|
+
*/
|
|
43011
|
+
export declare const loginSessionAuthStrategySchema: z.ZodObject<{
|
|
43012
|
+
strategy: z.ZodString;
|
|
43013
|
+
strategy_type: z.ZodString;
|
|
43014
|
+
}, "strip", z.ZodTypeAny, {
|
|
43015
|
+
strategy: string;
|
|
43016
|
+
strategy_type: string;
|
|
43017
|
+
}, {
|
|
43018
|
+
strategy: string;
|
|
43019
|
+
strategy_type: string;
|
|
43020
|
+
}>;
|
|
43021
|
+
export type LoginSessionAuthStrategy = z.infer<typeof loginSessionAuthStrategySchema>;
|
|
42930
43022
|
export declare const loginSessionInsertSchema: z.ZodObject<{
|
|
42931
43023
|
csrf_token: z.ZodString;
|
|
42932
43024
|
auth0Client: z.ZodOptional<z.ZodString>;
|
|
@@ -42999,6 +43091,17 @@ export declare const loginSessionInsertSchema: z.ZodObject<{
|
|
|
42999
43091
|
failure_reason: z.ZodOptional<z.ZodString>;
|
|
43000
43092
|
user_id: z.ZodOptional<z.ZodString>;
|
|
43001
43093
|
auth_connection: z.ZodOptional<z.ZodString>;
|
|
43094
|
+
auth_strategy: z.ZodOptional<z.ZodObject<{
|
|
43095
|
+
strategy: z.ZodString;
|
|
43096
|
+
strategy_type: z.ZodString;
|
|
43097
|
+
}, "strip", z.ZodTypeAny, {
|
|
43098
|
+
strategy: string;
|
|
43099
|
+
strategy_type: string;
|
|
43100
|
+
}, {
|
|
43101
|
+
strategy: string;
|
|
43102
|
+
strategy_type: string;
|
|
43103
|
+
}>>;
|
|
43104
|
+
authenticated_at: z.ZodOptional<z.ZodString>;
|
|
43002
43105
|
}, "strip", z.ZodTypeAny, {
|
|
43003
43106
|
state: LoginSessionState;
|
|
43004
43107
|
expires_at: string;
|
|
@@ -43033,6 +43136,11 @@ export declare const loginSessionInsertSchema: z.ZodObject<{
|
|
|
43033
43136
|
state_data?: string | undefined;
|
|
43034
43137
|
failure_reason?: string | undefined;
|
|
43035
43138
|
auth_connection?: string | undefined;
|
|
43139
|
+
auth_strategy?: {
|
|
43140
|
+
strategy: string;
|
|
43141
|
+
strategy_type: string;
|
|
43142
|
+
} | undefined;
|
|
43143
|
+
authenticated_at?: string | undefined;
|
|
43036
43144
|
}, {
|
|
43037
43145
|
expires_at: string;
|
|
43038
43146
|
csrf_token: string;
|
|
@@ -43067,6 +43175,11 @@ export declare const loginSessionInsertSchema: z.ZodObject<{
|
|
|
43067
43175
|
state_data?: string | undefined;
|
|
43068
43176
|
failure_reason?: string | undefined;
|
|
43069
43177
|
auth_connection?: string | undefined;
|
|
43178
|
+
auth_strategy?: {
|
|
43179
|
+
strategy: string;
|
|
43180
|
+
strategy_type: string;
|
|
43181
|
+
} | undefined;
|
|
43182
|
+
authenticated_at?: string | undefined;
|
|
43070
43183
|
}>;
|
|
43071
43184
|
export type LoginSessionInsert = z.input<typeof loginSessionInsertSchema>;
|
|
43072
43185
|
export declare const loginSessionSchema: z.ZodObject<{
|
|
@@ -43144,6 +43257,17 @@ export declare const loginSessionSchema: z.ZodObject<{
|
|
|
43144
43257
|
failure_reason: z.ZodOptional<z.ZodString>;
|
|
43145
43258
|
user_id: z.ZodOptional<z.ZodString>;
|
|
43146
43259
|
auth_connection: z.ZodOptional<z.ZodString>;
|
|
43260
|
+
auth_strategy: z.ZodOptional<z.ZodObject<{
|
|
43261
|
+
strategy: z.ZodString;
|
|
43262
|
+
strategy_type: z.ZodString;
|
|
43263
|
+
}, "strip", z.ZodTypeAny, {
|
|
43264
|
+
strategy: string;
|
|
43265
|
+
strategy_type: string;
|
|
43266
|
+
}, {
|
|
43267
|
+
strategy: string;
|
|
43268
|
+
strategy_type: string;
|
|
43269
|
+
}>>;
|
|
43270
|
+
authenticated_at: z.ZodOptional<z.ZodString>;
|
|
43147
43271
|
}, "strip", z.ZodTypeAny, {
|
|
43148
43272
|
created_at: string;
|
|
43149
43273
|
updated_at: string;
|
|
@@ -43181,6 +43305,11 @@ export declare const loginSessionSchema: z.ZodObject<{
|
|
|
43181
43305
|
state_data?: string | undefined;
|
|
43182
43306
|
failure_reason?: string | undefined;
|
|
43183
43307
|
auth_connection?: string | undefined;
|
|
43308
|
+
auth_strategy?: {
|
|
43309
|
+
strategy: string;
|
|
43310
|
+
strategy_type: string;
|
|
43311
|
+
} | undefined;
|
|
43312
|
+
authenticated_at?: string | undefined;
|
|
43184
43313
|
}, {
|
|
43185
43314
|
created_at: string;
|
|
43186
43315
|
updated_at: string;
|
|
@@ -43218,6 +43347,11 @@ export declare const loginSessionSchema: z.ZodObject<{
|
|
|
43218
43347
|
state_data?: string | undefined;
|
|
43219
43348
|
failure_reason?: string | undefined;
|
|
43220
43349
|
auth_connection?: string | undefined;
|
|
43350
|
+
auth_strategy?: {
|
|
43351
|
+
strategy: string;
|
|
43352
|
+
strategy_type: string;
|
|
43353
|
+
} | undefined;
|
|
43354
|
+
authenticated_at?: string | undefined;
|
|
43221
43355
|
}>;
|
|
43222
43356
|
export type LoginSession = z.infer<typeof loginSessionSchema>;
|
|
43223
43357
|
export declare const LogTypes: {
|
|
@@ -43855,6 +43989,7 @@ export declare const sessionSchema: z.ZodObject<{
|
|
|
43855
43989
|
updated_at: string;
|
|
43856
43990
|
id: string;
|
|
43857
43991
|
user_id: string;
|
|
43992
|
+
authenticated_at: string;
|
|
43858
43993
|
login_session_id: string;
|
|
43859
43994
|
device: {
|
|
43860
43995
|
last_ip: string;
|
|
@@ -43865,7 +44000,6 @@ export declare const sessionSchema: z.ZodObject<{
|
|
|
43865
44000
|
last_asn: string;
|
|
43866
44001
|
};
|
|
43867
44002
|
clients: string[];
|
|
43868
|
-
authenticated_at: string;
|
|
43869
44003
|
last_interaction_at: string;
|
|
43870
44004
|
expires_at?: string | undefined;
|
|
43871
44005
|
used_at?: string | undefined;
|
|
@@ -43876,6 +44010,7 @@ export declare const sessionSchema: z.ZodObject<{
|
|
|
43876
44010
|
updated_at: string;
|
|
43877
44011
|
id: string;
|
|
43878
44012
|
user_id: string;
|
|
44013
|
+
authenticated_at: string;
|
|
43879
44014
|
login_session_id: string;
|
|
43880
44015
|
device: {
|
|
43881
44016
|
last_ip: string;
|
|
@@ -43886,7 +44021,6 @@ export declare const sessionSchema: z.ZodObject<{
|
|
|
43886
44021
|
last_asn: string;
|
|
43887
44022
|
};
|
|
43888
44023
|
clients: string[];
|
|
43889
|
-
authenticated_at: string;
|
|
43890
44024
|
last_interaction_at: string;
|
|
43891
44025
|
expires_at?: string | undefined;
|
|
43892
44026
|
used_at?: string | undefined;
|
|
@@ -48607,7 +48741,7 @@ export interface ListActionsResponse extends Totals {
|
|
|
48607
48741
|
export interface ActionsAdapter {
|
|
48608
48742
|
create: (tenant_id: string, action: ActionInsert) => Promise<Action>;
|
|
48609
48743
|
get: (tenant_id: string, action_id: string) => Promise<Action | null>;
|
|
48610
|
-
update: (tenant_id: string, action_id: string, action:
|
|
48744
|
+
update: (tenant_id: string, action_id: string, action: ActionUpdate) => Promise<boolean>;
|
|
48611
48745
|
remove: (tenant_id: string, action_id: string) => Promise<boolean>;
|
|
48612
48746
|
list: (tenant_id: string, params?: ListParams) => Promise<ListActionsResponse>;
|
|
48613
48747
|
}
|