@authhero/adapter-interfaces 0.7.0 → 0.8.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.
@@ -2927,7 +2927,7 @@ var s = /* @__PURE__ */ Object.freeze({
2927
2927
  ZodError: T
2928
2928
  });
2929
2929
  pt(s);
2930
- const An = s.object({
2930
+ const Pn = s.object({
2931
2931
  start: s.number(),
2932
2932
  limit: s.number(),
2933
2933
  length: s.number()
@@ -2979,77 +2979,14 @@ const An = s.object({
2979
2979
  is_social: s.boolean(),
2980
2980
  login_count: s.number(),
2981
2981
  identities: s.array(gn).optional()
2982
- }), Pn = vn, Mn = et.extend({
2982
+ }), Mn = vn, $n = et.extend({
2983
2983
  email: s.string(),
2984
2984
  login_count: s.number(),
2985
2985
  multifactor: s.array(s.string()).optional(),
2986
2986
  last_ip: s.string().optional(),
2987
2987
  last_login: s.string().optional(),
2988
2988
  user_id: s.string()
2989
- }).catchall(s.any());
2990
- var bn = /* @__PURE__ */ ((t) => (t.SUCCESS_API_OPERATION = "sapi", t.SUCCESS_SILENT_AUTH = "ssa", t.FAILED_SILENT_AUTH = "fsa", t.SUCCESS_SIGNUP = "ss", t.FAILED_SIGNUP = "fs", t.SUCCESS_LOGIN = "s", t.FAILED_LOGIN = "f", t.FAILED_LOGIN_INCORRECT_PASSWORD = "fp", t.SUCCESS_LOGOUT = "slo", t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa", t.FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa", t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft", t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft", t.CODE_LINK_SENT = "cls", t.NOT_IMPLEMENTED_1 = "seccft", t))(bn || {});
2991
- const kn = s.enum([
2992
- "sapi",
2993
- // SUCCESS_API_OPERATION
2994
- "ssa",
2995
- // SUCCESS_SILENT_AUTH - omitted for brevity and since it's clear from context
2996
- "fsa",
2997
- // FAILED_SILENT_AUTH
2998
- "ss",
2999
- // SUCCESS_SIGNUP
3000
- "ssa",
3001
- /// SUCCESS_SILENT_AUTH
3002
- "fs",
3003
- "s",
3004
- // SUCCESS_LOGIN
3005
- "f",
3006
- // FAILED_LOGIN
3007
- "fp",
3008
- // FAILED_LOGIN_INCORRECT_PASSWORD
3009
- // FAILED_LOGIN_INVALID_EMAIL_USERNAME = "fu", - we don't have this in the logs yet
3010
- "slo",
3011
- // SUCCESS_LOGOUT
3012
- "scoa",
3013
- // SUCCESS_CROSS_ORIGIN_AUTHENTICATION
3014
- "fcoa",
3015
- // FAILED_CROSS_ORIGIN_AUTHENTICATION
3016
- "seccft",
3017
- // NOT_IMPLEMENTED_1 - not implemented - just for completion as we do get this in our latest auth0 logs
3018
- "cls",
3019
- // NOT_IMPLEMENTED_2
3020
- "seacft",
3021
- // SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN
3022
- "serft"
3023
- ]), xn = s.object({
3024
- name: s.string(),
3025
- version: s.string(),
3026
- env: s.object({
3027
- node: s.string().optional()
3028
- }).optional()
3029
- }), $n = s.object({
3030
- type: kn,
3031
- date: s.string(),
3032
- description: s.string().optional(),
3033
- log_id: s.string().optional(),
3034
- _id: s.string().optional(),
3035
- ip: s.string(),
3036
- user_agent: s.string(),
3037
- details: s.any().optional(),
3038
- // Using z.any() as a placeholder for "details" type
3039
- isMobile: s.boolean(),
3040
- user_id: s.string().optional(),
3041
- user_name: s.string().optional(),
3042
- connection: s.string().optional(),
3043
- connection_id: s.string().optional(),
3044
- client_id: s.string().optional(),
3045
- client_name: s.string().optional(),
3046
- audience: s.string().optional(),
3047
- scope: s.array(s.string()).optional(),
3048
- strategy: s.string().optional(),
3049
- strategy_type: s.string().optional(),
3050
- hostname: s.string().optional(),
3051
- auth0_client: xn.optional()
3052
- }), wn = s.object({
2989
+ }).catchall(s.any()), bn = s.object({
3053
2990
  id: s.string(),
3054
2991
  name: s.string(),
3055
2992
  allowed_web_origins: s.string().transform((t) => t === null ? "" : t).default(""),
@@ -3061,7 +2998,7 @@ const kn = s.enum([
3061
2998
  }), Dn = s.object({
3062
2999
  created_at: s.string().transform((t) => t === null ? "" : t),
3063
3000
  updated_at: s.string().transform((t) => t === null ? "" : t)
3064
- }).extend(wn.shape);
3001
+ }).extend(bn.shape);
3065
3002
  var tt = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(tt || {}), nt = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t))(nt || {}), rt = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(rt || {});
3066
3003
  const Me = s.object({
3067
3004
  client_id: s.string(),
@@ -3076,7 +3013,7 @@ const Me = s.object({
3076
3013
  code_challenge_method: s.nativeEnum(rt).optional(),
3077
3014
  code_challenge: s.string().optional(),
3078
3015
  username: s.string().optional()
3079
- }), Sn = s.object({
3016
+ }), kn = s.object({
3080
3017
  authParams: Me,
3081
3018
  code: s.string(),
3082
3019
  user_id: s.string(),
@@ -3084,7 +3021,7 @@ const Me = s.object({
3084
3021
  expires_at: s.string(),
3085
3022
  used_at: s.string().optional()
3086
3023
  }), Un = s.object({
3087
- ...Sn.shape,
3024
+ ...kn.shape,
3088
3025
  created_at: s.string()
3089
3026
  }), Vn = s.object({
3090
3027
  colors: s.object({
@@ -3101,7 +3038,7 @@ const Me = s.object({
3101
3038
  font: s.object({
3102
3039
  url: s.string()
3103
3040
  }).optional()
3104
- }), Tn = s.object({
3041
+ }), xn = s.object({
3105
3042
  id: s.string().optional(),
3106
3043
  name: s.string(),
3107
3044
  client_id: s.string().optional(),
@@ -3120,7 +3057,7 @@ const Me = s.object({
3120
3057
  id: s.string(),
3121
3058
  created_at: s.string().transform((t) => t === null ? "" : t),
3122
3059
  updated_at: s.string().transform((t) => t === null ? "" : t)
3123
- }).extend(Tn.shape), On = s.object({
3060
+ }).extend(xn.shape), wn = s.object({
3124
3061
  domain: s.string(),
3125
3062
  dkim_private_key: s.string().optional(),
3126
3063
  dkim_public_key: s.string().optional(),
@@ -3129,7 +3066,7 @@ const Me = s.object({
3129
3066
  }), at = s.object({
3130
3067
  id: s.string(),
3131
3068
  name: s.string(),
3132
- domains: s.array(On),
3069
+ domains: s.array(wn),
3133
3070
  allowed_callback_urls: s.array(s.string()),
3134
3071
  allowed_logout_urls: s.array(s.string()),
3135
3072
  allowed_web_origins: s.array(s.string()),
@@ -3156,24 +3093,24 @@ const Me = s.object({
3156
3093
  connections: s.array(st)
3157
3094
  }), zn = at.extend({
3158
3095
  connections: s.array(st.partial())
3159
- }), En = s.object({
3096
+ }), Sn = s.object({
3160
3097
  domain: s.string(),
3161
3098
  dkim_private_key: s.string().optional(),
3162
3099
  dkim_public_key: s.string().optional(),
3163
3100
  email_api_key: s.string().optional(),
3164
3101
  email_service: s.enum(["mailgun", "mailchannels"])
3165
3102
  }), Bn = Pe.extend({
3166
- ...En.shape,
3103
+ ...Sn.shape,
3167
3104
  id: s.string()
3168
- }), Cn = s.object({
3105
+ }), Tn = s.object({
3169
3106
  trigger_id: s.enum(["post-user-registration", "post-user-login"]),
3170
3107
  enabled: s.boolean().default(!1),
3171
3108
  url: s.string(),
3172
3109
  hook_id: s.string().optional()
3173
- }), Wn = Cn.extend({
3110
+ }), Wn = Tn.extend({
3174
3111
  ...Pe.shape,
3175
3112
  hook_id: s.string()
3176
- }), jn = s.object({
3113
+ }), On = s.object({
3177
3114
  alg: s.string(),
3178
3115
  e: s.string(),
3179
3116
  kid: s.string(),
@@ -3181,7 +3118,7 @@ const Me = s.object({
3181
3118
  n: s.string(),
3182
3119
  use: s.string().optional()
3183
3120
  }), qn = s.object({
3184
- keys: s.array(jn)
3121
+ keys: s.array(On)
3185
3122
  }), Gn = s.object({
3186
3123
  issuer: s.string(),
3187
3124
  authorization_endpoint: s.string(),
@@ -3203,7 +3140,7 @@ const Me = s.object({
3203
3140
  request_uri_parameter_supported: s.boolean(),
3204
3141
  request_parameter_supported: s.boolean(),
3205
3142
  token_endpoint_auth_signing_alg_values_supported: s.array(s.string())
3206
- }), Zn = s.object({
3143
+ }), En = s.object({
3207
3144
  id: s.string(),
3208
3145
  email: s.string(),
3209
3146
  code: s.string(),
@@ -3215,24 +3152,31 @@ const Me = s.object({
3215
3152
  user_id: s.string().optional()
3216
3153
  }), Hn = s.object({
3217
3154
  created_at: s.string(),
3218
- ...Zn.shape
3219
- }), Nn = s.object({
3155
+ ...En.shape
3156
+ }), Cn = s.object({
3157
+ user_id: s.string(),
3158
+ password: s.string()
3159
+ }), Kn = s.object({
3160
+ ...Cn.shape,
3161
+ created_at: s.string(),
3162
+ updated_at: s.string()
3163
+ }), jn = s.object({
3220
3164
  session_id: s.string(),
3221
3165
  client_id: s.string(),
3222
3166
  expires_at: s.string(),
3223
3167
  used_at: s.string(),
3224
3168
  deleted_at: s.string().optional(),
3225
3169
  user_id: s.string()
3226
- }), Kn = s.object({
3227
- created_at: s.string(),
3228
- ...Nn.shape
3229
3170
  }), Yn = s.object({
3171
+ created_at: s.string(),
3172
+ ...jn.shape
3173
+ }), Jn = s.object({
3230
3174
  private_key: s.string(),
3231
3175
  public_key: s.string(),
3232
3176
  kid: s.string(),
3233
3177
  created_at: s.string(),
3234
3178
  revoked_at: s.string().optional()
3235
- }), Jn = s.object({
3179
+ }), Fn = s.object({
3236
3180
  kid: s.string().openapi({ description: "The key id of the signing key" }),
3237
3181
  cert: s.string().openapi({ description: "The public certificate of the signing key" }),
3238
3182
  fingerprint: s.string().openapi({ description: "The cert fingerprint" }),
@@ -3251,7 +3195,7 @@ const Me = s.object({
3251
3195
  }),
3252
3196
  revoked: s.boolean().optional().openapi({ description: "True if the key is revoked" }),
3253
3197
  revoked_at: s.string().optional().openapi({ description: "The date and time when the key was revoked" })
3254
- }), In = s.object({
3198
+ }), Zn = s.object({
3255
3199
  name: s.string(),
3256
3200
  audience: s.string(),
3257
3201
  sender_email: s.string().email(),
@@ -3261,10 +3205,10 @@ const Me = s.object({
3261
3205
  primary_color: s.string().optional(),
3262
3206
  secondary_color: s.string().optional(),
3263
3207
  language: s.string().optional()
3264
- }), Fn = In.extend({
3208
+ }), Xn = Zn.extend({
3265
3209
  created_at: s.string().transform((t) => t === null ? "" : t),
3266
3210
  updated_at: s.string().transform((t) => t === null ? "" : t)
3267
- }), Xn = s.object({
3211
+ }), Qn = s.object({
3268
3212
  logoUrl: s.string(),
3269
3213
  loginBackgroundImage: s.string().nullish(),
3270
3214
  style: s.object({
@@ -3283,7 +3227,7 @@ const Me = s.object({
3283
3227
  manageSubscriptionsUrl: s.string().optional()
3284
3228
  });
3285
3229
  var it = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t))(it || {});
3286
- const $e = s.nativeEnum(it), Qn = s.object({
3230
+ const $e = s.nativeEnum(it), er = s.object({
3287
3231
  grant_type: $e.refine(
3288
3232
  (t) => t === "authorization_code"
3289
3233
  /* AuthorizationCode */
@@ -3291,7 +3235,7 @@ const $e = s.nativeEnum(it), Qn = s.object({
3291
3235
  code: s.string(),
3292
3236
  client_secret: s.string(),
3293
3237
  client_id: s.string()
3294
- }), er = s.object({
3238
+ }), tr = s.object({
3295
3239
  grant_type: $e.refine(
3296
3240
  (t) => t === "authorization_code"
3297
3241
  /* AuthorizationCode */
@@ -3300,7 +3244,7 @@ const $e = s.nativeEnum(it), Qn = s.object({
3300
3244
  code_verifier: s.string(),
3301
3245
  client_id: s.string().optional(),
3302
3246
  redirect_uri: s.string()
3303
- }), tr = s.object({
3247
+ }), nr = s.object({
3304
3248
  grant_type: $e.refine(
3305
3249
  (t) => t === "client_credentials"
3306
3250
  /* ClientCredential */
@@ -3323,66 +3267,133 @@ s.object({
3323
3267
  code: s.string(),
3324
3268
  state: s.string().optional()
3325
3269
  });
3326
- const Rn = s.object({
3270
+ const Nn = s.object({
3327
3271
  id: s.string(),
3328
3272
  expires_at: s.string(),
3329
3273
  auth0Client: s.string().optional(),
3330
3274
  authParams: Me
3331
- }), nr = s.object({
3332
- ...Rn.shape,
3275
+ }), rr = s.object({
3276
+ ...Nn.shape,
3333
3277
  created_at: s.string(),
3334
3278
  updated_at: s.string()
3335
3279
  });
3336
- function rr(t) {
3280
+ var In = /* @__PURE__ */ ((t) => (t.SUCCESS_API_OPERATION = "sapi", t.SUCCESS_SILENT_AUTH = "ssa", t.FAILED_SILENT_AUTH = "fsa", t.SUCCESS_SIGNUP = "ss", t.FAILED_SIGNUP = "fs", t.SUCCESS_LOGIN = "s", t.FAILED_LOGIN = "f", t.FAILED_LOGIN_INCORRECT_PASSWORD = "fp", t.SUCCESS_LOGOUT = "slo", t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa", t.FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa", t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft", t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft", t.CODE_LINK_SENT = "cls", t.NOT_IMPLEMENTED_1 = "seccft", t))(In || {});
3281
+ const Rn = s.enum([
3282
+ "sapi",
3283
+ // SUCCESS_API_OPERATION
3284
+ "ssa",
3285
+ // SUCCESS_SILENT_AUTH - omitted for brevity and since it's clear from context
3286
+ "fsa",
3287
+ // FAILED_SILENT_AUTH
3288
+ "ss",
3289
+ // SUCCESS_SIGNUP
3290
+ "ssa",
3291
+ /// SUCCESS_SILENT_AUTH
3292
+ "fs",
3293
+ "s",
3294
+ // SUCCESS_LOGIN
3295
+ "f",
3296
+ // FAILED_LOGIN
3297
+ "fp",
3298
+ // FAILED_LOGIN_INCORRECT_PASSWORD
3299
+ // FAILED_LOGIN_INVALID_EMAIL_USERNAME = "fu", - we don't have this in the logs yet
3300
+ "slo",
3301
+ // SUCCESS_LOGOUT
3302
+ "scoa",
3303
+ // SUCCESS_CROSS_ORIGIN_AUTHENTICATION
3304
+ "fcoa",
3305
+ // FAILED_CROSS_ORIGIN_AUTHENTICATION
3306
+ "seccft",
3307
+ // NOT_IMPLEMENTED_1 - not implemented - just for completion as we do get this in our latest auth0 logs
3308
+ "cls",
3309
+ // NOT_IMPLEMENTED_2
3310
+ "seacft",
3311
+ // SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN
3312
+ "serft"
3313
+ ]), An = s.object({
3314
+ name: s.string(),
3315
+ version: s.string(),
3316
+ env: s.object({
3317
+ node: s.string().optional()
3318
+ }).optional()
3319
+ }), sr = s.object({
3320
+ type: Rn,
3321
+ date: s.string(),
3322
+ description: s.string().optional(),
3323
+ log_id: s.string().optional(),
3324
+ _id: s.string().optional(),
3325
+ ip: s.string(),
3326
+ user_agent: s.string(),
3327
+ details: s.any().optional(),
3328
+ // Using z.any() as a placeholder for "details" type
3329
+ isMobile: s.boolean(),
3330
+ user_id: s.string().optional(),
3331
+ user_name: s.string().optional(),
3332
+ connection: s.string().optional(),
3333
+ connection_id: s.string().optional(),
3334
+ client_id: s.string().optional(),
3335
+ client_name: s.string().optional(),
3336
+ audience: s.string().optional(),
3337
+ scope: s.array(s.string()).optional(),
3338
+ strategy: s.string().optional(),
3339
+ strategy_type: s.string().optional(),
3340
+ hostname: s.string().optional(),
3341
+ auth0_client: An.optional()
3342
+ });
3343
+ function ar(t) {
3337
3344
  const [e, n] = t.split("|");
3338
3345
  if (!e || !n)
3339
3346
  throw new Error(`Invalid user_id: ${t}`);
3340
3347
  return { connection: e, id: n };
3341
3348
  }
3342
3349
  export {
3343
- xn as Auth0Client,
3350
+ An as Auth0Client,
3344
3351
  nt as AuthorizationResponseMode,
3345
3352
  tt as AuthorizationResponseType,
3346
3353
  Ln as ClientSchema,
3347
3354
  rt as CodeChallengeMethod,
3348
3355
  it as GrantType,
3349
- bn as LogTypes,
3356
+ In as LogTypes,
3350
3357
  zn as PartialClientSchema,
3351
- wn as applicationInsertSchema,
3358
+ bn as applicationInsertSchema,
3352
3359
  Dn as applicationSchema,
3353
- Pn as auth0UserResponseSchema,
3360
+ Mn as auth0UserResponseSchema,
3354
3361
  Me as authParamsSchema,
3355
- Sn as authenticationCodeInsertSchema,
3362
+ kn as authenticationCodeInsertSchema,
3356
3363
  Un as authenticationCodeSchema,
3357
- Qn as authorizationCodeGrantTypeParamsSchema,
3364
+ er as authorizationCodeGrantTypeParamsSchema,
3358
3365
  et as baseUserSchema,
3359
3366
  Vn as brandingSchema,
3360
- Yn as certificateSchema,
3361
- tr as clientCredentialGrantTypeParamsSchema,
3362
- Tn as connectionInsertSchema,
3367
+ Jn as certificateSchema,
3368
+ nr as clientCredentialGrantTypeParamsSchema,
3369
+ xn as connectionInsertSchema,
3363
3370
  st as connectionSchema,
3364
- En as domainInsertSchema,
3371
+ Sn as domainInsertSchema,
3365
3372
  Bn as domainSchema,
3366
- Cn as hookInsertSchema,
3373
+ Tn as hookInsertSchema,
3367
3374
  Wn as hookSchema,
3375
+ gn as identitySchema,
3368
3376
  qn as jwksKeySchema,
3369
- jn as jwksSchema,
3370
- $n as logSchema,
3377
+ On as jwksSchema,
3378
+ sr as logSchema,
3371
3379
  Gn as openIDConfigurationSchema,
3372
- Zn as otpInsertSchema,
3380
+ En as otpInsertSchema,
3373
3381
  Hn as otpSchema,
3374
- rr as parseUserId,
3375
- er as pkceAuthorizationCodeGrantTypeParamsSchema,
3376
- Nn as sessionInsertSchema,
3377
- Kn as sessionSchema,
3378
- Jn as signingKeySchema,
3379
- In as tenantInsertSchema,
3380
- Fn as tenantSchema,
3381
- An as totalsSchema,
3382
- Rn as universalLoginSessionInsertSchema,
3383
- nr as universalLoginSessionSchema,
3382
+ ar as parseUserId,
3383
+ Cn as passwordInsertSchema,
3384
+ Kn as passwordSchema,
3385
+ tr as pkceAuthorizationCodeGrantTypeParamsSchema,
3386
+ _n as profileDataSchema,
3387
+ jn as sessionInsertSchema,
3388
+ Yn as sessionSchema,
3389
+ Fn as signingKeySchema,
3390
+ Zn as tenantInsertSchema,
3391
+ Xn as tenantSchema,
3392
+ Pn as totalsSchema,
3393
+ Nn as universalLoginSessionInsertSchema,
3394
+ rr as universalLoginSessionSchema,
3384
3395
  yn as userInsertSchema,
3385
- Mn as userResponseSchema,
3396
+ $n as userResponseSchema,
3386
3397
  vn as userSchema,
3387
- Xn as vendorSettingsSchema
3398
+ Qn as vendorSettingsSchema
3388
3399
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.7.0",
14
+ "version": "0.8.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],