@ganaka/sdk 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -326,10 +326,10 @@ function safeExtend(schema, shape) {
326
326
  };
327
327
  return clone(schema, def);
328
328
  }
329
- function merge$1(a, b2) {
330
- const def = mergeDefs(a._zod.def, {
329
+ function merge$1(a2, b2) {
330
+ const def = mergeDefs(a2._zod.def, {
331
331
  get shape() {
332
- const _shape = { ...a._zod.def.shape, ...b2._zod.def.shape };
332
+ const _shape = { ...a2._zod.def.shape, ...b2._zod.def.shape };
333
333
  assignProp(this, "shape", _shape);
334
334
  return _shape;
335
335
  },
@@ -339,7 +339,7 @@ function merge$1(a, b2) {
339
339
  checks: []
340
340
  // delete existing checks
341
341
  });
342
- return clone(a, def);
342
+ return clone(a2, def);
343
343
  }
344
344
  function partial(Class, schema, mask) {
345
345
  const def = mergeDefs(schema._zod.def, {
@@ -1175,10 +1175,10 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1175
1175
  inst["~standard"] = {
1176
1176
  validate: (value) => {
1177
1177
  try {
1178
- const r2 = safeParse$1(inst, value);
1179
- return r2.success ? { value: r2.data } : { issues: r2.error?.issues };
1178
+ const r = safeParse$1(inst, value);
1179
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
1180
1180
  } catch (_2) {
1181
- return safeParseAsync$1(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues });
1181
+ return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
1182
1182
  }
1183
1183
  },
1184
1184
  vendor: "zod",
@@ -1661,11 +1661,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1661
1661
  unrecognized.push(key);
1662
1662
  continue;
1663
1663
  }
1664
- const r2 = _catchall.run({ value: input[key], issues: [] }, ctx);
1665
- if (r2 instanceof Promise) {
1666
- proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input)));
1664
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
1665
+ if (r instanceof Promise) {
1666
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
1667
1667
  } else {
1668
- handlePropertyResult(r2, payload, key, input);
1668
+ handlePropertyResult(r, payload, key, input);
1669
1669
  }
1670
1670
  }
1671
1671
  if (unrecognized.length) {
@@ -1731,11 +1731,11 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1731
1731
  const shape = value.shape;
1732
1732
  for (const key of value.keys) {
1733
1733
  const el = shape[key];
1734
- const r2 = el._zod.run({ value: input[key], issues: [] }, ctx);
1735
- if (r2 instanceof Promise) {
1736
- proms.push(r2.then((r3) => handlePropertyResult(r3, payload, key, input)));
1734
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
1735
+ if (r instanceof Promise) {
1736
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
1737
1737
  } else {
1738
- handlePropertyResult(r2, payload, key, input);
1738
+ handlePropertyResult(r, payload, key, input);
1739
1739
  }
1740
1740
  }
1741
1741
  if (!catchall) {
@@ -1827,7 +1827,7 @@ function handleUnionResults(results, final, inst, ctx) {
1827
1827
  return final;
1828
1828
  }
1829
1829
  }
1830
- const nonaborted = results.filter((r2) => !aborted(r2));
1830
+ const nonaborted = results.filter((r) => !aborted(r));
1831
1831
  if (nonaborted.length === 1) {
1832
1832
  final.value = nonaborted[0].value;
1833
1833
  return nonaborted[0];
@@ -1901,19 +1901,19 @@ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst,
1901
1901
  return handleIntersectionResults(payload, left, right);
1902
1902
  };
1903
1903
  });
1904
- function mergeValues(a, b2) {
1905
- if (a === b2) {
1906
- return { valid: true, data: a };
1904
+ function mergeValues(a2, b2) {
1905
+ if (a2 === b2) {
1906
+ return { valid: true, data: a2 };
1907
1907
  }
1908
- if (a instanceof Date && b2 instanceof Date && +a === +b2) {
1909
- return { valid: true, data: a };
1908
+ if (a2 instanceof Date && b2 instanceof Date && +a2 === +b2) {
1909
+ return { valid: true, data: a2 };
1910
1910
  }
1911
- if (isPlainObject$1(a) && isPlainObject$1(b2)) {
1911
+ if (isPlainObject$1(a2) && isPlainObject$1(b2)) {
1912
1912
  const bKeys = Object.keys(b2);
1913
- const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1914
- const newObj = { ...a, ...b2 };
1913
+ const sharedKeys = Object.keys(a2).filter((key) => bKeys.indexOf(key) !== -1);
1914
+ const newObj = { ...a2, ...b2 };
1915
1915
  for (const key of sharedKeys) {
1916
- const sharedValue = mergeValues(a[key], b2[key]);
1916
+ const sharedValue = mergeValues(a2[key], b2[key]);
1917
1917
  if (!sharedValue.valid) {
1918
1918
  return {
1919
1919
  valid: false,
@@ -1924,13 +1924,13 @@ function mergeValues(a, b2) {
1924
1924
  }
1925
1925
  return { valid: true, data: newObj };
1926
1926
  }
1927
- if (Array.isArray(a) && Array.isArray(b2)) {
1928
- if (a.length !== b2.length) {
1927
+ if (Array.isArray(a2) && Array.isArray(b2)) {
1928
+ if (a2.length !== b2.length) {
1929
1929
  return { valid: false, mergeErrorPath: [] };
1930
1930
  }
1931
1931
  const newArray = [];
1932
- for (let index2 = 0; index2 < a.length; index2++) {
1933
- const itemA = a[index2];
1932
+ for (let index2 = 0; index2 < a2.length; index2++) {
1933
+ const itemA = a2[index2];
1934
1934
  const itemB = b2[index2];
1935
1935
  const sharedValue = mergeValues(itemA, itemB);
1936
1936
  if (!sharedValue.valid) {
@@ -2121,7 +2121,7 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2121
2121
  if (def.innerType._zod.optin === "optional") {
2122
2122
  const result = def.innerType._zod.run(payload, ctx);
2123
2123
  if (result instanceof Promise)
2124
- return result.then((r2) => handleOptionalResult(r2, payload.value));
2124
+ return result.then((r) => handleOptionalResult(r, payload.value));
2125
2125
  return handleOptionalResult(result, payload.value);
2126
2126
  }
2127
2127
  if (payload.value === void 0) {
@@ -2308,11 +2308,11 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2308
2308
  };
2309
2309
  inst._zod.check = (payload) => {
2310
2310
  const input = payload.value;
2311
- const r2 = def.fn(input);
2312
- if (r2 instanceof Promise) {
2313
- return r2.then((r3) => handleRefineResult(r3, payload, input, inst));
2311
+ const r = def.fn(input);
2312
+ if (r instanceof Promise) {
2313
+ return r.then((r2) => handleRefineResult(r2, payload, input, inst));
2314
2314
  }
2315
- handleRefineResult(r2, payload, input, inst);
2315
+ handleRefineResult(r, payload, input, inst);
2316
2316
  return;
2317
2317
  };
2318
2318
  });
@@ -3338,7 +3338,7 @@ const unionProcessor = (schema, ctx, json, params) => {
3338
3338
  };
3339
3339
  const intersectionProcessor = (schema, ctx, json, params) => {
3340
3340
  const def = schema._zod.def;
3341
- const a = process$1(def.left, ctx, {
3341
+ const a2 = process$1(def.left, ctx, {
3342
3342
  ...params,
3343
3343
  path: [...params.path, "allOf", 0]
3344
3344
  });
@@ -3348,7 +3348,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
3348
3348
  });
3349
3349
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
3350
3350
  const allOf = [
3351
- ...isSimpleIntersection(a) ? a.allOf : [a],
3351
+ ...isSimpleIntersection(a2) ? a2.allOf : [a2],
3352
3352
  ...isSimpleIntersection(b2) ? b2.allOf : [b2]
3353
3353
  ];
3354
3354
  json.allOf = allOf;
@@ -4154,14 +4154,14 @@ const g = object({
4154
4154
  volume: number$1().nullable(),
4155
4155
  week_52_high: number$1().nullable(),
4156
4156
  week_52_low: number$1().nullable()
4157
- }), r = object({
4157
+ }), a = object({
4158
4158
  status: _enum(["SUCCESS", "FAILURE"]),
4159
4159
  payload: g
4160
4160
  }), y = object({
4161
4161
  nseSymbol: string(),
4162
4162
  name: string(),
4163
4163
  price: number$1(),
4164
- quoteData: r.nullable().optional()
4164
+ quoteData: a.nullable().optional()
4165
4165
  }), t = object({
4166
4166
  statusCode: number$1(),
4167
4167
  message: string(),
@@ -4188,8 +4188,8 @@ const m = [
4188
4188
  ], n = string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, {
4189
4189
  message: "datetime must be in format YYYY-MM-DDTHH:mm:ss (e.g., 2025-12-26T11:06:00)"
4190
4190
  }).refine(
4191
- (a) => {
4192
- const u = new Date(a);
4191
+ (r) => {
4192
+ const u = new Date(r);
4193
4193
  return !isNaN(u.getTime());
4194
4194
  },
4195
4195
  {
@@ -4198,8 +4198,8 @@ const m = [
4198
4198
  ), i = string().regex(/^\d{4}-\d{2}-\d{2}$/, {
4199
4199
  message: "date must be in format YYYY-MM-DD (e.g., 2025-12-26)"
4200
4200
  }).refine(
4201
- (a) => {
4202
- const u = new Date(a);
4201
+ (r) => {
4202
+ const u = new Date(r);
4203
4203
  return !isNaN(u.getTime());
4204
4204
  },
4205
4205
  {
@@ -4208,14 +4208,14 @@ const m = [
4208
4208
  ), o = string().regex(/^([A-Za-z_]+\/[A-Za-z_]+|[+-]\d{2}:\d{2})$/, {
4209
4209
  message: "timezone must be an IANA identifier (e.g., 'Asia/Kolkata') or offset (e.g., '+05:30')"
4210
4210
  }).refine(
4211
- (a) => {
4212
- if (a.includes("/"))
4211
+ (r) => {
4212
+ if (r.includes("/"))
4213
4213
  try {
4214
- return new Intl.DateTimeFormat("en-US", { timeZone: a }), true;
4214
+ return new Intl.DateTimeFormat("en-US", { timeZone: r }), true;
4215
4215
  } catch {
4216
4216
  return false;
4217
4217
  }
4218
- return /^([+-]\d{2}:\d{2})$/.test(a);
4218
+ return /^([+-]\d{2}:\d{2})$/.test(r);
4219
4219
  },
4220
4220
  {
4221
4221
  message: "timezone must be a valid IANA identifier or UTC offset"
@@ -4224,10 +4224,10 @@ const m = [
4224
4224
  nseSymbol: string(),
4225
4225
  name: string(),
4226
4226
  price: number$1(),
4227
- quoteData: r.nullable().optional()
4227
+ quoteData: a.nullable().optional()
4228
4228
  }), c = _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]), b = object({
4229
4229
  nseSymbol: string(),
4230
- quoteData: r
4230
+ quoteData: a
4231
4231
  });
4232
4232
  ({
4233
4233
  body: object({
@@ -4269,7 +4269,7 @@ const m = [
4269
4269
  data: object({
4270
4270
  timestamp: n,
4271
4271
  timezone: o.optional(),
4272
- quoteData: r,
4272
+ quoteData: a,
4273
4273
  dayChangePerc: number$1()
4274
4274
  })
4275
4275
  }),
@@ -4294,7 +4294,7 @@ const p = object({
4294
4294
  end_time: string(),
4295
4295
  interval_in_minutes: number$1()
4296
4296
  })
4297
- }), v = {
4297
+ }), f = {
4298
4298
  query: object({
4299
4299
  symbol: string(),
4300
4300
  interval: _enum(m),
@@ -4305,7 +4305,7 @@ const p = object({
4305
4305
  response: t.extend({
4306
4306
  data: p
4307
4307
  })
4308
- }, f = {
4308
+ }, v = {
4309
4309
  query: object({
4310
4310
  symbol: string(),
4311
4311
  exchange: _enum(["NSE", "BSE"]).optional(),
@@ -4314,7 +4314,7 @@ const p = object({
4314
4314
  timezone: o.optional()
4315
4315
  }),
4316
4316
  response: t.extend({
4317
- data: r.nullable()
4317
+ data: a.nullable()
4318
4318
  })
4319
4319
  }, T = {
4320
4320
  response: t.extend({
@@ -4333,7 +4333,7 @@ const p = object({
4333
4333
  timestamp: string(),
4334
4334
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4335
4335
  nseSymbol: string(),
4336
- quoteData: r,
4336
+ quoteData: a,
4337
4337
  createdAt: string(),
4338
4338
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4339
4339
  updatedAt: string()
@@ -4342,10 +4342,19 @@ const p = object({
4342
4342
  )
4343
4343
  })
4344
4344
  })
4345
- }, _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4345
+ }, q = {
4346
+ query: object({
4347
+ datetime: n.optional(),
4348
+ timezone: o.optional()
4349
+ }),
4350
+ response: t.extend({
4351
+ data: a.nullable()
4352
+ })
4353
+ }, ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4346
4354
  __proto__: null,
4347
- getGrowwHistoricalCandles: v,
4348
- getGrowwQuote: f,
4355
+ getGrowwHistoricalCandles: f,
4356
+ getGrowwNiftyQuote: q,
4357
+ getGrowwQuote: v,
4349
4358
  getGrowwQuoteTimeline: P,
4350
4359
  getGrowwToken: T,
4351
4360
  growwHistoricalCandlesSchema: p
@@ -4353,7 +4362,7 @@ const p = object({
4353
4362
  name: string(),
4354
4363
  price: number$1(),
4355
4364
  nseSymbol: string()
4356
- }), O = {
4365
+ }), x = {
4357
4366
  query: object({
4358
4367
  type: _enum(["top-gainers", "volume-shockers"]),
4359
4368
  datetime: n.optional(),
@@ -4362,11 +4371,11 @@ const p = object({
4362
4371
  response: t.extend({
4363
4372
  data: array(_).nullable()
4364
4373
  })
4365
- }, ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4374
+ }, ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4366
4375
  __proto__: null,
4367
- getLists: O,
4376
+ getLists: x,
4368
4377
  listSchema: _
4369
- }, Symbol.toStringTag, { value: "Module" })), q = {
4378
+ }, Symbol.toStringTag, { value: "Module" })), O = {
4370
4379
  query: object({}),
4371
4380
  response: t.extend({
4372
4381
  data: object({
@@ -4380,10 +4389,10 @@ const p = object({
4380
4389
  )
4381
4390
  })
4382
4391
  })
4383
- }, x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4392
+ }, w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4384
4393
  __proto__: null,
4385
- getAvailableDatetimes: q
4386
- }, Symbol.toStringTag, { value: "Module" })), w = {
4394
+ getAvailableDatetimes: O
4395
+ }, Symbol.toStringTag, { value: "Module" })), z = {
4387
4396
  query: object({
4388
4397
  symbol: string(),
4389
4398
  date: i,
@@ -4405,10 +4414,10 @@ const p = object({
4405
4414
  interval_in_minutes: number$1()
4406
4415
  })
4407
4416
  })
4408
- }, z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4417
+ }, D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4409
4418
  __proto__: null,
4410
- getCandles: w
4411
- }, Symbol.toStringTag, { value: "Module" })), D = {
4419
+ getCandles: z
4420
+ }, Symbol.toStringTag, { value: "Module" })), C = {
4412
4421
  query: object({
4413
4422
  date: i,
4414
4423
  type: _enum(t$1)
@@ -4428,10 +4437,10 @@ const p = object({
4428
4437
  )
4429
4438
  })
4430
4439
  })
4431
- }, C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4440
+ }, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4432
4441
  __proto__: null,
4433
- getDailyPersistentCompanies: D
4434
- }, Symbol.toStringTag, { value: "Module" })), M = {
4442
+ getDailyPersistentCompanies: C
4443
+ }, Symbol.toStringTag, { value: "Module" })), A = {
4435
4444
  query: object({
4436
4445
  date: i,
4437
4446
  type: _enum(t$1)
@@ -4443,23 +4452,23 @@ const p = object({
4443
4452
  uniqueCount: number$1()
4444
4453
  })
4445
4454
  })
4446
- }, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4455
+ }, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4447
4456
  __proto__: null,
4448
- getDailyUniqueCompanies: M
4449
- }, Symbol.toStringTag, { value: "Module" })), R = object({
4457
+ getDailyUniqueCompanies: A
4458
+ }, Symbol.toStringTag, { value: "Module" })), k = object({
4450
4459
  id: uuid(),
4451
4460
  username: string()
4452
- }), k = {
4461
+ }), E = {
4453
4462
  body: object({
4454
4463
  developerToken: string().nonempty("Developer token is required")
4455
4464
  }),
4456
4465
  response: t.extend({
4457
- data: R
4466
+ data: k
4458
4467
  })
4459
- }, E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4468
+ }, I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4460
4469
  __proto__: null,
4461
- signIn: k
4462
- }, Symbol.toStringTag, { value: "Module" })), I = {
4470
+ signIn: E
4471
+ }, Symbol.toStringTag, { value: "Module" })), L = {
4463
4472
  query: object({
4464
4473
  symbol: string(),
4465
4474
  date: i
@@ -4472,7 +4481,7 @@ const p = object({
4472
4481
  timestamp: string(),
4473
4482
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4474
4483
  nseSymbol: string(),
4475
- quoteData: r,
4484
+ quoteData: a,
4476
4485
  createdAt: string(),
4477
4486
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4478
4487
  updatedAt: string()
@@ -4481,10 +4490,10 @@ const p = object({
4481
4490
  )
4482
4491
  })
4483
4492
  })
4484
- }, L = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4493
+ }, N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4485
4494
  __proto__: null,
