@authhero/adapter-interfaces 0.11.6 → 0.12.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.
@@ -1450,7 +1450,7 @@ export declare const codeTypeSchema: z.ZodEnum<[
1450
1450
  "password_reset",
1451
1451
  "email_verification",
1452
1452
  "otp",
1453
- "oauth2",
1453
+ "authorization_code",
1454
1454
  "oauth2_state",
1455
1455
  "ticket"
1456
1456
  ]>;
@@ -1463,24 +1463,27 @@ export declare const codeInsertSchema: z.ZodObject<{
1463
1463
  "password_reset",
1464
1464
  "email_verification",
1465
1465
  "otp",
1466
- "oauth2",
1466
+ "authorization_code",
1467
1467
  "oauth2_state",
1468
1468
  "ticket"
1469
1469
  ]>;
1470
1470
  expires_at: z.ZodString;
1471
1471
  used_at: z.ZodOptional<z.ZodString>;
1472
+ user_id: z.ZodOptional<z.ZodString>;
1472
1473
  }, "strip", z.ZodTypeAny, {
1473
1474
  code_id: string;
1474
1475
  login_id: string;
1475
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1476
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1476
1477
  expires_at: string;
1478
+ user_id?: string | undefined;
1477
1479
  connection_id?: string | undefined;
1478
1480
  used_at?: string | undefined;
1479
1481
  }, {
1480
1482
  code_id: string;
1481
1483
  login_id: string;
1482
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1484
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1483
1485
  expires_at: string;
1486
+ user_id?: string | undefined;
1484
1487
  connection_id?: string | undefined;
1485
1488
  used_at?: string | undefined;
1486
1489
  }>;
@@ -1494,26 +1497,29 @@ export declare const codeSchema: z.ZodObject<{
1494
1497
  "password_reset",
1495
1498
  "email_verification",
1496
1499
  "otp",
1497
- "oauth2",
1500
+ "authorization_code",
1498
1501
  "oauth2_state",
1499
1502
  "ticket"
1500
1503
  ]>;
1501
1504
  expires_at: z.ZodString;
1502
1505
  used_at: z.ZodOptional<z.ZodString>;
1506
+ user_id: z.ZodOptional<z.ZodString>;
1503
1507
  }, "strip", z.ZodTypeAny, {
1504
1508
  created_at: string;
1505
1509
  code_id: string;
1506
1510
  login_id: string;
1507
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1511
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1508
1512
  expires_at: string;
1513
+ user_id?: string | undefined;
1509
1514
  connection_id?: string | undefined;
1510
1515
  used_at?: string | undefined;
1511
1516
  }, {
1512
1517
  created_at: string;
1513
1518
  code_id: string;
1514
1519
  login_id: string;
1515
- code_type: "password_reset" | "email_verification" | "otp" | "oauth2" | "oauth2_state" | "ticket";
1520
+ code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
1516
1521
  expires_at: string;
1522
+ user_id?: string | undefined;
1517
1523
  connection_id?: string | undefined;
1518
1524
  used_at?: string | undefined;
1519
1525
  }>;
@@ -2443,31 +2449,25 @@ export declare const sessionSchema: z.ZodObject<{
2443
2449
  }>;
2444
2450
  export type Session = z.infer<typeof sessionSchema>;
2445
2451
  export declare const certificateSchema: z.ZodObject<{
2446
- private_key: z.ZodString;
2447
- public_key: z.ZodString;
2452
+ private_key: z.ZodOptional<z.ZodString>;
2453
+ public_key: z.ZodOptional<z.ZodString>;
2448
2454
  kid: z.ZodString;
2449
- created_at: z.ZodString;
2455
+ created_at: z.ZodOptional<z.ZodString>;
2450
2456
  revoked_at: z.ZodOptional<z.ZodString>;
2451
2457
  }, "strip", z.ZodTypeAny, {
2452
- created_at: string;
2453
- private_key: string;
2454
2458
  kid: string;
2455
- public_key: string;
2459
+ created_at?: string | undefined;
2460
+ private_key?: string | undefined;
2461
+ public_key?: string | undefined;
2456
2462
  revoked_at?: string | undefined;
2457
2463
  }, {
2458
- created_at: string;
2459
- private_key: string;
2460
2464
  kid: string;
2461
- public_key: string;
2465
+ created_at?: string | undefined;
2466
+ private_key?: string | undefined;
2467
+ public_key?: string | undefined;
2462
2468
  revoked_at?: string | undefined;
2463
2469
  }>;
