authhero 0.49.1 → 0.52.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.
@@ -2953,7 +2953,7 @@ export declare enum GrantType {
2953
2953
  Passwordless = "passwordless",
2954
2954
  Password = "password"
2955
2955
  }
2956
- declare const tokenResponseSchema: z.ZodObject<{
2956
+ export declare const tokenResponseSchema: z.ZodObject<{
2957
2957
  access_token: z.ZodString;
2958
2958
  id_token: z.ZodOptional<z.ZodString>;
2959
2959
  scope: z.ZodOptional<z.ZodString>;
@@ -4232,19 +4232,25 @@ export declare const emailProviderSchema: z.ZodObject<{
4232
4232
  }>;
4233
4233
  export type EmailProvider = z.infer<typeof emailProviderSchema>;
4234
4234
  export declare const refreshTokenInsertSchema: z.ZodObject<{
4235
- refresh_token: z.ZodString;
4235
+ token: z.ZodString;
4236
4236
  session_id: z.ZodString;
4237
+ scope: z.ZodString;
4238
+ audience: z.ZodString;
4237
4239
  expires_at: z.ZodString;
4238
4240
  used_at: z.ZodOptional<z.ZodString>;
4239
4241
  revoked_at: z.ZodOptional<z.ZodString>;
4240
4242
  }, "strip", z.ZodTypeAny, {
4241
- refresh_token: string;
4243
+ audience: string;
4244
+ token: string;
4245
+ scope: string;
4242
4246
  expires_at: string;
4243
4247
  session_id: string;
4244
4248
  used_at?: string | undefined;
4245
4249
  revoked_at?: string | undefined;
4246
4250
  }, {
4247
- refresh_token: string;
4251
+ audience: string;
4252
+ token: string;
4253
+ scope: string;
4248
4254
  expires_at: string;
4249
4255
  session_id: string;
4250
4256
  used_at?: string | undefined;
@@ -4252,22 +4258,28 @@ export declare const refreshTokenInsertSchema: z.ZodObject<{
4252
4258
  }>;
4253
4259
  export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
4254
4260
  export declare const refreshTokenSchema: z.ZodObject<{
4255
- refresh_token: z.ZodString;
4261
+ token: z.ZodString;
4256
4262
  session_id: z.ZodString;
4263
+ scope: z.ZodString;
4264
+ audience: z.ZodString;
4257
4265
  expires_at: z.ZodString;
4258
4266
  used_at: z.ZodOptional<z.ZodString>;
4259
4267
  revoked_at: z.ZodOptional<z.ZodString>;
4260
4268
  created_at: z.ZodString;
4261
4269
  }, "strip", z.ZodTypeAny, {
4262
4270
  created_at: string;
4263
- refresh_token: string;
4271
+ audience: string;
4272
+ token: string;
4273
+ scope: string;
4264
4274
  expires_at: string;
4265
4275
  session_id: string;
4266
4276
  used_at?: string | undefined;
4267
4277
  revoked_at?: string | undefined;
4268
4278
  }, {
4269
4279
  created_at: string;
4270
- refresh_token: string;
4280
+ audience: string;
4281
+ token: string;
4282
+ scope: string;
4271
4283
  expires_at: string;
4272
4284
  session_id: string;
4273
4285
  used_at?: string | undefined;
@@ -4411,6 +4423,16 @@ export interface EmailProvidersAdapter {
4411
4423
  create: (tenant_id: string, emailProvider: EmailProvider) => Promise<void>;
4412
4424
  get: (tenant_id: string) => Promise<EmailProvider | null>;
4413
4425
  }
4426
+ export interface ListRefreshTokenResponse extends Totals {
4427
+ refresh_tokens: RefreshToken[];
4428
+ }
4429
+ export interface RefreshTokensAdapter {
4430
+ create: (tenant_id: string, refresh_token: RefreshTokenInsert) => Promise<RefreshToken>;
4431
+ get: (tenant_id: string, id: string) => Promise<RefreshToken | null>;
4432
+ list(tenant_id: string, params?: ListParams): Promise<ListRefreshTokenResponse>;
4433
+ update: (tenant_id: string, id: string, refresh_token: Partial<RefreshToken>) => Promise<boolean>;
4434
+ remove: (tenant_id: string, id: string) => Promise<boolean>;
4435
+ }
4414
4436
  export interface DataAdapters {
4415
4437
  applications: ApplicationsAdapter;
4416
4438
  branding: BrandingAdapter;
@@ -4425,6 +4447,7 @@ export interface DataAdapters {
4425
4447
  logs: LogsDataAdapter;
4426
4448
  passwords: PasswordsAdapter;
4427
4449
  promptSettings: PromptSettingsAdapter;
4450
+ refreshTokens: RefreshTokensAdapter;
4428
4451
  sessions: SessionsAdapter;
4429
4452
  tenants: TenantsDataAdapter;
4430
4453
  themes: ThemesAdapter;
@@ -6520,6 +6543,8 @@ export declare function init(config: AuthHeroConfig): {
6520
6543
  token_type: string;
6521
6544
  expires_in: number;
6522
6545
  refresh_token?: string | undefined;
6546
+ state?: string | undefined;
6547
+ scope?: string | undefined;
6523
6548
  id_token?: string | undefined;
6524
6549
  };
6525
6550
  outputFormat: "json" | "text";