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