authhero 0.33.0 → 0.35.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.
@@ -1,6 +1,7 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
3
  import { OpenAPIHono, z } from '@hono/zod-openapi';
4
+ import { Context } from 'hono';
4
5
 
5
6
  export type Variables = {
6
7
  tenant_id: string;
@@ -4416,6 +4417,27 @@ export type SendEmailParams = {
4416
4417
  };
4417
4418
  export type SendEmailResponse = {};
4418
4419
  export type EmailService = (param: SendEmailParams) => Promise<SendEmailResponse>;
4420
+ export type UserInfo = {
4421
+ sub: string;
4422
+ email?: string;
4423
+ given_name?: string;
4424
+ family_name?: string;
4425
+ name?: string;
4426
+ };
4427
+ export type Strategy = {
4428
+ getRedirect: (ctx: Context<{
4429
+ Bindings: Bindings;
4430
+ Variables: Variables;
4431
+ }>, connection: Connection) => Promise<{
4432
+ redirectUrl: string;
4433
+ code: string;
4434
+ codeVerifier?: string;
4435
+ }>;
4436
+ validateAuthorizationCodeAndGetUser: (ctx: Context<{
4437
+ Bindings: Bindings;
4438
+ Variables: Variables;
4439
+ }>, connection: Connection, code: string, codeVerifier?: string) => Promise<UserInfo>;
4440
+ };
4419
4441
  export declare type Fetcher = {
4420
4442
  fetch: typeof fetch;
4421
4443
  };
@@ -4434,6 +4456,9 @@ export type Bindings = {
4434
4456
  };
4435
4457
  DEFAULT_TENANT_ID?: string;
4436
4458
  DEFAULT_CLIENT_ID?: string;
4459
+ STRATEGIES?: {
4460
+ [strategy: string]: Strategy;
4461
+ };
4437
4462
  JWKS_CACHE_TIMEOUT_IN_SECONDS: number;
4438
4463
  ORGANIZATION_NAME: string;
4439
4464
  };
@@ -4531,9 +4556,9 @@ export declare function init(config: AuthHeroConfig): {
4531
4556
  response_mode?: AuthorizationResponseMode | undefined;
4532
4557
  enabled_clients?: string[] | undefined;
4533
4558
  }[] | {
4559
+ length: number;
4534
4560
  start: number;
4535
4561
  limit: number;
4536
- length: number;
4537
4562
  connections: {
4538
4563
  created_at: string;
4539
4564
  updated_at: string;
@@ -4635,6 +4660,7 @@ export declare function init(config: AuthHeroConfig): {
4635
4660
  };
4636
4661
  } & {
4637
4662
  json: {
4663
+ name?: string | undefined;
4638
4664
  options?: {
4639
4665
  issuer?: string | undefined;
4640
4666
  client_secret?: string | undefined;
@@ -4650,11 +4676,10 @@ export declare function init(config: AuthHeroConfig): {
4650
4676
  jwks_uri?: string | undefined;
4651
4677
  discovery_url?: string | undefined;
4652
4678
  } | undefined;
4653
- name?: string | undefined;
4679
+ response_mode?: AuthorizationResponseMode | undefined;
4654
4680
  id?: string | undefined;
4655
4681
  strategy?: string | undefined;
4656
4682
  response_type?: AuthorizationResponseType | undefined;
4657
- response_mode?: AuthorizationResponseMode | undefined;
4658
4683
  enabled_clients?: string[] | undefined;
4659
4684
  };
4660
4685
  };
@@ -4713,9 +4738,9 @@ export declare function init(config: AuthHeroConfig): {
4713
4738
  jwks_uri?: string | undefined;
4714
4739
  discovery_url?: string | undefined;
4715
4740
  } | undefined;
4741
+ response_mode?: AuthorizationResponseMode | undefined;
4716
4742
  id?: string | undefined;
4717
4743
  response_type?: AuthorizationResponseType | undefined;
4718
- response_mode?: AuthorizationResponseMode | undefined;
4719
4744
  enabled_clients?: string[] | undefined;
4720
4745
  };
4721
4746
  };
