@authhero/adapter-interfaces 1.15.0 → 1.17.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.
@@ -268,6 +268,164 @@ export declare const actionSchema: z.ZodObject<{
268
268
  deployed_at?: string | undefined;
269
269
  }>;
270
270
  export type Action = z.infer<typeof actionSchema>;
271
+ export declare const actionVersionInsertSchema: z.ZodObject<{
272
+ action_id: z.ZodString;
273
+ code: z.ZodString;
274
+ runtime: z.ZodOptional<z.ZodString>;
275
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
276
+ name: z.ZodString;
277
+ version: z.ZodString;
278
+ }, "strip", z.ZodTypeAny, {
279
+ version: string;
280
+ name: string;
281
+ }, {
282
+ version: string;
283
+ name: string;
284
+ }>, "many">>;
285
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
+ name: z.ZodString;
287
+ value: z.ZodOptional<z.ZodString>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ name: string;
290
+ value?: string | undefined;
291
+ }, {
292
+ name: string;
293
+ value?: string | undefined;
294
+ }>, "many">>;
295
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
296
+ id: z.ZodString;
297
+ version: z.ZodOptional<z.ZodString>;
298
+ }, "strip", z.ZodTypeAny, {
299
+ id: string;
300
+ version?: string | undefined;
301
+ }, {
302
+ id: string;
303
+ version?: string | undefined;
304
+ }>, "many">>;
305
+ deployed: z.ZodDefault<z.ZodBoolean>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ code: string;
308
+ action_id: string;
309
+ deployed: boolean;
310
+ supported_triggers?: {
311
+ id: string;
312
+ version?: string | undefined;
313
+ }[] | undefined;
314
+ runtime?: string | undefined;
315
+ dependencies?: {
316
+ version: string;
317
+ name: string;
318
+ }[] | undefined;
319
+ secrets?: {
320
+ name: string;
321
+ value?: string | undefined;
322
+ }[] | undefined;
323
+ }, {
324
+ code: string;
325
+ action_id: string;
326
+ supported_triggers?: {
327
+ id: string;
328
+ version?: string | undefined;
329
+ }[] | undefined;
330
+ runtime?: string | undefined;
331
+ dependencies?: {
332
+ version: string;
333
+ name: string;
334
+ }[] | undefined;
335
+ secrets?: {
336
+ name: string;
337
+ value?: string | undefined;
338
+ }[] | undefined;
339
+ deployed?: boolean | undefined;
340
+ }>;
341
+ export type ActionVersionInsert = z.infer<typeof actionVersionInsertSchema>;
342
+ export declare const actionVersionSchema: z.ZodObject<{
343
+ action_id: z.ZodString;
344
+ code: z.ZodString;
345
+ runtime: z.ZodOptional<z.ZodString>;
346
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
347
+ name: z.ZodString;
348
+ version: z.ZodString;
349
+ }, "strip", z.ZodTypeAny, {
350
+ version: string;
351
+ name: string;
352
+ }, {
353
+ version: string;
354
+ name: string;
355
+ }>, "many">>;
356
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
357
+ name: z.ZodString;
358
+ value: z.ZodOptional<z.ZodString>;
359
+ }, "strip", z.ZodTypeAny, {
360
+ name: string;
361
+ value?: string | undefined;
362
+ }, {
363
+ name: string;
364
+ value?: string | undefined;
365
+ }>, "many">>;
366
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
367
+ id: z.ZodString;
368
+ version: z.ZodOptional<z.ZodString>;
369
+ }, "strip", z.ZodTypeAny, {
370
+ id: string;
371
+ version?: string | undefined;
372
+ }, {
373
+ id: string;
374
+ version?: string | undefined;
375
+ }>, "many">>;
376
+ deployed: z.ZodDefault<z.ZodBoolean>;
377
+ } & {
378
+ created_at: z.ZodString;
379
+ updated_at: z.ZodString;
380
+ id: z.ZodString;
381
+ tenant_id: z.ZodString;
382
+ number: z.ZodNumber;
383
+ }, "strip", z.ZodTypeAny, {
384
+ number: number;
385
+ created_at: string;
386
+ updated_at: string;
387
+ code: string;
388
+ id: string;
389
+ tenant_id: string;
390
+ action_id: string;
391
+ deployed: boolean;
392
+ supported_triggers?: {
393
+ id: string;
394
+ version?: string | undefined;
395
+ }[] | undefined;
396
+ runtime?: string | undefined;
397
+ dependencies?: {
398
+ version: string;
399
+ name: string;
400
+ }[] | undefined;
401
+ secrets?: {
402
+ name: string;
403
+ value?: string | undefined;
404
+ }[] | undefined;
405
+ }, {
406
+ number: number;
407
+ created_at: string;
408
+ updated_at: string;
409
+ code: string;
410
+ id: string;
411
+ tenant_id: string;
412
+ action_id: string;
413
+ supported_triggers?: {
414
+ id: string;
415
+ version?: string | undefined;
416
+ }[] | undefined;
417
+ runtime?: string | undefined;
418
+ dependencies?: {
419
+ version: string;
420
+ name: string;
421
+ }[] | undefined;
422
+ secrets?: {
423
+ name: string;
424
+ value?: string | undefined;
425
+ }[] | undefined;
426
+ deployed?: boolean | undefined;
427
+ }>;
428
+ export type ActionVersion = z.infer<typeof actionVersionSchema>;
271
429
  export declare const auditCategorySchema: z.ZodEnum<[
272
430
  "user_action",
273
431
  "admin_action",
@@ -11394,7 +11552,7 @@ export interface Auth0FlowInsert {
11394
11552
  export declare enum AuthorizationResponseType {
11395
11553
  TOKEN = "token",
11396
11554
  ID_TOKEN = "id_token",
11397
- TOKEN_ID_TOKEN = "token id_token",
11555
+ TOKEN_ID_TOKEN = "id_token token",
11398
11556
  CODE = "code"
11399
11557
  }
11400
11558
  export declare enum AuthorizationResponseMode {
@@ -43358,9 +43516,7 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
43358
43516
  issuer: z.ZodString;
43359
43517
  authorization_endpoint: z.ZodString;
43360
43518
  token_endpoint: z.ZodString;
43361
- device_authorization_endpoint: z.ZodString;
43362
43519
  userinfo_endpoint: z.ZodString;
43363
- mfa_challenge_endpoint: z.ZodString;
43364
43520
  jwks_uri: z.ZodString;
43365
43521
  registration_endpoint: z.ZodOptional<z.ZodString>;
43366
43522
  revocation_endpoint: z.ZodString;
@@ -43384,8 +43540,6 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
43384
43540
  userinfo_endpoint: string;
43385
43541
  jwks_uri: string;
43386
43542
  issuer: string;
43387
- device_authorization_endpoint: string;
43388
- mfa_challenge_endpoint: string;
43389
43543
  revocation_endpoint: string;
43390
43544
  scopes_supported: string[];
43391
43545
  response_types_supported: string[];
@@ -43408,8 +43562,6 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
43408
43562
  userinfo_endpoint: string;
43409
43563
  jwks_uri: string;
43410
43564
  issuer: string;
43411
- device_authorization_endpoint: string;
43412
- mfa_challenge_endpoint: string;
43413
43565
  revocation_endpoint: string;
43414
43566
  scopes_supported: string[];
43415
43567
  response_types_supported: string[];
@@ -45009,6 +45161,7 @@ export declare const sessionSchema: z.ZodObject<{
45009
45161
  export type Session = z.infer<typeof sessionSchema>;
45010
45162
  export declare const signingKeySchema: z.ZodObject<{
45011
45163
  kid: z.ZodString;
45164
+ tenant_id: z.ZodOptional<z.ZodString>;
45012
45165
  cert: z.ZodString;
45013
45166
  fingerprint: z.ZodString;
45014
45167
  thumbprint: z.ZodString;
@@ -45031,6 +45184,7 @@ export declare const signingKeySchema: z.ZodObject<{
45031
45184
  cert: string;
45032
45185
  fingerprint: string;
45033
45186
  thumbprint: string;
45187
+ tenant_id?: string | undefined;
45034
45188
  connection?: string | undefined;
45035
45189
  revoked_at?: string | undefined;
45036
45190
  pkcs7?: string | undefined;
@@ -45046,6 +45200,7 @@ export declare const signingKeySchema: z.ZodObject<{
45046
45200
  cert: string;
45047
45201
  fingerprint: string;
45048
45202
  thumbprint: string;
45203
+ tenant_id?: string | undefined;
45049
45204
  connection?: string | undefined;
45050
45205
  revoked_at?: string | undefined;
45051
45206
  pkcs7?: string | undefined;
@@ -48202,6 +48357,66 @@ export declare const emailProviderSchema: z.ZodObject<{
48202
48357
  settings?: {} | undefined;
48203
48358
  }>;
48204
48359
  export type EmailProvider = z.infer<typeof emailProviderSchema>;
48360
+ export declare const emailTemplateNameSchema: z.ZodEnum<[
48361
+ "verify_email",
48362
+ "verify_email_by_code",
48363
+ "reset_email",
48364
+ "reset_email_by_code",
48365
+ "welcome_email",
48366
+ "blocked_account",
48367
+ "stolen_credentials",
48368
+ "enrollment_email",
48369
+ "mfa_oob_code",
48370
+ "change_password",
48371
+ "password_reset",
48372
+ "user_invitation"
48373
+ ]>;
48374
+ export type EmailTemplateName = z.infer<typeof emailTemplateNameSchema>;
48375
+ export declare const emailTemplateSchema: z.ZodObject<{
48376
+ template: z.ZodEnum<[
48377
+ "verify_email",
48378
+ "verify_email_by_code",
48379
+ "reset_email",
48380
+ "reset_email_by_code",
48381
+ "welcome_email",
48382
+ "blocked_account",
48383
+ "stolen_credentials",
48384
+ "enrollment_email",
48385
+ "mfa_oob_code",
48386
+ "change_password",
48387
+ "password_reset",
48388
+ "user_invitation"
48389
+ ]>;
48390
+ body: z.ZodString;
48391
+ from: z.ZodString;
48392
+ subject: z.ZodString;
48393
+ syntax: z.ZodDefault<z.ZodLiteral<"liquid">>;
48394
+ resultUrl: z.ZodOptional<z.ZodString>;
48395
+ urlLifetimeInSeconds: z.ZodOptional<z.ZodNumber>;
48396
+ includeEmailInRedirect: z.ZodDefault<z.ZodBoolean>;
48397
+ enabled: z.ZodDefault<z.ZodBoolean>;
48398
+ }, "strip", z.ZodTypeAny, {
48399
+ body: string;
48400
+ from: string;
48401
+ enabled: boolean;
48402
+ template: "verify_email" | "password_reset" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "user_invitation";
48403
+ subject: string;
48404
+ syntax: "liquid";
48405
+ includeEmailInRedirect: boolean;
48406
+ resultUrl?: string | undefined;
48407
+ urlLifetimeInSeconds?: number | undefined;
48408
+ }, {
48409
+ body: string;
48410
+ from: string;
48411
+ template: "verify_email" | "password_reset" | "change_password" | "verify_email_by_code" | "reset_email" | "reset_email_by_code" | "welcome_email" | "blocked_account" | "stolen_credentials" | "enrollment_email" | "mfa_oob_code" | "user_invitation";
48412
+ subject: string;
48413
+ enabled?: boolean | undefined;
48414
+ syntax?: "liquid" | undefined;
48415
+ resultUrl?: string | undefined;
48416
+ urlLifetimeInSeconds?: number | undefined;
48417
+ includeEmailInRedirect?: boolean | undefined;
48418
+ }>;
48419
+ export type EmailTemplate = z.infer<typeof emailTemplateSchema>;
48205
48420
  export declare const refreshTokenInsertSchema: z.ZodObject<{
48206
48421
  id: z.ZodString;
48207
48422
  login_id: z.ZodString;
@@ -50459,6 +50674,24 @@ export interface ActionsAdapter {
50459
50674
  remove: (tenant_id: string, action_id: string) => Promise<boolean>;
50460
50675
  list: (tenant_id: string, params?: ListParams) => Promise<ListActionsResponse>;
50461
50676
  }
50677
+ export interface ListActionVersionsResponse extends Totals {
50678
+ versions: ActionVersion[];
50679
+ }
50680
+ export interface ActionVersionsAdapter {
50681
+ /**
50682
+ * Append a new version row for an action. The adapter assigns the next
50683
+ * sequential `number` per action_id and clears the `deployed` flag on any
50684
+ * prior versions when the new one is created with `deployed: true`.
50685
+ */
50686
+ create: (tenant_id: string, version: ActionVersionInsert) => Promise<ActionVersion>;
50687
+ get: (tenant_id: string, action_id: string, version_id: string) => Promise<ActionVersion | null>;
50688
+ list: (tenant_id: string, action_id: string, params?: ListParams) => Promise<ListActionVersionsResponse>;
50689
+ /**
50690
+ * Remove every version row for an action — used when the parent action is
50691
+ * deleted. Returns the number of rows removed.
50692
+ */
50693
+ removeForAction: (tenant_id: string, action_id: string) => Promise<number>;
50694
+ }
50462
50695
  export interface ListFlowsResponse extends Totals {
50463
50696
  flows: Flow[];
50464
50697
  }
@@ -50723,6 +50956,13 @@ export interface EmailProvidersAdapter {
50723
50956
  get: (tenant_id: string) => Promise<EmailProvider | null>;
50724
50957
  remove: (tenant_id: string) => Promise<void>;
50725
50958
  }
50959
+ export interface EmailTemplatesAdapter {
50960
+ get: (tenant_id: string, templateName: EmailTemplateName) => Promise<EmailTemplate | null>;
50961
+ list: (tenant_id: string) => Promise<EmailTemplate[]>;
50962
+ create: (tenant_id: string, template: EmailTemplate) => Promise<EmailTemplate>;
50963
+ update: (tenant_id: string, templateName: EmailTemplateName, template: Partial<EmailTemplate>) => Promise<boolean>;
50964
+ remove: (tenant_id: string, templateName: EmailTemplateName) => Promise<boolean>;
50965
+ }
50726
50966
  export interface ListRefreshTokenResponse extends Totals {
50727
50967
  refresh_tokens: RefreshToken[];
50728
50968
  }
@@ -51092,6 +51332,7 @@ export interface SessionCleanupParams {
51092
51332
  }
51093
51333
  export interface DataAdapters {
51094
51334
  actions: ActionsAdapter;
51335
+ actionVersions: ActionVersionsAdapter;
51095
51336
  branding: BrandingAdapter;
51096
51337
  cache?: CacheAdapter;
51097
51338
  clients: ClientsAdapter;
@@ -51102,6 +51343,7 @@ export interface DataAdapters {
51102
51343
  connections: ConnectionsAdapter;
51103
51344
  customDomains: CustomDomainsAdapter;
51104
51345
  emailProviders: EmailProvidersAdapter;
51346
+ emailTemplates: EmailTemplatesAdapter;
51105
51347
  flows: FlowsAdapter;
51106
51348
  forms: FormsAdapter;
51107
51349
  geo?: GeoAdapter;