@timeback/powerpath 0.1.1 → 0.1.2

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.
@@ -6,12 +6,13 @@
6
6
  import type { ClientUrlMaps, Platform } from '@timeback/internal-client-infra';
7
7
  /**
8
8
  * Environment variable names for PowerPath configuration fallback.
9
+ * Priority: TIMEBACK_API_* > TIMEBACK_* > POWERPATH_* (legacy)
9
10
  */
10
11
  export declare const POWERPATH_ENV_VARS: {
11
- readonly baseUrl: "POWERPATH_BASE_URL";
12
- readonly clientId: "POWERPATH_CLIENT_ID";
13
- readonly clientSecret: "POWERPATH_CLIENT_SECRET";
14
- readonly authUrl: "POWERPATH_TOKEN_URL";
12
+ readonly baseUrl: readonly ["TIMEBACK_API_BASE_URL", "TIMEBACK_BASE_URL", "POWERPATH_BASE_URL"];
13
+ readonly clientId: readonly ["TIMEBACK_API_CLIENT_ID", "TIMEBACK_CLIENT_ID", "POWERPATH_CLIENT_ID"];
14
+ readonly clientSecret: readonly ["TIMEBACK_API_CLIENT_SECRET", "TIMEBACK_CLIENT_SECRET", "POWERPATH_CLIENT_SECRET"];
15
+ readonly authUrl: readonly ["TIMEBACK_API_AUTH_URL", "TIMEBACK_AUTH_URL", "POWERPATH_TOKEN_URL"];
15
16
  };
