@ganaka/sdk 1.7.0 → 1.9.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.
package/dist/index.mjs CHANGED
@@ -1,16 +1,16 @@
1
1
  import dayjs from "dayjs";
2
2
  import dotenv from "dotenv";
3
- function _mergeNamespaces(n2, m2) {
4
- for (var i2 = 0; i2 < m2.length; i2++) {
5
- const e = m2[i2];
3
+ function _mergeNamespaces(n2, m) {
4
+ for (var i = 0; i < m.length; i++) {
5
+ const e = m[i];
6
6
  if (typeof e !== "string" && !Array.isArray(e)) {
7
- for (const k2 in e) {
8
- if (k2 !== "default" && !(k2 in n2)) {
9
- const d = Object.getOwnPropertyDescriptor(e, k2);
10
- if (d) {
11
- Object.defineProperty(n2, k2, d.get ? d : {
7
+ for (const k in e) {
8
+ if (k !== "default" && !(k in n2)) {
9
+ const d2 = Object.getOwnPropertyDescriptor(e, k);
10
+ if (d2) {
11
+ Object.defineProperty(n2, k, d2.get ? d2 : {
12
12
  enumerable: true,
13
- get: () => e[k2]
13
+ get: () => e[k]
14
14
  });
15
15
  }
16
16
  }
@@ -38,10 +38,10 @@ function $constructor(name, initializer2, params) {
38
38
  initializer2(inst, def);
39
39
  const proto = _2.prototype;
40
40
  const keys = Object.keys(proto);
41
- for (let i2 = 0; i2 < keys.length; i2++) {
42
- const k2 = keys[i2];
43
- if (!(k2 in inst)) {
44
- inst[k2] = proto[k2].bind(inst);
41
+ for (let i = 0; i < keys.length; i++) {
42
+ const k = keys[i];
43
+ if (!(k in inst)) {
44
+ inst[k] = proto[k].bind(inst);
45
45
  }
46
46
  }
47
47
  }
@@ -86,8 +86,8 @@ function config(newConfig) {
86
86
  return globalConfig;
87
87
  }
88
88
  function getEnumValues(entries) {
89
- const numericValues = Object.values(entries).filter((v) => typeof v === "number");
90
- const values = Object.entries(entries).filter(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v]) => v);
89
+ const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
90
+ const values = Object.entries(entries).filter(([k, _2]) => numericValues.indexOf(+k) === -1).map(([_2, v2]) => v2);
91
91
  return values;
92
92
  }
93
93
  function jsonStringifyReplacer(_2, value) {
@@ -143,9 +143,9 @@ function defineLazy(object2, key, getter) {
143
143
  }
144
144
  return value;
145
145
  },
146
- set(v) {
146
+ set(v2) {
147
147
  Object.defineProperty(object2, key, {
148
- value: v
148
+ value: v2
149
149
  // configurable: true,
150
150
  });
151
151
  },
@@ -241,8 +241,8 @@ function normalizeParams(_params) {
241
241
  return params;
242
242
  }
243
243
  function optionalKeys(shape) {
244
- return Object.keys(shape).filter((k2) => {
245
- return shape[k2]._zod.optin === "optional" && shape[k2]._zod.optout === "optional";
244
+ return Object.keys(shape).filter((k) => {
245
+ return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
246
246
  });
247
247
  }
248
248
  const NUMBER_FORMAT_RANGES = {
@@ -405,11 +405,11 @@ function required(Class, schema, mask) {
405
405
  });
406
406
  return clone(schema, def);
407
407
  }
408
- function aborted(x2, startIndex = 0) {
409
- if (x2.aborted === true)
408
+ function aborted(x, startIndex = 0) {
409
+ if (x.aborted === true)
410
410
  return true;
411
- for (let i2 = startIndex; i2 < x2.issues.length; i2++) {
412
- if (x2.issues[i2]?.continue !== true) {
411
+ for (let i = startIndex; i < x.issues.length; i++) {
412
+ if (x.issues[i]?.continue !== true) {
413
413
  return true;
414
414
  }
415
415
  }
@@ -503,10 +503,10 @@ function formatError(error, mapper = (issue2) => issue2.message) {
503
503
  fieldErrors._errors.push(mapper(issue2));
504
504
  } else {
505
505
  let curr = fieldErrors;
506
- let i2 = 0;
507
- while (i2 < issue2.path.length) {
508
- const el = issue2.path[i2];
509
- const terminal = i2 === issue2.path.length - 1;
506
+ let i = 0;
507
+ while (i < issue2.path.length) {
508
+ const el = issue2.path[i];
509
+ const terminal = i === issue2.path.length - 1;
510
510
  if (!terminal) {
511
511
  curr[el] = curr[el] || { _errors: [] };
512
512
  } else {
@@ -514,7 +514,7 @@ function formatError(error, mapper = (issue2) => issue2.message) {
514
514
  curr[el]._errors.push(mapper(issue2));
515
515
  }
516
516
  curr = curr[el];
517
- i2++;
517
+ i++;
518
518
  }
519
519
  }
520
520
  }
@@ -624,7 +624,7 @@ const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z
624
624
  const base64url = /^[A-Za-z0-9_-]*$/;
625
625
  const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
626
626
  const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
627
- const date$2 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
627
+ const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
628
628
  function timeSource(args) {
629
629
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
630
630
  const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
@@ -1056,9 +1056,9 @@ class Doc {
1056
1056
  return;
1057
1057
  }
1058
1058
  const content = arg;
1059
- const lines = content.split("\n").filter((x2) => x2);
1060
- const minIndent = Math.min(...lines.map((x2) => x2.length - x2.trimStart().length));
1061
- const dedented = lines.map((x2) => x2.slice(minIndent)).map((x2) => " ".repeat(this.indent * 2) + x2);
1059
+ const lines = content.split("\n").filter((x) => x);
1060
+ const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
1061
+ const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
1062
1062
  for (const line of dedented) {
1063
1063
  this.content.push(line);
1064
1064
  }
@@ -1067,7 +1067,7 @@ class Doc {
1067
1067
  const F2 = Function;
1068
1068
  const args = this?.args;
1069
1069
  const content = this?.content ?? [``];
1070
- const lines = [...content.map((x2) => ` ${x2}`)];
1070
+ const lines = [...content.map((x) => ` ${x}`)];
1071
1071
  return new F2(...args, lines.join("\n"));
1072
1072
  }
1073
1073
  }
@@ -1175,10 +1175,10 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1175
1175
  inst["~standard"] = {
1176
1176
  validate: (value) => {
1177
1177
  try {
1178
- const r = safeParse$1(inst, value);
1179
- return r.success ? { value: r.data } : { issues: r.error?.issues };
1178
+ const r2 = safeParse$1(inst, value);
1179
+ return r2.success ? { value: r2.data } : { issues: r2.error?.issues };
1180
1180
  } catch (_2) {
1181
- return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
1181
+ return safeParseAsync$1(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues });
1182
1182
  }
1183
1183
  },
1184
1184
  vendor: "zod",
@@ -1225,10 +1225,10 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1225
1225
  v7: 7,
1226
1226
  v8: 8
1227
1227
  };
1228
- const v = versionMap[def.version];
1229
- if (v === void 0)
1228
+ const v2 = versionMap[def.version];
1229
+ if (v2 === void 0)
1230
1230
  throw new Error(`Invalid UUID version: "${def.version}"`);
1231
- def.pattern ?? (def.pattern = uuid$1(v));
1231
+ def.pattern ?? (def.pattern = uuid$1(v2));
1232
1232
  } else
1233
1233
  def.pattern ?? (def.pattern = uuid$1());
1234
1234
  $ZodStringFormat.init(inst, def);
@@ -1321,7 +1321,7 @@ const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, d
1321
1321
  $ZodStringFormat.init(inst, def);
1322
1322
  });
1323
1323
  const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
1324
- def.pattern ?? (def.pattern = date$2);
1324
+ def.pattern ?? (def.pattern = date$3);
1325
1325
  $ZodStringFormat.init(inst, def);
1326
1326
  });
1327
1327
  const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
@@ -1418,7 +1418,7 @@ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
1418
1418
  function isValidBase64URL(data) {
1419
1419
  if (!base64url.test(data))
1420
1420
  return false;
1421
- const base642 = data.replace(/[-_]/g, (c2) => c2 === "-" ? "+" : "/");
1421
+ const base642 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1422
1422
  const padded = base642.padEnd(Math.ceil(base642.length / 4) * 4, "=");
1423
1423
  return isValidBase64(padded);
1424
1424
  }
@@ -1603,16 +1603,16 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1603
1603
  }
1604
1604
  payload.value = Array(input.length);
1605
1605
  const proms = [];
1606
- for (let i2 = 0; i2 < input.length; i2++) {
1607
- const item = input[i2];
1606
+ for (let i = 0; i < input.length; i++) {
1607
+ const item = input[i];
1608
1608
  const result = def.element._zod.run({
1609
1609
  value: item,
1610
1610
  issues: []
1611
1611
  }, ctx);
1612
1612
  if (result instanceof Promise) {
1613
- proms.push(result.then((result2) => handleArrayResult(result2, payload, i2)));
1613
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
1614
1614
  } else {
1615
- handleArrayResult(result, payload, i2);
1615
+ handleArrayResult(result, payload, i);
1616
1616
  }
1617
1617
  }
1618
1618
  if (proms.length) {
@@ -1635,9 +1635,9 @@ function handlePropertyResult(result, final, key, input) {
1635
1635
  }
1636
1636
  function normalizeDef(def) {
1637
1637
  const keys = Object.keys(def.shape);
1638
- for (const k2 of keys) {
1639
- if (!def.shape?.[k2]?._zod?.traits?.has("$ZodType")) {
1640
- throw new Error(`Invalid element at key "${k2}": expected a Zod schema`);
1638
+ for (const k of keys) {
1639
+ if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
1640
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
1641
1641
  }
1642
1642
  }
1643
1643
  const okeys = optionalKeys(def.shape);
@@ -1661,11 +1661,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1661
1661
  unrecognized.push(key);
1662
1662
  continue;
1663
1663
  }
1664
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
1665
- if (r instanceof Promise) {
1666
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
1664
+ const r2 = _catchall.run({ value: input[key], issues: [] }, ctx);
1665
+ if (r2 instanceof Promise) {
1666
+ proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input)));
1667
1667
  } else {
1668
- handlePropertyResult(r, payload, key, input);
1668
+ handlePropertyResult(r2, payload, key, input);
1669
1669
  }
1670
1670
  }
1671
1671
  if (unrecognized.length) {
@@ -1705,8 +1705,8 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1705
1705
  const field = shape[key]._zod;
1706
1706
  if (field.values) {
1707
1707
  propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
1708
- for (const v of field.values)
1709
- propValues[key].add(v);
1708
+ for (const v2 of field.values)
1709
+ propValues[key].add(v2);
1710
1710
  }
1711
1711
  }
1712
1712
  return propValues;
@@ -1731,11 +1731,11 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1731
1731
  const shape = value.shape;
1732
1732
  for (const key of value.keys) {
1733
1733
  const el = shape[key];
1734
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
1735
- if (r instanceof Promise) {
1736
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
1734
+ const r2 = el._zod.run({ value: input[key], issues: [] }, ctx);
1735
+ if (r2 instanceof Promise) {
1736
+ proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input)));
1737
1737
  } else {
1738
- handlePropertyResult(r, payload, key, input);
1738
+ handlePropertyResult(r2, payload, key, input);
1739
1739
  }
1740
1740
  }
1741
1741
  if (!catchall) {
@@ -1752,8 +1752,8 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
1752
1752
  const doc = new Doc(["shape", "payload", "ctx"]);
1753
1753
  const normalized = _normalized.value;
1754
1754
  const parseStr = (key) => {
1755
- const k2 = esc(key);
1756
- return `shape[${k2}]._zod.run({ value: input[${k2}], issues: [] }, ctx)`;
1755
+ const k = esc(key);
1756
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1757
1757
  };
1758
1758
  doc.write(`const input = payload.value;`);
1759
1759
  const ids = /* @__PURE__ */ Object.create(null);
@@ -1764,23 +1764,23 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
1764
1764
  doc.write(`const newResult = {};`);
1765
1765
  for (const key of normalized.keys) {
1766
1766
  const id = ids[key];
1767
- const k2 = esc(key);
1767
+ const k = esc(key);
1768
1768
  doc.write(`const ${id} = ${parseStr(key)};`);
1769
1769
  doc.write(`
1770
1770
  if (${id}.issues.length) {
1771
1771
  payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1772
1772
  ...iss,
1773
- path: iss.path ? [${k2}, ...iss.path] : [${k2}]
1773
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
1774
1774
  })));
1775
1775
  }
1776
1776
 
1777
1777
 
1778
1778
  if (${id}.value === undefined) {
1779
- if (${k2} in input) {
1780
- newResult[${k2}] = undefined;
1779
+ if (${k} in input) {
1780
+ newResult[${k}] = undefined;
1781
1781
  }
1782
1782
  } else {
1783
- newResult[${k2}] = ${id}.value;
1783
+ newResult[${k}] = ${id}.value;
1784
1784
  }
1785
1785
 
1786
1786
  `);
@@ -1827,7 +1827,7 @@ function handleUnionResults(results, final, inst, ctx) {
1827
1827
  return final;
1828
1828
  }
1829
1829
  }
1830
- const nonaborted = results.filter((r) => !aborted(r));
1830
+ const nonaborted = results.filter((r2) => !aborted(r2));
1831
1831
  if (nonaborted.length === 1) {
1832
1832
  final.value = nonaborted[0].value;
1833
1833
  return nonaborted[0];
@@ -2064,7 +2064,7 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
2064
2064
  const values = getEnumValues(def.entries);
2065
2065
  const valuesSet = new Set(values);
2066
2066
  inst._zod.values = valuesSet;
2067
- inst._zod.pattern = new RegExp(`^(${values.filter((k2) => propertyKeyTypes.has(typeof k2)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`);
2067
+ inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o2) => typeof o2 === "string" ? escapeRegex(o2) : o2.toString()).join("|")})$`);
2068
2068
  inst._zod.parse = (payload, _ctx) => {
2069
2069
  const input = payload.value;
2070
2070
  if (valuesSet.has(input)) {
@@ -2121,7 +2121,7 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2121
2121
  if (def.innerType._zod.optin === "optional") {
2122
2122
  const result = def.innerType._zod.run(payload, ctx);
2123
2123
  if (result instanceof Promise)
2124
- return result.then((r) => handleOptionalResult(r, payload.value));
2124
+ return result.then((r2) => handleOptionalResult(r2, payload.value));
2125
2125
  return handleOptionalResult(result, payload.value);
2126
2126
  }
2127
2127
  if (payload.value === void 0) {
@@ -2189,8 +2189,8 @@ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) =>
2189
2189
  const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
2190
2190
  $ZodType.init(inst, def);
2191
2191
  defineLazy(inst._zod, "values", () => {
2192
- const v = def.innerType._zod.values;
2193
- return v ? new Set([...v].filter((x2) => x2 !== void 0)) : void 0;
2192
+ const v2 = def.innerType._zod.values;
2193
+ return v2 ? new Set([...v2].filter((x) => x !== void 0)) : void 0;
2194
2194
  });
2195
2195
  inst._zod.parse = (payload, ctx) => {
2196
2196
  const result = def.innerType._zod.run(payload, ctx);
@@ -2308,11 +2308,11 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2308
2308
  };
2309
2309
  inst._zod.check = (payload) => {
2310
2310
  const input = payload.value;
2311
- const r = def.fn(input);
2312
- if (r instanceof Promise) {
2313
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
2311
+ const r2 = def.fn(input);
2312
+ if (r2 instanceof Promise) {
2313
+ return r2.then((r3) => handleRefineResult(r3, payload, input, inst));
2314
2314
  }
2315
- handleRefineResult(r, payload, input, inst);
2315
+ handleRefineResult(r2, payload, input, inst);
2316
2316
  return;
2317
2317
  };
2318
2318
  });
@@ -2368,8 +2368,8 @@ class $ZodRegistry {
2368
2368
  if (p2) {
2369
2369
  const pm = { ...this.get(p2) ?? {} };
2370
2370
  delete pm.id;
2371
- const f2 = { ...pm, ...this._map.get(schema) };
2372
- return Object.keys(f2).length ? f2 : void 0;
2371
+ const f = { ...pm, ...this._map.get(schema) };
2372
+ return Object.keys(f).length ? f : void 0;
2373
2373
  }
2374
2374
  return this._map.get(schema);
2375
2375
  }
@@ -2678,6 +2678,13 @@ function _date(Class, params) {
2678
2678
  ...normalizeParams(params)
2679
2679
  });
2680
2680
  }
2681
+ function _coercedDate(Class, params) {
2682
+ return new Class({
2683
+ type: "date",
2684
+ coerce: true,
2685
+ ...normalizeParams(params)
2686
+ });
2687
+ }
2681
2688
  function _lt(value, params) {
2682
2689
  return new $ZodCheckLessThan({
2683
2690
  check: "less_than",
@@ -3260,9 +3267,9 @@ const dateProcessor = (_schema, ctx, _json, _params) => {
3260
3267
  const enumProcessor = (schema, _ctx, json, _params) => {
3261
3268
  const def = schema._zod.def;
3262
3269
  const values = getEnumValues(def.entries);
3263
- if (values.every((v) => typeof v === "number"))
3270
+ if (values.every((v2) => typeof v2 === "number"))
3264
3271
  json.type = "number";
3265
- if (values.every((v) => typeof v === "string"))
3272
+ if (values.every((v2) => typeof v2 === "string"))
3266
3273
  json.type = "string";
3267
3274
  json.enum = values;
3268
3275
  };
@@ -3301,11 +3308,11 @@ const objectProcessor = (schema, ctx, _json, params) => {
3301
3308
  }
3302
3309
  const allKeys = new Set(Object.keys(shape));
3303
3310
  const requiredKeys = new Set([...allKeys].filter((key) => {
3304
- const v = def.shape[key]._zod;
3311
+ const v2 = def.shape[key]._zod;
3305
3312
  if (ctx.io === "input") {
3306
- return v.optin === void 0;
3313
+ return v2.optin === void 0;
3307
3314
  } else {
3308
- return v.optout === void 0;
3315
+ return v2.optout === void 0;
3309
3316
  }
3310
3317
  }));
3311
3318
  if (requiredKeys.size > 0) {
@@ -3326,9 +3333,9 @@ const objectProcessor = (schema, ctx, _json, params) => {
3326
3333
  const unionProcessor = (schema, ctx, json, params) => {
3327
3334
  const def = schema._zod.def;
3328
3335
  const isExclusive = def.inclusive === false;
3329
- const options = def.options.map((x2, i2) => process$1(x2, ctx, {
3336
+ const options = def.options.map((x, i) => process$1(x, ctx, {
3330
3337
  ...params,
3331
- path: [...params.path, isExclusive ? "oneOf" : "anyOf", i2]
3338
+ path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
3332
3339
  }));
3333
3340
  if (isExclusive) {
3334
3341
  json.oneOf = options;
@@ -3444,7 +3451,7 @@ const ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
3444
3451
  $ZodISODate.init(inst, def);
3445
3452
  ZodStringFormat.init(inst, def);
3446
3453
  });
3447
- function date$1(params) {
3454
+ function date$2(params) {
3448
3455
  return _isoDate(ZodISODate, params);
3449
3456
  }
3450
3457
  const ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
@@ -3639,7 +3646,7 @@ const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
3639
3646
  inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
3640
3647
  inst.e164 = (params) => inst.check(_e164(ZodE164, params));
3641
3648
  inst.datetime = (params) => inst.check(datetime(params));
3642
- inst.date = (params) => inst.check(date$1(params));
3649
+ inst.date = (params) => inst.check(date$2(params));
3643
3650
  inst.time = (params) => inst.check(time(params));
3644
3651
  inst.duration = (params) => inst.check(duration(params));
3645
3652
  });
@@ -3803,11 +3810,11 @@ const ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
3803
3810
  inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx);
3804
3811
  inst.min = (value, params) => inst.check(_gte(value, params));
3805
3812
  inst.max = (value, params) => inst.check(_lte(value, params));
3806
- const c2 = inst._zod.bag;
3807
- inst.minDate = c2.minimum ? new Date(c2.minimum) : null;
3808
- inst.maxDate = c2.maximum ? new Date(c2.maximum) : null;
3813
+ const c = inst._zod.bag;
3814
+ inst.minDate = c.minimum ? new Date(c.minimum) : null;
3815
+ inst.maxDate = c.maximum ? new Date(c.maximum) : null;
3809
3816
  });
3810
- function date(params) {
3817
+ function date$1(params) {
3811
3818
  return _date(ZodDate, params);
3812
3819
  }
3813
3820
  const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
@@ -3936,7 +3943,7 @@ const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
3936
3943
  };
3937
3944
  });
3938
3945
  function _enum(values, params) {
3939
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
3946
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
3940
3947
  return new ZodEnum({
3941
3948
  type: "enum",
3942
3949
  entries,
@@ -4104,6 +4111,9 @@ function superRefine(fn) {
4104
4111
  function number(params) {
4105
4112
  return _coercedNumber(ZodNumber, params);
4106
4113
  }
4114
+ function date(params) {
4115
+ return _coercedDate(ZodDate, params);
4116
+ }
4107
4117
  const t$1 = [
4108
4118
  "TOP_GAINERS",
4109
4119
  "VOLUME_SHOCKERS"
@@ -4157,15 +4167,15 @@ const S = object({
4157
4167
  volume: number$1().nullable(),
4158
4168
  week_52_high: number$1().nullable(),
4159
4169
  week_52_low: number$1().nullable()
4160
- }), a = object({
4170
+ }), r = object({
4161
4171
  status: _enum(["SUCCESS", "FAILURE"]),
4162
4172
  payload: S
4163
- }), f = object({
4173
+ }), v = object({
4164
4174
  nseSymbol: string(),
4165
4175
  name: string(),
4166
4176
  price: number$1(),
4167
- quoteData: a.nullable().optional()
4168
- }), m = _enum(o$1), t = object({
4177
+ quoteData: r.nullable().optional()
4178
+ }), u = _enum(o$1), t = object({
4169
4179
  statusCode: number$1(),
4170
4180
  message: string(),
4171
4181
  data: unknown()
@@ -4188,37 +4198,37 @@ const b = [
4188
4198
  "1day",
4189
4199
  "1week",
4190
4200
  "1month"
4191
- ], n = string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, {
4201
+ ], o = string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, {
4192
4202
  message: "datetime must be in format YYYY-MM-DDTHH:mm:ss (e.g., 2025-12-26T11:06:00)"
4193
4203
  }).refine(
4194
- (r) => {
4195
- const u = new Date(r);
4196
- return !isNaN(u.getTime());
4204
+ (s) => {
4205
+ const c = new Date(s);
4206
+ return !isNaN(c.getTime());
4197
4207
  },
4198
4208
  {
4199
4209
  message: "datetime must be a valid date and time"
4200
4210
  }
4201
- ), i = string().regex(/^\d{4}-\d{2}-\d{2}$/, {
4211
+ ), n = string().regex(/^\d{4}-\d{2}-\d{2}$/, {
4202
4212
  message: "date must be in format YYYY-MM-DD (e.g., 2025-12-26)"
4203
4213
  }).refine(
4204
- (r) => {
4205
- const u = new Date(r);
4206
- return !isNaN(u.getTime());
4214
+ (s) => {
4215
+ const c = new Date(s);
4216
+ return !isNaN(c.getTime());
4207
4217
  },
4208
4218
  {
4209
4219
  message: "date must be a valid date"
4210
4220
  }
4211
- ), o = string().regex(/^([A-Za-z_]+\/[A-Za-z_]+|[+-]\d{2}:\d{2})$/, {
4221
+ ), a = string().regex(/^([A-Za-z_]+\/[A-Za-z_]+|[+-]\d{2}:\d{2})$/, {
4212
4222
  message: "timezone must be an IANA identifier (e.g., 'Asia/Kolkata') or offset (e.g., '+05:30')"
4213
4223
  }).refine(
4214
- (r) => {
4215
- if (r.includes("/"))
4224
+ (s) => {
4225
+ if (s.includes("/"))
4216
4226
  try {
4217
- return new Intl.DateTimeFormat("en-US", { timeZone: r }), true;
4227
+ return new Intl.DateTimeFormat("en-US", { timeZone: s }), true;
4218
4228
  } catch {
4219
4229
  return false;
4220
4230
  }
4221
- return /^([+-]\d{2}:\d{2})$/.test(r);
4231
+ return /^([+-]\d{2}:\d{2})$/.test(s);
4222
4232
  },
4223
4233
  {
4224
4234
  message: "timezone must be a valid IANA identifier or UTC offset"
@@ -4227,17 +4237,17 @@ const b = [
4227
4237
  nseSymbol: string(),
4228
4238
  name: string(),
4229
4239
  price: number$1(),
4230
- quoteData: a.nullable().optional()
4231
- }), c = _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]), g = _enum(o$1), _ = object({
4240
+ quoteData: r.nullable().optional()
4241
+ }), d = _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]), g = _enum(o$1), _ = object({
4232
4242
  nseSymbol: string(),
4233
- quoteData: a
4243
+ quoteData: r
4234
4244
  });
4235
4245
  ({
4236
4246
  body: object({
4237
4247
  data: object({
4238
- timestamp: n,
4239
- timezone: o.optional(),
4240
- shortlistType: c,
4248
+ timestamp: o,
4249
+ timezone: a.optional(),
4250
+ shortlistType: d,
4241
4251
  entries: array(p),
4242
4252
  scope: g.optional()
4243
4253
  })
@@ -4247,7 +4257,7 @@ const b = [
4247
4257
  id: string(),
4248
4258
  timestamp: string(),
4249
4259
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4250
- shortlistType: c,
4260
+ shortlistType: d,
4251
4261
  entriesCount: number$1()
4252
4262
  })
4253
4263
  })
@@ -4255,8 +4265,8 @@ const b = [
4255
4265
  ({
4256
4266
  body: object({
4257
4267
  data: object({
4258
- timestamp: n,
4259
- timezone: o.optional(),
4268
+ timestamp: o,
4269
+ timezone: a.optional(),
4260
4270
  quotes: array(_)
4261
4271
  })
4262
4272
  }),
@@ -4271,9 +4281,9 @@ const b = [
4271
4281
  ({
4272
4282
  body: object({
4273
4283
  data: object({
4274
- timestamp: n,
4275
- timezone: o.optional(),
4276
- quoteData: a,
4284
+ timestamp: o,
4285
+ timezone: a.optional(),
4286
+ quoteData: r,
4277
4287
  dayChangePerc: number$1()
4278
4288
  })
4279
4289
  }),
@@ -4286,6 +4296,17 @@ const b = [
4286
4296
  })
4287
4297
  })
4288
4298
  });
4299
+ ({
4300
+ query: object({
4301
+ date: n
4302
+ }),
4303
+ response: t.extend({
4304
+ data: object({
4305
+ isHoliday: boolean(),
4306
+ date: n
4307
+ })
4308
+ })
4309
+ });
4289
4310
  const y = object({
4290
4311
  status: _enum(["SUCCESS", "FAILURE"]),
4291
4312
  payload: object({
@@ -4298,13 +4319,13 @@ const y = object({
4298
4319
  end_time: string(),
4299
4320
  interval_in_minutes: number$1()
4300
4321
  })
4301
- }), x = {
4322
+ }), O = {
4302
4323
  query: object({
4303
4324
  symbol: string(),
4304
4325
  interval: _enum(b),
4305
- start_datetime: n,
4306
- end_datetime: n,
4307
- timezone: o.optional()
4326
+ start_datetime: o,
4327
+ end_datetime: o,
4328
+ timezone: a.optional()
4308
4329
  }),
4309
4330
  response: t.extend({
4310
4331
  data: y
@@ -4314,21 +4335,21 @@ const y = object({
4314
4335
  symbol: string(),
4315
4336
  exchange: _enum(["NSE", "BSE"]).optional(),
4316
4337
  segment: _enum(["CASH"]).optional(),
4317
- datetime: n.optional(),
4318
- timezone: o.optional()
4338
+ datetime: o.optional(),
4339
+ timezone: a.optional()
4319
4340
  }),
4320
4341
  response: t.extend({
4321
- data: a.nullable()
4342
+ data: r.nullable()
4322
4343
  })
4323
- }, O = {
4344
+ }, z = {
4324
4345
  response: t.extend({
4325
4346
  data: string()
4326
4347
  })
4327
4348
  }, w = {
4328
4349
  query: object({
4329
4350
  symbol: string(),
4330
- end_datetime: n,
4331
- timezone: o.optional()
4351
+ end_datetime: o,
4352
+ timezone: a.optional()
4332
4353
  }),
4333
4354
  response: t.extend({
4334
4355
  data: object({
@@ -4338,7 +4359,7 @@ const y = object({
4338
4359
  timestamp: string(),
4339
4360
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4340
4361
  nseSymbol: string(),
4341
- quoteData: a,
4362
+ quoteData: r,
4342
4363
  createdAt: string(),
4343
4364
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4344
4365
  updatedAt: string()
@@ -4347,10 +4368,10 @@ const y = object({
4347
4368
  )
4348
4369
  })
4349
4370
  })
4350
- }, z = {
4371
+ }, A = {
4351
4372
  query: object({
4352
- end_datetime: n,
4353
- timezone: o.optional()
4373
+ end_datetime: o,
4374
+ timezone: a.optional()
4354
4375
  }),
4355
4376
  response: t.extend({
4356
4377
  data: object({
@@ -4359,7 +4380,7 @@ const y = object({
4359
4380
  id: string(),
4360
4381
  timestamp: string(),
4361
4382
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4362
- quoteData: a,
4383
+ quoteData: r,
4363
4384
  createdAt: string(),
4364
4385
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4365
4386
  updatedAt: string()
@@ -4368,48 +4389,48 @@ const y = object({
4368
4389
  )
4369
4390
  })
4370
4391
  })
4371
- }, M = {
4392
+ }, D = {
4372
4393
  query: object({
4373
- datetime: n.optional(),
4374
- timezone: o.optional()
4394
+ datetime: o.optional(),
4395
+ timezone: a.optional()
4375
4396
  }),
4376
4397
  response: t.extend({
4377
- data: a.nullable()
4398
+ data: r.nullable()
4378
4399
  })
4379
- }, Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4400
+ }, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4380
4401
  __proto__: null,
4381
- getGrowwHistoricalCandles: x,
4382
- getGrowwNiftyQuote: M,
4383
- getGrowwNiftyQuoteTimeline: z,
4402
+ getGrowwHistoricalCandles: O,
4403
+ getGrowwNiftyQuote: D,
4404
+ getGrowwNiftyQuoteTimeline: A,
4384
4405
  getGrowwQuote: q,
4385
4406
  getGrowwQuoteTimeline: w,
4386
- getGrowwToken: O,
4407
+ getGrowwToken: z,
4387
4408
  growwHistoricalCandlesSchema: y
4388
- }, Symbol.toStringTag, { value: "Module" })), h = object({
4409
+ }, Symbol.toStringTag, { value: "Module" })), j = object({
4389
4410
  name: string(),
4390
4411
  price: number$1(),
4391
4412
  nseSymbol: string()
4392
- }), D = {
4413
+ }), M = {
4393
4414
  query: object({
4394
4415
  type: _enum(["top-gainers", "volume-shockers"]),
4395
- datetime: n.optional(),
4396
- timezone: o.optional(),
4397
- scope: m.optional()
4416
+ datetime: o.optional(),
4417
+ timezone: a.optional(),
4418
+ scope: u.optional()
4398
4419
  }),
4399
4420
  response: t.extend({
4400
- data: array(h).nullable()
4421
+ data: array(j).nullable()
4401
4422
  })
4402
- }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4423
+ }, Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4403
4424
  __proto__: null,
4404
- getLists: D,
4405
- listSchema: h
4406
- }, Symbol.toStringTag, { value: "Module" })), A = {
4425
+ getLists: M,
4426
+ listSchema: j
4427
+ }, Symbol.toStringTag, { value: "Module" })), C = {
4407
4428
  query: object({
4408
4429
  type: _enum(["top-gainers", "volume-shockers"]),
4409
- start_datetime: n,
4410
- end_datetime: n,
4411
- timezone: o.optional(),
4412
- scope: m.optional()
4430
+ start_datetime: o,
4431
+ end_datetime: o,
4432
+ timezone: a.optional(),
4433
+ scope: u.optional()
4413
4434
  }),
4414
4435
  response: t.extend({
4415
4436
  data: object({
@@ -4428,10 +4449,11 @@ const y = object({
4428
4449
  )
4429
4450
  })
4430
4451
  })
4431
- }, xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4452
+ }, ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4432
4453
  __proto__: null,
4433
- getShortlistPersistence: A
4434
- }, Symbol.toStringTag, { value: "Module" })), C = {
4454
+ getShortlistPersistence: C
4455
+ }, Symbol.toStringTag, { value: "Module" }));
4456
+ ({
4435
4457
  query: object({}),
4436
4458
  response: t.extend({
4437
4459
  data: object({
@@ -4445,13 +4467,42 @@ const y = object({
4445
4467
  )
4446
4468
  })
4447
4469
  })
4448
- }, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4470
+ });
4471
+ ({
4472
+ response: t.extend({
4473
+ data: object({
4474
+ holidays: array(
4475
+ object({
4476
+ id: string().uuid(),
4477
+ date: n,
4478
+ createdAt: date(),
4479
+ updatedAt: date()
4480
+ })
4481
+ )
4482
+ })
4483
+ })
4484
+ });
4485
+ const E = {
4486
+ query: object({}),
4487
+ response: t.extend({
4488
+ data: object({
4489
+ dates: array(
4490
+ object({
4491
+ date: string(),
4492
+ // Format: YYYY-MM-DD
4493
+ timestamps: array(string())
4494
+ // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4495
+ })
4496
+ )
4497
+ })
4498
+ })
4499
+ }, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4449
4500
  __proto__: null,
4450
- getAvailableDatetimes: C
4451
- }, Symbol.toStringTag, { value: "Module" })), k = {
4501
+ getAvailableDatetimes: E
4502
+ }, Symbol.toStringTag, { value: "Module" })), L = {
4452
4503
  query: object({
4453
4504
  symbol: string(),
4454
- date: i,
4505
+ date: n,
4455
4506
  interval: _enum(b).optional()
4456
4507
  }),
4457
4508
  response: t.extend({
@@ -4470,12 +4521,12 @@ const y = object({
4470
4521
  interval_in_minutes: number$1()
4471
4522
  })
4472
4523
  })
4473
- }, E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4524
+ }, I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4474
4525
  __proto__: null,
4475
- getCandles: k
4476
- }, Symbol.toStringTag, { value: "Module" })), L = {
4526
+ getCandles: L
4527
+ }, Symbol.toStringTag, { value: "Module" })), N = {
4477
4528
  query: object({
4478
- date: i,
4529
+ date: n,
4479
4530
  type: _enum(t$1)
4480
4531
  }),
4481
4532
  response: t.extend({
@@ -4493,12 +4544,12 @@ const y = object({
4493
4544
  )
4494
4545
  })
4495
4546
  })
4496
- }, I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4547
+ }, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4497
4548
  __proto__: null,
4498
- getDailyPersistentCompanies: L
4499
- }, Symbol.toStringTag, { value: "Module" })), N = {
4549
+ getDailyPersistentCompanies: N
4550
+ }, Symbol.toStringTag, { value: "Module" })), G = {
4500
4551
  query: object({
4501
- date: i,
4552
+ date: n,
4502
4553
  type: _enum(t$1)
4503
4554
  }),
4504
4555
  response: t.extend({
@@ -4508,26 +4559,26 @@ const y = object({
4508
4559
  uniqueCount: number$1()
4509
4560
  })
4510
4561
  })
4511
- }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4562
+ }, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4512
4563
  __proto__: null,
4513
- getDailyUniqueCompanies: N
4514
- }, Symbol.toStringTag, { value: "Module" })), Q = object({
4564
+ getDailyUniqueCompanies: G
4565
+ }, Symbol.toStringTag, { value: "Module" })), U = object({
4515
4566
  id: uuid(),
4516
4567
  username: string()
4517
- }), U = {
4568
+ }), Y = {
4518
4569
  body: object({
4519
4570
  developerToken: string().nonempty("Developer token is required")
4520
4571
  }),
4521
4572
  response: t.extend({
4522
- data: Q
4573
+ data: U
4523
4574
  })
4524
- }, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4575
+ }, F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4525
4576
  __proto__: null,
4526
- signIn: U
4527
- }, Symbol.toStringTag, { value: "Module" })), Y = {
4577
+ signIn: Y
4578
+ }, Symbol.toStringTag, { value: "Module" })), B = {
4528
4579
  query: object({
4529
4580
  symbol: string(),
4530
- date: i
4581
+ date: n
4531
4582
  }),
4532
4583
  response: t.extend({
4533
4584
  data: object({
@@ -4537,7 +4588,7 @@ const y = object({
4537
4588
  timestamp: string(),
4538
4589
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4539
4590
  nseSymbol: string(),
4540
- quoteData: a,
4591
+ quoteData: r,
4541
4592
  createdAt: string(),
4542
4593
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4543
4594
  updatedAt: string()
@@ -4546,10 +4597,10 @@ const y = object({
4546
4597
  )
4547
4598
  })
4548
4599
  })
4549
- }, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4600
+ }, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4550
4601
  __proto__: null,
4551
- getQuoteTimeline: Y
4552
- }, Symbol.toStringTag, { value: "Module" })), F = object({
4602
+ getQuoteTimeline: B
4603
+ }, Symbol.toStringTag, { value: "Module" })), Z = object({
4553
4604
  id: uuid(),
4554
4605
  start_datetime: string(),
4555
4606
  end_datetime: string(),
@@ -4557,15 +4608,15 @@ const y = object({
4557
4608
  orderCount: number$1(),
4558
4609
  name: string().nullable().optional(),
4559
4610
  tags: array(string()).optional()
4560
- }), B = record(
4611
+ }), V = record(
4561
4612
  string(),
4562
4613
  // date string (YYYY-MM-DD)
4563
- array(F)
4564
- ), K = {
4614
+ array(Z)
4615
+ ), W = {
4565
4616
  response: t.extend({
4566
- data: B
4617
+ data: V
4567
4618
  })
4568
- }, Z = object({
4619
+ }, J = object({
4569
4620
  id: uuid(),
4570
4621
  nseSymbol: string(),
4571
4622
  entryPrice: number(),
@@ -4584,7 +4635,7 @@ const y = object({
4584
4635
  stopLossHit: boolean().optional(),
4585
4636
  stopLossTimestamp: string().optional(),
4586
4637
  timeToStopLossMinutes: number$1().optional()
4587
- }), V = {
4638
+ }), X = {
4588
4639
  params: object({
4589
4640
  runId: uuid()
4590
4641
  }),
@@ -4592,46 +4643,46 @@ const y = object({
4592
4643
  targetGainPercentage: number().optional()
4593
4644
  }),
4594
4645
  response: t.extend({
4595
- data: array(Z)
4646
+ data: array(J)
4596
4647
  })
4597
- }, W = object({
4598
- start_datetime: n,
4599
- end_datetime: n,
4600
- timezone: o.optional(),
4648
+ }, ee = object({
4649
+ start_datetime: o,
4650
+ end_datetime: o,
4651
+ timezone: a.optional(),
4601
4652
  name: string().optional(),
4602
4653
  tags: array(string().min(1).max(50)).optional()
4603
- }), J = object({
4654
+ }), te = object({
4604
4655
  id: uuid(),
4605
- start_datetime: n,
4606
- end_datetime: n,
4656
+ start_datetime: o,
4657
+ end_datetime: o,
4607
4658
  completed: boolean(),
4608
4659
  name: string().nullable().optional(),
4609
4660
  tags: array(string()).optional()
4610
- }), X = {
4611
- body: W,
4661
+ }), oe = {
4662
+ body: ee,
4612
4663
  response: t.extend({
4613
- data: J
4664
+ data: te
4614
4665
  })
4615
- }, ee = object({
4666
+ }, ne = object({
4616
4667
  completed: boolean().optional(),
4617
4668
  name: string().nullable().optional(),
4618
4669
  tags: array(string().min(1).max(50)).optional()
4619
- }), te = object({
4670
+ }), ae = object({
4620
4671
  id: uuid(),
4621
4672
  start_datetime: string(),
4622
4673
  end_datetime: string(),
4623
4674
  completed: boolean(),
4624
4675
  name: string().nullable().optional(),
4625
4676
  tags: array(string()).optional()
4626
- }), ne = {
4677
+ }), re = {
4627
4678
  params: object({
4628
4679
  runId: uuid()
4629
4680
  }),
4630
- body: ee,
4681
+ body: ne,
4631
4682
  response: t.extend({
4632
- data: te
4683
+ data: ae
4633
4684
  })
4634
- }, oe = {
4685
+ }, se = {
4635
4686
  params: object({
4636
4687
  runId: uuid()
4637
4688
  }),
@@ -4640,14 +4691,14 @@ const y = object({
4640
4691
  id: uuid()
4641
4692
  })
4642
4693
  })
4643
- }, ae = object({
4694
+ }, ie = object({
4644
4695
  nseSymbol: string(),
4645
4696
  entryPrice: number(),
4646
4697
  stopLossPrice: number(),
4647
4698
  takeProfitPrice: number(),
4648
- datetime: n,
4649
- timezone: o.optional()
4650
- }), re = object({
4699
+ datetime: o,
4700
+ timezone: a.optional()
4701
+ }), le = object({
4651
4702
  id: uuid(),
4652
4703
  nseSymbol: string(),
4653
4704
  entryPrice: number(),
@@ -4655,28 +4706,28 @@ const y = object({
4655
4706
  takeProfitPrice: number(),
4656
4707
  datetime: string(),
4657
4708
  runId: uuid()
4658
- }), se = {
4709
+ }), ce = {
4659
4710
  params: object({
4660
4711
  runId: uuid()
4661
4712
  }),
4662
- body: ae,
4713
+ body: ie,
4663
4714
  response: t.extend({
4664
- data: re
4715
+ data: le
4665
4716
  })
4666
- }, ie = {
4717
+ }, de = {
4667
4718
  response: t.extend({
4668
4719
  data: array(string())
4669
4720
  })
4670
- }, le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4721
+ }, ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4671
4722
  __proto__: null,
4672
- createOrder: se,
4673
- createRun: X,
4674
- deleteRun: oe,
4675
- getRunOrders: V,
4676
- getRunTags: ie,
4677
- getRuns: K,
4678
- updateRun: ne
4679
- }, Symbol.toStringTag, { value: "Module" })), j = f.extend({
4723
+ createOrder: ce,
4724
+ createRun: oe,
4725
+ deleteRun: se,
4726
+ getRunOrders: X,
4727
+ getRunTags: de,
4728
+ getRuns: W,
4729
+ updateRun: re
4730
+ }, Symbol.toStringTag, { value: "Module" })), h = v.extend({
4680
4731
  // Target and stop loss prices
4681
4732
  targetPrice: number$1().optional(),
4682
4733
  stopLossPrice: number$1().optional(),
@@ -4688,12 +4739,12 @@ const y = object({
4688
4739
  timeToStopLossMinutes: number$1().optional(),
4689
4740
  targetTimestamp: string().optional(),
4690
4741
  stopLossTimestamp: string().optional()
4691
- }), ue = {
4742
+ }), me = {
4692
4743
  query: object({
4693
- datetime: n,
4694
- timezone: o.optional(),
4744
+ datetime: o,
4745
+ timezone: a.optional(),
4695
4746
  type: _enum(t$1),
4696
- scope: m.optional(),
4747
+ scope: u.optional(),
4697
4748
  takeProfitPercentage: number().min(0).optional().default(2),
4698
4749
  stopLossPercentage: number().min(0).max(100).optional().default(1.5)
4699
4750
  }),
@@ -4704,24 +4755,24 @@ const y = object({
4704
4755
  timestamp: string(),
4705
4756
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4706
4757
  shortlistType: _enum(t$1),
4707
- entries: array(j)
4758
+ entries: array(h)
4708
4759
  }).nullable()
4709
4760
  })
4710
4761
  })
4711
- }, ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4762
+ }, be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4712
4763
  __proto__: null,
4713
- getShortlists: ue,
4714
- shortlistEntryWithMetricsSchema: j
4715
- }, Symbol.toStringTag, { value: "Module" })), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4764
+ getShortlists: me,
4765
+ shortlistEntryWithMetricsSchema: h
4766
+ }, Symbol.toStringTag, { value: "Module" })), Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4716
4767
  __proto__: null,
4717
- v1_dashboard_auth_schemas: H,
4718
- v1_dashboard_available_datetimes_schemas: R,
4719
- v1_dashboard_candles_schemas: E,
4720
- v1_dashboard_daily_persistent_companies_schemas: I,
4721
- v1_dashboard_daily_unique_companies_schemas: G,
4722
- v1_dashboard_quote_timeline_schemas: $,
4723
- v1_dashboard_runs_schemas: le,
4724
- v1_dashboard_shortlists_schemas: ce
4768
+ v1_dashboard_auth_schemas: F,
4769
+ v1_dashboard_available_datetimes_schemas: H,
4770
+ v1_dashboard_candles_schemas: I,
4771
+ v1_dashboard_daily_persistent_companies_schemas: $,
4772
+ v1_dashboard_daily_unique_companies_schemas: Q,
4773
+ v1_dashboard_quote_timeline_schemas: K,
4774
+ v1_dashboard_runs_schemas: ue,
4775
+ v1_dashboard_shortlists_schemas: be
4725
4776
  }, Symbol.toStringTag, { value: "Module" }));
4726
4777
  ({
4727
4778
  response: t.extend({
@@ -4737,8 +4788,8 @@ const l = object({
4737
4788
  id: uuid(),
4738
4789
  username: string(),
4739
4790
  token: string(),
4740
- createdAt: date(),
4741
- updatedAt: date()
4791
+ createdAt: date$1(),
4792
+ updatedAt: date$1()
4742
4793
  });
4743
4794
  ({
4744
4795
  query: object({
@@ -4787,29 +4838,102 @@ const l = object({
4787
4838
  })
4788
4839
  })
4789
4840
  });
4841
+ ({
4842
+ query: object({}),
4843
+ response: t.extend({
4844
+ data: object({
4845
+ dates: array(
4846
+ object({
4847
+ date: n,
4848
+ shortlistCount: number$1(),
4849
+ quoteCount: number$1(),
4850
+ niftyCount: number$1()
4851
+ })
4852
+ )
4853
+ })
4854
+ })
4855
+ });
4856
+ ({
4857
+ body: object({
4858
+ dates: array(n).min(1)
4859
+ }),
4860
+ response: t.extend({
4861
+ data: object({
4862
+ deleted: object({
4863
+ shortlists: number$1(),
4864
+ quotes: number$1(),
4865
+ niftyQuotes: number$1()
4866
+ })
4867
+ })
4868
+ })
4869
+ });
4870
+ ({
4871
+ response: t.extend({
4872
+ data: object({
4873
+ holidays: array(
4874
+ object({
4875
+ id: string().uuid(),
4876
+ date: n,
4877
+ createdAt: date(),
4878
+ updatedAt: date()
4879
+ })
4880
+ )
4881
+ })
4882
+ })
4883
+ });
4884
+ ({
4885
+ body: object({
4886
+ dates: array(n).min(1)
4887
+ }),
4888
+ response: t.extend({
4889
+ data: object({
4890
+ holidays: array(
4891
+ object({
4892
+ id: string().uuid(),
4893
+ date: n,
4894
+ createdAt: date(),
4895
+ updatedAt: date()
4896
+ })
4897
+ )
4898
+ })
4899
+ })
4900
+ });
4901
+ ({
4902
+ body: object({
4903
+ dates: array(n).min(1)
4904
+ }),
4905
+ response: t.extend({
4906
+ data: object({
4907
+ deleted: object({
4908
+ count: number$1(),
4909
+ dates: array(n)
4910
+ })
4911
+ })
4912
+ })
4913
+ });
4790
4914
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4791
- function getDefaultExportFromCjs(x2) {
4792
- return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4915
+ function getDefaultExportFromCjs(x) {
4916
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4793
4917
  }
4794
4918
  function getAugmentedNamespace(n2) {
4795
4919
  if (n2.__esModule) return n2;
4796
- var f2 = n2.default;
4797
- if (typeof f2 == "function") {
4920
+ var f = n2.default;
4921
+ if (typeof f == "function") {
4798
4922
  var a2 = function a3() {
4799
4923
  if (this instanceof a3) {
4800
- return Reflect.construct(f2, arguments, this.constructor);
4924
+ return Reflect.construct(f, arguments, this.constructor);
4801
4925
  }
4802
- return f2.apply(this, arguments);
4926
+ return f.apply(this, arguments);
4803
4927
  };
4804
- a2.prototype = f2.prototype;
4928
+ a2.prototype = f.prototype;
4805
4929
  } else a2 = {};
4806
4930
  Object.defineProperty(a2, "__esModule", { value: true });
4807
- Object.keys(n2).forEach(function(k2) {
4808
- var d = Object.getOwnPropertyDescriptor(n2, k2);
4809
- Object.defineProperty(a2, k2, d.get ? d : {
4931
+ Object.keys(n2).forEach(function(k) {
4932
+ var d2 = Object.getOwnPropertyDescriptor(n2, k);
4933
+ Object.defineProperty(a2, k, d2.get ? d2 : {
4810
4934
  enumerable: true,
4811
4935
  get: function() {
4812
- return n2[k2];
4936
+ return n2[k];
4813
4937
  }
4814
4938
  });
4815
4939
  });
@@ -4817,73 +4941,73 @@ function getAugmentedNamespace(n2) {
4817
4941
  }
4818
4942
  var utc$1 = { exports: {} };
4819
4943
  (function(module, exports$1) {
4820
- !function(t2, i2) {
4821
- module.exports = i2();
4944
+ !function(t2, i) {
4945
+ module.exports = i();
4822
4946
  }(commonjsGlobal, function() {
4823
- var t2 = "minute", i2 = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g;
4824
- return function(s, f2, n2) {
4825
- var u = f2.prototype;
4947
+ var t2 = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g;
4948
+ return function(s, f, n2) {
4949
+ var u2 = f.prototype;
4826
4950
  n2.utc = function(t3) {
4827
- var i3 = { date: t3, utc: true, args: arguments };
4828
- return new f2(i3);
4829
- }, u.utc = function(i3) {
4951
+ var i2 = { date: t3, utc: true, args: arguments };
4952
+ return new f(i2);
4953
+ }, u2.utc = function(i2) {
4830
4954
  var e2 = n2(this.toDate(), { locale: this.$L, utc: true });
4831
- return i3 ? e2.add(this.utcOffset(), t2) : e2;
4832
- }, u.local = function() {
4955
+ return i2 ? e2.add(this.utcOffset(), t2) : e2;
4956
+ }, u2.local = function() {
4833
4957
  return n2(this.toDate(), { locale: this.$L, utc: false });
4834
4958
  };
4835
- var r = u.parse;
4836
- u.parse = function(t3) {
4837
- t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r.call(this, t3);
4959
+ var r2 = u2.parse;
4960
+ u2.parse = function(t3) {
4961
+ t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r2.call(this, t3);
4838
4962
  };
4839
- var o2 = u.init;
4840
- u.init = function() {
4963
+ var o2 = u2.init;
4964
+ u2.init = function() {
4841
4965
  if (this.$u) {
4842
4966
  var t3 = this.$d;
4843
4967
  this.$y = t3.getUTCFullYear(), this.$M = t3.getUTCMonth(), this.$D = t3.getUTCDate(), this.$W = t3.getUTCDay(), this.$H = t3.getUTCHours(), this.$m = t3.getUTCMinutes(), this.$s = t3.getUTCSeconds(), this.$ms = t3.getUTCMilliseconds();
4844
4968
  } else o2.call(this);
4845
4969
  };
4846
- var a2 = u.utcOffset;
4847
- u.utcOffset = function(s2, f3) {
4970
+ var a2 = u2.utcOffset;
4971
+ u2.utcOffset = function(s2, f2) {
4848
4972
  var n3 = this.$utils().u;
4849
4973
  if (n3(s2)) return this.$u ? 0 : n3(this.$offset) ? a2.call(this) : this.$offset;
4850
4974
  if ("string" == typeof s2 && (s2 = function(t3) {
4851
4975
  void 0 === t3 && (t3 = "");
4852
- var s3 = t3.match(i2);
4976
+ var s3 = t3.match(i);
4853
4977
  if (!s3) return null;
4854
- var f4 = ("" + s3[0]).match(e) || ["-", 0, 0], n4 = f4[0], u3 = 60 * +f4[1] + +f4[2];
4855
- return 0 === u3 ? 0 : "+" === n4 ? u3 : -u3;
4978
+ var f3 = ("" + s3[0]).match(e) || ["-", 0, 0], n4 = f3[0], u4 = 60 * +f3[1] + +f3[2];
4979
+ return 0 === u4 ? 0 : "+" === n4 ? u4 : -u4;
4856
4980
  }(s2), null === s2)) return this;
4857
- var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
4858
- if (0 === u2) return this.utc(f3);
4859
- var r2 = this.clone();
4860
- if (f3) return r2.$offset = u2, r2.$u = false, r2;
4981
+ var u3 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
4982
+ if (0 === u3) return this.utc(f2);
4983
+ var r3 = this.clone();
4984
+ if (f2) return r3.$offset = u3, r3.$u = false, r3;
4861
4985
  var o3 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
4862
- return (r2 = this.local().add(u2 + o3, t2)).$offset = u2, r2.$x.$localOffset = o3, r2;
4986
+ return (r3 = this.local().add(u3 + o3, t2)).$offset = u3, r3.$x.$localOffset = o3, r3;
4863
4987
  };
4864
- var h2 = u.format;
4865
- u.format = function(t3) {
4866
- var i3 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
4867
- return h2.call(this, i3);
4868
- }, u.valueOf = function() {
4988
+ var h2 = u2.format;
4989
+ u2.format = function(t3) {
4990
+ var i2 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
4991
+ return h2.call(this, i2);
4992
+ }, u2.valueOf = function() {
4869
4993
  var t3 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
4870
4994
  return this.$d.valueOf() - 6e4 * t3;
4871
- }, u.isUTC = function() {
4995
+ }, u2.isUTC = function() {
4872
4996
  return !!this.$u;
4873
- }, u.toISOString = function() {
4997
+ }, u2.toISOString = function() {
4874
4998
  return this.toDate().toISOString();
4875
- }, u.toString = function() {
4999
+ }, u2.toString = function() {
4876
5000
  return this.toDate().toUTCString();
4877
5001
  };
4878
- var l2 = u.toDate;
4879
- u.toDate = function(t3) {
5002
+ var l2 = u2.toDate;
5003
+ u2.toDate = function(t3) {
4880
5004
  return "s" === t3 && this.$offset ? n2(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l2.call(this);
4881
5005
  };
4882
- var c2 = u.diff;
4883
- u.diff = function(t3, i3, e2) {
4884
- if (t3 && this.$u === t3.$u) return c2.call(this, t3, i3, e2);
4885
- var s2 = this.local(), f3 = n2(t3).local();
4886
- return c2.call(s2, f3, i3, e2);
5006
+ var c = u2.diff;
5007
+ u2.diff = function(t3, i2, e2) {
5008
+ if (t3 && this.$u === t3.$u) return c.call(this, t3, i2, e2);
5009
+ var s2 = this.local(), f2 = n2(t3).local();
5010
+ return c.call(s2, f2, i2, e2);
4887
5011
  };
4888
5012
  };
4889
5013
  });
@@ -4896,57 +5020,57 @@ var timezone$1 = { exports: {} };
4896
5020
  module.exports = e();
4897
5021
  }(commonjsGlobal, function() {
4898
5022
  var t2 = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, e = {};
4899
- return function(n2, i2, o2) {
4900
- var r, a2 = function(t3, n3, i3) {
4901
- void 0 === i3 && (i3 = {});
4902
- var o3 = new Date(t3), r2 = function(t4, n4) {
5023
+ return function(n2, i, o2) {
5024
+ var r2, a2 = function(t3, n3, i2) {
5025
+ void 0 === i2 && (i2 = {});
5026
+ var o3 = new Date(t3), r3 = function(t4, n4) {
4903
5027
  void 0 === n4 && (n4 = {});
4904
- var i4 = n4.timeZoneName || "short", o4 = t4 + "|" + i4, r3 = e[o4];
4905
- return r3 || (r3 = new Intl.DateTimeFormat("en-US", { hour12: false, timeZone: t4, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: i4 }), e[o4] = r3), r3;
4906
- }(n3, i3);
4907
- return r2.formatToParts(o3);
4908
- }, u = function(e2, n3) {
4909
- for (var i3 = a2(e2, n3), r2 = [], u2 = 0; u2 < i3.length; u2 += 1) {
4910
- var f3 = i3[u2], s2 = f3.type, m2 = f3.value, c2 = t2[s2];
4911
- c2 >= 0 && (r2[c2] = parseInt(m2, 10));
5028
+ var i3 = n4.timeZoneName || "short", o4 = t4 + "|" + i3, r4 = e[o4];
5029
+ return r4 || (r4 = new Intl.DateTimeFormat("en-US", { hour12: false, timeZone: t4, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: i3 }), e[o4] = r4), r4;
5030
+ }(n3, i2);
5031
+ return r3.formatToParts(o3);
5032
+ }, u2 = function(e2, n3) {
5033
+ for (var i2 = a2(e2, n3), r3 = [], u3 = 0; u3 < i2.length; u3 += 1) {
5034
+ var f2 = i2[u3], s2 = f2.type, m = f2.value, c = t2[s2];
5035
+ c >= 0 && (r3[c] = parseInt(m, 10));
4912
5036
  }
4913
- var d = r2[3], l2 = 24 === d ? 0 : d, h2 = r2[0] + "-" + r2[1] + "-" + r2[2] + " " + l2 + ":" + r2[4] + ":" + r2[5] + ":000", v = +e2;
4914
- return (o2.utc(h2).valueOf() - (v -= v % 1e3)) / 6e4;
4915
- }, f2 = i2.prototype;
4916
- f2.tz = function(t3, e2) {
4917
- void 0 === t3 && (t3 = r);
4918
- var n3, i3 = this.utcOffset(), a3 = this.toDate(), u2 = a3.toLocaleString("en-US", { timeZone: t3 }), f3 = Math.round((a3 - new Date(u2)) / 1e3 / 60), s2 = 15 * -Math.round(a3.getTimezoneOffset() / 15) - f3;
5037
+ var d2 = r3[3], l2 = 24 === d2 ? 0 : d2, h2 = r3[0] + "-" + r3[1] + "-" + r3[2] + " " + l2 + ":" + r3[4] + ":" + r3[5] + ":000", v2 = +e2;
5038
+ return (o2.utc(h2).valueOf() - (v2 -= v2 % 1e3)) / 6e4;
5039
+ }, f = i.prototype;
5040
+ f.tz = function(t3, e2) {
5041
+ void 0 === t3 && (t3 = r2);
5042
+ var n3, i2 = this.utcOffset(), a3 = this.toDate(), u3 = a3.toLocaleString("en-US", { timeZone: t3 }), f2 = Math.round((a3 - new Date(u3)) / 1e3 / 60), s2 = 15 * -Math.round(a3.getTimezoneOffset() / 15) - f2;
4919
5043
  if (!Number(s2)) n3 = this.utcOffset(0, e2);
4920
- else if (n3 = o2(u2, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(s2, true), e2) {
4921
- var m2 = n3.utcOffset();
4922
- n3 = n3.add(i3 - m2, "minute");
5044
+ else if (n3 = o2(u3, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(s2, true), e2) {
5045
+ var m = n3.utcOffset();
5046
+ n3 = n3.add(i2 - m, "minute");
4923
5047
  }
4924
5048
  return n3.$x.$timezone = t3, n3;
4925
- }, f2.offsetName = function(t3) {
5049
+ }, f.offsetName = function(t3) {
4926
5050
  var e2 = this.$x.$timezone || o2.tz.guess(), n3 = a2(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
4927
5051
  return "timezonename" === t4.type.toLowerCase();
4928
5052
  });
4929
5053
  return n3 && n3.value;
4930
5054
  };
4931
- var s = f2.startOf;
4932
- f2.startOf = function(t3, e2) {
5055
+ var s = f.startOf;
5056
+ f.startOf = function(t3, e2) {
4933
5057
  if (!this.$x || !this.$x.$timezone) return s.call(this, t3, e2);
4934
5058
  var n3 = o2(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
4935
5059
  return s.call(n3, t3, e2).tz(this.$x.$timezone, true);
4936
5060
  }, o2.tz = function(t3, e2, n3) {
4937
- var i3 = n3 && e2, a3 = n3 || e2 || r, f3 = u(+o2(), a3);
5061
+ var i2 = n3 && e2, a3 = n3 || e2 || r2, f2 = u2(+o2(), a3);
4938
5062
  if ("string" != typeof t3) return o2(t3).tz(a3);
4939
5063
  var s2 = function(t4, e3, n4) {
4940
- var i4 = t4 - 60 * e3 * 1e3, o3 = u(i4, n4);
4941
- if (e3 === o3) return [i4, e3];
4942
- var r2 = u(i4 -= 60 * (o3 - e3) * 1e3, n4);
4943
- return o3 === r2 ? [i4, o3] : [t4 - 60 * Math.min(o3, r2) * 1e3, Math.max(o3, r2)];
4944
- }(o2.utc(t3, i3).valueOf(), f3, a3), m2 = s2[0], c2 = s2[1], d = o2(m2).utcOffset(c2);
4945
- return d.$x.$timezone = a3, d;
5064
+ var i3 = t4 - 60 * e3 * 1e3, o3 = u2(i3, n4);
5065
+ if (e3 === o3) return [i3, e3];
5066
+ var r3 = u2(i3 -= 60 * (o3 - e3) * 1e3, n4);
5067
+ return o3 === r3 ? [i3, o3] : [t4 - 60 * Math.min(o3, r3) * 1e3, Math.max(o3, r3)];
5068
+ }(o2.utc(t3, i2).valueOf(), f2, a3), m = s2[0], c = s2[1], d2 = o2(m).utcOffset(c);
5069
+ return d2.$x.$timezone = a3, d2;
4946
5070
  }, o2.tz.guess = function() {
4947
5071
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
4948
5072
  }, o2.tz.setDefault = function(t3) {
4949
- r = t3;
5073
+ r2 = t3;
4950
5074
  };
4951
5075
  };
4952
5076
  });
@@ -5024,14 +5148,14 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
5024
5148
  if (obj === null || typeof obj === "undefined") {
5025
5149
  return;
5026
5150
  }
5027
- let i2;
5151
+ let i;
5028
5152
  let l2;
5029
5153
  if (typeof obj !== "object") {
5030
5154
  obj = [obj];
5031
5155
  }
5032
5156
  if (isArray(obj)) {
5033
- for (i2 = 0, l2 = obj.length; i2 < l2; i2++) {
5034
- fn.call(null, obj[i2], i2, obj);
5157
+ for (i = 0, l2 = obj.length; i < l2; i++) {
5158
+ fn.call(null, obj[i], i, obj);
5035
5159
  }
5036
5160
  } else {
5037
5161
  if (isBuffer(obj)) {
@@ -5040,8 +5164,8 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
5040
5164
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
5041
5165
  const len = keys.length;
5042
5166
  let key;
5043
- for (i2 = 0; i2 < len; i2++) {
5044
- key = keys[i2];
5167
+ for (i = 0; i < len; i++) {
5168
+ key = keys[i];
5045
5169
  fn.call(null, obj[key], key, obj);
5046
5170
  }
5047
5171
  }
@@ -5052,10 +5176,10 @@ function findKey(obj, key) {
5052
5176
  }
5053
5177
  key = key.toLowerCase();
5054
5178
  const keys = Object.keys(obj);
5055
- let i2 = keys.length;
5179
+ let i = keys.length;
5056
5180
  let _key;
5057
- while (i2-- > 0) {
5058
- _key = keys[i2];
5181
+ while (i-- > 0) {
5182
+ _key = keys[i];
5059
5183
  if (key === _key.toLowerCase()) {
5060
5184
  return _key;
5061
5185
  }
@@ -5082,8 +5206,8 @@ function merge() {
5082
5206
  result[targetKey] = val;
5083
5207
  }
5084
5208
  };
5085
- for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
5086
- arguments[i2] && forEach(arguments[i2], assignValue);
5209
+ for (let i = 0, l2 = arguments.length; i < l2; i++) {
5210
+ arguments[i] && forEach(arguments[i], assignValue);
5087
5211
  }
5088
5212
  return result;
5089
5213
  }
@@ -5113,16 +5237,16 @@ const inherits = (constructor, superConstructor, props, descriptors2) => {
5113
5237
  };
5114
5238
  const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
5115
5239
  let props;
5116
- let i2;
5240
+ let i;
5117
5241
  let prop;
5118
5242
  const merged = {};
5119
5243
  destObj = destObj || {};
5120
5244
  if (sourceObj == null) return destObj;
5121
5245
  do {
5122
5246
  props = Object.getOwnPropertyNames(sourceObj);
5123
- i2 = props.length;
5124
- while (i2-- > 0) {
5125
- prop = props[i2];
5247
+ i = props.length;
5248
+ while (i-- > 0) {
5249
+ prop = props[i];
5126
5250
  if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
5127
5251
  destObj[prop] = sourceObj[prop];
5128
5252
  merged[prop] = true;
@@ -5144,11 +5268,11 @@ const endsWith = (str, searchString, position) => {
5144
5268
  const toArray = (thing) => {
5145
5269
  if (!thing) return null;
5146
5270
  if (isArray(thing)) return thing;
5147
- let i2 = thing.length;
5148
- if (!isNumber(i2)) return null;
5149
- const arr = new Array(i2);
5150
- while (i2-- > 0) {
5151
- arr[i2] = thing[i2];
5271
+ let i = thing.length;
5272
+ if (!isNumber(i)) return null;
5273
+ const arr = new Array(i);
5274
+ while (i-- > 0) {
5275
+ arr[i] = thing[i];
5152
5276
  }
5153
5277
  return arr;
5154
5278
  };
@@ -5178,7 +5302,7 @@ const isHTMLForm = kindOfTest("HTMLFormElement");
5178
5302
  const toCamelCase = (str) => {
5179
5303
  return str.toLowerCase().replace(
5180
5304
  /[-_\s]([a-z\d])(\w*)/g,
5181
- function replacer(m2, p1, p2) {
5305
+ function replacer(m, p1, p2) {
5182
5306
  return p1.toUpperCase() + p2;
5183
5307
  }
5184
5308
  );
@@ -5235,7 +5359,7 @@ function isSpecCompliantForm(thing) {
5235
5359
  }
5236
5360
  const toJSONObject = (obj) => {
5237
5361
  const stack = new Array(10);
5238
- const visit = (source, i2) => {
5362
+ const visit = (source, i) => {
5239
5363
  if (isObject(source)) {
5240
5364
  if (stack.indexOf(source) >= 0) {
5241
5365
  return;
@@ -5244,13 +5368,13 @@ const toJSONObject = (obj) => {
5244
5368
  return source;
5245
5369
  }
5246
5370
  if (!("toJSON" in source)) {
5247
- stack[i2] = source;
5371
+ stack[i] = source;
5248
5372
  const target = isArray(source) ? [] : {};
5249
5373
  forEach(source, (value, key) => {
5250
- const reducedValue = visit(value, i2 + 1);
5374
+ const reducedValue = visit(value, i + 1);
5251
5375
  !isUndefined(reducedValue) && (target[key] = reducedValue);
5252
5376
  });
5253
- stack[i2] = void 0;
5377
+ stack[i] = void 0;
5254
5378
  return target;
5255
5379
  }
5256
5380
  }
@@ -5426,9 +5550,9 @@ function removeBrackets(key) {
5426
5550
  }
5427
5551
  function renderKey(path, key, dots) {
5428
5552
  if (!path) return key;
5429
- return path.concat(key).map(function each(token, i2) {
5553
+ return path.concat(key).map(function each(token, i) {
5430
5554
  token = removeBrackets(token);
5431
- return !dots && i2 ? "[" + token + "]" : token;
5555
+ return !dots && i ? "[" + token + "]" : token;
5432
5556
  }).join(dots ? "." : "");
5433
5557
  }
5434
5558
  function isFlatArray(arr) {
@@ -5707,11 +5831,11 @@ function parsePropPath(name) {
5707
5831
  function arrayToObject(arr) {
5708
5832
  const obj = {};
5709
5833
  const keys = Object.keys(arr);
5710
- let i2;
5834
+ let i;
5711
5835
  const len = keys.length;
5712
5836
  let key;
5713
- for (i2 = 0; i2 < len; i2++) {
5714
- key = keys[i2];
5837
+ for (i = 0; i < len; i++) {
5838
+ key = keys[i];
5715
5839
  obj[key] = arr[key];
5716
5840
  }
5717
5841
  return obj;
@@ -5878,11 +6002,11 @@ const parseHeaders = (rawHeaders) => {
5878
6002
  const parsed = {};
5879
6003
  let key;
5880
6004
  let val;
5881
- let i2;
6005
+ let i;
5882
6006
  rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
5883
- i2 = line.indexOf(":");
5884
- key = line.substring(0, i2).trim().toLowerCase();
5885
- val = line.substring(i2 + 1).trim();
6007
+ i = line.indexOf(":");
6008
+ key = line.substring(0, i).trim().toLowerCase();
6009
+ val = line.substring(i + 1).trim();
5886
6010
  if (!key || parsed[key] && ignoreDuplicateOf[key]) {
5887
6011
  return;
5888
6012
  }
@@ -6036,10 +6160,10 @@ let AxiosHeaders$1 = class AxiosHeaders {
6036
6160
  }
6037
6161
  clear(matcher) {
6038
6162
  const keys = Object.keys(this);
6039
- let i2 = keys.length;
6163
+ let i = keys.length;
6040
6164
  let deleted = false;
6041
- while (i2--) {
6042
- const key = keys[i2];
6165
+ while (i--) {
6166
+ const key = keys[i];
6043
6167
  if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
6044
6168
  delete this[key];
6045
6169
  deleted = true;
@@ -6179,11 +6303,11 @@ function speedometer(samplesCount, min) {
6179
6303
  }
6180
6304
  bytes[head] = chunkLength;
6181
6305
  timestamps[head] = now;
6182
- let i2 = tail;
6306
+ let i = tail;
6183
6307
  let bytesCount = 0;
6184
- while (i2 !== head) {
6185
- bytesCount += bytes[i2++];
6186
- i2 = i2 % samplesCount;
6308
+ while (i !== head) {
6309
+ bytesCount += bytes[i++];
6310
+ i = i % samplesCount;
6187
6311
  }
6188
6312
  head = (head + 1) % samplesCount;
6189
6313
  if (head === tail) {
@@ -6871,11 +6995,11 @@ const getFetch = (config2) => {
6871
6995
  Response,
6872
6996
  fetch2
6873
6997
  ];
6874
- let len = seeds.length, i2 = len, seed, target, map = seedCache;
6875
- while (i2--) {
6876
- seed = seeds[i2];
6998
+ let len = seeds.length, i = len, seed, target, map = seedCache;
6999
+ while (i--) {
7000
+ seed = seeds[i];
6877
7001
  target = map.get(seed);
6878
- target === void 0 && map.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env));
7002
+ target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
6879
7003
  map = target;
6880
7004
  }
6881
7005
  return target;
@@ -6905,8 +7029,8 @@ function getAdapter$1(adapters2, config2) {
6905
7029
  let nameOrAdapter;
6906
7030
  let adapter;
6907
7031
  const rejectedReasons = {};
6908
- for (let i2 = 0; i2 < length; i2++) {
6909
- nameOrAdapter = adapters2[i2];
7032
+ for (let i = 0; i < length; i++) {
7033
+ nameOrAdapter = adapters2[i];
6910
7034
  let id;
6911
7035
  adapter = nameOrAdapter;
6912
7036
  if (!isResolvedHandle(nameOrAdapter)) {
@@ -6918,7 +7042,7 @@ function getAdapter$1(adapters2, config2) {
6918
7042
  if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config2)))) {
6919
7043
  break;
6920
7044
  }
6921
- rejectedReasons[id || "#" + i2] = adapter;
7045
+ rejectedReasons[id || "#" + i] = adapter;
6922
7046
  }
6923
7047
  if (!adapter) {
6924
7048
  const reasons = Object.entries(rejectedReasons).map(
@@ -6989,9 +7113,9 @@ function dispatchRequest(config2) {
6989
7113
  }
6990
7114
  const VERSION$1 = "1.13.2";
6991
7115
  const validators$1 = {};
6992
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => {
7116
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
6993
7117
  validators$1[type] = function validator2(thing) {
6994
- return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type;
7118
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
6995
7119
  };
6996
7120
  });
6997
7121
  const deprecatedWarnings = {};
@@ -7029,9 +7153,9 @@ function assertOptions(options, schema, allowUnknown) {
7029
7153
  throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
7030
7154
  }
7031
7155
  const keys = Object.keys(options);
7032
- let i2 = keys.length;
7033
- while (i2-- > 0) {
7034
- const opt = keys[i2];
7156
+ let i = keys.length;
7157
+ while (i-- > 0) {
7158
+ const opt = keys[i];
7035
7159
  const validator2 = schema[opt];
7036
7160
  if (validator2) {
7037
7161
  const value = options[opt];
@@ -7151,7 +7275,7 @@ let Axios$1 = class Axios {
7151
7275
  responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
7152
7276
  });
7153
7277
  let promise;
7154
- let i2 = 0;
7278
+ let i = 0;
7155
7279
  let len;
7156
7280
  if (!synchronousRequestInterceptors) {
7157
7281
  const chain = [dispatchRequest.bind(this), void 0];
@@ -7159,16 +7283,16 @@ let Axios$1 = class Axios {
7159
7283
  chain.push(...responseInterceptorChain);
7160
7284
  len = chain.length;
7161
7285
  promise = Promise.resolve(config2);
7162
- while (i2 < len) {
7163
- promise = promise.then(chain[i2++], chain[i2++]);
7286
+ while (i < len) {
7287
+ promise = promise.then(chain[i++], chain[i++]);
7164
7288
  }
7165
7289
  return promise;
7166
7290
  }
7167
7291
  len = requestInterceptorChain.length;
7168
7292
  let newConfig = config2;
7169
- while (i2 < len) {
7170
- const onFulfilled = requestInterceptorChain[i2++];
7171
- const onRejected = requestInterceptorChain[i2++];
7293
+ while (i < len) {
7294
+ const onFulfilled = requestInterceptorChain[i++];
7295
+ const onRejected = requestInterceptorChain[i++];
7172
7296
  try {
7173
7297
  newConfig = onFulfilled(newConfig);
7174
7298
  } catch (error) {
@@ -7181,10 +7305,10 @@ let Axios$1 = class Axios {
7181
7305
  } catch (error) {
7182
7306
  return Promise.reject(error);
7183
7307
  }
7184
- i2 = 0;
7308
+ i = 0;
7185
7309
  len = responseInterceptorChain.length;
7186
- while (i2 < len) {
7187
- promise = promise.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]);
7310
+ while (i < len) {
7311
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
7188
7312
  }
7189
7313
  return promise;
7190
7314
  }
@@ -7231,9 +7355,9 @@ let CancelToken$1 = class CancelToken {
7231
7355
  const token = this;
7232
7356
  this.promise.then((cancel) => {
7233
7357
  if (!token._listeners) return;
7234
- let i2 = token._listeners.length;
7235
- while (i2-- > 0) {
7236
- token._listeners[i2](cancel);
7358
+ let i = token._listeners.length;
7359
+ while (i-- > 0) {
7360
+ token._listeners[i](cancel);
7237
7361
  }
7238
7362
  token._listeners = null;
7239
7363
  });
@@ -7305,8 +7429,8 @@ let CancelToken$1 = class CancelToken {
7305
7429
  */
7306
7430
  static source() {
7307
7431
  let cancel;
7308
- const token = new CancelToken(function executor(c2) {
7309
- cancel = c2;
7432
+ const token = new CancelToken(function executor(c) {
7433
+ cancel = c;
7310
7434
  });
7311
7435
  return {
7312
7436
  token,
@@ -7453,52 +7577,52 @@ function tryStringify(o2) {
7453
7577
  }
7454
7578
  }
7455
7579
  var quickFormatUnescaped = format$1;
7456
- function format$1(f2, args, opts) {
7580
+ function format$1(f, args, opts) {
7457
7581
  var ss = opts && opts.stringify || tryStringify;
7458
7582
  var offset = 1;
7459
- if (typeof f2 === "object" && f2 !== null) {
7583
+ if (typeof f === "object" && f !== null) {
7460
7584
  var len = args.length + offset;
7461
- if (len === 1) return f2;
7585
+ if (len === 1) return f;
7462
7586
  var objects = new Array(len);
7463
- objects[0] = ss(f2);
7587
+ objects[0] = ss(f);
7464
7588
  for (var index2 = 1; index2 < len; index2++) {
7465
7589
  objects[index2] = ss(args[index2]);
7466
7590
  }
7467
7591
  return objects.join(" ");
7468
7592
  }
7469
- if (typeof f2 !== "string") {
7470
- return f2;
7593
+ if (typeof f !== "string") {
7594
+ return f;
7471
7595
  }
7472
7596
  var argLen = args.length;
7473
- if (argLen === 0) return f2;
7597
+ if (argLen === 0) return f;
7474
7598
  var str = "";
7475
7599
  var a2 = 1 - offset;
7476
7600
  var lastPos = -1;
7477
- var flen = f2 && f2.length || 0;
7478
- for (var i2 = 0; i2 < flen; ) {
7479
- if (f2.charCodeAt(i2) === 37 && i2 + 1 < flen) {
7601
+ var flen = f && f.length || 0;
7602
+ for (var i = 0; i < flen; ) {
7603
+ if (f.charCodeAt(i) === 37 && i + 1 < flen) {
7480
7604
  lastPos = lastPos > -1 ? lastPos : 0;
7481
- switch (f2.charCodeAt(i2 + 1)) {
7605
+ switch (f.charCodeAt(i + 1)) {
7482
7606
  case 100:
7483
7607
  case 102:
7484
7608
  if (a2 >= argLen)
7485
7609
  break;
7486
7610
  if (args[a2] == null) break;
7487
- if (lastPos < i2)
7488
- str += f2.slice(lastPos, i2);
7611
+ if (lastPos < i)
7612
+ str += f.slice(lastPos, i);
7489
7613
  str += Number(args[a2]);
7490
- lastPos = i2 + 2;
7491
- i2++;
7614
+ lastPos = i + 2;
7615
+ i++;
7492
7616
  break;
7493
7617
  case 105:
7494
7618
  if (a2 >= argLen)
7495
7619
  break;
7496
7620
  if (args[a2] == null) break;
7497
- if (lastPos < i2)
7498
- str += f2.slice(lastPos, i2);
7621
+ if (lastPos < i)
7622
+ str += f.slice(lastPos, i);
7499
7623
  str += Math.floor(Number(args[a2]));
7500
- lastPos = i2 + 2;
7501
- i2++;
7624
+ lastPos = i + 2;
7625
+ i++;
7502
7626
  break;
7503
7627
  case 79:
7504
7628
  case 111:
@@ -7506,51 +7630,51 @@ function format$1(f2, args, opts) {
7506
7630
  if (a2 >= argLen)
7507
7631
  break;
7508
7632
  if (args[a2] === void 0) break;
7509
- if (lastPos < i2)
7510
- str += f2.slice(lastPos, i2);
7633
+ if (lastPos < i)
7634
+ str += f.slice(lastPos, i);
7511
7635
  var type = typeof args[a2];
7512
7636
  if (type === "string") {
7513
7637
  str += "'" + args[a2] + "'";
7514
- lastPos = i2 + 2;
7515
- i2++;
7638
+ lastPos = i + 2;
7639
+ i++;
7516
7640
  break;
7517
7641
  }
7518
7642
  if (type === "function") {
7519
7643
  str += args[a2].name || "<anonymous>";
7520
- lastPos = i2 + 2;
7521
- i2++;
7644
+ lastPos = i + 2;
7645
+ i++;
7522
7646
  break;
7523
7647
  }
7524
7648
  str += ss(args[a2]);
7525
- lastPos = i2 + 2;
7526
- i2++;
7649
+ lastPos = i + 2;
7650
+ i++;
7527
7651
  break;
7528
7652
  case 115:
7529
7653
  if (a2 >= argLen)
7530
7654
  break;
7531
- if (lastPos < i2)
7532
- str += f2.slice(lastPos, i2);
7655
+ if (lastPos < i)
7656
+ str += f.slice(lastPos, i);
7533
7657
  str += String(args[a2]);
7534
- lastPos = i2 + 2;
7535
- i2++;
7658
+ lastPos = i + 2;
7659
+ i++;
7536
7660
  break;
7537
7661
  case 37:
7538
- if (lastPos < i2)
7539
- str += f2.slice(lastPos, i2);
7662
+ if (lastPos < i)
7663
+ str += f.slice(lastPos, i);
7540
7664
  str += "%";
7541
- lastPos = i2 + 2;
7542
- i2++;
7665
+ lastPos = i + 2;
7666
+ i++;
7543
7667
  a2--;
7544
7668
  break;
7545
7669
  }
7546
7670
  ++a2;
7547
7671
  }
7548
- ++i2;
7672
+ ++i;
7549
7673
  }
7550
7674
  if (lastPos === -1)
7551
- return f2;
7675
+ return f;
7552
7676
  else if (lastPos < flen) {
7553
- str += f2.slice(lastPos);
7677
+ str += f.slice(lastPos);
7554
7678
  }
7555
7679
  return str;
7556
7680
  }
@@ -7603,8 +7727,8 @@ function setupBaseLogFunctions(logger2, levels, proto) {
7603
7727
  }
7604
7728
  function shouldSerialize(serialize, serializers) {
7605
7729
  if (Array.isArray(serialize)) {
7606
- const hasToFilter = serialize.filter(function(k2) {
7607
- return k2 !== "!stdSerializers.err";
7730
+ const hasToFilter = serialize.filter(function(k) {
7731
+ return k !== "!stdSerializers.err";
7608
7732
  });
7609
7733
  return hasToFilter;
7610
7734
  } else if (serialize === true) {
@@ -7815,7 +7939,7 @@ function createWrap(self2, opts, rootLogger, level) {
7815
7939
  const ts = opts.timestamp();
7816
7940
  const args = new Array(arguments.length);
7817
7941
  const proto = Object.getPrototypeOf && Object.getPrototypeOf(this) === _console ? _console : this;
7818
- for (var i2 = 0; i2 < args.length; i2++) args[i2] = arguments[i2];
7942
+ for (var i = 0; i < args.length; i++) args[i] = arguments[i];
7819
7943
  var argsIsSerialized = false;
7820
7944
  if (opts.serialize) {
7821
7945
  applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize);
@@ -7881,13 +8005,13 @@ function asObject(logger2, level, args, ts, opts) {
7881
8005
  }
7882
8006
  }
7883
8007
  function applySerializers(args, serialize, serializers, stdErrSerialize) {
7884
- for (const i2 in args) {
7885
- if (stdErrSerialize && args[i2] instanceof Error) {
7886
- args[i2] = pino.stdSerializers.err(args[i2]);
7887
- } else if (typeof args[i2] === "object" && !Array.isArray(args[i2]) && serialize) {
7888
- for (const k2 in args[i2]) {
7889
- if (serialize.indexOf(k2) > -1 && k2 in serializers) {
7890
- args[i2][k2] = serializers[k2](args[i2][k2]);
8008
+ for (const i in args) {
8009
+ if (stdErrSerialize && args[i] instanceof Error) {
8010
+ args[i] = pino.stdSerializers.err(args[i]);
8011
+ } else if (typeof args[i] === "object" && !Array.isArray(args[i]) && serialize) {
8012
+ for (const k in args[i]) {
8013
+ if (serialize.indexOf(k) > -1 && k in serializers) {
8014
+ args[i][k] = serializers[k](args[i][k]);
7891
8015
  }
7892
8016
  }
7893
8017
  }
@@ -8010,7 +8134,7 @@ const fetchCandles = ({
8010
8134
  );
8011
8135
  }
8012
8136
  try {
8013
- const validatedParams = Te.getGrowwHistoricalCandles.query.parse(params);
8137
+ const validatedParams = Ce.getGrowwHistoricalCandles.query.parse(params);
8014
8138
  const headers = {
8015
8139
  Authorization: `Bearer ${developerToken}`
8016
8140
  };
@@ -8054,7 +8178,7 @@ const fetchQuote = ({
8054
8178
  );
8055
8179
  }
8056
8180
  try {
8057
- const validatedParams = Te.getGrowwQuote.query.parse(params);
8181
+ const validatedParams = Ce.getGrowwQuote.query.parse(params);
8058
8182
  const headers = {
8059
8183
  Authorization: `Bearer ${developerToken}`
8060
8184
  };
@@ -8094,7 +8218,7 @@ const fetchQuoteTimeline = ({
8094
8218
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8095
8219
  }
8096
8220
  try {
8097
- const validatedParams = Te.getGrowwQuoteTimeline.query.parse({
8221
+ const validatedParams = Ce.getGrowwQuoteTimeline.query.parse({
8098
8222
  symbol,
8099
8223
  end_datetime
8100
8224
  });
@@ -8141,7 +8265,7 @@ const fetchShortlist = ({
8141
8265
  );
8142
8266
  }
8143
8267
  try {
8144
- const validatedParams = Pe.getLists.query.parse(queryParams);
8268
+ const validatedParams = Re.getLists.query.parse(queryParams);
8145
8269
  const headers = {
8146
8270
  Authorization: `Bearer ${developerToken}`
8147
8271
  };
@@ -8185,7 +8309,7 @@ const fetchShortlistPersistence = ({
8185
8309
  );
8186
8310
  }
8187
8311
  try {
8188
- const validatedParams = xe.getShortlistPersistence.query.parse(queryParams);
8312
+ const validatedParams = ke.getShortlistPersistence.query.parse(queryParams);
8189
8313
  const headers = {
8190
8314
  Authorization: `Bearer ${developerToken}`
8191
8315
  };
@@ -8229,7 +8353,7 @@ const fetchNiftyQuote = ({
8229
8353
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8230
8354
  }
8231
8355
  try {
8232
- const validatedParams = Te.getGrowwNiftyQuote.query.parse(params);
8356
+ const validatedParams = Ce.getGrowwNiftyQuote.query.parse(params);
8233
8357
  const headers = {
8234
8358
  Authorization: `Bearer ${developerToken}`
8235
8359
  };
@@ -8271,7 +8395,7 @@ const fetchNiftyQuoteTimeline = ({
8271
8395
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8272
8396
  }
8273
8397
  try {
8274
- const validatedParams = Te.getGrowwNiftyQuoteTimeline.query.parse({
8398
+ const validatedParams = Ce.getGrowwNiftyQuoteTimeline.query.parse({
8275
8399
  end_datetime
8276
8400
  });
8277
8401
  const headers = {
@@ -8302,6 +8426,86 @@ const fetchNiftyQuoteTimeline = ({
8302
8426
  throw error;
8303
8427
  }
8304
8428
  };
8429
+ const fetchAvailableDates = ({
8430
+ developerToken,
8431
+ apiDomain,
8432
+ runId,
8433
+ currentTimestamp,
8434
+ currentTimezone = "Asia/Kolkata"
8435
+ }) => async () => {
8436
+ if (!developerToken) {
8437
+ throw new Error(
8438
+ "Developer token not found. Please set DEVELOPER_TOKEN environment variable."
8439
+ );
8440
+ }
8441
+ try {
8442
+ const headers = {
8443
+ Authorization: `Bearer ${developerToken}`
8444
+ };
8445
+ if (runId) {
8446
+ headers["X-Run-Id"] = runId;
8447
+ }
8448
+ if (currentTimestamp) {
8449
+ headers["X-Current-Timestamp"] = currentTimestamp;
8450
+ }
8451
+ if (currentTimezone) {
8452
+ headers["X-Current-Timezone"] = currentTimezone;
8453
+ }
8454
+ const response = await axios.get(`${apiDomain}/v1/developer/available-dates`, {
8455
+ headers
8456
+ });
8457
+ return response.data.data;
8458
+ } catch (error) {
8459
+ if (axios.isAxiosError(error)) {
8460
+ logger.error(`Error fetching available dates: ${error.message}`);
8461
+ throw new Error(
8462
+ `Failed to fetch available dates: ${error.response?.data?.message || error.message}`
8463
+ );
8464
+ }
8465
+ logger.error(`Unexpected error fetching available dates: ${error}`);
8466
+ throw error;
8467
+ }
8468
+ };
8469
+ const fetchHolidays = ({
8470
+ developerToken,
8471
+ apiDomain,
8472
+ runId,
8473
+ currentTimestamp,
8474
+ currentTimezone = "Asia/Kolkata"
8475
+ }) => async () => {
8476
+ if (!developerToken) {
8477
+ throw new Error(
8478
+ "Developer token not found. Please set DEVELOPER_TOKEN environment variable."
8479
+ );
8480
+ }
8481
+ try {
8482
+ const headers = {
8483
+ Authorization: `Bearer ${developerToken}`
8484
+ };
8485
+ if (runId) {
8486
+ headers["X-Run-Id"] = runId;
8487
+ }
8488
+ if (currentTimestamp) {
8489
+ headers["X-Current-Timestamp"] = currentTimestamp;
8490
+ }
8491
+ if (currentTimezone) {
8492
+ headers["X-Current-Timezone"] = currentTimezone;
8493
+ }
8494
+ const response = await axios.get(`${apiDomain}/v1/developer/holidays`, {
8495
+ headers
8496
+ });
8497
+ return response.data.data;
8498
+ } catch (error) {
8499
+ if (axios.isAxiosError(error)) {
8500
+ logger.error(`Error fetching holidays: ${error.message}`);
8501
+ throw new Error(
8502
+ `Failed to fetch holidays: ${error.response?.data?.message || error.message}`
8503
+ );
8504
+ }
8505
+ logger.error(`Unexpected error fetching holidays: ${error}`);
8506
+ throw error;
8507
+ }
8508
+ };
8305
8509
  function isRetryableError(error) {
8306
8510
  if (axios.isAxiosError(error)) {
8307
8511
  const axiosError = error;
@@ -8380,7 +8584,7 @@ const placeOrder = ({ runId, apiClient }) => async (data) => {
8380
8584
  try {
8381
8585
  await retryWithBackoff(
8382
8586
  async () => {
8383
- const validatedData = qe.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8587
+ const validatedData = Le.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8384
8588
  await apiClient.post(`/v1/dashboard/runs/${runId}/orders`, validatedData);
8385
8589
  logger.debug(`Order persisted for ${data.nseSymbol} in runId: ${runId}`);
8386
8590
  },
@@ -8497,9 +8701,9 @@ var calendar$1 = { exports: {} };
8497
8701
  module.exports = t2();
8498
8702
  }(commonjsGlobal, function() {
8499
8703
  return function(e, t2, a2) {
8500
- var n2 = "h:mm A", d = { lastDay: "[Yesterday at] " + n2, sameDay: "[Today at] " + n2, nextDay: "[Tomorrow at] " + n2, nextWeek: "dddd [at] " + n2, lastWeek: "[Last] dddd [at] " + n2, sameElse: "MM/DD/YYYY" };
8704
+ var n2 = "h:mm A", d2 = { lastDay: "[Yesterday at] " + n2, sameDay: "[Today at] " + n2, nextDay: "[Tomorrow at] " + n2, nextWeek: "dddd [at] " + n2, lastWeek: "[Last] dddd [at] " + n2, sameElse: "MM/DD/YYYY" };
8501
8705
  t2.prototype.calendar = function(e2, t3) {
8502
- var n3 = t3 || this.$locale().calendar || d, o2 = a2(e2 || void 0).startOf("d"), s = this.diff(o2, "d", true), i2 = "sameElse", f2 = s < -6 ? i2 : s < -1 ? "lastWeek" : s < 0 ? "lastDay" : s < 1 ? "sameDay" : s < 2 ? "nextDay" : s < 7 ? "nextWeek" : i2, l2 = n3[f2] || d[f2];
8706
+ var n3 = t3 || this.$locale().calendar || d2, o2 = a2(e2 || void 0).startOf("d"), s = this.diff(o2, "d", true), i = "sameElse", f = s < -6 ? i : s < -1 ? "lastWeek" : s < 0 ? "lastDay" : s < 1 ? "sameDay" : s < 2 ? "nextDay" : s < 7 ? "nextWeek" : i, l2 = n3[f] || d2[f];
8503
8707
  return "function" == typeof l2 ? l2.call(this, a2()) : this.format(l2);
8504
8708
  };
8505
8709
  };
@@ -8509,42 +8713,42 @@ var calendarExports = calendar$1.exports;
8509
8713
  const calendar = /* @__PURE__ */ getDefaultExportFromCjs(calendarExports);
8510
8714
  var relativeTime$1 = { exports: {} };
8511
8715
  (function(module, exports$1) {
8512
- !function(r, e) {
8716
+ !function(r2, e) {
8513
8717
  module.exports = e();
8514
8718
  }(commonjsGlobal, function() {
8515
- return function(r, e, t2) {
8516
- r = r || {};
8719
+ return function(r2, e, t2) {
8720
+ r2 = r2 || {};
8517
8721
  var n2 = e.prototype, o2 = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
8518
- function i2(r2, e2, t3, o3) {
8519
- return n2.fromToBase(r2, e2, t3, o3);
8520
- }
8521
- t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i3, d2, u) {
8522
- for (var f2, a2, s, l2 = i3.$locale().relativeTime || o2, h2 = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m2 = h2.length, c2 = 0; c2 < m2; c2 += 1) {
8523
- var y2 = h2[c2];
8524
- y2.d && (f2 = d2 ? t2(e2).diff(i3, y2.d, true) : i3.diff(e2, y2.d, true));
8525
- var p2 = (r.rounding || Math.round)(Math.abs(f2));
8526
- if (s = f2 > 0, p2 <= y2.r || !y2.r) {
8527
- p2 <= 1 && c2 > 0 && (y2 = h2[c2 - 1]);
8528
- var v = l2[y2.l];
8529
- u && (p2 = u("" + p2)), a2 = "string" == typeof v ? v.replace("%d", p2) : v(p2, n3, y2.l, s);
8722
+ function i(r3, e2, t3, o3) {
8723
+ return n2.fromToBase(r3, e2, t3, o3);
8724
+ }
8725
+ t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i2, d3, u2) {
8726
+ for (var f, a2, s, l2 = i2.$locale().relativeTime || o2, h2 = r2.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h2.length, c = 0; c < m; c += 1) {
8727
+ var y2 = h2[c];
8728
+ y2.d && (f = d3 ? t2(e2).diff(i2, y2.d, true) : i2.diff(e2, y2.d, true));
8729
+ var p2 = (r2.rounding || Math.round)(Math.abs(f));
8730
+ if (s = f > 0, p2 <= y2.r || !y2.r) {
8731
+ p2 <= 1 && c > 0 && (y2 = h2[c - 1]);
8732
+ var v2 = l2[y2.l];
8733
+ u2 && (p2 = u2("" + p2)), a2 = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s);
8530
8734
  break;
8531
8735
  }
8532
8736
  }
8533
8737
  if (n3) return a2;
8534
8738
  var M2 = s ? l2.future : l2.past;
8535
8739
  return "function" == typeof M2 ? M2(a2) : M2.replace("%s", a2);
8536
- }, n2.to = function(r2, e2) {
8537
- return i2(r2, e2, this, true);
8538
- }, n2.from = function(r2, e2) {
8539
- return i2(r2, e2, this);
8740
+ }, n2.to = function(r3, e2) {
8741
+ return i(r3, e2, this, true);
8742
+ }, n2.from = function(r3, e2) {
8743
+ return i(r3, e2, this);
8540
8744
  };
8541
- var d = function(r2) {
8542
- return r2.$u ? t2.utc() : t2();
8745
+ var d2 = function(r3) {
8746
+ return r3.$u ? t2.utc() : t2();
8543
8747
  };
8544
- n2.toNow = function(r2) {
8545
- return this.to(d(this), r2);
8546
- }, n2.fromNow = function(r2) {
8547
- return this.from(d(this), r2);
8748
+ n2.toNow = function(r3) {
8749
+ return this.to(d2(this), r3);
8750
+ }, n2.fromNow = function(r3) {
8751
+ return this.from(d2(this), r3);
8548
8752
  };
8549
8753
  };
8550
8754
  });
@@ -8774,6 +8978,38 @@ class GanakaClient {
8774
8978
  });
8775
8979
  return callback(queryParams);
8776
8980
  }
8981
+ /**
8982
+ * Fetch available dates with timestamps.
8983
+ * Returns which dates have data available, grouped by date with all timestamps for each date.
8984
+ *
8985
+ * @returns Promise resolving to available dates data with dates and timestamps
8986
+ */
8987
+ async fetchAvailableDates() {
8988
+ const callback = fetchAvailableDates({
8989
+ developerToken: this.developerToken,
8990
+ apiDomain: this.apiDomain,
8991
+ runId: null,
8992
+ currentTimestamp: "",
8993
+ currentTimezone: "Asia/Kolkata"
8994
+ });
8995
+ return callback();
8996
+ }
8997
+ /**
8998
+ * Fetch market holidays.
8999
+ * Returns all dates marked as market holidays.
9000
+ *
9001
+ * @returns Promise resolving to holidays data
9002
+ */
9003
+ async fetchHolidays() {
9004
+ const callback = fetchHolidays({
9005
+ developerToken: this.developerToken,
9006
+ apiDomain: this.apiDomain,
9007
+ runId: null,
9008
+ currentTimestamp: "",
9009
+ currentTimezone: "Asia/Kolkata"
9010
+ });
9011
+ return callback();
9012
+ }
8777
9013
  }
8778
9014
  dotenv.config();
8779
9015
  dayjs.extend(utc);
@@ -8884,6 +9120,20 @@ async function ganaka({
8884
9120
  currentTimestamp,
8885
9121
  currentTimezone: "Asia/Kolkata"
8886
9122
  }),
9123
+ fetchAvailableDates: fetchAvailableDates({
9124
+ developerToken,
9125
+ apiDomain,
9126
+ runId,
9127
+ currentTimestamp,
9128
+ currentTimezone: "Asia/Kolkata"
9129
+ }),
9130
+ fetchHolidays: fetchHolidays({
9131
+ developerToken,
9132
+ apiDomain,
9133
+ runId,
9134
+ currentTimestamp,
9135
+ currentTimezone: "Asia/Kolkata"
9136
+ }),
8887
9137
  currentTimestamp
8888
9138
  });
8889
9139
  }
@@ -8914,6 +9164,6 @@ export {
8914
9164
  GanakaClient,
8915
9165
  ganaka,
8916
9166
  S as growwQuotePayloadSchema,
8917
- a as growwQuoteSchema
9167
+ r as growwQuoteSchema
8918
9168
  };
8919
9169
  //# sourceMappingURL=index.mjs.map