@@ -4774,9 +4799,9 @@ export declare function init(config: AuthHeroConfig): {
4774
4799
  synchronous: boolean;
4775
4800
  priority?: number | undefined;
4776
4801
  }[] | {
4802
+ length: number;
4777
4803
  start: number;
4778
4804
  limit: number;
4779
- length: number;
4780
4805
  hooks: {
4781
4806
  created_at: string;
4782
4807
  updated_at: string;
@@ -4970,9 +4995,9 @@ export declare function init(config: AuthHeroConfig): {
4970
4995
  } | undefined;
4971
4996
  } | undefined;
4972
4997
  }[] | {
4998
+ length: number;
4973
4999
  start: number;
4974
5000
  limit: number;
4975
- length: number;
4976
5001
  logs: {
4977
5002
  type: "fsa" | "fs" | "f" | "fp" | "fcp" | "fc" | "fu" | "fh" | "fcoa" | "sapi" | "scp" | "scpr" | "scu" | "scoa" | "seacft" | "serft" | "s" | "slo" | "ss" | "ssa" | "sv" | "svr" | "cls";
4978
5003
  date: string;
@@ -5193,9 +5218,9 @@ export declare function init(config: AuthHeroConfig): {
5193
5218
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
5194
5219
  client_secret?: string | undefined;
5195
5220
  }[] | {
5221
+ length: number;
5196
5222
  start: number;
5197
5223
  limit: number;
5198
- length: number;
5199
5224
  clients: {
5200
5225
  created_at: string;
5201
5226
  updated_at: string;
@@ -5320,6 +5345,7 @@ export declare function init(config: AuthHeroConfig): {
5320
5345
  } & {
5321
5346
  json: {
5322
5347
  name?: string | undefined;
5348
+ client_secret?: string | undefined;
5323
5349
  callbacks?: string[] | undefined;
5324
5350
  id?: string | undefined;
5325
5351
  disable_sign_ups?: boolean | undefined;
@@ -5348,7 +5374,6 @@ export declare function init(config: AuthHeroConfig): {
5348
5374
  } | undefined;
5349
5375
  } | undefined;
5350
5376
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
5351
- client_secret?: string | undefined;
5352
5377
  };
5353
5378
  };
5354
5379
  output: {
@@ -5402,6 +5427,7 @@ export declare function init(config: AuthHeroConfig): {
5402
5427
  json: {
5403
5428
  name: string;
5404
5429
  id: string;
5430
+ client_secret?: string | undefined;
5405
5431
  callbacks?: string[] | undefined;
5406
5432
  disable_sign_ups?: boolean | undefined;
5407
5433
  allowed_origins?: string[] | undefined;
@@ -5429,7 +5455,6 @@ export declare function init(config: AuthHeroConfig): {
5429
5455
  } | undefined;
5430
5456
  } | undefined;
5431
5457
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
5432
- client_secret?: string | undefined;
5433
5458
  };
5434
5459
  };
5435
5460
  output: {
@@ -5438,6 +5463,7 @@ export declare function init(config: AuthHeroConfig): {
5438
5463
  created_at: string;
5439
5464
  updated_at: string;
5440
5465
  disable_sign_ups: boolean;
5466
+ client_secret?: string | undefined;
5441
5467
  callbacks?: string[] | undefined;
5442
5468
  allowed_origins?: string[] | undefined;
5443
5469
  web_origins?: string[] | undefined;
@@ -5466,7 +5492,6 @@ export declare function init(config: AuthHeroConfig): {
5466
5492
  } | undefined;
5467
5493
  } | undefined;
5468
5494
  email_validation?: "enabled" | "disabled" | "enforced" | undefined;
5469
- client_secret?: string | undefined;
5470
5495
  };
5471
5496
  outputFormat: "json" | "text";
5472
5497
  status: 201;
@@ -5626,19 +5651,19 @@ export declare function init(config: AuthHeroConfig): {
5626
5651
  profileData?: {
5627
5652
  [x: string]: any;
5628
5653
  email?: string | undefined;
5629
- username?: string | undefined;
5630
5654
  given_name?: string | undefined;
5631
5655
  family_name?: string | undefined;
5632
5656
  name?: string | undefined;
5657
+ username?: string | undefined;
5633
5658
  email_verified?: boolean | undefined;
5634
5659
  phone_number?: string | undefined;
5635
5660
  phone_verified?: boolean | undefined;
5636
5661
  } | undefined;
5637
5662
  }[] | undefined;
5638
5663
  }[] | {
5664
+ length: number;
5639
5665
  start: number;
5640
5666
  limit: number;
5641
- length: number;
5642
5667
  users: {
5643
5668
  created_at: string;
5644
5669
  updated_at: string;
@@ -5674,10 +5699,10 @@ export declare function init(config: AuthHeroConfig): {
5674
5699
  profileData?: {
5675
5700
  [x: string]: any;
5676
5701
  email?: string | undefined;
5677
- username?: string | undefined;
5678
5702
  given_name?: string | undefined;
5679
5703
  family_name?: string | undefined;
5680
5704
  name?: string | undefined;
5705
+ username?: string | undefined;
5681
5706
  email_verified?: boolean | undefined;
5682
5707
  phone_number?: string | undefined;
5683
5708
  phone_verified?: boolean | undefined;
@@ -5736,10 +5761,10 @@ export declare function init(config: AuthHeroConfig): {
5736
5761
  profileData?: {
5737
5762
  [x: string]: any;
5738
5763
  email?: string | undefined;
5739
- username?: string | undefined;
5740
5764
  given_name?: string | undefined;
5741
5765
  family_name?: string | undefined;
5742
5766
  name?: string | undefined;
5767
+ username?: string | undefined;
5743
5768
  email_verified?: boolean | undefined;
5744
5769
  phone_number?: string | undefined;
5745
5770
  phone_verified?: boolean | undefined;
@@ -5776,18 +5801,18 @@ export declare function init(config: AuthHeroConfig): {
5776
5801
  };
5777
5802
  } & {
5778
5803
  json: {
5779
- verify_email?: boolean | undefined;
5780
5804
  email?: string | undefined;
5781
- last_ip?: string | undefined;
5782
- last_login?: string | undefined;
5783
- user_id?: string | undefined;
5784
- username?: string | undefined;
5785
5805
  given_name?: string | undefined;
5786
5806
  family_name?: string | undefined;
5787
- nickname?: string | undefined;
5788
5807
  name?: string | undefined;
5789
5808
  picture?: string | undefined;
5790
5809
  locale?: string | undefined;
5810
+ verify_email?: boolean | undefined;
5811
+ last_ip?: string | undefined;
5812
+ last_login?: string | undefined;
5813
+ user_id?: string | undefined;
5814
+ username?: string | undefined;
5815
+ nickname?: string | undefined;
5791
5816
  linked_to?: string | undefined;
5792
5817
  profileData?: string | undefined;
5793
5818
  app_metadata?: any;
@@ -5833,10 +5858,10 @@ export declare function init(config: AuthHeroConfig): {
5833
5858
  profileData?: {
5834
5859
  [x: string]: any;
5835
5860
  email?: string | undefined;
5836
- username?: string | undefined;
5837
5861
  given_name?: string | undefined;
5838
5862
  family_name?: string | undefined;
5839
5863
  name?: string | undefined;
5864
+ username?: string | undefined;
5840
5865
  email_verified?: boolean | undefined;
5841
5866
  phone_number?: string | undefined;
5842
5867
  phone_verified?: boolean | undefined;
@@ -5860,19 +5885,19 @@ export declare function init(config: AuthHeroConfig): {
5860
5885
  };
5861
5886
  } & {
5862
5887
  json: {
5888
+ email?: string | undefined;
5889
+ given_name?: string | undefined;
5890
+ family_name?: string | undefined;
5891
+ name?: string | undefined;
5863
5892
  password?: string | undefined;
5893
+ picture?: string | undefined;
5894
+ locale?: string | undefined;
5864
5895
  verify_email?: boolean | undefined;
5865
- email?: string | undefined;
5866
5896
  last_ip?: string | undefined;
5867
5897
  last_login?: string | undefined;
5868
5898
  user_id?: string | undefined;
5869
5899
  username?: string | undefined;
5870
- given_name?: string | undefined;
5871
- family_name?: string | undefined;
5872
5900
  nickname?: string | undefined;
5873
- name?: string | undefined;
5874
- picture?: string | undefined;
5875
- locale?: string | undefined;
5876
5901
  linked_to?: string | undefined;
5877
5902
  profileData?: string | undefined;
5878
5903
  app_metadata?: any;
@@ -5967,10 +5992,10 @@ export declare function init(config: AuthHeroConfig): {
5967
5992
  profileData?: {
5968
5993
  [x: string]: any;
5969
5994
  email?: string | undefined;
5970
- username?: string | undefined;
5971
5995
  given_name?: string | undefined;
5972
5996
  family_name?: string | undefined;
5973
5997
  name?: string | undefined;
5998
+ username?: string | undefined;
5974
5999
  email_verified?: boolean | undefined;
5975
6000
  phone_number?: string | undefined;
5976
6001
  phone_verified?: boolean | undefined;
@@ -6010,9 +6035,9 @@ export declare function init(config: AuthHeroConfig): {
6010
6035
  session_id: string;
6011
6036
  deleted_at?: string | undefined;
6012
6037
  }[] | {
6038
+ length: number;
6013
6039
  start: number;
6014
6040
  limit: number;
6015
- length: number;
6016
6041
  sessions: {
6017
6042
  created_at: string;
6018
6043
  user_id: string;
@@ -6205,6 +6230,46 @@ export declare function init(config: AuthHeroConfig): {
6205
6230
  Bindings: Bindings;
6206
6231
  Variables: Variables;
6207
6232
  }, import("hono/types").MergeSchemaPath<{
6233
+ "/": {
6234
+ $get: {
6235
+ input: {
6236
+ query: {
6237
+ state: string;
6238
+ code?: string | undefined;
6239
+ error?: string | undefined;
6240
+ scope?: string | undefined;
6241
+ error_description?: string | undefined;
6242
+ error_reason?: string | undefined;
6243
+ error_code?: string | undefined;
6244
+ hd?: string | undefined;
6245
+ };
6246
+ };
6247
+ output: {};
6248
+ outputFormat: string;
6249
+ status: 302;
6250
+ };
6251
+ };
6252
+ } & {
6253
+ "/": {
6254
+ $post: {
6255
+ input: {
6256
+ form: {
6257
+ state: string;
6258
+ code?: string | undefined;
6259
+ error?: string | undefined;
6260
+ scope?: string | undefined;
6261
+ error_description?: string | undefined;
6262
+ error_reason?: string | undefined;
6263
+ error_code?: string | undefined;
6264
+ hd?: string | undefined;
6265
+ };
6266
+ };
6267
+ output: {};
6268
+ outputFormat: string;
6269
+ status: 302;
6270
+ };
6271
+ };
6272
+ }, "/callback"> & import("hono/types").MergeSchemaPath<{
6208
6273
  "/": {
6209
6274
  $get: {
6210
6275
  input: {
@@ -6212,15 +6277,15 @@ export declare function init(config: AuthHeroConfig): {
6212
6277
  client_id: string;
6213
6278
  redirect_uri: string;
6214
6279
  state: string;
6280
+ nonce?: string | undefined;
6281
+ response_mode?: AuthorizationResponseMode | undefined;
6215
6282
  connection?: string | undefined;
6216
6283
  audience?: string | undefined;
6217
6284
  scope?: string | undefined;
6218
6285
  response_type?: AuthorizationResponseType | undefined;
6219
- response_mode?: AuthorizationResponseMode | undefined;
6220
6286
  code_challenge_method?: CodeChallengeMethod | undefined;
6221
6287
  auth0Client?: string | undefined;
6222
6288
  vendor_id?: string | undefined;
6223
- nonce?: string | undefined;
6224
6289
  prompt?: string | undefined;
6225
6290
  code_challenge?: string | undefined;
6226
6291
  ui_locales?: string | undefined;
@@ -6239,15 +6304,15 @@ export declare function init(config: AuthHeroConfig): {
6239
6304
  client_id: string;
6240
6305
  redirect_uri: string;
6241
6306
  state: string;
6307
+ nonce?: string | undefined;
6308
+ response_mode?: AuthorizationResponseMode | undefined;
6242
6309
  connection?: string | undefined;
6243
6310
  audience?: string | undefined;
6244
6311
  scope?: string | undefined;
6245
6312
  response_type?: AuthorizationResponseType | undefined;
6246
- response_mode?: AuthorizationResponseMode | undefined;
6247
6313
  code_challenge_method?: CodeChallengeMethod | undefined;
6248
6314
  auth0Client?: string | undefined;
6249
6315
  vendor_id?: string | undefined;
6250
- nonce?: string | undefined;
6251
6316
  prompt?: string | undefined;
6252
6317
  code_challenge?: string | undefined;
6253
6318
  ui_locales?: string | undefined;
@@ -6267,16 +6332,16 @@ export declare function init(config: AuthHeroConfig): {
6267
6332
  $post: {
6268
6333
  input: {
6269
6334
  json: {
6270
- username: string;
6271
6335
  client_id: string;
6336
+ username: string;
6272
6337
  otp: string;
6273
6338
  credential_type: "http://auth0.com/oauth/grant-type/passwordless/otp";
6274
6339
  realm: "email";
6275
6340
  scope?: string | undefined;
6276
6341
  } | {
6277
6342
  password: string;
6278
- username: string;
6279
6343
  client_id: string;
6344
+ username: string;
6280
6345
  credential_type: "http://auth0.com/oauth/grant-type/password-realm";
6281
6346
  realm: "Username-Password-Authentication";
6282
6347
  scope?: string | undefined;
@@ -6296,17 +6361,17 @@ export declare function init(config: AuthHeroConfig): {
6296
6361
  client_id: string;
6297
6362
  connection: string;
6298
6363
  authParams: {
6364
+ nonce?: string | undefined;
6365
+ response_mode?: AuthorizationResponseMode | undefined;
6299
6366
  username?: string | undefined;
6300
6367
  audience?: string | undefined;
6301
6368
  scope?: string | undefined;
6302
6369
  response_type?: AuthorizationResponseType | undefined;
6303
- response_mode?: AuthorizationResponseMode | undefined;
6304
6370
  redirect_uri?: string | undefined;
6305
6371
  code_challenge_method?: CodeChallengeMethod | undefined;
6306
6372
  vendor_id?: string | undefined;
6307
6373
  act_as?: string | undefined;
6308
6374
  state?: string | undefined;
6309
- nonce?: string | undefined;
6310
6375
  prompt?: string | undefined;
6311
6376
  code_challenge?: string | undefined;
6312
6377
  ui_locales?: string | undefined;
@@ -6332,8 +6397,8 @@ export declare function init(config: AuthHeroConfig): {
6332
6397
  redirect_uri: string;
6333
6398
  state: string;
6334
6399
  verification_code: string;
6335
- audience?: string | undefined;
6336
6400
  nonce?: string | undefined;
6401
+ audience?: string | undefined;
6337
6402
  };
6338
6403
  };
6339
6404
  output: {};
@@ -6346,8 +6411,8 @@ export declare function init(config: AuthHeroConfig): {
6346
6411
  $post: {
6347
6412
  input: {
6348
6413
  json: {
6349
- password: string;
6350
6414
  email: string;
6415
+ password: string;
6351
6416
  client_id: string;
6352
6417
  connection: "Username-Password-Authentication";
6353
6418
  };