@authhero/adapter-interfaces 1.19.0 → 2.0.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.
@@ -19,7 +19,15 @@ const a = e.object({
19
19
  supported_triggers: e.array(j).optional(),
20
20
  runtime: e.string().max(50).optional(),
21
21
  dependencies: e.array(k).optional(),
22
- secrets: e.array(R).optional()
22
+ secrets: e.array(R).optional(),
23
+ // Marks this action as a shared template owned by the control-plane tenant.
24
+ // Other tenants can opt-in by creating a row with the same `name` and
25
+ // `inherit: true`; at execute time the loader reads code from this row.
26
+ is_system: e.boolean().optional(),
27
+ // On a non-control-plane tenant, indicates the action's `code` should be
28
+ // read through from the control-plane system action with a matching name.
29
+ // The local `secrets` still override (local-first then upstream fallback).
30
+ inherit: e.boolean().optional()
23
31
  }), en = v.partial().extend({
24
32
  status: e.enum(["draft", "built"]).optional(),
25
33
  deployed_at: e.string().optional()
@@ -60,7 +68,7 @@ const a = e.object({
60
68
  action_name: e.string(),
61
69
  lines: e.array(ie)
62
70
  })
63
- ), se = e.object({
71
+ ), re = e.object({
64
72
  id: e.string(),
65
73
  tenant_id: e.string(),
66
74
  trigger_id: ee,
@@ -69,11 +77,11 @@ const a = e.object({
69
77
  logs: ae.optional(),
70
78
  created_at: e.string(),
71
79
  updated_at: e.string()
72
- }), on = se.omit({
80
+ }), on = re.omit({
73
81
  tenant_id: !0,
74
82
  created_at: !0,
75
83
  updated_at: !0
76
- }), re = e.object({
84
+ }), se = e.object({
77
85
  action_id: e.string(),
78
86
  code: e.string().max(1e5),
79
87
  runtime: e.string().max(50).optional(),
@@ -81,7 +89,7 @@ const a = e.object({
81
89
  secrets: e.array(R).optional(),
82
90
  supported_triggers: e.array(j).optional(),
83
91
  deployed: e.boolean().default(!0)
84
- }), nn = re.extend({
92
+ }), nn = se.extend({
85
93
  id: e.string(),
86
94
  tenant_id: e.string(),
87
95
  number: e.number().int(),
@@ -149,7 +157,7 @@ const a = e.object({
149
157
  timestamp: e.string()
150
158
  }), an = me.extend({
151
159
  id: e.string()
152
- }), sn = e.enum(["AUTH0", "EMAIL", "REDIRECT"]), rn = e.enum([
160
+ }), rn = e.enum(["AUTH0", "EMAIL", "REDIRECT"]), sn = e.enum([
153
161
  "CREATE_USER",
154
162
  "GET_USER",
155
163
  "UPDATE_USER",
@@ -490,11 +498,8 @@ const ke = e.object({
490
498
  client_metadata: e.record(e.string().max(255)).default({}).optional().openapi({
491
499
  description: 'Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/()<>@ [Tab][Space]'
492
500
  }),
493
- disable_sign_ups: e.boolean().default(!1).optional().openapi({
494
- description: "When true, blocks new user sign-ups via this client. The identifier/signup screen rejects emails that don't match an existing user with `User account does not exist` (unless `hide_sign_up_disabled_error` is also set). Existing users — including those signing in via a federated connection that links to an existing account — are unaffected."
495
- }),
496
501
  hide_sign_up_disabled_error: e.boolean().default(!1).optional().openapi({
497
- description: "Enumeration-safe variant of `disable_sign_ups`. When both are true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message."
502
+ description: "Enumeration-safe variant of the connection-level `disable_signup` flag. When a signup is blocked by the password connection and this is true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message."
498
503
  }),
499
504
  mobile: e.record(e.any()).default({}).optional().openapi({
500
505
  description: "Additional configuration for native mobile apps."
@@ -754,7 +759,7 @@ const C = e.object({
754
759
  Me
755
760
  ]);
756
761
  var Ge = /* @__PURE__ */ ((t) => (t.STEP = "STEP", t.FLOW = "FLOW", t.CONDITION = "CONDITION", t.ACTION = "ACTION", t))(Ge || {});
757
- const We = e.object({
762
+ const Be = e.object({
758
763
  id: e.string(),
759
764
  type: e.literal(
760
765
  "STEP"
@@ -766,7 +771,7 @@ const We = e.object({
766
771
  components: e.array(He),
767
772
  next_node: e.string()
768
773
  }).passthrough()
769
- }), Be = e.object({
774
+ }), We = e.object({
770
775
  id: e.string(),
771
776
  type: e.literal(
772
777
  "FLOW"
@@ -805,8 +810,8 @@ const We = e.object({
805
810
  type: e.string(),
806
811
  coordinates: m
807
812
  }).passthrough(), qe = e.union([
808
- We,
809
813
  Be,
814
+ We,
810
815
  Ke,
811
816
  ze
812
817
  ]), Xe = e.object({
@@ -996,8 +1001,19 @@ const w = e.union([
996
1001
  disable_signup: e.boolean().optional(),
997
1002
  // Brute force protection
998
1003
  brute_force_protection: e.boolean().optional(),
999
- // Import mode
1004
+ // Import mode (Auth0 custom-DB semantics): when true and a successful
1005
+ // upstream verification occurs, the user/password row is created locally
1006
+ // so subsequent logins are served entirely from authhero.
1000
1007
  import_mode: e.boolean().optional(),
1008
+ // Upstream migration credentials. Mirrors Auth0's
1009
+ // `options.configuration` (encrypted env-vars accessed from custom
1010
+ // scripts). For lazy migration, set when `import_mode: true`.
1011
+ configuration: e.object({
1012
+ token_endpoint: e.string().optional(),
1013
+ userinfo_endpoint: e.string().optional(),
1014
+ client_id: e.string().optional(),
1015
+ client_secret: e.string().optional()
1016
+ }).optional(),
1001
1017
  // Flexible Identifiers: attributes schema (replaces legacy requires_username)
1002
1018
  attributes: e.object({
1003
1019
  email: e.object({
@@ -1150,12 +1166,12 @@ const tt = e.object({
1150
1166
  config: e.object({
1151
1167
  text: e.string().optional()
1152
1168
  }).optional()
1153
- }), st = l.extend({
1169
+ }), rt = l.extend({
1154
1170
  type: e.literal("HTML"),
1155
1171
  config: e.object({
1156
1172
  content: e.string().optional()
1157
1173
  }).optional()
1158
- }), rt = l.extend({
1174
+ }), st = l.extend({
1159
1175
  type: e.literal("IMAGE"),
1160
1176
  config: e.object({
1161
1177
  src: e.string().optional(),
@@ -1373,8 +1389,8 @@ const tt = e.object({
1373
1389
  }).optional()
1374
1390
  }), Dt = e.discriminatedUnion("type", [
1375
1391
  at,
1376
- st,
1377
1392
  rt,
1393
+ st,
1378
1394
  lt,
1379
1395
  ct,
1380
1396
  pt,
@@ -1513,7 +1529,7 @@ const tt = e.object({
1513
1529
  id: e.number().optional(),
1514
1530
  text: e.string(),
1515
1531
  type: e.enum(["info", "error", "success", "warning"])
1516
- }), Wt = e.object({
1532
+ }), Bt = e.object({
1517
1533
  id: e.string().optional(),
1518
1534
  text: e.string(),
1519
1535
  href: e.string(),
@@ -1527,7 +1543,7 @@ const tt = e.object({
1527
1543
  description: e.string().optional(),
1528
1544
  components: e.array(M),
1529
1545
  messages: e.array(Gt).optional(),
1530
- links: e.array(Wt).optional(),
1546
+ links: e.array(Bt).optional(),
1531
1547
  /** Footer HTML content displayed at the very bottom of the widget (e.g., terms and conditions) */
1532
1548
  footer: e.string().optional()
1533
1549
  });
@@ -1556,12 +1572,12 @@ const H = e.enum([
1556
1572
  "validate-registration-username",
1557
1573
  "pre-user-deletion",
1558
1574
  "post-user-deletion"
1559
- ]), W = e.enum([
1575
+ ]), B = e.enum([
1560
1576
  "post-user-login",
1561
1577
  "post-user-registration",
1562
1578
  "post-user-update",
1563
1579
  "credentials-exchange"
1564
- ]), B = e.enum([
1580
+ ]), W = e.enum([
1565
1581
  "post-user-login",
1566
1582
  "credentials-exchange",
1567
1583
  "pre-user-registration",
@@ -1607,7 +1623,7 @@ const H = e.enum([
1607
1623
  * Everything else is opaque to the runtime. Persisted as JSON.
1608
1624
  */
1609
1625
  metadata: e.record(e.unknown()).optional()
1610
- }, Bt = e.object({
1626
+ }, Wt = e.object({
1611
1627
  ...c,
1612
1628
  trigger_id: H,
1613
1629
  url: e.string()
@@ -1617,14 +1633,14 @@ const H = e.enum([
1617
1633
  form_id: e.string()
1618
1634
  }), zt = e.object({
1619
1635
  ...c,
1620
- trigger_id: W,
1636
+ trigger_id: B,
1621
1637
  template_id: K
1622
1638
  }), qt = e.object({
1623
1639
  ...c,
1624
- trigger_id: B,
1640
+ trigger_id: W,
1625
1641
  code_id: e.string()
1626
1642
  }), kn = e.union([
1627
- Bt,
1643
+ Wt,
1628
1644
  Kt,
1629
1645
  zt,
1630
1646
  qt
@@ -1642,13 +1658,13 @@ const H = e.enum([
1642
1658
  form_id: e.string()
1643
1659
  }), Yt = e.object({
1644
1660
  ...c,
1645
- trigger_id: W,
1661
+ trigger_id: B,
1646
1662
  ...a.shape,
1647
1663
  hook_id: e.string(),
1648
1664
  template_id: K
1649
1665
  }), Zt = e.object({
1650
1666
  ...c,
1651
- trigger_id: B,
1667
+ trigger_id: W,
1652
1668
  ...a.shape,
1653
1669
  hook_id: e.string(),
1654
1670
  code_id: e.string()
@@ -1962,10 +1978,10 @@ const oo = e.nativeEnum(z), no = e.object({
1962
1978
  WARNING_DURING_LOGIN: "w",
1963
1979
  WARNING_SENDING_NOTIFICATION: "wn",
1964
1980
  WARNING_USER_MANAGEMENT: "wum"
1965
- }, so = e.string().refine(
1981
+ }, ro = e.string().refine(
1966
1982
  (t) => Object.values(ao).includes(t),
1967
1983
  { message: "Invalid log type" }
1968
- ), ro = e.object({
1984
+ ), so = e.object({
1969
1985
  name: e.string(),
1970
1986
  version: e.string(),
1971
1987
  env: e.object({
@@ -1979,7 +1995,7 @@ const oo = e.nativeEnum(z), no = e.object({
1979
1995
  time_zone: e.string(),
1980
1996
  continent_code: e.string()
1981
1997
  }), co = e.object({
1982
- type: so,
1998
+ type: ro,
1983
1999
  date: e.string(),
1984
2000
  description: e.string().optional(),
1985
2001
  ip: e.string().optional(),
@@ -1998,7 +2014,7 @@ const oo = e.nativeEnum(z), no = e.object({
1998
2014
  strategy: e.string().optional(),
1999
2015
  strategy_type: e.string().optional(),
2000
2016
  hostname: e.string().optional(),
2001
- auth0_client: ro.optional(),
2017
+ auth0_client: so.optional(),
2002
2018
  log_id: e.string().optional(),
2003
2019
  location_info: lo.optional()
2004
2020
  }), Fn = e.object({
@@ -2315,14 +2331,14 @@ const oo = e.nativeEnum(z), no = e.object({
2315
2331
  message: e.string().optional()
2316
2332
  }).optional()
2317
2333
  }).optional()
2318
- }), Wn = e.object({
2334
+ }), Bn = e.object({
2319
2335
  created_at: e.string().nullable().transform((t) => t ?? ""),
2320
2336
  updated_at: e.string().nullable().transform((t) => t ?? ""),
2321
2337
  ...So.shape,
2322
2338
  id: e.string()
2323
2339
  });
2324
2340
  var yo = /* @__PURE__ */ ((t) => (t.RefreshToken = "refresh_token", t.AuthorizationCode = "authorization_code", t.ClientCredential = "client_credentials", t.Passwordless = "passwordless", t.Password = "password", t.OTP = "http://auth0.com/oauth/grant-type/passwordless/otp", t))(yo || {});
2325
- const Bn = e.object({
2341
+ const Wn = e.object({
2326
2342
  access_token: e.string(),
2327
2343
  id_token: e.string().optional(),
2328
2344
  scope: e.string().optional(),
@@ -2567,13 +2583,13 @@ const Ao = e.object({
2567
2583
  metadata: e.record(e.any()).optional().openapi({
2568
2584
  description: "Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios."
2569
2585
  })
2570
- }), Wo = Go.extend({
2586
+ }), Bo = Go.extend({
2571
2587
  id: e.string().openapi({
2572
2588
  description: "The unique identifier of the role"
2573
2589
  }),
2574
2590
  created_at: e.string().optional(),
2575
2591
  updated_at: e.string().optional()
2576
- }), oi = e.array(Wo), Bo = e.object({
2592
+ }), oi = e.array(Bo), Wo = e.object({
2577
2593
  logo_url: e.string().optional().openapi({
2578
2594
  description: "URL of the organization's logo"
2579
2595
  }),
@@ -2620,7 +2636,7 @@ const Ao = e.object({
2620
2636
  display_name: e.string().optional().openapi({
2621
2637
  description: "The display name of the organization"
2622
2638
  }),
2623
- branding: Bo,
2639
+ branding: Wo,
2624
2640
  metadata: e.record(e.any()).default({}).optional().openapi({
2625
2641
  description: "Custom metadata for the organization"
2626
2642
  }),
@@ -2665,7 +2681,7 @@ const Ao = e.object({
2665
2681
  ...Yo.shape,
2666
2682
  ...a.shape,
2667
2683
  id: e.string()
2668
- }), si = e.object({
2684
+ }), ri = e.object({
2669
2685
  // Session settings
2670
2686
  idle_session_lifetime: e.number().default(72),
2671
2687
  session_lifetime: e.number().default(168),
@@ -2765,7 +2781,7 @@ const Ao = e.object({
2765
2781
  message: e.string().optional()
2766
2782
  }).optional()
2767
2783
  }).optional()
2768
- }), ri = e.object({
2784
+ }), si = e.object({
2769
2785
  date: e.string().openapi({
2770
2786
  description: "Date these events occurred in ISO 8601 format",
2771
2787
  example: "2025-12-19"
@@ -2846,8 +2862,7 @@ const Ao = e.object({
2846
2862
  OAUTH2: "oauth2",
2847
2863
  SAMLP: "samlp",
2848
2864
  WAAD: "waad",
2849
- ADFS: "adfs",
2850
- AUTH0: "auth0"
2865
+ ADFS: "adfs"
2851
2866
  }, di = {
2852
2867
  DATABASE: "database",
2853
2868
  SOCIAL: "social",
@@ -2914,34 +2929,34 @@ function mi(t) {
2914
2929
  secondaries: n,
2915
2930
  syncMethods: h = ["create", "rawCreate", "update", "remove", "delete", "set"]
2916
2931
  } = t, S = {
2917
- get(p, s) {
2918
- if (typeof s == "symbol")
2919
- return p[s];
2920
- const d = p[s];
2921
- return typeof d != "function" ? d : h.includes(s) ? async (..._) => {
2932
+ get(p, r) {
2933
+ if (typeof r == "symbol")
2934
+ return p[r];
2935
+ const d = p[r];
2936
+ return typeof d != "function" ? d : h.includes(r) ? async (..._) => {
2922
2937
  const y = await d.apply(p, _), g = [];
2923
- for (const r of n) {
2924
- const b = r.adapter[s];
2938
+ for (const s of n) {
2939
+ const b = s.adapter[r];
2925
2940
  if (typeof b != "function")
2926
2941
  continue;
2927
2942
  const A = (async () => {
2928
2943
  try {
2929
- await b.apply(r.adapter, _);
2944
+ await b.apply(s.adapter, _);
2930
2945
  } catch (f) {
2931
2946
  try {
2932
- r.onError ? r.onError(f, s, _) : console.error(
2933
- `Passthrough adapter: secondary write failed for ${s}:`,
2947
+ s.onError ? s.onError(f, r, _) : console.error(
2948
+ `Passthrough adapter: secondary write failed for ${r}:`,
2934
2949
  f
2935
2950
  );
2936
2951
  } catch (I) {
2937
2952
  console.error(
2938
- `Passthrough adapter: onError handler threw for ${s}:`,
2953
+ `Passthrough adapter: onError handler threw for ${r}:`,
2939
2954
  I
2940
2955
  );
2941
2956
  }
2942
2957
  }
2943
2958
  })();
2944
- r.blocking && g.push(A);
2959
+ s.blocking && g.push(A);
2945
2960
  }
2946
2961
  return g.length > 0 && await Promise.all(g), y;
2947
2962
  } : d.bind(p);
@@ -2953,7 +2968,7 @@ function hi(t) {
2953
2968
  return t;
2954
2969
  }
2955
2970
  function bi(t) {
2956
- var S, p, s, d, _, y, g, r, b, A, f, I;
2971
+ var S, p, r, d, _, y, g, s, b, A, f, I;
2957
2972
  const o = t == null ? void 0 : t.options;
2958
2973
  if (!o)
2959
2974
  return {
@@ -2964,7 +2979,7 @@ function bi(t) {
2964
2979
  };
2965
2980
  const n = o.attributes;
2966
2981
  if (n) {
2967
- const Z = ((p = (S = n.username) == null ? void 0 : S.identifier) == null ? void 0 : p.active) === !0, Q = ((d = (s = n.email) == null ? void 0 : s.identifier) == null ? void 0 : d.active) !== !1, $ = ((y = (_ = n.username) == null ? void 0 : _.validation) == null ? void 0 : y.min_length) ?? 1, J = ((r = (g = n.username) == null ? void 0 : g.validation) == null ? void 0 : r.max_length) ?? 15;
2982
+ const Z = ((p = (S = n.username) == null ? void 0 : S.identifier) == null ? void 0 : p.active) === !0, Q = ((d = (r = n.email) == null ? void 0 : r.identifier) == null ? void 0 : d.active) !== !1, $ = ((y = (_ = n.username) == null ? void 0 : _.validation) == null ? void 0 : y.min_length) ?? 1, J = ((s = (g = n.username) == null ? void 0 : g.validation) == null ? void 0 : s.max_length) ?? 15;
2968
2983
  return {
2969
2984
  usernameIdentifierActive: Z,
2970
2985
  emailIdentifierActive: Q,
@@ -2983,8 +2998,8 @@ function fi(t) {
2983
2998
  return typeof t == "object" && t !== null && !Array.isArray(t);
2984
2999
  }
2985
3000
  export {
2986
- rn as Auth0ActionEnum,
2987
- ro as Auth0Client,
3001
+ sn as Auth0ActionEnum,
3002
+ so as Auth0Client,
2988
3003
  F as AuthorizationResponseMode,
2989
3004
  U as AuthorizationResponseType,
2990
3005
  P as CodeChallengeMethod,
@@ -2992,7 +3007,7 @@ export {
2992
3007
  L as ComponentType,
2993
3008
  ln as EmailActionEnum,
2994
3009
  An as FORM_FIELD_TYPES,
2995
- sn as FlowActionTypeEnum,
3010
+ rn as FlowActionTypeEnum,
2996
3011
  yo as GrantType,
2997
3012
  lo as LocationInfo,
2998
3013
  ao as LogTypes,
@@ -3007,7 +3022,7 @@ export {
3007
3022
  ie as actionExecutionLogEntrySchema,
3008
3023
  ae as actionExecutionLogsSchema,
3009
3024
  ne as actionExecutionResultSchema,
3010
- se as actionExecutionSchema,
3025
+ re as actionExecutionSchema,
3011
3026
  te as actionExecutionStatusSchema,
3012
3027
  ee as actionExecutionTriggerIdSchema,
3013
3028
  v as actionInsertSchema,
@@ -3016,7 +3031,7 @@ export {
3016
3031
  R as actionSecretSchema,
3017
3032
  j as actionTriggerSchema,
3018
3033
  en as actionUpdateSchema,
3019
- re as actionVersionInsertSchema,
3034
+ se as actionVersionInsertSchema,
3020
3035
  nn as actionVersionSchema,
3021
3036
  li as activeUsersResponseSchema,
3022
3037
  ce as actorSchema,
@@ -3068,7 +3083,7 @@ export {
3068
3083
  yn as customDomainWithTenantIdSchema,
3069
3084
  ci as customTextEntrySchema,
3070
3085
  Qo as customTextSchema,
3071
- ri as dailyStatsSchema,
3086
+ si as dailyStatsSchema,
3072
3087
  qn as emailProviderSchema,
3073
3088
  wo as emailTemplateNameSchema,
3074
3089
  Xn as emailTemplateSchema,
@@ -3080,8 +3095,8 @@ export {
3080
3095
  Ae as flowInsertSchema,
3081
3096
  cn as flowSchema,
3082
3097
  Pe as flowsFieldComponentSchema,
3083
- Be as flowsFlowNodeSchema,
3084
- We as flowsStepNodeSchema,
3098
+ We as flowsFlowNodeSchema,
3099
+ Be as flowsStepNodeSchema,
3085
3100
  u as fontDetailsSchema,
3086
3101
  Co as fontsSchema,
3087
3102
  In as formControlSchema,
@@ -3124,7 +3139,7 @@ export {
3124
3139
  oo as loginSessionStateSchema,
3125
3140
  qe as nodeSchema,
3126
3141
  xn as openIDConfigurationSchema,
3127
- Bo as organizationBrandingSchema,
3142
+ Wo as organizationBrandingSchema,
3128
3143
  Xo as organizationConnectionInsertSchema,
3129
3144
  ii as organizationConnectionListSchema,
3130
3145
  Vo as organizationConnectionSchema,
@@ -3155,8 +3170,8 @@ export {
3155
3170
  Lo as rolePermissionInsertSchema,
3156
3171
  $n as rolePermissionListSchema,
3157
3172
  xo as rolePermissionSchema,
3158
- Wo as roleSchema,
3159
- Wt as screenLinkSchema,
3173
+ Bo as roleSchema,
3174
+ Bt as screenLinkSchema,
3160
3175
  Eo as sessionInsertSchema,
3161
3176
  Hn as sessionSchema,
3162
3177
  Gn as signingKeySchema,
@@ -3166,11 +3181,11 @@ export {
3166
3181
  ho as suspiciousIpThrottlingSchema,
3167
3182
  pe as targetSchema,
3168
3183
  So as tenantInsertSchema,
3169
- Wn as tenantSchema,
3170
- si as tenantSettingsSchema,
3184
+ Bn as tenantSchema,
3185
+ ri as tenantSettingsSchema,
3171
3186
  No as themeInsertSchema,
3172
3187
  Kn as themeSchema,
3173
- Bn as tokenResponseSchema,
3188
+ Wn as tokenResponseSchema,
3174
3189
  dn as totalsSchema,
3175
3190
  Tn as uiScreenSchema,
3176
3191
  Oe as userInsertSchema,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "1.19.0",
14
+ "version": "2.0.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],