authhero 0.13.2 → 0.14.1

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.
@@ -2328,6 +2328,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2328
2328
  expires_at: z.ZodString;
2329
2329
  deleted_at: z.ZodOptional<z.ZodString>;
2330
2330
  ip: z.ZodOptional<z.ZodString>;
2331
+ useragent: z.ZodOptional<z.ZodString>;
2331
2332
  }, "strip", z.ZodTypeAny, {
2332
2333
  expires_at: string;
2333
2334
  authParams: {
@@ -2350,6 +2351,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2350
2351
  auth0Client?: string | undefined;
2351
2352
  deleted_at?: string | undefined;
2352
2353
  ip?: string | undefined;
2354
+ useragent?: string | undefined;
2353
2355
  }, {
2354
2356
  expires_at: string;
2355
2357
  authParams: {
@@ -2372,6 +2374,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2372
2374
  auth0Client?: string | undefined;
2373
2375
  deleted_at?: string | undefined;
2374
2376
  ip?: string | undefined;
2377
+ useragent?: string | undefined;
2375
2378
  }>;
2376
2379
  export type LoginInsert = z.infer<typeof loginInsertSchema>;
2377
2380
  export declare const loginSchema: z.ZodObject<{
@@ -2431,6 +2434,7 @@ export declare const loginSchema: z.ZodObject<{
2431
2434
  expires_at: z.ZodString;
2432
2435
  deleted_at: z.ZodOptional<z.ZodString>;
2433
2436
  ip: z.ZodOptional<z.ZodString>;
2437
+ useragent: z.ZodOptional<z.ZodString>;
2434
2438
  }, "strip", z.ZodTypeAny, {
2435
2439
  created_at: string;
2436
2440
  updated_at: string;
@@ -2456,6 +2460,7 @@ export declare const loginSchema: z.ZodObject<{
2456
2460
  auth0Client?: string | undefined;
2457
2461
  deleted_at?: string | undefined;
2458
2462
  ip?: string | undefined;
2463
+ useragent?: string | undefined;
2459
2464
  }, {
2460
2465
  created_at: string;
2461
2466
  updated_at: string;
@@ -2481,6 +2486,7 @@ export declare const loginSchema: z.ZodObject<{
2481
2486
  auth0Client?: string | undefined;
2482
2487
  deleted_at?: string | undefined;
2483
2488
  ip?: string | undefined;
2489
+ useragent?: string | undefined;
2484
2490
  }>;
2485
2491
  export type Login = z.infer<typeof loginSchema>;
2486
2492
  export declare enum LogTypes {
@@ -4191,23 +4197,122 @@ export declare const promptSettingSchema: z.ZodObject<{
4191
4197
  password_first?: boolean | undefined;
4192
4198
  }>;
4193
4199
  export type PromptSetting = z.infer<typeof promptSettingSchema>;
4194
- export interface Ticket {
4195
- id: string;
4196
- tenant_id: string;
4197
- client_id: string;
4198
- email: string;
4199
- authParams?: {
4200
- nonce?: string;
4201
- state?: string;
4202
- scope?: string;
4203
- response_type?: AuthorizationResponseType;
4204
- response_mode?: AuthorizationResponseMode;
4205
- redirect_uri?: string;
4200
+ export declare const emailProviderSchema: z.ZodObject<{
4201
+ name: z.ZodString;
4202
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4203
+ default_from_address: z.ZodOptional<z.ZodString>;
4204
+ credentials: z.ZodUnion<[
4205
+ z.ZodObject<{
4206
+ accessKeyId: z.ZodString;
4207
+ secretAccessKey: z.ZodString;
4208
+ region: z.ZodString;
4209
+ }, "strip", z.ZodTypeAny, {
4210
+ accessKeyId: string;
4211
+ secretAccessKey: string;
4212
+ region: string;
4213
+ }, {
4214
+ accessKeyId: string;
4215
+ secretAccessKey: string;
4216
+ region: string;
4217
+ }>,
4218
+ z.ZodObject<{
4219
+ smtp_host: z.ZodArray<z.ZodString, "many">;
4220
+ smtp_port: z.ZodNumber;
4221
+ smtp_user: z.ZodString;
4222
+ smtp_pass: z.ZodString;
4223
+ }, "strip", z.ZodTypeAny, {
4224
+ smtp_host: string[];
4225
+ smtp_port: number;
4226
+ smtp_user: string;
4227
+ smtp_pass: string;
4228
+ }, {
4229
+ smtp_host: string[];
4230
+ smtp_port: number;
4231
+ smtp_user: string;
4232
+ smtp_pass: string;
4233
+ }>,
4234
+ z.ZodObject<{
4235
+ api_key: z.ZodString;
4236
+ domain: z.ZodOptional<z.ZodString>;
4237
+ }, "strip", z.ZodTypeAny, {
4238
+ api_key: string;
4239
+ domain?: string | undefined;
4240
+ }, {
4241
+ api_key: string;
4242
+ domain?: string | undefined;
4243
+ }>,
4244
+ z.ZodObject<{
4245
+ connectionString: z.ZodString;
4246
+ }, "strip", z.ZodTypeAny, {
4247
+ connectionString: string;
4248
+ }, {
4249
+ connectionString: string;
4250
+ }>,
4251
+ z.ZodObject<{
4252
+ tenantId: z.ZodString;
4253
+ clientId: z.ZodString;
4254
+ clientSecret: z.ZodString;
4255
+ }, "strip", z.ZodTypeAny, {
4256
+ tenantId: string;
4257
+ clientId: string;
4258
+ clientSecret: string;
4259
+ }, {
4260
+ tenantId: string;
4261
+ clientId: string;
4262
+ clientSecret: string;
4263
+ }>
4264
+ ]>;
4265
+ settings: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
4266
+ }, "strip", z.ZodTypeAny, {
4267
+ name: string;
4268
+ enabled: boolean;
4269
+ credentials: {
4270
+ accessKeyId: string;
4271
+ secretAccessKey: string;
4272
+ region: string;
4273
+ } | {
4274
+ smtp_host: string[];
4275
+ smtp_port: number;
4276
+ smtp_user: string;
4277
+ smtp_pass: string;
4278
+ } | {
4279
+ api_key: string;
4280
+ domain?: string | undefined;
4281
+ } | {
4282
+ connectionString: string;
4283
+ } | {
4284
+ tenantId: string;
4285
+ clientId: string;
4286
+ clientSecret: string;
4206
4287
  };
4207
- created_at: Date;
4208
- expires_at: Date;
4209
- used_at?: Date;
4210
- }
4288
+ default_from_address?: string | undefined;
4289
+ settings?: {} | undefined;
4290
+ }, {
4291
+ name: string;
4292
+ credentials: {
4293
+ accessKeyId: string;
4294
+ secretAccessKey: string;
4295
+ region: string;
4296
+ } | {
4297
+ smtp_host: string[];
4298
+ smtp_port: number;
4299
+ smtp_user: string;
4300
+ smtp_pass: string;
4301
+ } | {
4302
+ api_key: string;
4303
+ domain?: string | undefined;
4304
+ } | {
4305
+ connectionString: string;
4306
+ } | {
4307
+ tenantId: string;
4308
+ clientId: string;
4309
+ clientSecret: string;
4310
+ };
4311
+ enabled?: boolean | undefined;
4312
+ default_from_address?: string | undefined;
4313
+ settings?: {} | undefined;
4314
+ }>;
4315
+ export type EmailProvider = z.infer<typeof emailProviderSchema>;
4211
4316
  export declare function parseUserId(user_id: string): {
4212
4317
  connection: string;
4213
4318
  id: string;
@@ -4265,11 +4370,6 @@ export interface TenantsDataAdapter {
4265
4370
  update(id: string, tenant: Partial<Tenant>): Promise<void>;
4266
4371
  remove(tenantId: string): Promise<boolean>;
4267
4372
  }
4268
- export interface TicketsAdapter {
4269
- create: (ticket: Ticket) => Promise<void>;
4270
- get: (tenant_id: string, id: string) => Promise<Ticket | null>;
4271
- remove: (tenant_id: string, id: string) => Promise<void>;
4272
- }
4273
4373
  export interface ListUsersResponse extends Totals {
4274
4374
  users: User[];
4275
4375
  }
@@ -4354,6 +4454,11 @@ export interface PromptSettingsAdapter {
4354
4454
  set: (tenant_id: string, promptSetting: Partial<PromptSetting>) => Promise<void>;
4355
4455
  get: (tenant_id: string) => Promise<PromptSetting>;
4356
4456
  }
4457
+ export interface EmailProvidersAdapter {
4458
+ update: (tenant_id: string, emailProvider: Partial<EmailProvider>) => Promise<void>;
4459
+ create: (tenant_id: string, emailProvider: EmailProvider) => Promise<void>;
4460
+ get: (tenant_id: string) => Promise<EmailProvider | null>;
4461
+ }
4357
4462
  export interface DataAdapters {
4358
4463
  applications: ApplicationsAdapter;
4359
4464
  branding: BrandingAdapter;
@@ -4361,6 +4466,7 @@ export interface DataAdapters {
4361
4466
  codes: CodesAdapter;
4362
4467
  connections: ConnectionsAdapter;
4363
4468
  domains: DomainsAdapter;
4469
+ emailProviders: EmailProvidersAdapter;
4364
4470
  hooks: HooksAdapter;
4365
4471
  keys: KeysAdapter;
4366
4472
  logins: LoginsAdapter;
@@ -4370,7 +4476,6 @@ export interface DataAdapters {
4370
4476
  sessions: SessionsAdapter;
4371
4477
  tenants: TenantsDataAdapter;
4372
4478
  themes: ThemesAdapter;
4373
- tickets: TicketsAdapter;
4374
4479
  users: UserDataAdapter;
4375
4480
  }
4376
4481
  export declare type Fetcher = {
@@ -5970,6 +6075,121 @@ export declare function init(config: AuthHeroConfig): {
5970
6075
  };
5971
6076
  };
5972
6077
  }, "/users"> & import("hono/types").MergeSchemaPath<{
6078
+ "/": {
6079
+ $get: {
6080
+ input: {
6081
+ header: {
6082
+ "tenant-id": string;
6083
+ };
6084
+ };
6085
+ output: {
6086
+ name: string;
6087
+ enabled: boolean;
6088
+ credentials: {
6089
+ accessKeyId: string;
6090
+ secretAccessKey: string;
6091
+ region: string;
6092
+ } | {
6093
+ smtp_host: string[];
6094
+ smtp_port: number;
6095
+ smtp_user: string;
6096
+ smtp_pass: string;
6097
+ } | {
6098
+ api_key: string;
6099
+ domain?: string | undefined;
6100
+ } | {
6101
+ connectionString: string;
6102
+ } | {
6103
+ tenantId: string;
6104
+ clientId: string;
6105
+ clientSecret: string;
6106
+ };
6107
+ default_from_address?: string | undefined;
6108
+ settings?: {} | undefined;
6109
+ };
6110
+ outputFormat: "json" | "text";
6111
+ status: 200;
6112
+ };
6113
+ };
6114
+ } & {
6115
+ "/": {
6116
+ $post: {
6117
+ input: {
6118
+ header: {
6119
+ "tenant-id": string;
6120
+ };
6121
+ } & {
6122
+ json: {
6123
+ name: string;
6124
+ credentials: {
6125
+ accessKeyId: string;
6126
+ secretAccessKey: string;
6127
+ region: string;
6128
+ } | {
6129
+ smtp_host: string[];
6130
+ smtp_port: number;
6131
+ smtp_user: string;
6132
+ smtp_pass: string;
6133
+ } | {
6134
+ api_key: string;
6135
+ domain?: string | undefined;
6136
+ } | {
6137
+ connectionString: string;
6138
+ } | {
6139
+ tenantId: string;
6140
+ clientId: string;
6141
+ clientSecret: string;
6142
+ };
6143
+ enabled?: boolean | undefined;
6144
+ default_from_address?: string | undefined;
6145
+ settings?: {} | undefined;
6146
+ };
6147
+ };
6148
+ output: {};
6149
+ outputFormat: string;
6150
+ status: 200;
6151
+ };
6152
+ };
6153
+ } & {
6154
+ "/": {
6155
+ $patch: {
6156
+ input: {
6157
+ header: {
6158
+ "tenant-id": string;
6159
+ };
6160
+ } & {
6161
+ json: {
6162
+ name?: string | undefined;
6163
+ enabled?: boolean | undefined;
6164
+ credentials?: {
6165
+ accessKeyId: string;
6166
+ secretAccessKey: string;
6167
+ region: string;
6168
+ } | {
6169
+ smtp_host: string[];
6170
+ smtp_port: number;
6171
+ smtp_user: string;
6172
+ smtp_pass: string;
6173
+ } | {
6174
+ api_key: string;
6175
+ domain?: string | undefined;
6176
+ } | {
6177
+ connectionString: string;
6178
+ } | {
6179
+ tenantId: string;
6180
+ clientId: string;
6181
+ clientSecret: string;
6182
+ } | undefined;
6183
+ default_from_address?: string | undefined;
6184
+ settings?: {} | undefined;
6185
+ };
6186
+ };
6187
+ output: {};
6188
+ outputFormat: string;
6189
+ status: 200;
6190
+ };
6191
+ };
6192
+ }, "/email/providers"> & import("hono/types").MergeSchemaPath<{
5973
6193
  "/": {
5974
6194
  $get: {
5975
6195
  input: {