2464
- export interface Certificate {
2465
- private_key: string;
2466
- public_key: string;
2467
- kid: string;
2468
- created_at: string;
2469
- revoked_at?: string;
2470
- }
2470
+ export type Certificate = z.infer<typeof certificateSchema>;
2471
2471
  export declare const signingKeySchema: z.ZodObject<{
2472
2472
  kid: z.ZodString;
2473
2473
  cert: z.ZodString;
@@ -2508,6 +2508,7 @@ export declare const signingKeySchema: z.ZodObject<{
2508
2508
  current_until?: string | undefined;
2509
2509
  revoked?: boolean | undefined;
2510
2510
  }>;
2511
+ export type SigningKey = z.infer<typeof signingKeySchema>;
2511
2512
  export declare const tenantInsertSchema: z.ZodObject<{
2512
2513
  name: z.ZodString;
2513
2514
  audience: z.ZodString;
@@ -3883,613 +3884,59 @@ export interface Ticket {
3883
3884
  expires_at: Date;
3884
3885
  used_at?: Date;
3885
3886
  }
3886
- export declare const universalLoginSessionInsertSchema: z.ZodObject<{
3887
- id: z.ZodString;
3888
- expires_at: z.ZodString;
3889
- auth0Client: z.ZodOptional<z.ZodString>;
3890
- authParams: z.ZodObject<{
3891
- client_id: z.ZodString;
3892
- vendor_id: z.ZodOptional<z.ZodString>;
3893
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
3894
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
3895
- redirect_uri: z.ZodOptional<z.ZodString>;
3896
- audience: z.ZodOptional<z.ZodString>;
3897
- state: z.ZodOptional<z.ZodString>;
3898
- nonce: z.ZodOptional<z.ZodString>;
3899
- scope: z.ZodOptional<z.ZodString>;
3900
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
3901
- code_challenge: z.ZodOptional<z.ZodString>;
3902
- username: z.ZodOptional<z.ZodString>;
3903
- }, "strip", z.ZodTypeAny, {
3904
- client_id: string;
3905
- username?: string | undefined;
3906
- audience?: string | undefined;
3907
- vendor_id?: string | undefined;
3908
- response_type?: AuthorizationResponseType | undefined;
3909
- response_mode?: AuthorizationResponseMode | undefined;
3910
- redirect_uri?: string | undefined;
3911
- state?: string | undefined;
3912
- nonce?: string | undefined;
3913
- scope?: string | undefined;
3914
- code_challenge_method?: CodeChallengeMethod | undefined;
3915
- code_challenge?: string | undefined;
3916
- }, {
3917
- client_id: string;
3918
- username?: string | undefined;
3919
- audience?: string | undefined;
3920
- vendor_id?: string | undefined;
3921
- response_type?: AuthorizationResponseType | undefined;
3922
- response_mode?: AuthorizationResponseMode | undefined;
3923
- redirect_uri?: string | undefined;
3924
- state?: string | undefined;
3925
- nonce?: string | undefined;
3926
- scope?: string | undefined;
3927
- code_challenge_method?: CodeChallengeMethod | undefined;
3928
- code_challenge?: string | undefined;
3929
- }>;
3930
- }, "strip", z.ZodTypeAny, {
3931
- id: string;
3932
- expires_at: string;
3933
- authParams: {
3934
- client_id: string;
3935
- username?: string | undefined;
3936
- audience?: string | undefined;
3937
- vendor_id?: string | undefined;
3938
- response_type?: AuthorizationResponseType | undefined;
3939
- response_mode?: AuthorizationResponseMode | undefined;
3940
- redirect_uri?: string | undefined;
3941
- state?: string | undefined;
3942
- nonce?: string | undefined;
3943
- scope?: string | undefined;
3944
- code_challenge_method?: CodeChallengeMethod | undefined;
3945
- code_challenge?: string | undefined;
3946
- };
3947
- auth0Client?: string | undefined;
3948
- }, {
3887
+ export declare function parseUserId(user_id: string): {
3888
+ connection: string;
3949
3889
  id: string;
3950
- expires_at: string;
3951
- authParams: {
3952
- client_id: string;
3953
- username?: string | undefined;
3954
- audience?: string | undefined;
3955
- vendor_id?: string | undefined;
3956
- response_type?: AuthorizationResponseType | undefined;
3957
- response_mode?: AuthorizationResponseMode | undefined;
3958
- redirect_uri?: string | undefined;
3959
- state?: string | undefined;
3960
- nonce?: string | undefined;
3961
- scope?: string | undefined;
3962
- code_challenge_method?: CodeChallengeMethod | undefined;
3963
- code_challenge?: string | undefined;
3890
+ };
3891
+ export interface ListParams {
3892
+ page: number;
3893
+ per_page: number;
3894
+ include_totals: boolean;
3895
+ q?: string;
3896
+ sort?: {
3897
+ sort_by: string;
3898
+ sort_order: "asc" | "desc";
3964
3899
  };
3965
- auth0Client?: string | undefined;
3966
- }>;
3967
- export type UniversalLoginSessionInsert = z.infer<typeof universalLoginSessionInsertSchema>;
3968
- export declare const universalLoginSessionSchema: z.ZodObject<{
3969
- created_at: z.ZodString;
3970
- updated_at: z.ZodString;
3971
- id: z.ZodString;
3972
- expires_at: z.ZodString;
3973
- auth0Client: z.ZodOptional<z.ZodString>;
3974
- authParams: z.ZodObject<{
3975
- client_id: z.ZodString;
3976
- vendor_id: z.ZodOptional<z.ZodString>;
3977
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
3978
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
3979
- redirect_uri: z.ZodOptional<z.ZodString>;
3980
- audience: z.ZodOptional<z.ZodString>;
3981
- state: z.ZodOptional<z.ZodString>;
3982
- nonce: z.ZodOptional<z.ZodString>;
3983
- scope: z.ZodOptional<z.ZodString>;
3984
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
3985
- code_challenge: z.ZodOptional<z.ZodString>;
3986
- username: z.ZodOptional<z.ZodString>;
3987
- }, "strip", z.ZodTypeAny, {
3988
- client_id: string;
3989
- username?: string | undefined;
3990
- audience?: string | undefined;
3991
- vendor_id?: string | undefined;
3992
- response_type?: AuthorizationResponseType | undefined;
3993
- response_mode?: AuthorizationResponseMode | undefined;
3994
- redirect_uri?: string | undefined;
3995
- state?: string | undefined;
3996
- nonce?: string | undefined;
3997
- scope?: string | undefined;
3998
- code_challenge_method?: CodeChallengeMethod | undefined;
3999
- code_challenge?: string | undefined;
4000
- }, {
4001
- client_id: string;
4002
- username?: string | undefined;
4003
- audience?: string | undefined;
4004
- vendor_id?: string | undefined;
4005
- response_type?: AuthorizationResponseType | undefined;
4006
- response_mode?: AuthorizationResponseMode | undefined;
4007
- redirect_uri?: string | undefined;
4008
- state?: string | undefined;
4009
- nonce?: string | undefined;
4010
- scope?: string | undefined;
4011
- code_challenge_method?: CodeChallengeMethod | undefined;
4012
- code_challenge?: string | undefined;
4013
- }>;
4014
- }, "strip", z.ZodTypeAny, {
4015
- created_at: string;
4016
- updated_at: string;
4017
- id: string;
4018
- expires_at: string;
4019
- authParams: {
4020
- client_id: string;
4021
- username?: string | undefined;
4022
- audience?: string | undefined;
4023
- vendor_id?: string | undefined;
4024
- response_type?: AuthorizationResponseType | undefined;
4025
- response_mode?: AuthorizationResponseMode | undefined;
4026
- redirect_uri?: string | undefined;
4027
- state?: string | undefined;
4028
- nonce?: string | undefined;
4029
- scope?: string | undefined;
4030
- code_challenge_method?: CodeChallengeMethod | undefined;
4031
- code_challenge?: string | undefined;
4032
- };
4033
- auth0Client?: string | undefined;
4034
- }, {
4035
- created_at: string;
4036
- updated_at: string;
4037
- id: string;
4038
- expires_at: string;
4039
- authParams: {
4040
- client_id: string;
4041
- username?: string | undefined;
4042
- audience?: string | undefined;
4043
- vendor_id?: string | undefined;
4044
- response_type?: AuthorizationResponseType | undefined;
4045
- response_mode?: AuthorizationResponseMode | undefined;
4046
- redirect_uri?: string | undefined;
4047
- state?: string | undefined;
4048
- nonce?: string | undefined;
4049
- scope?: string | undefined;
4050
- code_challenge_method?: CodeChallengeMethod | undefined;
4051
- code_challenge?: string | undefined;
4052
- };
4053
- auth0Client?: string | undefined;
4054
- }>;
4055
- export type UniversalLoginSession = z.infer<typeof universalLoginSessionSchema>;
4056
- export declare const otpInsertSchema: z.ZodObject<{
4057
- id: z.ZodString;
4058
- email: z.ZodString;
4059
- code: z.ZodString;
4060
- ip: z.ZodOptional<z.ZodString>;
4061
- send: z.ZodEnum<[
4062
- "code",
4063
- "link"
4064
- ]>;
4065
- authParams: z.ZodObject<{
4066
- client_id: z.ZodString;
4067
- vendor_id: z.ZodOptional<z.ZodString>;
4068
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
4069
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
4070
- redirect_uri: z.ZodOptional<z.ZodString>;
4071
- audience: z.ZodOptional<z.ZodString>;
4072
- state: z.ZodOptional<z.ZodString>;
4073
- nonce: z.ZodOptional<z.ZodString>;
4074
- scope: z.ZodOptional<z.ZodString>;
4075
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
4076
- code_challenge: z.ZodOptional<z.ZodString>;
4077
- username: z.ZodOptional<z.ZodString>;
4078
- }, "strip", z.ZodTypeAny, {
4079
- client_id: string;
4080
- username?: string | undefined;
4081
- audience?: string | undefined;
4082
- vendor_id?: string | undefined;
4083
- response_type?: AuthorizationResponseType | undefined;
4084
- response_mode?: AuthorizationResponseMode | undefined;
4085
- redirect_uri?: string | undefined;
4086
- state?: string | undefined;
4087
- nonce?: string | undefined;
4088
- scope?: string | undefined;
4089
- code_challenge_method?: CodeChallengeMethod | undefined;
4090
- code_challenge?: string | undefined;
4091
- }, {
4092
- client_id: string;
4093
- username?: string | undefined;
4094
- audience?: string | undefined;
4095
- vendor_id?: string | undefined;
4096
- response_type?: AuthorizationResponseType | undefined;
4097
- response_mode?: AuthorizationResponseMode | undefined;
4098
- redirect_uri?: string | undefined;
4099
- state?: string | undefined;
4100
- nonce?: string | undefined;
4101
- scope?: string | undefined;
4102
- code_challenge_method?: CodeChallengeMethod | undefined;
4103
- code_challenge?: string | undefined;
4104
- }>;
4105
- expires_at: z.ZodString;
4106
- used_at: z.ZodOptional<z.ZodString>;
4107
- user_id: z.ZodOptional<z.ZodString>;
4108
- }, "strip", z.ZodTypeAny, {
4109
- code: string;
4110
- email: string;
4111
- id: string;
4112
- expires_at: string;
4113
- authParams: {
4114
- client_id: string;
4115
- username?: string | undefined;
4116
- audience?: string | undefined;
4117
- vendor_id?: string | undefined;
4118
- response_type?: AuthorizationResponseType | undefined;
4119
- response_mode?: AuthorizationResponseMode | undefined;
4120
- redirect_uri?: string | undefined;
4121
- state?: string | undefined;
4122
- nonce?: string | undefined;
4123
- scope?: string | undefined;
4124
- code_challenge_method?: CodeChallengeMethod | undefined;
4125
- code_challenge?: string | undefined;
4126
- };
4127
- send: "code" | "link";
4128
- user_id?: string | undefined;
4129
- used_at?: string | undefined;
4130
- ip?: string | undefined;
4131
- }, {
4132
- code: string;
4133
- email: string;
4134
- id: string;
4135
- expires_at: string;
4136
- authParams: {
4137
- client_id: string;
4138
- username?: string | undefined;
4139
- audience?: string | undefined;
4140
- vendor_id?: string | undefined;
4141
- response_type?: AuthorizationResponseType | undefined;
4142
- response_mode?: AuthorizationResponseMode | undefined;
4143
- redirect_uri?: string | undefined;
4144
- state?: string | undefined;
4145
- nonce?: string | undefined;
4146
- scope?: string | undefined;
4147
- code_challenge_method?: CodeChallengeMethod | undefined;
4148
- code_challenge?: string | undefined;
4149
- };
4150
- send: "code" | "link";
4151
- user_id?: string | undefined;
4152
- used_at?: string | undefined;
4153
- ip?: string | undefined;
4154
- }>;
4155
- export type OTPInsert = z.infer<typeof otpInsertSchema>;
4156
- export declare const otpSchema: z.ZodObject<{
4157
- id: z.ZodString;
4158
- email: z.ZodString;
4159
- code: z.ZodString;
4160
- ip: z.ZodOptional<z.ZodString>;
4161
- send: z.ZodEnum<[
4162
- "code",
4163
- "link"
4164
- ]>;
4165
- authParams: z.ZodObject<{
4166
- client_id: z.ZodString;
4167
- vendor_id: z.ZodOptional<z.ZodString>;
4168
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
4169
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
4170
- redirect_uri: z.ZodOptional<z.ZodString>;
4171
- audience: z.ZodOptional<z.ZodString>;
4172
- state: z.ZodOptional<z.ZodString>;
4173
- nonce: z.ZodOptional<z.ZodString>;
4174
- scope: z.ZodOptional<z.ZodString>;
4175
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
4176
- code_challenge: z.ZodOptional<z.ZodString>;
4177
- username: z.ZodOptional<z.ZodString>;
4178
- }, "strip", z.ZodTypeAny, {
4179
- client_id: string;
4180
- username?: string | undefined;
4181
- audience?: string | undefined;
4182
- vendor_id?: string | undefined;
4183
- response_type?: AuthorizationResponseType | undefined;
4184
- response_mode?: AuthorizationResponseMode | undefined;
4185
- redirect_uri?: string | undefined;
4186
- state?: string | undefined;
4187
- nonce?: string | undefined;
4188
- scope?: string | undefined;
4189
- code_challenge_method?: CodeChallengeMethod | undefined;
4190
- code_challenge?: string | undefined;
4191
- }, {
4192
- client_id: string;
4193
- username?: string | undefined;
4194
- audience?: string | undefined;
4195
- vendor_id?: string | undefined;
4196
- response_type?: AuthorizationResponseType | undefined;
4197
- response_mode?: AuthorizationResponseMode | undefined;
4198
- redirect_uri?: string | undefined;
4199
- state?: string | undefined;
4200
- nonce?: string | undefined;
4201
- scope?: string | undefined;
4202
- code_challenge_method?: CodeChallengeMethod | undefined;
4203
- code_challenge?: string | undefined;
4204
- }>;
4205
- expires_at: z.ZodString;
4206
- used_at: z.ZodOptional<z.ZodString>;
4207
- user_id: z.ZodOptional<z.ZodString>;
4208
- created_at: z.ZodString;
4209
- }, "strip", z.ZodTypeAny, {
4210
- code: string;
4211
- created_at: string;
4212
- email: string;
4213
- id: string;
4214
- expires_at: string;
4215
- authParams: {
4216
- client_id: string;
4217
- username?: string | undefined;
4218
- audience?: string | undefined;
4219
- vendor_id?: string | undefined;
4220
- response_type?: AuthorizationResponseType | undefined;
4221
- response_mode?: AuthorizationResponseMode | undefined;
4222
- redirect_uri?: string | undefined;
4223
- state?: string | undefined;
4224
- nonce?: string | undefined;
4225
- scope?: string | undefined;
4226
- code_challenge_method?: CodeChallengeMethod | undefined;
4227
- code_challenge?: string | undefined;
4228
- };
4229
- send: "code" | "link";
4230
- user_id?: string | undefined;
4231
- used_at?: string | undefined;
4232
- ip?: string | undefined;
4233
- }, {
4234
- code: string;
4235
- created_at: string;
4236
- email: string;
4237
- id: string;
4238
- expires_at: string;
4239
- authParams: {
4240
- client_id: string;
4241
- username?: string | undefined;
4242
- audience?: string | undefined;
4243
- vendor_id?: string | undefined;
4244
- response_type?: AuthorizationResponseType | undefined;
4245
- response_mode?: AuthorizationResponseMode | undefined;
4246
- redirect_uri?: string | undefined;
4247
- state?: string | undefined;
4248
- nonce?: string | undefined;
4249
- scope?: string | undefined;
4250
- code_challenge_method?: CodeChallengeMethod | undefined;
4251
- code_challenge?: string | undefined;
4252
- };
4253
- send: "code" | "link";
4254
- user_id?: string | undefined;
4255
- used_at?: string | undefined;
4256
- ip?: string | undefined;
4257
- }>;
4258
- export type OTP = z.infer<typeof otpSchema>;
4259
- export declare const authenticationCodeInsertSchema: z.ZodObject<{
4260
- authParams: z.ZodObject<{
4261
- client_id: z.ZodString;
4262
- vendor_id: z.ZodOptional<z.ZodString>;
4263
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
4264
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
4265
- redirect_uri: z.ZodOptional<z.ZodString>;
4266
- audience: z.ZodOptional<z.ZodString>;
4267
- state: z.ZodOptional<z.ZodString>;
4268
- nonce: z.ZodOptional<z.ZodString>;
4269
- scope: z.ZodOptional<z.ZodString>;
4270
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
4271
- code_challenge: z.ZodOptional<z.ZodString>;
4272
- username: z.ZodOptional<z.ZodString>;
4273
- }, "strip", z.ZodTypeAny, {
4274
- client_id: string;
4275
- username?: string | undefined;
4276
- audience?: string | undefined;
4277
- vendor_id?: string | undefined;
4278
- response_type?: AuthorizationResponseType | undefined;
4279
- response_mode?: AuthorizationResponseMode | undefined;
4280
- redirect_uri?: string | undefined;
4281
- state?: string | undefined;
4282
- nonce?: string | undefined;
4283
- scope?: string | undefined;
4284
- code_challenge_method?: CodeChallengeMethod | undefined;
4285
- code_challenge?: string | undefined;
4286
- }, {
4287
- client_id: string;
4288
- username?: string | undefined;
4289
- audience?: string | undefined;
4290
- vendor_id?: string | undefined;
4291
- response_type?: AuthorizationResponseType | undefined;
4292
- response_mode?: AuthorizationResponseMode | undefined;
4293
- redirect_uri?: string | undefined;
4294
- state?: string | undefined;
4295
- nonce?: string | undefined;
4296
- scope?: string | undefined;
4297
- code_challenge_method?: CodeChallengeMethod | undefined;
4298
- code_challenge?: string | undefined;
4299
- }>;
4300
- code: z.ZodString;
4301
- user_id: z.ZodString;
4302
- created_at: z.ZodString;
4303
- expires_at: z.ZodString;
4304
- used_at: z.ZodOptional<z.ZodString>;
4305
- }, "strip", z.ZodTypeAny, {
4306
- code: string;
4307
- created_at: string;
4308
- user_id: string;
4309
- expires_at: string;
4310
- authParams: {
4311
- client_id: string;
4312
- username?: string | undefined;
4313
- audience?: string | undefined;
4314
- vendor_id?: string | undefined;
4315
- response_type?: AuthorizationResponseType | undefined;
4316
- response_mode?: AuthorizationResponseMode | undefined;
4317
- redirect_uri?: string | undefined;
4318
- state?: string | undefined;
4319
- nonce?: string | undefined;
4320
- scope?: string | undefined;
4321
- code_challenge_method?: CodeChallengeMethod | undefined;
4322
- code_challenge?: string | undefined;
4323
- };
4324
- used_at?: string | undefined;
4325
- }, {
4326
- code: string;
4327
- created_at: string;
4328
- user_id: string;
4329
- expires_at: string;
4330
- authParams: {
4331
- client_id: string;
4332
- username?: string | undefined;
4333
- audience?: string | undefined;
4334
- vendor_id?: string | undefined;
4335
- response_type?: AuthorizationResponseType | undefined;
4336
- response_mode?: AuthorizationResponseMode | undefined;
4337
- redirect_uri?: string | undefined;
4338
- state?: string | undefined;
4339
- nonce?: string | undefined;
4340
- scope?: string | undefined;
4341
- code_challenge_method?: CodeChallengeMethod | undefined;
4342
- code_challenge?: string | undefined;
4343
- };
4344
- used_at?: string | undefined;
4345
- }>;
4346
- export type AuthenticationCodeInsert = z.infer<typeof authenticationCodeInsertSchema>;
4347
- export declare const authenticationCodeSchema: z.ZodObject<{
4348
- created_at: z.ZodString;
4349
- authParams: z.ZodObject<{
4350
- client_id: z.ZodString;
4351
- vendor_id: z.ZodOptional<z.ZodString>;
4352
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
4353
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
4354
- redirect_uri: z.ZodOptional<z.ZodString>;
4355
- audience: z.ZodOptional<z.ZodString>;
4356
- state: z.ZodOptional<z.ZodString>;
4357
- nonce: z.ZodOptional<z.ZodString>;
4358
- scope: z.ZodOptional<z.ZodString>;
4359
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
4360
- code_challenge: z.ZodOptional<z.ZodString>;
4361
- username: z.ZodOptional<z.ZodString>;
4362
- }, "strip", z.ZodTypeAny, {
4363
- client_id: string;
4364
- username?: string | undefined;
4365
- audience?: string | undefined;
4366
- vendor_id?: string | undefined;
4367
- response_type?: AuthorizationResponseType | undefined;
4368
- response_mode?: AuthorizationResponseMode | undefined;
4369
- redirect_uri?: string | undefined;
4370
- state?: string | undefined;
4371
- nonce?: string | undefined;
4372
- scope?: string | undefined;
4373
- code_challenge_method?: CodeChallengeMethod | undefined;
4374
- code_challenge?: string | undefined;
4375
- }, {
4376
- client_id: string;
4377
- username?: string | undefined;
4378
- audience?: string | undefined;
4379
- vendor_id?: string | undefined;
4380
- response_type?: AuthorizationResponseType | undefined;
4381
- response_mode?: AuthorizationResponseMode | undefined;
4382
- redirect_uri?: string | undefined;
4383
- state?: string | undefined;
4384
- nonce?: string | undefined;
4385
- scope?: string | undefined;
4386
- code_challenge_method?: CodeChallengeMethod | undefined;
4387
- code_challenge?: string | undefined;
4388
- }>;
4389
- code: z.ZodString;
4390
- user_id: z.ZodString;
4391
- expires_at: z.ZodString;
4392
- used_at: z.ZodOptional<z.ZodString>;
4393
- }, "strip", z.ZodTypeAny, {
4394
- code: string;
4395
- created_at: string;
4396
- user_id: string;
4397
- expires_at: string;
4398
- authParams: {
4399
- client_id: string;
4400
- username?: string | undefined;
4401
- audience?: string | undefined;
4402
- vendor_id?: string | undefined;
4403
- response_type?: AuthorizationResponseType | undefined;
4404
- response_mode?: AuthorizationResponseMode | undefined;
4405
- redirect_uri?: string | undefined;
4406
- state?: string | undefined;
4407
- nonce?: string | undefined;
4408
- scope?: string | undefined;
4409
- code_challenge_method?: CodeChallengeMethod | undefined;
4410
- code_challenge?: string | undefined;
4411
- };
4412
- used_at?: string | undefined;
4413
- }, {
4414
- code: string;
4415
- created_at: string;
4416
- user_id: string;
4417
- expires_at: string;
4418
- authParams: {
4419
- client_id: string;
4420
- username?: string | undefined;
4421
- audience?: string | undefined;
4422
- vendor_id?: string | undefined;
4423
- response_type?: AuthorizationResponseType | undefined;
4424
- response_mode?: AuthorizationResponseMode | undefined;
4425
- redirect_uri?: string | undefined;
4426
- state?: string | undefined;
4427
- nonce?: string | undefined;
4428
- scope?: string | undefined;
4429
- code_challenge_method?: CodeChallengeMethod | undefined;
4430
- code_challenge?: string | undefined;
4431
- };
4432
- used_at?: string | undefined;
4433
- }>;
4434
- export type AuthenticationCode = z.infer<typeof authenticationCodeSchema>;
4435
- export declare function parseUserId(user_id: string): {
4436
- connection: string;
4437
- id: string;
4438
- };
4439
- export interface ListParams {
4440
- page: number;
4441
- per_page: number;
4442
- include_totals: boolean;
4443
- q?: string;
4444
- sort?: {
4445
- sort_by: string;
4446
- sort_order: "asc" | "desc";
4447
- };
4448
- }
4449
- export interface ListCodesResponse extends Totals {
4450
- codes: Code[];
4451
- }
4452
- export interface CodesAdapter {
4453
- create: (tenant_id: string, authCode: CodeInsert) => Promise<Code>;
4454
- get: (tenant_id: string, code_id: string, type: CodeType) => Promise<Code | null>;
4455
- list: (tenant_id: string, params: ListParams) => Promise<ListCodesResponse>;
4456
- remove: (tenant_id: string, code: string) => Promise<boolean>;
4457
- }
4458
- export interface OTPAdapter {
4459
- create: (tenant_id: string, authCode: OTPInsert) => Promise<void>;
4460
- list: (tenant_id: string, email: string) => Promise<OTP[]>;
4461
- remove: (tenant_id: string, id: string) => Promise<boolean>;
4462
- }
4463
- export interface PasswordsAdapter {
4464
- create: (tenant_id: string, params: PasswordInsert) => Promise<Password>;
4465
- update: (tenant_id: string, params: PasswordInsert) => Promise<boolean>;
4466
- get: (tenant_id: string, user_id: string) => Promise<Password>;
4467
- }
4468
- export interface ListSesssionsResponse extends Totals {
4469
- sessions: Session[];
4470
- }
4471
- export interface SessionsAdapter {
4472
- create: (tenant_id: string, session: SessionInsert) => Promise<Session>;
4473
- get: (tenant_id: string, id: string) => Promise<Session | null>;
4474
- list(tenantId: string, params: ListParams): Promise<ListSesssionsResponse>;
4475
- update: (tenant_id: string, id: string, session: {
4476
- used_at: string;
4477
- }) => Promise<boolean>;
4478
- remove: (tenant_id: string, id: string) => Promise<boolean>;
4479
- }
4480
- export interface CreateTenantParams {
4481
- name: string;
4482
- audience: string;
4483
- sender_name: string;
4484
- sender_email: string;
4485
- id?: string;
4486
- }
4487
- export interface TenantsDataAdapter {
4488
- create(params: CreateTenantParams): Promise<Tenant>;
4489
- get(id: string): Promise<Tenant | null>;
4490
- list(params: ListParams): Promise<{
4491
- tenants: Tenant[];
4492
- totals?: Totals;
3900
+ }
3901
+ export interface ListCodesResponse extends Totals {
3902
+ codes: Code[];
3903
+ }
3904
+ export interface CodesAdapter {
3905
+ create: (tenant_id: string, authCode: CodeInsert) => Promise<Code>;
3906
+ get: (tenant_id: string, code_id: string, type: CodeType) => Promise<Code | null>;
3907
+ list: (tenant_id: string, params: ListParams) => Promise<ListCodesResponse>;
3908
+ remove: (tenant_id: string, code: string) => Promise<boolean>;
3909
+ }
3910
+ export interface PasswordsAdapter {
3911
+ create: (tenant_id: string, params: PasswordInsert) => Promise<Password>;
3912
+ update: (tenant_id: string, params: PasswordInsert) => Promise<boolean>;
3913
+ get: (tenant_id: string, user_id: string) => Promise<Password>;
3914
+ }
3915
+ export interface ListSesssionsResponse extends Totals {
3916
+ sessions: Session[];
3917
+ }
3918
+ export interface SessionsAdapter {
3919
+ create: (tenant_id: string, session: SessionInsert) => Promise<Session>;
3920
+ get: (tenant_id: string, id: string) => Promise<Session | null>;
3921
+ list(tenantId: string, params: ListParams): Promise<ListSesssionsResponse>;
3922
+ update: (tenant_id: string, id: string, session: {
3923
+ used_at: string;
3924
+ }) => Promise<boolean>;
3925
+ remove: (tenant_id: string, id: string) => Promise<boolean>;
3926
+ }
3927
+ export interface CreateTenantParams {
3928
+ name: string;
3929
+ audience: string;
3930
+ sender_name: string;
3931
+ sender_email: string;
3932
+ id?: string;
3933
+ }
3934
+ export interface TenantsDataAdapter {
3935
+ create(params: CreateTenantParams): Promise<Tenant>;
3936
+ get(id: string): Promise<Tenant | null>;
3937
+ list(params: ListParams): Promise<{
3938
+ tenants: Tenant[];
3939
+ totals?: Totals;
4493
3940
  }>;
4494
3941
  update(id: string, tenant: Partial<Tenant>): Promise<void>;
4495
3942
  remove(tenantId: string): Promise<boolean>;
@@ -4528,11 +3975,6 @@ export interface ApplicationsAdapter {
4528
3975
  }>;
4529
3976
  update(tenant_id: string, id: string, application: Partial<Application>): Promise<boolean>;
4530
3977
  }
4531
- export interface UniversalLoginSessionsAdapter {
4532
- create: (tenant_id: string, session: UniversalLoginSessionInsert) => Promise<UniversalLoginSession>;
4533
- update: (tenant_id: string, id: string, session: UniversalLoginSession) => Promise<boolean>;
4534
- get: (id: string) => Promise<UniversalLoginSession | null>;
4535
- }
4536
3978
  export interface ListConnectionsResponse extends Totals {
4537
3979
  connections: Connection[];
4538
3980
  }
@@ -4551,18 +3993,14 @@ export interface DomainsAdapter {
4551
3993
  list(tenant_id: string, params: ListParams): Promise<ListDomainsResponse>;
4552
3994
  }
4553
3995
  export interface KeysAdapter {
4554
- create: (key: Certificate) => Promise<void>;
4555
- list: () => Promise<Certificate[]>;
3996
+ create: (key: SigningKey) => Promise<void>;
3997
+ list: () => Promise<(Certificate | SigningKey)[]>;
4556
3998
  revoke: (kid: string, revoke_at: Date) => Promise<boolean>;
4557
3999
  }
4558
4000
  export interface BrandingAdapter {
4559
4001
  set: (tenant_id: string, authCode: Branding) => Promise<void>;
4560
4002
  get: (tenant_id: string) => Promise<Branding | null>;
4561
4003
  }
4562
- export interface AuthenticationCodesAdapter {
4563
- create: (tenant_id: string, authCode: AuthenticationCode) => Promise<void>;
4564
- get: (tenant_id: string, code: string) => Promise<AuthenticationCode>;
4565
- }
4566
4004
  export interface ListHooksResponse extends Totals {
4567
4005
  hooks: Hook[];
4568
4006
  }
@@ -4590,7 +4028,6 @@ export interface LoginsAdapter {
4590
4028
  }
4591
4029
  export interface DataAdapters {
4592
4030
  applications: ApplicationsAdapter;
4593
- authenticationCodes: AuthenticationCodesAdapter;
4594
4031
  branding: BrandingAdapter;
4595
4032
  clients: ClientsAdapter;
4596
4033
  codes: CodesAdapter;
@@ -4600,13 +4037,11 @@ export interface DataAdapters {
4600
4037
  keys: KeysAdapter;
4601
4038
  logins: LoginsAdapter;
4602
4039
  logs: LogsDataAdapter;
4603
- OTP: OTPAdapter;
4604
4040
  passwords: PasswordsAdapter;
4605
4041
  sessions: SessionsAdapter;
4606
4042
  tenants: TenantsDataAdapter;
4607
4043
  themes: ThemesAdapter;
4608
4044
  tickets: TicketsAdapter;
4609
- universalLoginSessions: UniversalLoginSessionsAdapter;
4610
4045
  users: UserDataAdapter;
4611
4046
  }
4612
4047