16
17
  /**
17
18
  * Get URL maps for a specific platform.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAM9E;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAA;AAMV;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAM9E;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CASrB,CAAA;AAMV;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}
package/dist/errors.js CHANGED
@@ -704,7 +704,17 @@ class TimebackProvider {
704
704
  // ../../internal/client-infra/src/utils/utils.ts
705
705
  function getEnv(key) {
706
706
  try {
707
- return typeof process === "undefined" ? undefined : process.env[key];
707
+ if (typeof process === "undefined")
708
+ return;
709
+ if (typeof key === "string") {
710
+ return process.env[key];
711
+ }
712
+ for (const k of key) {
713
+ const value = process.env[k];
714
+ if (value !== undefined)
715
+ return value;
716
+ }
717
+ return;
708
718
  } catch {
709
719
  return;
710
720
  }
@@ -738,6 +748,18 @@ var DEFAULT_PROVIDER_REGISTRY = {
738
748
  };
739
749
 
740
750
  // ../../internal/client-infra/src/config/resolve.ts
751
+ function primaryEnvVar(key) {
752
+ if (typeof key === "string") {
753
+ return key;
754
+ }
755
+ if (key.length === 0) {
756
+ throw new Error(`Missing env var key: ${key}`);
757
+ }
758
+ return key[0];
759
+ }
760
+ function formatEnvVarKey(key) {
761
+ return primaryEnvVar(key);
762
+ }
741
763
  function validateEnv(env) {
742
764
  if (env !== "staging" && env !== "production") {
743
765
  throw new Error(`Invalid env "${env}": must be "staging" or "production"`);
@@ -748,10 +770,10 @@ function validateAuth(auth, envVars) {
748
770
  const clientId = auth?.clientId ?? getEnv(envVars.clientId);
749
771
  const clientSecret = auth?.clientSecret ?? getEnv(envVars.clientSecret);
750
772
  if (!clientId) {
751
- throw new Error(`Missing clientId: provide in config or set ${envVars.clientId}`);
773
+ throw new Error(`Missing clientId: provide in config or set ${formatEnvVarKey(envVars.clientId)}`);
752
774
  }
753
775
  if (!clientSecret) {
754
- throw new Error(`Missing clientSecret: provide in config or set ${envVars.clientSecret}`);
776
+ throw new Error(`Missing clientSecret: provide in config or set ${formatEnvVarKey(envVars.clientSecret)}`);
755
777
  }
756
778
  return { clientId, clientSecret };
757
779
  }
@@ -767,21 +789,21 @@ function buildMissingEnvError(envVars) {
767
789
  const clientId = getEnv(envVars.clientId);
768
790
  const clientSecret = getEnv(envVars.clientSecret);
769
791
  if (baseUrl === undefined && clientId === undefined) {
770
- const hint = envVars.env ?? envVars.baseUrl;
792
+ const hint = formatEnvVarKey(envVars.env ?? envVars.baseUrl);
771
793
  return `Missing env: provide in config or set ${hint}`;
772
794
  }
773
795
  const missing = [];
774
796
  if (baseUrl === undefined) {
775
- missing.push(envVars.env ?? envVars.baseUrl);
797
+ missing.push(formatEnvVarKey(envVars.env ?? envVars.baseUrl));
776
798
  }
777
799
  if (baseUrl !== undefined && authUrl === undefined) {
778
- missing.push(envVars.authUrl);
800
+ missing.push(formatEnvVarKey(envVars.authUrl));
779
801
  }
780
802
  if (clientId === undefined) {
781
- missing.push(envVars.clientId);
803
+ missing.push(formatEnvVarKey(envVars.clientId));
782
804
  }
783
805
  if (clientSecret === undefined) {
784
- missing.push(envVars.clientSecret);
806
+ missing.push(formatEnvVarKey(envVars.clientSecret));
785
807
  }
786
808
  return `Missing environment variables: ${missing.join(", ")}`;
787
809
  }
package/dist/index.js CHANGED
@@ -704,7 +704,17 @@ class TimebackProvider {
704
704
  // ../../internal/client-infra/src/utils/utils.ts
705
705
  function getEnv(key) {
706
706
  try {
707
- return typeof process === "undefined" ? undefined : process.env[key];
707
+ if (typeof process === "undefined")
708
+ return;
709
+ if (typeof key === "string") {
710
+ return process.env[key];
711
+ }
712
+ for (const k of key) {
713
+ const value = process.env[k];
714
+ if (value !== undefined)
715
+ return value;
716
+ }
717
+ return;
708
718
  } catch {
709
719
  return;
710
720
  }
@@ -738,6 +748,18 @@ var DEFAULT_PROVIDER_REGISTRY = {
738
748
  };
739
749
 
740
750
  // ../../internal/client-infra/src/config/resolve.ts
751
+ function primaryEnvVar(key) {
752
+ if (typeof key === "string") {
753
+ return key;
754
+ }
755
+ if (key.length === 0) {
756
+ throw new Error(`Missing env var key: ${key}`);
757
+ }
758
+ return key[0];
759
+ }
760
+ function formatEnvVarKey(key) {
761
+ return primaryEnvVar(key);
762
+ }
741
763
  function validateEnv(env) {
742
764
  if (env !== "staging" && env !== "production") {
743
765
  throw new Error(`Invalid env "${env}": must be "staging" or "production"`);
@@ -748,10 +770,10 @@ function validateAuth(auth, envVars) {
748
770
  const clientId = auth?.clientId ?? getEnv(envVars.clientId);
749
771
  const clientSecret = auth?.clientSecret ?? getEnv(envVars.clientSecret);
750
772
  if (!clientId) {
751
- throw new Error(`Missing clientId: provide in config or set ${envVars.clientId}`);
773
+ throw new Error(`Missing clientId: provide in config or set ${formatEnvVarKey(envVars.clientId)}`);
752
774
  }
753
775
  if (!clientSecret) {
754
- throw new Error(`Missing clientSecret: provide in config or set ${envVars.clientSecret}`);
776
+ throw new Error(`Missing clientSecret: provide in config or set ${formatEnvVarKey(envVars.clientSecret)}`);
755
777
  }
756
778
  return { clientId, clientSecret };
757
779
  }
@@ -767,21 +789,21 @@ function buildMissingEnvError(envVars) {
767
789
  const clientId = getEnv(envVars.clientId);
768
790
  const clientSecret = getEnv(envVars.clientSecret);
769
791
  if (baseUrl === undefined && clientId === undefined) {
770
- const hint = envVars.env ?? envVars.baseUrl;
792
+ const hint = formatEnvVarKey(envVars.env ?? envVars.baseUrl);
771
793
  return `Missing env: provide in config or set ${hint}`;
772
794
  }
773
795
  const missing = [];
774
796
  if (baseUrl === undefined) {
775
- missing.push(envVars.env ?? envVars.baseUrl);
797
+ missing.push(formatEnvVarKey(envVars.env ?? envVars.baseUrl));
776
798
  }
777
799
  if (baseUrl !== undefined && authUrl === undefined) {
778
- missing.push(envVars.authUrl);
800
+ missing.push(formatEnvVarKey(envVars.authUrl));
779
801
  }
780
802
  if (clientId === undefined) {
781
- missing.push(envVars.clientId);
803
+ missing.push(formatEnvVarKey(envVars.clientId));
782
804
  }
783
805
  if (clientSecret === undefined) {
784
- missing.push(envVars.clientSecret);
806
+ missing.push(formatEnvVarKey(envVars.clientSecret));
785
807
  }
786
808
  return `Missing environment variables: ${missing.join(", ")}`;
787
809
  }
@@ -1472,10 +1494,14 @@ function validateNonEmptyString(value, name) {
1472
1494
  }
1473
1495
  // src/constants.ts
1474
1496
  var POWERPATH_ENV_VARS = {
1475
- baseUrl: "POWERPATH_BASE_URL",
1476
- clientId: "POWERPATH_CLIENT_ID",
1477
- clientSecret: "POWERPATH_CLIENT_SECRET",
1478
- authUrl: "POWERPATH_TOKEN_URL"
1497
+ baseUrl: ["TIMEBACK_API_BASE_URL", "TIMEBACK_BASE_URL", "POWERPATH_BASE_URL"],
1498
+ clientId: ["TIMEBACK_API_CLIENT_ID", "TIMEBACK_CLIENT_ID", "POWERPATH_CLIENT_ID"],
1499
+ clientSecret: [
1500
+ "TIMEBACK_API_CLIENT_SECRET",
1501
+ "TIMEBACK_CLIENT_SECRET",
1502
+ "POWERPATH_CLIENT_SECRET"
1503
+ ],
1504
+ authUrl: ["TIMEBACK_API_AUTH_URL", "TIMEBACK_AUTH_URL", "POWERPATH_TOKEN_URL"]
1479
1505
  };
1480
1506
 
1481
1507
  // src/lib/resolve.ts
@@ -1500,7 +1526,7 @@ class Transport extends BaseTransport {
1500
1526
  }
1501
1527
  }
1502
1528
 
1503
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/external.js
1529
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
1504
1530
  var exports_external = {};
1505
1531
  __export(exports_external, {
1506
1532
  xor: () => xor,
@@ -1741,7 +1767,7 @@ __export(exports_external, {
1741
1767
  $brand: () => $brand
1742
1768
  });
1743
1769
 
1744
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/index.js
1770
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/index.js
1745
1771
  var exports_core2 = {};
1746
1772
  __export(exports_core2, {
1747
1773
  version: () => version,
@@ -2019,7 +2045,7 @@ __export(exports_core2, {
2019
2045
  $ZodAny: () => $ZodAny
2020
2046
  });
2021
2047
 
2022
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/core.js
2048
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/core.js
2023
2049
  var NEVER = Object.freeze({
2024
2050
  status: "aborted"
2025
2051
  });
@@ -2095,7 +2121,7 @@ function config(newConfig) {
2095
2121
  Object.assign(globalConfig, newConfig);
2096
2122
  return globalConfig;
2097
2123
  }
2098
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/util.js
2124
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
2099
2125
  var exports_util = {};
2100
2126
  __export(exports_util, {
2101
2127
  unwrapMessage: () => unwrapMessage,
@@ -2769,7 +2795,7 @@ class Class {
2769
2795
  constructor(..._args) {}
2770
2796
  }
2771
2797
 
2772
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/errors.js
2798
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/errors.js
2773
2799
  var initializer = (inst, def) => {
2774
2800
  inst.name = "$ZodError";
2775
2801
  Object.defineProperty(inst, "_zod", {
@@ -2906,7 +2932,7 @@ function prettifyError(error) {
2906
2932
  `);
2907
2933
  }
2908
2934
 
2909
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/parse.js
2935
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/parse.js
2910
2936
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
2911
2937
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
2912
2938
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -2993,7 +3019,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
2993
3019
  return _safeParseAsync(_Err)(schema, value, _ctx);
2994
3020
  };
2995
3021
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
2996
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/regexes.js
3022
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js
2997
3023
  var exports_regexes = {};
2998
3024
  __export(exports_regexes, {
2999
3025
  xid: () => xid,
@@ -3150,7 +3176,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
3150
3176
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
3151
3177
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
3152
3178
 
3153
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/checks.js
3179
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/checks.js
3154
3180
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
3155
3181
  var _a;
3156
3182
  inst._zod ?? (inst._zod = {});
@@ -3697,7 +3723,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
3697
3723
  };
3698
3724
  });
3699
3725
 
3700
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/doc.js
3726
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/doc.js
3701
3727
  class Doc {
3702
3728
  constructor(args = []) {
3703
3729
  this.content = [];
@@ -3735,14 +3761,14 @@ class Doc {
3735
3761
  }
3736
3762
  }
3737
3763
 
3738
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/versions.js
3764
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/versions.js
3739
3765
  var version = {
3740
3766
  major: 4,
3741
3767
  minor: 3,
3742
- patch: 5
3768
+ patch: 6
3743
3769
  };
3744
3770
 
3745
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/schemas.js
3771
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/schemas.js
3746
3772
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
3747
3773
  var _a;
3748
3774
  inst ?? (inst = {});
@@ -5025,7 +5051,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
5025
5051
  if (keyResult instanceof Promise) {
5026
5052
  throw new Error("Async schemas not supported in object keys currently");
5027
5053
  }
5028
- const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length && keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number");
5054
+ const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length;
5029
5055
  if (checkNumericKey) {
5030
5056
  const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
5031
5057
  if (retryResult instanceof Promise) {
@@ -5704,7 +5730,7 @@ function handleRefineResult(result, payload, input, inst) {
5704
5730
  payload.issues.push(issue2(_iss));
5705
5731
  }
5706
5732
  }
5707
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/index.js
5733
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/index.js
5708
5734
  var exports_locales = {};
5709
5735
  __export(exports_locales, {
5710
5736
  zhTW: () => zh_TW_default,
@@ -5758,7 +5784,7 @@ __export(exports_locales, {
5758
5784
  ar: () => ar_default
5759
5785
  });
5760
5786
 
5761
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ar.js
5787
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ar.js
5762
5788
  var error = () => {
5763
5789
  const Sizable = {
5764
5790
  string: { unit: "حرف", verb: "أن يحوي" },
@@ -5864,7 +5890,7 @@ function ar_default() {
5864
5890
  localeError: error()
5865
5891
  };
5866
5892
  }
5867
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/az.js
5893
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/az.js
5868
5894
  var error2 = () => {
5869
5895
  const Sizable = {
5870
5896
  string: { unit: "simvol", verb: "olmalıdır" },
@@ -5969,7 +5995,7 @@ function az_default() {
5969
5995
  localeError: error2()
5970
5996
  };
5971
5997
  }
5972
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/be.js
5998
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/be.js
5973
5999
  function getBelarusianPlural(count, one, few, many) {
5974
6000
  const absCount = Math.abs(count);
5975
6001
  const lastDigit = absCount % 10;
@@ -6125,7 +6151,7 @@ function be_default() {
6125
6151
  localeError: error3()
6126
6152
  };
6127
6153
  }
6128
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/bg.js
6154
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/bg.js
6129
6155
  var error4 = () => {
6130
6156
  const Sizable = {
6131
6157
  string: { unit: "символа", verb: "да съдържа" },
@@ -6245,7 +6271,7 @@ function bg_default() {
6245
6271
  localeError: error4()
6246
6272
  };
6247
6273
  }
6248
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ca.js
6274
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ca.js
6249
6275
  var error5 = () => {
6250
6276
  const Sizable = {
6251
6277
  string: { unit: "caràcters", verb: "contenir" },
@@ -6352,7 +6378,7 @@ function ca_default() {
6352
6378
  localeError: error5()
6353
6379
  };
6354
6380
  }
6355
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/cs.js
6381
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/cs.js
6356
6382
  var error6 = () => {
6357
6383
  const Sizable = {
6358
6384
  string: { unit: "znaků", verb: "mít" },
@@ -6463,7 +6489,7 @@ function cs_default() {
6463
6489
  localeError: error6()
6464
6490
  };
6465
6491
  }
6466
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/da.js
6492
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/da.js
6467
6493
  var error7 = () => {
6468
6494
  const Sizable = {
6469
6495
  string: { unit: "tegn", verb: "havde" },
@@ -6578,7 +6604,7 @@ function da_default() {
6578
6604
  localeError: error7()
6579
6605
  };
6580
6606
  }
6581
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/de.js
6607
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/de.js
6582
6608
  var error8 = () => {
6583
6609
  const Sizable = {
6584
6610
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -6686,7 +6712,7 @@ function de_default() {
6686
6712
  localeError: error8()
6687
6713
  };
6688
6714
  }
6689
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/en.js
6715
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/en.js
6690
6716
  var error9 = () => {
6691
6717
  const Sizable = {
6692
6718
  string: { unit: "characters", verb: "to have" },
@@ -6792,7 +6818,7 @@ function en_default() {
6792
6818
  localeError: error9()
6793
6819
  };
6794
6820
  }
6795
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/eo.js
6821
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/eo.js
6796
6822
  var error10 = () => {
6797
6823
  const Sizable = {
6798
6824
  string: { unit: "karaktrojn", verb: "havi" },
@@ -6901,7 +6927,7 @@ function eo_default() {
6901
6927
  localeError: error10()
6902
6928
  };
6903
6929
  }
6904
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/es.js
6930
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/es.js
6905
6931
  var error11 = () => {
6906
6932
  const Sizable = {
6907
6933
  string: { unit: "caracteres", verb: "tener" },
@@ -7033,7 +7059,7 @@ function es_default() {
7033
7059
  localeError: error11()
7034
7060
  };
7035
7061
  }
7036
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/fa.js
7062
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fa.js
7037
7063
  var error12 = () => {
7038
7064
  const Sizable = {
7039
7065
  string: { unit: "کاراکتر", verb: "داشته باشد" },
@@ -7147,7 +7173,7 @@ function fa_default() {
7147
7173
  localeError: error12()
7148
7174
  };
7149
7175
  }
7150
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/fi.js
7176
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fi.js
7151
7177
  var error13 = () => {
7152
7178
  const Sizable = {
7153
7179
  string: { unit: "merkkiä", subject: "merkkijonon" },
@@ -7259,7 +7285,7 @@ function fi_default() {
7259
7285
  localeError: error13()
7260
7286
  };
7261
7287
  }
7262
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/fr.js
7288
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fr.js
7263
7289
  var error14 = () => {
7264
7290
  const Sizable = {
7265
7291
  string: { unit: "caractères", verb: "avoir" },
@@ -7367,7 +7393,7 @@ function fr_default() {
7367
7393
  localeError: error14()
7368
7394
  };
7369
7395
  }
7370
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/fr-CA.js
7396
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
7371
7397
  var error15 = () => {
7372
7398
  const Sizable = {
7373
7399
  string: { unit: "caractères", verb: "avoir" },
@@ -7474,7 +7500,7 @@ function fr_CA_default() {
7474
7500
  localeError: error15()
7475
7501
  };
7476
7502
  }
7477
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/he.js
7503
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/he.js
7478
7504
  var error16 = () => {
7479
7505
  const TypeNames = {
7480
7506
  string: { label: "מחרוזת", gender: "f" },
@@ -7667,7 +7693,7 @@ function he_default() {
7667
7693
  localeError: error16()
7668
7694
  };
7669
7695
  }
7670
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/hu.js
7696
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/hu.js
7671
7697
  var error17 = () => {
7672
7698
  const Sizable = {
7673
7699
  string: { unit: "karakter", verb: "legyen" },
@@ -7775,7 +7801,7 @@ function hu_default() {
7775
7801
  localeError: error17()
7776
7802
  };
7777
7803
  }
7778
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/hy.js
7804
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/hy.js
7779
7805
  function getArmenianPlural(count, one, many) {
7780
7806
  return Math.abs(count) === 1 ? one : many;
7781
7807
  }
@@ -7922,7 +7948,7 @@ function hy_default() {
7922
7948
  localeError: error18()
7923
7949
  };
7924
7950
  }
7925
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/id.js
7951
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/id.js
7926
7952
  var error19 = () => {
7927
7953
  const Sizable = {
7928
7954
  string: { unit: "karakter", verb: "memiliki" },
@@ -8028,7 +8054,7 @@ function id_default() {
8028
8054
  localeError: error19()
8029
8055
  };
8030
8056
  }
8031
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/is.js
8057
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/is.js
8032
8058
  var error20 = () => {
8033
8059
  const Sizable = {
8034
8060
  string: { unit: "stafi", verb: "að hafa" },
@@ -8137,7 +8163,7 @@ function is_default() {
8137
8163
  localeError: error20()
8138
8164
  };
8139
8165
  }
8140
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/it.js
8166
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/it.js
8141
8167
  var error21 = () => {
8142
8168
  const Sizable = {
8143
8169
  string: { unit: "caratteri", verb: "avere" },
@@ -8245,7 +8271,7 @@ function it_default() {
8245
8271
  localeError: error21()
8246
8272
  };
8247
8273
  }
8248
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ja.js
8274
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ja.js
8249
8275
  var error22 = () => {
8250
8276
  const Sizable = {
8251
8277
  string: { unit: "文字", verb: "である" },
@@ -8352,7 +8378,7 @@ function ja_default() {
8352
8378
  localeError: error22()
8353
8379
  };
8354
8380
  }
8355
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ka.js
8381
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ka.js
8356
8382
  var error23 = () => {
8357
8383
  const Sizable = {
8358
8384
  string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
@@ -8464,7 +8490,7 @@ function ka_default() {
8464
8490
  localeError: error23()
8465
8491
  };
8466
8492
  }
8467
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/km.js
8493
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/km.js
8468
8494
  var error24 = () => {
8469
8495
  const Sizable = {
8470
8496
  string: { unit: "តួអក្សរ", verb: "គួរមាន" },
@@ -8575,11 +8601,11 @@ function km_default() {
8575
8601
  };
8576
8602
  }
8577
8603
 
8578
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/kh.js
8604
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/kh.js
8579
8605
  function kh_default() {
8580
8606
  return km_default();
8581
8607
  }
8582
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ko.js
8608
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ko.js
8583
8609
  var error25 = () => {
8584
8610
  const Sizable = {
8585
8611
  string: { unit: "문자", verb: "to have" },
@@ -8690,7 +8716,7 @@ function ko_default() {
8690
8716
  localeError: error25()
8691
8717
  };
8692
8718
  }
8693
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/lt.js
8719
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/lt.js
8694
8720
  var capitalizeFirstCharacter = (text) => {
8695
8721
  return text.charAt(0).toUpperCase() + text.slice(1);
8696
8722
  };
@@ -8893,7 +8919,7 @@ function lt_default() {
8893
8919
  localeError: error26()
8894
8920
  };
8895
8921
  }
8896
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/mk.js
8922
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/mk.js
8897
8923
  var error27 = () => {
8898
8924
  const Sizable = {
8899
8925
  string: { unit: "знаци", verb: "да имаат" },
@@ -9002,7 +9028,7 @@ function mk_default() {
9002
9028
  localeError: error27()
9003
9029
  };
9004
9030
  }
9005
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ms.js
9031
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ms.js
9006
9032
  var error28 = () => {
9007
9033
  const Sizable = {
9008
9034
  string: { unit: "aksara", verb: "mempunyai" },
@@ -9109,7 +9135,7 @@ function ms_default() {
9109
9135
  localeError: error28()
9110
9136
  };
9111
9137
  }
9112
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/nl.js
9138
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/nl.js
9113
9139
  var error29 = () => {
9114
9140
  const Sizable = {
9115
9141
  string: { unit: "tekens", verb: "heeft" },
@@ -9219,7 +9245,7 @@ function nl_default() {
9219
9245
  localeError: error29()
9220
9246
  };
9221
9247
  }
9222
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/no.js
9248
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/no.js
9223
9249
  var error30 = () => {
9224
9250
  const Sizable = {
9225
9251
  string: { unit: "tegn", verb: "å ha" },
@@ -9327,7 +9353,7 @@ function no_default() {
9327
9353
  localeError: error30()
9328
9354
  };
9329
9355
  }
9330
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ota.js
9356
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ota.js
9331
9357
  var error31 = () => {
9332
9358
  const Sizable = {
9333
9359
  string: { unit: "harf", verb: "olmalıdır" },
@@ -9436,7 +9462,7 @@ function ota_default() {
9436
9462
  localeError: error31()
9437
9463
  };
9438
9464
  }
9439
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ps.js
9465
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ps.js
9440
9466
  var error32 = () => {
9441
9467
  const Sizable = {
9442
9468
  string: { unit: "توکي", verb: "ولري" },
@@ -9550,7 +9576,7 @@ function ps_default() {
9550
9576
  localeError: error32()
9551
9577
  };
9552
9578
  }
9553
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/pl.js
9579
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/pl.js
9554
9580
  var error33 = () => {
9555
9581
  const Sizable = {
9556
9582
  string: { unit: "znaków", verb: "mieć" },
@@ -9659,7 +9685,7 @@ function pl_default() {
9659
9685
  localeError: error33()
9660
9686
  };
9661
9687
  }
9662
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/pt.js
9688
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/pt.js
9663
9689
  var error34 = () => {
9664
9690
  const Sizable = {
9665
9691
  string: { unit: "caracteres", verb: "ter" },
@@ -9767,7 +9793,7 @@ function pt_default() {
9767
9793
  localeError: error34()
9768
9794
  };
9769
9795
  }
9770
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ru.js
9796
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ru.js
9771
9797
  function getRussianPlural(count, one, few, many) {
9772
9798
  const absCount = Math.abs(count);
9773
9799
  const lastDigit = absCount % 10;
@@ -9923,7 +9949,7 @@ function ru_default() {
9923
9949
  localeError: error35()
9924
9950
  };
9925
9951
  }
9926
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/sl.js
9952
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/sl.js
9927
9953
  var error36 = () => {
9928
9954
  const Sizable = {
9929
9955
  string: { unit: "znakov", verb: "imeti" },
@@ -10032,7 +10058,7 @@ function sl_default() {
10032
10058
  localeError: error36()
10033
10059
  };
10034
10060
  }
10035
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/sv.js
10061
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/sv.js
10036
10062
  var error37 = () => {
10037
10063
  const Sizable = {
10038
10064
  string: { unit: "tecken", verb: "att ha" },
@@ -10142,7 +10168,7 @@ function sv_default() {
10142
10168
  localeError: error37()
10143
10169
  };
10144
10170
  }
10145
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ta.js
10171
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ta.js
10146
10172
  var error38 = () => {
10147
10173
  const Sizable = {
10148
10174
  string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
@@ -10252,7 +10278,7 @@ function ta_default() {
10252
10278
  localeError: error38()
10253
10279
  };
10254
10280
  }
10255
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/th.js
10281
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/th.js
10256
10282
  var error39 = () => {
10257
10283
  const Sizable = {
10258
10284
  string: { unit: "ตัวอักษร", verb: "ควรมี" },
@@ -10362,7 +10388,7 @@ function th_default() {
10362
10388
  localeError: error39()
10363
10389
  };
10364
10390
  }
10365
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/tr.js
10391
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/tr.js
10366
10392
  var error40 = () => {
10367
10393
  const Sizable = {
10368
10394
  string: { unit: "karakter", verb: "olmalı" },
@@ -10467,7 +10493,7 @@ function tr_default() {
10467
10493
  localeError: error40()
10468
10494
  };
10469
10495
  }
10470
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/uk.js
10496
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/uk.js
10471
10497
  var error41 = () => {
10472
10498
  const Sizable = {
10473
10499
  string: { unit: "символів", verb: "матиме" },
@@ -10576,11 +10602,11 @@ function uk_default() {
10576
10602
  };
10577
10603
  }
10578
10604
 
10579
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ua.js
10605
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ua.js
10580
10606
  function ua_default() {
10581
10607
  return uk_default();
10582
10608
  }
10583
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/ur.js
10609
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ur.js
10584
10610
  var error42 = () => {
10585
10611
  const Sizable = {
10586
10612
  string: { unit: "حروف", verb: "ہونا" },
@@ -10690,7 +10716,7 @@ function ur_default() {
10690
10716
  localeError: error42()
10691
10717
  };
10692
10718
  }
10693
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/uz.js
10719
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/uz.js
10694
10720
  var error43 = () => {
10695
10721
  const Sizable = {
10696
10722
  string: { unit: "belgi", verb: "bo‘lishi kerak" },
@@ -10799,7 +10825,7 @@ function uz_default() {
10799
10825
  localeError: error43()
10800
10826
  };
10801
10827
  }
10802
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/vi.js
10828
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/vi.js
10803
10829
  var error44 = () => {
10804
10830
  const Sizable = {
10805
10831
  string: { unit: "ký tự", verb: "có" },
@@ -10907,7 +10933,7 @@ function vi_default() {
10907
10933
  localeError: error44()
10908
10934
  };
10909
10935
  }
10910
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/zh-CN.js
10936
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
10911
10937
  var error45 = () => {
10912
10938
  const Sizable = {
10913
10939
  string: { unit: "字符", verb: "包含" },
@@ -11016,7 +11042,7 @@ function zh_CN_default() {
11016
11042
  localeError: error45()
11017
11043
  };
11018
11044
  }
11019
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/zh-TW.js
11045
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
11020
11046
  var error46 = () => {
11021
11047
  const Sizable = {
11022
11048
  string: { unit: "字元", verb: "擁有" },
@@ -11123,7 +11149,7 @@ function zh_TW_default() {
11123
11149
  localeError: error46()
11124
11150
  };
11125
11151
  }
11126
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/locales/yo.js
11152
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/yo.js
11127
11153
  var error47 = () => {
11128
11154
  const Sizable = {
11129
11155
  string: { unit: "àmi", verb: "ní" },
@@ -11230,7 +11256,7 @@ function yo_default() {
11230
11256
  localeError: error47()
11231
11257
  };
11232
11258
  }
11233
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/registries.js
11259
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/registries.js
11234
11260
  var _a;
11235
11261
  var $output = Symbol("ZodOutput");
11236
11262
  var $input = Symbol("ZodInput");
@@ -11280,7 +11306,7 @@ function registry() {
11280
11306
  }
11281
11307
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
11282
11308
  var globalRegistry = globalThis.__zod_globalRegistry;
11283
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/api.js
11309
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/api.js
11284
11310
  function _string(Class2, params) {
11285
11311
  return new Class2({
11286
11312
  type: "string",
@@ -12200,7 +12226,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
12200
12226
  const inst = new Class2(def);
12201
12227
  return inst;
12202
12228
  }
12203
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.js
12229
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
12204
12230
  function initializeContext(params) {
12205
12231
  let target = params?.target ?? "draft-2020-12";
12206
12232
  if (target === "draft-4")
@@ -12396,7 +12422,7 @@ function finalize(ctx, schema) {
12396
12422
  }
12397
12423
  }
12398
12424
  }
12399
- if (refSchema.$ref) {
12425
+ if (refSchema.$ref && refSeen.def) {
12400
12426
  for (const key in schema2) {
12401
12427
  if (key === "$ref" || key === "allOf")
12402
12428
  continue;
@@ -12545,7 +12571,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
12545
12571
  extractDefs(ctx, schema);
12546
12572
  return finalize(ctx, schema);
12547
12573
  };
12548
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/json-schema-processors.js
12574
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
12549
12575
  var formatMap = {
12550
12576
  guid: "uuid",
12551
12577
  url: "uri",
@@ -13090,7 +13116,7 @@ function toJSONSchema(input, params) {
13090
13116
  extractDefs(ctx, input);
13091
13117
  return finalize(ctx, input);
13092
13118
  }
13093
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/json-schema-generator.js
13119
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
13094
13120
  class JSONSchemaGenerator {
13095
13121
  get metadataRegistry() {
13096
13122
  return this.ctx.metadataRegistry;
@@ -13149,9 +13175,9 @@ class JSONSchemaGenerator {
13149
13175
  return plainResult;
13150
13176
  }
13151
13177
  }
13152
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/core/json-schema.js
13178
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
13153
13179
  var exports_json_schema = {};
13154
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/schemas.js
13180
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
13155
13181
  var exports_schemas2 = {};
13156
13182
  __export(exports_schemas2, {
13157
13183
  xor: () => xor,
@@ -13320,7 +13346,7 @@ __export(exports_schemas2, {
13320
13346
  ZodAny: () => ZodAny
13321
13347
  });
13322
13348
 
13323
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/checks.js
13349
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/checks.js
13324
13350
  var exports_checks2 = {};
13325
13351
  __export(exports_checks2, {
13326
13352
  uppercase: () => _uppercase,
@@ -13354,7 +13380,7 @@ __export(exports_checks2, {
13354
13380
  endsWith: () => _endsWith
13355
13381
  });
13356
13382
 
13357
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/iso.js
13383
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js
13358
13384
  var exports_iso = {};
13359
13385
  __export(exports_iso, {
13360
13386
  time: () => time2,
@@ -13395,7 +13421,7 @@ function duration2(params) {
13395
13421
  return _isoDuration(ZodISODuration, params);
13396
13422
  }
13397
13423
 
13398
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/errors.js
13424
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/errors.js
13399
13425
  var initializer2 = (inst, issues) => {
13400
13426
  $ZodError.init(inst, issues);
13401
13427
  inst.name = "ZodError";
@@ -13430,7 +13456,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
13430
13456
  Parent: Error
13431
13457
  });
13432
13458
 
13433
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/parse.js
13459
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/parse.js
13434
13460
  var parse3 = /* @__PURE__ */ _parse(ZodRealError);
