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