@ganaka/sdk 1.10.0 → 1.10.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.
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import dayjs from "dayjs";
2
2
  import dotenv from "dotenv";
3
- function _mergeNamespaces(n2, m) {
4
- for (var i = 0; i < m.length; i++) {
5
- const e = m[i];
3
+ function _mergeNamespaces(n2, m2) {
4
+ for (var i2 = 0; i2 < m2.length; i2++) {
5
+ const e = m2[i2];
6
6
  if (typeof e !== "string" && !Array.isArray(e)) {
7
7
  for (const k in e) {
8
8
  if (k !== "default" && !(k in n2)) {
@@ -25,7 +25,7 @@ function $constructor(name, initializer2, params) {
25
25
  Object.defineProperty(inst, "_zod", {
26
26
  value: {
27
27
  def,
28
- constr: _2,
28
+ constr: _,
29
29
  traits: /* @__PURE__ */ new Set()
30
30
  },
31
31
  enumerable: false
@@ -36,10 +36,10 @@ function $constructor(name, initializer2, params) {
36
36
  }
37
37
  inst._zod.traits.add(name);
38
38
  initializer2(inst, def);
39
- const proto = _2.prototype;
39
+ const proto = _.prototype;
40
40
  const keys = Object.keys(proto);
41
- for (let i = 0; i < keys.length; i++) {
42
- const k = keys[i];
41
+ for (let i2 = 0; i2 < keys.length; i2++) {
42
+ const k = keys[i2];
43
43
  if (!(k in inst)) {
44
44
  inst[k] = proto[k].bind(inst);
45
45
  }
@@ -49,7 +49,7 @@ function $constructor(name, initializer2, params) {
49
49
  class Definition extends Parent {
50
50
  }
51
51
  Object.defineProperty(Definition, "name", { value: name });
52
- function _2(def) {
52
+ function _(def) {
53
53
  var _a2;
54
54
  const inst = params?.Parent ? new Definition() : this;
55
55
  init(inst, def);
@@ -59,16 +59,16 @@ function $constructor(name, initializer2, params) {
59
59
  }
60
60
  return inst;
61
61
  }
62
- Object.defineProperty(_2, "init", { value: init });
63
- Object.defineProperty(_2, Symbol.hasInstance, {
62
+ Object.defineProperty(_, "init", { value: init });
63
+ Object.defineProperty(_, Symbol.hasInstance, {
64
64
  value: (inst) => {
65
65
  if (params?.Parent && inst instanceof params.Parent)
66
66
  return true;
67
67
  return inst?._zod?.traits?.has(name);
68
68
  }
69
69
  });
70
- Object.defineProperty(_2, "name", { value: name });
71
- return _2;
70
+ Object.defineProperty(_, "name", { value: name });
71
+ return _;
72
72
  }
73
73
  class $ZodAsyncError extends Error {
74
74
  constructor() {
@@ -86,11 +86,11 @@ function config(newConfig) {
86
86
  return globalConfig;
87
87
  }
88
88
  function getEnumValues(entries) {
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);
89
+ const numericValues = Object.values(entries).filter((v) => typeof v === "number");
90
+ const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
91
91
  return values;
92
92
  }
93
- function jsonStringifyReplacer(_2, value) {
93
+ function jsonStringifyReplacer(_, value) {
94
94
  if (typeof value === "bigint")
95
95
  return value.toString();
96
96
  return value;
@@ -143,9 +143,9 @@ function defineLazy(object2, key, getter) {
143
143
  }
144
144
  return value;
145
145
  },
146
- set(v2) {
146
+ set(v) {
147
147
  Object.defineProperty(object2, key, {
148
- value: v2
148
+ value: v
149
149
  // configurable: true,
150
150
  });
151
151
  },
@@ -184,10 +184,10 @@ const allowsEval = cached(() => {
184
184
  return false;
185
185
  }
186
186
  try {
187
- const F2 = Function;
188
- new F2("");
187
+ const F = Function;
188
+ new F("");
189
189
  return true;
190
- } catch (_2) {
190
+ } catch (_) {
191
191
  return false;
192
192
  }
193
193
  });
@@ -326,10 +326,10 @@ function safeExtend(schema, shape) {
326
326
  };
327
327
  return clone(schema, def);
328
328
  }
329
- function merge$1(a2, b2) {
330
- const def = mergeDefs(a2._zod.def, {
329
+ function merge$1(a, b2) {
330
+ const def = mergeDefs(a._zod.def, {
331
331
  get shape() {
332
- const _shape = { ...a2._zod.def.shape, ...b2._zod.def.shape };
332
+ const _shape = { ...a._zod.def.shape, ...b2._zod.def.shape };
333
333
  assignProp(this, "shape", _shape);
334
334
  return _shape;
335
335
  },
@@ -339,7 +339,7 @@ function merge$1(a2, b2) {
339
339
  checks: []
340
340
  // delete existing checks
341
341
  });
342
- return clone(a2, def);
342
+ return clone(a, def);
343
343
  }
344
344
  function partial(Class, schema, mask) {
345
345
  const def = mergeDefs(schema._zod.def, {
@@ -405,11 +405,11 @@ function required(Class, schema, mask) {
405
405
  });
406
406
  return clone(schema, def);
407
407
  }
408
- function aborted(x, startIndex = 0) {
409
- if (x.aborted === true)
408
+ function aborted(x2, startIndex = 0) {
409
+ if (x2.aborted === true)
410
410
  return true;
411
- for (let i = startIndex; i < x.issues.length; i++) {
412
- if (x.issues[i]?.continue !== true) {
411
+ for (let i2 = startIndex; i2 < x2.issues.length; i2++) {
412
+ if (x2.issues[i2]?.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 i = 0;
507
- while (i < issue2.path.length) {
508
- const el = issue2.path[i];
509
- const terminal = i === issue2.path.length - 1;
506
+ let i2 = 0;
507
+ while (i2 < issue2.path.length) {
508
+ const el = issue2.path[i2];
509
+ const terminal = i2 === 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
- i++;
517
+ i2++;
518
518
  }
519
519
  }
520
520
  }
@@ -1056,19 +1056,19 @@ class Doc {
1056
1056
  return;
1057
1057
  }
1058
1058
  const content = arg;
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);
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);
1062
1062
  for (const line of dedented) {
1063
1063
  this.content.push(line);
1064
1064
  }
1065
1065
  }
1066
1066
  compile() {
1067
- const F2 = Function;
1067
+ const F = Function;
1068
1068
  const args = this?.args;
1069
1069
  const content = this?.content ?? [``];
1070
- const lines = [...content.map((x) => ` ${x}`)];
1071
- return new F2(...args, lines.join("\n"));
1070
+ const lines = [...content.map((x2) => ` ${x2}`)];
1071
+ return new F(...args, lines.join("\n"));
1072
1072
  }
1073
1073
  }
1074
1074
  const version = {
@@ -1109,13 +1109,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1109
1109
  continue;
1110
1110
  }
1111
1111
  const currLen = payload.issues.length;
1112
- const _2 = ch._zod.check(payload);
1113
- if (_2 instanceof Promise && ctx?.async === false) {
1112
+ const _ = ch._zod.check(payload);
1113
+ if (_ instanceof Promise && ctx?.async === false) {
1114
1114
  throw new $ZodAsyncError();
1115
1115
  }
1116
- if (asyncResult || _2 instanceof Promise) {
1116
+ if (asyncResult || _ instanceof Promise) {
1117
1117
  asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
1118
- await _2;
1118
+ await _;
1119
1119
  const nextLen = payload.issues.length;
1120
1120
  if (nextLen === currLen)
1121
1121
  return;
@@ -1177,7 +1177,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1177
1177
  try {
1178
1178
  const r2 = safeParse$1(inst, value);
1179
1179
  return r2.success ? { value: r2.data } : { issues: r2.error?.issues };
1180
- } catch (_2) {
1180
+ } catch (_) {
1181
1181
  return safeParseAsync$1(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues });
1182
1182
  }
1183
1183
  },
@@ -1188,11 +1188,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1188
1188
  const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1189
1189
  $ZodType.init(inst, def);
1190
1190
  inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
1191
- inst._zod.parse = (payload, _2) => {
1191
+ inst._zod.parse = (payload, _) => {
1192
1192
  if (def.coerce)
1193
1193
  try {
1194
1194
  payload.value = String(payload.value);
1195
- } catch (_3) {
1195
+ } catch (_2) {
1196
1196
  }
1197
1197
  if (typeof payload.value === "string")
1198
1198
  return payload;
@@ -1225,10 +1225,10 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1225
1225
  v7: 7,
1226
1226
  v8: 8
1227
1227
  };
1228
- const v2 = versionMap[def.version];
1229
- if (v2 === void 0)
1228
+ const v = versionMap[def.version];
1229
+ if (v === void 0)
1230
1230
  throw new Error(`Invalid UUID version: "${def.version}"`);
1231
- def.pattern ?? (def.pattern = uuid$1(v2));
1231
+ def.pattern ?? (def.pattern = uuid$1(v));
1232
1232
  } else
1233
1233
  def.pattern ?? (def.pattern = uuid$1());
1234
1234
  $ZodStringFormat.init(inst, def);
@@ -1277,7 +1277,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1277
1277
  payload.value = trimmed;
1278
1278
  }
1279
1279
  return;
1280
- } catch (_2) {
1280
+ } catch (_) {
1281
1281
  payload.issues.push({
1282
1282
  code: "invalid_format",
1283
1283
  format: "url",
@@ -1483,7 +1483,7 @@ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1483
1483
  if (def.coerce)
1484
1484
  try {
1485
1485
  payload.value = Number(payload.value);
1486
- } catch (_2) {
1486
+ } catch (_) {
1487
1487
  }
1488
1488
  const input = payload.value;
1489
1489
  if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
@@ -1511,7 +1511,7 @@ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1511
1511
  if (def.coerce)
1512
1512
  try {
1513
1513
  payload.value = Boolean(payload.value);
1514
- } catch (_2) {
1514
+ } catch (_) {
1515
1515
  }
1516
1516
  const input = payload.value;
1517
1517
  if (typeof input === "boolean")
@@ -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 i = 0; i < input.length; i++) {
1607
- const item = input[i];
1606
+ for (let i2 = 0; i2 < input.length; i2++) {
1607
+ const item = input[i2];
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, i)));
1613
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i2)));
1614
1614
  } else {
1615
- handleArrayResult(result, payload, i);
1615
+ handleArrayResult(result, payload, i2);
1616
1616
  }
1617
1617
  }
1618
1618
  if (proms.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 v2 of field.values)
1709
- propValues[key].add(v2);
1708
+ for (const v of field.values)
1709
+ propValues[key].add(v);
1710
1710
  }
1711
1711
  }
1712
1712
  return propValues;
@@ -1901,19 +1901,19 @@ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst,
1901
1901
  return handleIntersectionResults(payload, left, right);
1902
1902
  };
1903
1903
  });
1904
- function mergeValues(a2, b2) {
1905
- if (a2 === b2) {
1906
- return { valid: true, data: a2 };
1904
+ function mergeValues(a, b2) {
1905
+ if (a === b2) {
1906
+ return { valid: true, data: a };
1907
1907
  }
1908
- if (a2 instanceof Date && b2 instanceof Date && +a2 === +b2) {
1909
- return { valid: true, data: a2 };
1908
+ if (a instanceof Date && b2 instanceof Date && +a === +b2) {
1909
+ return { valid: true, data: a };
1910
1910
  }
1911
- if (isPlainObject$1(a2) && isPlainObject$1(b2)) {
1911
+ if (isPlainObject$1(a) && isPlainObject$1(b2)) {
1912
1912
  const bKeys = Object.keys(b2);
1913
- const sharedKeys = Object.keys(a2).filter((key) => bKeys.indexOf(key) !== -1);
1914
- const newObj = { ...a2, ...b2 };
1913
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1914
+ const newObj = { ...a, ...b2 };
1915
1915
  for (const key of sharedKeys) {
1916
- const sharedValue = mergeValues(a2[key], b2[key]);
1916
+ const sharedValue = mergeValues(a[key], b2[key]);
1917
1917
  if (!sharedValue.valid) {
1918
1918
  return {
1919
1919
  valid: false,
@@ -1924,13 +1924,13 @@ function mergeValues(a2, b2) {
1924
1924
  }
1925
1925
  return { valid: true, data: newObj };
1926
1926
  }
1927
- if (Array.isArray(a2) && Array.isArray(b2)) {
1928
- if (a2.length !== b2.length) {
1927
+ if (Array.isArray(a) && Array.isArray(b2)) {
1928
+ if (a.length !== b2.length) {
1929
1929
  return { valid: false, mergeErrorPath: [] };
1930
1930
  }
1931
1931
  const newArray = [];
1932
- for (let index2 = 0; index2 < a2.length; index2++) {
1933
- const itemA = a2[index2];
1932
+ for (let index2 = 0; index2 < a.length; index2++) {
1933
+ const itemA = a[index2];
1934
1934
  const itemB = b2[index2];
1935
1935
  const sharedValue = mergeValues(itemA, itemB);
1936
1936
  if (!sharedValue.valid) {
@@ -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 v2 = def.innerType._zod.values;
2193
- return v2 ? new Set([...v2].filter((x) => x !== void 0)) : void 0;
2192
+ const v = def.innerType._zod.values;
2193
+ return v ? new Set([...v].filter((x2) => x2 !== void 0)) : void 0;
2194
2194
  });
2195
2195
  inst._zod.parse = (payload, ctx) => {
2196
2196
  const result = def.innerType._zod.run(payload, ctx);
@@ -2303,7 +2303,7 @@ function handleReadonlyResult(payload) {
2303
2303
  const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2304
2304
  $ZodCheck.init(inst, def);
2305
2305
  $ZodType.init(inst, def);
2306
- inst._zod.parse = (payload, _2) => {
2306
+ inst._zod.parse = (payload, _) => {
2307
2307
  return payload;
2308
2308
  };
2309
2309
  inst._zod.check = (payload) => {
@@ -2368,8 +2368,8 @@ class $ZodRegistry {
2368
2368
  if (p2) {
2369
2369
  const pm = { ...this.get(p2) ?? {} };
2370
2370
  delete pm.id;
2371
- const f = { ...pm, ...this._map.get(schema) };
2372
- return Object.keys(f).length ? f : void 0;
2371
+ const f2 = { ...pm, ...this._map.get(schema) };
2372
+ return Object.keys(f2).length ? f2 : void 0;
2373
2373
  }
2374
2374
  return this._map.get(schema);
2375
2375
  }
@@ -3267,9 +3267,9 @@ const dateProcessor = (_schema, ctx, _json, _params) => {
3267
3267
  const enumProcessor = (schema, _ctx, json, _params) => {
3268
3268
  const def = schema._zod.def;
3269
3269
  const values = getEnumValues(def.entries);
3270
- if (values.every((v2) => typeof v2 === "number"))
3270
+ if (values.every((v) => typeof v === "number"))
3271
3271
  json.type = "number";
3272
- if (values.every((v2) => typeof v2 === "string"))
3272
+ if (values.every((v) => typeof v === "string"))
3273
3273
  json.type = "string";
3274
3274
  json.enum = values;
3275
3275
  };
@@ -3308,11 +3308,11 @@ const objectProcessor = (schema, ctx, _json, params) => {
3308
3308
  }
3309
3309
  const allKeys = new Set(Object.keys(shape));
3310
3310
  const requiredKeys = new Set([...allKeys].filter((key) => {
3311
- const v2 = def.shape[key]._zod;
3311
+ const v = def.shape[key]._zod;
3312
3312
  if (ctx.io === "input") {
3313
- return v2.optin === void 0;
3313
+ return v.optin === void 0;
3314
3314
  } else {
3315
- return v2.optout === void 0;
3315
+ return v.optout === void 0;
3316
3316
  }
3317
3317
  }));
3318
3318
  if (requiredKeys.size > 0) {
@@ -3333,9 +3333,9 @@ const objectProcessor = (schema, ctx, _json, params) => {
3333
3333
  const unionProcessor = (schema, ctx, json, params) => {
3334
3334
  const def = schema._zod.def;
3335
3335
  const isExclusive = def.inclusive === false;
3336
- const options = def.options.map((x, i) => process$1(x, ctx, {
3336
+ const options = def.options.map((x2, i2) => process$1(x2, ctx, {
3337
3337
  ...params,
3338
- path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
3338
+ path: [...params.path, isExclusive ? "oneOf" : "anyOf", i2]
3339
3339
  }));
3340
3340
  if (isExclusive) {
3341
3341
  json.oneOf = options;
@@ -3345,7 +3345,7 @@ const unionProcessor = (schema, ctx, json, params) => {
3345
3345
  };
3346
3346
  const intersectionProcessor = (schema, ctx, json, params) => {
3347
3347
  const def = schema._zod.def;
3348
- const a2 = process$1(def.left, ctx, {
3348
+ const a = process$1(def.left, ctx, {
3349
3349
  ...params,
3350
3350
  path: [...params.path, "allOf", 0]
3351
3351
  });
@@ -3355,7 +3355,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
3355
3355
  });
3356
3356
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
3357
3357
  const allOf = [
3358
- ...isSimpleIntersection(a2) ? a2.allOf : [a2],
3358
+ ...isSimpleIntersection(a) ? a.allOf : [a],
3359
3359
  ...isSimpleIntersection(b2) ? b2.allOf : [b2]
3360
3360
  ];
3361
3361
  json.allOf = allOf;
@@ -3943,7 +3943,7 @@ const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
3943
3943
  };
3944
3944
  });
3945
3945
  function _enum(values, params) {
3946
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
3946
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
3947
3947
  return new ZodEnum({
3948
3948
  type: "enum",
3949
3949
  entries,
@@ -4121,7 +4121,7 @@ const t$1 = [
4121
4121
  "FULL",
4122
4122
  "TOP_5"
4123
4123
  ];
4124
- const S = object({
4124
+ const y = object({
4125
4125
  average_price: number$1().nullable(),
4126
4126
  bid_quantity: number$1().nullable(),
4127
4127
  bid_price: number$1().nullable(),
@@ -4167,15 +4167,15 @@ const S = object({
4167
4167
  volume: number$1().nullable(),
4168
4168
  week_52_high: number$1().nullable(),
4169
4169
  week_52_low: number$1().nullable()
4170
- }), r = object({
4170
+ }), d = object({
4171
4171
  status: _enum(["SUCCESS", "FAILURE"]),
4172
- payload: S
4173
- }), v = object({
4172
+ payload: y
4173
+ }), j = object({
4174
4174
  nseSymbol: string(),
4175
4175
  name: string(),
4176
4176
  price: number$1(),
4177
- quoteData: r.nullable().optional()
4178
- }), u = _enum(o$1), t = object({
4177
+ quoteData: d.nullable().optional()
4178
+ }), i = _enum(o$1), t = object({
4179
4179
  statusCode: number$1(),
4180
4180
  message: string(),
4181
4181
  data: unknown()
@@ -4198,283 +4198,254 @@ const b = [
4198
4198
  "1day",
4199
4199
  "1week",
4200
4200
  "1month"
4201
- ], o = string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, {
4201
+ ], n = string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, {
4202
4202
  message: "datetime must be in format YYYY-MM-DDTHH:mm:ss (e.g., 2025-12-26T11:06:00)"
4203
4203
  }).refine(
4204
- (s) => {
4205
- const c = new Date(s);
4204
+ (a) => {
4205
+ const c = new Date(a);
4206
4206
  return !isNaN(c.getTime());
4207
4207
  },
4208
4208
  {
4209
4209
  message: "datetime must be a valid date and time"
4210
4210
  }
4211
- ), n = string().regex(/^\d{4}-\d{2}-\d{2}$/, {
4211
+ ), o = string().regex(/^\d{4}-\d{2}-\d{2}$/, {
4212
4212
  message: "date must be in format YYYY-MM-DD (e.g., 2025-12-26)"
4213
4213
  }).refine(
4214
- (s) => {
4215
- const c = new Date(s);
4214
+ (a) => {
4215
+ const c = new Date(a);
4216
4216
  return !isNaN(c.getTime());
4217
4217
  },
4218
4218
  {
4219
4219
  message: "date must be a valid date"
4220
4220
  }
4221
- ), a = string().regex(/^([A-Za-z_]+\/[A-Za-z_]+|[+-]\d{2}:\d{2})$/, {
4221
+ ), r = string().regex(/^([A-Za-z_]+\/[A-Za-z_]+|[+-]\d{2}:\d{2})$/, {
4222
4222
  message: "timezone must be an IANA identifier (e.g., 'Asia/Kolkata') or offset (e.g., '+05:30')"
4223
4223
  }).refine(
4224
- (s) => {
4225
- if (s.includes("/"))
4224
+ (a) => {
4225
+ if (a.includes("/"))
4226
4226
  try {
4227
- return new Intl.DateTimeFormat("en-US", { timeZone: s }), true;
4227
+ return new Intl.DateTimeFormat("en-US", { timeZone: a }), true;
4228
4228
  } catch {
4229
4229
  return false;
4230
4230
  }
4231
- return /^([+-]\d{2}:\d{2})$/.test(s);
4231
+ return /^([+-]\d{2}:\d{2})$/.test(a);
4232
4232
  },
4233
4233
  {
4234
4234
  message: "timezone must be a valid IANA identifier or UTC offset"
4235
4235
  }
4236
- ), p = object({
4237
- nseSymbol: string(),
4238
- name: string(),
4239
- price: number$1(),
4240
- quoteData: r.nullable().optional()
4241
- }), d = _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]), g = _enum(o$1), _ = object({
4242
- nseSymbol: string(),
4243
- quoteData: r
4236
+ ), h = object({
4237
+ id: uuid(),
4238
+ username: string()
4244
4239
  });
4245
4240
  ({
4246
4241
  body: object({
4242
+ developerToken: string().nonempty("Developer token is required")
4243
+ }),
4244
+ response: t.extend({
4245
+ data: h
4246
+ })
4247
+ });
4248
+ const p = object({
4249
+ status: _enum(["SUCCESS", "FAILURE"]),
4250
+ payload: object({
4251
+ /**
4252
+ * [timestamp, open, high, low, close, volume, turnover]
4253
+ */
4254
+ candles: array(array(union([string(), number$1()]).nullable())),
4255
+ closing_price: number$1().nullable(),
4256
+ start_time: string(),
4257
+ end_time: string(),
4258
+ interval_in_minutes: number$1()
4259
+ })
4260
+ }), f = {
4261
+ query: object({
4262
+ symbol: string(),
4263
+ date: o,
4264
+ interval: _enum(b).optional()
4265
+ }),
4266
+ response: t.extend({
4247
4267
  data: object({
4248
- timestamp: o,
4249
- timezone: a.optional(),
4250
- shortlistType: d,
4251
- entries: array(p),
4252
- scope: g.optional()
4268
+ candles: array(
4269
+ object({
4270
+ time: number$1(),
4271
+ open: number$1(),
4272
+ high: number$1(),
4273
+ low: number$1(),
4274
+ close: number$1()
4275
+ })
4276
+ ),
4277
+ start_time: string().nullable(),
4278
+ end_time: string().nullable(),
4279
+ interval_in_minutes: number$1()
4253
4280
  })
4281
+ })
4282
+ }, w = {
4283
+ query: object({
4284
+ symbol: string(),
4285
+ interval: _enum(b),
4286
+ start_datetime: n,
4287
+ end_datetime: n,
4288
+ timezone: r.optional()
4254
4289
  }),
4290
+ response: t.extend({
4291
+ data: p
4292
+ })
4293
+ }, x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4294
+ __proto__: null,
4295
+ getCandles: f,
4296
+ getGrowwHistoricalCandles: w,
4297
+ growwHistoricalCandlesSchema: p
4298
+ }, Symbol.toStringTag, { value: "Module" }));
4299
+ ({
4300
+ query: object({}),
4255
4301
  response: t.extend({
4256
4302
  data: object({
4257
- id: string(),
4258
- timestamp: string(),
4259
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4260
- shortlistType: d,
4261
- entriesCount: number$1()
4303
+ dates: array(
4304
+ object({
4305
+ date: string(),
4306
+ // Format: YYYY-MM-DD
4307
+ timestamps: array(string())
4308
+ // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4309
+ })
4310
+ )
4262
4311
  })
4263
4312
  })
4264
4313
  });
4265
4314
  ({
4266
- body: object({
4267
- data: object({
4268
- timestamp: o,
4269
- timezone: a.optional(),
4270
- quotes: array(_)
4271
- })
4272
- }),
4315
+ query: object({}),
4273
4316
  response: t.extend({
4274
4317
  data: object({
4275
- count: number$1(),
4276
- timestamp: string()
4277
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4318
+ dates: array(
4319
+ object({
4320
+ date: o,
4321
+ shortlistCount: number$1()
4322
+ })
4323
+ )
4278
4324
  })
4279
4325
  })
4280
4326
  });
4281
4327
  ({
4282
4328
  body: object({
4283
- data: object({
4284
- timestamp: o,
4285
- timezone: a.optional(),
4286
- quoteData: r,
4287
- dayChangePerc: number$1()
4288
- })
4329
+ dates: array(o).min(1)
4289
4330
  }),
4290
4331
  response: t.extend({
4291
4332
  data: object({
4292
- id: string(),
4293
- timestamp: string(),
4294
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4295
- dayChangePerc: number$1()
4333
+ deleted: object({
4334
+ shortlists: number$1()
4335
+ })
4296
4336
  })
4297
4337
  })
4298
4338
  });
4339
+ const l = object({
4340
+ id: uuid(),
4341
+ username: string(),
4342
+ token: string(),
4343
+ createdAt: date$1(),
4344
+ updatedAt: date$1()
4345
+ });
4299
4346
  ({
4300
4347
  query: object({
4301
- date: n
4348
+ limit: number().int().positive().max(100).optional().default(50),
4349
+ offset: number().int().nonnegative().optional().default(0)
4302
4350
  }),
4303
4351
  response: t.extend({
4304
4352
  data: object({
4305
- isHoliday: boolean(),
4306
- date: n
4353
+ developers: array(l),
4354
+ total: number$1()
4307
4355
  })
4308
4356
  })
4309
4357
  });
4310
- const y = object({
4311
- status: _enum(["SUCCESS", "FAILURE"]),
4312
- payload: object({
4313
- /**
4314
- * [timestamp, open, high, low, close, volume, turnover]
4315
- */
4316
- candles: array(array(union([string(), number$1()]).nullable())),
4317
- closing_price: number$1().nullable(),
4318
- start_time: string(),
4319
- end_time: string(),
4320
- interval_in_minutes: number$1()
4321
- })
4322
- }), O = {
4323
- query: object({
4324
- symbol: string(),
4325
- interval: _enum(b),
4326
- start_datetime: o,
4327
- end_datetime: o,
4328
- timezone: a.optional()
4358
+ ({
4359
+ params: object({
4360
+ id: uuid()
4329
4361
  }),
4330
4362
  response: t.extend({
4331
- data: y
4363
+ data: l
4332
4364
  })
4333
- }, q = {
4334
- query: object({
4335
- symbol: string(),
4336
- exchange: _enum(["NSE", "BSE"]).optional(),
4337
- segment: _enum(["CASH"]).optional(),
4338
- datetime: o.optional(),
4339
- timezone: a.optional()
4365
+ });
4366
+ ({
4367
+ body: object({
4368
+ username: string().min(1).max(255)
4340
4369
  }),
4341
4370
  response: t.extend({
4342
- data: r.nullable()
4371
+ data: l
4343
4372
  })
4344
- }, z = {
4373
+ });
4374
+ ({
4375
+ params: object({
4376
+ id: uuid()
4377
+ }),
4345
4378
  response: t.extend({
4346
- data: string()
4379
+ data: l
4347
4380
  })
4348
- }, w = {
4349
- query: object({
4350
- symbol: string(),
4351
- end_datetime: o,
4352
- timezone: a.optional()
4381
+ });
4382
+ ({
4383
+ params: object({
4384
+ id: uuid()
4353
4385
  }),
4354
4386
  response: t.extend({
4355
4387
  data: object({
4356
- quoteTimeline: array(
4357
- object({
4358
- id: string(),
4359
- timestamp: string(),
4360
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4361
- nseSymbol: string(),
4362
- quoteData: r,
4363
- createdAt: string(),
4364
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4365
- updatedAt: string()
4366
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4367
- })
4368
- )
4388
+ id: uuid(),
4389
+ deleted: boolean()
4369
4390
  })
4370
4391
  })
4371
- }, A = {
4372
- query: object({
4373
- end_datetime: o,
4374
- timezone: a.optional()
4375
- }),
4392
+ });
4393
+ ({
4376
4394
  response: t.extend({
4377
4395
  data: object({
4378
- niftyTimeline: array(
4379
- object({
4380
- id: string(),
4381
- timestamp: string(),
4382
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4383
- quoteData: r,
4384
- createdAt: string(),
4385
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4386
- updatedAt: string()
4387
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4388
- })
4389
- )
4396
+ hasGrowwApiKey: boolean(),
4397
+ hasGrowwApiSecret: boolean(),
4398
+ growwApiKeyMasked: string().nullable()
4390
4399
  })
4391
4400
  })
4392
- }, D = {
4393
- query: object({
4394
- datetime: o.optional(),
4395
- timezone: a.optional()
4396
- }),
4397
- response: t.extend({
4398
- data: r.nullable()
4399
- })
4400
- }, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4401
- __proto__: null,
4402
- getGrowwHistoricalCandles: O,
4403
- getGrowwNiftyQuote: D,
4404
- getGrowwNiftyQuoteTimeline: A,
4405
- getGrowwQuote: q,
4406
- getGrowwQuoteTimeline: w,
4407
- getGrowwToken: z,
4408
- growwHistoricalCandlesSchema: y
4409
- }, Symbol.toStringTag, { value: "Module" })), j = object({
4410
- name: string(),
4411
- price: number$1(),
4412
- nseSymbol: string()
4413
- }), M = {
4414
- query: object({
4415
- type: _enum(["top-gainers", "volume-shockers"]),
4416
- datetime: o.optional(),
4417
- timezone: a.optional(),
4418
- scope: u.optional()
4401
+ });
4402
+ ({
4403
+ body: object({
4404
+ growwApiKey: string().min(1, "Groww API key is required"),
4405
+ growwApiSecret: string().min(1, "Groww API secret is required")
4419
4406
  }),
4420
4407
  response: t.extend({
4421
- data: array(j).nullable()
4408
+ data: object({
4409
+ success: boolean()
4410
+ })
4422
4411
  })
4423
- }, Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4424
- __proto__: null,
4425
- getLists: M,
4426
- listSchema: j
4427
- }, Symbol.toStringTag, { value: "Module" })), C = {
4428
- query: object({
4429
- type: _enum(["top-gainers", "volume-shockers"]),
4430
- start_datetime: o,
4431
- end_datetime: o,
4432
- timezone: a.optional(),
4433
- scope: u.optional()
4434
- }),
4412
+ });
4413
+ ({
4435
4414
  response: t.extend({
4436
4415
  data: object({
4437
- start_datetime: string(),
4438
- end_datetime: string(),
4439
- type: _enum(["top-gainers", "volume-shockers"]),
4440
- totalSnapshots: number$1(),
4441
- instruments: array(
4442
- object({
4443
- nseSymbol: string(),
4444
- name: string(),
4445
- appearanceCount: number$1(),
4446
- totalSnapshots: number$1(),
4447
- percentage: number$1()
4448
- })
4449
- )
4416
+ success: boolean()
4450
4417
  })
4451
4418
  })
4452
- }, ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4453
- __proto__: null,
4454
- getShortlistPersistence: C
4455
- }, Symbol.toStringTag, { value: "Module" }));
4419
+ });
4420
+ ({
4421
+ response: t.extend({
4422
+ data: string()
4423
+ })
4424
+ });
4456
4425
  ({
4457
- query: object({}),
4458
4426
  response: t.extend({
4459
4427
  data: object({
4460
- dates: array(
4428
+ holidays: array(
4461
4429
  object({
4462
- date: string(),
4463
- // Format: YYYY-MM-DD
4464
- timestamps: array(string())
4465
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4430
+ id: string().uuid(),
4431
+ date: o,
4432
+ createdAt: date(),
4433
+ updatedAt: date()
4466
4434
  })
4467
4435
  )
4468
4436
  })
4469
4437
  })
4470
4438
  });
4471
4439
  ({
4440
+ body: object({
4441
+ dates: array(o).min(1)
4442
+ }),
4472
4443
  response: t.extend({
4473
4444
  data: object({
4474
4445
  holidays: array(
4475
4446
  object({
4476
4447
  id: string().uuid(),
4477
- date: n,
4448
+ date: o,
4478
4449
  createdAt: date(),
4479
4450
  updatedAt: date()
4480
4451
  })
@@ -4482,125 +4453,157 @@ const y = object({
4482
4453
  })
4483
4454
  })
4484
4455
  });
4485
- const E = {
4486
- query: object({}),
4456
+ ({
4457
+ body: object({
4458
+ dates: array(o).min(1)
4459
+ }),
4487
4460
  response: t.extend({
4488
4461
  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
- )
4462
+ deleted: object({
4463
+ count: number$1(),
4464
+ dates: array(o)
4465
+ })
4497
4466
  })
4498
4467
  })
4499
- }, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4500
- __proto__: null,
4501
- getAvailableDatetimes: E
4502
- }, Symbol.toStringTag, { value: "Module" })), L = {
4468
+ });
4469
+ ({
4503
4470
  query: object({
4504
- symbol: string(),
4505
- date: n,
4506
- interval: _enum(b).optional()
4471
+ date: o
4507
4472
  }),
4508
4473
  response: t.extend({
4509
4474
  data: object({
4510
- candles: array(
4511
- object({
4512
- time: number$1(),
4513
- open: number$1(),
4514
- high: number$1(),
4515
- low: number$1(),
4516
- close: number$1()
4517
- })
4518
- ),
4519
- start_time: string().nullable(),
4520
- end_time: string().nullable(),
4521
- interval_in_minutes: number$1()
4475
+ isHoliday: boolean(),
4476
+ date: o
4522
4477
  })
4523
4478
  })
4524
- }, I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4525
- __proto__: null,
4526
- getCandles: L
4527
- }, Symbol.toStringTag, { value: "Module" })), N = {
4479
+ });
4480
+ const s = _enum(t$1), g = j.extend({
4481
+ // Target and stop loss prices
4482
+ targetPrice: number$1().optional(),
4483
+ stopLossPrice: number$1().optional(),
4484
+ // Trade outcome
4485
+ targetAchieved: boolean().optional(),
4486
+ stopLossHit: boolean().optional(),
4487
+ // Timing information
4488
+ timeToTargetMinutes: number$1().optional(),
4489
+ timeToStopLossMinutes: number$1().optional(),
4490
+ targetTimestamp: string().optional(),
4491
+ stopLossTimestamp: string().optional()
4492
+ }), m = object({
4493
+ name: string(),
4494
+ price: number$1(),
4495
+ nseSymbol: string()
4496
+ }), $ = {
4528
4497
  query: object({
4529
- date: n,
4530
- type: _enum(t$1)
4498
+ datetime: n,
4499
+ timezone: r.optional(),
4500
+ type: _enum(t$1),
4501
+ scope: i.optional(),
4502
+ takeProfitPercentage: number().min(0).optional().default(2),
4503
+ stopLossPercentage: number().min(0).max(100).optional().default(1.5)
4531
4504
  }),
4532
4505
  response: t.extend({
4533
4506
  data: object({
4534
- date: string(),
4535
- type: _enum(t$1),
4536
- totalSnapshots: number$1(),
4537
- companies: array(
4507
+ shortlist: object({
4508
+ id: string(),
4509
+ timestamp: string(),
4510
+ // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4511
+ shortlistType: _enum(t$1),
4512
+ entries: array(g)
4513
+ }).nullable()
4514
+ })
4515
+ })
4516
+ }, B = {
4517
+ query: object({
4518
+ type: s,
4519
+ datetime: n.optional(),
4520
+ timezone: r.optional(),
4521
+ scope: i.optional()
4522
+ }),
4523
+ response: t.extend({
4524
+ data: array(m).nullable()
4525
+ })
4526
+ }, Q = {
4527
+ body: object({
4528
+ data: object({
4529
+ timestamp: n,
4530
+ timezone: r.optional(),
4531
+ shortlistType: s,
4532
+ entries: array(
4538
4533
  object({
4539
4534
  nseSymbol: string(),
4540
4535
  name: string(),
4541
- count: number$1(),
4542
- percentage: number$1()
4536
+ price: number$1(),
4537
+ quoteData: d.nullable().optional()
4543
4538
  })
4544
- )
4539
+ ),
4540
+ scope: i.optional()
4545
4541
  })
4546
- })
4547
- }, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4548
- __proto__: null,
4549
- getDailyPersistentCompanies: N
4550
- }, Symbol.toStringTag, { value: "Module" })), G = {
4551
- query: object({
4552
- date: n,
4553
- type: _enum(t$1)
4554
4542
  }),
4555
4543
  response: t.extend({
4556
4544
  data: object({
4557
- date: string(),
4558
- type: _enum(t$1),
4559
- uniqueCount: number$1()
4545
+ id: string(),
4546
+ timestamp: string(),
4547
+ // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4548
+ shortlistType: s,
4549
+ entriesCount: number$1()
4560
4550
  })
4561
4551
  })
4562
- }, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4563
- __proto__: null,
4564
- getDailyUniqueCompanies: G
4565
- }, Symbol.toStringTag, { value: "Module" })), U = object({
4566
- id: uuid(),
4567
- username: string()
4568
- }), Y = {
4569
- body: object({
4570
- developerToken: string().nonempty("Developer token is required")
4552
+ }, V = {
4553
+ query: object({
4554
+ type: _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"])
4571
4555
  }),
4572
4556
  response: t.extend({
4573
- data: U
4557
+ data: array(m).nullable()
4574
4558
  })
4575
- }, F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4576
- __proto__: null,
4577
- signIn: Y
4578
- }, Symbol.toStringTag, { value: "Module" })), B = {
4559
+ }, Z = {
4579
4560
  query: object({
4580
- symbol: string(),
4581
- date: n
4561
+ type: _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]),
4562
+ start_datetime: n,
4563
+ end_datetime: n,
4564
+ timezone: r.optional(),
4565
+ scope: i.optional()
4582
4566
  }),
4583
4567
  response: t.extend({
4584
4568
  data: object({
4585
- quoteTimeline: array(
4569
+ start_datetime: string(),
4570
+ end_datetime: string(),
4571
+ type: _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]),
4572
+ totalSnapshots: number$1(),
4573
+ instruments: array(
4586
4574
  object({
4587
- id: string(),
4588
- timestamp: string(),
4589
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4590
4575
  nseSymbol: string(),
4591
- quoteData: r,
4592
- createdAt: string(),
4593
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4594
- updatedAt: string()
4595
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4576
+ name: string(),
4577
+ appearanceCount: number$1(),
4578
+ totalSnapshots: number$1(),
4579
+ percentage: number$1()
4596
4580
  })
4597
4581
  )
4598
4582
  })
4599
4583
  })
4600
- }, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4584
+ }, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4585
+ __proto__: null,
4586
+ createShortlistSnapshot: Q,
4587
+ getLists: B,
4588
+ getListsScrap: V,
4589
+ getShortlistPersistence: Z,
4590
+ getShortlists: $,
4591
+ listSchema: m,
4592
+ shortlistEntryWithMetricsSchema: g,
4593
+ shortlistTypeSchema: s
4594
+ }, Symbol.toStringTag, { value: "Module" })), J = {
4595
+ query: object({
4596
+ symbol: string(),
4597
+ exchange: _enum(["NSE", "BSE"]).optional(),
4598
+ segment: _enum(["CASH"]).optional()
4599
+ }),
4600
+ response: t.extend({
4601
+ data: d.nullable()
4602
+ })
4603
+ }, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4601
4604
  __proto__: null,
4602
- getQuoteTimeline: B
4603
- }, Symbol.toStringTag, { value: "Module" })), Z = object({
4605
+ getGrowwQuote: J
4606
+ }, Symbol.toStringTag, { value: "Module" })), ee = object({
4604
4607
  id: uuid(),
4605
4608
  start_datetime: string(),
4606
4609
  end_datetime: string(),
@@ -4608,15 +4611,15 @@ const E = {
4608
4611
  orderCount: number$1(),
4609
4612
  name: string().nullable().optional(),
4610
4613
  tags: array(string()).optional()
4611
- }), V = record(
4614
+ }), te = record(
4612
4615
  string(),
4613
4616
  // date string (YYYY-MM-DD)
4614
- array(Z)
4615
- ), W = {
4617
+ array(ee)
4618
+ ), ne = {
4616
4619
  response: t.extend({
4617
- data: V
4620
+ data: te
4618
4621
  })
4619
- }, J = object({
4622
+ }, oe = object({
4620
4623
  id: uuid(),
4621
4624
  nseSymbol: string(),
4622
4625
  entryPrice: number(),
@@ -4635,7 +4638,7 @@ const E = {
4635
4638
  stopLossHit: boolean().optional(),
4636
4639
  stopLossTimestamp: string().optional(),
4637
4640
  timeToStopLossMinutes: number$1().optional()
4638
- }), X = {
4641
+ }), ae = {
4639
4642
  params: object({
4640
4643
  runId: uuid()
4641
4644
  }),
@@ -4643,371 +4646,188 @@ const E = {
4643
4646
  targetGainPercentage: number().optional()
4644
4647
  }),
4645
4648
  response: t.extend({
4646
- data: array(J)
4649
+ data: array(oe)
4647
4650
  })
4648
- }, ee = object({
4649
- start_datetime: o,
4650
- end_datetime: o,
4651
- timezone: a.optional(),
4651
+ }, re = object({
4652
+ start_datetime: n,
4653
+ end_datetime: n,
4654
+ timezone: r.optional(),
4652
4655
  name: string().optional(),
4653
4656
  tags: array(string().min(1).max(50)).optional()
4654
- }), te = object({
4657
+ }), se = object({
4655
4658
  id: uuid(),
4656
- start_datetime: o,
4657
- end_datetime: o,
4659
+ start_datetime: n,
4660
+ end_datetime: n,
4658
4661
  completed: boolean(),
4659
4662
  name: string().nullable().optional(),
4660
4663
  tags: array(string()).optional()
4661
- }), oe = {
4662
- body: ee,
4664
+ }), ie = {
4665
+ body: re,
4663
4666
  response: t.extend({
4664
- data: te
4667
+ data: se
4665
4668
  })
4666
- }, ne = object({
4669
+ }, le = object({
4667
4670
  completed: boolean().optional(),
4668
4671
  name: string().nullable().optional(),
4669
4672
  tags: array(string().min(1).max(50)).optional()
4670
- }), ae = object({
4673
+ }), ce = object({
4671
4674
  id: uuid(),
4672
4675
  start_datetime: string(),
4673
4676
  end_datetime: string(),
4674
4677
  completed: boolean(),
4675
4678
  name: string().nullable().optional(),
4676
4679
  tags: array(string()).optional()
4677
- }), re = {
4678
- params: object({
4679
- runId: uuid()
4680
- }),
4681
- body: ne,
4682
- response: t.extend({
4683
- data: ae
4684
- })
4685
- }, se = {
4686
- params: object({
4687
- runId: uuid()
4688
- }),
4689
- response: t.extend({
4690
- data: object({
4691
- id: uuid()
4692
- })
4693
- })
4694
- }, ie = object({
4695
- nseSymbol: string(),
4696
- entryPrice: number(),
4697
- stopLossPrice: number(),
4698
- takeProfitPrice: number(),
4699
- datetime: o,
4700
- timezone: a.optional()
4701
- }), le = object({
4702
- id: uuid(),
4703
- nseSymbol: string(),
4704
- entryPrice: number(),
4705
- stopLossPrice: number(),
4706
- takeProfitPrice: number(),
4707
- datetime: string(),
4708
- runId: uuid()
4709
- }), ce = {
4710
- params: object({
4711
- runId: uuid()
4712
- }),
4713
- body: ie,
4714
- response: t.extend({
4715
- data: le
4716
- })
4717
- }, de = {
4718
- response: t.extend({
4719
- data: array(string())
4720
- })
4721
- }, ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4722
- __proto__: null,
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({
4731
- // Target and stop loss prices
4732
- targetPrice: number$1().optional(),
4733
- stopLossPrice: number$1().optional(),
4734
- // Trade outcome
4735
- targetAchieved: boolean().optional(),
4736
- stopLossHit: boolean().optional(),
4737
- // Timing information
4738
- timeToTargetMinutes: number$1().optional(),
4739
- timeToStopLossMinutes: number$1().optional(),
4740
- targetTimestamp: string().optional(),
4741
- stopLossTimestamp: string().optional()
4742
- }), me = {
4743
- query: object({
4744
- datetime: o,
4745
- timezone: a.optional(),
4746
- type: _enum(t$1),
4747
- scope: u.optional(),
4748
- takeProfitPercentage: number().min(0).optional().default(2),
4749
- stopLossPercentage: number().min(0).max(100).optional().default(1.5)
4750
- }),
4751
- response: t.extend({
4752
- data: object({
4753
- shortlist: object({
4754
- id: string(),
4755
- timestamp: string(),
4756
- // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4757
- shortlistType: _enum(t$1),
4758
- entries: array(h)
4759
- }).nullable()
4760
- })
4761
- })
4762
- }, be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4763
- __proto__: null,
4764
- getShortlists: me,
4765
- shortlistEntryWithMetricsSchema: h
4766
- }, Symbol.toStringTag, { value: "Module" })), Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4767
- __proto__: null,
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
4776
- }, Symbol.toStringTag, { value: "Module" }));
4777
- ({
4778
- response: t.extend({
4779
- data: object({
4780
- status: _enum(["completed", "failed"]),
4781
- logs: array(string()),
4782
- affectedRows: record(string(), number$1()).optional(),
4783
- error: string().optional()
4784
- })
4785
- })
4786
- });
4787
- const l = object({
4788
- id: uuid(),
4789
- username: string(),
4790
- token: string(),
4791
- createdAt: date$1(),
4792
- updatedAt: date$1()
4793
- });
4794
- ({
4795
- query: object({
4796
- limit: number().int().positive().max(100).optional().default(50),
4797
- offset: number().int().nonnegative().optional().default(0)
4798
- }),
4799
- response: t.extend({
4800
- data: object({
4801
- developers: array(l),
4802
- total: number$1()
4803
- })
4804
- })
4805
- });
4806
- ({
4807
- params: object({
4808
- id: uuid()
4809
- }),
4810
- response: t.extend({
4811
- data: l
4812
- })
4813
- });
4814
- ({
4815
- body: object({
4816
- username: string().min(1).max(255)
4817
- }),
4818
- response: t.extend({
4819
- data: l
4820
- })
4821
- });
4822
- ({
4823
- params: object({
4824
- id: uuid()
4825
- }),
4826
- response: t.extend({
4827
- data: l
4828
- })
4829
- });
4830
- ({
4831
- params: object({
4832
- id: uuid()
4833
- }),
4834
- response: t.extend({
4835
- data: object({
4836
- id: uuid(),
4837
- deleted: boolean()
4838
- })
4839
- })
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)
4680
+ }), ue = {
4681
+ params: object({
4682
+ runId: uuid()
4859
4683
  }),
4684
+ body: le,
4860
4685
  response: t.extend({
4861
- data: object({
4862
- deleted: object({
4863
- shortlists: number$1(),
4864
- quotes: number$1(),
4865
- niftyQuotes: number$1()
4866
- })
4867
- })
4686
+ data: ce
4868
4687
  })
4869
- });
4870
- ({
4688
+ }, de = {
4689
+ params: object({
4690
+ runId: uuid()
4691
+ }),
4871
4692
  response: t.extend({
4872
4693
  data: object({
4873
- holidays: array(
4874
- object({
4875
- id: string().uuid(),
4876
- date: n,
4877
- createdAt: date(),
4878
- updatedAt: date()
4879
- })
4880
- )
4694
+ id: uuid()
4881
4695
  })
4882
4696
  })
4883
- });
4884
- ({
4885
- body: object({
4886
- dates: array(n).min(1)
4697
+ }, me = object({
4698
+ nseSymbol: string(),
4699
+ entryPrice: number(),
4700
+ stopLossPrice: number(),
4701
+ takeProfitPrice: number(),
4702
+ datetime: n,
4703
+ timezone: r.optional()
4704
+ }), be = object({
4705
+ id: uuid(),
4706
+ nseSymbol: string(),
4707
+ entryPrice: number(),
4708
+ stopLossPrice: number(),
4709
+ takeProfitPrice: number(),
4710
+ datetime: string(),
4711
+ runId: uuid()
4712
+ }), pe = {
4713
+ params: object({
4714
+ runId: uuid()
4887
4715
  }),
4716
+ body: me,
4888
4717
  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
- })
4718
+ data: be
4899
4719
  })
4900
- });
4901
- ({
4902
- body: object({
4903
- dates: array(n).min(1)
4904
- }),
4720
+ }, ge = {
4905
4721
  response: t.extend({
4906
- data: object({
4907
- deleted: object({
4908
- count: number$1(),
4909
- dates: array(n)
4910
- })
4911
- })
4722
+ data: array(string())
4912
4723
  })
4913
- });
4724
+ }, _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4725
+ __proto__: null,
4726
+ createOrder: pe,
4727
+ createRun: ie,
4728
+ deleteRun: de,
4729
+ getRunOrders: ae,
4730
+ getRunTags: ge,
4731
+ getRuns: ne,
4732
+ updateRun: ue
4733
+ }, Symbol.toStringTag, { value: "Module" }));
4914
4734
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4915
- function getDefaultExportFromCjs(x) {
4916
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4735
+ function getDefaultExportFromCjs(x2) {
4736
+ return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
4917
4737
  }
4918
4738
  function getAugmentedNamespace(n2) {
4919
4739
  if (n2.__esModule) return n2;
4920
- var f = n2.default;
4921
- if (typeof f == "function") {
4922
- var a2 = function a3() {
4923
- if (this instanceof a3) {
4924
- return Reflect.construct(f, arguments, this.constructor);
4740
+ var f2 = n2.default;
4741
+ if (typeof f2 == "function") {
4742
+ var a = function a2() {
4743
+ if (this instanceof a2) {
4744
+ return Reflect.construct(f2, arguments, this.constructor);
4925
4745
  }
4926
- return f.apply(this, arguments);
4746
+ return f2.apply(this, arguments);
4927
4747
  };
4928
- a2.prototype = f.prototype;
4929
- } else a2 = {};
4930
- Object.defineProperty(a2, "__esModule", { value: true });
4748
+ a.prototype = f2.prototype;
4749
+ } else a = {};
4750
+ Object.defineProperty(a, "__esModule", { value: true });
4931
4751
  Object.keys(n2).forEach(function(k) {
4932
4752
  var d2 = Object.getOwnPropertyDescriptor(n2, k);
4933
- Object.defineProperty(a2, k, d2.get ? d2 : {
4753
+ Object.defineProperty(a, k, d2.get ? d2 : {
4934
4754
  enumerable: true,
4935
4755
  get: function() {
4936
4756
  return n2[k];
4937
4757
  }
4938
4758
  });
4939
4759
  });
4940
- return a2;
4760
+ return a;
4941
4761
  }
4942
4762
  var utc$1 = { exports: {} };
4943
4763
  (function(module, exports$1) {
4944
- !function(t2, i) {
4945
- module.exports = i();
4764
+ !function(t2, i2) {
4765
+ module.exports = i2();
4946
4766
  }(commonjsGlobal, function() {
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;
4767
+ var t2 = "minute", i2 = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g;
4768
+ return function(s2, f2, n2) {
4769
+ var u = f2.prototype;
4950
4770
  n2.utc = function(t3) {
4951
- var i2 = { date: t3, utc: true, args: arguments };
4952
- return new f(i2);
4953
- }, u2.utc = function(i2) {
4771
+ var i3 = { date: t3, utc: true, args: arguments };
4772
+ return new f2(i3);
4773
+ }, u.utc = function(i3) {
4954
4774
  var e2 = n2(this.toDate(), { locale: this.$L, utc: true });
4955
- return i2 ? e2.add(this.utcOffset(), t2) : e2;
4956
- }, u2.local = function() {
4775
+ return i3 ? e2.add(this.utcOffset(), t2) : e2;
4776
+ }, u.local = function() {
4957
4777
  return n2(this.toDate(), { locale: this.$L, utc: false });
4958
4778
  };
4959
- var r2 = u2.parse;
4960
- u2.parse = function(t3) {
4779
+ var r2 = u.parse;
4780
+ u.parse = function(t3) {
4961
4781
  t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r2.call(this, t3);
4962
4782
  };
4963
- var o2 = u2.init;
4964
- u2.init = function() {
4783
+ var o2 = u.init;
4784
+ u.init = function() {
4965
4785
  if (this.$u) {
4966
4786
  var t3 = this.$d;
4967
4787
  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();
4968
4788
  } else o2.call(this);
4969
4789
  };
4970
- var a2 = u2.utcOffset;
4971
- u2.utcOffset = function(s2, f2) {
4790
+ var a = u.utcOffset;
4791
+ u.utcOffset = function(s3, f3) {
4972
4792
  var n3 = this.$utils().u;
4973
- if (n3(s2)) return this.$u ? 0 : n3(this.$offset) ? a2.call(this) : this.$offset;
4974
- if ("string" == typeof s2 && (s2 = function(t3) {
4793
+ if (n3(s3)) return this.$u ? 0 : n3(this.$offset) ? a.call(this) : this.$offset;
4794
+ if ("string" == typeof s3 && (s3 = function(t3) {
4975
4795
  void 0 === t3 && (t3 = "");
4976
- var s3 = t3.match(i);
4977
- if (!s3) return null;
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;
4980
- }(s2), null === s2)) return this;
4981
- var u3 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
4982
- if (0 === u3) return this.utc(f2);
4796
+ var s4 = t3.match(i2);
4797
+ if (!s4) return null;
4798
+ var f4 = ("" + s4[0]).match(e) || ["-", 0, 0], n4 = f4[0], u3 = 60 * +f4[1] + +f4[2];
4799
+ return 0 === u3 ? 0 : "+" === n4 ? u3 : -u3;
4800
+ }(s3), null === s3)) return this;
4801
+ var u2 = Math.abs(s3) <= 16 ? 60 * s3 : s3;
4802
+ if (0 === u2) return this.utc(f3);
4983
4803
  var r3 = this.clone();
4984
- if (f2) return r3.$offset = u3, r3.$u = false, r3;
4804
+ if (f3) return r3.$offset = u2, r3.$u = false, r3;
4985
4805
  var o3 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
4986
- return (r3 = this.local().add(u3 + o3, t2)).$offset = u3, r3.$x.$localOffset = o3, r3;
4806
+ return (r3 = this.local().add(u2 + o3, t2)).$offset = u2, r3.$x.$localOffset = o3, r3;
4987
4807
  };
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() {
4808
+ var h2 = u.format;
4809
+ u.format = function(t3) {
4810
+ var i3 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
4811
+ return h2.call(this, i3);
4812
+ }, u.valueOf = function() {
4993
4813
  var t3 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
4994
4814
  return this.$d.valueOf() - 6e4 * t3;
4995
- }, u2.isUTC = function() {
4815
+ }, u.isUTC = function() {
4996
4816
  return !!this.$u;
4997
- }, u2.toISOString = function() {
4817
+ }, u.toISOString = function() {
4998
4818
  return this.toDate().toISOString();
4999
- }, u2.toString = function() {
4819
+ }, u.toString = function() {
5000
4820
  return this.toDate().toUTCString();
5001
4821
  };
5002
- var l2 = u2.toDate;
5003
- u2.toDate = function(t3) {
4822
+ var l2 = u.toDate;
4823
+ u.toDate = function(t3) {
5004
4824
  return "s" === t3 && this.$offset ? n2(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l2.call(this);
5005
4825
  };
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);
4826
+ var c = u.diff;
4827
+ u.diff = function(t3, i3, e2) {
4828
+ if (t3 && this.$u === t3.$u) return c.call(this, t3, i3, e2);
4829
+ var s3 = this.local(), f3 = n2(t3).local();
4830
+ return c.call(s3, f3, i3, e2);
5011
4831
  };
5012
4832
  };
5013
4833
  });
@@ -5020,53 +4840,53 @@ var timezone$1 = { exports: {} };
5020
4840
  module.exports = e();
5021
4841
  }(commonjsGlobal, function() {
5022
4842
  var t2 = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, e = {};
5023
- return function(n2, i, o2) {
5024
- var r2, a2 = function(t3, n3, i2) {
5025
- void 0 === i2 && (i2 = {});
4843
+ return function(n2, i2, o2) {
4844
+ var r2, a = function(t3, n3, i3) {
4845
+ void 0 === i3 && (i3 = {});
5026
4846
  var o3 = new Date(t3), r3 = function(t4, n4) {
5027
4847
  void 0 === n4 && (n4 = {});
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);
4848
+ var i4 = n4.timeZoneName || "short", o4 = t4 + "|" + i4, r4 = e[o4];
4849
+ 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: i4 }), e[o4] = r4), r4;
4850
+ }(n3, i3);
5031
4851
  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));
4852
+ }, u = function(e2, n3) {
4853
+ for (var i3 = a(e2, n3), r3 = [], u2 = 0; u2 < i3.length; u2 += 1) {
4854
+ var f3 = i3[u2], s3 = f3.type, m2 = f3.value, c = t2[s3];
4855
+ c >= 0 && (r3[c] = parseInt(m2, 10));
5036
4856
  }
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) {
4857
+ var d2 = r3[3], l2 = 24 === d2 ? 0 : d2, h2 = r3[0] + "-" + r3[1] + "-" + r3[2] + " " + l2 + ":" + r3[4] + ":" + r3[5] + ":000", v = +e2;
4858
+ return (o2.utc(h2).valueOf() - (v -= v % 1e3)) / 6e4;
4859
+ }, f2 = i2.prototype;
4860
+ f2.tz = function(t3, e2) {
5041
4861
  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;
5043
- if (!Number(s2)) n3 = this.utcOffset(0, e2);
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");
4862
+ var n3, i3 = this.utcOffset(), a2 = this.toDate(), u2 = a2.toLocaleString("en-US", { timeZone: t3 }), f3 = Math.round((a2 - new Date(u2)) / 1e3 / 60), s3 = 15 * -Math.round(a2.getTimezoneOffset() / 15) - f3;
4863
+ if (!Number(s3)) n3 = this.utcOffset(0, e2);
4864
+ else if (n3 = o2(u2, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(s3, true), e2) {
4865
+ var m2 = n3.utcOffset();
4866
+ n3 = n3.add(i3 - m2, "minute");
5047
4867
  }
5048
4868
  return n3.$x.$timezone = t3, n3;
5049
- }, f.offsetName = function(t3) {
5050
- var e2 = this.$x.$timezone || o2.tz.guess(), n3 = a2(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
4869
+ }, f2.offsetName = function(t3) {
4870
+ var e2 = this.$x.$timezone || o2.tz.guess(), n3 = a(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
5051
4871
  return "timezonename" === t4.type.toLowerCase();
5052
4872
  });
5053
4873
  return n3 && n3.value;
5054
4874
  };
5055
- var s = f.startOf;
5056
- f.startOf = function(t3, e2) {
5057
- if (!this.$x || !this.$x.$timezone) return s.call(this, t3, e2);
4875
+ var s2 = f2.startOf;
4876
+ f2.startOf = function(t3, e2) {
4877
+ if (!this.$x || !this.$x.$timezone) return s2.call(this, t3, e2);
5058
4878
  var n3 = o2(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
5059
- return s.call(n3, t3, e2).tz(this.$x.$timezone, true);
4879
+ return s2.call(n3, t3, e2).tz(this.$x.$timezone, true);
5060
4880
  }, o2.tz = function(t3, e2, n3) {
5061
- var i2 = n3 && e2, a3 = n3 || e2 || r2, f2 = u2(+o2(), a3);
5062
- if ("string" != typeof t3) return o2(t3).tz(a3);
5063
- var s2 = function(t4, e3, n4) {
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;
4881
+ var i3 = n3 && e2, a2 = n3 || e2 || r2, f3 = u(+o2(), a2);
4882
+ if ("string" != typeof t3) return o2(t3).tz(a2);
4883
+ var s3 = function(t4, e3, n4) {
4884
+ var i4 = t4 - 60 * e3 * 1e3, o3 = u(i4, n4);
4885
+ if (e3 === o3) return [i4, e3];
4886
+ var r3 = u(i4 -= 60 * (o3 - e3) * 1e3, n4);
4887
+ return o3 === r3 ? [i4, o3] : [t4 - 60 * Math.min(o3, r3) * 1e3, Math.max(o3, r3)];
4888
+ }(o2.utc(t3, i3).valueOf(), f3, a2), m2 = s3[0], c = s3[1], d2 = o2(m2).utcOffset(c);
4889
+ return d2.$x.$timezone = a2, d2;
5070
4890
  }, o2.tz.guess = function() {
5071
4891
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
5072
4892
  }, o2.tz.setDefault = function(t3) {
@@ -5148,14 +4968,14 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
5148
4968
  if (obj === null || typeof obj === "undefined") {
5149
4969
  return;
5150
4970
  }
5151
- let i;
4971
+ let i2;
5152
4972
  let l2;
5153
4973
  if (typeof obj !== "object") {
5154
4974
  obj = [obj];
5155
4975
  }
5156
4976
  if (isArray(obj)) {
5157
- for (i = 0, l2 = obj.length; i < l2; i++) {
5158
- fn.call(null, obj[i], i, obj);
4977
+ for (i2 = 0, l2 = obj.length; i2 < l2; i2++) {
4978
+ fn.call(null, obj[i2], i2, obj);
5159
4979
  }
5160
4980
  } else {
5161
4981
  if (isBuffer(obj)) {
@@ -5164,8 +4984,8 @@ function forEach(obj, fn, { allOwnKeys = false } = {}) {
5164
4984
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
5165
4985
  const len = keys.length;
5166
4986
  let key;
5167
- for (i = 0; i < len; i++) {
5168
- key = keys[i];
4987
+ for (i2 = 0; i2 < len; i2++) {
4988
+ key = keys[i2];
5169
4989
  fn.call(null, obj[key], key, obj);
5170
4990
  }
5171
4991
  }
@@ -5176,10 +4996,10 @@ function findKey(obj, key) {
5176
4996
  }
5177
4997
  key = key.toLowerCase();
5178
4998
  const keys = Object.keys(obj);
5179
- let i = keys.length;
4999
+ let i2 = keys.length;
5180
5000
  let _key;
5181
- while (i-- > 0) {
5182
- _key = keys[i];
5001
+ while (i2-- > 0) {
5002
+ _key = keys[i2];
5183
5003
  if (key === _key.toLowerCase()) {
5184
5004
  return _key;
5185
5005
  }
@@ -5206,20 +5026,20 @@ function merge() {
5206
5026
  result[targetKey] = val;
5207
5027
  }
5208
5028
  };
5209
- for (let i = 0, l2 = arguments.length; i < l2; i++) {
5210
- arguments[i] && forEach(arguments[i], assignValue);
5029
+ for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
5030
+ arguments[i2] && forEach(arguments[i2], assignValue);
5211
5031
  }
5212
5032
  return result;
5213
5033
  }
5214
- const extend = (a2, b2, thisArg, { allOwnKeys } = {}) => {
5034
+ const extend = (a, b2, thisArg, { allOwnKeys } = {}) => {
5215
5035
  forEach(b2, (val, key) => {
5216
5036
  if (thisArg && isFunction$1(val)) {
5217
- a2[key] = bind(val, thisArg);
5037
+ a[key] = bind(val, thisArg);
5218
5038
  } else {
5219
- a2[key] = val;
5039
+ a[key] = val;
5220
5040
  }
5221
5041
  }, { allOwnKeys });
5222
- return a2;
5042
+ return a;
5223
5043
  };
5224
5044
  const stripBOM = (content) => {
5225
5045
  if (content.charCodeAt(0) === 65279) {
@@ -5237,16 +5057,16 @@ const inherits = (constructor, superConstructor, props, descriptors2) => {
5237
5057
  };
5238
5058
  const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
5239
5059
  let props;
5240
- let i;
5060
+ let i2;
5241
5061
  let prop;
5242
5062
  const merged = {};
5243
5063
  destObj = destObj || {};
5244
5064
  if (sourceObj == null) return destObj;
5245
5065
  do {
5246
5066
  props = Object.getOwnPropertyNames(sourceObj);
5247
- i = props.length;
5248
- while (i-- > 0) {
5249
- prop = props[i];
5067
+ i2 = props.length;
5068
+ while (i2-- > 0) {
5069
+ prop = props[i2];
5250
5070
  if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
5251
5071
  destObj[prop] = sourceObj[prop];
5252
5072
  merged[prop] = true;
@@ -5268,11 +5088,11 @@ const endsWith = (str, searchString, position) => {
5268
5088
  const toArray = (thing) => {
5269
5089
  if (!thing) return null;
5270
5090
  if (isArray(thing)) return thing;
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];
5091
+ let i2 = thing.length;
5092
+ if (!isNumber(i2)) return null;
5093
+ const arr = new Array(i2);
5094
+ while (i2-- > 0) {
5095
+ arr[i2] = thing[i2];
5276
5096
  }
5277
5097
  return arr;
5278
5098
  };
@@ -5302,7 +5122,7 @@ const isHTMLForm = kindOfTest("HTMLFormElement");
5302
5122
  const toCamelCase = (str) => {
5303
5123
  return str.toLowerCase().replace(
5304
5124
  /[-_\s]([a-z\d])(\w*)/g,
5305
- function replacer(m, p1, p2) {
5125
+ function replacer(m2, p1, p2) {
5306
5126
  return p1.toUpperCase() + p2;
5307
5127
  }
5308
5128
  );
@@ -5359,7 +5179,7 @@ function isSpecCompliantForm(thing) {
5359
5179
  }
5360
5180
  const toJSONObject = (obj) => {
5361
5181
  const stack = new Array(10);
5362
- const visit = (source, i) => {
5182
+ const visit = (source, i2) => {
5363
5183
  if (isObject(source)) {
5364
5184
  if (stack.indexOf(source) >= 0) {
5365
5185
  return;
@@ -5368,13 +5188,13 @@ const toJSONObject = (obj) => {
5368
5188
  return source;
5369
5189
  }
5370
5190
  if (!("toJSON" in source)) {
5371
- stack[i] = source;
5191
+ stack[i2] = source;
5372
5192
  const target = isArray(source) ? [] : {};
5373
5193
  forEach(source, (value, key) => {
5374
- const reducedValue = visit(value, i + 1);
5194
+ const reducedValue = visit(value, i2 + 1);
5375
5195
  !isUndefined(reducedValue) && (target[key] = reducedValue);
5376
5196
  });
5377
- stack[i] = void 0;
5197
+ stack[i2] = void 0;
5378
5198
  return target;
5379
5199
  }
5380
5200
  }
@@ -5550,9 +5370,9 @@ function removeBrackets(key) {
5550
5370
  }
5551
5371
  function renderKey(path, key, dots) {
5552
5372
  if (!path) return key;
5553
- return path.concat(key).map(function each(token, i) {
5373
+ return path.concat(key).map(function each(token, i2) {
5554
5374
  token = removeBrackets(token);
5555
- return !dots && i ? "[" + token + "]" : token;
5375
+ return !dots && i2 ? "[" + token + "]" : token;
5556
5376
  }).join(dots ? "." : "");
5557
5377
  }
5558
5378
  function isFlatArray(arr) {
@@ -5831,11 +5651,11 @@ function parsePropPath(name) {
5831
5651
  function arrayToObject(arr) {
5832
5652
  const obj = {};
5833
5653
  const keys = Object.keys(arr);
5834
- let i;
5654
+ let i2;
5835
5655
  const len = keys.length;
5836
5656
  let key;
5837
- for (i = 0; i < len; i++) {
5838
- key = keys[i];
5657
+ for (i2 = 0; i2 < len; i2++) {
5658
+ key = keys[i2];
5839
5659
  obj[key] = arr[key];
5840
5660
  }
5841
5661
  return obj;
@@ -6002,11 +5822,11 @@ const parseHeaders = (rawHeaders) => {
6002
5822
  const parsed = {};
6003
5823
  let key;
6004
5824
  let val;
6005
- let i;
5825
+ let i2;
6006
5826
  rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
6007
- i = line.indexOf(":");
6008
- key = line.substring(0, i).trim().toLowerCase();
6009
- val = line.substring(i + 1).trim();
5827
+ i2 = line.indexOf(":");
5828
+ key = line.substring(0, i2).trim().toLowerCase();
5829
+ val = line.substring(i2 + 1).trim();
6010
5830
  if (!key || parsed[key] && ignoreDuplicateOf[key]) {
6011
5831
  return;
6012
5832
  }
@@ -6160,10 +5980,10 @@ let AxiosHeaders$1 = class AxiosHeaders {
6160
5980
  }
6161
5981
  clear(matcher) {
6162
5982
  const keys = Object.keys(this);
6163
- let i = keys.length;
5983
+ let i2 = keys.length;
6164
5984
  let deleted = false;
6165
- while (i--) {
6166
- const key = keys[i];
5985
+ while (i2--) {
5986
+ const key = keys[i2];
6167
5987
  if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
6168
5988
  delete this[key];
6169
5989
  deleted = true;
@@ -6303,11 +6123,11 @@ function speedometer(samplesCount, min) {
6303
6123
  }
6304
6124
  bytes[head] = chunkLength;
6305
6125
  timestamps[head] = now;
6306
- let i = tail;
6126
+ let i2 = tail;
6307
6127
  let bytesCount = 0;
6308
- while (i !== head) {
6309
- bytesCount += bytes[i++];
6310
- i = i % samplesCount;
6128
+ while (i2 !== head) {
6129
+ bytesCount += bytes[i2++];
6130
+ i2 = i2 % samplesCount;
6311
6131
  }
6312
6132
  head = (head + 1) % samplesCount;
6313
6133
  if (head === tail) {
@@ -6463,30 +6283,30 @@ function mergeConfig$1(config1, config2) {
6463
6283
  }
6464
6284
  return source;
6465
6285
  }
6466
- function mergeDeepProperties(a2, b2, prop, caseless) {
6286
+ function mergeDeepProperties(a, b2, prop, caseless) {
6467
6287
  if (!utils$1.isUndefined(b2)) {
6468
- return getMergedValue(a2, b2, prop, caseless);
6469
- } else if (!utils$1.isUndefined(a2)) {
6470
- return getMergedValue(void 0, a2, prop, caseless);
6288
+ return getMergedValue(a, b2, prop, caseless);
6289
+ } else if (!utils$1.isUndefined(a)) {
6290
+ return getMergedValue(void 0, a, prop, caseless);
6471
6291
  }
6472
6292
  }
6473
- function valueFromConfig2(a2, b2) {
6293
+ function valueFromConfig2(a, b2) {
6474
6294
  if (!utils$1.isUndefined(b2)) {
6475
6295
  return getMergedValue(void 0, b2);
6476
6296
  }
6477
6297
  }
6478
- function defaultToConfig2(a2, b2) {
6298
+ function defaultToConfig2(a, b2) {
6479
6299
  if (!utils$1.isUndefined(b2)) {
6480
6300
  return getMergedValue(void 0, b2);
6481
- } else if (!utils$1.isUndefined(a2)) {
6482
- return getMergedValue(void 0, a2);
6301
+ } else if (!utils$1.isUndefined(a)) {
6302
+ return getMergedValue(void 0, a);
6483
6303
  }
6484
6304
  }
6485
- function mergeDirectKeys(a2, b2, prop) {
6305
+ function mergeDirectKeys(a, b2, prop) {
6486
6306
  if (prop in config2) {
6487
- return getMergedValue(a2, b2);
6307
+ return getMergedValue(a, b2);
6488
6308
  } else if (prop in config1) {
6489
- return getMergedValue(void 0, a2);
6309
+ return getMergedValue(void 0, a);
6490
6310
  }
6491
6311
  }
6492
6312
  const mergeMap = {
@@ -6518,7 +6338,7 @@ function mergeConfig$1(config1, config2) {
6518
6338
  socketPath: defaultToConfig2,
6519
6339
  responseEncoding: defaultToConfig2,
6520
6340
  validateStatus: mergeDirectKeys,
6521
- headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true)
6341
+ headers: (a, b2, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b2), prop, true)
6522
6342
  };
6523
6343
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
6524
6344
  const merge2 = mergeMap[prop] || mergeDeepProperties;
@@ -6995,11 +6815,11 @@ const getFetch = (config2) => {
6995
6815
  Response,
6996
6816
  fetch2
6997
6817
  ];
6998
- let len = seeds.length, i = len, seed, target, map = seedCache;
6999
- while (i--) {
7000
- seed = seeds[i];
6818
+ let len = seeds.length, i2 = len, seed, target, map = seedCache;
6819
+ while (i2--) {
6820
+ seed = seeds[i2];
7001
6821
  target = map.get(seed);
7002
- target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
6822
+ target === void 0 && map.set(seed, target = i2 ? /* @__PURE__ */ new Map() : factory(env));
7003
6823
  map = target;
7004
6824
  }
7005
6825
  return target;
@@ -7029,8 +6849,8 @@ function getAdapter$1(adapters2, config2) {
7029
6849
  let nameOrAdapter;
7030
6850
  let adapter;
7031
6851
  const rejectedReasons = {};
7032
- for (let i = 0; i < length; i++) {
7033
- nameOrAdapter = adapters2[i];
6852
+ for (let i2 = 0; i2 < length; i2++) {
6853
+ nameOrAdapter = adapters2[i2];
7034
6854
  let id;
7035
6855
  adapter = nameOrAdapter;
7036
6856
  if (!isResolvedHandle(nameOrAdapter)) {
@@ -7042,15 +6862,15 @@ function getAdapter$1(adapters2, config2) {
7042
6862
  if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config2)))) {
7043
6863
  break;
7044
6864
  }
7045
- rejectedReasons[id || "#" + i] = adapter;
6865
+ rejectedReasons[id || "#" + i2] = adapter;
7046
6866
  }
7047
6867
  if (!adapter) {
7048
6868
  const reasons = Object.entries(rejectedReasons).map(
7049
6869
  ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
7050
6870
  );
7051
- let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
6871
+ let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
7052
6872
  throw new AxiosError$1(
7053
- `There is no suitable adapter to dispatch the request ` + s,
6873
+ `There is no suitable adapter to dispatch the request ` + s2,
7054
6874
  "ERR_NOT_SUPPORT"
7055
6875
  );
7056
6876
  }
@@ -7113,9 +6933,9 @@ function dispatchRequest(config2) {
7113
6933
  }
7114
6934
  const VERSION$1 = "1.13.2";
7115
6935
  const validators$1 = {};
7116
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
6936
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => {
7117
6937
  validators$1[type] = function validator2(thing) {
7118
- return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
6938
+ return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type;
7119
6939
  };
7120
6940
  });
7121
6941
  const deprecatedWarnings = {};
@@ -7153,9 +6973,9 @@ function assertOptions(options, schema, allowUnknown) {
7153
6973
  throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
7154
6974
  }
7155
6975
  const keys = Object.keys(options);
7156
- let i = keys.length;
7157
- while (i-- > 0) {
7158
- const opt = keys[i];
6976
+ let i2 = keys.length;
6977
+ while (i2-- > 0) {
6978
+ const opt = keys[i2];
7159
6979
  const validator2 = schema[opt];
7160
6980
  if (validator2) {
7161
6981
  const value = options[opt];
@@ -7275,7 +7095,7 @@ let Axios$1 = class Axios {
7275
7095
  responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
7276
7096
  });
7277
7097
  let promise;
7278
- let i = 0;
7098
+ let i2 = 0;
7279
7099
  let len;
7280
7100
  if (!synchronousRequestInterceptors) {
7281
7101
  const chain = [dispatchRequest.bind(this), void 0];
@@ -7283,16 +7103,16 @@ let Axios$1 = class Axios {
7283
7103
  chain.push(...responseInterceptorChain);
7284
7104
  len = chain.length;
7285
7105
  promise = Promise.resolve(config2);
7286
- while (i < len) {
7287
- promise = promise.then(chain[i++], chain[i++]);
7106
+ while (i2 < len) {
7107
+ promise = promise.then(chain[i2++], chain[i2++]);
7288
7108
  }
7289
7109
  return promise;
7290
7110
  }
7291
7111
  len = requestInterceptorChain.length;
7292
7112
  let newConfig = config2;
7293
- while (i < len) {
7294
- const onFulfilled = requestInterceptorChain[i++];
7295
- const onRejected = requestInterceptorChain[i++];
7113
+ while (i2 < len) {
7114
+ const onFulfilled = requestInterceptorChain[i2++];
7115
+ const onRejected = requestInterceptorChain[i2++];
7296
7116
  try {
7297
7117
  newConfig = onFulfilled(newConfig);
7298
7118
  } catch (error) {
@@ -7305,10 +7125,10 @@ let Axios$1 = class Axios {
7305
7125
  } catch (error) {
7306
7126
  return Promise.reject(error);
7307
7127
  }
7308
- i = 0;
7128
+ i2 = 0;
7309
7129
  len = responseInterceptorChain.length;
7310
- while (i < len) {
7311
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
7130
+ while (i2 < len) {
7131
+ promise = promise.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]);
7312
7132
  }
7313
7133
  return promise;
7314
7134
  }
@@ -7355,9 +7175,9 @@ let CancelToken$1 = class CancelToken {
7355
7175
  const token = this;
7356
7176
  this.promise.then((cancel) => {
7357
7177
  if (!token._listeners) return;
7358
- let i = token._listeners.length;
7359
- while (i-- > 0) {
7360
- token._listeners[i](cancel);
7178
+ let i2 = token._listeners.length;
7179
+ while (i2-- > 0) {
7180
+ token._listeners[i2](cancel);
7361
7181
  }
7362
7182
  token._listeners = null;
7363
7183
  });
@@ -7577,104 +7397,104 @@ function tryStringify(o2) {
7577
7397
  }
7578
7398
  }
7579
7399
  var quickFormatUnescaped = format$1;
7580
- function format$1(f, args, opts) {
7400
+ function format$1(f2, args, opts) {
7581
7401
  var ss = opts && opts.stringify || tryStringify;
7582
7402
  var offset = 1;
7583
- if (typeof f === "object" && f !== null) {
7403
+ if (typeof f2 === "object" && f2 !== null) {
7584
7404
  var len = args.length + offset;
7585
- if (len === 1) return f;
7405
+ if (len === 1) return f2;
7586
7406
  var objects = new Array(len);
7587
- objects[0] = ss(f);
7407
+ objects[0] = ss(f2);
7588
7408
  for (var index2 = 1; index2 < len; index2++) {
7589
7409
  objects[index2] = ss(args[index2]);
7590
7410
  }
7591
7411
  return objects.join(" ");
7592
7412
  }
7593
- if (typeof f !== "string") {
7594
- return f;
7413
+ if (typeof f2 !== "string") {
7414
+ return f2;
7595
7415
  }
7596
7416
  var argLen = args.length;
7597
- if (argLen === 0) return f;
7417
+ if (argLen === 0) return f2;
7598
7418
  var str = "";
7599
- var a2 = 1 - offset;
7419
+ var a = 1 - offset;
7600
7420
  var lastPos = -1;
7601
- var flen = f && f.length || 0;
7602
- for (var i = 0; i < flen; ) {
7603
- if (f.charCodeAt(i) === 37 && i + 1 < flen) {
7421
+ var flen = f2 && f2.length || 0;
7422
+ for (var i2 = 0; i2 < flen; ) {
7423
+ if (f2.charCodeAt(i2) === 37 && i2 + 1 < flen) {
7604
7424
  lastPos = lastPos > -1 ? lastPos : 0;
7605
- switch (f.charCodeAt(i + 1)) {
7425
+ switch (f2.charCodeAt(i2 + 1)) {
7606
7426
  case 100:
7607
7427
  case 102:
7608
- if (a2 >= argLen)
7428
+ if (a >= argLen)
7609
7429
  break;
7610
- if (args[a2] == null) break;
7611
- if (lastPos < i)
7612
- str += f.slice(lastPos, i);
7613
- str += Number(args[a2]);
7614
- lastPos = i + 2;
7615
- i++;
7430
+ if (args[a] == null) break;
7431
+ if (lastPos < i2)
7432
+ str += f2.slice(lastPos, i2);
7433
+ str += Number(args[a]);
7434
+ lastPos = i2 + 2;
7435
+ i2++;
7616
7436
  break;
7617
7437
  case 105:
7618
- if (a2 >= argLen)
7438
+ if (a >= argLen)
7619
7439
  break;
7620
- if (args[a2] == null) break;
7621
- if (lastPos < i)
7622
- str += f.slice(lastPos, i);
7623
- str += Math.floor(Number(args[a2]));
7624
- lastPos = i + 2;
7625
- i++;
7440
+ if (args[a] == null) break;
7441
+ if (lastPos < i2)
7442
+ str += f2.slice(lastPos, i2);
7443
+ str += Math.floor(Number(args[a]));
7444
+ lastPos = i2 + 2;
7445
+ i2++;
7626
7446
  break;
7627
7447
  case 79:
7628
7448
  case 111:
7629
7449
  case 106:
7630
- if (a2 >= argLen)
7450
+ if (a >= argLen)
7631
7451
  break;
7632
- if (args[a2] === void 0) break;
7633
- if (lastPos < i)
7634
- str += f.slice(lastPos, i);
7635
- var type = typeof args[a2];
7452
+ if (args[a] === void 0) break;
7453
+ if (lastPos < i2)
7454
+ str += f2.slice(lastPos, i2);
7455
+ var type = typeof args[a];
7636
7456
  if (type === "string") {
7637
- str += "'" + args[a2] + "'";
7638
- lastPos = i + 2;
7639
- i++;
7457
+ str += "'" + args[a] + "'";
7458
+ lastPos = i2 + 2;
7459
+ i2++;
7640
7460
  break;
7641
7461
  }
7642
7462
  if (type === "function") {
7643
- str += args[a2].name || "<anonymous>";
7644
- lastPos = i + 2;
7645
- i++;
7463
+ str += args[a].name || "<anonymous>";
7464
+ lastPos = i2 + 2;
7465
+ i2++;
7646
7466
  break;
7647
7467
  }
7648
- str += ss(args[a2]);
7649
- lastPos = i + 2;
7650
- i++;
7468
+ str += ss(args[a]);
7469
+ lastPos = i2 + 2;
7470
+ i2++;
7651
7471
  break;
7652
7472
  case 115:
7653
- if (a2 >= argLen)
7473
+ if (a >= argLen)
7654
7474
  break;
7655
- if (lastPos < i)
7656
- str += f.slice(lastPos, i);
7657
- str += String(args[a2]);
7658
- lastPos = i + 2;
7659
- i++;
7475
+ if (lastPos < i2)
7476
+ str += f2.slice(lastPos, i2);
7477
+ str += String(args[a]);
7478
+ lastPos = i2 + 2;
7479
+ i2++;
7660
7480
  break;
7661
7481
  case 37:
7662
- if (lastPos < i)
7663
- str += f.slice(lastPos, i);
7482
+ if (lastPos < i2)
7483
+ str += f2.slice(lastPos, i2);
7664
7484
  str += "%";
7665
- lastPos = i + 2;
7666
- i++;
7667
- a2--;
7485
+ lastPos = i2 + 2;
7486
+ i2++;
7487
+ a--;
7668
7488
  break;
7669
7489
  }
7670
- ++a2;
7490
+ ++a;
7671
7491
  }
7672
- ++i;
7492
+ ++i2;
7673
7493
  }
7674
7494
  if (lastPos === -1)
7675
- return f;
7495
+ return f2;
7676
7496
  else if (lastPos < flen) {
7677
- str += f.slice(lastPos);
7497
+ str += f2.slice(lastPos);
7678
7498
  }
7679
7499
  return str;
7680
7500
  }
@@ -7939,7 +7759,7 @@ function createWrap(self2, opts, rootLogger, level) {
7939
7759
  const ts = opts.timestamp();
7940
7760
  const args = new Array(arguments.length);
7941
7761
  const proto = Object.getPrototypeOf && Object.getPrototypeOf(this) === _console ? _console : this;
7942
- for (var i = 0; i < args.length; i++) args[i] = arguments[i];
7762
+ for (var i2 = 0; i2 < args.length; i2++) args[i2] = arguments[i2];
7943
7763
  var argsIsSerialized = false;
7944
7764
  if (opts.serialize) {
7945
7765
  applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize);
@@ -8005,13 +7825,13 @@ function asObject(logger2, level, args, ts, opts) {
8005
7825
  }
8006
7826
  }
8007
7827
  function applySerializers(args, serialize, serializers, stdErrSerialize) {
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]) {
7828
+ for (const i2 in args) {
7829
+ if (stdErrSerialize && args[i2] instanceof Error) {
7830
+ args[i2] = pino.stdSerializers.err(args[i2]);
7831
+ } else if (typeof args[i2] === "object" && !Array.isArray(args[i2]) && serialize) {
7832
+ for (const k in args[i2]) {
8013
7833
  if (serialize.indexOf(k) > -1 && k in serializers) {
8014
- args[i][k] = serializers[k](args[i][k]);
7834
+ args[i2][k] = serializers[k](args[i2][k]);
8015
7835
  }
8016
7836
  }
8017
7837
  }
@@ -8074,8 +7894,8 @@ function getTimeFunction(opts) {
8074
7894
  function mock() {
8075
7895
  return {};
8076
7896
  }
8077
- function passthrough(a2) {
8078
- return a2;
7897
+ function passthrough(a) {
7898
+ return a;
8079
7899
  }
8080
7900
  function noop() {
8081
7901
  }
@@ -8235,7 +8055,7 @@ class RateLimiter {
8235
8055
  return Promise.race([
8236
8056
  fn(),
8237
8057
  new Promise(
8238
- (_2, reject) => setTimeout(
8058
+ (_, reject) => setTimeout(
8239
8059
  () => reject(new Error(`Request timed out after ${timeoutMs}ms`)),
8240
8060
  timeoutMs
8241
8061
  )
@@ -8250,12 +8070,15 @@ class RateLimiter {
8250
8070
  }
8251
8071
  }
8252
8072
  const limiters = /* @__PURE__ */ new Map();
8253
- limiters.set("groww", new RateLimiter({
8254
- maxPerSecond: 10,
8255
- maxPerMinute: 300,
8256
- maxConcurrency: 10,
8257
- requestTimeoutMs: 3e4
8258
- }));
8073
+ limiters.set(
8074
+ "groww",
8075
+ new RateLimiter({
8076
+ maxPerSecond: 10,
8077
+ maxPerMinute: 300,
8078
+ maxConcurrency: 7,
8079
+ requestTimeoutMs: 3e4
8080
+ })
8081
+ );
8259
8082
  const growwRateLimiter = limiters.get("groww");
8260
8083
  dayjs.extend(utc);
8261
8084
  dayjs.extend(timezone);
@@ -8272,7 +8095,7 @@ const fetchCandles = ({
8272
8095
  );
8273
8096
  }
8274
8097
  try {
8275
- const validatedParams = Ce.getGrowwHistoricalCandles.query.parse(params);
8098
+ const validatedParams = x.getGrowwHistoricalCandles.query.parse(params);
8276
8099
  const headers = {
8277
8100
  Authorization: `Bearer ${developerToken}`
8278
8101
  };
@@ -8287,7 +8110,7 @@ const fetchCandles = ({
8287
8110
  }
8288
8111
  const response = await growwRateLimiter.execute(
8289
8112
  () => axios.get(
8290
- `${apiDomain}/v1/developer/historical-candles`,
8113
+ `${apiDomain}/v1/candles`,
8291
8114
  {
8292
8115
  params: validatedParams,
8293
8116
  headers
@@ -8311,9 +8134,7 @@ dayjs.extend(timezone);
8311
8134
  const fetchQuote = ({
8312
8135
  developerToken,
8313
8136
  apiDomain,
8314
- runId,
8315
- currentTimestamp,
8316
- currentTimezone = "Asia/Kolkata"
8137
+ runId
8317
8138
  }) => async (params) => {
8318
8139
  if (!developerToken) {
8319
8140
  throw new Error(
@@ -8321,23 +8142,20 @@ const fetchQuote = ({
8321
8142
  );
8322
8143
  }
8323
8144
  try {
8324
- const validatedParams = Ce.getGrowwQuote.query.parse(params);
8145
+ const validatedParams = X.getGrowwQuote.query.parse(params);
8325
8146
  const headers = {
8326
8147
  Authorization: `Bearer ${developerToken}`
8327
8148
  };
8328
8149
  if (runId) {
8329
8150
  headers["X-Run-Id"] = runId;
8330
8151
  }
8331
- if (currentTimestamp) {
8332
- headers["X-Current-Timestamp"] = currentTimestamp;
8333
- }
8334
- if (currentTimezone) {
8335
- headers["X-Current-Timezone"] = currentTimezone;
8336
- }
8337
- const response = await axios.get(`${apiDomain}/v1/developer/quote`, {
8338
- params: validatedParams,
8339
- headers
8340
- });
8152
+ const response = await axios.get(
8153
+ `${apiDomain}/v1/quote`,
8154
+ {
8155
+ params: validatedParams,
8156
+ headers
8157
+ }
8158
+ );
8341
8159
  return response.data.data;
8342
8160
  } catch (error) {
8343
8161
  if (axios.isAxiosError(error)) {
@@ -8350,51 +8168,6 @@ const fetchQuote = ({
8350
8168
  };
8351
8169
  dayjs.extend(utc);
8352
8170
  dayjs.extend(timezone);
8353
- const fetchQuoteTimeline = ({
8354
- developerToken,
8355
- apiDomain,
8356
- runId,
8357
- currentTimestamp,
8358
- currentTimezone = "Asia/Kolkata"
8359
- }) => async (symbol, end_datetime) => {
8360
- if (!developerToken) {
8361
- throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8362
- }
8363
- try {
8364
- const validatedParams = Ce.getGrowwQuoteTimeline.query.parse({
8365
- symbol,
8366
- end_datetime
8367
- });
8368
- const headers = {
8369
- Authorization: `Bearer ${developerToken}`
8370
- };
8371
- if (runId) {
8372
- headers["X-Run-Id"] = runId;
8373
- }
8374
- if (currentTimestamp) {
8375
- headers["X-Current-Timestamp"] = currentTimestamp;
8376
- }
8377
- if (currentTimezone) {
8378
- headers["X-Current-Timezone"] = currentTimezone;
8379
- }
8380
- const response = await axios.get(`${apiDomain}/v1/developer/quote-timeline`, {
8381
- params: validatedParams,
8382
- headers
8383
- });
8384
- return response.data.data.quoteTimeline;
8385
- } catch (error) {
8386
- if (axios.isAxiosError(error)) {
8387
- logger.error(`Error fetching quote timeline for ${symbol}: ${error.message}`);
8388
- throw new Error(
8389
- `Failed to fetch quote timeline: ${error.response?.data?.message || error.message}`
8390
- );
8391
- }
8392
- logger.error(`Unexpected error fetching quote timeline: ${error}`);
8393
- throw error;
8394
- }
8395
- };
8396
- dayjs.extend(utc);
8397
- dayjs.extend(timezone);
8398
8171
  const fetchShortlist = ({
8399
8172
  developerToken,
8400
8173
  apiDomain,
@@ -8408,7 +8181,7 @@ const fetchShortlist = ({
8408
8181
  );
8409
8182
  }
8410
8183
  try {
8411
- const validatedParams = Re.getLists.query.parse(queryParams);
8184
+ const validatedParams = W.getLists.query.parse(queryParams);
8412
8185
  const headers = {
8413
8186
  Authorization: `Bearer ${developerToken}`
8414
8187
  };
@@ -8421,10 +8194,13 @@ const fetchShortlist = ({
8421
8194
  if (currentTimezone) {
8422
8195
  headers["X-Current-Timezone"] = currentTimezone;
8423
8196
  }
8424
- const response = await axios.get(`${apiDomain}/v1/developer/lists`, {
8425
- params: validatedParams,
8426
- headers
8427
- });
8197
+ const response = await axios.get(
8198
+ `${apiDomain}/v1/lists`,
8199
+ {
8200
+ params: validatedParams,
8201
+ headers
8202
+ }
8203
+ );
8428
8204
  return response.data.data;
8429
8205
  } catch (error) {
8430
8206
  if (axios.isAxiosError(error)) {
@@ -8452,7 +8228,7 @@ const fetchShortlistPersistence = ({
8452
8228
  );
8453
8229
  }
8454
8230
  try {
8455
- const validatedParams = ke.getShortlistPersistence.query.parse(queryParams);
8231
+ const validatedParams = W.getShortlistPersistence.query.parse(queryParams);
8456
8232
  const headers = {
8457
8233
  Authorization: `Bearer ${developerToken}`
8458
8234
  };
@@ -8465,7 +8241,7 @@ const fetchShortlistPersistence = ({
8465
8241
  if (currentTimezone) {
8466
8242
  headers["X-Current-Timezone"] = currentTimezone;
8467
8243
  }
8468
- const response = await axios.get(`${apiDomain}/v1/developer/shortlists/persistence`, {
8244
+ const response = await axios.get(`${apiDomain}/v1/lists/persistence`, {
8469
8245
  params: validatedParams,
8470
8246
  headers
8471
8247
  });
@@ -8483,93 +8259,7 @@ const fetchShortlistPersistence = ({
8483
8259
  throw error;
8484
8260
  }
8485
8261
  };
8486
- dayjs.extend(utc);
8487
- dayjs.extend(timezone);
8488
- const fetchNiftyQuote = ({
8489
- developerToken,
8490
- apiDomain,
8491
- runId,
8492
- currentTimestamp,
8493
- currentTimezone = "Asia/Kolkata"
8494
- }) => async (params) => {
8495
- if (!developerToken) {
8496
- throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8497
- }
8498
- try {
8499
- const validatedParams = Ce.getGrowwNiftyQuote.query.parse(params);
8500
- const headers = {
8501
- Authorization: `Bearer ${developerToken}`
8502
- };
8503
- if (runId) {
8504
- headers["X-Run-Id"] = runId;
8505
- }
8506
- if (currentTimestamp) {
8507
- headers["X-Current-Timestamp"] = currentTimestamp;
8508
- }
8509
- if (currentTimezone) {
8510
- headers["X-Current-Timezone"] = currentTimezone;
8511
- }
8512
- const response = await axios.get(`${apiDomain}/v1/developer/nifty`, {
8513
- params: validatedParams,
8514
- headers
8515
- });
8516
- return response.data.data;
8517
- } catch (error) {
8518
- if (axios.isAxiosError(error)) {
8519
- logger.error(`Error fetching NIFTY quote: ${error.message}`);
8520
- throw new Error(
8521
- `Failed to fetch NIFTY quote: ${error.response?.data?.message || error.message}`
8522
- );
8523
- }
8524
- logger.error(`Unexpected error fetching NIFTY quote: ${error}`);
8525
- throw error;
8526
- }
8527
- };
8528
- dayjs.extend(utc);
8529
- dayjs.extend(timezone);
8530
- const fetchNiftyQuoteTimeline = ({
8531
- developerToken,
8532
- apiDomain,
8533
- runId,
8534
- currentTimestamp,
8535
- currentTimezone = "Asia/Kolkata"
8536
- }) => async (end_datetime) => {
8537
- if (!developerToken) {
8538
- throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8539
- }
8540
- try {
8541
- const validatedParams = Ce.getGrowwNiftyQuoteTimeline.query.parse({
8542
- end_datetime
8543
- });
8544
- const headers = {
8545
- Authorization: `Bearer ${developerToken}`
8546
- };
8547
- if (runId) {
8548
- headers["X-Run-Id"] = runId;
8549
- }
8550
- if (currentTimestamp) {
8551
- headers["X-Current-Timestamp"] = currentTimestamp;
8552
- }
8553
- if (currentTimezone) {
8554
- headers["X-Current-Timezone"] = currentTimezone;
8555
- }
8556
- const response = await axios.get(`${apiDomain}/v1/developer/nifty-timeline`, {
8557
- params: validatedParams,
8558
- headers
8559
- });
8560
- return response.data.data.niftyTimeline;
8561
- } catch (error) {
8562
- if (axios.isAxiosError(error)) {
8563
- logger.error(`Error fetching NIFTY timeline: ${error.message}`);
8564
- throw new Error(
8565
- `Failed to fetch NIFTY timeline: ${error.response?.data?.message || error.message}`
8566
- );
8567
- }
8568
- logger.error(`Unexpected error fetching NIFTY timeline: ${error}`);
8569
- throw error;
8570
- }
8571
- };
8572
- const fetchAvailableDates = ({
8262
+ const fetchDates = ({
8573
8263
  developerToken,
8574
8264
  apiDomain,
8575
8265
  runId,
@@ -8594,9 +8284,12 @@ const fetchAvailableDates = ({
8594
8284
  if (currentTimezone) {
8595
8285
  headers["X-Current-Timezone"] = currentTimezone;
8596
8286
  }
8597
- const response = await axios.get(`${apiDomain}/v1/developer/available-dates`, {
8598
- headers
8599
- });
8287
+ const response = await axios.get(
8288
+ `${apiDomain}/v1/dates`,
8289
+ {
8290
+ headers
8291
+ }
8292
+ );
8600
8293
  return response.data.data;
8601
8294
  } catch (error) {
8602
8295
  if (axios.isAxiosError(error)) {
@@ -8634,9 +8327,12 @@ const fetchHolidays = ({
8634
8327
  if (currentTimezone) {
8635
8328
  headers["X-Current-Timezone"] = currentTimezone;
8636
8329
  }
8637
- const response = await axios.get(`${apiDomain}/v1/developer/holidays`, {
8638
- headers
8639
- });
8330
+ const response = await axios.get(
8331
+ `${apiDomain}/v1/holidays`,
8332
+ {
8333
+ headers
8334
+ }
8335
+ );
8640
8336
  return response.data.data;
8641
8337
  } catch (error) {
8642
8338
  if (axios.isAxiosError(error)) {
@@ -8727,8 +8423,11 @@ const placeOrder = ({ runId, apiClient }) => async (data) => {
8727
8423
  try {
8728
8424
  await retryWithBackoff(
8729
8425
  async () => {
8730
- const validatedData = Le.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8731
- await apiClient.post(`/v1/dashboard/runs/${runId}/orders`, validatedData);
8426
+ const validatedData = _e.createOrder.body.parse(data);
8427
+ await apiClient.post(
8428
+ `/v1/runs/${runId}/orders`,
8429
+ validatedData
8430
+ );
8732
8431
  logger.debug(`Order persisted for ${data.nseSymbol} in runId: ${runId}`);
8733
8432
  },
8734
8433
  3,
@@ -8843,11 +8542,11 @@ var calendar$1 = { exports: {} };
8843
8542
  !function(e, t2) {
8844
8543
  module.exports = t2();
8845
8544
  }(commonjsGlobal, function() {
8846
- return function(e, t2, a2) {
8545
+ return function(e, t2, a) {
8847
8546
  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" };
8848
8547
  t2.prototype.calendar = function(e2, t3) {
8849
- 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];
8850
- return "function" == typeof l2 ? l2.call(this, a2()) : this.format(l2);
8548
+ var n3 = t3 || this.$locale().calendar || d2, o2 = a(e2 || void 0).startOf("d"), s2 = this.diff(o2, "d", true), i2 = "sameElse", f2 = s2 < -6 ? i2 : s2 < -1 ? "lastWeek" : s2 < 0 ? "lastDay" : s2 < 1 ? "sameDay" : s2 < 2 ? "nextDay" : s2 < 7 ? "nextWeek" : i2, l2 = n3[f2] || d2[f2];
8549
+ return "function" == typeof l2 ? l2.call(this, a()) : this.format(l2);
8851
8550
  };
8852
8551
  };
8853
8552
  });
@@ -8862,28 +8561,28 @@ var relativeTime$1 = { exports: {} };
8862
8561
  return function(r2, e, t2) {
8863
8562
  r2 = r2 || {};
8864
8563
  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" };
8865
- function i(r3, e2, t3, o3) {
8564
+ function i2(r3, e2, t3, o3) {
8866
8565
  return n2.fromToBase(r3, e2, t3, o3);
8867
8566
  }
8868
- t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i2, d3, u2) {
8869
- 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) {
8567
+ t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i3, d3, u) {
8568
+ for (var f2, a, s2, l2 = i3.$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" }], m2 = h2.length, c = 0; c < m2; c += 1) {
8870
8569
  var y2 = h2[c];
8871
- y2.d && (f = d3 ? t2(e2).diff(i2, y2.d, true) : i2.diff(e2, y2.d, true));
8872
- var p2 = (r2.rounding || Math.round)(Math.abs(f));
8873
- if (s = f > 0, p2 <= y2.r || !y2.r) {
8570
+ y2.d && (f2 = d3 ? t2(e2).diff(i3, y2.d, true) : i3.diff(e2, y2.d, true));
8571
+ var p2 = (r2.rounding || Math.round)(Math.abs(f2));
8572
+ if (s2 = f2 > 0, p2 <= y2.r || !y2.r) {
8874
8573
  p2 <= 1 && c > 0 && (y2 = h2[c - 1]);
8875
- var v2 = l2[y2.l];
8876
- u2 && (p2 = u2("" + p2)), a2 = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s);
8574
+ var v = l2[y2.l];
8575
+ u && (p2 = u("" + p2)), a = "string" == typeof v ? v.replace("%d", p2) : v(p2, n3, y2.l, s2);
8877
8576
  break;
8878
8577
  }
8879
8578
  }
8880
- if (n3) return a2;
8881
- var M2 = s ? l2.future : l2.past;
8882
- return "function" == typeof M2 ? M2(a2) : M2.replace("%s", a2);
8579
+ if (n3) return a;
8580
+ var M = s2 ? l2.future : l2.past;
8581
+ return "function" == typeof M ? M(a) : M.replace("%s", a);
8883
8582
  }, n2.to = function(r3, e2) {
8884
- return i(r3, e2, this, true);
8583
+ return i2(r3, e2, this, true);
8885
8584
  }, n2.from = function(r3, e2) {
8886
- return i(r3, e2, this);
8585
+ return i2(r3, e2, this);
8887
8586
  };
8888
8587
  var d2 = function(r3) {
8889
8588
  return r3.$u ? t2.utc() : t2();
@@ -9020,69 +8719,15 @@ class GanakaClient {
9020
8719
  const callback = fetchQuote({
9021
8720
  developerToken: this.developerToken,
9022
8721
  apiDomain: this.apiDomain,
9023
- runId: null,
9024
- currentTimestamp: "",
9025
- currentTimezone: "Asia/Kolkata"
9026
- });
9027
- return callback(params);
9028
- }
9029
- /**
9030
- * Fetch quote timeline for a symbol.
9031
- * Given a symbol and an end_datetime, returns the quote timeline for the given date.
9032
- *
9033
- * @param symbol - The symbol to fetch quote timeline for
9034
- * @param end_datetime - End datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
9035
- * @returns Promise resolving to quote timeline data
9036
- */
9037
- async fetchQuoteTimeline(symbol, end_datetime) {
9038
- const callback = fetchQuoteTimeline({
9039
- developerToken: this.developerToken,
9040
- apiDomain: this.apiDomain,
9041
- runId: null,
9042
- currentTimestamp: "",
9043
- currentTimezone: "Asia/Kolkata"
9044
- });
9045
- return callback(symbol, end_datetime);
9046
- }
9047
- /**
9048
- * Fetch NIFTY quote at a specific datetime.
9049
- *
9050
- * @param params - Query parameters for fetching NIFTY quote
9051
- * @param params.datetime - Datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
9052
- * @returns Promise resolving to NIFTY quote data or null
9053
- */
9054
- async fetchNiftyQuote(params) {
9055
- const callback = fetchNiftyQuote({
9056
- developerToken: this.developerToken,
9057
- apiDomain: this.apiDomain,
9058
- runId: null,
9059
- currentTimestamp: "",
9060
- currentTimezone: "Asia/Kolkata"
8722
+ runId: null
9061
8723
  });
9062
8724
  return callback(params);
9063
8725
  }
9064
- /**
9065
- * Fetch NIFTY quote timeline.
9066
- * Given an end_datetime, returns the NIFTY quote timeline for the given date.
9067
- *
9068
- * @param end_datetime - End datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
9069
- * @returns Promise resolving to NIFTY quote timeline data
9070
- */
9071
- async fetchNiftyQuoteTimeline(end_datetime) {
9072
- const callback = fetchNiftyQuoteTimeline({
9073
- developerToken: this.developerToken,
9074
- apiDomain: this.apiDomain,
9075
- runId: null,
9076
- currentTimestamp: "",
9077
- currentTimezone: "Asia/Kolkata"
9078
- });
9079
- return callback(end_datetime);
9080
- }
9081
8726
  /**
9082
8727
  * Fetch shortlist for a specific type and datetime.
9083
8728
  *
9084
8729
  * @param queryParams - Query parameters for fetching shortlist
9085
- * @param queryParams.type - The type of shortlist (e.g., "top-gainers", "top-losers")
8730
+ * @param queryParams.type - The type of shortlist (e.g., "TOP_GAINERS", "VOLUME_SHOCKERS")
9086
8731
  * @param queryParams.datetime - Datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
9087
8732
  * @returns Promise resolving to shortlist data or null
9088
8733
  */
@@ -9106,7 +8751,7 @@ class GanakaClient {
9106
8751
  * over a given period of time.
9107
8752
  *
9108
8753
  * @param queryParams - Query parameters for fetching shortlist persistence
9109
- * @param queryParams.type - The type of shortlist (e.g., "top-gainers", "top-losers")
8754
+ * @param queryParams.type - The type of shortlist (e.g., "TOP_GAINERS", "VOLUME_SHOCKERS")
9110
8755
  * @param queryParams.start_datetime - Start datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
9111
8756
  * @param queryParams.end_datetime - End datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
9112
8757
  * @returns Promise resolving to shortlist persistence data or null
@@ -9122,13 +8767,13 @@ class GanakaClient {
9122
8767
  return callback(queryParams);
9123
8768
  }
9124
8769
  /**
9125
- * Fetch available dates with timestamps.
8770
+ * Fetch dates with data.
9126
8771
  * Returns which dates have data available, grouped by date with all timestamps for each date.
9127
8772
  *
9128
- * @returns Promise resolving to available dates data with dates and timestamps
8773
+ * @returns Promise resolving to dates data with dates and timestamps
9129
8774
  */
9130
- async fetchAvailableDates() {
9131
- const callback = fetchAvailableDates({
8775
+ async fetchDates() {
8776
+ const callback = fetchDates({
9132
8777
  developerToken: this.developerToken,
9133
8778
  apiDomain: this.apiDomain,
9134
8779
  runId: null,
@@ -9188,7 +8833,7 @@ async function ganaka({
9188
8833
  ...tags !== void 0 && { tags }
9189
8834
  };
9190
8835
  try {
9191
- const createRunResponse = await apiClient.post("/v1/dashboard/runs", createRunBody);
8836
+ const createRunResponse = await apiClient.post("/v1/runs", createRunBody);
9192
8837
  if (createRunResponse.data) {
9193
8838
  runId = createRunResponse.data.id;
9194
8839
  logger.debug(`Created run: ${runId}`);
@@ -9224,30 +8869,7 @@ async function ganaka({
9224
8869
  fetchQuote: fetchQuote({
9225
8870
  developerToken,
9226
8871
  apiDomain,
9227
- runId,
9228
- currentTimestamp,
9229
- currentTimezone: "Asia/Kolkata"
9230
- }),
9231
- fetchNiftyQuote: fetchNiftyQuote({
9232
- developerToken,
9233
- apiDomain,
9234
- runId,
9235
- currentTimestamp,
9236
- currentTimezone: "Asia/Kolkata"
9237
- }),
9238
- fetchNiftyQuoteTimeline: fetchNiftyQuoteTimeline({
9239
- developerToken,
9240
- apiDomain,
9241
- runId,
9242
- currentTimestamp,
9243
- currentTimezone: "Asia/Kolkata"
9244
- }),
9245
- fetchQuoteTimeline: fetchQuoteTimeline({
9246
- developerToken,
9247
- apiDomain,
9248
- runId,
9249
- currentTimestamp,
9250
- currentTimezone: "Asia/Kolkata"
8872
+ runId
9251
8873
  }),
9252
8874
  fetchShortlist: fetchShortlist({
9253
8875
  developerToken,
@@ -9263,7 +8885,7 @@ async function ganaka({
9263
8885
  currentTimestamp,
9264
8886
  currentTimezone: "Asia/Kolkata"
9265
8887
  }),
9266
- fetchAvailableDates: fetchAvailableDates({
8888
+ fetchDates: fetchDates({
9267
8889
  developerToken,
9268
8890
  apiDomain,
9269
8891
  runId,
@@ -9283,9 +8905,12 @@ async function ganaka({
9283
8905
  });
9284
8906
  logger.info(`Marking run as completed: ${runId}`);
9285
8907
  try {
9286
- await apiClient.patch(`/v1/dashboard/runs/${runId}`, {
9287
- completed: true
9288
- });
8908
+ await apiClient.patch(
8909
+ `/v1/runs/${runId}`,
8910
+ {
8911
+ completed: true
8912
+ }
8913
+ );
9289
8914
  } catch (error) {
9290
8915
  logger.error(`Failed to mark run as completed: ${error}`);
9291
8916
  }
@@ -9296,7 +8921,9 @@ async function ganaka({
9296
8921
  if (deleteRunAfterCompletion && runId) {
9297
8922
  logger.info(`Deleting run after completion: ${runId}`);
9298
8923
  try {
9299
- await apiClient.delete(`/v1/dashboard/runs/${runId}`);
8924
+ await apiClient.delete(
8925
+ `/v1/runs/${runId}`
8926
+ );
9300
8927
  } catch (error) {
9301
8928
  logger.error(`Failed to delete run: ${error}`);
9302
8929
  }
@@ -9306,7 +8933,7 @@ async function ganaka({
9306
8933
  export {
9307
8934
  GanakaClient,
9308
8935
  ganaka,
9309
- S as growwQuotePayloadSchema,
9310
- r as growwQuoteSchema
8936
+ y as growwQuotePayloadSchema,
8937
+ d as growwQuoteSchema
9311
8938
  };
9312
8939
  //# sourceMappingURL=index.mjs.map