@jsdev_ninja/core 0.13.54 → 0.13.56
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/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.es.js +28 -26
- package/dist/core.es.js.map +1 -1
- package/dist/core.umd.js +1 -1
- package/dist/core.umd.js.map +1 -1
- package/dist/lib/entities/Profile.d.ts.map +1 -1
- package/dist/lib/entities/Profile.js +2 -1
- package/dist/lib/entities/SupplierInvoice.d.ts +18 -0
- package/dist/lib/entities/SupplierInvoice.d.ts.map +1 -1
- package/dist/lib/entities/SupplierInvoice.js +3 -0
- package/dist/lib/firebase-api/index.d.ts +6 -12
- package/dist/lib/firebase-api/index.d.ts.map +1 -1
- package/dist/lib/firebase-api/index.js +2 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/core.es.js
CHANGED
|
@@ -165,7 +165,7 @@ class N extends Error {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
N.create = (n) => new N(n);
|
|
168
|
-
const
|
|
168
|
+
const G = (n, e) => {
|
|
169
169
|
let t;
|
|
170
170
|
switch (n.code) {
|
|
171
171
|
case d.invalid_type:
|
|
@@ -221,7 +221,7 @@ const J = (n, e) => {
|
|
|
221
221
|
}
|
|
222
222
|
return { message: t };
|
|
223
223
|
};
|
|
224
|
-
let Ue =
|
|
224
|
+
let Ue = G;
|
|
225
225
|
function dt(n) {
|
|
226
226
|
Ue = n;
|
|
227
227
|
}
|
|
@@ -261,7 +261,7 @@ function m(n, e) {
|
|
|
261
261
|
// then schema-bound map if available
|
|
262
262
|
t,
|
|
263
263
|
// then global override map
|
|
264
|
-
t ===
|
|
264
|
+
t === G ? void 0 : G
|
|
265
265
|
// then global default map
|
|
266
266
|
].filter((s) => !!s)
|
|
267
267
|
});
|
|
@@ -1456,7 +1456,7 @@ oe.create = (n) => new oe({
|
|
|
1456
1456
|
typeName: g.ZodNull,
|
|
1457
1457
|
...v(n)
|
|
1458
1458
|
});
|
|
1459
|
-
class
|
|
1459
|
+
class J extends _ {
|
|
1460
1460
|
constructor() {
|
|
1461
1461
|
super(...arguments), this._any = !0;
|
|
1462
1462
|
}
|
|
@@ -1464,7 +1464,7 @@ class G extends _ {
|
|
|
1464
1464
|
return S(e.data);
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
|
|
1467
|
+
J.create = (n) => new J({
|
|
1468
1468
|
typeName: g.ZodAny,
|
|
1469
1469
|
...v(n)
|
|
1470
1470
|
});
|
|
@@ -2310,7 +2310,7 @@ class X extends _ {
|
|
|
2310
2310
|
t.common.contextualErrorMap,
|
|
2311
2311
|
t.schemaErrorMap,
|
|
2312
2312
|
ve(),
|
|
2313
|
-
|
|
2313
|
+
G
|
|
2314
2314
|
].filter((u) => !!u),
|
|
2315
2315
|
issueData: {
|
|
2316
2316
|
code: d.invalid_arguments,
|
|
@@ -2326,7 +2326,7 @@ class X extends _ {
|
|
|
2326
2326
|
t.common.contextualErrorMap,
|
|
2327
2327
|
t.schemaErrorMap,
|
|
2328
2328
|
ve(),
|
|
2329
|
-
|
|
2329
|
+
G
|
|
2330
2330
|
].filter((u) => !!u),
|
|
2331
2331
|
issueData: {
|
|
2332
2332
|
code: d.invalid_return_type,
|
|
@@ -2818,7 +2818,7 @@ function Ve(n, e) {
|
|
|
2818
2818
|
return typeof t == "string" ? { message: t } : t;
|
|
2819
2819
|
}
|
|
2820
2820
|
function Ye(n, e = {}, t) {
|
|
2821
|
-
return n ?
|
|
2821
|
+
return n ? J.create().superRefine((r, s) => {
|
|
2822
2822
|
var i, o;
|
|
2823
2823
|
const c = n(r);
|
|
2824
2824
|
if (c instanceof Promise)
|
|
@@ -2833,7 +2833,7 @@ function Ye(n, e = {}, t) {
|
|
|
2833
2833
|
const l = Ve(e, r), u = (o = (i = l.fatal) !== null && i !== void 0 ? i : t) !== null && o !== void 0 ? o : !0;
|
|
2834
2834
|
s.addIssue({ code: "custom", ...l, fatal: u });
|
|
2835
2835
|
}
|
|
2836
|
-
}) :
|
|
2836
|
+
}) : J.create();
|
|
2837
2837
|
}
|
|
2838
2838
|
const Pt = {
|
|
2839
2839
|
object: k.lazycreate
|
|
@@ -2844,7 +2844,7 @@ var g;
|
|
|
2844
2844
|
})(g || (g = {}));
|
|
2845
2845
|
const Et = (n, e = {
|
|
2846
2846
|
message: `Input not instance of ${n.name}`
|
|
2847
|
-
}) => Ye((t) => t instanceof n, e), Xe = A.create,
|
|
2847
|
+
}) => Ye((t) => t instanceof n, e), Xe = A.create, Ge = V.create, Rt = Te.create, Mt = z.create, Je = ae.create, $t = B.create, Vt = xe.create, zt = ie.create, Ft = oe.create, Ut = J.create, Lt = L.create, qt = $.create, Bt = ke.create, Wt = C.create, Qt = k.create, Yt = k.strictCreate, Xt = ce.create, Gt = Se.create, Jt = ue.create, Ht = P.create, Kt = de.create, en = we.create, tn = W.create, nn = X.create, rn = le.create, sn = me.create, an = F.create, on = pe.create, cn = H.create, ze = Z.create, un = D.create, dn = U.create, ln = Z.createWithPreprocess, mn = ye.create, pn = () => Xe().optional(), fn = () => Ge().optional(), hn = () => Je().optional(), gn = {
|
|
2848
2848
|
string: (n) => A.create({ ...n, coerce: !0 }),
|
|
2849
2849
|
number: (n) => V.create({ ...n, coerce: !0 }),
|
|
2850
2850
|
boolean: (n) => ae.create({
|
|
@@ -2856,7 +2856,7 @@ const Et = (n, e = {
|
|
|
2856
2856
|
}, yn = y;
|
|
2857
2857
|
var a = /* @__PURE__ */ Object.freeze({
|
|
2858
2858
|
__proto__: null,
|
|
2859
|
-
defaultErrorMap:
|
|
2859
|
+
defaultErrorMap: G,
|
|
2860
2860
|
setErrorMap: dt,
|
|
2861
2861
|
getErrorMap: ve,
|
|
2862
2862
|
makeIssue: _e,
|
|
@@ -2888,7 +2888,7 @@ var a = /* @__PURE__ */ Object.freeze({
|
|
|
2888
2888
|
ZodSymbol: xe,
|
|
2889
2889
|
ZodUndefined: ie,
|
|
2890
2890
|
ZodNull: oe,
|
|
2891
|
-
ZodAny:
|
|
2891
|
+
ZodAny: J,
|
|
2892
2892
|
ZodUnknown: L,
|
|
2893
2893
|
ZodNever: $,
|
|
2894
2894
|
ZodVoid: ke,
|
|
@@ -2929,14 +2929,14 @@ var a = /* @__PURE__ */ Object.freeze({
|
|
|
2929
2929
|
any: Ut,
|
|
2930
2930
|
array: Wt,
|
|
2931
2931
|
bigint: Mt,
|
|
2932
|
-
boolean:
|
|
2932
|
+
boolean: Je,
|
|
2933
2933
|
date: $t,
|
|
2934
|
-
discriminatedUnion:
|
|
2934
|
+
discriminatedUnion: Gt,
|
|
2935
2935
|
effect: ze,
|
|
2936
2936
|
enum: an,
|
|
2937
2937
|
function: nn,
|
|
2938
2938
|
instanceof: Et,
|
|
2939
|
-
intersection:
|
|
2939
|
+
intersection: Jt,
|
|
2940
2940
|
lazy: rn,
|
|
2941
2941
|
literal: sn,
|
|
2942
2942
|
map: en,
|
|
@@ -2945,7 +2945,7 @@ var a = /* @__PURE__ */ Object.freeze({
|
|
|
2945
2945
|
never: qt,
|
|
2946
2946
|
null: Ft,
|
|
2947
2947
|
nullable: dn,
|
|
2948
|
-
number:
|
|
2948
|
+
number: Ge,
|
|
2949
2949
|
object: Qt,
|
|
2950
2950
|
oboolean: hn,
|
|
2951
2951
|
onumber: fn,
|
|
@@ -3086,6 +3086,7 @@ const re = a.object({
|
|
|
3086
3086
|
companyId: M,
|
|
3087
3087
|
storeId: M,
|
|
3088
3088
|
tenantId: M,
|
|
3089
|
+
// @deprecated
|
|
3089
3090
|
clientType: a.enum(["user", "company"]),
|
|
3090
3091
|
companyName: a.string().optional(),
|
|
3091
3092
|
displayName: M,
|
|
@@ -3095,6 +3096,7 @@ const re = a.object({
|
|
|
3095
3096
|
isAnonymous: a.boolean(),
|
|
3096
3097
|
createdDate: a.number(),
|
|
3097
3098
|
lastActivityDate: a.number(),
|
|
3099
|
+
//todo
|
|
3098
3100
|
paymentType: Ne.optional(),
|
|
3099
3101
|
organizationId: a.string().optional().nullable()
|
|
3100
3102
|
}), tt = a.object({
|
|
@@ -3438,10 +3440,10 @@ class An {
|
|
|
3438
3440
|
function st(n) {
|
|
3439
3441
|
return Number(n.toFixed(2));
|
|
3440
3442
|
}
|
|
3441
|
-
function
|
|
3443
|
+
function Gn(n) {
|
|
3442
3444
|
return n.toFixed(2);
|
|
3443
3445
|
}
|
|
3444
|
-
function
|
|
3446
|
+
function Jn(n) {
|
|
3445
3447
|
return Math.max(0, st(n));
|
|
3446
3448
|
}
|
|
3447
3449
|
function Hn(n, e) {
|
|
@@ -3495,7 +3497,10 @@ const Cn = a.object({
|
|
|
3495
3497
|
oldProfitPercentage: a.number(),
|
|
3496
3498
|
newProfitPercentage: a.number()
|
|
3497
3499
|
})
|
|
3498
|
-
)
|
|
3500
|
+
),
|
|
3501
|
+
total: a.number().optional(),
|
|
3502
|
+
totalBeforeVat: a.number().optional(),
|
|
3503
|
+
vat: a.number().optional()
|
|
3499
3504
|
}), tr = Zn.omit({ id: !0 }), Fe = {
|
|
3500
3505
|
VAT: 18
|
|
3501
3506
|
};
|
|
@@ -3575,14 +3580,11 @@ const On = {
|
|
|
3575
3580
|
settings: "settings",
|
|
3576
3581
|
discounts: "discounts",
|
|
3577
3582
|
organizations: "organizations",
|
|
3578
|
-
organizationGroups: "
|
|
3579
|
-
// todo remove
|
|
3580
|
-
"organization-groups": "organization-groups",
|
|
3583
|
+
organizationGroups: "organizationGroups",
|
|
3581
3584
|
// todo remove
|
|
3582
3585
|
invoices: "invoices",
|
|
3583
3586
|
suppliers: "suppliers",
|
|
3584
|
-
supplierInvoices: "
|
|
3585
|
-
"supplier-invoices": "supplier-invoices"
|
|
3587
|
+
supplierInvoices: "supplierInvoices"
|
|
3586
3588
|
}, En = {
|
|
3587
3589
|
systemCollections: On,
|
|
3588
3590
|
storeCollections: Pn,
|
|
@@ -3637,9 +3639,9 @@ export {
|
|
|
3637
3639
|
Fn as TFlattenCategorySchema,
|
|
3638
3640
|
Hn as calculatePercentageDiscount,
|
|
3639
3641
|
Tn as clientTypesSchema,
|
|
3640
|
-
|
|
3642
|
+
Jn as ensureNonNegative,
|
|
3641
3643
|
st as formatCurrency,
|
|
3642
|
-
|
|
3644
|
+
Gn as formatCurrencyString,
|
|
3643
3645
|
nr as getCartCost,
|
|
3644
3646
|
Vn as isFile,
|
|
3645
3647
|
M as notEmptyTextSchema,
|