4486
- getQuoteTimeline: I
4487
- }, Symbol.toStringTag, { value: "Module" })), N = object({
4495
+ getQuoteTimeline: L
4496
+ }, Symbol.toStringTag, { value: "Module" })), G = object({
4488
4497
  id: uuid(),
4489
4498
  start_datetime: string(),
4490
4499
  end_datetime: string(),
@@ -4493,8 +4502,8 @@ const p = object({
4493
4502
  }), U = record(
4494
4503
  string(),
4495
4504
  // date string (YYYY-MM-DD)
4496
- array(N)
4497
- ), G = {
4505
+ array(G)
4506
+ ), Q = {
4498
4507
  response: t.extend({
4499
4508
  data: U
4500
4509
  })
@@ -4527,36 +4536,36 @@ const p = object({
4527
4536
  response: t.extend({
4528
4537
  data: array(Y)
4529
4538
  })
4530
- }, Q = object({
4539
+ }, $ = object({
4531
4540
  start_datetime: n,
4532
4541
  end_datetime: n,
4533
4542
  timezone: o.optional()
4534
- }), $ = object({
4543
+ }), F = object({
4535
4544
  id: uuid(),
4536
4545
  start_datetime: n,
4537
4546
  end_datetime: n,
4538
4547
  completed: boolean()
4539
- }), F = {
4540
- body: Q,
4548
+ }), B = {
4549
+ body: $,
4541
4550
  response: t.extend({
4542
- data: $
4551
+ data: F
4543
4552
  })
4544
- }, B = object({
4553
+ }, K = object({
4545
4554
  completed: boolean().optional()
4546
- }), K = object({
4555
+ }), Z = object({
4547
4556
  id: uuid(),
4548
4557
  start_datetime: string(),
4549
4558
  end_datetime: string(),
4550
4559
  completed: boolean()
4551
- }), Z = {
4560
+ }), V = {
4552
4561
  params: object({
4553
4562
  runId: uuid()
4554
4563
  }),
4555
- body: B,
4564
+ body: K,
4556
4565
  response: t.extend({
4557
- data: K
4566
+ data: Z
4558
4567
  })
4559
- }, V = {
4568
+ }, J = {
4560
4569
  params: object({
4561
4570
  runId: uuid()
4562
4571
  }),
@@ -4565,14 +4574,14 @@ const p = object({
4565
4574
  id: uuid()
4566
4575
  })
4567
4576
  })
4568
- }, J = object({
4577
+ }, W = object({
4569
4578
  nseSymbol: string(),
4570
4579
  entryPrice: number(),
4571
4580
  stopLossPrice: number(),
4572
4581
  takeProfitPrice: number(),
4573
4582
  datetime: n,
4574
4583
  timezone: o.optional()
4575
- }), W = object({
4584
+ }), X = object({
4576
4585
  id: uuid(),
4577
4586
  nseSymbol: string(),
4578
4587
  entryPrice: number(),
@@ -4580,23 +4589,23 @@ const p = object({
4580
4589
  takeProfitPrice: number(),
4581
4590
  datetime: string(),
4582
4591
  runId: uuid()
4583
- }), X = {
4592
+ }), ee = {
4584
4593
  params: object({
4585
4594
  runId: uuid()
4586
4595
  }),
4587
- body: J,
4596
+ body: W,
4588
4597
  response: t.extend({
4589
- data: W
4598
+ data: X
4590
4599
  })
4591
- }, ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4600
+ }, te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4592
4601
  __proto__: null,
4593
- createOrder: X,
4594
- createRun: F,
4595
- deleteRun: V,
4602
+ createOrder: ee,
4603
+ createRun: B,
4604
+ deleteRun: J,
4596
4605
  getRunOrders: H,
4597
- getRuns: G,
4598
- updateRun: Z
4599
- }, Symbol.toStringTag, { value: "Module" })), te = {
4606
+ getRuns: Q,
4607
+ updateRun: V
4608
+ }, Symbol.toStringTag, { value: "Module" })), ne = {
4600
4609
  query: object({
4601
4610
  datetime: n,
4602
4611
  timezone: o.optional(),
@@ -4613,19 +4622,19 @@ const p = object({
4613
4622
  }).nullable()
4614
4623
  })
4615
4624
  })
