authhero 0.49.0 → 0.51.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.
@@ -2236,6 +2236,16 @@ export declare const openIDConfigurationSchema: z.ZodObject<{
2236
2236
  request_parameter_supported: boolean;
2237
2237
  token_endpoint_auth_signing_alg_values_supported: string[];
2238
2238
  }>;
2239
+ export interface ListParams {
2240
+ page: number;
2241
+ per_page: number;
2242
+ include_totals: boolean;
2243
+ q?: string;
2244
+ sort?: {
2245
+ sort_by: string;
2246
+ sort_order: "asc" | "desc";
2247
+ };
2248
+ }
2239
2249
  export declare const loginInsertSchema: z.ZodObject<{
2240
2250
  auth0Client: z.ZodOptional<z.ZodString>;
2241
2251
  authParams: z.ZodObject<{
@@ -4221,20 +4231,65 @@ export declare const emailProviderSchema: z.ZodObject<{
4221
4231
  settings?: {} | undefined;
4222
4232
  }>;
4223
4233
  export type EmailProvider = z.infer<typeof emailProviderSchema>;
4234
+ export declare const refreshTokenInsertSchema: z.ZodObject<{
4235
+ token: z.ZodString;
4236
+ session_id: z.ZodString;
4237
+ scope: z.ZodString;
4238
+ audience: z.ZodString;
4239
+ expires_at: z.ZodString;
4240
+ used_at: z.ZodOptional<z.ZodString>;
4241
+ revoked_at: z.ZodOptional<z.ZodString>;
4242
+ }, "strip", z.ZodTypeAny, {
4243
+ audience: string;
4244
+ token: string;
4245
+ scope: string;
4246
+ expires_at: string;
4247
+ session_id: string;
4248
+ used_at?: string | undefined;
4249
+ revoked_at?: string | undefined;
4250
+ }, {
4251
+ audience: string;
4252
+ token: string;
4253
+ scope: string;
4254
+ expires_at: string;
4255
+ session_id: string;
4256
+ used_at?: string | undefined;
4257
+ revoked_at?: string | undefined;
4258
+ }>;
4259
+ export type RefreshTokenInsert = z.infer<typeof refreshTokenInsertSchema>;
4260
+ export declare const refreshTokenSchema: z.ZodObject<{
4261
+ token: z.ZodString;
4262
+ session_id: z.ZodString;
4263
+ scope: z.ZodString;
4264
+ audience: z.ZodString;
4265
+ expires_at: z.ZodString;
4266
+ used_at: z.ZodOptional<z.ZodString>;
4267
+ revoked_at: z.ZodOptional<z.ZodString>;
4268
+ created_at: z.ZodString;
4269
+ }, "strip", z.ZodTypeAny, {
4270
+ created_at: string;
4271
+ audience: string;
4272
+ token: string;
4273
+ scope: string;
4274
+ expires_at: string;
4275
+ session_id: string;
4276
+ used_at?: string | undefined;
4277
+ revoked_at?: string | undefined;
4278
+ }, {
4279
+ created_at: string;
4280
+ audience: string;
4281
+ token: string;
4282
+ scope: string;
4283
+ expires_at: string;
4284
+ session_id: string;
4285
+ used_at?: string | undefined;
4286
+ revoked_at?: string | undefined;
4287
+ }>;
4288
+ export type RefreshToken = z.infer<typeof refreshTokenSchema>;
4224
4289
  export declare function parseUserId(user_id: string): {
4225
4290
  connection: string;
4226
4291
  id: string;
4227
4292
  };
4228
- export interface ListParams {
4229
- page: number;
4230
- per_page: number;
4231
- include_totals: boolean;
4232
- q?: string;
4233
- sort?: {
4234
- sort_by: string;
4235
- sort_order: "asc" | "desc";
4236
- };
4237
- }
4238
4293
  export interface ListCodesResponse extends Totals {
4239
4294
  codes: Code[];
4240
4295
  }
@@ -4368,6 +4423,16 @@ export interface EmailProvidersAdapter {
4368
4423
  create: (tenant_id: string, emailProvider: EmailProvider) => Promise<void>;
4369
4424
  get: (tenant_id: string) => Promise<EmailProvider | null>;
4370
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
+ }
4371
4436
  export interface DataAdapters {
4372
4437
  applications: ApplicationsAdapter;
4373
4438
  branding: BrandingAdapter;
@@ -4382,6 +4447,7 @@ export interface DataAdapters {
4382
4447
  logs: LogsDataAdapter;
4383
4448
  passwords: PasswordsAdapter;
4384
4449
  promptSettings: PromptSettingsAdapter;
4450
+ refreshTokens: RefreshTokensAdapter;
4385
4451
  sessions: SessionsAdapter;
4386
4452
  tenants: TenantsDataAdapter;
4387
4453
  themes: ThemesAdapter;