13435
13461
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
13436
13462
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -13444,7 +13470,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
13444
13470
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
13445
13471
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
13446
13472
 
13447
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/schemas.js
13473
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
13448
13474
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13449
13475
  $ZodType.init(inst, def);
13450
13476
  Object.assign(inst["~standard"], {
@@ -14520,7 +14546,7 @@ function json(params) {
14520
14546
  function preprocess(fn, schema) {
14521
14547
  return pipe(transform(fn), schema);
14522
14548
  }
14523
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/compat.js
14549
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/compat.js
14524
14550
  var ZodIssueCode = {
14525
14551
  invalid_type: "invalid_type",
14526
14552
  too_big: "too_big",
@@ -14544,7 +14570,7 @@ function getErrorMap() {
14544
14570
  }
14545
14571
  var ZodFirstPartyTypeKind;
14546
14572
  (function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
14547
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/from-json-schema.js
14573
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
14548
14574
  var z = {
14549
14575
  ...exports_schemas2,
14550
14576
  ...exports_checks2,
@@ -15005,7 +15031,7 @@ function fromJSONSchema(schema, params) {
15005
15031
  };
15006
15032
  return convertSchema(schema, ctx);
15007
15033
  }
15008
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/coerce.js
15034
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
15009
15035
  var exports_coerce = {};
15010
15036
  __export(exports_coerce, {
15011
15037
  string: () => string3,
@@ -15030,7 +15056,7 @@ function date4(params) {
15030
15056
  return _coercedDate(ZodDate, params);
15031
15057
  }
15032
15058
 
15033
- // ../../../node_modules/.bun/zod@4.3.5/node_modules/zod/v4/classic/external.js
15059
+ // ../../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
15034
15060
  config(en_default());
15035
15061
  // ../../types/src/zod/primitives.ts
15036
15062
  var IsoDateTimeRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/;
@@ -15047,7 +15073,7 @@ var TimebackSubject = exports_external.enum([
15047
15073
  "Math",
15048
15074
  "None",
15049
15075
  "Other"
15050
- ]);
15076
+ ]).meta({ id: "TimebackSubject", description: "Subject area" });
15051
15077
  var TimebackGrade = exports_external.union([
15052
15078
  exports_external.literal(-1),
15053
15079
  exports_external.literal(0),
@@ -15064,7 +15090,10 @@ var TimebackGrade = exports_external.union([
15064
15090
  exports_external.literal(11),
15065
15091
  exports_external.literal(12),
15066
15092
  exports_external.literal(13)
15067
- ]);
15093
+ ]).meta({
15094
+ id: "TimebackGrade",
15095
+ description: "Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP)"
15096
+ });
15068
15097
  var ScoreStatus = exports_external.enum([
15069
15098
  "exempt",
15070
15099
  "fully graded",
@@ -15296,62 +15325,84 @@ var CaliperListEventsParams = exports_external.object({
15296
15325
  }).strict();
15297
15326
  // ../../types/src/zod/config.ts
15298
15327
  var CourseIds = exports_external.object({
15299
- staging: exports_external.string().optional(),
15300
- production: exports_external.string().optional()
15301
- });
15302
- var CourseType = exports_external.enum(["base", "hole-filling", "optional"]);
15303
- var PublishStatus = exports_external.enum(["draft", "testing", "published", "deactivated"]);
15328
+ staging: exports_external.string().meta({ description: "Course ID in staging environment" }).optional(),
15329
+ production: exports_external.string().meta({ description: "Course ID in production environment" }).optional()
15330
+ }).meta({ id: "CourseIds", description: "Environment-specific course IDs (populated by sync)" });
15331
+ var CourseType = exports_external.enum(["base", "hole-filling", "optional"]).meta({ id: "CourseType", description: "Course classification type" });
15332
+ var PublishStatus = exports_external.enum(["draft", "testing", "published", "deactivated"]).meta({ id: "PublishStatus", description: "Course publication status" });
15304
15333
  var CourseGoals = exports_external.object({
15305
- dailyXp: exports_external.number().int().positive().optional(),
15306
- dailyLessons: exports_external.number().int().positive().optional(),
15307
- dailyActiveMinutes: exports_external.number().int().positive().optional(),
15308
- dailyAccuracy: exports_external.number().int().min(0).max(100).optional(),
15309
- dailyMasteredUnits: exports_external.number().int().positive().optional()
15310
- });
15334
+ dailyXp: exports_external.number().int().positive().meta({ description: "Target XP to earn per day" }).optional(),
15335
+ dailyLessons: exports_external.number().int().positive().meta({ description: "Target lessons to complete per day" }).optional(),
15336
+ dailyActiveMinutes: exports_external.number().int().positive().meta({ description: "Target active learning minutes per day" }).optional(),
15337
+ dailyAccuracy: exports_external.number().int().min(0).max(100).meta({ description: "Target accuracy percentage (0-100)" }).optional(),
15338
+ dailyMasteredUnits: exports_external.number().int().positive().meta({ description: "Target units to master per day" }).optional()
15339
+ }).meta({ id: "CourseGoals", description: "Daily learning goals for a course" });
15311
15340
  var CourseMetrics = exports_external.object({
15312
- totalXp: exports_external.number().int().positive().optional(),
15313
- totalLessons: exports_external.number().int().positive().optional(),
15314
- totalGrades: exports_external.number().int().positive().optional()
15315
- });
15341
+ totalXp: exports_external.number().int().positive().meta({ description: "Total XP available in the course" }).optional(),
15342
+ totalLessons: exports_external.number().int().positive().meta({ description: "Total number of lessons/activities" }).optional(),
15343
+ totalGrades: exports_external.number().int().positive().meta({ description: "Total grade levels covered" }).optional()
15344
+ }).meta({ id: "CourseMetrics", description: "Aggregate metrics for a course" });
15316
15345
  var CourseMetadata = exports_external.object({
15317
15346
  courseType: CourseType.optional(),
15318
- isSupplemental: exports_external.boolean().optional(),
15319
- isCustom: exports_external.boolean().optional(),
15347
+ isSupplemental: exports_external.boolean().meta({ description: "Whether this is supplemental to a base course" }).optional(),
15348
+ isCustom: exports_external.boolean().meta({ description: "Whether this is a custom course for an individual student" }).optional(),
15320
15349
  publishStatus: PublishStatus.optional(),
15321
- contactEmail: exports_external.email().optional(),
15322
- primaryApp: exports_external.string().optional(),
15350
+ contactEmail: exports_external.email().meta({ description: "Contact email for course issues" }).optional(),
15351
+ primaryApp: exports_external.string().meta({ description: "Primary application identifier" }).optional(),
15323
15352
  goals: CourseGoals.optional(),
15324
15353
  metrics: CourseMetrics.optional()
15325
- });
15354
+ }).meta({ id: "CourseMetadata", description: "Course metadata (matches API metadata object)" });
15326
15355
  var CourseDefaults = exports_external.object({
15327
- courseCode: exports_external.string().optional(),
15328
- level: exports_external.string().optional(),
15356
+ courseCode: exports_external.string().meta({ description: "Course code (e.g., 'MATH101')" }).optional(),
15357
+ level: exports_external.string().meta({ description: "Course level (e.g., 'AP', 'Honors')" }).optional(),
15329
15358
  metadata: CourseMetadata.optional()
15359
+ }).meta({
15360
+ id: "CourseDefaults",
15361
+ description: "Default properties that apply to all courses unless overridden"
15330
15362
  });