4616
- }, ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4625
+ }, oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4617
4626
  __proto__: null,
4618
- getShortlists: te
4619
- }, Symbol.toStringTag, { value: "Module" })), ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4627
+ getShortlists: ne
4628
+ }, Symbol.toStringTag, { value: "Module" })), je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4620
4629
  __proto__: null,
4621
- v1_dashboard_auth_schemas: E,
4622
- v1_dashboard_available_datetimes_schemas: x,
4623
- v1_dashboard_candles_schemas: z,
4624
- v1_dashboard_daily_persistent_companies_schemas: C,
4625
- v1_dashboard_daily_unique_companies_schemas: A,
4626
- v1_dashboard_quote_timeline_schemas: L,
4627
- v1_dashboard_runs_schemas: ee,
4628
- v1_dashboard_shortlists_schemas: ne
4630
+ v1_dashboard_auth_schemas: I,
4631
+ v1_dashboard_available_datetimes_schemas: w,
4632
+ v1_dashboard_candles_schemas: D,
4633
+ v1_dashboard_daily_persistent_companies_schemas: M,
4634
+ v1_dashboard_daily_unique_companies_schemas: R,
4635
+ v1_dashboard_quote_timeline_schemas: N,
4636
+ v1_dashboard_runs_schemas: te,
4637
+ v1_dashboard_shortlists_schemas: oe
4629
4638
  }, Symbol.toStringTag, { value: "Module" }));
