@authhero/adapter-interfaces 0.15.0 → 0.15.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.
@@ -22,8 +22,8 @@ function lt(t) {
22
22
  return;
23
23
  t.ZodType.prototype.openapi = function(a, i) {
24
24
  var o, c, u, l, m, x;
25
- const z = typeof a == "string" ? i : a, B = z ?? {}, { param: Ue } = B, at = ct(B, ["param"]), $e = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof a == "string" ? { refId: a } : void 0), Ve = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), at), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || Ue ? {
26
- param: Object.assign(Object.assign({}, (x = (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata) === null || x === void 0 ? void 0 : x.param), Ue)
25
+ const z = typeof a == "string" ? i : a, B = z ?? {}, { param: De } = B, at = ct(B, ["param"]), $e = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof a == "string" ? { refId: a } : void 0), Ve = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), at), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || De ? {
26
+ param: Object.assign(Object.assign({}, (x = (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata) === null || x === void 0 ? void 0 : x.param), De)
27
27
  } : void 0), Le = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys($e).length > 0 ? { _internal: $e } : void 0), Object.keys(Ve).length > 0 ? { metadata: Ve } : void 0) }));
28
28
  if (dt(this, "ZodObject")) {
29
29
  const it = this.extend;
@@ -528,7 +528,7 @@ class v {
528
528
  return j.create(this, this._def);
529
529
  }
530
530
  nullable() {
531
- return U.create(this, this._def);
531
+ return D.create(this, this._def);
532
532
  }
533
533
  nullish() {
534
534
  return this.nullable().optional();
@@ -1567,7 +1567,7 @@ function H(t) {
1567
1567
  } else return t instanceof C ? new C({
1568
1568
  ...t._def,
1569
1569
  type: H(t.element)
1570
- }) : t instanceof j ? j.create(H(t.unwrap())) : t instanceof U ? U.create(H(t.unwrap())) : t instanceof N ? N.create(t.items.map((e) => H(e))) : t;
1570
+ }) : t instanceof j ? j.create(H(t.unwrap())) : t instanceof D ? D.create(H(t.unwrap())) : t instanceof N ? N.create(t.items.map((e) => H(e))) : t;
1571
1571
  }
