@7365admin1/core 2.35.1 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24391,7 +24391,7 @@ function MPatrolRoute(value) {
|
|
|
24391
24391
|
try {
|
|
24392
24392
|
value.assignee = value.assignee.map((id) => new ObjectId65(id));
|
|
24393
24393
|
} catch {
|
|
24394
|
-
throw new BadRequestError109("Invalid
|
|
24394
|
+
throw new BadRequestError109("Invalid assignee id format");
|
|
24395
24395
|
}
|
|
24396
24396
|
}
|
|
24397
24397
|
if (value.cameras && Array.isArray(value.cameras)) {
|
|
@@ -25109,14 +25109,14 @@ function MPatrolLog(value) {
|
|
|
25109
25109
|
try {
|
|
25110
25110
|
value.route = new ObjectId67(value.route);
|
|
25111
25111
|
} catch {
|
|
25112
|
-
throw new BadRequestError112("Invalid route format");
|
|
25112
|
+
throw new BadRequestError112("Invalid route id format");
|
|
25113
25113
|
}
|
|
25114
25114
|
}
|
|
25115
25115
|
if (value.site && typeof value.site === "string") {
|
|
25116
25116
|
try {
|
|
25117
25117
|
value.site = new ObjectId67(value.site);
|
|
25118
25118
|
} catch {
|
|
25119
|
-
throw new BadRequestError112("Invalid site format");
|
|
25119
|
+
throw new BadRequestError112("Invalid site id format");
|
|
25120
25120
|
}
|
|
25121
25121
|
}
|
|
25122
25122
|
const assignee = (value.assignee || []).map((id) => {
|
|
@@ -25130,7 +25130,7 @@ function MPatrolLog(value) {
|
|
|
25130
25130
|
try {
|
|
25131
25131
|
value.incidentReport.id = new ObjectId67(value.incidentReport.id);
|
|
25132
25132
|
} catch {
|
|
25133
|
-
throw new BadRequestError112("Invalid incident report format");
|
|
25133
|
+
throw new BadRequestError112("Invalid incident report id format");
|
|
25134
25134
|
}
|
|
25135
25135
|
}
|
|
25136
25136
|
return {
|
|
@@ -26584,7 +26584,7 @@ function MServiceProviderBilling(value) {
|
|
|
26584
26584
|
try {
|
|
26585
26585
|
value.orgId = new ObjectId71(value.orgId);
|
|
26586
26586
|
} catch {
|
|
26587
|
-
throw new Error("Invalid ID.");
|
|
26587
|
+
throw new Error("Invalid org ID.");
|
|
26588
26588
|
}
|
|
26589
26589
|
}
|
|
26590
26590
|
return {
|
|
@@ -28989,14 +28989,14 @@ function MBillingItem(value) {
|
|
|
28989
28989
|
try {
|
|
28990
28990
|
value.site = new ObjectId79(value.site);
|
|
28991
28991
|
} catch {
|
|
28992
|
-
throw new BadRequestError127("Invalid site format");
|
|
28992
|
+
throw new BadRequestError127("Invalid site id format");
|
|
28993
28993
|
}
|
|
28994
28994
|
}
|
|
28995
28995
|
if (value.org && typeof value.org === "string") {
|
|
28996
28996
|
try {
|
|
28997
28997
|
value.org = new ObjectId79(value.org);
|
|
28998
28998
|
} catch {
|
|
28999
|
-
throw new BadRequestError127("Invalid org format");
|
|
28999
|
+
throw new BadRequestError127("Invalid org id format");
|
|
29000
29000
|
}
|
|
29001
29001
|
}
|
|
29002
29002
|
if (value.units && Array.isArray(value.units)) {
|
|
@@ -29375,21 +29375,21 @@ function MBillingConfiguration(value) {
|
|
|
29375
29375
|
try {
|
|
29376
29376
|
value.site = new ObjectId81(value.site);
|
|
29377
29377
|
} catch {
|
|
29378
|
-
throw new BadRequestError129("Invalid site format");
|
|
29378
|
+
throw new BadRequestError129("Invalid site id format");
|
|
29379
29379
|
}
|
|
29380
29380
|
}
|
|
29381
29381
|
if (value.org && typeof value.org === "string") {
|
|
29382
29382
|
try {
|
|
29383
29383
|
value.org = new ObjectId81(value.org);
|
|
29384
29384
|
} catch {
|
|
29385
|
-
throw new BadRequestError129("Invalid org format");
|
|
29385
|
+
throw new BadRequestError129("Invalid org id format");
|
|
29386
29386
|
}
|
|
29387
29387
|
}
|
|
29388
29388
|
if (value.createdBy && typeof value.createdBy === "string") {
|
|
29389
29389
|
try {
|
|
29390
29390
|
value.createdBy = new ObjectId81(value.createdBy);
|
|
29391
29391
|
} catch {
|
|
29392
|
-
throw new BadRequestError129("Invalid createdBy format");
|
|
29392
|
+
throw new BadRequestError129("Invalid createdBy id format");
|
|
29393
29393
|
}
|
|
29394
29394
|
}
|
|
29395
29395
|
return {
|
|
@@ -30820,35 +30820,35 @@ function MUnitBilling(value) {
|
|
|
30820
30820
|
try {
|
|
30821
30821
|
value.site = new ObjectId85(value.site);
|
|
30822
30822
|
} catch {
|
|
30823
|
-
throw new BadRequestError137("Invalid site format");
|
|
30823
|
+
throw new BadRequestError137("Invalid site id format");
|
|
30824
30824
|
}
|
|
30825
30825
|
}
|
|
30826
30826
|
if (value.org && typeof value.org === "string") {
|
|
30827
30827
|
try {
|
|
30828
30828
|
value.org = new ObjectId85(value.org);
|
|
30829
30829
|
} catch {
|
|
30830
|
-
throw new BadRequestError137("Invalid org format");
|
|
30830
|
+
throw new BadRequestError137("Invalid org id format");
|
|
30831
30831
|
}
|
|
30832
30832
|
}
|
|
30833
30833
|
if (value.paidBy && typeof value.paidBy === "string") {
|
|
30834
30834
|
try {
|
|
30835
30835
|
value.paidBy = new ObjectId85(value.paidBy);
|
|
30836
30836
|
} catch {
|
|
30837
|
-
throw new BadRequestError137("Invalid paidBy format");
|
|
30837
|
+
throw new BadRequestError137("Invalid paidBy id format");
|
|
30838
30838
|
}
|
|
30839
30839
|
}
|
|
30840
30840
|
if (value.billItem && typeof value.billItem === "string") {
|
|
30841
30841
|
try {
|
|
30842
30842
|
value.billItem = new ObjectId85(value.billItem);
|
|
30843
30843
|
} catch {
|
|
30844
|
-
throw new BadRequestError137("Invalid billItem format");
|
|
30844
|
+
throw new BadRequestError137("Invalid billItem id format");
|
|
30845
30845
|
}
|
|
30846
30846
|
}
|
|
30847
30847
|
if (value.unitId && typeof value.unitId === "string") {
|
|
30848
30848
|
try {
|
|
30849
30849
|
value.unitId = new ObjectId85(value.unitId);
|
|
30850
30850
|
} catch {
|
|
30851
|
-
throw new BadRequestError137("Invalid unitId format");
|
|
30851
|
+
throw new BadRequestError137("Invalid unitId id format");
|
|
30852
30852
|
}
|
|
30853
30853
|
}
|
|
30854
30854
|
return {
|