@ganaka/sdk 1.5.0 → 1.6.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.js CHANGED
@@ -8,9 +8,9 @@ function _mergeNamespaces(n2, m2) {
8
8
  if (typeof e !== "string" && !Array.isArray(e)) {
9
9
  for (const k2 in e) {
10
10
  if (k2 !== "default" && !(k2 in n2)) {
11
- const d2 = Object.getOwnPropertyDescriptor(e, k2);
12
- if (d2) {
13
- Object.defineProperty(n2, k2, d2.get ? d2 : {
11
+ const d = Object.getOwnPropertyDescriptor(e, k2);
12
+ if (d) {
13
+ Object.defineProperty(n2, k2, d.get ? d : {
14
14
  enumerable: true,
15
15
  get: () => e[k2]
16
16
  });
@@ -88,8 +88,8 @@ 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(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v2]) => v2);
91
+ const numericValues = Object.values(entries).filter((v) => typeof v === "number");
92
+ const values = Object.entries(entries).filter(([k2, _2]) => numericValues.indexOf(+k2) === -1).map(([_2, v]) => v);
93
93
  return values;
94
94
  }
95
95
  function jsonStringifyReplacer(_2, 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
  },
@@ -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);
@@ -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;
@@ -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((x2) => x2 !== 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);
@@ -3262,9 +3262,9 @@ const dateProcessor = (_schema, ctx, _json, _params) => {
3262
3262
  const enumProcessor = (schema, _ctx, json, _params) => {
3263
3263
  const def = schema._zod.def;
3264
3264
  const values = getEnumValues(def.entries);
3265
- if (values.every((v2) => typeof v2 === "number"))
3265
+ if (values.every((v) => typeof v === "number"))
3266
3266
  json.type = "number";
3267
- if (values.every((v2) => typeof v2 === "string"))
3267
+ if (values.every((v) => typeof v === "string"))
3268
3268
  json.type = "string";
3269
3269
  json.enum = values;
3270
3270
  };
@@ -3303,11 +3303,11 @@ const objectProcessor = (schema, ctx, _json, params) => {
3303
3303
  }
3304
3304
  const allKeys = new Set(Object.keys(shape));
3305
3305
  const requiredKeys = new Set([...allKeys].filter((key) => {
3306
- const v2 = def.shape[key]._zod;
3306
+ const v = def.shape[key]._zod;
3307
3307
  if (ctx.io === "input") {
3308
- return v2.optin === void 0;
3308
+ return v.optin === void 0;
3309
3309
  } else {
3310
- return v2.optout === void 0;
3310
+ return v.optout === void 0;
3311
3311
  }
3312
3312
  }));
3313
3313
  if (requiredKeys.size > 0) {
@@ -3938,7 +3938,7 @@ const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
3938
3938
  };
3939
3939
  });
3940
3940
  function _enum(values, params) {
3941
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v2) => [v2, v2])) : values;
3941
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
3942
3942
  return new ZodEnum({
3943
3943
  type: "enum",
3944
3944
  entries,
@@ -4109,8 +4109,11 @@ function number(params) {
4109
4109
  const t$1 = [
4110
4110
  "TOP_GAINERS",
4111
4111
  "VOLUME_SHOCKERS"
4112
+ ], o$1 = [
4113
+ "FULL",
4114
+ "TOP_5"
4112
4115
  ];
4113
- const _ = object({
4116
+ const S = object({
4114
4117
  average_price: number$1().nullable(),
4115
4118
  bid_quantity: number$1().nullable(),
4116
4119
  bid_price: number$1().nullable(),
@@ -4158,13 +4161,13 @@ const _ = object({
4158
4161
  week_52_low: number$1().nullable()
4159
4162
  }), a = object({
4160
4163
  status: _enum(["SUCCESS", "FAILURE"]),
4161
- payload: _
4162
- }), y = object({
4164
+ payload: S
4165
+ }), f = object({
4163
4166
  nseSymbol: string(),
4164
4167
  name: string(),
4165
4168
  price: number$1(),
4166
4169
  quoteData: a.nullable().optional()
4167
- }), t = object({
4170
+ }), m = _enum(o$1), t = object({
4168
4171
  statusCode: number$1(),
4169
4172
  message: string(),
4170
4173
  data: unknown()
@@ -4174,7 +4177,7 @@ object({
4174
4177
  statusCode: number$1(),
4175
4178
  message: string()
4176
4179
  });
4177
- const c = [
4180
+ const b = [
4178
4181
  "1minute",
4179
4182
  "2minute",
4180
4183
  "3minute",
@@ -4222,12 +4225,12 @@ const c = [
4222
4225
  {
4223
4226
  message: "timezone must be a valid IANA identifier or UTC offset"
4224
4227
  }
4225
- ), d = object({
4228
+ ), p = object({
4226
4229
  nseSymbol: string(),
4227
4230
  name: string(),
4228
4231
  price: number$1(),
4229
4232
  quoteData: a.nullable().optional()
4230
- }), m = _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]), b = object({
4233
+ }), c = _enum(["TOP_GAINERS", "VOLUME_SHOCKERS"]), g = _enum(o$1), _ = object({
4231
4234
  nseSymbol: string(),
4232
4235
  quoteData: a
4233
4236
  });
@@ -4236,8 +4239,9 @@ const c = [
4236
4239
  data: object({
4237
4240
  timestamp: n,
4238
4241
  timezone: o.optional(),
4239
- shortlistType: m,
4240
- entries: array(d)
4242
+ shortlistType: c,
4243
+ entries: array(p),
4244
+ scope: g.optional()
4241
4245
  })
4242
4246
  }),
4243
4247
  response: t.extend({
@@ -4245,7 +4249,7 @@ const c = [
4245
4249
  id: string(),
4246
4250
  timestamp: string(),
4247
4251
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4248
- shortlistType: m,
4252
+ shortlistType: c,
4249
4253
  entriesCount: number$1()
4250
4254
  })
4251
4255
  })
@@ -4255,7 +4259,7 @@ const c = [
4255
4259
  data: object({
4256
4260
  timestamp: n,
4257
4261
  timezone: o.optional(),
4258
- quotes: array(b)
4262
+ quotes: array(_)
4259
4263
  })
4260
4264
  }),
4261
4265
  response: t.extend({
@@ -4284,7 +4288,7 @@ const c = [
4284
4288
  })
4285
4289
  })
4286
4290
  });
4287
- const p = object({
4291
+ const y = object({
4288
4292
  status: _enum(["SUCCESS", "FAILURE"]),
4289
4293
  payload: object({
4290
4294
  /**
@@ -4296,18 +4300,18 @@ const p = object({
4296
4300
  end_time: string(),
4297
4301
  interval_in_minutes: number$1()
4298
4302
  })
4299
- }), v = {
4303
+ }), x = {
4300
4304
  query: object({
4301
4305
  symbol: string(),
4302
- interval: _enum(c),
4306
+ interval: _enum(b),
4303
4307
  start_datetime: n,
4304
4308
  end_datetime: n,
4305
4309
  timezone: o.optional()
4306
4310
  }),
4307
4311
  response: t.extend({
4308
- data: p
4312
+ data: y
4309
4313
  })
4310
- }, f = {
4314
+ }, q = {
4311
4315
  query: object({
4312
4316
  symbol: string(),
4313
4317
  exchange: _enum(["NSE", "BSE"]).optional(),
@@ -4318,11 +4322,11 @@ const p = object({
4318
4322
  response: t.extend({
4319
4323
  data: a.nullable()
4320
4324
  })
4321
- }, T = {
4325
+ }, O = {
4322
4326
  response: t.extend({
4323
4327
  data: string()
4324
4328
  })
4325
- }, x = {
4329
+ }, w = {
4326
4330
  query: object({
4327
4331
  symbol: string(),
4328
4332
  end_datetime: n,
@@ -4345,7 +4349,7 @@ const p = object({
4345
4349
  )
4346
4350
  })
4347
4351
  })
4348
- }, P = {
4352
+ }, z = {
4349
4353
  query: object({
4350
4354
  end_datetime: n,
4351
4355
  timezone: o.optional()
@@ -4366,7 +4370,7 @@ const p = object({
4366
4370
  )
4367
4371
  })
4368
4372
  })
4369
- }, q = {
4373
+ }, M = {
4370
4374
  query: object({
4371
4375
  datetime: n.optional(),
4372
4376
  timezone: o.optional()
@@ -4374,38 +4378,40 @@ const p = object({
4374
4378
  response: t.extend({
4375
4379
  data: a.nullable()
4376
4380
  })
4377
- }, he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4381
+ }, Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4378
4382
  __proto__: null,
4379
- getGrowwHistoricalCandles: v,
4380
- getGrowwNiftyQuote: q,
4381
- getGrowwNiftyQuoteTimeline: P,
4382
- getGrowwQuote: f,
4383
- getGrowwQuoteTimeline: x,
4384
- getGrowwToken: T,
4385
- growwHistoricalCandlesSchema: p
4386
- }, Symbol.toStringTag, { value: "Module" })), g = object({
4383
+ getGrowwHistoricalCandles: x,
4384
+ getGrowwNiftyQuote: M,
4385
+ getGrowwNiftyQuoteTimeline: z,
4386
+ getGrowwQuote: q,
4387
+ getGrowwQuoteTimeline: w,
4388
+ getGrowwToken: O,
4389
+ growwHistoricalCandlesSchema: y
4390
+ }, Symbol.toStringTag, { value: "Module" })), h = object({
4387
4391
  name: string(),
4388
4392
  price: number$1(),
4389
4393
  nseSymbol: string()
4390
- }), O = {
4394
+ }), D = {
4391
4395
  query: object({
4392
4396
  type: _enum(["top-gainers", "volume-shockers"]),
4393
4397
  datetime: n.optional(),
4394
- timezone: o.optional()
4398
+ timezone: o.optional(),
4399
+ scope: m.optional()
4395
4400
  }),
4396
4401
  response: t.extend({
4397
- data: array(g).nullable()
4402
+ data: array(h).nullable()
4398
4403
  })
4399
- }, Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4404
+ }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4400
4405
  __proto__: null,
4401
- getLists: O,
4402
- listSchema: g
4403
- }, Symbol.toStringTag, { value: "Module" })), w = {
4406
+ getLists: D,
4407
+ listSchema: h
4408
+ }, Symbol.toStringTag, { value: "Module" })), A = {
4404
4409
  query: object({
4405
4410
  type: _enum(["top-gainers", "volume-shockers"]),
4406
4411
  start_datetime: n,
4407
4412
  end_datetime: n,
4408
- timezone: o.optional()
4413
+ timezone: o.optional(),
4414
+ scope: m.optional()
4409
4415
  }),
4410
4416
  response: t.extend({
4411
4417
  data: object({
@@ -4424,10 +4430,10 @@ const p = object({
4424
4430
  )
4425
4431
  })
4426
4432
  })
4427
- }, ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4433
+ }, xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4428
4434
  __proto__: null,
4429
- getShortlistPersistence: w
4430
- }, Symbol.toStringTag, { value: "Module" })), z = {
4435
+ getShortlistPersistence: A
4436
+ }, Symbol.toStringTag, { value: "Module" })), C = {
4431
4437
  query: object({}),
4432
4438
  response: t.extend({
4433
4439
  data: object({
@@ -4441,14 +4447,14 @@ const p = object({
4441
4447
  )
4442
4448
  })
4443
4449
  })
4444
- }, D = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4450
+ }, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4445
4451
  __proto__: null,
4446
- getAvailableDatetimes: z
4447
- }, Symbol.toStringTag, { value: "Module" })), C = {
4452
+ getAvailableDatetimes: C
4453
+ }, Symbol.toStringTag, { value: "Module" })), k = {
4448
4454
  query: object({
4449
4455
  symbol: string(),
4450
4456
  date: i,
4451
- interval: _enum(c).optional()
4457
+ interval: _enum(b).optional()
4452
4458
  }),
4453
4459
  response: t.extend({
4454
4460
  data: object({
@@ -4466,10 +4472,10 @@ const p = object({
4466
4472
  interval_in_minutes: number$1()
4467
4473
  })
4468
4474
  })
4469
- }, M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4475
+ }, E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4470
4476
  __proto__: null,
4471
- getCandles: C
4472
- }, Symbol.toStringTag, { value: "Module" })), A = {
4477
+ getCandles: k
4478
+ }, Symbol.toStringTag, { value: "Module" })), L = {
4473
4479
  query: object({
4474
4480
  date: i,
4475
4481
  type: _enum(t$1)
@@ -4489,10 +4495,10 @@ const p = object({
4489
4495
  )
4490
4496
  })
4491
4497
  })
4492
- }, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4498
+ }, I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4493
4499
  __proto__: null,
4494
- getDailyPersistentCompanies: A
4495
- }, Symbol.toStringTag, { value: "Module" })), k = {
4500
+ getDailyPersistentCompanies: L
4501
+ }, Symbol.toStringTag, { value: "Module" })), N = {
4496
4502
  query: object({
4497
4503
  date: i,
4498
4504
  type: _enum(t$1)
@@ -4504,23 +4510,23 @@ const p = object({
4504
4510
  uniqueCount: number$1()
4505
4511
  })
4506
4512
  })
4507
- }, E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4513
+ }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4508
4514
  __proto__: null,
4509
- getDailyUniqueCompanies: k
4510
- }, Symbol.toStringTag, { value: "Module" })), I = object({
4515
+ getDailyUniqueCompanies: N
4516
+ }, Symbol.toStringTag, { value: "Module" })), Q = object({
4511
4517
  id: uuid(),
4512
4518
  username: string()
4513
- }), N = {
4519
+ }), U = {
4514
4520
  body: object({
4515
4521
  developerToken: string().nonempty("Developer token is required")
4516
4522
  }),
4517
4523
  response: t.extend({
4518
- data: I
4524
+ data: Q
4519
4525
  })
4520
- }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4526
+ }, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4521
4527
  __proto__: null,
4522
- signIn: N
4523
- }, Symbol.toStringTag, { value: "Module" })), L = {
4528
+ signIn: U
4529
+ }, Symbol.toStringTag, { value: "Module" })), Y = {
4524
4530
  query: object({
4525
4531
  symbol: string(),
4526
4532
  date: i
@@ -4542,10 +4548,10 @@ const p = object({
4542
4548
  )
4543
4549
  })
4544
4550
  })
4545
- }, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4551
+ }, $ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4546
4552
  __proto__: null,
4547
- getQuoteTimeline: L
4548
- }, Symbol.toStringTag, { value: "Module" })), U = object({
4553
+ getQuoteTimeline: Y
4554
+ }, Symbol.toStringTag, { value: "Module" })), F = object({
4549
4555
  id: uuid(),
4550
4556
  start_datetime: string(),
4551
4557
  end_datetime: string(),
@@ -4553,15 +4559,15 @@ const p = object({
4553
4559
  orderCount: number$1(),
4554
4560
  name: string().nullable().optional(),
4555
4561
  tags: array(string()).optional()
4556
- }), Y = record(
4562
+ }), B = record(
4557
4563
  string(),
4558
4564
  // date string (YYYY-MM-DD)
4559
- array(U)
4560
- ), H = {
4565
+ array(F)
4566
+ ), K = {
4561
4567
  response: t.extend({
4562
- data: Y
4568
+ data: B
4563
4569
  })
4564
- }, $ = object({
4570
+ }, Z = object({
4565
4571
  id: uuid(),
4566
4572
  nseSymbol: string(),
4567
4573
  entryPrice: number(),
@@ -4580,7 +4586,7 @@ const p = object({
4580
4586
  stopLossHit: boolean().optional(),
4581
4587
  stopLossTimestamp: string().optional(),
4582
4588
  timeToStopLossMinutes: number$1().optional()
4583
- }), F = {
4589
+ }), V = {
4584
4590
  params: object({
4585
4591
  runId: uuid()
4586
4592
  }),
@@ -4588,46 +4594,46 @@ const p = object({
4588
4594
  targetGainPercentage: number().optional()
4589
4595
  }),
4590
4596
  response: t.extend({
4591
- data: array($)
4597
+ data: array(Z)
4592
4598
  })
4593
- }, B = object({
4599
+ }, W = object({
4594
4600
  start_datetime: n,
4595
4601
  end_datetime: n,
4596
4602
  timezone: o.optional(),
4597
4603
  name: string().optional(),
4598
4604
  tags: array(string().min(1).max(50)).optional()
4599
- }), K = object({
4605
+ }), J = object({
4600
4606
  id: uuid(),
4601
4607
  start_datetime: n,
4602
4608
  end_datetime: n,
4603
4609
  completed: boolean(),
4604
4610
  name: string().nullable().optional(),
4605
4611
  tags: array(string()).optional()
4606
- }), Z = {
4607
- body: B,
4612
+ }), X = {
4613
+ body: W,
4608
4614
  response: t.extend({
4609
- data: K
4615
+ data: J
4610
4616
  })
4611
- }, V = object({
4617
+ }, ee = object({
4612
4618
  completed: boolean().optional(),
4613
4619
  name: string().nullable().optional(),
4614
4620
  tags: array(string().min(1).max(50)).optional()
4615
- }), J = object({
4621
+ }), te = object({
4616
4622
  id: uuid(),
4617
4623
  start_datetime: string(),
4618
4624
  end_datetime: string(),
4619
4625
  completed: boolean(),
4620
4626
  name: string().nullable().optional(),
4621
4627
  tags: array(string()).optional()
4622
- }), W = {
4628
+ }), ne = {
4623
4629
  params: object({
4624
4630
  runId: uuid()
4625
4631
  }),
4626
- body: V,
4632
+ body: ee,
4627
4633
  response: t.extend({
4628
- data: J
4634
+ data: te
4629
4635
  })
4630
- }, X = {
4636
+ }, oe = {
4631
4637
  params: object({
4632
4638
  runId: uuid()
4633
4639
  }),
@@ -4636,14 +4642,14 @@ const p = object({
4636
4642
  id: uuid()
4637
4643
  })
4638
4644
  })
4639
- }, ee = object({
4645
+ }, ae = object({
4640
4646
  nseSymbol: string(),
4641
4647
  entryPrice: number(),
4642
4648
  stopLossPrice: number(),
4643
4649
  takeProfitPrice: number(),
4644
4650
  datetime: n,
4645
4651
  timezone: o.optional()
4646
- }), te = object({
4652
+ }), re = object({
4647
4653
  id: uuid(),
4648
4654
  nseSymbol: string(),
4649
4655
  entryPrice: number(),
@@ -4651,32 +4657,47 @@ const p = object({
4651
4657
  takeProfitPrice: number(),
4652
4658
  datetime: string(),
4653
4659
  runId: uuid()
4654
- }), ne = {
4660
+ }), se = {
4655
4661
  params: object({
4656
4662
  runId: uuid()
4657
4663
  }),
4658
- body: ee,
4664
+ body: ae,
4659
4665
  response: t.extend({
4660
- data: te
4666
+ data: re
4661
4667
  })
4662
- }, oe = {
4668
+ }, ie = {
4663
4669
  response: t.extend({
4664
4670
  data: array(string())
4665
4671
  })
4666
- }, ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4672
+ }, le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4667
4673
  __proto__: null,
4668
- createOrder: ne,
4669
- createRun: Z,
4670
- deleteRun: X,
4671
- getRunOrders: F,
4672
- getRunTags: oe,
4673
- getRuns: H,
4674
- updateRun: W
4675
- }, Symbol.toStringTag, { value: "Module" })), re = {
4674
+ createOrder: se,
4675
+ createRun: X,
4676
+ deleteRun: oe,
4677
+ getRunOrders: V,
4678
+ getRunTags: ie,
4679
+ getRuns: K,
4680
+ updateRun: ne
4681
+ }, Symbol.toStringTag, { value: "Module" })), j = f.extend({
4682
+ // Target and stop loss prices
4683
+ targetPrice: number$1().optional(),
4684
+ stopLossPrice: number$1().optional(),
4685
+ // Trade outcome
4686
+ targetAchieved: boolean().optional(),
4687
+ stopLossHit: boolean().optional(),
4688
+ // Timing information
4689
+ timeToTargetMinutes: number$1().optional(),
4690
+ timeToStopLossMinutes: number$1().optional(),
4691
+ targetTimestamp: string().optional(),
4692
+ stopLossTimestamp: string().optional()
4693
+ }), ue = {
4676
4694
  query: object({
4677
4695
  datetime: n,
4678
4696
  timezone: o.optional(),
4679
- type: _enum(t$1)
4697
+ type: _enum(t$1),
4698
+ scope: m.optional(),
4699
+ takeProfitPercentage: number().min(0).optional().default(2),
4700
+ stopLossPercentage: number().min(0).max(100).optional().default(1.5)
4680
4701
  }),
4681
4702
  response: t.extend({
4682
4703
  data: object({
@@ -4685,23 +4706,24 @@ const p = object({
4685
4706
  timestamp: string(),
4686
4707
  // Format: YYYY-MM-DDTHH:mm:ss (UTC)
4687
4708
  shortlistType: _enum(t$1),
4688
- entries: array(y)
4709
+ entries: array(j)
4689
4710
  }).nullable()
4690
4711
  })
4691
4712
  })
4692
- }, se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4713
+ }, ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4693
4714
  __proto__: null,
4694
- getShortlists: re
4695
- }, Symbol.toStringTag, { value: "Module" })), fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4715
+ getShortlists: ue,
4716
+ shortlistEntryWithMetricsSchema: j
4717
+ }, Symbol.toStringTag, { value: "Module" })), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4696
4718
  __proto__: null,
4697
- v1_dashboard_auth_schemas: G,
4698
- v1_dashboard_available_datetimes_schemas: D,
4699
- v1_dashboard_candles_schemas: M,
4700
- v1_dashboard_daily_persistent_companies_schemas: R,
4701
- v1_dashboard_daily_unique_companies_schemas: E,
4702
- v1_dashboard_quote_timeline_schemas: Q,
4703
- v1_dashboard_runs_schemas: ae,
4704
- v1_dashboard_shortlists_schemas: se
4719
+ v1_dashboard_auth_schemas: H,
4720
+ v1_dashboard_available_datetimes_schemas: R,
4721
+ v1_dashboard_candles_schemas: E,
4722
+ v1_dashboard_daily_persistent_companies_schemas: I,
4723
+ v1_dashboard_daily_unique_companies_schemas: G,
4724
+ v1_dashboard_quote_timeline_schemas: $,
4725
+ v1_dashboard_runs_schemas: le,
4726
+ v1_dashboard_shortlists_schemas: ce
4705
4727
  }, Symbol.toStringTag, { value: "Module" }));
4706
4728
  ({
4707
4729
  response: t.extend({
@@ -4785,8 +4807,8 @@ function getAugmentedNamespace(n2) {
4785
4807
  } else a2 = {};
4786
4808
  Object.defineProperty(a2, "__esModule", { value: true });
4787
4809
  Object.keys(n2).forEach(function(k2) {
4788
- var d2 = Object.getOwnPropertyDescriptor(n2, k2);
4789
- Object.defineProperty(a2, k2, d2.get ? d2 : {
4810
+ var d = Object.getOwnPropertyDescriptor(n2, k2);
4811
+ Object.defineProperty(a2, k2, d.get ? d : {
4790
4812
  enumerable: true,
4791
4813
  get: function() {
4792
4814
  return n2[k2];
@@ -4841,10 +4863,10 @@ var utc$1 = { exports: {} };
4841
4863
  var o3 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
4842
4864
  return (r2 = this.local().add(u2 + o3, t2)).$offset = u2, r2.$x.$localOffset = o3, r2;
4843
4865
  };
4844
- var h = u.format;
4866
+ var h2 = u.format;
4845
4867
  u.format = function(t3) {
4846
4868
  var i3 = t3 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
4847
- return h.call(this, i3);
4869
+ return h2.call(this, i3);
4848
4870
  }, u.valueOf = function() {
4849
4871
  var t3 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
4850
4872
  return this.$d.valueOf() - 6e4 * t3;
@@ -4890,8 +4912,8 @@ var timezone$1 = { exports: {} };
4890
4912
  var f3 = i3[u2], s2 = f3.type, m2 = f3.value, c2 = t2[s2];
4891
4913
  c2 >= 0 && (r2[c2] = parseInt(m2, 10));
4892
4914
  }
4893
- var d2 = r2[3], l2 = 24 === d2 ? 0 : d2, h = r2[0] + "-" + r2[1] + "-" + r2[2] + " " + l2 + ":" + r2[4] + ":" + r2[5] + ":000", v2 = +e2;
4894
- return (o2.utc(h).valueOf() - (v2 -= v2 % 1e3)) / 6e4;
4915
+ var d = r2[3], l2 = 24 === d ? 0 : d, h2 = r2[0] + "-" + r2[1] + "-" + r2[2] + " " + l2 + ":" + r2[4] + ":" + r2[5] + ":000", v = +e2;
4916
+ return (o2.utc(h2).valueOf() - (v -= v % 1e3)) / 6e4;
4895
4917
  }, f2 = i2.prototype;
4896
4918
  f2.tz = function(t3, e2) {
4897
4919
  void 0 === t3 && (t3 = r);
@@ -4921,8 +4943,8 @@ var timezone$1 = { exports: {} };
4921
4943
  if (e3 === o3) return [i4, e3];
4922
4944
  var r2 = u(i4 -= 60 * (o3 - e3) * 1e3, n4);
4923
4945
  return o3 === r2 ? [i4, o3] : [t4 - 60 * Math.min(o3, r2) * 1e3, Math.max(o3, r2)];
4924
- }(o2.utc(t3, i3).valueOf(), f3, a3), m2 = s2[0], c2 = s2[1], d2 = o2(m2).utcOffset(c2);
4925
- return d2.$x.$timezone = a3, d2;
4946
+ }(o2.utc(t3, i3).valueOf(), f3, a3), m2 = s2[0], c2 = s2[1], d = o2(m2).utcOffset(c2);
4947
+ return d.$x.$timezone = a3, d;
4926
4948
  }, o2.tz.guess = function() {
4927
4949
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
4928
4950
  }, o2.tz.setDefault = function(t3) {
@@ -5623,9 +5645,9 @@ class InterceptorManager {
5623
5645
  * @returns {void}
5624
5646
  */
5625
5647
  forEach(fn) {
5626
- utils$1.forEach(this.handlers, function forEachHandler(h) {
5627
- if (h !== null) {
5628
- fn(h);
5648
+ utils$1.forEach(this.handlers, function forEachHandler(h2) {
5649
+ if (h2 !== null) {
5650
+ fn(h2);
5629
5651
  }
5630
5652
  });
5631
5653
  }
@@ -7990,7 +8012,7 @@ const fetchCandles = ({
7990
8012
  );
7991
8013
  }
7992
8014
  try {
7993
- const validatedParams = he.getGrowwHistoricalCandles.query.parse(params);
8015
+ const validatedParams = Te.getGrowwHistoricalCandles.query.parse(params);
7994
8016
  const headers = {
7995
8017
  Authorization: `Bearer ${developerToken}`
7996
8018
  };
@@ -8034,7 +8056,7 @@ const fetchQuote = ({
8034
8056
  );
8035
8057
  }
8036
8058
  try {
8037
- const validatedParams = he.getGrowwQuote.query.parse(params);
8059
+ const validatedParams = Te.getGrowwQuote.query.parse(params);
8038
8060
  const headers = {
8039
8061
  Authorization: `Bearer ${developerToken}`
8040
8062
  };
@@ -8074,7 +8096,7 @@ const fetchQuoteTimeline = ({
8074
8096
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8075
8097
  }
8076
8098
  try {
8077
- const validatedParams = he.getGrowwQuoteTimeline.query.parse({
8099
+ const validatedParams = Te.getGrowwQuoteTimeline.query.parse({
8078
8100
  symbol,
8079
8101
  end_datetime
8080
8102
  });
@@ -8121,7 +8143,7 @@ const fetchShortlist = ({
8121
8143
  );
8122
8144
  }
8123
8145
  try {
8124
- const validatedParams = Se.getLists.query.parse(queryParams);
8146
+ const validatedParams = Pe.getLists.query.parse(queryParams);
8125
8147
  const headers = {
8126
8148
  Authorization: `Bearer ${developerToken}`
8127
8149
  };
@@ -8165,7 +8187,7 @@ const fetchShortlistPersistence = ({
8165
8187
  );
8166
8188
  }
8167
8189
  try {
8168
- const validatedParams = ve.getShortlistPersistence.query.parse(queryParams);
8190
+ const validatedParams = xe.getShortlistPersistence.query.parse(queryParams);
8169
8191
  const headers = {
8170
8192
  Authorization: `Bearer ${developerToken}`
8171
8193
  };
@@ -8209,7 +8231,7 @@ const fetchNiftyQuote = ({
8209
8231
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8210
8232
  }
8211
8233
  try {
8212
- const validatedParams = he.getGrowwNiftyQuote.query.parse(params);
8234
+ const validatedParams = Te.getGrowwNiftyQuote.query.parse(params);
8213
8235
  const headers = {
8214
8236
  Authorization: `Bearer ${developerToken}`
8215
8237
  };
@@ -8251,7 +8273,7 @@ const fetchNiftyQuoteTimeline = ({
8251
8273
  throw new Error("Developer token not found. Please set DEVELOPER_KEY environment variable.");
8252
8274
  }
8253
8275
  try {
8254
- const validatedParams = he.getGrowwNiftyQuoteTimeline.query.parse({
8276
+ const validatedParams = Te.getGrowwNiftyQuoteTimeline.query.parse({
8255
8277
  end_datetime
8256
8278
  });
8257
8279
  const headers = {
@@ -8360,7 +8382,7 @@ const placeOrder = ({ runId, apiClient }) => async (data) => {
8360
8382
  try {
8361
8383
  await retryWithBackoff(
8362
8384
  async () => {
8363
- const validatedData = fe.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8385
+ const validatedData = qe.v1_dashboard_runs_schemas.createOrder.body.parse(data);
8364
8386
  await apiClient.post(`/v1/dashboard/runs/${runId}/orders`, validatedData);
8365
8387
  logger.debug(`Order persisted for ${data.nseSymbol} in runId: ${runId}`);
8366
8388
  },
@@ -8477,9 +8499,9 @@ var calendar$1 = { exports: {} };
8477
8499
  module2.exports = t2();
8478
8500
  }(commonjsGlobal, function() {
8479
8501
  return function(e, t2, a2) {
8480
- 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" };
8502
+ var n2 = "h:mm A", d = { lastDay: "[Yesterday at] " + n2, sameDay: "[Today at] " + n2, nextDay: "[Tomorrow at] " + n2, nextWeek: "dddd [at] " + n2, lastWeek: "[Last] dddd [at] " + n2, sameElse: "MM/DD/YYYY" };
8481
8503
  t2.prototype.calendar = function(e2, t3) {
8482
- 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];
8504
+ var n3 = t3 || this.$locale().calendar || d, o2 = a2(e2 || void 0).startOf("d"), s = this.diff(o2, "d", true), i2 = "sameElse", f2 = s < -6 ? i2 : s < -1 ? "lastWeek" : s < 0 ? "lastDay" : s < 1 ? "sameDay" : s < 2 ? "nextDay" : s < 7 ? "nextWeek" : i2, l2 = n3[f2] || d[f2];
8483
8505
  return "function" == typeof l2 ? l2.call(this, a2()) : this.format(l2);
8484
8506
  };
8485
8507
  };
@@ -8498,15 +8520,15 @@ var relativeTime$1 = { exports: {} };
8498
8520
  function i2(r2, e2, t3, o3) {
8499
8521
  return n2.fromToBase(r2, e2, t3, o3);
8500
8522
  }
8501
- t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i3, d3, u) {
8502
- 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) {
8503
- var y2 = h[c2];
8504
- y2.d && (f2 = d3 ? t2(e2).diff(i3, y2.d, true) : i3.diff(e2, y2.d, true));
8523
+ t2.en.relativeTime = o2, n2.fromToBase = function(e2, n3, i3, d2, u) {
8524
+ for (var f2, a2, s, l2 = i3.$locale().relativeTime || o2, h2 = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m2 = h2.length, c2 = 0; c2 < m2; c2 += 1) {
8525
+ var y2 = h2[c2];
8526
+ y2.d && (f2 = d2 ? t2(e2).diff(i3, y2.d, true) : i3.diff(e2, y2.d, true));
8505
8527
  var p2 = (r.rounding || Math.round)(Math.abs(f2));
8506
8528
  if (s = f2 > 0, p2 <= y2.r || !y2.r) {
8507
- p2 <= 1 && c2 > 0 && (y2 = h[c2 - 1]);
8508
- var v2 = l2[y2.l];
8509
- u && (p2 = u("" + p2)), a2 = "string" == typeof v2 ? v2.replace("%d", p2) : v2(p2, n3, y2.l, s);
8529
+ p2 <= 1 && c2 > 0 && (y2 = h2[c2 - 1]);
8530
+ var v = l2[y2.l];
8531
+ u && (p2 = u("" + p2)), a2 = "string" == typeof v ? v.replace("%d", p2) : v(p2, n3, y2.l, s);
8510
8532
  break;
8511
8533
  }
8512
8534
  }
@@ -8518,13 +8540,13 @@ var relativeTime$1 = { exports: {} };
8518
8540
  }, n2.from = function(r2, e2) {
8519
8541
  return i2(r2, e2, this);
8520
8542
  };
8521
- var d2 = function(r2) {
8543
+ var d = function(r2) {
8522
8544
  return r2.$u ? t2.utc() : t2();
8523
8545
  };
8524
8546
  n2.toNow = function(r2) {
8525
- return this.to(d2(this), r2);
8547
+ return this.to(d(this), r2);
8526
8548
  }, n2.fromNow = function(r2) {
8527
- return this.from(d2(this), r2);
8549
+ return this.from(d(this), r2);
8528
8550
  };
8529
8551
  };
8530
8552
  });
@@ -8747,6 +8769,6 @@ async function ganaka({
8747
8769
  }
8748
8770
  }
8749
8771
  exports.ganaka = ganaka;
8750
- exports.growwQuotePayloadSchema = _;
8772
+ exports.growwQuotePayloadSchema = S;
8751
8773
  exports.growwQuoteSchema = a;
8752
8774
  //# sourceMappingURL=index.js.map