1572
1572
  class k extends v {
1573
1573
  constructor() {
@@ -1929,7 +1929,7 @@ ae.create = (t, e) => new ae({
1929
1929
  typeName: _.ZodUnion,
1930
1930
  ...y(e)
1931
1931
  });
1932
- const Z = (t) => t instanceof ce ? Z(t.schema) : t instanceof O ? Z(t.innerType()) : t instanceof de ? [t.value] : t instanceof D ? t.options : t instanceof le ? b.objectValues(t.enum) : t instanceof ue ? Z(t._def.innerType) : t instanceof re ? [void 0] : t instanceof se ? [null] : t instanceof j ? [void 0, ...Z(t.unwrap())] : t instanceof U ? [null, ...Z(t.unwrap())] : t instanceof Pe || t instanceof he ? Z(t.unwrap()) : t instanceof pe ? Z(t._def.innerType) : [];
1932
+ const Z = (t) => t instanceof ce ? Z(t.schema) : t instanceof O ? Z(t.innerType()) : t instanceof de ? [t.value] : t instanceof U ? t.options : t instanceof le ? b.objectValues(t.enum) : t instanceof ue ? Z(t._def.innerType) : t instanceof re ? [void 0] : t instanceof se ? [null] : t instanceof j ? [void 0, ...Z(t.unwrap())] : t instanceof D ? [null, ...Z(t.unwrap())] : t instanceof Pe || t instanceof he ? Z(t.unwrap()) : t instanceof pe ? Z(t._def.innerType) : [];
1933
1933
  class xe extends v {
1934
1934
  _parse(e) {
1935
1935
  const { ctx: n } = this._processInputParams(e);
@@ -2396,13 +2396,13 @@ de.create = (t, e) => new de({
2396
2396
  ...y(e)
2397
2397
  });
2398
2398
  function Ye(t, e) {
2399
- return new D({
2399
+ return new U({
2400
2400
  values: t,
2401
2401
  typeName: _.ZodEnum,
2402
2402
  ...y(e)
2403
2403
  });
2404
2404
  }
2405
- class D extends v {
2405
+ class U extends v {
2406
2406
  constructor() {
2407
2407
  super(...arguments), Q.set(this, void 0);
2408
2408
  }
@@ -2447,20 +2447,20 @@ class D extends v {
2447
2447
  return e;
2448
2448
  }
2449
2449
  extract(e, n = this._def) {
2450
- return D.create(e, {
2450
+ return U.create(e, {
2451
2451
  ...this._def,
2452
2452
  ...n
2453
2453
  });
2454
2454
  }
2455
2455
  exclude(e, n = this._def) {
2456
- return D.create(this.options.filter((s) => !e.includes(s)), {
2456
+ return U.create(this.options.filter((s) => !e.includes(s)), {
2457
2457
  ...this._def,
2458
2458
  ...n
2459
2459
  });
2460
2460
  }
2461
2461
  }
2462
2462
  Q = /* @__PURE__ */ new WeakMap();
2463
- D.create = Ye;
2463
+ U.create = Ye;
2464
2464
  class le extends v {
2465
2465
  constructor() {
2466
2466
  super(...arguments), X.set(this, void 0);
@@ -2621,7 +2621,7 @@ j.create = (t, e) => new j({
2621
2621
  typeName: _.ZodOptional,
2622
2622
  ...y(e)
2623
2623
  });
2624
- class U extends v {
2624
+ class D extends v {
2625
2625
  _parse(e) {
2626
2626
  return this._getType(e) === h.null ? S(null) : this._def.innerType._parse(e);
2627
2627
  }
@@ -2629,7 +2629,7 @@ class U extends v {
2629
2629
  return this._def.innerType;
2630
2630
  }
2631
2631
  }
2632
- U.create = (t, e) => new U({
2632
+ D.create = (t, e) => new D({
2633
2633
  innerType: t,
2634
2634
  typeName: _.ZodNullable,
2635
2635
  ...y(e)
@@ -2800,7 +2800,7 @@ var _;
2800
2800
  })(_ || (_ = {}));
2801
2801
  const Nt = (t, e = {
2802
2802
  message: `Input not instance of ${t.name}`
2803
- }) => Ke((n) => n instanceof t, e), Je = E.create, Qe = P.create, Zt = ke.create, Rt = M.create, Xe = ne.create, At = V.create, Pt = ye.create, Mt = re.create, Dt = se.create, Ut = Y.create, $t = $.create, Vt = R.create, Lt = ve.create, zt = C.create, Bt = k.create, Wt = k.strictCreate, Ht = ae.create, qt = xe.create, Gt = ie.create, Ft = N.create, Yt = oe.create, Kt = be.create, Jt = L.create, Qt = G.create, Xt = ce.create, en = de.create, tn = D.create, nn = le.create, rn = K.create, Be = O.create, sn = j.create, an = U.create, on = O.createWithPreprocess, cn = fe.create, dn = () => Je().optional(), ln = () => Qe().optional(), un = () => Xe().optional(), pn = {
2803
+ }) => Ke((n) => n instanceof t, e), Je = E.create, Qe = P.create, Zt = ke.create, Rt = M.create, Xe = ne.create, At = V.create, Pt = ye.create, Mt = re.create, Ut = se.create, Dt = Y.create, $t = $.create, Vt = R.create, Lt = ve.create, zt = C.create, Bt = k.create, Wt = k.strictCreate, Ht = ae.create, qt = xe.create, Gt = ie.create, Ft = N.create, Yt = oe.create, Kt = be.create, Jt = L.create, Qt = G.create, Xt = ce.create, en = de.create, tn = U.create, nn = le.create, rn = K.create, Be = O.create, sn = j.create, an = D.create, on = O.createWithPreprocess, cn = fe.create, dn = () => Je().optional(), ln = () => Qe().optional(), un = () => Xe().optional(), pn = {
2804
2804
  string: (t) => E.create({ ...t, coerce: !0 }),
2805
2805
  number: (t) => P.create({ ...t, coerce: !0 }),
2806
2806
  boolean: (t) => ne.create({
@@ -2860,13 +2860,13 @@ var r = /* @__PURE__ */ Object.freeze({
2860
2860
  ZodFunction: G,
2861
2861
  ZodLazy: ce,
2862
2862
  ZodLiteral: de,
2863
- ZodEnum: D,
2863
+ ZodEnum: U,
2864
2864
  ZodNativeEnum: le,
2865
2865
  ZodPromise: K,
2866
2866
  ZodEffects: O,
2867
2867
  ZodTransformer: O,
2868
2868
  ZodOptional: j,
2869
- ZodNullable: U,
2869
+ ZodNullable: D,
2870
2870
  ZodDefault: ue,
2871
2871
  ZodCatch: pe,
2872
2872
  ZodNaN: ke,
@@ -2882,7 +2882,7 @@ var r = /* @__PURE__ */ Object.freeze({
2882
2882
  return _;
2883
2883
  },
2884
2884
  coerce: pn,
2885
- any: Ut,
2885
+ any: Dt,
2886
2886
  array: zt,
2887
2887
  bigint: Rt,
2888
2888
  boolean: Xe,
@@ -2899,7 +2899,7 @@ var r = /* @__PURE__ */ Object.freeze({
2899
2899
  nan: Zt,
2900
2900
  nativeEnum: nn,
2901
2901
  never: Vt,
2902
- null: Dt,
2902
+ null: Ut,
2903
2903
  nullable: an,
2904
2904
  number: Qe,
2905
2905
  object: Bt,
@@ -3070,7 +3070,17 @@ const kn = r.object({
3070
3070
  }), xn = r.object({
3071
3071
  id: r.string().optional(),
3072
3072
  name: r.string(),
3073
- strategy: r.enum(["google-oauth2", "facebook", "vipps", "apple", "email"]).optional(),
3073
+ strategy: r.enum([
3074
+ "google-oauth2",
3075
+ "facebook",
3076
+ "vipps",
3077
+ "apple",
3078
+ "email",
3079
+ "Username-Password-Authentication",
3080
+ "oidc",
3081
+ "oauth2",
3082
+ "custom"
3083
+ ]).optional(),
3074
3084
  options: r.object({
3075
3085
  kid: r.string().optional(),
3076
3086
  team_id: r.string().optional(),
@@ -3079,7 +3089,7 @@ const kn = r.object({
3079
3089
  client_secret: r.string().optional(),
3080
3090
  app_secret: r.string().optional(),
3081
3091
  scope: r.string().optional()
3082
- }),
3092
+ }).optional(),
3083
3093
  enabled_clients: r.array(r.string()).optional(),
3084
3094
  authorization_endpoint: r.string().optional(),
3085
3095
  response_type: r.custom().optional(),
@@ -3335,7 +3345,7 @@ const An = r.enum([
3335
3345
  ...Mn.shape,
3336
3346
  created_at: r.string(),
3337
3347
  updated_at: r.string()
3338
- }), Dn = r.object({
3348
+ }), Un = r.object({
3339
3349
  session_id: r.string(),
3340
3350
  client_id: r.string(),
3341
3351
  expires_at: r.string(),
@@ -3344,7 +3354,7 @@ const An = r.enum([
3344
3354
  user_id: r.string()
3345
3355
  }), rr = r.object({
3346
3356
  created_at: r.string(),
3347
- ...Dn.shape
3357
+ ...Un.shape
3348
3358
  }), sr = r.object({
3349
3359
  kid: r.string().openapi({ description: "The key id of the signing key" }),
3350
3360
  cert: r.string().openapi({ description: "The public certificate of the signing key" }),
@@ -3366,8 +3376,8 @@ const An = r.enum([
3366
3376
  revoked_at: r.string().optional().openapi({ description: "The date and time when the key was revoked" })
3367
3377
  });
3368
3378
  var st = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t))(st || {});
3369
- const De = r.nativeEnum(st), ar = r.object({
3370
- grant_type: De.refine(
3379
+ const Ue = r.nativeEnum(st), ar = r.object({
3380
+ grant_type: Ue.refine(
3371
3381
  (t) => t === "authorization_code"
3372
3382
  /* AuthorizationCode */
3373
3383
  ),
@@ -3375,7 +3385,7 @@ const De = r.nativeEnum(st), ar = r.object({
3375
3385
  client_secret: r.string(),
3376
3386
  client_id: r.string()
3377
3387
  }), ir = r.object({
3378
- grant_type: De.refine(
3388
+ grant_type: Ue.refine(
3379
3389
  (t) => t === "authorization_code"
3380
3390
  /* AuthorizationCode */
3381
3391
  ),
@@ -3384,7 +3394,7 @@ const De = r.nativeEnum(st), ar = r.object({
3384
3394
  client_id: r.string().optional(),
3385
3395
  redirect_uri: r.string()
3386
3396
  }), or = r.object({
3387
- grant_type: De.refine(
3397
+ grant_type: Ue.refine(
3388
3398
  (t) => t === "client_credentials"
3389
3399
  /* ClientCredential */
3390
3400
  ),
@@ -3406,7 +3416,7 @@ r.object({
3406
3416
  code: r.string(),
3407
3417
  state: r.string().optional()
3408
3418
  });
3409
- const Un = r.object({
3419
+ const Dn = r.object({
3410
3420
  button_border_radius: r.number(),
3411
3421
  button_border_weight: r.number(),
3412
3422
  buttons_style: r.enum(["pill"]),
@@ -3460,7 +3470,7 @@ const Un = r.object({
3460
3470
  logo_url: r.string(),
3461
3471
  social_buttons_layout: r.enum(["bottom"])
3462
3472
  }), Bn = r.object({
3463
- borders: Un,
3473
+ borders: Dn,
3464
3474
  colors: $n,
3465
3475
  displayName: r.string(),
3466
3476
  fonts: Vn,
@@ -3493,7 +3503,7 @@ export {
3493
3503
  kn as authParamsSchema,
3494
3504
  ar as authorizationCodeGrantTypeParamsSchema,
3495
3505
  et as baseUserSchema,
3496
- Un as bordersSchema,
3506
+ Dn as bordersSchema,
3497
3507
  Gn as brandingSchema,
3498
3508
  or as clientCredentialGrantTypeParamsSchema,
3499
3509
  On as codeInsertSchema,
@@ -3523,7 +3533,7 @@ export {
3523
3533
  fn as profileDataSchema,
3524
3534
  dr as promptSettingSchema,
3525
3535
  yn as samlpAddon,
3526
- Dn as sessionInsertSchema,
3536
+ Un as sessionInsertSchema,
3527
3537
  rr as sessionSchema,
3528
3538
  sr as signingKeySchema,
3529
3539
  Sn as tenantInsertSchema,
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.15.0",
14
+ "version": "0.15.1",
15
15
  "files": [
16
16
  "dist"
17
17
  ],