15331
15363
  var CourseEnvOverrides = exports_external.object({
15332
- level: exports_external.string().optional(),
15333
- sensor: exports_external.string().url().optional(),
15334
- launchUrl: exports_external.string().url().optional(),
15364
+ level: exports_external.string().meta({ description: "Course level for this environment" }).optional(),
15365
+ sensor: exports_external.url().meta({ description: "Caliper sensor endpoint URL for this environment" }).optional(),
15366
+ launchUrl: exports_external.url().meta({ description: "LTI launch URL for this environment" }).optional(),
15335
15367
  metadata: CourseMetadata.optional()
15368
+ }).meta({
15369
+ id: "CourseEnvOverrides",
15370
+ description: "Environment-specific course overrides (non-identity fields)"
15336
15371
  });
15337
15372
  var CourseOverrides = exports_external.object({
15338
- staging: CourseEnvOverrides.optional(),
15339
- production: CourseEnvOverrides.optional()
15340
- });
15373
+ staging: CourseEnvOverrides.meta({
15374
+ description: "Overrides for staging environment"
15375
+ }).optional(),
15376
+ production: CourseEnvOverrides.meta({
15377
+ description: "Overrides for production environment"
15378
+ }).optional()
15379
+ }).meta({ id: "CourseOverrides", description: "Per-environment course overrides" });
15341
15380
  var CourseConfig = CourseDefaults.extend({
15342
- subject: TimebackSubject,
15343
- grade: TimebackGrade.optional(),
15381
+ subject: TimebackSubject.meta({ description: "Subject area for this course" }),
15382
+ grade: TimebackGrade.meta({
15383
+ description: "Grade level (-1 = Pre-K, 0 = K, 1-12 = grades, 13 = AP)"
15384
+ }).optional(),
15344
15385
  ids: CourseIds.nullable().optional(),
15345
- sensor: exports_external.string().url().optional(),
15346
- launchUrl: exports_external.string().url().optional(),
15386
+ sensor: exports_external.url().meta({ description: "Caliper sensor endpoint URL for this course" }).optional(),
15387
+ launchUrl: exports_external.url().meta({ description: "LTI launch URL for this course" }).optional(),
15347
15388
  overrides: CourseOverrides.optional()
15389
+ }).meta({
15390
+ id: "CourseConfig",
15391
+ description: "Configuration for a single course. Must have either grade or courseCode (or both)."
15348
15392
  });
