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