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