15349
15393
  var TimebackConfig = exports_external.object({
15350
- name: exports_external.string().min(1, "App name is required"),
15351
- defaults: CourseDefaults.optional(),
15352
- courses: exports_external.array(CourseConfig).min(1, "At least one course is required"),
15353
- sensor: exports_external.string().url().optional(),
15354
- launchUrl: exports_external.string().url().optional()
15394
+ $schema: exports_external.string().meta({ description: "JSON Schema reference for editor support" }).optional(),
15395
+ name: exports_external.string().min(1, "App name is required").meta({ description: "Display name for your app" }),
15396
+ defaults: CourseDefaults.meta({
15397
+ description: "Default properties applied to all courses"
15398
+ }).optional(),
15399
+ courses: exports_external.array(CourseConfig).min(1, "At least one course is required").meta({ description: "Courses available in this app" }),
15400
+ sensor: exports_external.url().meta({ description: "Default Caliper sensor endpoint URL for all courses" }).optional(),
15401
+ launchUrl: exports_external.url().meta({ description: "Default LTI launch URL for all courses" }).optional()
15402
+ }).meta({
15403
+ id: "TimebackConfig",
15404
+ title: "Timeback Config",
15405
+ description: "Configuration schema for timeback.config.json files"
15355
15406
  }).refine((config2) => {
15356
15407
  return config2.courses.every((c) => c.grade !== undefined || c.courseCode !== undefined);
15357
15408
  }, {
@@ -15372,18 +15423,24 @@ var TimebackConfig = exports_external.object({
15372
15423
  message: "Duplicate courseCode found; each must be unique",
15373
15424
  path: ["courses"]
15374
15425
  }).refine((config2) => {
15375
- return config2.courses.every((c) => c.sensor !== undefined || config2.sensor !== undefined);
15376
- }, {
15377
- message: "Each course must have an effective sensor; set a top-level `sensor` or per-course `sensor`",
15378
- path: ["courses"]
15379
- }).refine((config2) => {
15380
- return config2.courses.every((c) => c.launchUrl !== undefined || config2.launchUrl !== undefined);
15426
+ return config2.courses.every((c) => {
15427
+ if (c.sensor !== undefined || config2.sensor !== undefined) {
15428
+ return true;
15429
+ }
15430
+ const launchUrls = [
15431
+ c.launchUrl,
15432
+ config2.launchUrl,
15433
+ c.overrides?.staging?.launchUrl,
15434
+ c.overrides?.production?.launchUrl
15435
+ ].filter(Boolean);
15436
+ return launchUrls.length > 0;
15437
+ });
15381
15438
  }, {
15382
- message: "Each course must have an effective launchUrl; set a top-level `launchUrl` or per-course `launchUrl`",
15439
+ message: "Each course must have an effective sensor. Either set `sensor` explicitly (top-level or per-course), or provide a `launchUrl` so sensor can be derived from its origin.",
15383
15440
  path: ["courses"]
15384
15441
  });
15385
15442
  // ../../types/src/zod/edubridge.ts
15386
- var EdubridgeDateString = exports_external.union([IsoDateString, IsoDateTimeString]);
15443
+ var EdubridgeDateString = IsoDateTimeString;
15387
15444
  var EduBridgeEnrollment = exports_external.object({
15388
15445
  id: exports_external.string(),
15389
15446
  role: exports_external.string(),
@@ -15447,12 +15504,9 @@ var EmailOrStudentId = exports_external.object({
15447
15504
  });
15448
15505
  var SubjectTrackInput = exports_external.object({
15449
15506
  subject: NonEmptyString,
15450
- gradeLevel: NonEmptyString,
15451
- targetCourseId: NonEmptyString,
15452
- metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
15453
- });
15454
- var SubjectTrackUpsertInput = SubjectTrackInput.extend({
15455
- id: NonEmptyString
15507
+ grade: NonEmptyString,
15508
+ courseId: NonEmptyString,
15509
+ orgSourcedId: NonEmptyString.optional()
15456
15510
  });
15457
15511
  var EdubridgeListEnrollmentsParams = exports_external.object({
15458
15512
  userId: NonEmptyString
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timeback/powerpath",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "PowerPath client SDK for Timeback",
5
5
  "type": "module",
6
6
  "exports": {