@solidtime/api 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +399 -6
- package/dist/openapi.json.client.d.ts +820 -49
- package/dist/solidtime-api.js +380 -218
- package/dist/solidtime-api.umd.cjs +6 -6
- package/package.json +1 -1
package/dist/solidtime-api.js
CHANGED
|
@@ -3,7 +3,7 @@ function os(s, e) {
|
|
|
3
3
|
return s.apply(e, arguments);
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
const { toString: Vs } = Object.prototype, { getPrototypeOf:
|
|
6
|
+
const { toString: Vs } = Object.prototype, { getPrototypeOf: Ot } = Object, st = /* @__PURE__ */ ((s) => (e) => {
|
|
7
7
|
const r = Vs.call(e);
|
|
8
8
|
return s[r] || (s[r] = r.slice(8, -1).toLowerCase());
|
|
9
9
|
})(/* @__PURE__ */ Object.create(null)), V = (s) => (s = s.toLowerCase(), (e) => st(e) === s), rt = (s) => (e) => typeof e === s, { isArray: ye } = Array, we = rt("undefined");
|
|
@@ -15,10 +15,10 @@ function Ws(s) {
|
|
|
15
15
|
let e;
|
|
16
16
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(s) : e = s && s.buffer && cs(s.buffer), e;
|
|
17
17
|
}
|
|
18
|
-
const Qs = rt("string"), q = rt("function"), us = rt("number"), nt = (s) => s !== null && typeof s == "object", Js = (s) => s === !0 || s === !1,
|
|
18
|
+
const Qs = rt("string"), q = rt("function"), us = rt("number"), nt = (s) => s !== null && typeof s == "object", Js = (s) => s === !0 || s === !1, $e = (s) => {
|
|
19
19
|
if (st(s) !== "object")
|
|
20
20
|
return !1;
|
|
21
|
-
const e =
|
|
21
|
+
const e = Ot(s);
|
|
22
22
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in s) && !(Symbol.iterator in s);
|
|
23
23
|
}, Ks = V("Date"), Gs = V("File"), Xs = V("Blob"), Ys = V("FileList"), er = (s) => nt(s) && q(s.pipe), tr = (s) => {
|
|
24
24
|
let e;
|
|
@@ -52,7 +52,7 @@ const ne = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
52
52
|
function yt() {
|
|
53
53
|
const { caseless: s } = ls(this) && this || {}, e = {}, r = (n, a) => {
|
|
54
54
|
const i = s && ds(e, a) || a;
|
|
55
|
-
|
|
55
|
+
$e(e[i]) && $e(n) ? e[i] = yt(e[i], n) : $e(n) ? e[i] = yt({}, n) : ye(n) ? e[i] = n.slice() : e[i] = n;
|
|
56
56
|
};
|
|
57
57
|
for (let n = 0, a = arguments.length; n < a; n++)
|
|
58
58
|
arguments[n] && Ze(arguments[n], r);
|
|
@@ -71,7 +71,7 @@ const cr = (s, e, r, { allOwnKeys: n } = {}) => (Ze(e, (a, i) => {
|
|
|
71
71
|
do {
|
|
72
72
|
for (a = Object.getOwnPropertyNames(s), i = a.length; i-- > 0; )
|
|
73
73
|
o = a[i], (!n || n(o, s, e)) && !c[o] && (e[o] = s[o], c[o] = !0);
|
|
74
|
-
s = r !== !1 &&
|
|
74
|
+
s = r !== !1 && Ot(s);
|
|
75
75
|
} while (s && (!r || r(s, e)) && s !== Object.prototype);
|
|
76
76
|
return e;
|
|
77
77
|
}, hr = (s, e, r) => {
|
|
@@ -87,7 +87,7 @@ const cr = (s, e, r, { allOwnKeys: n } = {}) => (Ze(e, (a, i) => {
|
|
|
87
87
|
for (; e-- > 0; )
|
|
88
88
|
r[e] = s[e];
|
|
89
89
|
return r;
|
|
90
|
-
}, mr = /* @__PURE__ */ ((s) => (e) => s && e instanceof s)(typeof Uint8Array < "u" &&
|
|
90
|
+
}, mr = /* @__PURE__ */ ((s) => (e) => s && e instanceof s)(typeof Uint8Array < "u" && Ot(Uint8Array)), fr = (s, e) => {
|
|
91
91
|
const n = (s && s[Symbol.iterator]).call(s);
|
|
92
92
|
let a;
|
|
93
93
|
for (; (a = n.next()) && !a.done; ) {
|
|
@@ -182,7 +182,7 @@ const Er = (s) => {
|
|
|
182
182
|
isNumber: us,
|
|
183
183
|
isBoolean: Js,
|
|
184
184
|
isObject: nt,
|
|
185
|
-
isPlainObject:
|
|
185
|
+
isPlainObject: $e,
|
|
186
186
|
isReadableStream: rr,
|
|
187
187
|
isRequest: nr,
|
|
188
188
|
isResponse: ar,
|
|
@@ -282,7 +282,7 @@ x.from = (s, e, r, n, a, i) => {
|
|
|
282
282
|
return d !== Error.prototype;
|
|
283
283
|
}, (c) => c !== "isAxiosError"), x.call(o, s.message, e, r, n, a), o.cause = s, o.name = s.name, i && Object.assign(o, i), o;
|
|
284
284
|
};
|
|
285
|
-
const
|
|
285
|
+
const Pr = null;
|
|
286
286
|
function bt(s) {
|
|
287
287
|
return l.isPlainObject(s) || l.isArray(s);
|
|
288
288
|
}
|
|
@@ -294,7 +294,7 @@ function Lt(s, e, r) {
|
|
|
294
294
|
return a = ys(a), !r && i ? "[" + a + "]" : a;
|
|
295
295
|
}).join(r ? "." : "") : e;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Or(s) {
|
|
298
298
|
return l.isArray(s) && !s.some(bt);
|
|
299
299
|
}
|
|
300
300
|
const Nr = l.toFlatObject(l, {}, null, function(e) {
|
|
@@ -326,7 +326,7 @@ function at(s, e, r) {
|
|
|
326
326
|
if (_ && !y && typeof _ == "object") {
|
|
327
327
|
if (l.endsWith(E, "{}"))
|
|
328
328
|
E = n ? E : E.slice(0, -2), _ = JSON.stringify(_);
|
|
329
|
-
else if (l.isArray(_) &&
|
|
329
|
+
else if (l.isArray(_) && Or(_) || (l.isFileList(_) || l.endsWith(E, "[]")) && (I = l.toArray(_)))
|
|
330
330
|
return E = ys(E), I.forEach(function(A, N) {
|
|
331
331
|
!(l.isUndefined(A) || A === null) && e.append(
|
|
332
332
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -361,7 +361,7 @@ function at(s, e, r) {
|
|
|
361
361
|
throw new TypeError("data must be an object");
|
|
362
362
|
return S(s), e;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Bt(s) {
|
|
365
365
|
const e = {
|
|
366
366
|
"!": "%21",
|
|
367
367
|
"'": "%27",
|
|
@@ -384,19 +384,19 @@ bs.append = function(e, r) {
|
|
|
384
384
|
};
|
|
385
385
|
bs.toString = function(e) {
|
|
386
386
|
const r = e ? function(n) {
|
|
387
|
-
return e.call(this, n,
|
|
388
|
-
} :
|
|
387
|
+
return e.call(this, n, Bt);
|
|
388
|
+
} : Bt;
|
|
389
389
|
return this._pairs.map(function(a) {
|
|
390
390
|
return r(a[0]) + "=" + r(a[1]);
|
|
391
391
|
}, "").join("&");
|
|
392
392
|
};
|
|
393
|
-
function
|
|
393
|
+
function zr(s) {
|
|
394
394
|
return encodeURIComponent(s).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
395
395
|
}
|
|
396
396
|
function _s(s, e, r) {
|
|
397
397
|
if (!e)
|
|
398
398
|
return s;
|
|
399
|
-
const n = r && r.encode ||
|
|
399
|
+
const n = r && r.encode || zr, a = r && r.serialize;
|
|
400
400
|
let i;
|
|
401
401
|
if (a ? i = a(e, r) : i = l.isURLSearchParams(e) ? e.toString() : new Nt(e, r).toString(n), i) {
|
|
402
402
|
const o = s.indexOf("#");
|
|
@@ -404,7 +404,7 @@ function _s(s, e, r) {
|
|
|
404
404
|
}
|
|
405
405
|
return s;
|
|
406
406
|
}
|
|
407
|
-
class
|
|
407
|
+
class Dt {
|
|
408
408
|
constructor() {
|
|
409
409
|
this.handlers = [];
|
|
410
410
|
}
|
|
@@ -462,27 +462,27 @@ const vs = {
|
|
|
462
462
|
silentJSONParsing: !0,
|
|
463
463
|
forcedJSONParsing: !0,
|
|
464
464
|
clarifyTimeoutError: !1
|
|
465
|
-
},
|
|
465
|
+
}, Cr = typeof URLSearchParams < "u" ? URLSearchParams : Nt, Ir = typeof FormData < "u" ? FormData : null, Ur = typeof Blob < "u" ? Blob : null, Zr = {
|
|
466
466
|
isBrowser: !0,
|
|
467
467
|
classes: {
|
|
468
|
-
URLSearchParams:
|
|
468
|
+
URLSearchParams: Cr,
|
|
469
469
|
FormData: Ir,
|
|
470
470
|
Blob: Ur
|
|
471
471
|
},
|
|
472
472
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
473
|
-
},
|
|
474
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Lr =
|
|
473
|
+
}, zt = typeof window < "u" && typeof document < "u", _t = typeof navigator == "object" && navigator || void 0, qr = zt && (!_t || ["ReactNative", "NativeScript", "NS"].indexOf(_t.product) < 0), Mr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
474
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Lr = zt && window.location.href || "http://localhost", Br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
475
475
|
__proto__: null,
|
|
476
|
-
hasBrowserEnv:
|
|
476
|
+
hasBrowserEnv: zt,
|
|
477
477
|
hasStandardBrowserEnv: qr,
|
|
478
478
|
hasStandardBrowserWebWorkerEnv: Mr,
|
|
479
479
|
navigator: _t,
|
|
480
480
|
origin: Lr
|
|
481
481
|
}, Symbol.toStringTag, { value: "Module" })), M = {
|
|
482
|
-
...
|
|
482
|
+
...Br,
|
|
483
483
|
...Zr
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function Dr(s, e) {
|
|
486
486
|
return at(s, new M.classes.URLSearchParams(), Object.assign({
|
|
487
487
|
visitor: function(r, n, a, i) {
|
|
488
488
|
return M.isNode && l.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
@@ -542,7 +542,7 @@ const qe = {
|
|
|
542
542
|
let c;
|
|
543
543
|
if (i) {
|
|
544
544
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
545
|
-
return
|
|
545
|
+
return Dr(e, this.formSerializer).toString();
|
|
546
546
|
if ((c = l.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
547
547
|
const d = this.env && this.env.FormData;
|
|
548
548
|
return at(
|
|
@@ -624,8 +624,8 @@ const Hr = l.toObjectSet([
|
|
|
624
624
|
function _e(s) {
|
|
625
625
|
return s && String(s).trim().toLowerCase();
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return s === !1 || s == null ? s : l.isArray(s) ? s.map(
|
|
627
|
+
function Ve(s) {
|
|
628
|
+
return s === !1 || s == null ? s : l.isArray(s) ? s.map(Ve) : String(s);
|
|
629
629
|
}
|
|
630
630
|
function Qr(s) {
|
|
631
631
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -670,7 +670,7 @@ class U {
|
|
|
670
670
|
if (!h)
|
|
671
671
|
throw new Error("header name must be a non-empty string");
|
|
672
672
|
const m = l.findKey(a, h);
|
|
673
|
-
(!m || a[m] === void 0 || u === !0 || u === void 0 && a[m] !== !1) && (a[m || d] =
|
|
673
|
+
(!m || a[m] === void 0 || u === !0 || u === void 0 && a[m] !== !1) && (a[m || d] = Ve(c));
|
|
674
674
|
}
|
|
675
675
|
const o = (c, d) => l.forEach(c, (u, h) => i(u, h, d));
|
|
676
676
|
if (l.isPlainObject(e) || e instanceof this.constructor)
|
|
@@ -733,11 +733,11 @@ class U {
|
|
|
733
733
|
return l.forEach(this, (a, i) => {
|
|
734
734
|
const o = l.findKey(n, i);
|
|
735
735
|
if (o) {
|
|
736
|
-
r[o] =
|
|
736
|
+
r[o] = Ve(a), delete r[i];
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
739
|
const c = e ? Kr(i) : String(i).trim();
|
|
740
|
-
c !== i && delete r[i], r[c] =
|
|
740
|
+
c !== i && delete r[i], r[c] = Ve(a), n[c] = !0;
|
|
741
741
|
}), this;
|
|
742
742
|
}
|
|
743
743
|
concat(...e) {
|
|
@@ -1049,10 +1049,10 @@ const Ts = (s) => {
|
|
|
1049
1049
|
config: s,
|
|
1050
1050
|
request: y
|
|
1051
1051
|
};
|
|
1052
|
-
xs(function(
|
|
1053
|
-
r(
|
|
1054
|
-
}, function(
|
|
1055
|
-
n(
|
|
1052
|
+
xs(function(B) {
|
|
1053
|
+
r(B), E();
|
|
1054
|
+
}, function(B) {
|
|
1055
|
+
n(B), E();
|
|
1056
1056
|
}, J), y = null;
|
|
1057
1057
|
}
|
|
1058
1058
|
"onloadend" in y ? y.onloadend = I : y.onreadystatechange = function() {
|
|
@@ -1210,17 +1210,17 @@ const hn = async (s) => {
|
|
|
1210
1210
|
let Z;
|
|
1211
1211
|
try {
|
|
1212
1212
|
if (d && ln && r !== "get" && r !== "head" && (Z = await pn(h, n)) !== 0) {
|
|
1213
|
-
let
|
|
1213
|
+
let B = new Request(e, {
|
|
1214
1214
|
method: "POST",
|
|
1215
1215
|
body: n,
|
|
1216
1216
|
duplex: "half"
|
|
1217
1217
|
}), de;
|
|
1218
|
-
if (l.isFormData(n) && (de =
|
|
1218
|
+
if (l.isFormData(n) && (de = B.headers.get("content-type")) && h.setContentType(de), B.body) {
|
|
1219
1219
|
const [ut, Le] = $t(
|
|
1220
1220
|
Z,
|
|
1221
1221
|
He(Vt(d))
|
|
1222
1222
|
);
|
|
1223
|
-
n = Wt(
|
|
1223
|
+
n = Wt(B.body, Qt, ut, Le, vt);
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
1226
|
l.isString(m) || (m = m ? "include" : "omit");
|
|
@@ -1237,9 +1237,9 @@ const hn = async (s) => {
|
|
|
1237
1237
|
let N = await fetch(y);
|
|
1238
1238
|
const J = jt && (u === "stream" || u === "response");
|
|
1239
1239
|
if (jt && (c || J)) {
|
|
1240
|
-
const
|
|
1240
|
+
const B = {};
|
|
1241
1241
|
["status", "statusText", "headers"].forEach((Zt) => {
|
|
1242
|
-
|
|
1242
|
+
B[Zt] = N[Zt];
|
|
1243
1243
|
});
|
|
1244
1244
|
const de = l.toFiniteNumber(N.headers.get("content-length")), [ut, Le] = c && $t(
|
|
1245
1245
|
de,
|
|
@@ -1249,13 +1249,13 @@ const hn = async (s) => {
|
|
|
1249
1249
|
Wt(N.body, Qt, ut, () => {
|
|
1250
1250
|
Le && Le(), J && I();
|
|
1251
1251
|
}, vt),
|
|
1252
|
-
|
|
1252
|
+
B
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
1255
1255
|
u = u || "text";
|
|
1256
1256
|
let ct = await We[l.findKey(We, u) || "text"](N, s);
|
|
1257
|
-
return !J && I(), _ && _(), await new Promise((
|
|
1258
|
-
xs(
|
|
1257
|
+
return !J && I(), _ && _(), await new Promise((B, de) => {
|
|
1258
|
+
xs(B, de, {
|
|
1259
1259
|
data: ct,
|
|
1260
1260
|
headers: U.from(N.headers),
|
|
1261
1261
|
status: N.status,
|
|
@@ -1273,7 +1273,7 @@ const hn = async (s) => {
|
|
|
1273
1273
|
) : x.from(A, A && A.code, s, y);
|
|
1274
1274
|
}
|
|
1275
1275
|
}), wt = {
|
|
1276
|
-
http:
|
|
1276
|
+
http: Pr,
|
|
1277
1277
|
xhr: on,
|
|
1278
1278
|
fetch: mn
|
|
1279
1279
|
};
|
|
@@ -1339,14 +1339,14 @@ function Kt(s) {
|
|
|
1339
1339
|
), n.response.headers = U.from(n.response.headers))), Promise.reject(n);
|
|
1340
1340
|
});
|
|
1341
1341
|
}
|
|
1342
|
-
const As = "1.7.5",
|
|
1342
|
+
const As = "1.7.5", Ct = {};
|
|
1343
1343
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((s, e) => {
|
|
1344
|
-
|
|
1344
|
+
Ct[s] = function(n) {
|
|
1345
1345
|
return typeof n === s || "a" + (e < 1 ? "n " : " ") + s;
|
|
1346
1346
|
};
|
|
1347
1347
|
});
|
|
1348
1348
|
const Gt = {};
|
|
1349
|
-
|
|
1349
|
+
Ct.transitional = function(e, r, n) {
|
|
1350
1350
|
function a(i, o) {
|
|
1351
1351
|
return "[Axios v" + As + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1352
1352
|
}
|
|
@@ -1383,13 +1383,13 @@ function gn(s, e, r) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
const xt = {
|
|
1385
1385
|
assertOptions: gn,
|
|
1386
|
-
validators:
|
|
1386
|
+
validators: Ct
|
|
1387
1387
|
}, X = xt.validators;
|
|
1388
1388
|
class ae {
|
|
1389
1389
|
constructor(e) {
|
|
1390
1390
|
this.defaults = e, this.interceptors = {
|
|
1391
|
-
request: new
|
|
1392
|
-
response: new
|
|
1391
|
+
request: new Dt(),
|
|
1392
|
+
response: new Dt()
|
|
1393
1393
|
};
|
|
1394
1394
|
}
|
|
1395
1395
|
/**
|
|
@@ -1649,32 +1649,32 @@ const kt = {
|
|
|
1649
1649
|
Object.entries(kt).forEach(([s, e]) => {
|
|
1650
1650
|
kt[e] = s;
|
|
1651
1651
|
});
|
|
1652
|
-
function
|
|
1652
|
+
function Ps(s) {
|
|
1653
1653
|
const e = new ae(s), r = os(ae.prototype.request, e);
|
|
1654
1654
|
return l.extend(r, ae.prototype, e, { allOwnKeys: !0 }), l.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(a) {
|
|
1655
|
-
return
|
|
1655
|
+
return Ps(oe(s, a));
|
|
1656
1656
|
}, r;
|
|
1657
1657
|
}
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1658
|
+
const O = Ps(qe);
|
|
1659
|
+
O.Axios = ae;
|
|
1660
|
+
O.CanceledError = be;
|
|
1661
|
+
O.CancelToken = It;
|
|
1662
|
+
O.isCancel = ws;
|
|
1663
|
+
O.VERSION = As;
|
|
1664
|
+
O.toFormData = at;
|
|
1665
|
+
O.AxiosError = x;
|
|
1666
|
+
O.Cancel = O.CanceledError;
|
|
1667
|
+
O.all = function(e) {
|
|
1668
1668
|
return Promise.all(e);
|
|
1669
1669
|
};
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1670
|
+
O.spread = yn;
|
|
1671
|
+
O.isAxiosError = bn;
|
|
1672
|
+
O.mergeConfig = oe;
|
|
1673
|
+
O.AxiosHeaders = U;
|
|
1674
|
+
O.formToJSON = (s) => js(l.isHTMLForm(s) ? new FormData(s) : s);
|
|
1675
|
+
O.getAdapter = Ss.getAdapter;
|
|
1676
|
+
O.HttpStatusCode = kt;
|
|
1677
|
+
O.default = O;
|
|
1678
1678
|
var R;
|
|
1679
1679
|
(function(s) {
|
|
1680
1680
|
s.assertEqual = (a) => a;
|
|
@@ -1895,12 +1895,12 @@ const me = (s, e) => {
|
|
|
1895
1895
|
}
|
|
1896
1896
|
return { message: r };
|
|
1897
1897
|
};
|
|
1898
|
-
let
|
|
1898
|
+
let Os = me;
|
|
1899
1899
|
function vn(s) {
|
|
1900
|
-
|
|
1900
|
+
Os = s;
|
|
1901
1901
|
}
|
|
1902
1902
|
function Qe() {
|
|
1903
|
-
return
|
|
1903
|
+
return Os;
|
|
1904
1904
|
}
|
|
1905
1905
|
const Je = (s) => {
|
|
1906
1906
|
const { data: e, path: r, errorMaps: n, issueData: a } = s, i = [...r, ...a.path || []], o = {
|
|
@@ -1938,7 +1938,7 @@ function f(s, e) {
|
|
|
1938
1938
|
});
|
|
1939
1939
|
s.common.issues.push(n);
|
|
1940
1940
|
}
|
|
1941
|
-
class
|
|
1941
|
+
class z {
|
|
1942
1942
|
constructor() {
|
|
1943
1943
|
this.value = "valid";
|
|
1944
1944
|
}
|
|
@@ -1966,7 +1966,7 @@ class C {
|
|
|
1966
1966
|
value: o
|
|
1967
1967
|
});
|
|
1968
1968
|
}
|
|
1969
|
-
return
|
|
1969
|
+
return z.mergeObjectSync(e, n);
|
|
1970
1970
|
}
|
|
1971
1971
|
static mergeObjectSync(e, r) {
|
|
1972
1972
|
const n = {};
|
|
@@ -1981,7 +1981,7 @@ class C {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
const j = Object.freeze({
|
|
1983
1983
|
status: "aborted"
|
|
1984
|
-
}), he = (s) => ({ status: "dirty", value: s }),
|
|
1984
|
+
}), he = (s) => ({ status: "dirty", value: s }), C = (s) => ({ status: "valid", value: s }), Et = (s) => s.status === "aborted", Rt = (s) => s.status === "dirty", xe = (s) => s.status === "valid", ke = (s) => typeof Promise < "u" && s instanceof Promise;
|
|
1985
1985
|
function Ke(s, e, r, n) {
|
|
1986
1986
|
if (typeof e == "function" ? s !== e || !n : !e.has(s)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1987
1987
|
return e.get(s);
|
|
@@ -2052,7 +2052,7 @@ class T {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
_processInputParams(e) {
|
|
2054
2054
|
return {
|
|
2055
|
-
status: new
|
|
2055
|
+
status: new z(),
|
|
2056
2056
|
ctx: {
|
|
2057
2057
|
common: e.parent.common,
|
|
2058
2058
|
data: e.data,
|
|
@@ -2170,7 +2170,7 @@ class T {
|
|
|
2170
2170
|
}
|
|
2171
2171
|
default(e) {
|
|
2172
2172
|
const r = typeof e == "function" ? e : () => e;
|
|
2173
|
-
return new
|
|
2173
|
+
return new Ce({
|
|
2174
2174
|
...k(this._def),
|
|
2175
2175
|
innerType: this,
|
|
2176
2176
|
defaultValue: r,
|
|
@@ -2215,23 +2215,23 @@ class T {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
const wn = /^c[^\s-]{8,}$/i, xn = /^[0-9a-z]+$/, kn = /^[0-9A-HJKMNP-TV-Z]{26}$/, Tn = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, En = /^[a-z0-9_-]{21}$/i, Rn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Sn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, An = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
2217
2217
|
let mt;
|
|
2218
|
-
const
|
|
2219
|
-
function
|
|
2218
|
+
const Pn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, On = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Nn = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, zs = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", zn = new RegExp(`^${zs}$`);
|
|
2219
|
+
function Cs(s) {
|
|
2220
2220
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
2221
2221
|
return s.precision ? e = `${e}\\.\\d{${s.precision}}` : s.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
2222
2222
|
}
|
|
2223
|
-
function
|
|
2224
|
-
return new RegExp(`^${
|
|
2223
|
+
function Cn(s) {
|
|
2224
|
+
return new RegExp(`^${Cs(s)}$`);
|
|
2225
2225
|
}
|
|
2226
2226
|
function Is(s) {
|
|
2227
|
-
let e = `${
|
|
2227
|
+
let e = `${zs}T${Cs(s)}`;
|
|
2228
2228
|
const r = [];
|
|
2229
2229
|
return r.push(s.local ? "Z?" : "Z"), s.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
2230
2230
|
}
|
|
2231
2231
|
function In(s, e) {
|
|
2232
|
-
return !!((e === "v4" || !e) &&
|
|
2232
|
+
return !!((e === "v4" || !e) && Pn.test(s) || (e === "v6" || !e) && On.test(s));
|
|
2233
2233
|
}
|
|
2234
|
-
class
|
|
2234
|
+
class D extends T {
|
|
2235
2235
|
_parse(e) {
|
|
2236
2236
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== g.string) {
|
|
2237
2237
|
const i = this._getOrReturnCtx(e);
|
|
@@ -2241,7 +2241,7 @@ class B extends T {
|
|
|
2241
2241
|
received: i.parsedType
|
|
2242
2242
|
}), j;
|
|
2243
2243
|
}
|
|
2244
|
-
const n = new
|
|
2244
|
+
const n = new z();
|
|
2245
2245
|
let a;
|
|
2246
2246
|
for (const i of this._def.checks)
|
|
2247
2247
|
if (i.kind === "min")
|
|
@@ -2351,11 +2351,11 @@ class B extends T {
|
|
|
2351
2351
|
code: p.invalid_string,
|
|
2352
2352
|
validation: "datetime",
|
|
2353
2353
|
message: i.message
|
|
2354
|
-
}), n.dirty()) : i.kind === "date" ?
|
|
2354
|
+
}), n.dirty()) : i.kind === "date" ? zn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2355
2355
|
code: p.invalid_string,
|
|
2356
2356
|
validation: "date",
|
|
2357
2357
|
message: i.message
|
|
2358
|
-
}), n.dirty()) : i.kind === "time" ?
|
|
2358
|
+
}), n.dirty()) : i.kind === "time" ? Cn(i).test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
|
|
2359
2359
|
code: p.invalid_string,
|
|
2360
2360
|
validation: "time",
|
|
2361
2361
|
message: i.message
|
|
@@ -2382,7 +2382,7 @@ class B extends T {
|
|
|
2382
2382
|
});
|
|
2383
2383
|
}
|
|
2384
2384
|
_addCheck(e) {
|
|
2385
|
-
return new
|
|
2385
|
+
return new D({
|
|
2386
2386
|
...this._def,
|
|
2387
2387
|
checks: [...this._def.checks, e]
|
|
2388
2388
|
});
|
|
@@ -2508,19 +2508,19 @@ class B extends T {
|
|
|
2508
2508
|
return this.min(1, b.errToObj(e));
|
|
2509
2509
|
}
|
|
2510
2510
|
trim() {
|
|
2511
|
-
return new
|
|
2511
|
+
return new D({
|
|
2512
2512
|
...this._def,
|
|
2513
2513
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
2516
|
toLowerCase() {
|
|
2517
|
-
return new
|
|
2517
|
+
return new D({
|
|
2518
2518
|
...this._def,
|
|
2519
2519
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
2520
2520
|
});
|
|
2521
2521
|
}
|
|
2522
2522
|
toUpperCase() {
|
|
2523
|
-
return new
|
|
2523
|
+
return new D({
|
|
2524
2524
|
...this._def,
|
|
2525
2525
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
2526
2526
|
});
|
|
@@ -2580,9 +2580,9 @@ class B extends T {
|
|
|
2580
2580
|
return e;
|
|
2581
2581
|
}
|
|
2582
2582
|
}
|
|
2583
|
-
|
|
2583
|
+
D.create = (s) => {
|
|
2584
2584
|
var e;
|
|
2585
|
-
return new
|
|
2585
|
+
return new D({
|
|
2586
2586
|
checks: [],
|
|
2587
2587
|
typeName: v.ZodString,
|
|
2588
2588
|
coerce: (e = s == null ? void 0 : s.coerce) !== null && e !== void 0 ? e : !1,
|
|
@@ -2607,7 +2607,7 @@ class ee extends T {
|
|
|
2607
2607
|
}), j;
|
|
2608
2608
|
}
|
|
2609
2609
|
let n;
|
|
2610
|
-
const a = new
|
|
2610
|
+
const a = new z();
|
|
2611
2611
|
for (const i of this._def.checks)
|
|
2612
2612
|
i.kind === "int" ? R.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), f(n, {
|
|
2613
2613
|
code: p.invalid_type,
|
|
@@ -2779,7 +2779,7 @@ class te extends T {
|
|
|
2779
2779
|
}), j;
|
|
2780
2780
|
}
|
|
2781
2781
|
let n;
|
|
2782
|
-
const a = new
|
|
2782
|
+
const a = new z();
|
|
2783
2783
|
for (const i of this._def.checks)
|
|
2784
2784
|
i.kind === "min" ? (i.inclusive ? e.data < i.value : e.data <= i.value) && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
2785
2785
|
code: p.too_small,
|
|
@@ -2903,7 +2903,7 @@ class Te extends T {
|
|
|
2903
2903
|
received: n.parsedType
|
|
2904
2904
|
}), j;
|
|
2905
2905
|
}
|
|
2906
|
-
return
|
|
2906
|
+
return C(e.data);
|
|
2907
2907
|
}
|
|
2908
2908
|
}
|
|
2909
2909
|
Te.create = (s) => new Te({
|
|
@@ -2927,7 +2927,7 @@ class ce extends T {
|
|
|
2927
2927
|
code: p.invalid_date
|
|
2928
2928
|
}), j;
|
|
2929
2929
|
}
|
|
2930
|
-
const n = new
|
|
2930
|
+
const n = new z();
|
|
2931
2931
|
let a;
|
|
2932
2932
|
for (const i of this._def.checks)
|
|
2933
2933
|
i.kind === "min" ? e.data.getTime() < i.value && (a = this._getOrReturnCtx(e, a), f(a, {
|
|
@@ -2999,7 +2999,7 @@ class Ge extends T {
|
|
|
2999
2999
|
received: n.parsedType
|
|
3000
3000
|
}), j;
|
|
3001
3001
|
}
|
|
3002
|
-
return
|
|
3002
|
+
return C(e.data);
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
3005
|
Ge.create = (s) => new Ge({
|
|
@@ -3016,7 +3016,7 @@ class Ee extends T {
|
|
|
3016
3016
|
received: n.parsedType
|
|
3017
3017
|
}), j;
|
|
3018
3018
|
}
|
|
3019
|
-
return
|
|
3019
|
+
return C(e.data);
|
|
3020
3020
|
}
|
|
3021
3021
|
}
|
|
3022
3022
|
Ee.create = (s) => new Ee({
|
|
@@ -3033,7 +3033,7 @@ class Re extends T {
|
|
|
3033
3033
|
received: n.parsedType
|
|
3034
3034
|
}), j;
|
|
3035
3035
|
}
|
|
3036
|
-
return
|
|
3036
|
+
return C(e.data);
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
3039
|
Re.create = (s) => new Re({
|
|
@@ -3045,7 +3045,7 @@ class fe extends T {
|
|
|
3045
3045
|
super(...arguments), this._any = !0;
|
|
3046
3046
|
}
|
|
3047
3047
|
_parse(e) {
|
|
3048
|
-
return
|
|
3048
|
+
return C(e.data);
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
3051
|
fe.create = (s) => new fe({
|
|
@@ -3057,7 +3057,7 @@ class ie extends T {
|
|
|
3057
3057
|
super(...arguments), this._unknown = !0;
|
|
3058
3058
|
}
|
|
3059
3059
|
_parse(e) {
|
|
3060
|
-
return
|
|
3060
|
+
return C(e.data);
|
|
3061
3061
|
}
|
|
3062
3062
|
}
|
|
3063
3063
|
ie.create = (s) => new ie({
|
|
@@ -3088,7 +3088,7 @@ class Xe extends T {
|
|
|
3088
3088
|
received: n.parsedType
|
|
3089
3089
|
}), j;
|
|
3090
3090
|
}
|
|
3091
|
-
return
|
|
3091
|
+
return C(e.data);
|
|
3092
3092
|
}
|
|
3093
3093
|
}
|
|
3094
3094
|
Xe.create = (s) => new Xe({
|
|
@@ -3131,9 +3131,9 @@ class F extends T {
|
|
|
3131
3131
|
exact: !1,
|
|
3132
3132
|
message: a.maxLength.message
|
|
3133
3133
|
}), n.dirty()), r.common.async)
|
|
3134
|
-
return Promise.all([...r.data].map((o, c) => a.type._parseAsync(new W(r, o, r.path, c)))).then((o) =>
|
|
3134
|
+
return Promise.all([...r.data].map((o, c) => a.type._parseAsync(new W(r, o, r.path, c)))).then((o) => z.mergeArray(n, o));
|
|
3135
3135
|
const i = [...r.data].map((o, c) => a.type._parseSync(new W(r, o, r.path, c)));
|
|
3136
|
-
return
|
|
3136
|
+
return z.mergeArray(n, i);
|
|
3137
3137
|
}
|
|
3138
3138
|
get element() {
|
|
3139
3139
|
return this._def.type;
|
|
@@ -3169,13 +3169,13 @@ F.create = (s, e) => new F({
|
|
|
3169
3169
|
...k(e)
|
|
3170
3170
|
});
|
|
3171
3171
|
function le(s) {
|
|
3172
|
-
if (s instanceof
|
|
3172
|
+
if (s instanceof P) {
|
|
3173
3173
|
const e = {};
|
|
3174
3174
|
for (const r in s.shape) {
|
|
3175
3175
|
const n = s.shape[r];
|
|
3176
3176
|
e[r] = H.create(le(n));
|
|
3177
3177
|
}
|
|
3178
|
-
return new
|
|
3178
|
+
return new P({
|
|
3179
3179
|
...s._def,
|
|
3180
3180
|
shape: () => e
|
|
3181
3181
|
});
|
|
@@ -3184,7 +3184,7 @@ function le(s) {
|
|
|
3184
3184
|
type: le(s.element)
|
|
3185
3185
|
}) : s instanceof H ? H.create(le(s.unwrap())) : s instanceof re ? re.create(le(s.unwrap())) : s instanceof Q ? Q.create(s.items.map((e) => le(e))) : s;
|
|
3186
3186
|
}
|
|
3187
|
-
class
|
|
3187
|
+
class P extends T {
|
|
3188
3188
|
constructor() {
|
|
3189
3189
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
3190
3190
|
}
|
|
@@ -3255,13 +3255,13 @@ class O extends T {
|
|
|
3255
3255
|
});
|
|
3256
3256
|
}
|
|
3257
3257
|
return u;
|
|
3258
|
-
}).then((u) =>
|
|
3258
|
+
}).then((u) => z.mergeObjectSync(n, u)) : z.mergeObjectSync(n, d);
|
|
3259
3259
|
}
|
|
3260
3260
|
get shape() {
|
|
3261
3261
|
return this._def.shape();
|
|
3262
3262
|
}
|
|
3263
3263
|
strict(e) {
|
|
3264
|
-
return b.errToObj, new
|
|
3264
|
+
return b.errToObj, new P({
|
|
3265
3265
|
...this._def,
|
|
3266
3266
|
unknownKeys: "strict",
|
|
3267
3267
|
...e !== void 0 ? {
|
|
@@ -3278,13 +3278,13 @@ class O extends T {
|
|
|
3278
3278
|
});
|
|
3279
3279
|
}
|
|
3280
3280
|
strip() {
|
|
3281
|
-
return new
|
|
3281
|
+
return new P({
|
|
3282
3282
|
...this._def,
|
|
3283
3283
|
unknownKeys: "strip"
|
|
3284
3284
|
});
|
|
3285
3285
|
}
|
|
3286
3286
|
passthrough() {
|
|
3287
|
-
return new
|
|
3287
|
+
return new P({
|
|
3288
3288
|
...this._def,
|
|
3289
3289
|
unknownKeys: "passthrough"
|
|
3290
3290
|
});
|
|
@@ -3307,7 +3307,7 @@ class O extends T {
|
|
|
3307
3307
|
// }) as any;
|
|
3308
3308
|
// };
|
|
3309
3309
|
extend(e) {
|
|
3310
|
-
return new
|
|
3310
|
+
return new P({
|
|
3311
3311
|
...this._def,
|
|
3312
3312
|
shape: () => ({
|
|
3313
3313
|
...this._def.shape(),
|
|
@@ -3321,7 +3321,7 @@ class O extends T {
|
|
|
3321
3321
|
* upgrade if you are experiencing issues.
|
|
3322
3322
|
*/
|
|
3323
3323
|
merge(e) {
|
|
3324
|
-
return new
|
|
3324
|
+
return new P({
|
|
3325
3325
|
unknownKeys: e._def.unknownKeys,
|
|
3326
3326
|
catchall: e._def.catchall,
|
|
3327
3327
|
shape: () => ({
|
|
@@ -3391,7 +3391,7 @@ class O extends T {
|
|
|
3391
3391
|
// return merged;
|
|
3392
3392
|
// }
|
|
3393
3393
|
catchall(e) {
|
|
3394
|
-
return new
|
|
3394
|
+
return new P({
|
|
3395
3395
|
...this._def,
|
|
3396
3396
|
catchall: e
|
|
3397
3397
|
});
|
|
@@ -3400,7 +3400,7 @@ class O extends T {
|
|
|
3400
3400
|
const r = {};
|
|
3401
3401
|
return R.objectKeys(e).forEach((n) => {
|
|
3402
3402
|
e[n] && this.shape[n] && (r[n] = this.shape[n]);
|
|
3403
|
-
}), new
|
|
3403
|
+
}), new P({
|
|
3404
3404
|
...this._def,
|
|
3405
3405
|
shape: () => r
|
|
3406
3406
|
});
|
|
@@ -3409,7 +3409,7 @@ class O extends T {
|
|
|
3409
3409
|
const r = {};
|
|
3410
3410
|
return R.objectKeys(this.shape).forEach((n) => {
|
|
3411
3411
|
e[n] || (r[n] = this.shape[n]);
|
|
3412
|
-
}), new
|
|
3412
|
+
}), new P({
|
|
3413
3413
|
...this._def,
|
|
3414
3414
|
shape: () => r
|
|
3415
3415
|
});
|
|
@@ -3425,7 +3425,7 @@ class O extends T {
|
|
|
3425
3425
|
return R.objectKeys(this.shape).forEach((n) => {
|
|
3426
3426
|
const a = this.shape[n];
|
|
3427
3427
|
e && !e[n] ? r[n] = a : r[n] = a.optional();
|
|
3428
|
-
}), new
|
|
3428
|
+
}), new P({
|
|
3429
3429
|
...this._def,
|
|
3430
3430
|
shape: () => r
|
|
3431
3431
|
});
|
|
@@ -3441,7 +3441,7 @@ class O extends T {
|
|
|
3441
3441
|
i = i._def.innerType;
|
|
3442
3442
|
r[n] = i;
|
|
3443
3443
|
}
|
|
3444
|
-
}), new
|
|
3444
|
+
}), new P({
|
|
3445
3445
|
...this._def,
|
|
3446
3446
|
shape: () => r
|
|
3447
3447
|
});
|
|
@@ -3450,21 +3450,21 @@ class O extends T {
|
|
|
3450
3450
|
return Us(R.objectKeys(this.shape));
|
|
3451
3451
|
}
|
|
3452
3452
|
}
|
|
3453
|
-
|
|
3453
|
+
P.create = (s, e) => new P({
|
|
3454
3454
|
shape: () => s,
|
|
3455
3455
|
unknownKeys: "strip",
|
|
3456
3456
|
catchall: G.create(),
|
|
3457
3457
|
typeName: v.ZodObject,
|
|
3458
3458
|
...k(e)
|
|
3459
3459
|
});
|
|
3460
|
-
|
|
3460
|
+
P.strictCreate = (s, e) => new P({
|
|
3461
3461
|
shape: () => s,
|
|
3462
3462
|
unknownKeys: "strict",
|
|
3463
3463
|
catchall: G.create(),
|
|
3464
3464
|
typeName: v.ZodObject,
|
|
3465
3465
|
...k(e)
|
|
3466
3466
|
});
|
|
3467
|
-
|
|
3467
|
+
P.lazycreate = (s, e) => new P({
|
|
3468
3468
|
shape: s,
|
|
3469
3469
|
unknownKeys: "strip",
|
|
3470
3470
|
catchall: G.create(),
|
|
@@ -3544,7 +3544,7 @@ Se.create = (s, e) => new Se({
|
|
|
3544
3544
|
typeName: v.ZodUnion,
|
|
3545
3545
|
...k(e)
|
|
3546
3546
|
});
|
|
3547
|
-
const K = (s) => s instanceof
|
|
3547
|
+
const K = (s) => s instanceof Oe ? K(s.schema) : s instanceof $ ? K(s.innerType()) : s instanceof Ne ? [s.value] : s instanceof se ? s.options : s instanceof ze ? R.objectValues(s.enum) : s instanceof Ce ? K(s._def.innerType) : s instanceof Ee ? [void 0] : s instanceof Re ? [null] : s instanceof H ? [void 0, ...K(s.unwrap())] : s instanceof re ? [null, ...K(s.unwrap())] : s instanceof Ut || s instanceof Ue ? K(s.unwrap()) : s instanceof Ie ? K(s._def.innerType) : [];
|
|
3548
3548
|
class ot extends T {
|
|
3549
3549
|
_parse(e) {
|
|
3550
3550
|
const { ctx: r } = this._processInputParams(e);
|
|
@@ -3699,7 +3699,7 @@ class Q extends T {
|
|
|
3699
3699
|
const d = this._def.items[c] || this._def.rest;
|
|
3700
3700
|
return d ? d._parse(new W(n, o, n.path, c)) : null;
|
|
3701
3701
|
}).filter((o) => !!o);
|
|
3702
|
-
return n.common.async ? Promise.all(i).then((o) =>
|
|
3702
|
+
return n.common.async ? Promise.all(i).then((o) => z.mergeArray(r, o)) : z.mergeArray(r, i);
|
|
3703
3703
|
}
|
|
3704
3704
|
get items() {
|
|
3705
3705
|
return this._def.items;
|
|
@@ -3721,7 +3721,7 @@ Q.create = (s, e) => {
|
|
|
3721
3721
|
...k(e)
|
|
3722
3722
|
});
|
|
3723
3723
|
};
|
|
3724
|
-
class
|
|
3724
|
+
class Pe extends T {
|
|
3725
3725
|
get keySchema() {
|
|
3726
3726
|
return this._def.keyType;
|
|
3727
3727
|
}
|
|
@@ -3743,19 +3743,19 @@ class Oe extends T {
|
|
|
3743
3743
|
value: o._parse(new W(n, n.data[c], n.path, c)),
|
|
3744
3744
|
alwaysSet: c in n.data
|
|
3745
3745
|
});
|
|
3746
|
-
return n.common.async ?
|
|
3746
|
+
return n.common.async ? z.mergeObjectAsync(r, a) : z.mergeObjectSync(r, a);
|
|
3747
3747
|
}
|
|
3748
3748
|
get element() {
|
|
3749
3749
|
return this._def.valueType;
|
|
3750
3750
|
}
|
|
3751
3751
|
static create(e, r, n) {
|
|
3752
|
-
return r instanceof T ? new
|
|
3752
|
+
return r instanceof T ? new Pe({
|
|
3753
3753
|
keyType: e,
|
|
3754
3754
|
valueType: r,
|
|
3755
3755
|
typeName: v.ZodRecord,
|
|
3756
3756
|
...k(n)
|
|
3757
|
-
}) : new
|
|
3758
|
-
keyType:
|
|
3757
|
+
}) : new Pe({
|
|
3758
|
+
keyType: D.create(),
|
|
3759
3759
|
valueType: e,
|
|
3760
3760
|
typeName: v.ZodRecord,
|
|
3761
3761
|
...k(r)
|
|
@@ -3921,7 +3921,7 @@ class pe extends T {
|
|
|
3921
3921
|
const i = { errorMap: r.common.contextualErrorMap }, o = r.data;
|
|
3922
3922
|
if (this._def.returns instanceof ge) {
|
|
3923
3923
|
const c = this;
|
|
3924
|
-
return
|
|
3924
|
+
return C(async function(...d) {
|
|
3925
3925
|
const u = new L([]), h = await c._def.args.parseAsync(d, i).catch((S) => {
|
|
3926
3926
|
throw u.addIssue(n(d, S)), u;
|
|
3927
3927
|
}), m = await Reflect.apply(o, this, h);
|
|
@@ -3931,7 +3931,7 @@ class pe extends T {
|
|
|
3931
3931
|
});
|
|
3932
3932
|
} else {
|
|
3933
3933
|
const c = this;
|
|
3934
|
-
return
|
|
3934
|
+
return C(function(...d) {
|
|
3935
3935
|
const u = c._def.args.safeParse(d, i);
|
|
3936
3936
|
if (!u.success)
|
|
3937
3937
|
throw new L([n(d, u.error)]);
|
|
@@ -3975,7 +3975,7 @@ class pe extends T {
|
|
|
3975
3975
|
});
|
|
3976
3976
|
}
|
|
3977
3977
|
}
|
|
3978
|
-
class
|
|
3978
|
+
class Oe extends T {
|
|
3979
3979
|
get schema() {
|
|
3980
3980
|
return this._def.getter();
|
|
3981
3981
|
}
|
|
@@ -3984,7 +3984,7 @@ class Pe extends T {
|
|
|
3984
3984
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
3985
3985
|
}
|
|
3986
3986
|
}
|
|
3987
|
-
|
|
3987
|
+
Oe.create = (s, e) => new Oe({
|
|
3988
3988
|
getter: s,
|
|
3989
3989
|
typeName: v.ZodLazy,
|
|
3990
3990
|
...k(e)
|
|
@@ -4038,7 +4038,7 @@ class se extends T {
|
|
|
4038
4038
|
options: n
|
|
4039
4039
|
}), j;
|
|
4040
4040
|
}
|
|
4041
|
-
return
|
|
4041
|
+
return C(e.data);
|
|
4042
4042
|
}
|
|
4043
4043
|
get options() {
|
|
4044
4044
|
return this._def.values;
|
|
@@ -4076,7 +4076,7 @@ class se extends T {
|
|
|
4076
4076
|
}
|
|
4077
4077
|
ve = /* @__PURE__ */ new WeakMap();
|
|
4078
4078
|
se.create = Us;
|
|
4079
|
-
class
|
|
4079
|
+
class ze extends T {
|
|
4080
4080
|
constructor() {
|
|
4081
4081
|
super(...arguments), je.set(this, void 0);
|
|
4082
4082
|
}
|
|
@@ -4098,14 +4098,14 @@ class Ce extends T {
|
|
|
4098
4098
|
options: a
|
|
4099
4099
|
}), j;
|
|
4100
4100
|
}
|
|
4101
|
-
return
|
|
4101
|
+
return C(e.data);
|
|
4102
4102
|
}
|
|
4103
4103
|
get enum() {
|
|
4104
4104
|
return this._def.values;
|
|
4105
4105
|
}
|
|
4106
4106
|
}
|
|
4107
4107
|
je = /* @__PURE__ */ new WeakMap();
|
|
4108
|
-
|
|
4108
|
+
ze.create = (s, e) => new ze({
|
|
4109
4109
|
values: s,
|
|
4110
4110
|
typeName: v.ZodNativeEnum,
|
|
4111
4111
|
...k(e)
|
|
@@ -4123,7 +4123,7 @@ class ge extends T {
|
|
|
4123
4123
|
received: r.parsedType
|
|
4124
4124
|
}), j;
|
|
4125
4125
|
const n = r.parsedType === g.promise ? r.data : Promise.resolve(r.data);
|
|
4126
|
-
return
|
|
4126
|
+
return C(n.then((a) => this._def.type.parseAsync(a, {
|
|
4127
4127
|
path: r.path,
|
|
4128
4128
|
errorMap: r.common.contextualErrorMap
|
|
4129
4129
|
})));
|
|
@@ -4225,7 +4225,7 @@ $.createWithPreprocess = (s, e, r) => new $({
|
|
|
4225
4225
|
});
|
|
4226
4226
|
class H extends T {
|
|
4227
4227
|
_parse(e) {
|
|
4228
|
-
return this._getType(e) === g.undefined ?
|
|
4228
|
+
return this._getType(e) === g.undefined ? C(void 0) : this._def.innerType._parse(e);
|
|
4229
4229
|
}
|
|
4230
4230
|
unwrap() {
|
|
4231
4231
|
return this._def.innerType;
|
|
@@ -4238,7 +4238,7 @@ H.create = (s, e) => new H({
|
|
|
4238
4238
|
});
|
|
4239
4239
|
class re extends T {
|
|
4240
4240
|
_parse(e) {
|
|
4241
|
-
return this._getType(e) === g.null ?
|
|
4241
|
+
return this._getType(e) === g.null ? C(null) : this._def.innerType._parse(e);
|
|
4242
4242
|
}
|
|
4243
4243
|
unwrap() {
|
|
4244
4244
|
return this._def.innerType;
|
|
@@ -4249,7 +4249,7 @@ re.create = (s, e) => new re({
|
|
|
4249
4249
|
typeName: v.ZodNullable,
|
|
4250
4250
|
...k(e)
|
|
4251
4251
|
});
|
|
4252
|
-
class
|
|
4252
|
+
class Ce extends T {
|
|
4253
4253
|
_parse(e) {
|
|
4254
4254
|
const { ctx: r } = this._processInputParams(e);
|
|
4255
4255
|
let n = r.data;
|
|
@@ -4263,7 +4263,7 @@ class ze extends T {
|
|
|
4263
4263
|
return this._def.innerType;
|
|
4264
4264
|
}
|
|
4265
4265
|
}
|
|
4266
|
-
|
|
4266
|
+
Ce.create = (s, e) => new Ce({
|
|
4267
4267
|
innerType: s,
|
|
4268
4268
|
typeName: v.ZodDefault,
|
|
4269
4269
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
@@ -4407,7 +4407,7 @@ function Zs(s, e = {}, r) {
|
|
|
4407
4407
|
}) : fe.create();
|
|
4408
4408
|
}
|
|
4409
4409
|
const qn = {
|
|
4410
|
-
object:
|
|
4410
|
+
object: P.lazycreate
|
|
4411
4411
|
};
|
|
4412
4412
|
var v;
|
|
4413
4413
|
(function(s) {
|
|
@@ -4415,8 +4415,8 @@ var v;
|
|
|
4415
4415
|
})(v || (v = {}));
|
|
4416
4416
|
const Mn = (s, e = {
|
|
4417
4417
|
message: `Input not instance of ${s.name}`
|
|
4418
|
-
}) => Zs((r) => r instanceof s, e), qs =
|
|
4419
|
-
string: (s) =>
|
|
4418
|
+
}) => Zs((r) => r instanceof s, e), qs = D.create, Ms = ee.create, Ln = et.create, Bn = te.create, Ls = Te.create, Dn = ce.create, Fn = Ge.create, $n = Ee.create, Vn = Re.create, Hn = fe.create, Wn = ie.create, Qn = G.create, Jn = Xe.create, Kn = F.create, Gn = P.create, Xn = P.strictCreate, Yn = Se.create, ea = ot.create, ta = Ae.create, sa = Q.create, ra = Pe.create, na = Ye.create, aa = ue.create, ia = pe.create, oa = Oe.create, ca = Ne.create, ua = se.create, da = ze.create, la = ge.create, Yt = $.create, ha = H.create, pa = re.create, ma = $.createWithPreprocess, fa = Me.create, ga = () => qs().optional(), ya = () => Ms().optional(), ba = () => Ls().optional(), _a = {
|
|
4419
|
+
string: (s) => D.create({ ...s, coerce: !0 }),
|
|
4420
4420
|
number: (s) => ee.create({ ...s, coerce: !0 }),
|
|
4421
4421
|
boolean: (s) => Te.create({
|
|
4422
4422
|
...s,
|
|
@@ -4433,10 +4433,10 @@ var t = /* @__PURE__ */ Object.freeze({
|
|
|
4433
4433
|
makeIssue: Je,
|
|
4434
4434
|
EMPTY_PATH: jn,
|
|
4435
4435
|
addIssueToContext: f,
|
|
4436
|
-
ParseStatus:
|
|
4436
|
+
ParseStatus: z,
|
|
4437
4437
|
INVALID: j,
|
|
4438
4438
|
DIRTY: he,
|
|
4439
|
-
OK:
|
|
4439
|
+
OK: C,
|
|
4440
4440
|
isAborted: Et,
|
|
4441
4441
|
isDirty: Rt,
|
|
4442
4442
|
isValid: xe,
|
|
@@ -4451,7 +4451,7 @@ var t = /* @__PURE__ */ Object.freeze({
|
|
|
4451
4451
|
getParsedType: Y,
|
|
4452
4452
|
ZodType: T,
|
|
4453
4453
|
datetimeRegex: Is,
|
|
4454
|
-
ZodString:
|
|
4454
|
+
ZodString: D,
|
|
4455
4455
|
ZodNumber: ee,
|
|
4456
4456
|
ZodBigInt: te,
|
|
4457
4457
|
ZodBoolean: Te,
|
|
@@ -4464,25 +4464,25 @@ var t = /* @__PURE__ */ Object.freeze({
|
|
|
4464
4464
|
ZodNever: G,
|
|
4465
4465
|
ZodVoid: Xe,
|
|
4466
4466
|
ZodArray: F,
|
|
4467
|
-
ZodObject:
|
|
4467
|
+
ZodObject: P,
|
|
4468
4468
|
ZodUnion: Se,
|
|
4469
4469
|
ZodDiscriminatedUnion: ot,
|
|
4470
4470
|
ZodIntersection: Ae,
|
|
4471
4471
|
ZodTuple: Q,
|
|
4472
|
-
ZodRecord:
|
|
4472
|
+
ZodRecord: Pe,
|
|
4473
4473
|
ZodMap: Ye,
|
|
4474
4474
|
ZodSet: ue,
|
|
4475
4475
|
ZodFunction: pe,
|
|
4476
|
-
ZodLazy:
|
|
4476
|
+
ZodLazy: Oe,
|
|
4477
4477
|
ZodLiteral: Ne,
|
|
4478
4478
|
ZodEnum: se,
|
|
4479
|
-
ZodNativeEnum:
|
|
4479
|
+
ZodNativeEnum: ze,
|
|
4480
4480
|
ZodPromise: ge,
|
|
4481
4481
|
ZodEffects: $,
|
|
4482
4482
|
ZodTransformer: $,
|
|
4483
4483
|
ZodOptional: H,
|
|
4484
4484
|
ZodNullable: re,
|
|
4485
|
-
ZodDefault:
|
|
4485
|
+
ZodDefault: Ce,
|
|
4486
4486
|
ZodCatch: Ie,
|
|
4487
4487
|
ZodNaN: et,
|
|
4488
4488
|
BRAND: Zn,
|
|
@@ -4499,9 +4499,9 @@ var t = /* @__PURE__ */ Object.freeze({
|
|
|
4499
4499
|
coerce: _a,
|
|
4500
4500
|
any: Hn,
|
|
4501
4501
|
array: Kn,
|
|
4502
|
-
bigint:
|
|
4502
|
+
bigint: Bn,
|
|
4503
4503
|
boolean: Ls,
|
|
4504
|
-
date:
|
|
4504
|
+
date: Dn,
|
|
4505
4505
|
discriminatedUnion: ea,
|
|
4506
4506
|
effect: Yt,
|
|
4507
4507
|
enum: ua,
|
|
@@ -4670,7 +4670,7 @@ var ns = class {
|
|
|
4670
4670
|
return this.plugins.reduce((s, e) => e ? s + 1 : s, 0);
|
|
4671
4671
|
}
|
|
4672
4672
|
};
|
|
4673
|
-
function
|
|
4673
|
+
function Bs(s) {
|
|
4674
4674
|
let e = /* @__PURE__ */ new Set();
|
|
4675
4675
|
for (let n of s) {
|
|
4676
4676
|
let a = `${n.method} ${n.path}`;
|
|
@@ -4684,10 +4684,10 @@ function Ds(s) {
|
|
|
4684
4684
|
}
|
|
4685
4685
|
for (let n of s) if (n.parameters && n.parameters.filter((a) => a.type === "Body").length > 1) throw new Error(`Zodios: Multiple body parameters in endpoint '${n.path}'`);
|
|
4686
4686
|
}
|
|
4687
|
-
function
|
|
4688
|
-
return
|
|
4687
|
+
function Pa(s) {
|
|
4688
|
+
return Bs(s), s;
|
|
4689
4689
|
}
|
|
4690
|
-
var
|
|
4690
|
+
var Oa = class {
|
|
4691
4691
|
constructor(s, e, r) {
|
|
4692
4692
|
this.endpointPlugins = /* @__PURE__ */ new Map();
|
|
4693
4693
|
let n;
|
|
@@ -4696,7 +4696,7 @@ var Pa = class {
|
|
|
4696
4696
|
if (typeof s == "string" && Array.isArray(e)) a = s, this.api = e, n = r || {};
|
|
4697
4697
|
else if (Array.isArray(s) && !Array.isArray(e)) this.api = s, n = e || {};
|
|
4698
4698
|
else throw new Error("Zodios: api must be an array");
|
|
4699
|
-
|
|
4699
|
+
Bs(this.api), this.options = { validate: !0, transform: !0, sendDefaults: !1, ...n }, this.options.axiosInstance ? this.axiosInstance = this.options.axiosInstance : this.axiosInstance = O.create({ ...this.options.axiosConfig }), a && (this.axiosInstance.defaults.baseURL = a), this.injectAliasEndpoints(), this.initPlugins(), [!0, "all", "request", "response"].includes(this.options.validate) && this.use(Aa(this.options));
|
|
4700
4700
|
}
|
|
4701
4701
|
initPlugins() {
|
|
4702
4702
|
this.endpointPlugins.set("any-any", new ns("any", "any")), this.api.forEach((s) => {
|
|
@@ -4781,7 +4781,7 @@ var Pa = class {
|
|
|
4781
4781
|
async delete(s, e, ...[r]) {
|
|
4782
4782
|
return this.request({ ...r, method: "delete", url: s, data: e });
|
|
4783
4783
|
}
|
|
4784
|
-
},
|
|
4784
|
+
}, Ds = Oa;
|
|
4785
4785
|
const At = t.object({
|
|
4786
4786
|
id: t.string(),
|
|
4787
4787
|
name: t.string(),
|
|
@@ -4790,10 +4790,10 @@ const At = t.object({
|
|
|
4790
4790
|
updated_at: t.string()
|
|
4791
4791
|
}).passthrough(), Na = t.array(At);
|
|
4792
4792
|
t.object({ name: t.string().min(1).max(255) }).passthrough();
|
|
4793
|
-
const
|
|
4793
|
+
const za = t.object({
|
|
4794
4794
|
name: t.string().min(1).max(255),
|
|
4795
4795
|
is_archived: t.boolean().optional()
|
|
4796
|
-
}).passthrough(),
|
|
4796
|
+
}).passthrough(), Ca = t.object({ type: t.string(), data: t.string() }).passthrough(), Ia = t.object({ id: t.string(), email: t.string(), role: t.string() }).passthrough(), Fs = t.enum(["owner", "admin", "manager", "employee", "placeholder"]), Ua = t.object({ email: t.string().email(), role: Fs }).passthrough(), as = t.object({
|
|
4797
4797
|
id: t.string(),
|
|
4798
4798
|
user_id: t.string(),
|
|
4799
4799
|
name: t.string(),
|
|
@@ -4805,45 +4805,51 @@ const Ca = t.object({
|
|
|
4805
4805
|
id: t.string(),
|
|
4806
4806
|
name: t.string(),
|
|
4807
4807
|
is_personal: t.boolean(),
|
|
4808
|
-
billable_rate: t.union([t.number(), t.null()])
|
|
4808
|
+
billable_rate: t.union([t.number(), t.null()]),
|
|
4809
|
+
employees_can_see_billable_rates: t.boolean()
|
|
4809
4810
|
}).passthrough(), qa = t.object({
|
|
4810
4811
|
name: t.string().max(255),
|
|
4811
|
-
billable_rate: t.union([t.number(), t.null()]).optional()
|
|
4812
|
-
|
|
4812
|
+
billable_rate: t.union([t.number(), t.null()]).optional(),
|
|
4813
|
+
employees_can_see_billable_rates: t.boolean().optional()
|
|
4814
|
+
}).passthrough(), Be = t.object({
|
|
4813
4815
|
id: t.string(),
|
|
4814
4816
|
name: t.string(),
|
|
4815
4817
|
color: t.string(),
|
|
4816
4818
|
client_id: t.union([t.string(), t.null()]),
|
|
4817
4819
|
is_archived: t.boolean(),
|
|
4818
4820
|
billable_rate: t.union([t.number(), t.null()]),
|
|
4819
|
-
is_billable: t.boolean()
|
|
4821
|
+
is_billable: t.boolean(),
|
|
4822
|
+
estimated_time: t.union([t.number(), t.null()]),
|
|
4823
|
+
spent_time: t.number().int()
|
|
4820
4824
|
}).passthrough(), Ma = t.object({
|
|
4821
4825
|
name: t.string().min(1).max(255),
|
|
4822
4826
|
color: t.string().max(255),
|
|
4823
4827
|
is_billable: t.boolean(),
|
|
4824
4828
|
billable_rate: t.union([t.number(), t.null()]).optional(),
|
|
4825
|
-
client_id: t.union([t.string(), t.null()]).optional()
|
|
4829
|
+
client_id: t.union([t.string(), t.null()]).optional(),
|
|
4830
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4826
4831
|
}).passthrough(), La = t.object({
|
|
4827
4832
|
name: t.string().max(255),
|
|
4828
4833
|
color: t.string().max(255),
|
|
4829
4834
|
is_billable: t.boolean(),
|
|
4830
4835
|
is_archived: t.boolean().optional(),
|
|
4831
4836
|
client_id: t.union([t.string(), t.null()]).optional(),
|
|
4832
|
-
billable_rate: t.union([t.number(), t.null()]).optional()
|
|
4837
|
+
billable_rate: t.union([t.number(), t.null()]).optional(),
|
|
4838
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4833
4839
|
}).passthrough(), ft = t.object({
|
|
4834
4840
|
id: t.string(),
|
|
4835
4841
|
billable_rate: t.union([t.number(), t.null()]),
|
|
4836
4842
|
member_id: t.string(),
|
|
4837
4843
|
project_id: t.string()
|
|
4838
|
-
}).passthrough(),
|
|
4844
|
+
}).passthrough(), Ba = t.object({
|
|
4839
4845
|
member_id: t.string().uuid(),
|
|
4840
4846
|
billable_rate: t.union([t.number(), t.null()]).optional()
|
|
4841
|
-
}).passthrough(),
|
|
4847
|
+
}).passthrough(), Da = t.object({ billable_rate: t.union([t.number(), t.null()]) }).partial().passthrough(), Pt = t.object({
|
|
4842
4848
|
id: t.string(),
|
|
4843
4849
|
name: t.string(),
|
|
4844
4850
|
created_at: t.string(),
|
|
4845
4851
|
updated_at: t.string()
|
|
4846
|
-
}).passthrough(), Fa = t.array(
|
|
4852
|
+
}).passthrough(), Fa = t.array(Pt);
|
|
4847
4853
|
t.object({ name: t.string().min(1).max(255) }).passthrough();
|
|
4848
4854
|
t.object({ name: t.string().min(1).max(255) }).passthrough();
|
|
4849
4855
|
const gt = t.object({
|
|
@@ -4851,12 +4857,19 @@ const gt = t.object({
|
|
|
4851
4857
|
name: t.string(),
|
|
4852
4858
|
is_done: t.boolean(),
|
|
4853
4859
|
project_id: t.string(),
|
|
4860
|
+
estimated_time: t.union([t.number(), t.null()]),
|
|
4861
|
+
spent_time: t.number().int(),
|
|
4854
4862
|
created_at: t.string(),
|
|
4855
4863
|
updated_at: t.string()
|
|
4856
|
-
}).passthrough(), $a = t.object({
|
|
4864
|
+
}).passthrough(), $a = t.object({
|
|
4857
4865
|
name: t.string().min(1).max(255),
|
|
4858
|
-
|
|
4859
|
-
|
|
4866
|
+
project_id: t.string(),
|
|
4867
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4868
|
+
}).passthrough(), Va = t.object({
|
|
4869
|
+
name: t.string().min(1).max(255),
|
|
4870
|
+
is_done: t.boolean().optional(),
|
|
4871
|
+
estimated_time: t.union([t.number(), t.null()]).optional()
|
|
4872
|
+
}).passthrough(), De = t.union([t.string(), t.null()]).optional(), Fe = t.object({
|
|
4860
4873
|
id: t.string(),
|
|
4861
4874
|
start: t.string(),
|
|
4862
4875
|
end: t.union([t.string(), t.null()]),
|
|
@@ -4868,7 +4881,7 @@ const gt = t.object({
|
|
|
4868
4881
|
user_id: t.string(),
|
|
4869
4882
|
tags: t.array(t.string()),
|
|
4870
4883
|
billable: t.boolean()
|
|
4871
|
-
}).passthrough(), Ha = t.
|
|
4884
|
+
}).passthrough(), Ha = t.object({
|
|
4872
4885
|
member_id: t.string().uuid(),
|
|
4873
4886
|
project_id: t.union([t.string(), t.null()]).optional(),
|
|
4874
4887
|
task_id: t.union([t.string(), t.null()]).optional(),
|
|
@@ -4877,7 +4890,7 @@ const gt = t.object({
|
|
|
4877
4890
|
billable: t.boolean(),
|
|
4878
4891
|
description: t.union([t.string(), t.null()]).optional(),
|
|
4879
4892
|
tags: t.union([t.array(t.string().uuid()), t.null()]).optional()
|
|
4880
|
-
}).passthrough(),
|
|
4893
|
+
}).passthrough(), Wa = t.object({
|
|
4881
4894
|
ids: t.array(t.string().uuid()),
|
|
4882
4895
|
changes: t.object({
|
|
4883
4896
|
member_id: t.string().uuid(),
|
|
@@ -4887,7 +4900,7 @@ const gt = t.object({
|
|
|
4887
4900
|
description: t.union([t.string(), t.null()]),
|
|
4888
4901
|
tags: t.union([t.array(t.string().uuid()), t.null()])
|
|
4889
4902
|
}).partial().passthrough()
|
|
4890
|
-
}).passthrough(),
|
|
4903
|
+
}).passthrough(), Qa = t.object({
|
|
4891
4904
|
member_id: t.string().uuid(),
|
|
4892
4905
|
project_id: t.union([t.string(), t.null()]),
|
|
4893
4906
|
task_id: t.union([t.string(), t.null()]),
|
|
@@ -4896,7 +4909,7 @@ const gt = t.object({
|
|
|
4896
4909
|
billable: t.boolean(),
|
|
4897
4910
|
description: t.union([t.string(), t.null()]),
|
|
4898
4911
|
tags: t.union([t.array(t.string().uuid()), t.null()])
|
|
4899
|
-
}).partial().passthrough(),
|
|
4912
|
+
}).partial().passthrough(), Ja = t.enum([
|
|
4900
4913
|
"monday",
|
|
4901
4914
|
"tuesday",
|
|
4902
4915
|
"wednesday",
|
|
@@ -4904,18 +4917,18 @@ const gt = t.object({
|
|
|
4904
4917
|
"friday",
|
|
4905
4918
|
"saturday",
|
|
4906
4919
|
"sunday"
|
|
4907
|
-
]),
|
|
4920
|
+
]), Ka = t.object({
|
|
4908
4921
|
id: t.string(),
|
|
4909
4922
|
name: t.string(),
|
|
4910
4923
|
email: t.string(),
|
|
4911
4924
|
profile_photo_url: t.string(),
|
|
4912
4925
|
timezone: t.string(),
|
|
4913
|
-
week_start:
|
|
4914
|
-
}).passthrough(),
|
|
4926
|
+
week_start: Ja
|
|
4927
|
+
}).passthrough(), Ga = t.object({
|
|
4915
4928
|
id: t.string(),
|
|
4916
4929
|
organization: t.object({ id: t.string(), name: t.string() }).passthrough(),
|
|
4917
4930
|
role: t.string()
|
|
4918
|
-
}).passthrough(),
|
|
4931
|
+
}).passthrough(), Xa = t.array(Ga), $s = Pa([
|
|
4919
4932
|
{
|
|
4920
4933
|
method: "get",
|
|
4921
4934
|
path: "/v1/organizations/:organization",
|
|
@@ -5093,7 +5106,7 @@ const gt = t.object({
|
|
|
5093
5106
|
{
|
|
5094
5107
|
name: "body",
|
|
5095
5108
|
type: "Body",
|
|
5096
|
-
schema:
|
|
5109
|
+
schema: za
|
|
5097
5110
|
},
|
|
5098
5111
|
{
|
|
5099
5112
|
name: "organization",
|
|
@@ -5178,6 +5191,51 @@ const gt = t.object({
|
|
|
5178
5191
|
}
|
|
5179
5192
|
]
|
|
5180
5193
|
},
|
|
5194
|
+
{
|
|
5195
|
+
method: "post",
|
|
5196
|
+
path: "/v1/organizations/:organization/export",
|
|
5197
|
+
alias: "exportOrganization",
|
|
5198
|
+
requestFormat: "json",
|
|
5199
|
+
parameters: [
|
|
5200
|
+
{
|
|
5201
|
+
name: "body",
|
|
5202
|
+
type: "Body",
|
|
5203
|
+
schema: t.object({}).partial().passthrough()
|
|
5204
|
+
},
|
|
5205
|
+
{
|
|
5206
|
+
name: "organization",
|
|
5207
|
+
type: "Path",
|
|
5208
|
+
schema: t.string()
|
|
5209
|
+
}
|
|
5210
|
+
],
|
|
5211
|
+
response: t.object({ success: t.boolean(), download_url: t.string() }).passthrough(),
|
|
5212
|
+
errors: [
|
|
5213
|
+
{
|
|
5214
|
+
status: 400,
|
|
5215
|
+
description: "API exception",
|
|
5216
|
+
schema: t.object({
|
|
5217
|
+
error: t.boolean(),
|
|
5218
|
+
key: t.string(),
|
|
5219
|
+
message: t.string()
|
|
5220
|
+
}).passthrough()
|
|
5221
|
+
},
|
|
5222
|
+
{
|
|
5223
|
+
status: 401,
|
|
5224
|
+
description: "Unauthenticated",
|
|
5225
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5226
|
+
},
|
|
5227
|
+
{
|
|
5228
|
+
status: 403,
|
|
5229
|
+
description: "Authorization error",
|
|
5230
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5231
|
+
},
|
|
5232
|
+
{
|
|
5233
|
+
status: 404,
|
|
5234
|
+
description: "Not found",
|
|
5235
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5236
|
+
}
|
|
5237
|
+
]
|
|
5238
|
+
},
|
|
5181
5239
|
{
|
|
5182
5240
|
method: "post",
|
|
5183
5241
|
path: "/v1/organizations/:organization/import",
|
|
@@ -5187,7 +5245,7 @@ const gt = t.object({
|
|
|
5187
5245
|
{
|
|
5188
5246
|
name: "body",
|
|
5189
5247
|
type: "Body",
|
|
5190
|
-
schema:
|
|
5248
|
+
schema: Ca
|
|
5191
5249
|
},
|
|
5192
5250
|
{
|
|
5193
5251
|
name: "organization",
|
|
@@ -5686,6 +5744,56 @@ const gt = t.object({
|
|
|
5686
5744
|
}
|
|
5687
5745
|
]
|
|
5688
5746
|
},
|
|
5747
|
+
{
|
|
5748
|
+
method: "post",
|
|
5749
|
+
path: "/v1/organizations/:organization/members/:member/make-placeholder",
|
|
5750
|
+
alias: "v1.members.make-placeholder",
|
|
5751
|
+
requestFormat: "json",
|
|
5752
|
+
parameters: [
|
|
5753
|
+
{
|
|
5754
|
+
name: "body",
|
|
5755
|
+
type: "Body",
|
|
5756
|
+
schema: t.object({}).partial().passthrough()
|
|
5757
|
+
},
|
|
5758
|
+
{
|
|
5759
|
+
name: "organization",
|
|
5760
|
+
type: "Path",
|
|
5761
|
+
schema: t.string()
|
|
5762
|
+
},
|
|
5763
|
+
{
|
|
5764
|
+
name: "member",
|
|
5765
|
+
type: "Path",
|
|
5766
|
+
schema: t.string()
|
|
5767
|
+
}
|
|
5768
|
+
],
|
|
5769
|
+
response: t.null(),
|
|
5770
|
+
errors: [
|
|
5771
|
+
{
|
|
5772
|
+
status: 400,
|
|
5773
|
+
description: "API exception",
|
|
5774
|
+
schema: t.object({
|
|
5775
|
+
error: t.boolean(),
|
|
5776
|
+
key: t.string(),
|
|
5777
|
+
message: t.string()
|
|
5778
|
+
}).passthrough()
|
|
5779
|
+
},
|
|
5780
|
+
{
|
|
5781
|
+
status: 401,
|
|
5782
|
+
description: "Unauthenticated",
|
|
5783
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5784
|
+
},
|
|
5785
|
+
{
|
|
5786
|
+
status: 403,
|
|
5787
|
+
description: "Authorization error",
|
|
5788
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
status: 404,
|
|
5792
|
+
description: "Not found",
|
|
5793
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
5794
|
+
}
|
|
5795
|
+
]
|
|
5796
|
+
},
|
|
5689
5797
|
{
|
|
5690
5798
|
method: "put",
|
|
5691
5799
|
path: "/v1/organizations/:organization/project-members/:projectMember",
|
|
@@ -5695,7 +5803,7 @@ const gt = t.object({
|
|
|
5695
5803
|
{
|
|
5696
5804
|
name: "body",
|
|
5697
5805
|
type: "Body",
|
|
5698
|
-
schema:
|
|
5806
|
+
schema: Da
|
|
5699
5807
|
},
|
|
5700
5808
|
{
|
|
5701
5809
|
name: "organization",
|
|
@@ -5794,7 +5902,7 @@ const gt = t.object({
|
|
|
5794
5902
|
}
|
|
5795
5903
|
],
|
|
5796
5904
|
response: t.object({
|
|
5797
|
-
data: t.array(
|
|
5905
|
+
data: t.array(Be),
|
|
5798
5906
|
links: t.object({
|
|
5799
5907
|
first: t.union([t.string(), t.null()]),
|
|
5800
5908
|
last: t.union([t.string(), t.null()]),
|
|
@@ -5861,7 +5969,7 @@ const gt = t.object({
|
|
|
5861
5969
|
schema: t.string()
|
|
5862
5970
|
}
|
|
5863
5971
|
],
|
|
5864
|
-
response: t.object({ data:
|
|
5972
|
+
response: t.object({ data: Be }).passthrough(),
|
|
5865
5973
|
errors: [
|
|
5866
5974
|
{
|
|
5867
5975
|
status: 401,
|
|
@@ -5905,7 +6013,7 @@ const gt = t.object({
|
|
|
5905
6013
|
schema: t.string()
|
|
5906
6014
|
}
|
|
5907
6015
|
],
|
|
5908
|
-
response: t.object({ data:
|
|
6016
|
+
response: t.object({ data: Be }).passthrough(),
|
|
5909
6017
|
errors: [
|
|
5910
6018
|
{
|
|
5911
6019
|
status: 401,
|
|
@@ -5946,7 +6054,7 @@ const gt = t.object({
|
|
|
5946
6054
|
schema: t.string()
|
|
5947
6055
|
}
|
|
5948
6056
|
],
|
|
5949
|
-
response: t.object({ data:
|
|
6057
|
+
response: t.object({ data: Be }).passthrough(),
|
|
5950
6058
|
errors: [
|
|
5951
6059
|
{
|
|
5952
6060
|
status: 401,
|
|
@@ -6087,7 +6195,7 @@ const gt = t.object({
|
|
|
6087
6195
|
{
|
|
6088
6196
|
name: "body",
|
|
6089
6197
|
type: "Body",
|
|
6090
|
-
schema:
|
|
6198
|
+
schema: Ba
|
|
6091
6199
|
},
|
|
6092
6200
|
{
|
|
6093
6201
|
name: "organization",
|
|
@@ -6184,7 +6292,7 @@ const gt = t.object({
|
|
|
6184
6292
|
schema: t.string()
|
|
6185
6293
|
}
|
|
6186
6294
|
],
|
|
6187
|
-
response: t.object({ data:
|
|
6295
|
+
response: t.object({ data: Pt }).passthrough(),
|
|
6188
6296
|
errors: [
|
|
6189
6297
|
{
|
|
6190
6298
|
status: 401,
|
|
@@ -6233,7 +6341,7 @@ const gt = t.object({
|
|
|
6233
6341
|
schema: t.string()
|
|
6234
6342
|
}
|
|
6235
6343
|
],
|
|
6236
|
-
response: t.object({ data:
|
|
6344
|
+
response: t.object({ data: Pt }).passthrough(),
|
|
6237
6345
|
errors: [
|
|
6238
6346
|
{
|
|
6239
6347
|
status: 401,
|
|
@@ -6537,12 +6645,12 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6537
6645
|
{
|
|
6538
6646
|
name: "start",
|
|
6539
6647
|
type: "Query",
|
|
6540
|
-
schema:
|
|
6648
|
+
schema: De
|
|
6541
6649
|
},
|
|
6542
6650
|
{
|
|
6543
6651
|
name: "end",
|
|
6544
6652
|
type: "Query",
|
|
6545
|
-
schema:
|
|
6653
|
+
schema: De
|
|
6546
6654
|
},
|
|
6547
6655
|
{
|
|
6548
6656
|
name: "active",
|
|
@@ -6559,6 +6667,11 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6559
6667
|
type: "Query",
|
|
6560
6668
|
schema: t.number().int().gte(1).lte(500).optional()
|
|
6561
6669
|
},
|
|
6670
|
+
{
|
|
6671
|
+
name: "offset",
|
|
6672
|
+
type: "Query",
|
|
6673
|
+
schema: t.number().int().gte(0).optional()
|
|
6674
|
+
},
|
|
6562
6675
|
{
|
|
6563
6676
|
name: "only_full_dates",
|
|
6564
6677
|
type: "Query",
|
|
@@ -6570,24 +6683,24 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6570
6683
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6571
6684
|
},
|
|
6572
6685
|
{
|
|
6573
|
-
name: "
|
|
6686
|
+
name: "client_ids",
|
|
6574
6687
|
type: "Query",
|
|
6575
6688
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6576
6689
|
},
|
|
6577
6690
|
{
|
|
6578
|
-
name: "
|
|
6691
|
+
name: "project_ids",
|
|
6579
6692
|
type: "Query",
|
|
6580
6693
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6581
6694
|
},
|
|
6582
6695
|
{
|
|
6583
|
-
name: "
|
|
6696
|
+
name: "tag_ids",
|
|
6584
6697
|
type: "Query",
|
|
6585
6698
|
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6586
6699
|
},
|
|
6587
6700
|
{
|
|
6588
|
-
name: "
|
|
6701
|
+
name: "task_ids",
|
|
6589
6702
|
type: "Query",
|
|
6590
|
-
schema: t.string().optional()
|
|
6703
|
+
schema: t.array(t.string().uuid()).min(1).optional()
|
|
6591
6704
|
},
|
|
6592
6705
|
{
|
|
6593
6706
|
name: "user_id",
|
|
@@ -6595,7 +6708,10 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6595
6708
|
schema: t.string().optional()
|
|
6596
6709
|
}
|
|
6597
6710
|
],
|
|
6598
|
-
response: t.object({
|
|
6711
|
+
response: t.object({
|
|
6712
|
+
data: t.array(Fe),
|
|
6713
|
+
meta: t.object({ total: t.number().int() }).passthrough()
|
|
6714
|
+
}).passthrough(),
|
|
6599
6715
|
errors: [
|
|
6600
6716
|
{
|
|
6601
6717
|
status: 401,
|
|
@@ -6631,7 +6747,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6631
6747
|
{
|
|
6632
6748
|
name: "body",
|
|
6633
6749
|
type: "Body",
|
|
6634
|
-
schema:
|
|
6750
|
+
schema: Ha
|
|
6635
6751
|
},
|
|
6636
6752
|
{
|
|
6637
6753
|
name: "organization",
|
|
@@ -6639,7 +6755,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6639
6755
|
schema: t.string()
|
|
6640
6756
|
}
|
|
6641
6757
|
],
|
|
6642
|
-
response: t.object({ data:
|
|
6758
|
+
response: t.object({ data: Fe }).passthrough(),
|
|
6643
6759
|
errors: [
|
|
6644
6760
|
{
|
|
6645
6761
|
status: 400,
|
|
@@ -6684,7 +6800,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6684
6800
|
{
|
|
6685
6801
|
name: "body",
|
|
6686
6802
|
type: "Body",
|
|
6687
|
-
schema:
|
|
6803
|
+
schema: Wa
|
|
6688
6804
|
},
|
|
6689
6805
|
{
|
|
6690
6806
|
name: "organization",
|
|
@@ -6719,6 +6835,50 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6719
6835
|
}
|
|
6720
6836
|
]
|
|
6721
6837
|
},
|
|
6838
|
+
{
|
|
6839
|
+
method: "delete",
|
|
6840
|
+
path: "/v1/organizations/:organization/time-entries",
|
|
6841
|
+
alias: "deleteTimeEntries",
|
|
6842
|
+
requestFormat: "json",
|
|
6843
|
+
parameters: [
|
|
6844
|
+
{
|
|
6845
|
+
name: "organization",
|
|
6846
|
+
type: "Path",
|
|
6847
|
+
schema: t.string()
|
|
6848
|
+
},
|
|
6849
|
+
{
|
|
6850
|
+
name: "ids",
|
|
6851
|
+
type: "Query",
|
|
6852
|
+
schema: t.array(t.string().uuid())
|
|
6853
|
+
}
|
|
6854
|
+
],
|
|
6855
|
+
response: t.object({ success: t.string(), error: t.string() }).passthrough(),
|
|
6856
|
+
errors: [
|
|
6857
|
+
{
|
|
6858
|
+
status: 401,
|
|
6859
|
+
description: "Unauthenticated",
|
|
6860
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
6861
|
+
},
|
|
6862
|
+
{
|
|
6863
|
+
status: 403,
|
|
6864
|
+
description: "Authorization error",
|
|
6865
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
6866
|
+
},
|
|
6867
|
+
{
|
|
6868
|
+
status: 404,
|
|
6869
|
+
description: "Not found",
|
|
6870
|
+
schema: t.object({ message: t.string() }).passthrough()
|
|
6871
|
+
},
|
|
6872
|
+
{
|
|
6873
|
+
status: 422,
|
|
6874
|
+
description: "Validation error",
|
|
6875
|
+
schema: t.object({
|
|
6876
|
+
message: t.string(),
|
|
6877
|
+
errors: t.record(t.array(t.string()))
|
|
6878
|
+
}).passthrough()
|
|
6879
|
+
}
|
|
6880
|
+
]
|
|
6881
|
+
},
|
|
6722
6882
|
{
|
|
6723
6883
|
method: "put",
|
|
6724
6884
|
path: "/v1/organizations/:organization/time-entries/:timeEntry",
|
|
@@ -6728,7 +6888,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6728
6888
|
{
|
|
6729
6889
|
name: "body",
|
|
6730
6890
|
type: "Body",
|
|
6731
|
-
schema:
|
|
6891
|
+
schema: Qa
|
|
6732
6892
|
},
|
|
6733
6893
|
{
|
|
6734
6894
|
name: "organization",
|
|
@@ -6741,7 +6901,7 @@ Users with the permission `time-entries:view:own` can only use this en
|
|
|
6741
6901
|
schema: t.string()
|
|
6742
6902
|
}
|
|
6743
6903
|
],
|
|
6744
|
-
response: t.object({ data:
|
|
6904
|
+
response: t.object({ data: Fe }).passthrough(),
|
|
6745
6905
|
errors: [
|
|
6746
6906
|
{
|
|
6747
6907
|
status: 400,
|
|
@@ -6839,7 +6999,8 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6839
6999
|
"project",
|
|
6840
7000
|
"task",
|
|
6841
7001
|
"client",
|
|
6842
|
-
"billable"
|
|
7002
|
+
"billable",
|
|
7003
|
+
"description"
|
|
6843
7004
|
]).optional()
|
|
6844
7005
|
},
|
|
6845
7006
|
{
|
|
@@ -6854,7 +7015,8 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6854
7015
|
"project",
|
|
6855
7016
|
"task",
|
|
6856
7017
|
"client",
|
|
6857
|
-
"billable"
|
|
7018
|
+
"billable",
|
|
7019
|
+
"description"
|
|
6858
7020
|
]).optional()
|
|
6859
7021
|
},
|
|
6860
7022
|
{
|
|
@@ -6870,12 +7032,12 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6870
7032
|
{
|
|
6871
7033
|
name: "start",
|
|
6872
7034
|
type: "Query",
|
|
6873
|
-
schema:
|
|
7035
|
+
schema: De
|
|
6874
7036
|
},
|
|
6875
7037
|
{
|
|
6876
7038
|
name: "end",
|
|
6877
7039
|
type: "Query",
|
|
6878
|
-
schema:
|
|
7040
|
+
schema: De
|
|
6879
7041
|
},
|
|
6880
7042
|
{
|
|
6881
7043
|
name: "active",
|
|
@@ -6986,7 +7148,7 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
6986
7148
|
alias: "getMe",
|
|
6987
7149
|
description: "This endpoint is independent of organization.",
|
|
6988
7150
|
requestFormat: "json",
|
|
6989
|
-
response: t.object({ data:
|
|
7151
|
+
response: t.object({ data: Ka }).passthrough(),
|
|
6990
7152
|
errors: [
|
|
6991
7153
|
{
|
|
6992
7154
|
status: 401,
|
|
@@ -7006,7 +7168,7 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
7006
7168
|
alias: "getMyMemberships",
|
|
7007
7169
|
description: "This endpoint is independent of organization.",
|
|
7008
7170
|
requestFormat: "json",
|
|
7009
|
-
response: t.object({ data:
|
|
7171
|
+
response: t.object({ data: Xa }).passthrough(),
|
|
7010
7172
|
errors: [
|
|
7011
7173
|
{
|
|
7012
7174
|
status: 401,
|
|
@@ -7026,7 +7188,7 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
7026
7188
|
alias: "getMyActiveTimeEntry",
|
|
7027
7189
|
description: "This endpoint is independent of organization.",
|
|
7028
7190
|
requestFormat: "json",
|
|
7029
|
-
response: t.object({ data:
|
|
7191
|
+
response: t.object({ data: Fe }).passthrough(),
|
|
7030
7192
|
errors: [
|
|
7031
7193
|
{
|
|
7032
7194
|
status: 401,
|
|
@@ -7041,12 +7203,12 @@ If the group parameters are all set to `null` or are all missing, the
|
|
|
7041
7203
|
]
|
|
7042
7204
|
}
|
|
7043
7205
|
]);
|
|
7044
|
-
new
|
|
7045
|
-
function
|
|
7046
|
-
return new
|
|
7206
|
+
new Ds("/api", $s);
|
|
7207
|
+
function Ya(s, e) {
|
|
7208
|
+
return new Ds(s, $s, e);
|
|
7047
7209
|
}
|
|
7048
|
-
const
|
|
7210
|
+
const ei = Ya("/api", { validate: "none" });
|
|
7049
7211
|
export {
|
|
7050
|
-
|
|
7051
|
-
|
|
7212
|
+
ei as api,
|
|
7213
|
+
Ya as createApiClient
|
|
7052
7214
|
};
|