4630
4639
  ({
4631
4640
  response: t.extend({
@@ -4699,25 +4708,25 @@ function getAugmentedNamespace(n2) {
4699
4708
  if (n2.__esModule) return n2;
4700
4709
  var f2 = n2.default;
4701
4710
  if (typeof f2 == "function") {
4702
- var a = function a2() {
4703
- if (this instanceof a2) {
4711
+ var a2 = function a3() {
4712
+ if (this instanceof a3) {
4704
4713
  return Reflect.construct(f2, arguments, this.constructor);
4705
4714
  }
4706
4715
  return f2.apply(this, arguments);
4707
4716
  };
4708
- a.prototype = f2.prototype;
4709
- } else a = {};
4710
- Object.defineProperty(a, "__esModule", { value: true });
4717
+ a2.prototype = f2.prototype;
4718
+ } else a2 = {};
4719
+ Object.defineProperty(a2, "__esModule", { value: true });
4711
4720
  Object.keys(n2).forEach(function(k2) {
4712
4721
  var d2 = Object.getOwnPropertyDescriptor(n2, k2);
4713
- Object.defineProperty(a, k2, d2.get ? d2 : {
4722
+ Object.defineProperty(a2, k2, d2.get ? d2 : {
4714
4723
  enumerable: true,
4715
4724
  get: function() {
4716
4725
  return n2[k2];
4717
4726
  }
4718
4727
  });
4719
4728
  });
4720
- return a;
4729
+ return a2;
4721
4730
  }
4722
4731
  var utc$1 = { exports: {} };
4723
4732
  (function(module, exports$1) {
@@ -4736,9 +4745,9 @@ var utc$1 = { exports: {} };
4736
4745
  }, u.local = function() {
4737
4746
  return n2(this.toDate(), { locale: this.$L, utc: false });
4738
4747
  };
4739
- var r2 = u.parse;
4748
+ var r = u.parse;
4740
4749
  u.parse = function(t3) {
4741
- t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r2.call(this, t3);
4750
+ t3.utc && (this.$u = true), this.$utils().u(t3.$offset) || (this.$offset = t3.$offset), r.call(this, t3);
4742
4751
  };
4743
4752
  var o2 = u.init;
4744
4753
  u.init = function() {
@@ -4747,10 +4756,10 @@ var utc$1 = { exports: {} };
4747
4756
  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();
4748
4757
  } else o2.call(this);
4749
4758
  };
4750
- var a = u.utcOffset;
4759
+ var a2 = u.utcOffset;
4751
4760
  u.utcOffset = function(s2, f3) {
4752
4761
  var n3 = this.$utils().u;
4753
- if (n3(s2)) return this.$u ? 0 : n3(this.$offset) ? a.call(this) : this.$offset;
4762
+ if (n3(s2)) return this.$u ? 0 : n3(this.$offset) ? a2.call(this) : this.$offset;
4754
4763
  if ("string" == typeof s2 && (s2 = function(t3) {
4755
4764
  void 0 === t3 && (t3 = "");
4756
4765
  var s3 = t3.match(i2);
@@ -4760,10 +4769,10 @@ var utc$1 = { exports: {} };
4760
4769
  }(s2), null === s2)) return this;
4761
4770
  var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2;
4762
4771
  if (0 === u2) return this.utc(f3);
4763
- var r3 = this.clone();
4764
- if (f3) return r3.$offset = u2, r3.$u = false, r3;
4772
+ var r2 = this.clone();
4773
+ if (f3) return r2.$offset = u2, r2.$u = false, r2;
4765
4774
  var o3 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
4766
- return (r3 = this.local().add(u2 + o3, t2)).$offset = u2, r3.$x.$localOffset = o3, r3;
4775
+ return (r2 = this.local().add(u2 + o3, t2)).$offset = u2, r2.$x.$localOffset = o3, r2;
4767
4776
  };
4768
4777
  var h = u.format;
4769
4778
  u.format = function(t3) {
@@ -4801,25 +4810,25 @@ var timezone$1 = { exports: {} };
4801
4810
  }(commonjsGlobal, function() {
4802
4811
  var t2 = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, e = {};
4803
4812
  return function(n2, i2, o2) {
4804
- var r2, a = function(t3, n3, i3) {
4813
+ var r, a2 = function(t3, n3, i3) {
4805
4814
  void 0 === i3 && (i3 = {});
4806
- var o3 = new Date(t3), r3 = function(t4, n4) {
4815
+ var o3 = new Date(t3), r2 = function(t4, n4) {
4807
4816
  void 0 === n4 && (n4 = {});
4808
- var i4 = n4.timeZoneName || "short", o4 = t4 + "|" + i4, r4 = e[o4];
4809
- 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;
4817
+ var i4 = n4.timeZoneName || "short", o4 = t4 + "|" + i4, r3 = e[o4];
4818
+ return r3 || (r3 = new Intl.DateTimeFormat("en-US", { hour12: false, timeZone: t4, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: i4 }), e[o4] = r3), r3;
4810
4819
  }(n3, i3);
4811
- return r3.formatToParts(o3);
4820
+ return r2.formatToParts(o3);
4812
4821
  }, u = function(e2, n3) {
4813
- for (var i3 = a(e2, n3), r3 = [], u2 = 0; u2 < i3.length; u2 += 1) {
4822
+ for (var i3 = a2(e2, n3), r2 = [], u2 = 0; u2 < i3.length; u2 += 1) {
4814
4823
  var f3 = i3[u2], s2 = f3.type, m2 = f3.value, c2 = t2[s2];
4815
- c2 >= 0 && (r3[c2] = parseInt(m2, 10));
4824
+ c2 >= 0 && (r2[c2] = parseInt(m2, 10));
4816
4825
  }
4817
- var d2 = r3[3], l2 = 24 === d2 ? 0 : d2, h = r3[0] + "-" + r3[1] + "-" + r3[2] + " " + l2 + ":" + r3[4] + ":" + r3[5] + ":000", v2 = +e2;
4826
+ var d2 = r2[3], l2 = 24 === d2 ? 0 : d2, h = r2[0] + "-" + r2[1] + "-" + r2[2] + " " + l2 + ":" + r2[4] + ":" + r2[5] + ":000", v2 = +e2;
4818
4827
  return (o2.utc(h).valueOf() - (v2 -= v2 % 1e3)) / 6e4;
4819
4828
  }, f2 = i2.prototype;
4820
4829
  f2.tz = function(t3, e2) {
4821
- void 0 === t3 && (t3 = r2);
4822
- var n3, i3 = this.utcOffset(), a2 = this.toDate(), u2 = a2.toLocaleString("en-US", { timeZone: t3 }), f3 = Math.round((a2 - new Date(u2)) / 1e3 / 60), s2 = 15 * -Math.round(a2.getTimezoneOffset() / 15) - f3;
4830
+ void 0 === t3 && (t3 = r);
4831
+ var n3, i3 = this.utcOffset(), a3 = this.toDate(), u2 = a3.toLocaleString("en-US", { timeZone: t3 }), f3 = Math.round((a3 - new Date(u2)) / 1e3 / 60), s2 = 15 * -Math.round(a3.getTimezoneOffset() / 15) - f3;
4823
4832
  if (!Number(s2)) n3 = this.utcOffset(0, e2);
4824
4833
  else if (n3 = o2(u2, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(s2, true), e2) {
4825
4834
  var m2 = n3.utcOffset();
@@ -4827,7 +4836,7 @@ var timezone$1 = { exports: {} };
4827
4836
  }
4828
4837
  return n3.$x.$timezone = t3, n3;
4829
4838
  }, f2.offsetName = function(t3) {
4830
- var e2 = this.$x.$timezone || o2.tz.guess(), n3 = a(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
4839
+ var e2 = this.$x.$timezone || o2.tz.guess(), n3 = a2(this.valueOf(), e2, { timeZoneName: t3 }).find(function(t4) {
4831
4840
  return "timezonename" === t4.type.toLowerCase();
4832
4841
  });
4833
4842
  return n3 && n3.value;
@@ -4838,19 +4847,19 @@ var timezone$1 = { exports: {} };
4838
4847
  var n3 = o2(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
4839
4848
  return s.call(n3, t3, e2).tz(this.$x.$timezone, true);
4840
4849
  }, o2.tz = function(t3, e2, n3) {
4841
- var i3 = n3 && e2, a2 = n3 || e2 || r2, f3 = u(+o2(), a2);
4842
- if ("string" != typeof t3) return o2(t3).tz(a2);
4850
+ var i3 = n3 && e2, a3 = n3 || e2 || r, f3 = u(+o2(), a3);
4851
+ if ("string" != typeof t3) return o2(t3).tz(a3);
4843
4852
  var s2 = function(t4, e3, n4) {
4844
4853
  var i4 = t4 - 60 * e3 * 1e3, o3 = u(i4, n4);
4845
4854
  if (e3 === o3) return [i4, e3];
4846
- var r3 = u(i4 -= 60 * (o3 - e3) * 1e3, n4);
4847
- return o3 === r3 ? [i4, o3] : [t4 - 60 * Math.min(o3, r3) * 1e3, Math.max(o3, r3)];
4848
- }(o2.utc(t3, i3).valueOf(), f3, a2), m2 = s2[0], c2 = s2[1], d2 = o2(m2).utcOffset(c2);
4849
- return d2.$x.$timezone = a2, d2;
4855
+ var r2 = u(i4 -= 60 * (o3 - e3) * 1e3, n4);
4856
+ return o3 === r2 ? [i4, o3] : [t4 - 60 * Math.min(o3, r2) * 1e3, Math.max(o3, r2)];
4857
+ }(o2.utc(t3, i3).valueOf(), f3, a3), m2 = s2[0], c2 = s2[1], d2 = o2(m2).utcOffset(c2);
4858
+ return d2.$x.$timezone = a3, d2;
4850
4859
  }, o2.tz.guess = function() {
4851
4860
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
4852
4861
  }, o2.tz.setDefault = function(t3) {
4853
- r2 = t3;
4862
+ r = t3;
4854
4863
  };
4855
4864
  };
4856
4865
  });
@@ -4991,15 +5000,15 @@ function merge() {
4991
5000
  }
4992
5001
  return result;
4993
5002
  }
4994
- const extend = (a, b2, thisArg, { allOwnKeys } = {}) => {
5003
+ const extend = (a2, b2, thisArg, { allOwnKeys } = {}) => {
4995
5004
  forEach(b2, (val, key) => {
4996
5005
  if (thisArg && isFunction$1(val)) {
4997
- a[key] = bind(val, thisArg);
5006
+ a2[key] = bind(val, thisArg);
4998
5007
  } else {
4999
- a[key] = val;
5008
+ a2[key] = val;
5000
5009
  }
5001
5010
  }, { allOwnKeys });
5002
- return a;
5011
+ return a2;
5003
5012
  };
5004
5013
  const stripBOM = (content) => {
5005
5014
  if (content.charCodeAt(0) === 65279) {
@@ -6243,30 +6252,30 @@ function mergeConfig$1(config1, config2) {
6243
6252
  }
6244
6253
  return source;
6245
6254
  }
6246
- function mergeDeepProperties(a, b2, prop, caseless) {
6255
+ function mergeDeepProperties(a2, b2, prop, caseless) {
6247
6256
  if (!utils$1.isUndefined(b2)) {
6248
- return getMergedValue(a, b2, prop, caseless);
6249
- } else if (!utils$1.isUndefined(a)) {
6250
- return getMergedValue(void 0, a, prop, caseless);
6257
+ return getMergedValue(a2, b2, prop, caseless);
6258
+ } else if (!utils$1.isUndefined(a2)) {
6259
+ return getMergedValue(void 0, a2, prop, caseless);
6251
6260
  }
6252
6261
  }
6253
- function valueFromConfig2(a, b2) {
6262
+ function valueFromConfig2(a2, b2) {
6254
6263
  if (!utils$1.isUndefined(b2)) {
6255
6264
  return getMergedValue(void 0, b2);
6256
6265
  }
6257
6266
  }
6258
- function defaultToConfig2(a, b2) {
6267
+ function defaultToConfig2(a2, b2) {
6259
6268
  if (!utils$1.isUndefined(b2)) {
6260
6269
  return getMergedValue(void 0, b2);
6261
- } else if (!utils$1.isUndefined(a)) {
6262
- return getMergedValue(void 0, a);
6270
+ } else if (!utils$1.isUndefined(a2)) {
6271
+ return getMergedValue(void 0, a2);
6263
6272
  }
6264
6273
  }
6265
- function mergeDirectKeys(a, b2, prop) {
6274
+ function mergeDirectKeys(a2, b2, prop) {
6266
6275
  if (prop in config2) {
6267
- return getMergedValue(a, b2);
6276
+ return getMergedValue(a2, b2);
6268
6277
  } else if (prop in config1) {
6269
- return getMergedValue(void 0, a);
6278
+ return getMergedValue(void 0, a2);
6270
6279
  }
6271
6280
  }
6272
6281
  const mergeMap = {
@@ -6298,7 +6307,7 @@ function mergeConfig$1(config1, config2) {
6298
6307
  socketPath: defaultToConfig2,
6299
6308
  responseEncoding: defaultToConfig2,
6300
6309
  validateStatus: mergeDirectKeys,
6301
- headers: (a, b2, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b2), prop, true)
6310
+ headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true)
6302
6311
  };
6303
6312
  utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
6304
6313
  const merge2 = mergeMap[prop] || mergeDeepProperties;
@@ -7376,7 +7385,7 @@ function format$1(f2, args, opts) {
7376
7385
  var argLen = args.length;
7377
7386
  if (argLen === 0) return f2;
7378
7387
  var str = "";
7379
- var a = 1 - offset;
7388
+ var a2 = 1 - offset;
7380
7389
  var lastPos = -1;
7381
7390
  var flen = f2 && f2.length || 0;
7382
7391
  for (var i2 = 0; i2 < flen; ) {
@@ -7385,56 +7394,56 @@ function format$1(f2, args, opts) {
7385
7394
  switch (f2.charCodeAt(i2 + 1)) {
7386
7395
  case 100:
7387
7396
  case 102:
7388
- if (a >= argLen)
7397
+ if (a2 >= argLen)
7389
7398
  break;
7390
- if (args[a] == null) break;
7399
+ if (args[a2] == null) break;
7391
7400
  if (lastPos < i2)
7392
7401
  str += f2.slice(lastPos, i2);
7393
- str += Number(args[a]);
7402
+ str += Number(args[a2]);
7394
7403
  lastPos = i2 + 2;
7395
7404
  i2++;
7396
7405
  break;
7397
7406
  case 105:
7398
- if (a >= argLen)
7407
+ if (a2 >= argLen)
7399
7408
  break;
7400
- if (args[a] == null) break;
7409
+ if (args[a2] == null) break;
7401
7410
  if (lastPos < i2)
7402
7411
  str += f2.slice(lastPos, i2);
7403
- str += Math.floor(Number(args[a]));
7412
+ str += Math.floor(Number(args[a2]));
7404
7413
  lastPos = i2 + 2;
7405
7414
  i2++;
7406
7415
  break;
7407
7416
  case 79:
7408
7417
  case 111:
7409
7418
  case 106:
7410
- if (a >= argLen)
7419
+ if (a2 >= argLen)
7411
7420
  break;
7412
- if (args[a] === void 0) break;
7421
+ if (args[a2] === void 0) break;
7413
7422
  if (lastPos < i2)
7414
7423
  str += f2.slice(lastPos, i2);
7415
- var type = typeof args[a];
7424
+ var type = typeof args[a2];
7416
7425
  if (type === "string") {
7417
- str += "'" + args[a] + "'";
7426
+ str += "'" + args[a2] + "'";
7418
7427
  lastPos = i2 + 2;
7419
7428
  i2++;
7420
7429
  break;
7421
7430
  }
7422
7431
  if (type === "function") {
7423
- str += args[a].name || "<anonymous>";
7432
+ str += args[a2].name || "<anonymous>";
7424
7433
  lastPos = i2 + 2;
7425
7434
  i2++;
7426
7435
  break;
7427
7436
  }
7428
- str += ss(args[a]);
7437
+ str += ss(args[a2]);
7429
7438
  lastPos = i2 + 2;
7430
7439
  i2++;
7431
7440
  break;
7432
7441
  case 115:
7433
- if (a >= argLen)
7442
+ if (a2 >= argLen)
7434
7443
  break;
7435
7444
  if (lastPos < i2)
7436
7445
  str += f2.slice(lastPos, i2);
7437
- str += String(args[a]);
7446
+ str += String(args[a2]);
7438
7447
  lastPos = i2 + 2;
7439
7448
  i2++;
7440
7449
  break;
@@ -7444,10 +7453,10 @@ function format$1(f2, args, opts) {
7444
7453
  str += "%";
7445
7454
  lastPos = i2 + 2;
7446
7455
  i2++;
7447
- a--;
7456
+ a2--;
7448
7457
  break;
7449
7458
  }
7450
- ++a;
7459
+ ++a2;
7451
7460
  }
7452
7461
  ++i2;
7453
7462
  }
@@ -7854,8 +7863,8 @@ function getTimeFunction(opts) {
7854
7863
  function mock() {
7855
7864
  return {};
7856
7865
  }
7857
- function passthrough(a) {
7858
- return a;
7866
+ function passthrough(a2) {
7867
+ return a2;
7859
7868
  }
7860
7869
  function noop() {
7861
7870
  }
@@ -7914,7 +7923,7 @@ const fetchCandles = ({
7914
7923
  );
7915
7924
  }
7916
7925
  try {
7917
- const validatedParams = _e.getGrowwHistoricalCandles.query.parse(params);
7926
+ const validatedParams = ge.getGrowwHistoricalCandles.query.parse(params);
7918
7927
  const headers = {
7919
7928
  Authorization: `Bearer ${developerToken}`
7920
7929
  };
@@ -7958,7 +7967,7 @@ const fetchQuote = ({
7958
7967
  );
7959
7968
  }
7960
7969
  try {
7961
- const validatedParams = _e.getGrowwQuote.query.parse(params);
7970
+ const validatedParams = ge.getGrowwQuote.query.parse(params);
7962
7971
  const headers = {
7963
7972
  Authorization: `Bearer ${developerToken}`
7964
7973
  };
@@ -7998,7 +8007,7 @@ const fetchQuoteTimeline = ({
7998
8007
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
7999
8008
  }
8000
8009
  try {
8001
- const validatedParams = _e.getGrowwQuoteTimeline.query.parse({
8010
+ const validatedParams = ge.getGrowwQuoteTimeline.query.parse({
8002
8011
  symbol,
8003
8012
  date: date2
8004
8013
  });
@@ -8045,7 +8054,7 @@ const fetchShortlist = ({
8045
8054
  );
8046
8055
  }
8047
8056
  try {
8048
- const validatedParams = ge.getLists.query.parse(queryParams);
8057
+ const validatedParams = ye.getLists.query.parse(queryParams);
8049
8058
  const headers = {
8050
8059
  Authorization: `Bearer ${developerToken}`
8051
8060
  };
@@ -8074,6 +8083,48 @@ const fetchShortlist = ({
8074
8083
  throw error;
8075
8084
  }
8076
8085
  };
8086
+ dayjs.extend(utc);
8087
+ dayjs.extend(timezone);
8088
+ const fetchNiftyQuote = ({
8089
+ developerToken,
8090
+ apiDomain,
8091
+ runId,
8092
+ currentTimestamp,
8093
+ currentTimezone = "Asia/Kolkata"
8094
+ }) => async (params) => {
8095
+ if (!developerToken) {
8096
+ throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8097
+ }
8098
+ try {
8099
+ const validatedParams = ge.getGrowwNiftyQuote.query.parse(params);
8100
+ const headers = {
8101
+ Authorization: `Bearer ${developerToken}`
8102
+ };
8103
+ if (runId) {
8104
+ headers["X-Run-Id"] = runId;
8105
+ }
8106
+ if (currentTimestamp) {
8107
+ headers["X-Current-Timestamp"] = currentTimestamp;
8108
+ }
8109
+ if (currentTimezone) {
8110
+ headers["X-Current-Timezone"] = currentTimezone;
8111
+ }
8112
+ const response = await axios.get(`${apiDomain}/v1/developer/groww/nifty`, {
8113
+ params: validatedParams,
8114
+ headers
8115
+ });
8116
+ return response.data.data;
8117
+ } catch (error) {
8118
+ if (axios.isAxiosError(error)) {
8119
+ logger.error(`Error fetching NIFTY quote: ${error.message}`);
8120
+ throw new Error(
8121
+ `Failed to fetch NIFTY quote: ${error.response?.data?.message || error.message}`
8122
+ );
8123
+ }
8124
+ logger.error(`Unexpected error fetching NIFTY quote: ${error}`);
8125
+ throw error;
8126
+ }
8127
+ };
8077
8128
  function isRetryableError(error) {
8078
8129
  if (axios.isAxiosError(error)) {
8079
8130
  const axiosError = error;
@@ -8152,7 +8203,7 @@ const placeOrder = ({ runId, apiClient }) => async (data) => {
8152
8203
  try {
8153
8204
  await retryWithBackoff(
8154
8205
  async () => {
8155
- const validatedData = ye.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8206
+ const validatedData = je.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8156
8207
  await apiClient.post(`/v1/dashboard/runs/${runId}/orders`, validatedData);
8157
8208
  logger.debug(`Order persisted for ${data.nseSymbol} in runId: ${runId}`);
8158
8209
  },
@@ -8268,11 +8319,11 @@ var calendar$1 = { exports: {} };
8268
8319
  !function(e, t2) {
8269
8320
  module.exports = t2();
8270
8321
  }(commonjsGlobal, function() {
8271
- return function(e, t2, a) {
8322
+ return function(e, t2, a2) {
8272
8323
  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" };
8273
8324
  t2.prototype.calendar = function(e2, t3) {
8274
- var n3 = t3 || this.$locale().calendar || d2, o2 = a(e2 || void 0).startOf("d"), s = this.diff(o2, "d", true), i2 = "sameElse", f2 = s < -6 ? i2 : s < -1 ? "lastWeek" : s < 0 ? "lastDay" : s < 1 ? "sameDay" : s < 2 ? "nextDay" : s < 7 ? "nextWeek" : i2, l2 = n3[f2] || d2[f2];
8275
- return "function" == typeof l2 ? l2.call(this, a()) : this.format(l2);
8325
+ var n3 = t3 || this.$locale().calendar || d2, o2 = a2(e2 || void 0).startOf("d"), s = this.diff(o2, "d", true), i2 = "sameElse", f2 = s < -6 ? i2 : s < -1 ? "lastWeek" : s < 0 ? "lastDay" : s < 1 ? "sameDay" : s < 2 ? "nextDay" : s < 7 ? "nextWeek" : i2, l2 = n3[f2] || d2[f2];
8326
+ return "function" == typeof l2 ? l2.call(this, a2()) : this.format(l2);
8276
8327
  };
8277
8328
  };
8278
8329
  });
@@ -8281,42 +8332,42 @@ var calendarExports = calendar$1.exports;
8281
8332
  const calendar = /* @__PURE__ */ getDefaultExportFromCjs(calendarExports);
8282
8333
  var relativeTime$1 = { exports: {} };
8283
8334
  (function(module, exports$1) {
8284
- !function(r2, e) {
8335
+ !function(r, e) {
8285
8336
  module.exports = e();
8286
8337
  }(commonjsGlobal, function() {
8287
- return function(r2, e, t2) {
8288
- r2 = r2 || {};
8338
+ return function(r, e, t2) {
8339
+ r = r || {};
8289
8340
  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" };
8290
- function i2(r3, e2, t3, o3) {
8291
- return n2.fromToBase(r3, e2, t3, o3);
8341
+ function i2(r2, e2, t3, o3) {
8342
+ return n2.fromToBase(r2, e2, t3, o3);
8292
8343
  }
8293
8344
  t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i3, d3, u) {
8294
- for (var f2, a, s, l2 = i3.$locale().relativeTime || o2, h = 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 = h.length, c2 = 0; c2 < m2; c2 += 1) {
8345
+ for (var f2, a2, s, l2 = i3.$locale().relativeTime || o2, h = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m2 = h.length, c2 = 0; c2 < m2; c2 += 1) {
8295
8346
  var y2 = h[c2];
8296
8347
  y2.d && (f2 = d3 ? t2(e2).diff(i3, y2.d, true) : i3.diff(e2, y2.d, true));
8297
- var p2 = (r2.rounding || Math.round)(Math.abs(f2));
8348
+ var p2 = (r.rounding || Math.round)(Math.abs(f2));
8298
8349
  if (s = f2 > 0, p2 <= y2.r || !y2.r) {
8299
8350
  p2 <= 1 && c2 > 0 && (y2 = h[c2 - 1]);
8300
8351
  var v2 = l2[y2.l];
8301
- u && (p2 = u("" + p2)), a = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s);
8352
+ u && (p2 = u("" + p2)), a2 = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s);
8302
8353
  break;
8303
8354
  }
8304
8355
  }
8305
- if (n3) return a;
8356
+ if (n3) return a2;
8306
8357
  var M2 = s ? l2.future : l2.past;
8307
- return "function" == typeof M2 ? M2(a) : M2.replace("%s", a);
8308
- }, n2.to = function(r3, e2) {
8309
- return i2(r3, e2, this, true);
8310
- }, n2.from = function(r3, e2) {
8311
- return i2(r3, e2, this);
8358
+ return "function" == typeof M2 ? M2(a2) : M2.replace("%s", a2);
8359
+ }, n2.to = function(r2, e2) {
8360
+ return i2(r2, e2, this, true);
8361
+ }, n2.from = function(r2, e2) {
8362
+ return i2(r2, e2, this);
8312
8363
  };
8313
- var d2 = function(r3) {
8314
- return r3.$u ? t2.utc() : t2();
8364
+ var d2 = function(r2) {
8365
+ return r2.$u ? t2.utc() : t2();
8315
8366
  };
8316
- n2.toNow = function(r3) {
8317
- return this.to(d2(this), r3);
8318
- }, n2.fromNow = function(r3) {
8319
- return this.from(d2(this), r3);
8367
+ n2.toNow = function(r2) {
8368
+ return this.to(d2(this), r2);
8369
+ }, n2.fromNow = function(r2) {
8370
+ return this.from(d2(this), r2);
8320
8371
  };
8321
8372
  };
8322
8373
  });
@@ -8473,6 +8524,13 @@ async function ganaka({
8473
8524
  currentTimestamp,
8474
8525
  currentTimezone: "Asia/Kolkata"
8475
8526
  }),
8527
+ fetchNiftyQuote: fetchNiftyQuote({
8528
+ developerToken,
8529
+ apiDomain,
8530
+ runId,
8531
+ currentTimestamp,
8532
+ currentTimezone: "Asia/Kolkata"
8533
+ }),
8476
8534
  fetchQuoteTimeline: fetchQuoteTimeline({
8477
8535
  developerToken,
8478
8536
  apiDomain,
@@ -8516,6 +8574,6 @@ async function ganaka({
8516
8574
  export {
8517
8575
  ganaka,
8518
8576
  g as growwQuotePayloadSchema,
8519
- r as growwQuoteSchema
8577
+ a as growwQuoteSchema
8520
8578
  };
8521
8579
  //# sourceMappingURL=index.mjs.map