@7365admin1/core 2.6.4 → 2.6.5
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 +7 -0
- package/dist/index.d.ts +25 -10
- package/dist/index.js +312 -214
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +337 -214
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/models/session.model.ts
|
|
2
|
-
import { BadRequestError } from "@
|
|
2
|
+
import { BadRequestError } from "@7365admin1/node-server-utils";
|
|
3
3
|
import Joi from "joi";
|
|
4
4
|
var tokenSchema = Joi.object({
|
|
5
5
|
token: Joi.string().required(),
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
makeCacheKey,
|
|
25
25
|
useAtlas,
|
|
26
26
|
useCache
|
|
27
|
-
} from "@
|
|
27
|
+
} from "@7365admin1/node-server-utils";
|
|
28
28
|
function useSessionRepo() {
|
|
29
29
|
const db = useAtlas.getDb();
|
|
30
30
|
if (!db) {
|
|
@@ -100,7 +100,7 @@ function useSessionRepo() {
|
|
|
100
100
|
import { ObjectId as ObjectId8 } from "mongodb";
|
|
101
101
|
|
|
102
102
|
// src/models/user.model.ts
|
|
103
|
-
import { BadRequestError as BadRequestError2 } from "@
|
|
103
|
+
import { BadRequestError as BadRequestError2 } from "@7365admin1/node-server-utils";
|
|
104
104
|
import Joi2 from "joi";
|
|
105
105
|
import { ObjectId } from "mongodb";
|
|
106
106
|
var userSchema = Joi2.object({
|
|
@@ -144,13 +144,13 @@ import {
|
|
|
144
144
|
AppError,
|
|
145
145
|
useCache as useCache5,
|
|
146
146
|
makeCacheKey as makeCacheKey5
|
|
147
|
-
} from "@
|
|
147
|
+
} from "@7365admin1/node-server-utils";
|
|
148
148
|
|
|
149
149
|
// src/repositories/feedback.repo.ts
|
|
150
150
|
import { ObjectId as ObjectId3 } from "mongodb";
|
|
151
151
|
|
|
152
152
|
// src/models/feedback.model.ts
|
|
153
|
-
import { BadRequestError as BadRequestError3, logger as logger2 } from "@
|
|
153
|
+
import { BadRequestError as BadRequestError3, logger as logger2 } from "@7365admin1/node-server-utils";
|
|
154
154
|
import Joi3 from "joi";
|
|
155
155
|
import { ObjectId as ObjectId2 } from "mongodb";
|
|
156
156
|
var metadataSchema = {
|
|
@@ -268,7 +268,7 @@ import {
|
|
|
268
268
|
useCache as useCache2,
|
|
269
269
|
makeCacheKey as makeCacheKey2,
|
|
270
270
|
logger as logger3
|
|
271
|
-
} from "@
|
|
271
|
+
} from "@7365admin1/node-server-utils";
|
|
272
272
|
function useFeedbackRepo() {
|
|
273
273
|
const db = useAtlas2.getDb();
|
|
274
274
|
if (!db) {
|
|
@@ -770,7 +770,7 @@ function useFeedbackRepo() {
|
|
|
770
770
|
import { ObjectId as ObjectId5 } from "mongodb";
|
|
771
771
|
|
|
772
772
|
// src/models/work-order.model.ts
|
|
773
|
-
import { BadRequestError as BadRequestError5, logger as logger4 } from "@
|
|
773
|
+
import { BadRequestError as BadRequestError5, logger as logger4 } from "@7365admin1/node-server-utils";
|
|
774
774
|
import Joi4 from "joi";
|
|
775
775
|
import { ObjectId as ObjectId4 } from "mongodb";
|
|
776
776
|
var metadataSchema2 = {
|
|
@@ -896,7 +896,7 @@ import {
|
|
|
896
896
|
useCache as useCache3,
|
|
897
897
|
logger as logger5,
|
|
898
898
|
makeCacheKey as makeCacheKey3
|
|
899
|
-
} from "@
|
|
899
|
+
} from "@7365admin1/node-server-utils";
|
|
900
900
|
function useWorkOrderRepo() {
|
|
901
901
|
const db = useAtlas3.getDb();
|
|
902
902
|
if (!db) {
|
|
@@ -1331,7 +1331,7 @@ import {
|
|
|
1331
1331
|
paginate as paginate3,
|
|
1332
1332
|
useAtlas as useAtlas4,
|
|
1333
1333
|
useCache as useCache4
|
|
1334
|
-
} from "@
|
|
1334
|
+
} from "@7365admin1/node-server-utils";
|
|
1335
1335
|
|
|
1336
1336
|
// src/models/occurrence-entry.model.ts
|
|
1337
1337
|
import { ObjectId as ObjectId6 } from "mongodb";
|
|
@@ -2428,7 +2428,7 @@ import {
|
|
|
2428
2428
|
InternalServerError as InternalServerError6,
|
|
2429
2429
|
NotFoundError as NotFoundError5,
|
|
2430
2430
|
useCache as useCache6
|
|
2431
|
-
} from "@
|
|
2431
|
+
} from "@7365admin1/node-server-utils";
|
|
2432
2432
|
|
|
2433
2433
|
// src/config.ts
|
|
2434
2434
|
import * as dotenv from "dotenv";
|
|
@@ -2576,7 +2576,7 @@ function useAuthService() {
|
|
|
2576
2576
|
|
|
2577
2577
|
// src/controllers/auth.controller.ts
|
|
2578
2578
|
import Joi13 from "joi";
|
|
2579
|
-
import { BadRequestError as BadRequestError25, logger as logger19 } from "@
|
|
2579
|
+
import { BadRequestError as BadRequestError25, logger as logger19 } from "@7365admin1/node-server-utils";
|
|
2580
2580
|
|
|
2581
2581
|
// src/services/verification.service.ts
|
|
2582
2582
|
import {
|
|
@@ -2588,7 +2588,7 @@ import {
|
|
|
2588
2588
|
NotFoundError as NotFoundError9,
|
|
2589
2589
|
InternalServerError as InternalServerError11,
|
|
2590
2590
|
useAtlas as useAtlas10
|
|
2591
|
-
} from "@
|
|
2591
|
+
} from "@7365admin1/node-server-utils";
|
|
2592
2592
|
|
|
2593
2593
|
// src/repositories/verification.repo.ts
|
|
2594
2594
|
import {
|
|
@@ -2599,10 +2599,10 @@ import {
|
|
|
2599
2599
|
paginate as paginate5,
|
|
2600
2600
|
useAtlas as useAtlas6,
|
|
2601
2601
|
useCache as useCache7
|
|
2602
|
-
} from "@
|
|
2602
|
+
} from "@7365admin1/node-server-utils";
|
|
2603
2603
|
|
|
2604
2604
|
// src/models/verification.model.ts
|
|
2605
|
-
import { BadRequestError as BadRequestError10 } from "@
|
|
2605
|
+
import { BadRequestError as BadRequestError10 } from "@7365admin1/node-server-utils";
|
|
2606
2606
|
import { ObjectId as ObjectId9 } from "mongodb";
|
|
2607
2607
|
var MVerification = class {
|
|
2608
2608
|
constructor(value) {
|
|
@@ -2868,10 +2868,10 @@ import {
|
|
|
2868
2868
|
paginate as paginate6,
|
|
2869
2869
|
useAtlas as useAtlas7,
|
|
2870
2870
|
useCache as useCache8
|
|
2871
|
-
} from "@
|
|
2871
|
+
} from "@7365admin1/node-server-utils";
|
|
2872
2872
|
|
|
2873
2873
|
// src/models/organization.model.ts
|
|
2874
|
-
import { BadRequestError as BadRequestError12 } from "@
|
|
2874
|
+
import { BadRequestError as BadRequestError12 } from "@7365admin1/node-server-utils";
|
|
2875
2875
|
import Joi7 from "joi";
|
|
2876
2876
|
import { ObjectId as ObjectId11 } from "mongodb";
|
|
2877
2877
|
var allowedNatures = [
|
|
@@ -3210,7 +3210,7 @@ function useOrgRepo() {
|
|
|
3210
3210
|
import { ObjectId as ObjectId14 } from "mongodb";
|
|
3211
3211
|
|
|
3212
3212
|
// src/models/site.model.ts
|
|
3213
|
-
import { BadRequestError as BadRequestError14, logger as logger10 } from "@
|
|
3213
|
+
import { BadRequestError as BadRequestError14, logger as logger10 } from "@7365admin1/node-server-utils";
|
|
3214
3214
|
import Joi8 from "joi";
|
|
3215
3215
|
import { ObjectId as ObjectId13 } from "mongodb";
|
|
3216
3216
|
var allowedFieldsSite = [
|
|
@@ -3261,7 +3261,7 @@ import {
|
|
|
3261
3261
|
logger as logger11,
|
|
3262
3262
|
makeCacheKey as makeCacheKey8,
|
|
3263
3263
|
AppError as AppError3
|
|
3264
|
-
} from "@
|
|
3264
|
+
} from "@7365admin1/node-server-utils";
|
|
3265
3265
|
import Joi9 from "joi";
|
|
3266
3266
|
function useSiteRepo() {
|
|
3267
3267
|
const db = useAtlas8.getDb();
|
|
@@ -3673,10 +3673,10 @@ import {
|
|
|
3673
3673
|
paginate as paginate8,
|
|
3674
3674
|
useAtlas as useAtlas9,
|
|
3675
3675
|
useCache as useCache10
|
|
3676
|
-
} from "@
|
|
3676
|
+
} from "@7365admin1/node-server-utils";
|
|
3677
3677
|
|
|
3678
3678
|
// src/models/service-provider.model.ts
|
|
3679
|
-
import { BadRequestError as BadRequestError16, logger as logger12 } from "@
|
|
3679
|
+
import { BadRequestError as BadRequestError16, logger as logger12 } from "@7365admin1/node-server-utils";
|
|
3680
3680
|
import Joi10 from "joi";
|
|
3681
3681
|
import { ObjectId as ObjectId15 } from "mongodb";
|
|
3682
3682
|
var schemaServiceProvider = Joi10.object({
|
|
@@ -4436,7 +4436,7 @@ import {
|
|
|
4436
4436
|
NotFoundError as NotFoundError11,
|
|
4437
4437
|
useAtlas as useAtlas14,
|
|
4438
4438
|
useS3
|
|
4439
|
-
} from "@
|
|
4439
|
+
} from "@7365admin1/node-server-utils";
|
|
4440
4440
|
|
|
4441
4441
|
// src/repositories/member.repo.ts
|
|
4442
4442
|
import {
|
|
@@ -4449,10 +4449,10 @@ import {
|
|
|
4449
4449
|
paginate as paginate9,
|
|
4450
4450
|
useAtlas as useAtlas11,
|
|
4451
4451
|
useCache as useCache11
|
|
4452
|
-
} from "@
|
|
4452
|
+
} from "@7365admin1/node-server-utils";
|
|
4453
4453
|
|
|
4454
4454
|
// src/models/member.model.ts
|
|
4455
|
-
import { BadRequestError as BadRequestError19 } from "@
|
|
4455
|
+
import { BadRequestError as BadRequestError19 } from "@7365admin1/node-server-utils";
|
|
4456
4456
|
import Joi12 from "joi";
|
|
4457
4457
|
import { ObjectId as ObjectId17 } from "mongodb";
|
|
4458
4458
|
function MMember(value) {
|
|
@@ -5228,10 +5228,10 @@ import {
|
|
|
5228
5228
|
logger as logger16,
|
|
5229
5229
|
useCache as useCache12,
|
|
5230
5230
|
makeCacheKey as makeCacheKey11
|
|
5231
|
-
} from "@
|
|
5231
|
+
} from "@7365admin1/node-server-utils";
|
|
5232
5232
|
|
|
5233
5233
|
// src/models/role.model.ts
|
|
5234
|
-
import { BadRequestError as BadRequestError21 } from "@
|
|
5234
|
+
import { BadRequestError as BadRequestError21 } from "@7365admin1/node-server-utils";
|
|
5235
5235
|
import { ObjectId as ObjectId19 } from "mongodb";
|
|
5236
5236
|
var MRole = class {
|
|
5237
5237
|
constructor(value) {
|
|
@@ -5609,7 +5609,7 @@ import {
|
|
|
5609
5609
|
useAtlas as useAtlas13,
|
|
5610
5610
|
useCache as useCache13,
|
|
5611
5611
|
AppError as AppError5
|
|
5612
|
-
} from "@
|
|
5612
|
+
} from "@7365admin1/node-server-utils";
|
|
5613
5613
|
|
|
5614
5614
|
// src/models/file.model.ts
|
|
5615
5615
|
var MFile = class {
|
|
@@ -6204,7 +6204,7 @@ function useAuthController() {
|
|
|
6204
6204
|
|
|
6205
6205
|
// src/controllers/user.controller.ts
|
|
6206
6206
|
import Joi14 from "joi";
|
|
6207
|
-
import { BadRequestError as BadRequestError26, logger as logger20 } from "@
|
|
6207
|
+
import { BadRequestError as BadRequestError26, logger as logger20 } from "@7365admin1/node-server-utils";
|
|
6208
6208
|
function useUserController() {
|
|
6209
6209
|
const {
|
|
6210
6210
|
getUserById: _getById,
|
|
@@ -6487,10 +6487,10 @@ function useUserController() {
|
|
|
6487
6487
|
|
|
6488
6488
|
// src/controllers/role.controller.ts
|
|
6489
6489
|
import Joi15 from "joi";
|
|
6490
|
-
import { BadRequestError as BadRequestError28, logger as logger21 } from "@
|
|
6490
|
+
import { BadRequestError as BadRequestError28, logger as logger21 } from "@7365admin1/node-server-utils";
|
|
6491
6491
|
|
|
6492
6492
|
// src/services/role.service.ts
|
|
6493
|
-
import { BadRequestError as BadRequestError27 } from "@
|
|
6493
|
+
import { BadRequestError as BadRequestError27 } from "@7365admin1/node-server-utils";
|
|
6494
6494
|
function useRoleService() {
|
|
6495
6495
|
const { deleteRole: _deleteRole } = useRoleRepo();
|
|
6496
6496
|
const { getByRoleId } = useMemberRepo();
|
|
@@ -6695,10 +6695,10 @@ function useRoleController() {
|
|
|
6695
6695
|
|
|
6696
6696
|
// src/controllers/member.controller.ts
|
|
6697
6697
|
import Joi16 from "joi";
|
|
6698
|
-
import { BadRequestError as BadRequestError30, logger as logger22 } from "@
|
|
6698
|
+
import { BadRequestError as BadRequestError30, logger as logger22 } from "@7365admin1/node-server-utils";
|
|
6699
6699
|
|
|
6700
6700
|
// src/services/member.service.ts
|
|
6701
|
-
import { BadRequestError as BadRequestError29, useAtlas as useAtlas15 } from "@
|
|
6701
|
+
import { BadRequestError as BadRequestError29, useAtlas as useAtlas15 } from "@7365admin1/node-server-utils";
|
|
6702
6702
|
function useMemberService() {
|
|
6703
6703
|
const {
|
|
6704
6704
|
add: addMember,
|
|
@@ -7010,7 +7010,7 @@ function useMemberController() {
|
|
|
7010
7010
|
}
|
|
7011
7011
|
|
|
7012
7012
|
// src/controllers/verification.controller.ts
|
|
7013
|
-
import { BadRequestError as BadRequestError31, logger as logger23 } from "@
|
|
7013
|
+
import { BadRequestError as BadRequestError31, logger as logger23 } from "@7365admin1/node-server-utils";
|
|
7014
7014
|
import Joi17 from "joi";
|
|
7015
7015
|
function useVerificationController() {
|
|
7016
7016
|
const {
|
|
@@ -7211,7 +7211,7 @@ function useVerificationController() {
|
|
|
7211
7211
|
}
|
|
7212
7212
|
|
|
7213
7213
|
// src/services/file.service.ts
|
|
7214
|
-
import { logger as logger24, useS3 as useS32, useAtlas as useAtlas16 } from "@
|
|
7214
|
+
import { logger as logger24, useS3 as useS32, useAtlas as useAtlas16 } from "@7365admin1/node-server-utils";
|
|
7215
7215
|
import cron from "node-cron";
|
|
7216
7216
|
function useFileService() {
|
|
7217
7217
|
const {
|
|
@@ -7294,7 +7294,7 @@ function useFileService() {
|
|
|
7294
7294
|
}
|
|
7295
7295
|
|
|
7296
7296
|
// src/controllers/file.controller.ts
|
|
7297
|
-
import { BadRequestError as BadRequestError32, logger as logger25 } from "@
|
|
7297
|
+
import { BadRequestError as BadRequestError32, logger as logger25 } from "@7365admin1/node-server-utils";
|
|
7298
7298
|
import Joi18 from "joi";
|
|
7299
7299
|
function useFileController() {
|
|
7300
7300
|
const { createFile, deleteFile: _deleteFile } = useFileService();
|
|
@@ -7366,7 +7366,7 @@ import {
|
|
|
7366
7366
|
BadRequestError as BadRequestError33,
|
|
7367
7367
|
logger as logger26,
|
|
7368
7368
|
NotFoundError as NotFoundError12
|
|
7369
|
-
} from "@
|
|
7369
|
+
} from "@7365admin1/node-server-utils";
|
|
7370
7370
|
import Joi19 from "joi";
|
|
7371
7371
|
function useOrgController() {
|
|
7372
7372
|
const { getOrgsByMembership } = useMemberRepo();
|
|
@@ -7541,7 +7541,7 @@ function useOrgController() {
|
|
|
7541
7541
|
}
|
|
7542
7542
|
|
|
7543
7543
|
// src/models/subscription.model.ts
|
|
7544
|
-
import { BadRequestError as BadRequestError34 } from "@
|
|
7544
|
+
import { BadRequestError as BadRequestError34 } from "@7365admin1/node-server-utils";
|
|
7545
7545
|
import Joi20 from "joi";
|
|
7546
7546
|
import { ObjectId as ObjectId22 } from "mongodb";
|
|
7547
7547
|
var schema = Joi20.object({
|
|
@@ -7648,7 +7648,7 @@ import {
|
|
|
7648
7648
|
paginate as paginate11,
|
|
7649
7649
|
useAtlas as useAtlas17,
|
|
7650
7650
|
useCache as useCache14
|
|
7651
|
-
} from "@
|
|
7651
|
+
} from "@7365admin1/node-server-utils";
|
|
7652
7652
|
import { ObjectId as ObjectId23 } from "mongodb";
|
|
7653
7653
|
import Joi21 from "joi";
|
|
7654
7654
|
function useSubscriptionRepo() {
|
|
@@ -8237,7 +8237,7 @@ import {
|
|
|
8237
8237
|
BadRequestError as BadRequestError47,
|
|
8238
8238
|
logger as logger34,
|
|
8239
8239
|
useAtlas as useAtlas24
|
|
8240
|
-
} from "@
|
|
8240
|
+
} from "@7365admin1/node-server-utils";
|
|
8241
8241
|
|
|
8242
8242
|
// src/repositories/address.repo.ts
|
|
8243
8243
|
import {
|
|
@@ -8247,10 +8247,10 @@ import {
|
|
|
8247
8247
|
makeCacheKey as makeCacheKey14,
|
|
8248
8248
|
useAtlas as useAtlas18,
|
|
8249
8249
|
useCache as useCache15
|
|
8250
|
-
} from "@
|
|
8250
|
+
} from "@7365admin1/node-server-utils";
|
|
8251
8251
|
|
|
8252
8252
|
// src/models/address.model.ts
|
|
8253
|
-
import { BadRequestError as BadRequestError36 } from "@
|
|
8253
|
+
import { BadRequestError as BadRequestError36 } from "@7365admin1/node-server-utils";
|
|
8254
8254
|
import { ObjectId as ObjectId24 } from "mongodb";
|
|
8255
8255
|
function MAddress(value) {
|
|
8256
8256
|
if (value.user) {
|
|
@@ -8356,11 +8356,11 @@ import {
|
|
|
8356
8356
|
paginate as paginate12,
|
|
8357
8357
|
useAtlas as useAtlas19,
|
|
8358
8358
|
useCache as useCache16
|
|
8359
|
-
} from "@
|
|
8359
|
+
} from "@7365admin1/node-server-utils";
|
|
8360
8360
|
|
|
8361
8361
|
// src/models/promo-code.model.ts
|
|
8362
8362
|
import Joi22 from "joi";
|
|
8363
|
-
import { BadRequestError as BadRequestError38 } from "@
|
|
8363
|
+
import { BadRequestError as BadRequestError38 } from "@7365admin1/node-server-utils";
|
|
8364
8364
|
var promoTypeSchema = Joi22.string().valid("tiered", "fixed").required();
|
|
8365
8365
|
var promoTierSchema = Joi22.object({
|
|
8366
8366
|
min: Joi22.number().integer().min(1).required(),
|
|
@@ -8631,12 +8631,12 @@ import {
|
|
|
8631
8631
|
paginate as paginate13,
|
|
8632
8632
|
useAtlas as useAtlas20,
|
|
8633
8633
|
useCache as useCache17
|
|
8634
|
-
} from "@
|
|
8634
|
+
} from "@7365admin1/node-server-utils";
|
|
8635
8635
|
|
|
8636
8636
|
// src/models/invoice.model.ts
|
|
8637
8637
|
import { z } from "zod";
|
|
8638
8638
|
import { ObjectId as ObjectId27 } from "mongodb";
|
|
8639
|
-
import { BadRequestError as BadRequestError40 } from "@
|
|
8639
|
+
import { BadRequestError as BadRequestError40 } from "@7365admin1/node-server-utils";
|
|
8640
8640
|
function toObjectId(value) {
|
|
8641
8641
|
if (typeof value === "string") {
|
|
8642
8642
|
if (!/^[a-fA-F0-9]{24}$/.test(value)) {
|
|
@@ -8930,10 +8930,10 @@ import {
|
|
|
8930
8930
|
makeCacheKey as makeCacheKey17,
|
|
8931
8931
|
useAtlas as useAtlas21,
|
|
8932
8932
|
useCache as useCache18
|
|
8933
|
-
} from "@
|
|
8933
|
+
} from "@7365admin1/node-server-utils";
|
|
8934
8934
|
|
|
8935
8935
|
// src/models/counter.model.ts
|
|
8936
|
-
import { BadRequestError as BadRequestError42 } from "@
|
|
8936
|
+
import { BadRequestError as BadRequestError42 } from "@7365admin1/node-server-utils";
|
|
8937
8937
|
import { ObjectId as ObjectId29 } from "mongodb";
|
|
8938
8938
|
import { z as z2 } from "zod";
|
|
8939
8939
|
var TCounter = z2.object({
|
|
@@ -9092,7 +9092,7 @@ import {
|
|
|
9092
9092
|
paginate as paginate14,
|
|
9093
9093
|
useAtlas as useAtlas22,
|
|
9094
9094
|
useCache as useCache19
|
|
9095
|
-
} from "@
|
|
9095
|
+
} from "@7365admin1/node-server-utils";
|
|
9096
9096
|
|
|
9097
9097
|
// src/models/payment.model.ts
|
|
9098
9098
|
import { ObjectId as ObjectId30 } from "mongodb";
|
|
@@ -9372,10 +9372,10 @@ import {
|
|
|
9372
9372
|
NotFoundError as NotFoundError14,
|
|
9373
9373
|
useAtlas as useAtlas23,
|
|
9374
9374
|
useCache as useCache20
|
|
9375
|
-
} from "@
|
|
9375
|
+
} from "@7365admin1/node-server-utils";
|
|
9376
9376
|
|
|
9377
9377
|
// src/models/price.model.ts
|
|
9378
|
-
import { BadRequestError as BadRequestError45 } from "@
|
|
9378
|
+
import { BadRequestError as BadRequestError45 } from "@7365admin1/node-server-utils";
|
|
9379
9379
|
import { ObjectId as ObjectId32 } from "mongodb";
|
|
9380
9380
|
import { z as z4 } from "zod";
|
|
9381
9381
|
var TPriceType = z4.enum([
|
|
@@ -10174,7 +10174,7 @@ function useSubscriptionService() {
|
|
|
10174
10174
|
|
|
10175
10175
|
// src/controllers/subscription.controller.ts
|
|
10176
10176
|
import Joi24 from "joi";
|
|
10177
|
-
import { BadRequestError as BadRequestError48, logger as logger35 } from "@
|
|
10177
|
+
import { BadRequestError as BadRequestError48, logger as logger35 } from "@7365admin1/node-server-utils";
|
|
10178
10178
|
function useSubscriptionController() {
|
|
10179
10179
|
const {
|
|
10180
10180
|
add: _add,
|
|
@@ -10308,7 +10308,7 @@ function useSubscriptionController() {
|
|
|
10308
10308
|
}
|
|
10309
10309
|
|
|
10310
10310
|
// src/controllers/price.controller.ts
|
|
10311
|
-
import { BadRequestError as BadRequestError49, logger as logger36 } from "@
|
|
10311
|
+
import { BadRequestError as BadRequestError49, logger as logger36 } from "@7365admin1/node-server-utils";
|
|
10312
10312
|
import Joi25 from "joi";
|
|
10313
10313
|
function usePriceController() {
|
|
10314
10314
|
const { getByNameType: _getByNameType } = usePriceRepo();
|
|
@@ -10342,7 +10342,7 @@ function usePriceController() {
|
|
|
10342
10342
|
}
|
|
10343
10343
|
|
|
10344
10344
|
// src/controllers/invoice.controller.ts
|
|
10345
|
-
import { BadRequestError as BadRequestError50, logger as logger37 } from "@
|
|
10345
|
+
import { BadRequestError as BadRequestError50, logger as logger37 } from "@7365admin1/node-server-utils";
|
|
10346
10346
|
import Joi26 from "joi";
|
|
10347
10347
|
function useInvoiceController() {
|
|
10348
10348
|
const { getBySubscriptionId: _getBySubscriptionId } = useInvoiceRepo();
|
|
@@ -10388,7 +10388,7 @@ function useInvoiceController() {
|
|
|
10388
10388
|
}
|
|
10389
10389
|
|
|
10390
10390
|
// src/controllers/promo-code.controller.ts
|
|
10391
|
-
import { BadRequestError as BadRequestError51, logger as logger38 } from "@
|
|
10391
|
+
import { BadRequestError as BadRequestError51, logger as logger38 } from "@7365admin1/node-server-utils";
|
|
10392
10392
|
import Joi27 from "joi";
|
|
10393
10393
|
function usePromoCodeController() {
|
|
10394
10394
|
const {
|
|
@@ -10504,7 +10504,7 @@ function usePromoCodeController() {
|
|
|
10504
10504
|
}
|
|
10505
10505
|
|
|
10506
10506
|
// src/services/feedback.service.ts
|
|
10507
|
-
import { BadRequestError as BadRequestError52 } from "@
|
|
10507
|
+
import { BadRequestError as BadRequestError52 } from "@7365admin1/node-server-utils";
|
|
10508
10508
|
function useFeedbackService() {
|
|
10509
10509
|
const { createFeedback: _createFeedback, getFeedbacks: _getFeedbacks } = useFeedbackRepo();
|
|
10510
10510
|
const { getUserById } = useUserRepo();
|
|
@@ -10585,7 +10585,7 @@ function useFeedbackService() {
|
|
|
10585
10585
|
|
|
10586
10586
|
// src/controllers/feedback.controller.ts
|
|
10587
10587
|
import Joi28 from "joi";
|
|
10588
|
-
import { BadRequestError as BadRequestError53, logger as logger39 } from "@
|
|
10588
|
+
import { BadRequestError as BadRequestError53, logger as logger39 } from "@7365admin1/node-server-utils";
|
|
10589
10589
|
function useFeedbackController() {
|
|
10590
10590
|
const { createFeedback: _createFeedback, getFeedbacks: _getFeedbacks } = useFeedbackService();
|
|
10591
10591
|
const {
|
|
@@ -10823,7 +10823,7 @@ function useFeedbackController() {
|
|
|
10823
10823
|
}
|
|
10824
10824
|
|
|
10825
10825
|
// src/services/work-order.service.ts
|
|
10826
|
-
import { BadRequestError as BadRequestError54, useAtlas as useAtlas25 } from "@
|
|
10826
|
+
import { BadRequestError as BadRequestError54, useAtlas as useAtlas25 } from "@7365admin1/node-server-utils";
|
|
10827
10827
|
function useWorkOrderService() {
|
|
10828
10828
|
const { createWorkOrder: _createWorkOrder, getWorkOrders: _getWorkOrders } = useWorkOrderRepo();
|
|
10829
10829
|
const { getUserById } = useUserRepo();
|
|
@@ -10976,7 +10976,7 @@ function useWorkOrderService() {
|
|
|
10976
10976
|
|
|
10977
10977
|
// src/controllers/work-order.controller.ts
|
|
10978
10978
|
import Joi29 from "joi";
|
|
10979
|
-
import { BadRequestError as BadRequestError55, logger as logger40 } from "@
|
|
10979
|
+
import { BadRequestError as BadRequestError55, logger as logger40 } from "@7365admin1/node-server-utils";
|
|
10980
10980
|
function useWorkOrderController() {
|
|
10981
10981
|
const { createWorkOrder: _createWorkOrder, getWorkOrders: _getWorkOrders } = useWorkOrderService();
|
|
10982
10982
|
const {
|
|
@@ -11186,13 +11186,13 @@ function useWorkOrderController() {
|
|
|
11186
11186
|
|
|
11187
11187
|
// src/controllers/service-provider.controller.ts
|
|
11188
11188
|
import Joi30 from "joi";
|
|
11189
|
-
import { BadRequestError as BadRequestError57, logger as logger41 } from "@
|
|
11189
|
+
import { BadRequestError as BadRequestError57, logger as logger41 } from "@7365admin1/node-server-utils";
|
|
11190
11190
|
|
|
11191
11191
|
// src/services/service-provider.service.ts
|
|
11192
11192
|
import {
|
|
11193
11193
|
BadRequestError as BadRequestError56,
|
|
11194
11194
|
useAtlas as useAtlas26
|
|
11195
|
-
} from "@
|
|
11195
|
+
} from "@7365admin1/node-server-utils";
|
|
11196
11196
|
function useServiceProviderService() {
|
|
11197
11197
|
const {
|
|
11198
11198
|
createServiceProvider: _createServiceProvider,
|
|
@@ -11509,7 +11509,7 @@ function useServiceProviderController() {
|
|
|
11509
11509
|
}
|
|
11510
11510
|
|
|
11511
11511
|
// src/models/customer.model.ts
|
|
11512
|
-
import { BadRequestError as BadRequestError58, logger as logger42 } from "@
|
|
11512
|
+
import { BadRequestError as BadRequestError58, logger as logger42 } from "@7365admin1/node-server-utils";
|
|
11513
11513
|
import Joi31 from "joi";
|
|
11514
11514
|
import { ObjectId as ObjectId33 } from "mongodb";
|
|
11515
11515
|
var customerSchema = Joi31.object({
|
|
@@ -11560,7 +11560,7 @@ import {
|
|
|
11560
11560
|
useCache as useCache21,
|
|
11561
11561
|
logger as logger43,
|
|
11562
11562
|
makeCacheKey as makeCacheKey20
|
|
11563
|
-
} from "@
|
|
11563
|
+
} from "@7365admin1/node-server-utils";
|
|
11564
11564
|
import Joi32 from "joi";
|
|
11565
11565
|
function useCustomerRepo() {
|
|
11566
11566
|
const db = useAtlas27.getDb();
|
|
@@ -11780,14 +11780,14 @@ function useCustomerRepo() {
|
|
|
11780
11780
|
|
|
11781
11781
|
// src/controllers/customer.controller.ts
|
|
11782
11782
|
import Joi33 from "joi";
|
|
11783
|
-
import { BadRequestError as BadRequestError61, logger as logger44 } from "@
|
|
11783
|
+
import { BadRequestError as BadRequestError61, logger as logger44 } from "@7365admin1/node-server-utils";
|
|
11784
11784
|
|
|
11785
11785
|
// src/services/customer.service.ts
|
|
11786
11786
|
import {
|
|
11787
11787
|
BadRequestError as BadRequestError60,
|
|
11788
11788
|
NotFoundError as NotFoundError16,
|
|
11789
11789
|
useAtlas as useAtlas28
|
|
11790
|
-
} from "@
|
|
11790
|
+
} from "@7365admin1/node-server-utils";
|
|
11791
11791
|
function useCustomerService() {
|
|
11792
11792
|
const { add: addOrg } = useOrgRepo();
|
|
11793
11793
|
const { getById: getOrgById } = useOrgRepo();
|
|
@@ -12001,7 +12001,7 @@ import {
|
|
|
12001
12001
|
BadRequestError as BadRequestError64,
|
|
12002
12002
|
logger as logger47,
|
|
12003
12003
|
useAtlas as useAtlas30
|
|
12004
|
-
} from "@
|
|
12004
|
+
} from "@7365admin1/node-server-utils";
|
|
12005
12005
|
|
|
12006
12006
|
// src/repositories/site-camera.repo.ts
|
|
12007
12007
|
import {
|
|
@@ -12012,10 +12012,10 @@ import {
|
|
|
12012
12012
|
paginate as paginate16,
|
|
12013
12013
|
useAtlas as useAtlas29,
|
|
12014
12014
|
useCache as useCache22
|
|
12015
|
-
} from "@
|
|
12015
|
+
} from "@7365admin1/node-server-utils";
|
|
12016
12016
|
|
|
12017
12017
|
// src/models/site-camera.model.ts
|
|
12018
|
-
import { BadRequestError as BadRequestError62, logger as logger45 } from "@
|
|
12018
|
+
import { BadRequestError as BadRequestError62, logger as logger45 } from "@7365admin1/node-server-utils";
|
|
12019
12019
|
import { ObjectId as ObjectId35 } from "mongodb";
|
|
12020
12020
|
import Joi34 from "joi";
|
|
12021
12021
|
var schemaUpdateSiteCamera = Joi34.object({
|
|
@@ -12555,7 +12555,7 @@ function useSiteService() {
|
|
|
12555
12555
|
}
|
|
12556
12556
|
|
|
12557
12557
|
// src/controllers/site.controller.ts
|
|
12558
|
-
import { BadRequestError as BadRequestError65, logger as logger48 } from "@
|
|
12558
|
+
import { BadRequestError as BadRequestError65, logger as logger48 } from "@7365admin1/node-server-utils";
|
|
12559
12559
|
import Joi36 from "joi";
|
|
12560
12560
|
function useSiteController() {
|
|
12561
12561
|
const { createSite: _createSite } = useSiteService();
|
|
@@ -12753,7 +12753,7 @@ function useSiteController() {
|
|
|
12753
12753
|
}
|
|
12754
12754
|
|
|
12755
12755
|
// src/models/chat.model.ts
|
|
12756
|
-
import { BadRequestError as BadRequestError66, logger as logger49 } from "@
|
|
12756
|
+
import { BadRequestError as BadRequestError66, logger as logger49 } from "@7365admin1/node-server-utils";
|
|
12757
12757
|
import Joi37 from "joi";
|
|
12758
12758
|
import { ObjectId as ObjectId37 } from "mongodb";
|
|
12759
12759
|
var chatSchema = Joi37.object({
|
|
@@ -12809,7 +12809,7 @@ import {
|
|
|
12809
12809
|
InternalServerError as InternalServerError23,
|
|
12810
12810
|
useCache as useCache23,
|
|
12811
12811
|
logger as logger50
|
|
12812
|
-
} from "@
|
|
12812
|
+
} from "@7365admin1/node-server-utils";
|
|
12813
12813
|
function useChatRepo() {
|
|
12814
12814
|
const db = useAtlas31.getDb();
|
|
12815
12815
|
if (!db) {
|
|
@@ -12841,7 +12841,7 @@ function useChatRepo() {
|
|
|
12841
12841
|
}
|
|
12842
12842
|
|
|
12843
12843
|
// src/controllers/chat.controller.ts
|
|
12844
|
-
import { BadRequestError as BadRequestError67, logger as logger51 } from "@
|
|
12844
|
+
import { BadRequestError as BadRequestError67, logger as logger51 } from "@7365admin1/node-server-utils";
|
|
12845
12845
|
function useChatController() {
|
|
12846
12846
|
const { createChat: _createChat } = useChatRepo();
|
|
12847
12847
|
async function createChat(req, res, next) {
|
|
@@ -12866,7 +12866,7 @@ function useChatController() {
|
|
|
12866
12866
|
}
|
|
12867
12867
|
|
|
12868
12868
|
// src/models/building.model.ts
|
|
12869
|
-
import { BadRequestError as BadRequestError68, logger as logger52 } from "@
|
|
12869
|
+
import { BadRequestError as BadRequestError68, logger as logger52 } from "@7365admin1/node-server-utils";
|
|
12870
12870
|
import Joi38 from "joi";
|
|
12871
12871
|
import { ObjectId as ObjectId38 } from "mongodb";
|
|
12872
12872
|
var schemaBuilding = Joi38.object({
|
|
@@ -13033,7 +13033,7 @@ import {
|
|
|
13033
13033
|
paginate as paginate17,
|
|
13034
13034
|
useAtlas as useAtlas32,
|
|
13035
13035
|
useCache as useCache24
|
|
13036
|
-
} from "@
|
|
13036
|
+
} from "@7365admin1/node-server-utils";
|
|
13037
13037
|
import { ObjectId as ObjectId39 } from "mongodb";
|
|
13038
13038
|
function useBuildingRepo() {
|
|
13039
13039
|
const db = useAtlas32.getDb();
|
|
@@ -13321,7 +13321,7 @@ import {
|
|
|
13321
13321
|
logger as logger55,
|
|
13322
13322
|
NotFoundError as NotFoundError17,
|
|
13323
13323
|
useAtlas as useAtlas34
|
|
13324
|
-
} from "@
|
|
13324
|
+
} from "@7365admin1/node-server-utils";
|
|
13325
13325
|
|
|
13326
13326
|
// src/repositories/building-unit.repository.ts
|
|
13327
13327
|
import {
|
|
@@ -13333,7 +13333,7 @@ import {
|
|
|
13333
13333
|
paginate as paginate18,
|
|
13334
13334
|
useAtlas as useAtlas33,
|
|
13335
13335
|
useCache as useCache25
|
|
13336
|
-
} from "@
|
|
13336
|
+
} from "@7365admin1/node-server-utils";
|
|
13337
13337
|
import { ObjectId as ObjectId40 } from "mongodb";
|
|
13338
13338
|
function useBuildingUnitRepo() {
|
|
13339
13339
|
const db = useAtlas33.getDb();
|
|
@@ -13978,7 +13978,7 @@ function useBuildingService() {
|
|
|
13978
13978
|
}
|
|
13979
13979
|
|
|
13980
13980
|
// src/controllers/building.controller.ts
|
|
13981
|
-
import { BadRequestError as BadRequestError72, logger as logger56 } from "@
|
|
13981
|
+
import { BadRequestError as BadRequestError72, logger as logger56 } from "@7365admin1/node-server-utils";
|
|
13982
13982
|
import Joi39 from "joi";
|
|
13983
13983
|
function useBuildingController() {
|
|
13984
13984
|
const {
|
|
@@ -14156,7 +14156,7 @@ import {
|
|
|
14156
14156
|
logger as logger57,
|
|
14157
14157
|
useAtlas as useAtlas35,
|
|
14158
14158
|
NotFoundError as NotFoundError18
|
|
14159
|
-
} from "@
|
|
14159
|
+
} from "@7365admin1/node-server-utils";
|
|
14160
14160
|
function useBuildingUnitService() {
|
|
14161
14161
|
const { add: _add, updateById: _updateById, getById } = useBuildingUnitRepo();
|
|
14162
14162
|
const { updateStatusById } = useFileRepo();
|
|
@@ -14248,7 +14248,7 @@ function useBuildingUnitService() {
|
|
|
14248
14248
|
}
|
|
14249
14249
|
|
|
14250
14250
|
// src/controllers/building-unit.controller.ts
|
|
14251
|
-
import { BadRequestError as BadRequestError74, logger as logger58 } from "@
|
|
14251
|
+
import { BadRequestError as BadRequestError74, logger as logger58 } from "@7365admin1/node-server-utils";
|
|
14252
14252
|
import Joi40 from "joi";
|
|
14253
14253
|
function useBuildingUnitController() {
|
|
14254
14254
|
const {
|
|
@@ -14462,7 +14462,7 @@ function useBuildingUnitController() {
|
|
|
14462
14462
|
}
|
|
14463
14463
|
|
|
14464
14464
|
// src/services/dahua.service.ts
|
|
14465
|
-
import { BadRequestError as BadRequestError79, logger as logger63, useS3 as useS33 } from "@
|
|
14465
|
+
import { BadRequestError as BadRequestError79, logger as logger63, useS3 as useS33 } from "@7365admin1/node-server-utils";
|
|
14466
14466
|
import * as fs from "fs";
|
|
14467
14467
|
import { promises as fsAsync } from "fs";
|
|
14468
14468
|
import Joi45 from "joi";
|
|
@@ -14478,7 +14478,7 @@ import {
|
|
|
14478
14478
|
paginate as paginate19,
|
|
14479
14479
|
useAtlas as useAtlas36,
|
|
14480
14480
|
useCache as useCache26
|
|
14481
|
-
} from "@
|
|
14481
|
+
} from "@7365admin1/node-server-utils";
|
|
14482
14482
|
|
|
14483
14483
|
// src/models/visitor-transactions.model.ts
|
|
14484
14484
|
import Joi42 from "joi";
|
|
@@ -14947,7 +14947,7 @@ import {
|
|
|
14947
14947
|
useAtlas as useAtlas37,
|
|
14948
14948
|
useCache as useCache27,
|
|
14949
14949
|
AppError as AppError12
|
|
14950
|
-
} from "@
|
|
14950
|
+
} from "@7365admin1/node-server-utils";
|
|
14951
14951
|
import { ObjectId as ObjectId44 } from "mongodb";
|
|
14952
14952
|
function usePersonRepo() {
|
|
14953
14953
|
const db = useAtlas37.getDb();
|
|
@@ -15378,10 +15378,10 @@ import {
|
|
|
15378
15378
|
paginate as paginate21,
|
|
15379
15379
|
useAtlas as useAtlas38,
|
|
15380
15380
|
useCache as useCache28
|
|
15381
|
-
} from "@
|
|
15381
|
+
} from "@7365admin1/node-server-utils";
|
|
15382
15382
|
|
|
15383
15383
|
// src/models/vehicle.model.ts
|
|
15384
|
-
import { BadRequestError as BadRequestError77, logger as logger61 } from "@
|
|
15384
|
+
import { BadRequestError as BadRequestError77, logger as logger61 } from "@7365admin1/node-server-utils";
|
|
15385
15385
|
import Joi43 from "joi";
|
|
15386
15386
|
import { ObjectId as ObjectId45 } from "mongodb";
|
|
15387
15387
|
var allowedTypes = ["whitelist", "blacklist"];
|
|
@@ -16317,7 +16317,7 @@ import {
|
|
|
16317
16317
|
InternalServerError as InternalServerError29,
|
|
16318
16318
|
logger as logger64,
|
|
16319
16319
|
useAtlas as useAtlas39
|
|
16320
|
-
} from "@
|
|
16320
|
+
} from "@7365admin1/node-server-utils";
|
|
16321
16321
|
function useVehicleService() {
|
|
16322
16322
|
const { add: _add, deleteVehicle: _deleteVehicle } = useVehicleRepo();
|
|
16323
16323
|
const {
|
|
@@ -16446,7 +16446,7 @@ function useVehicleService() {
|
|
|
16446
16446
|
}
|
|
16447
16447
|
|
|
16448
16448
|
// src/controllers/vehicle.controller.ts
|
|
16449
|
-
import { BadRequestError as BadRequestError81, logger as logger65 } from "@
|
|
16449
|
+
import { BadRequestError as BadRequestError81, logger as logger65 } from "@7365admin1/node-server-utils";
|
|
16450
16450
|
import Joi46 from "joi";
|
|
16451
16451
|
function useVehicleController() {
|
|
16452
16452
|
const { add: _add, deleteVehicle: _deleteVehicle } = useVehicleService();
|
|
@@ -16634,7 +16634,7 @@ function useVehicleController() {
|
|
|
16634
16634
|
import {
|
|
16635
16635
|
BadRequestError as BadRequestError82,
|
|
16636
16636
|
useAtlas as useAtlas40
|
|
16637
|
-
} from "@
|
|
16637
|
+
} from "@7365admin1/node-server-utils";
|
|
16638
16638
|
function useSiteCameraService() {
|
|
16639
16639
|
const { add: _add, getAllCameraWithPassword: _getAllCameraWithPassword } = useSiteCameraRepo();
|
|
16640
16640
|
const { updateById: _updateById } = useSiteRepo();
|
|
@@ -16700,7 +16700,7 @@ function useSiteCameraService() {
|
|
|
16700
16700
|
}
|
|
16701
16701
|
|
|
16702
16702
|
// src/controllers/site-camera.controller.ts
|
|
16703
|
-
import { BadRequestError as BadRequestError83 } from "@
|
|
16703
|
+
import { BadRequestError as BadRequestError83 } from "@7365admin1/node-server-utils";
|
|
16704
16704
|
import Joi47 from "joi";
|
|
16705
16705
|
function useSiteCameraController() {
|
|
16706
16706
|
const { add: _add } = useSiteCameraService();
|
|
@@ -16871,7 +16871,7 @@ import {
|
|
|
16871
16871
|
paginate as paginate22,
|
|
16872
16872
|
useAtlas as useAtlas41,
|
|
16873
16873
|
useCache as useCache29
|
|
16874
|
-
} from "@
|
|
16874
|
+
} from "@7365admin1/node-server-utils";
|
|
16875
16875
|
import { ObjectId as ObjectId48 } from "mongodb";
|
|
16876
16876
|
import Joi49 from "joi";
|
|
16877
16877
|
function useCustomerSiteRepo() {
|
|
@@ -17099,7 +17099,7 @@ import {
|
|
|
17099
17099
|
BadRequestError as BadRequestError85,
|
|
17100
17100
|
useAtlas as useAtlas42,
|
|
17101
17101
|
NotFoundError as NotFoundError20
|
|
17102
|
-
} from "@
|
|
17102
|
+
} from "@7365admin1/node-server-utils";
|
|
17103
17103
|
import levenshtein from "fast-levenshtein";
|
|
17104
17104
|
function useCustomerSiteService() {
|
|
17105
17105
|
const { add: _add } = useCustomerSiteRepo();
|
|
@@ -17241,7 +17241,7 @@ function useCustomerSiteService() {
|
|
|
17241
17241
|
|
|
17242
17242
|
// src/controllers/customer-site.controller.ts
|
|
17243
17243
|
import Joi50 from "joi";
|
|
17244
|
-
import { BadRequestError as BadRequestError86, logger as logger68 } from "@
|
|
17244
|
+
import { BadRequestError as BadRequestError86, logger as logger68 } from "@7365admin1/node-server-utils";
|
|
17245
17245
|
function useCustomerSiteController() {
|
|
17246
17246
|
const {
|
|
17247
17247
|
getAll: _getAll,
|
|
@@ -17383,7 +17383,7 @@ function useCustomerSiteController() {
|
|
|
17383
17383
|
}
|
|
17384
17384
|
|
|
17385
17385
|
// src/models/attendance-settings.model.ts
|
|
17386
|
-
import { BadRequestError as BadRequestError87, logger as logger69 } from "@
|
|
17386
|
+
import { BadRequestError as BadRequestError87, logger as logger69 } from "@7365admin1/node-server-utils";
|
|
17387
17387
|
import Joi51 from "joi";
|
|
17388
17388
|
import { ObjectId as ObjectId49 } from "mongodb";
|
|
17389
17389
|
var attendanceSettingsSchema = Joi51.object({
|
|
@@ -17443,7 +17443,7 @@ import {
|
|
|
17443
17443
|
logger as logger70,
|
|
17444
17444
|
makeCacheKey as makeCacheKey28,
|
|
17445
17445
|
NotFoundError as NotFoundError21
|
|
17446
|
-
} from "@
|
|
17446
|
+
} from "@7365admin1/node-server-utils";
|
|
17447
17447
|
function useAttendanceSettingsRepository() {
|
|
17448
17448
|
const db = useAtlas43.getDb();
|
|
17449
17449
|
if (!db) {
|
|
@@ -17560,7 +17560,7 @@ function useAttendanceSettingsRepository() {
|
|
|
17560
17560
|
}
|
|
17561
17561
|
|
|
17562
17562
|
// src/services/attendance-settings.service.ts
|
|
17563
|
-
import { logger as logger71, useAtlas as useAtlas44 } from "@
|
|
17563
|
+
import { logger as logger71, useAtlas as useAtlas44 } from "@7365admin1/node-server-utils";
|
|
17564
17564
|
function useAttendanceSettingsService() {
|
|
17565
17565
|
const {
|
|
17566
17566
|
createAttendanceSettings,
|
|
@@ -17603,7 +17603,7 @@ function useAttendanceSettingsService() {
|
|
|
17603
17603
|
|
|
17604
17604
|
// src/controllers/attendance-settings.controller.ts
|
|
17605
17605
|
import Joi52 from "joi";
|
|
17606
|
-
import { BadRequestError as BadRequestError89, logger as logger72 } from "@
|
|
17606
|
+
import { BadRequestError as BadRequestError89, logger as logger72 } from "@7365admin1/node-server-utils";
|
|
17607
17607
|
function useAttendanceSettingsController() {
|
|
17608
17608
|
const { getAttendanceSettingsBySite: _getAttendanceSettingsBySite } = useAttendanceSettingsService();
|
|
17609
17609
|
const { updateAttendanceSettings: _updateAttendanceSettings } = useAttendanceSettingsRepository();
|
|
@@ -17651,7 +17651,7 @@ function useAttendanceSettingsController() {
|
|
|
17651
17651
|
}
|
|
17652
17652
|
|
|
17653
17653
|
// src/models/attendance.model.ts
|
|
17654
|
-
import { BadRequestError as BadRequestError90, logger as logger73 } from "@
|
|
17654
|
+
import { BadRequestError as BadRequestError90, logger as logger73 } from "@7365admin1/node-server-utils";
|
|
17655
17655
|
import Joi53 from "joi";
|
|
17656
17656
|
import { ObjectId as ObjectId51 } from "mongodb";
|
|
17657
17657
|
var attendanceSchema = Joi53.object({
|
|
@@ -17708,7 +17708,7 @@ import {
|
|
|
17708
17708
|
logger as logger74,
|
|
17709
17709
|
makeCacheKey as makeCacheKey29,
|
|
17710
17710
|
NotFoundError as NotFoundError22
|
|
17711
|
-
} from "@
|
|
17711
|
+
} from "@7365admin1/node-server-utils";
|
|
17712
17712
|
function useAttendanceRepository() {
|
|
17713
17713
|
const db = useAtlas45.getDb();
|
|
17714
17714
|
if (!db) {
|
|
@@ -18104,14 +18104,14 @@ function useAttendanceRepository() {
|
|
|
18104
18104
|
|
|
18105
18105
|
// src/controllers/attendance.controller.ts
|
|
18106
18106
|
import Joi54 from "joi";
|
|
18107
|
-
import { BadRequestError as BadRequestError93, logger as logger76 } from "@
|
|
18107
|
+
import { BadRequestError as BadRequestError93, logger as logger76 } from "@7365admin1/node-server-utils";
|
|
18108
18108
|
|
|
18109
18109
|
// src/services/attendance.service.ts
|
|
18110
18110
|
import {
|
|
18111
18111
|
BadRequestError as BadRequestError92,
|
|
18112
18112
|
logger as logger75,
|
|
18113
18113
|
useAtlas as useAtlas46
|
|
18114
|
-
} from "@
|
|
18114
|
+
} from "@7365admin1/node-server-utils";
|
|
18115
18115
|
function calculateDistance(lat1, lon1, lat2, lon2) {
|
|
18116
18116
|
const R = 3958.8;
|
|
18117
18117
|
const dLat = (lat2 - lat1) * (Math.PI / 180);
|
|
@@ -18414,7 +18414,7 @@ function useAttendanceController() {
|
|
|
18414
18414
|
}
|
|
18415
18415
|
|
|
18416
18416
|
// src/services/visitor-transaction.service.ts
|
|
18417
|
-
import { useAtlas as useAtlas47 } from "@
|
|
18417
|
+
import { useAtlas as useAtlas47 } from "@7365admin1/node-server-utils";
|
|
18418
18418
|
function useVisitorTransactionService() {
|
|
18419
18419
|
const { add: _add, updateById: _updateVisitorTansactionById } = useVisitorTransactionRepo();
|
|
18420
18420
|
const {
|
|
@@ -18526,7 +18526,7 @@ function useVisitorTransactionService() {
|
|
|
18526
18526
|
|
|
18527
18527
|
// src/controllers/visitor-transaction.controller.ts
|
|
18528
18528
|
import Joi55 from "joi";
|
|
18529
|
-
import { BadRequestError as BadRequestError94, logger as logger77 } from "@
|
|
18529
|
+
import { BadRequestError as BadRequestError94, logger as logger77 } from "@7365admin1/node-server-utils";
|
|
18530
18530
|
function useVisitorTransactionController() {
|
|
18531
18531
|
const { add: _add, updateById: _updateVisitorTansactionById } = useVisitorTransactionService();
|
|
18532
18532
|
const {
|
|
@@ -18764,7 +18764,7 @@ import {
|
|
|
18764
18764
|
paginate as paginate24,
|
|
18765
18765
|
useAtlas as useAtlas48,
|
|
18766
18766
|
useCache as useCache32
|
|
18767
|
-
} from "@
|
|
18767
|
+
} from "@7365admin1/node-server-utils";
|
|
18768
18768
|
import { ObjectId as ObjectId54 } from "mongodb";
|
|
18769
18769
|
function useGuestManagementRepo() {
|
|
18770
18770
|
const db = useAtlas48.getDb();
|
|
@@ -18940,7 +18940,7 @@ function useGuestManagementRepo() {
|
|
|
18940
18940
|
}
|
|
18941
18941
|
|
|
18942
18942
|
// src/services/guest-management.service.ts
|
|
18943
|
-
import { useAtlas as useAtlas49 } from "@
|
|
18943
|
+
import { useAtlas as useAtlas49 } from "@7365admin1/node-server-utils";
|
|
18944
18944
|
function useGuestManagementService() {
|
|
18945
18945
|
const { add: _add, updateVisitorGuestById: _updateVisitorGuestById } = useGuestManagementRepo();
|
|
18946
18946
|
async function add(value) {
|
|
@@ -18979,7 +18979,7 @@ function useGuestManagementService() {
|
|
|
18979
18979
|
|
|
18980
18980
|
// src/controllers/guest-management.controller.ts
|
|
18981
18981
|
import Joi57 from "joi";
|
|
18982
|
-
import { BadRequestError as BadRequestError96, logger as logger79 } from "@
|
|
18982
|
+
import { BadRequestError as BadRequestError96, logger as logger79 } from "@7365admin1/node-server-utils";
|
|
18983
18983
|
function useGuestManagementController() {
|
|
18984
18984
|
const { add: _add, updateVisitorGuestById: _updateVisitorGuestById } = useGuestManagementService();
|
|
18985
18985
|
const { getAll: _getAll, deleteVisitorGuest: _deleteVisitorGuest } = useGuestManagementRepo();
|
|
@@ -19115,14 +19115,14 @@ function useGuestManagementController() {
|
|
|
19115
19115
|
|
|
19116
19116
|
// src/controllers/person.controller.ts
|
|
19117
19117
|
import Joi58 from "joi";
|
|
19118
|
-
import { BadRequestError as BadRequestError98, logger as logger81 } from "@
|
|
19118
|
+
import { BadRequestError as BadRequestError98, logger as logger81 } from "@7365admin1/node-server-utils";
|
|
19119
19119
|
|
|
19120
19120
|
// src/services/person.service.ts
|
|
19121
19121
|
import {
|
|
19122
19122
|
BadRequestError as BadRequestError97,
|
|
19123
19123
|
logger as logger80,
|
|
19124
19124
|
useAtlas as useAtlas50
|
|
19125
|
-
} from "@
|
|
19125
|
+
} from "@7365admin1/node-server-utils";
|
|
19126
19126
|
function usePersonService() {
|
|
19127
19127
|
const {
|
|
19128
19128
|
add: _add,
|
|
@@ -19528,7 +19528,7 @@ function usePersonController() {
|
|
|
19528
19528
|
}
|
|
19529
19529
|
|
|
19530
19530
|
// src/models/robot.model.ts
|
|
19531
|
-
import { BadRequestError as BadRequestError99, logger as logger82 } from "@
|
|
19531
|
+
import { BadRequestError as BadRequestError99, logger as logger82 } from "@7365admin1/node-server-utils";
|
|
19532
19532
|
import Joi59 from "joi";
|
|
19533
19533
|
import { ObjectId as ObjectId55 } from "mongodb";
|
|
19534
19534
|
var metadataSchema3 = {
|
|
@@ -19612,7 +19612,7 @@ import {
|
|
|
19612
19612
|
useCache as useCache33,
|
|
19613
19613
|
makeCacheKey as makeCacheKey31,
|
|
19614
19614
|
logger as logger83
|
|
19615
|
-
} from "@
|
|
19615
|
+
} from "@7365admin1/node-server-utils";
|
|
19616
19616
|
function useRobotRepo() {
|
|
19617
19617
|
const db = useAtlas51.getDb();
|
|
19618
19618
|
if (!db) {
|
|
@@ -19759,7 +19759,7 @@ function useRobotRepo() {
|
|
|
19759
19759
|
}
|
|
19760
19760
|
|
|
19761
19761
|
// src/services/robot.service.ts
|
|
19762
|
-
import { BadRequestError as BadRequestError101 } from "@
|
|
19762
|
+
import { BadRequestError as BadRequestError101 } from "@7365admin1/node-server-utils";
|
|
19763
19763
|
function useRobotService() {
|
|
19764
19764
|
const { createRobot: _createRobot, getRobots: _getRobots } = useRobotRepo();
|
|
19765
19765
|
const { getUserById } = useUserRepo();
|
|
@@ -19827,7 +19827,7 @@ function useRobotService() {
|
|
|
19827
19827
|
|
|
19828
19828
|
// src/controllers/robot.controller.ts
|
|
19829
19829
|
import Joi60 from "joi";
|
|
19830
|
-
import { BadRequestError as BadRequestError102, logger as logger84 } from "@
|
|
19830
|
+
import { BadRequestError as BadRequestError102, logger as logger84 } from "@7365admin1/node-server-utils";
|
|
19831
19831
|
function useRobotController() {
|
|
19832
19832
|
const { createRobot: _createRobot, getRobots: _getRobots } = useRobotService();
|
|
19833
19833
|
async function createRobot(req, res, next) {
|
|
@@ -19899,7 +19899,7 @@ function useRobotController() {
|
|
|
19899
19899
|
}
|
|
19900
19900
|
|
|
19901
19901
|
// src/models/patrol-question.model.ts
|
|
19902
|
-
import { BadRequestError as BadRequestError103, logger as logger85 } from "@
|
|
19902
|
+
import { BadRequestError as BadRequestError103, logger as logger85 } from "@7365admin1/node-server-utils";
|
|
19903
19903
|
import { ObjectId as ObjectId57 } from "mongodb";
|
|
19904
19904
|
import Joi61 from "joi";
|
|
19905
19905
|
var schemaPatrolQuestion = Joi61.object({
|
|
@@ -19953,7 +19953,7 @@ import {
|
|
|
19953
19953
|
paginate as paginate26,
|
|
19954
19954
|
useAtlas as useAtlas52,
|
|
19955
19955
|
useCache as useCache34
|
|
19956
|
-
} from "@
|
|
19956
|
+
} from "@7365admin1/node-server-utils";
|
|
19957
19957
|
import { ObjectId as ObjectId58 } from "mongodb";
|
|
19958
19958
|
function usePatrolQuestionRepo() {
|
|
19959
19959
|
const db = useAtlas52.getDb();
|
|
@@ -20164,7 +20164,7 @@ function usePatrolQuestionRepo() {
|
|
|
20164
20164
|
}
|
|
20165
20165
|
|
|
20166
20166
|
// src/controllers/patrol-question.controller.ts
|
|
20167
|
-
import { BadRequestError as BadRequestError105, logger as logger87 } from "@
|
|
20167
|
+
import { BadRequestError as BadRequestError105, logger as logger87 } from "@7365admin1/node-server-utils";
|
|
20168
20168
|
import Joi62 from "joi";
|
|
20169
20169
|
function usePatrolQuestionController() {
|
|
20170
20170
|
const {
|
|
@@ -20291,7 +20291,7 @@ function usePatrolQuestionController() {
|
|
|
20291
20291
|
}
|
|
20292
20292
|
|
|
20293
20293
|
// src/models/patrol-route.model.ts
|
|
20294
|
-
import { BadRequestError as BadRequestError106, logger as logger88 } from "@
|
|
20294
|
+
import { BadRequestError as BadRequestError106, logger as logger88 } from "@7365admin1/node-server-utils";
|
|
20295
20295
|
import { ObjectId as ObjectId59 } from "mongodb";
|
|
20296
20296
|
import Joi63 from "joi";
|
|
20297
20297
|
var schemeCamera = Joi63.object({
|
|
@@ -20401,7 +20401,7 @@ import {
|
|
|
20401
20401
|
paginate as paginate27,
|
|
20402
20402
|
useAtlas as useAtlas53,
|
|
20403
20403
|
useCache as useCache35
|
|
20404
|
-
} from "@
|
|
20404
|
+
} from "@7365admin1/node-server-utils";
|
|
20405
20405
|
import { ObjectId as ObjectId60 } from "mongodb";
|
|
20406
20406
|
function usePatrolRouteRepo() {
|
|
20407
20407
|
const db = useAtlas53.getDb();
|
|
@@ -20740,7 +20740,7 @@ function usePatrolRouteRepo() {
|
|
|
20740
20740
|
}
|
|
20741
20741
|
|
|
20742
20742
|
// src/controllers/patrol-route.controller.ts
|
|
20743
|
-
import { BadRequestError as BadRequestError108, logger as logger90 } from "@
|
|
20743
|
+
import { BadRequestError as BadRequestError108, logger as logger90 } from "@7365admin1/node-server-utils";
|
|
20744
20744
|
import Joi64 from "joi";
|
|
20745
20745
|
function usePatrolRouteController() {
|
|
20746
20746
|
const {
|
|
@@ -20926,7 +20926,7 @@ function usePatrolRouteController() {
|
|
|
20926
20926
|
}
|
|
20927
20927
|
|
|
20928
20928
|
// src/models/patrol-log.model.ts
|
|
20929
|
-
import { BadRequestError as BadRequestError109, logger as logger91 } from "@
|
|
20929
|
+
import { BadRequestError as BadRequestError109, logger as logger91 } from "@7365admin1/node-server-utils";
|
|
20930
20930
|
import { ObjectId as ObjectId61 } from "mongodb";
|
|
20931
20931
|
import Joi65 from "joi";
|
|
20932
20932
|
var schemeLogCamera = Joi65.object({
|
|
@@ -21030,7 +21030,7 @@ import {
|
|
|
21030
21030
|
paginate as paginate28,
|
|
21031
21031
|
useAtlas as useAtlas54,
|
|
21032
21032
|
useCache as useCache36
|
|
21033
|
-
} from "@
|
|
21033
|
+
} from "@7365admin1/node-server-utils";
|
|
21034
21034
|
import { ObjectId as ObjectId62 } from "mongodb";
|
|
21035
21035
|
function usePatrolLogRepo() {
|
|
21036
21036
|
const db = useAtlas54.getDb();
|
|
@@ -21204,7 +21204,7 @@ function usePatrolLogRepo() {
|
|
|
21204
21204
|
}
|
|
21205
21205
|
|
|
21206
21206
|
// src/controllers/patrol-log.controller.ts
|
|
21207
|
-
import { BadRequestError as BadRequestError112, logger as logger94 } from "@
|
|
21207
|
+
import { BadRequestError as BadRequestError112, logger as logger94 } from "@7365admin1/node-server-utils";
|
|
21208
21208
|
|
|
21209
21209
|
// src/services/patrol-log.service.ts
|
|
21210
21210
|
import {
|
|
@@ -21212,7 +21212,7 @@ import {
|
|
|
21212
21212
|
logger as logger93,
|
|
21213
21213
|
NotFoundError as NotFoundError24,
|
|
21214
21214
|
useAtlas as useAtlas55
|
|
21215
|
-
} from "@
|
|
21215
|
+
} from "@7365admin1/node-server-utils";
|
|
21216
21216
|
function usePatrolLogService() {
|
|
21217
21217
|
const { add: _add } = usePatrolLogRepo();
|
|
21218
21218
|
const { updateStatusById } = useFileRepo();
|
|
@@ -21666,7 +21666,7 @@ import {
|
|
|
21666
21666
|
paginate as paginate29,
|
|
21667
21667
|
useAtlas as useAtlas56,
|
|
21668
21668
|
useCache as useCache37
|
|
21669
|
-
} from "@
|
|
21669
|
+
} from "@7365admin1/node-server-utils";
|
|
21670
21670
|
import { ObjectId as ObjectId64 } from "mongodb";
|
|
21671
21671
|
function useSiteFacilityRepo() {
|
|
21672
21672
|
const db = useAtlas56.getDb();
|
|
@@ -21943,7 +21943,7 @@ function useSiteFacilityRepo() {
|
|
|
21943
21943
|
}
|
|
21944
21944
|
|
|
21945
21945
|
// src/services/site-facility.service.ts
|
|
21946
|
-
import { useAtlas as useAtlas57 } from "@
|
|
21946
|
+
import { useAtlas as useAtlas57 } from "@7365admin1/node-server-utils";
|
|
21947
21947
|
function useSiteFacilityService() {
|
|
21948
21948
|
const {
|
|
21949
21949
|
add: _add,
|
|
@@ -22057,7 +22057,7 @@ function useSiteFacilityService() {
|
|
|
22057
22057
|
}
|
|
22058
22058
|
|
|
22059
22059
|
// src/controllers/site-facility.controller.ts
|
|
22060
|
-
import { BadRequestError as BadRequestError114, logger as logger96 } from "@
|
|
22060
|
+
import { BadRequestError as BadRequestError114, logger as logger96 } from "@7365admin1/node-server-utils";
|
|
22061
22061
|
import Joi68 from "joi";
|
|
22062
22062
|
function useSiteFacilityController() {
|
|
22063
22063
|
const {
|
|
@@ -22324,7 +22324,7 @@ import {
|
|
|
22324
22324
|
paginate as paginate30,
|
|
22325
22325
|
useAtlas as useAtlas58,
|
|
22326
22326
|
useCache as useCache38
|
|
22327
|
-
} from "@
|
|
22327
|
+
} from "@7365admin1/node-server-utils";
|
|
22328
22328
|
import { ObjectId as ObjectId66 } from "mongodb";
|
|
22329
22329
|
function useServiceProviderBillingRepo() {
|
|
22330
22330
|
const db = useAtlas58.getDb();
|
|
@@ -22532,7 +22532,7 @@ function useServiceProviderBillingRepo() {
|
|
|
22532
22532
|
}
|
|
22533
22533
|
|
|
22534
22534
|
// src/services/service-provider-billing.service.ts
|
|
22535
|
-
import { useAtlas as useAtlas59 } from "@
|
|
22535
|
+
import { useAtlas as useAtlas59 } from "@7365admin1/node-server-utils";
|
|
22536
22536
|
function useServiceProviderBillingService() {
|
|
22537
22537
|
const {
|
|
22538
22538
|
add: _add,
|
|
@@ -22573,7 +22573,7 @@ function useServiceProviderBillingService() {
|
|
|
22573
22573
|
}
|
|
22574
22574
|
|
|
22575
22575
|
// src/controllers/service-provider-billing.controller.ts
|
|
22576
|
-
import { BadRequestError as BadRequestError116, logger as logger98 } from "@
|
|
22576
|
+
import { BadRequestError as BadRequestError116, logger as logger98 } from "@7365admin1/node-server-utils";
|
|
22577
22577
|
import Joi70 from "joi";
|
|
22578
22578
|
function useServiceProviderBillingController() {
|
|
22579
22579
|
const {
|
|
@@ -22962,7 +22962,7 @@ import {
|
|
|
22962
22962
|
paginate as paginate31,
|
|
22963
22963
|
useAtlas as useAtlas60,
|
|
22964
22964
|
useCache as useCache39
|
|
22965
|
-
} from "@
|
|
22965
|
+
} from "@7365admin1/node-server-utils";
|
|
22966
22966
|
import { ObjectId as ObjectId68 } from "mongodb";
|
|
22967
22967
|
function useSiteFacilityBookingRepo() {
|
|
22968
22968
|
const db = useAtlas60.getDb();
|
|
@@ -23172,7 +23172,7 @@ function useSiteFacilityBookingRepo() {
|
|
|
23172
23172
|
}
|
|
23173
23173
|
|
|
23174
23174
|
// src/services/site-facility-booking.service.ts
|
|
23175
|
-
import { useAtlas as useAtlas61 } from "@
|
|
23175
|
+
import { useAtlas as useAtlas61 } from "@7365admin1/node-server-utils";
|
|
23176
23176
|
function useSiteFacilityBookingService() {
|
|
23177
23177
|
const {
|
|
23178
23178
|
add: _add,
|
|
@@ -23218,7 +23218,7 @@ function useSiteFacilityBookingService() {
|
|
|
23218
23218
|
}
|
|
23219
23219
|
|
|
23220
23220
|
// src/controllers/site-facility-booking.controller.ts
|
|
23221
|
-
import { BadRequestError as BadRequestError118, logger as logger100 } from "@
|
|
23221
|
+
import { BadRequestError as BadRequestError118, logger as logger100 } from "@7365admin1/node-server-utils";
|
|
23222
23222
|
import Joi72 from "joi";
|
|
23223
23223
|
function useSiteFacilityBookingController() {
|
|
23224
23224
|
const {
|
|
@@ -23452,7 +23452,7 @@ import {
|
|
|
23452
23452
|
paginate as paginate32,
|
|
23453
23453
|
useAtlas as useAtlas62,
|
|
23454
23454
|
useCache as useCache40
|
|
23455
|
-
} from "@
|
|
23455
|
+
} from "@7365admin1/node-server-utils";
|
|
23456
23456
|
import { ObjectId as ObjectId70 } from "mongodb";
|
|
23457
23457
|
function useDocumentManagementRepo() {
|
|
23458
23458
|
const db = useAtlas62.getDb();
|
|
@@ -23724,7 +23724,7 @@ import {
|
|
|
23724
23724
|
useAtlas as useAtlas63,
|
|
23725
23725
|
BadRequestError as BadRequestError120,
|
|
23726
23726
|
NotFoundError as NotFoundError29
|
|
23727
|
-
} from "@
|
|
23727
|
+
} from "@7365admin1/node-server-utils";
|
|
23728
23728
|
function useDocumentManagementService() {
|
|
23729
23729
|
const { add: _add, getAll: _getAll } = useDocumentManagementRepo();
|
|
23730
23730
|
const { updateStatusById } = useFileRepo();
|
|
@@ -23786,7 +23786,7 @@ function useDocumentManagementService() {
|
|
|
23786
23786
|
}
|
|
23787
23787
|
|
|
23788
23788
|
// src/controllers/document-management.controller.ts
|
|
23789
|
-
import { BadRequestError as BadRequestError121, logger as logger102 } from "@
|
|
23789
|
+
import { BadRequestError as BadRequestError121, logger as logger102 } from "@7365admin1/node-server-utils";
|
|
23790
23790
|
import Joi74 from "joi";
|
|
23791
23791
|
function useDocumentManagementController() {
|
|
23792
23792
|
const { createDocument: _add, getDocuments: _getDocuments } = useDocumentManagementService();
|
|
@@ -24082,7 +24082,7 @@ import {
|
|
|
24082
24082
|
paginate as paginate33,
|
|
24083
24083
|
useAtlas as useAtlas64,
|
|
24084
24084
|
useCache as useCache41
|
|
24085
|
-
} from "@
|
|
24085
|
+
} from "@7365admin1/node-server-utils";
|
|
24086
24086
|
import { ObjectId as ObjectId72 } from "mongodb";
|
|
24087
24087
|
function useBulletinBoardRepo() {
|
|
24088
24088
|
const db = useAtlas64.getDb();
|
|
@@ -24314,7 +24314,7 @@ function useBulletinBoardRepo() {
|
|
|
24314
24314
|
}
|
|
24315
24315
|
|
|
24316
24316
|
// src/services/bulletin-board.service.ts
|
|
24317
|
-
import { useAtlas as useAtlas65 } from "@
|
|
24317
|
+
import { useAtlas as useAtlas65 } from "@7365admin1/node-server-utils";
|
|
24318
24318
|
function useBulletinBoardService() {
|
|
24319
24319
|
const {
|
|
24320
24320
|
add: _add,
|
|
@@ -24371,7 +24371,7 @@ function useBulletinBoardService() {
|
|
|
24371
24371
|
}
|
|
24372
24372
|
|
|
24373
24373
|
// src/controllers/bulletin-board.controller.ts
|
|
24374
|
-
import { BadRequestError as BadRequestError123, logger as logger104 } from "@
|
|
24374
|
+
import { BadRequestError as BadRequestError123, logger as logger104 } from "@7365admin1/node-server-utils";
|
|
24375
24375
|
import Joi76 from "joi";
|
|
24376
24376
|
function useBulletinBoardController() {
|
|
24377
24377
|
const { add: _add, updateBulletinBoardById: _updateBulletinBoardById } = useBulletinBoardService();
|
|
@@ -24524,7 +24524,7 @@ function useBulletinBoardController() {
|
|
|
24524
24524
|
}
|
|
24525
24525
|
|
|
24526
24526
|
// src/models/site-billing-item.model.ts
|
|
24527
|
-
import { BadRequestError as BadRequestError124, logger as logger105 } from "@
|
|
24527
|
+
import { BadRequestError as BadRequestError124, logger as logger105 } from "@7365admin1/node-server-utils";
|
|
24528
24528
|
import { ObjectId as ObjectId73 } from "mongodb";
|
|
24529
24529
|
import Joi77 from "joi";
|
|
24530
24530
|
var schemaUnits = Joi77.object({
|
|
@@ -24654,7 +24654,7 @@ import {
|
|
|
24654
24654
|
useCache as useCache42,
|
|
24655
24655
|
paginate as paginate34,
|
|
24656
24656
|
makeCacheKey as makeCacheKey40
|
|
24657
|
-
} from "@
|
|
24657
|
+
} from "@7365admin1/node-server-utils";
|
|
24658
24658
|
import { ObjectId as ObjectId74 } from "mongodb";
|
|
24659
24659
|
function useSiteBillingItemRepo() {
|
|
24660
24660
|
const db = useAtlas66.getDb();
|
|
@@ -24879,14 +24879,14 @@ function useSiteBillingItemRepo() {
|
|
|
24879
24879
|
}
|
|
24880
24880
|
|
|
24881
24881
|
// src/controllers/site-billing-item.controller.ts
|
|
24882
|
-
import { BadRequestError as BadRequestError129, logger as logger110 } from "@
|
|
24882
|
+
import { BadRequestError as BadRequestError129, logger as logger110 } from "@7365admin1/node-server-utils";
|
|
24883
24883
|
|
|
24884
24884
|
// src/services/site-billing-item.service.ts
|
|
24885
24885
|
import {
|
|
24886
24886
|
BadRequestError as BadRequestError128,
|
|
24887
24887
|
logger as logger109,
|
|
24888
24888
|
useAtlas as useAtlas68
|
|
24889
|
-
} from "@
|
|
24889
|
+
} from "@7365admin1/node-server-utils";
|
|
24890
24890
|
|
|
24891
24891
|
// src/repositories/site-billing-configuration.repo.ts
|
|
24892
24892
|
import {
|
|
@@ -24898,10 +24898,10 @@ import {
|
|
|
24898
24898
|
useCache as useCache43,
|
|
24899
24899
|
paginate as paginate35,
|
|
24900
24900
|
makeCacheKey as makeCacheKey41
|
|
24901
|
-
} from "@
|
|
24901
|
+
} from "@7365admin1/node-server-utils";
|
|
24902
24902
|
|
|
24903
24903
|
// src/models/site-billing-configuration.model.ts
|
|
24904
|
-
import { BadRequestError as BadRequestError126, logger as logger107 } from "@
|
|
24904
|
+
import { BadRequestError as BadRequestError126, logger as logger107 } from "@7365admin1/node-server-utils";
|
|
24905
24905
|
import { ObjectId as ObjectId75 } from "mongodb";
|
|
24906
24906
|
import Joi78 from "joi";
|
|
24907
24907
|
var schemaBillingConfiguration = Joi78.object({
|
|
@@ -25579,14 +25579,14 @@ function useSiteBillingItemController() {
|
|
|
25579
25579
|
}
|
|
25580
25580
|
|
|
25581
25581
|
// src/controllers/site-billing-configuration.controller.ts
|
|
25582
|
-
import { BadRequestError as BadRequestError131, logger as logger112 } from "@
|
|
25582
|
+
import { BadRequestError as BadRequestError131, logger as logger112 } from "@7365admin1/node-server-utils";
|
|
25583
25583
|
|
|
25584
25584
|
// src/services/site-billing-configuration.service.ts
|
|
25585
25585
|
import {
|
|
25586
25586
|
BadRequestError as BadRequestError130,
|
|
25587
25587
|
logger as logger111,
|
|
25588
25588
|
useAtlas as useAtlas69
|
|
25589
|
-
} from "@
|
|
25589
|
+
} from "@7365admin1/node-server-utils";
|
|
25590
25590
|
function useSiteBillingConfigurationService() {
|
|
25591
25591
|
const { add: _add } = useSiteBillingConfigurationRepo();
|
|
25592
25592
|
const { getUserById } = useUserRepo();
|
|
@@ -25830,7 +25830,7 @@ import {
|
|
|
25830
25830
|
paginate as paginate36,
|
|
25831
25831
|
useAtlas as useAtlas70,
|
|
25832
25832
|
useCache as useCache44
|
|
25833
|
-
} from "@
|
|
25833
|
+
} from "@7365admin1/node-server-utils";
|
|
25834
25834
|
import { ObjectId as ObjectId78 } from "mongodb";
|
|
25835
25835
|
function useEventManagementRepo() {
|
|
25836
25836
|
const db = useAtlas70.getDb();
|
|
@@ -26096,7 +26096,7 @@ function useEventManagementRepo() {
|
|
|
26096
26096
|
}
|
|
26097
26097
|
|
|
26098
26098
|
// src/services/event-management.service.ts
|
|
26099
|
-
import { useAtlas as useAtlas71 } from "@
|
|
26099
|
+
import { useAtlas as useAtlas71 } from "@7365admin1/node-server-utils";
|
|
26100
26100
|
function useEventManagementService() {
|
|
26101
26101
|
const {
|
|
26102
26102
|
add: _add,
|
|
@@ -26154,7 +26154,7 @@ function useEventManagementService() {
|
|
|
26154
26154
|
}
|
|
26155
26155
|
|
|
26156
26156
|
// src/controllers/event-management.controller.ts
|
|
26157
|
-
import { BadRequestError as BadRequestError133, logger as logger114 } from "@
|
|
26157
|
+
import { BadRequestError as BadRequestError133, logger as logger114 } from "@7365admin1/node-server-utils";
|
|
26158
26158
|
import Joi82 from "joi";
|
|
26159
26159
|
function useEventManagementController() {
|
|
26160
26160
|
const { add: _add, updateEventManagementById: _updateEventManagementById } = useEventManagementService();
|
|
@@ -26307,7 +26307,7 @@ function useEventManagementController() {
|
|
|
26307
26307
|
}
|
|
26308
26308
|
|
|
26309
26309
|
// src/models/site-unit-billing.model.ts
|
|
26310
|
-
import { BadRequestError as BadRequestError134, logger as logger115 } from "@
|
|
26310
|
+
import { BadRequestError as BadRequestError134, logger as logger115 } from "@7365admin1/node-server-utils";
|
|
26311
26311
|
import { ObjectId as ObjectId79 } from "mongodb";
|
|
26312
26312
|
import Joi83 from "joi";
|
|
26313
26313
|
var schemaUnitBilling = Joi83.object({
|
|
@@ -26463,7 +26463,7 @@ import {
|
|
|
26463
26463
|
useCache as useCache45,
|
|
26464
26464
|
paginate as paginate37,
|
|
26465
26465
|
makeCacheKey as makeCacheKey43
|
|
26466
|
-
} from "@
|
|
26466
|
+
} from "@7365admin1/node-server-utils";
|
|
26467
26467
|
import { ObjectId as ObjectId80 } from "mongodb";
|
|
26468
26468
|
function useSiteUnitBillingRepo() {
|
|
26469
26469
|
const db = useAtlas72.getDb();
|
|
@@ -26847,7 +26847,7 @@ import {
|
|
|
26847
26847
|
BadRequestError as BadRequestError136,
|
|
26848
26848
|
logger as logger117,
|
|
26849
26849
|
useAtlas as useAtlas73
|
|
26850
|
-
} from "@
|
|
26850
|
+
} from "@7365admin1/node-server-utils";
|
|
26851
26851
|
import { ObjectId as ObjectId81 } from "mongodb";
|
|
26852
26852
|
function useSiteUnitBillingService() {
|
|
26853
26853
|
const {
|
|
@@ -27021,7 +27021,7 @@ function useSiteUnitBillingService() {
|
|
|
27021
27021
|
}
|
|
27022
27022
|
|
|
27023
27023
|
// src/controllers/site-unit-billing.controller.ts
|
|
27024
|
-
import { BadRequestError as BadRequestError137, logger as logger118 } from "@
|
|
27024
|
+
import { BadRequestError as BadRequestError137, logger as logger118 } from "@7365admin1/node-server-utils";
|
|
27025
27025
|
import Joi84 from "joi";
|
|
27026
27026
|
function useSiteUnitBillingController() {
|
|
27027
27027
|
const {
|
|
@@ -27292,7 +27292,7 @@ import {
|
|
|
27292
27292
|
paginate as paginate38,
|
|
27293
27293
|
useAtlas as useAtlas74,
|
|
27294
27294
|
useCache as useCache46
|
|
27295
|
-
} from "@
|
|
27295
|
+
} from "@7365admin1/node-server-utils";
|
|
27296
27296
|
import { ObjectId as ObjectId83 } from "mongodb";
|
|
27297
27297
|
function useAccessManagementRepo() {
|
|
27298
27298
|
const db = useAtlas74.getDb();
|
|
@@ -27545,7 +27545,7 @@ function useAccessManagementRepo() {
|
|
|
27545
27545
|
}
|
|
27546
27546
|
|
|
27547
27547
|
// src/controllers/access-management.controller.ts
|
|
27548
|
-
import { BadRequestError as BadRequestError139, logger as logger120 } from "@
|
|
27548
|
+
import { BadRequestError as BadRequestError139, logger as logger120 } from "@7365admin1/node-server-utils";
|
|
27549
27549
|
import Joi86 from "joi";
|
|
27550
27550
|
function useAccessManagementController() {
|
|
27551
27551
|
const {
|
|
@@ -27710,7 +27710,7 @@ function useAccessManagementController() {
|
|
|
27710
27710
|
// src/models/nfc-patrol-tag.model.ts
|
|
27711
27711
|
import { ObjectId as ObjectId84 } from "mongodb";
|
|
27712
27712
|
import Joi87 from "joi";
|
|
27713
|
-
import { BadRequestError as BadRequestError140 } from "@
|
|
27713
|
+
import { BadRequestError as BadRequestError140 } from "@7365admin1/node-server-utils";
|
|
27714
27714
|
var DEVICE_STATUS = {
|
|
27715
27715
|
CONFIGURED: "Configured",
|
|
27716
27716
|
NOT_CONFIGURED: "Not Configured"
|
|
@@ -27729,10 +27729,7 @@ var schemaNfcPatrolTag = Joi87.object({
|
|
|
27729
27729
|
site: Joi87.string().length(24).hex().required(),
|
|
27730
27730
|
tagID: Joi87.string().required(),
|
|
27731
27731
|
name: Joi87.string().required(),
|
|
27732
|
-
status: Joi87.string().valid(
|
|
27733
|
-
DEVICE_STATUS.CONFIGURED,
|
|
27734
|
-
DEVICE_STATUS.NOT_CONFIGURED
|
|
27735
|
-
).default(DEVICE_STATUS.NOT_CONFIGURED).allow(null, ""),
|
|
27732
|
+
status: Joi87.string().valid(DEVICE_STATUS.CONFIGURED, DEVICE_STATUS.NOT_CONFIGURED).default(DEVICE_STATUS.NOT_CONFIGURED).allow(null, ""),
|
|
27736
27733
|
createdBy: Joi87.string().length(24).hex().optional().allow(null, "")
|
|
27737
27734
|
});
|
|
27738
27735
|
function MNfcPatrolTag(value) {
|
|
@@ -27777,7 +27774,7 @@ import {
|
|
|
27777
27774
|
paginate as paginate39,
|
|
27778
27775
|
useAtlas as useAtlas75,
|
|
27779
27776
|
useCache as useCache47
|
|
27780
|
-
} from "@
|
|
27777
|
+
} from "@7365admin1/node-server-utils";
|
|
27781
27778
|
import { ObjectId as ObjectId85 } from "mongodb";
|
|
27782
27779
|
function useNfcPatrolTagRepo() {
|
|
27783
27780
|
const db = useAtlas75.getDb();
|
|
@@ -27788,7 +27785,9 @@ function useNfcPatrolTagRepo() {
|
|
|
27788
27785
|
const namespace_collection_nfc_patrol_routes = "nfc-patrol-routes";
|
|
27789
27786
|
const collection = db.collection(namespace_collection);
|
|
27790
27787
|
const { delNamespace, getCache, setCache } = useCache47(namespace_collection);
|
|
27791
|
-
const { delNamespace: delNamespaceNfcPatrolRoutes } = useCache47(
|
|
27788
|
+
const { delNamespace: delNamespaceNfcPatrolRoutes } = useCache47(
|
|
27789
|
+
namespace_collection_nfc_patrol_routes
|
|
27790
|
+
);
|
|
27792
27791
|
async function createIndexes() {
|
|
27793
27792
|
try {
|
|
27794
27793
|
await collection.createIndexes([
|
|
@@ -27816,7 +27815,9 @@ function useNfcPatrolTagRepo() {
|
|
|
27816
27815
|
} catch (error) {
|
|
27817
27816
|
const isDuplicated = error.message.includes("duplicate");
|
|
27818
27817
|
if (isDuplicated) {
|
|
27819
|
-
throw new BadRequestError141(
|
|
27818
|
+
throw new BadRequestError141(
|
|
27819
|
+
"NFC Patrol Tag ID and or Name already exists."
|
|
27820
|
+
);
|
|
27820
27821
|
}
|
|
27821
27822
|
throw error;
|
|
27822
27823
|
}
|
|
@@ -27908,13 +27909,13 @@ function useNfcPatrolTagRepo() {
|
|
|
27908
27909
|
updateQuery.$unset = { tagUID: "" };
|
|
27909
27910
|
}
|
|
27910
27911
|
try {
|
|
27911
|
-
const res = await collection.updateOne(
|
|
27912
|
-
|
|
27913
|
-
|
|
27914
|
-
{ session }
|
|
27915
|
-
);
|
|
27912
|
+
const res = await collection.updateOne(findObject, updateQuery, {
|
|
27913
|
+
session
|
|
27914
|
+
});
|
|
27916
27915
|
if (res.modifiedCount === 0) {
|
|
27917
|
-
throw new InternalServerError48(
|
|
27916
|
+
throw new InternalServerError48(
|
|
27917
|
+
`Unable to ${updateType} NFC Patrol Tag.`
|
|
27918
|
+
);
|
|
27918
27919
|
}
|
|
27919
27920
|
delCachedData();
|
|
27920
27921
|
return res;
|
|
@@ -27922,14 +27923,19 @@ function useNfcPatrolTagRepo() {
|
|
|
27922
27923
|
const isDuplicated = error.message.includes("duplicate");
|
|
27923
27924
|
if (isDuplicated) {
|
|
27924
27925
|
if (updateType == "Configure") {
|
|
27925
|
-
const existingDoc = await collection.findOne({
|
|
27926
|
+
const existingDoc = await collection.findOne({
|
|
27927
|
+
site: findObject?.site,
|
|
27928
|
+
tagUID: setData?.tagUID
|
|
27929
|
+
});
|
|
27926
27930
|
if (existingDoc) {
|
|
27927
27931
|
throw new BadRequestError141(
|
|
27928
27932
|
`NFC Patrol Tag is already assigned to ID: ${existingDoc.tagID}. Reset it before reassigning.`
|
|
27929
27933
|
);
|
|
27930
27934
|
}
|
|
27931
27935
|
} else {
|
|
27932
|
-
throw new BadRequestError141(
|
|
27936
|
+
throw new BadRequestError141(
|
|
27937
|
+
"NFC Patrol Tag ID and or Name already exists."
|
|
27938
|
+
);
|
|
27933
27939
|
}
|
|
27934
27940
|
}
|
|
27935
27941
|
throw error;
|
|
@@ -27968,7 +27974,7 @@ function useNfcPatrolTagRepo() {
|
|
|
27968
27974
|
}
|
|
27969
27975
|
|
|
27970
27976
|
// src/services/nfc-patrol-tag.service.ts
|
|
27971
|
-
import { BadRequestError as BadRequestError142, useAtlas as useAtlas76 } from "@
|
|
27977
|
+
import { BadRequestError as BadRequestError142, useAtlas as useAtlas76 } from "@7365admin1/node-server-utils";
|
|
27972
27978
|
function useNfcPatrolTagService() {
|
|
27973
27979
|
const { add: _add, updateNfcPatrolTagBySite: _updateNfcPatrolTagBySite } = useNfcPatrolTagRepo();
|
|
27974
27980
|
async function add(value) {
|
|
@@ -28001,7 +28007,12 @@ function useNfcPatrolTagService() {
|
|
|
28001
28007
|
throw new BadRequestError142("site is required for Configure");
|
|
28002
28008
|
const findObject = { site, tagID };
|
|
28003
28009
|
const setData = { tagUID, status: DEVICE_STATUS.CONFIGURED };
|
|
28004
|
-
await _updateNfcPatrolTagBySite(
|
|
28010
|
+
await _updateNfcPatrolTagBySite(
|
|
28011
|
+
updateType,
|
|
28012
|
+
findObject,
|
|
28013
|
+
setData,
|
|
28014
|
+
session
|
|
28015
|
+
);
|
|
28005
28016
|
successMessage = "Successfully Configured the NFC Patrol Tag.";
|
|
28006
28017
|
break;
|
|
28007
28018
|
}
|
|
@@ -28013,7 +28024,12 @@ function useNfcPatrolTagService() {
|
|
|
28013
28024
|
throw new BadRequestError142("site is required for Reset");
|
|
28014
28025
|
const findObject = { site, tagID };
|
|
28015
28026
|
const setData = { status: DEVICE_STATUS.NOT_CONFIGURED };
|
|
28016
|
-
await _updateNfcPatrolTagBySite(
|
|
28027
|
+
await _updateNfcPatrolTagBySite(
|
|
28028
|
+
updateType,
|
|
28029
|
+
findObject,
|
|
28030
|
+
setData,
|
|
28031
|
+
session
|
|
28032
|
+
);
|
|
28017
28033
|
successMessage = "Successfully Reset the NFC Patrol Tag.";
|
|
28018
28034
|
break;
|
|
28019
28035
|
}
|
|
@@ -28031,7 +28047,12 @@ function useNfcPatrolTagService() {
|
|
|
28031
28047
|
throw new BadRequestError142("updatedBy is required for Edit");
|
|
28032
28048
|
const findObject = { _id, site };
|
|
28033
28049
|
const setData = { name, tagID, updatedBy };
|
|
28034
|
-
await _updateNfcPatrolTagBySite(
|
|
28050
|
+
await _updateNfcPatrolTagBySite(
|
|
28051
|
+
updateType,
|
|
28052
|
+
findObject,
|
|
28053
|
+
setData,
|
|
28054
|
+
session
|
|
28055
|
+
);
|
|
28035
28056
|
break;
|
|
28036
28057
|
}
|
|
28037
28058
|
default:
|
|
@@ -28053,7 +28074,7 @@ function useNfcPatrolTagService() {
|
|
|
28053
28074
|
}
|
|
28054
28075
|
|
|
28055
28076
|
// src/controllers/nfc-patrol-tag.controller.ts
|
|
28056
|
-
import { BadRequestError as BadRequestError143, logger as logger122 } from "@
|
|
28077
|
+
import { BadRequestError as BadRequestError143, logger as logger122 } from "@7365admin1/node-server-utils";
|
|
28057
28078
|
import Joi88 from "joi";
|
|
28058
28079
|
function useNfcPatrolTagController() {
|
|
28059
28080
|
const { add: _add, updateNfcPatrolTagBySite: _updateNfcPatrolTagBySite } = useNfcPatrolTagService();
|
|
@@ -28135,7 +28156,10 @@ function useNfcPatrolTagController() {
|
|
|
28135
28156
|
}
|
|
28136
28157
|
try {
|
|
28137
28158
|
const { updateType, ...restBody } = payload;
|
|
28138
|
-
const result = await _updateNfcPatrolTagBySite(
|
|
28159
|
+
const result = await _updateNfcPatrolTagBySite(
|
|
28160
|
+
payload.updateType,
|
|
28161
|
+
restBody
|
|
28162
|
+
);
|
|
28139
28163
|
res.status(200).json({ message: result });
|
|
28140
28164
|
return;
|
|
28141
28165
|
} catch (error2) {
|
|
@@ -28209,7 +28233,7 @@ import {
|
|
|
28209
28233
|
paginate as paginate40,
|
|
28210
28234
|
useAtlas as useAtlas77,
|
|
28211
28235
|
useCache as useCache48
|
|
28212
|
-
} from "@
|
|
28236
|
+
} from "@7365admin1/node-server-utils";
|
|
28213
28237
|
import { ObjectId as ObjectId87 } from "mongodb";
|
|
28214
28238
|
function useOccurrenceBookRepo() {
|
|
28215
28239
|
const db = useAtlas77.getDb();
|
|
@@ -28485,7 +28509,7 @@ function useOccurrenceBookRepo() {
|
|
|
28485
28509
|
}
|
|
28486
28510
|
|
|
28487
28511
|
// src/services/occurrence-book.service.ts
|
|
28488
|
-
import { useAtlas as useAtlas78 } from "@
|
|
28512
|
+
import { useAtlas as useAtlas78 } from "@7365admin1/node-server-utils";
|
|
28489
28513
|
function useOccurrenceBookService() {
|
|
28490
28514
|
const {
|
|
28491
28515
|
add: _add,
|
|
@@ -28598,7 +28622,7 @@ function useOccurrenceBookService() {
|
|
|
28598
28622
|
}
|
|
28599
28623
|
|
|
28600
28624
|
// src/controllers/occurrence-book.controller.ts
|
|
28601
|
-
import { BadRequestError as BadRequestError145, logger as logger124 } from "@
|
|
28625
|
+
import { BadRequestError as BadRequestError145, logger as logger124 } from "@7365admin1/node-server-utils";
|
|
28602
28626
|
import Joi90 from "joi";
|
|
28603
28627
|
function useOccurrenceBookController() {
|
|
28604
28628
|
const {
|
|
@@ -28819,7 +28843,7 @@ import {
|
|
|
28819
28843
|
paginate as paginate41,
|
|
28820
28844
|
useAtlas as useAtlas79,
|
|
28821
28845
|
useCache as useCache49
|
|
28822
|
-
} from "@
|
|
28846
|
+
} from "@7365admin1/node-server-utils";
|
|
28823
28847
|
import { ObjectId as ObjectId89 } from "mongodb";
|
|
28824
28848
|
function useBulletinVideoRepo() {
|
|
28825
28849
|
const db = useAtlas79.getDb();
|
|
@@ -29026,7 +29050,7 @@ function useBulletinVideoRepo() {
|
|
|
29026
29050
|
}
|
|
29027
29051
|
|
|
29028
29052
|
// src/services/bulletin-video.service.ts
|
|
29029
|
-
import { useAtlas as useAtlas80 } from "@
|
|
29053
|
+
import { useAtlas as useAtlas80 } from "@7365admin1/node-server-utils";
|
|
29030
29054
|
function useBulletinVideoService() {
|
|
29031
29055
|
const {
|
|
29032
29056
|
add: _add,
|
|
@@ -29090,7 +29114,7 @@ function useBulletinVideoService() {
|
|
|
29090
29114
|
}
|
|
29091
29115
|
|
|
29092
29116
|
// src/controllers/bulletin-video.controller.ts
|
|
29093
|
-
import { BadRequestError as BadRequestError147, logger as logger126 } from "@
|
|
29117
|
+
import { BadRequestError as BadRequestError147, logger as logger126 } from "@7365admin1/node-server-utils";
|
|
29094
29118
|
import Joi92 from "joi";
|
|
29095
29119
|
function useBulletinVideoController() {
|
|
29096
29120
|
const { add: _add, updateBulletinVideoById: _updateBulletinVideoById } = useBulletinVideoService();
|
|
@@ -29240,7 +29264,7 @@ function useBulletinVideoController() {
|
|
|
29240
29264
|
}
|
|
29241
29265
|
|
|
29242
29266
|
// src/models/site-soa.model.ts
|
|
29243
|
-
import { BadRequestError as BadRequestError148, logger as logger127 } from "@
|
|
29267
|
+
import { BadRequestError as BadRequestError148, logger as logger127 } from "@7365admin1/node-server-utils";
|
|
29244
29268
|
import { ObjectId as ObjectId90 } from "mongodb";
|
|
29245
29269
|
import Joi93 from "joi";
|
|
29246
29270
|
var schemaSOABillingItem = Joi93.object({
|
|
@@ -29372,7 +29396,7 @@ import {
|
|
|
29372
29396
|
useCache as useCache50,
|
|
29373
29397
|
paginate as paginate42,
|
|
29374
29398
|
makeCacheKey as makeCacheKey48
|
|
29375
|
-
} from "@
|
|
29399
|
+
} from "@7365admin1/node-server-utils";
|
|
29376
29400
|
import { ObjectId as ObjectId91 } from "mongodb";
|
|
29377
29401
|
function useStatementOfAccountRepo() {
|
|
29378
29402
|
const db = useAtlas81.getDb();
|
|
@@ -29629,14 +29653,14 @@ function useStatementOfAccountRepo() {
|
|
|
29629
29653
|
}
|
|
29630
29654
|
|
|
29631
29655
|
// src/controllers/site-soa.controller.ts
|
|
29632
|
-
import { BadRequestError as BadRequestError151, logger as logger130 } from "@
|
|
29656
|
+
import { BadRequestError as BadRequestError151, logger as logger130 } from "@7365admin1/node-server-utils";
|
|
29633
29657
|
|
|
29634
29658
|
// src/services/site-soa.service.ts
|
|
29635
29659
|
import {
|
|
29636
29660
|
BadRequestError as BadRequestError150,
|
|
29637
29661
|
logger as logger129,
|
|
29638
29662
|
useAtlas as useAtlas82
|
|
29639
|
-
} from "@
|
|
29663
|
+
} from "@7365admin1/node-server-utils";
|
|
29640
29664
|
import { launch } from "puppeteer";
|
|
29641
29665
|
function useStatementOfAccountService() {
|
|
29642
29666
|
const { add: _add } = useStatementOfAccountRepo();
|
|
@@ -30043,7 +30067,7 @@ function useStatementOfAccountController() {
|
|
|
30043
30067
|
}
|
|
30044
30068
|
|
|
30045
30069
|
// src/models/site-entrypass-settings.model.ts
|
|
30046
|
-
import { BadRequestError as BadRequestError152, logger as logger131 } from "@
|
|
30070
|
+
import { BadRequestError as BadRequestError152, logger as logger131 } from "@7365admin1/node-server-utils";
|
|
30047
30071
|
import { ObjectId as ObjectId92 } from "mongodb";
|
|
30048
30072
|
import Joi95 from "joi";
|
|
30049
30073
|
var schemaEntryPassSettings = Joi95.object({
|
|
@@ -30144,7 +30168,7 @@ import {
|
|
|
30144
30168
|
paginate as paginate43,
|
|
30145
30169
|
useAtlas as useAtlas83,
|
|
30146
30170
|
useCache as useCache51
|
|
30147
|
-
} from "@
|
|
30171
|
+
} from "@7365admin1/node-server-utils";
|
|
30148
30172
|
import { ObjectId as ObjectId93 } from "mongodb";
|
|
30149
30173
|
function useEntryPassSettingsRepo() {
|
|
30150
30174
|
const db = useAtlas83.getDb();
|
|
@@ -30489,7 +30513,7 @@ function useEntryPassSettingsRepo() {
|
|
|
30489
30513
|
}
|
|
30490
30514
|
|
|
30491
30515
|
// src/controllers/site-entrypass-settings.controller.ts
|
|
30492
|
-
import { BadRequestError as BadRequestError154, logger as logger133 } from "@
|
|
30516
|
+
import { BadRequestError as BadRequestError154, logger as logger133 } from "@7365admin1/node-server-utils";
|
|
30493
30517
|
import Joi96 from "joi";
|
|
30494
30518
|
function useEntryPassSettingsController() {
|
|
30495
30519
|
const {
|
|
@@ -30716,7 +30740,7 @@ import {
|
|
|
30716
30740
|
makeCacheKey as makeCacheKey50,
|
|
30717
30741
|
useAtlas as useAtlas84,
|
|
30718
30742
|
useCache as useCache52
|
|
30719
|
-
} from "@
|
|
30743
|
+
} from "@7365admin1/node-server-utils";
|
|
30720
30744
|
function useDashboardRepo() {
|
|
30721
30745
|
const db = useAtlas84.getDb();
|
|
30722
30746
|
if (!db) {
|
|
@@ -30778,7 +30802,7 @@ function useDashboardRepo() {
|
|
|
30778
30802
|
}
|
|
30779
30803
|
|
|
30780
30804
|
// src/controllers/dashboard.controller.ts
|
|
30781
|
-
import { BadRequestError as BadRequestError155, logger as logger135 } from "@
|
|
30805
|
+
import { BadRequestError as BadRequestError155, logger as logger135 } from "@7365admin1/node-server-utils";
|
|
30782
30806
|
import Joi97 from "joi";
|
|
30783
30807
|
function useDashboardController() {
|
|
30784
30808
|
const { getAll: _getAll } = useDashboardRepo();
|
|
@@ -30817,7 +30841,7 @@ function useDashboardController() {
|
|
|
30817
30841
|
// src/models/nfc-patrol-route.model.ts
|
|
30818
30842
|
import { ObjectId as ObjectId94 } from "mongodb";
|
|
30819
30843
|
import Joi98 from "joi";
|
|
30820
|
-
import { BadRequestError as BadRequestError156, logger as logger136 } from "@
|
|
30844
|
+
import { BadRequestError as BadRequestError156, logger as logger136 } from "@7365admin1/node-server-utils";
|
|
30821
30845
|
var schemaNfcPatrolRoute = Joi98.object({
|
|
30822
30846
|
_id: Joi98.string().length(24).hex().optional().allow(null, ""),
|
|
30823
30847
|
site: Joi98.string().length(24).hex().required(),
|
|
@@ -30891,7 +30915,7 @@ import {
|
|
|
30891
30915
|
paginate as paginate44,
|
|
30892
30916
|
useAtlas as useAtlas85,
|
|
30893
30917
|
useCache as useCache53
|
|
30894
|
-
} from "@
|
|
30918
|
+
} from "@7365admin1/node-server-utils";
|
|
30895
30919
|
import { ObjectId as ObjectId95 } from "mongodb";
|
|
30896
30920
|
function useNfcPatrolRouteRepo() {
|
|
30897
30921
|
const db = useAtlas85.getDb();
|
|
@@ -31031,8 +31055,16 @@ function useNfcPatrolRouteRepo() {
|
|
|
31031
31055
|
if (isStart === true) {
|
|
31032
31056
|
const pipeline = [
|
|
31033
31057
|
{ $match: { _id } },
|
|
31034
|
-
{
|
|
31035
|
-
|
|
31058
|
+
{
|
|
31059
|
+
$unwind: { path: "$checkPoints", preserveNullAndEmptyArrays: true }
|
|
31060
|
+
},
|
|
31061
|
+
{
|
|
31062
|
+
$addFields: {
|
|
31063
|
+
"checkPoints.nfcTag_id": {
|
|
31064
|
+
$toObjectId: "$checkPoints.nfcTag_id"
|
|
31065
|
+
}
|
|
31066
|
+
}
|
|
31067
|
+
},
|
|
31036
31068
|
{
|
|
31037
31069
|
$lookup: {
|
|
31038
31070
|
from: "nfc-patrol-tags",
|
|
@@ -31096,7 +31128,9 @@ function useNfcPatrolRouteRepo() {
|
|
|
31096
31128
|
if (error instanceof AppError22) {
|
|
31097
31129
|
throw error;
|
|
31098
31130
|
} else {
|
|
31099
|
-
throw new InternalServerError54(
|
|
31131
|
+
throw new InternalServerError54(
|
|
31132
|
+
`Failed to get ${namespace_collection} by id.`
|
|
31133
|
+
);
|
|
31100
31134
|
}
|
|
31101
31135
|
}
|
|
31102
31136
|
}
|
|
@@ -31174,7 +31208,11 @@ function useNfcPatrolRouteRepo() {
|
|
|
31174
31208
|
}
|
|
31175
31209
|
|
|
31176
31210
|
// src/services/nfc-patrol-route.service.ts
|
|
31177
|
-
import {
|
|
31211
|
+
import {
|
|
31212
|
+
BadRequestError as BadRequestError158,
|
|
31213
|
+
logger as logger138,
|
|
31214
|
+
useAtlas as useAtlas86
|
|
31215
|
+
} from "@7365admin1/node-server-utils";
|
|
31178
31216
|
function useNfcPatrolRouteService() {
|
|
31179
31217
|
const { add: _add, updateById: _updateById } = useNfcPatrolRouteRepo();
|
|
31180
31218
|
async function add(value) {
|
|
@@ -31219,7 +31257,11 @@ function useNfcPatrolRouteService() {
|
|
|
31219
31257
|
}
|
|
31220
31258
|
|
|
31221
31259
|
// src/controllers/nfc-patrol-route.controller.ts
|
|
31222
|
-
import {
|
|
31260
|
+
import {
|
|
31261
|
+
BadRequestError as BadRequestError159,
|
|
31262
|
+
logger as logger139,
|
|
31263
|
+
NotFoundError as NotFoundError42
|
|
31264
|
+
} from "@7365admin1/node-server-utils";
|
|
31223
31265
|
import Joi99 from "joi";
|
|
31224
31266
|
function useNfcPatrolRouteController() {
|
|
31225
31267
|
const { add: _add, updateById: _updateById } = useNfcPatrolRouteService();
|
|
@@ -31296,7 +31338,10 @@ function useNfcPatrolRouteController() {
|
|
|
31296
31338
|
id: Joi99.string().length(24).hex().required(),
|
|
31297
31339
|
isStart: Joi99.boolean().truthy("true").optional()
|
|
31298
31340
|
});
|
|
31299
|
-
const { error, value } = validation.validate(
|
|
31341
|
+
const { error, value } = validation.validate(
|
|
31342
|
+
{ id, isStart },
|
|
31343
|
+
{ convert: true }
|
|
31344
|
+
);
|
|
31300
31345
|
if (error) {
|
|
31301
31346
|
next(new BadRequestError159(error.message));
|
|
31302
31347
|
return;
|
|
@@ -31586,7 +31631,7 @@ function MIncidentReport(value) {
|
|
|
31586
31631
|
}
|
|
31587
31632
|
|
|
31588
31633
|
// src/services/incident-report.service.ts
|
|
31589
|
-
import { useAtlas as useAtlas88 } from "@
|
|
31634
|
+
import { useAtlas as useAtlas88 } from "@7365admin1/node-server-utils";
|
|
31590
31635
|
|
|
31591
31636
|
// src/repositories/incident-report.repo.ts
|
|
31592
31637
|
import {
|
|
@@ -31598,7 +31643,7 @@ import {
|
|
|
31598
31643
|
paginate as paginate45,
|
|
31599
31644
|
useAtlas as useAtlas87,
|
|
31600
31645
|
useCache as useCache54
|
|
31601
|
-
} from "@
|
|
31646
|
+
} from "@7365admin1/node-server-utils";
|
|
31602
31647
|
import { ObjectId as ObjectId97 } from "mongodb";
|
|
31603
31648
|
function useIncidentReportRepo() {
|
|
31604
31649
|
const db = useAtlas87.getDb();
|
|
@@ -31726,7 +31771,68 @@ function useIncidentReportRepo() {
|
|
|
31726
31771
|
{ $match: query },
|
|
31727
31772
|
{ $sort: sort },
|
|
31728
31773
|
{ $skip: page * limit },
|
|
31729
|
-
{ $limit: limit }
|
|
31774
|
+
{ $limit: limit },
|
|
31775
|
+
{
|
|
31776
|
+
$lookup: {
|
|
31777
|
+
from: "building-units",
|
|
31778
|
+
let: { unitId: "$incidentInformation.placeOfIncident.unit" },
|
|
31779
|
+
pipeline: [
|
|
31780
|
+
{ $match: { $expr: { $eq: ["$_id", "$$unitId"] } } },
|
|
31781
|
+
{ $project: { _id: 0, name: 1 } }
|
|
31782
|
+
],
|
|
31783
|
+
as: "unitInfo"
|
|
31784
|
+
}
|
|
31785
|
+
},
|
|
31786
|
+
{
|
|
31787
|
+
$addFields: {
|
|
31788
|
+
unitInfo: { $arrayElemAt: ["$unitInfo", 0] }
|
|
31789
|
+
}
|
|
31790
|
+
},
|
|
31791
|
+
{
|
|
31792
|
+
$addFields: {
|
|
31793
|
+
"incidentInformation.placeOfIncident.incidentLocation": {
|
|
31794
|
+
$cond: {
|
|
31795
|
+
if: {
|
|
31796
|
+
$ne: [
|
|
31797
|
+
"$incidentInformation.placeOfIncident.isOther",
|
|
31798
|
+
true
|
|
31799
|
+
]
|
|
31800
|
+
},
|
|
31801
|
+
then: {
|
|
31802
|
+
$trim: {
|
|
31803
|
+
input: {
|
|
31804
|
+
$concat: [
|
|
31805
|
+
{
|
|
31806
|
+
$ifNull: [
|
|
31807
|
+
{
|
|
31808
|
+
$toString: "$incidentInformation.placeOfIncident.block"
|
|
31809
|
+
},
|
|
31810
|
+
""
|
|
31811
|
+
]
|
|
31812
|
+
},
|
|
31813
|
+
"-",
|
|
31814
|
+
{
|
|
31815
|
+
$ifNull: [
|
|
31816
|
+
"$incidentInformation.placeOfIncident.level",
|
|
31817
|
+
""
|
|
31818
|
+
]
|
|
31819
|
+
},
|
|
31820
|
+
"-",
|
|
31821
|
+
{
|
|
31822
|
+
$ifNull: ["$unitInfo.name", ""]
|
|
31823
|
+
}
|
|
31824
|
+
]
|
|
31825
|
+
}
|
|
31826
|
+
}
|
|
31827
|
+
},
|
|
31828
|
+
else: "$incidentInformation.placeOfIncident.other"
|
|
31829
|
+
}
|
|
31830
|
+
}
|
|
31831
|
+
}
|
|
31832
|
+
},
|
|
31833
|
+
{
|
|
31834
|
+
$project: { unitInfo: 0 }
|
|
31835
|
+
}
|
|
31730
31836
|
],
|
|
31731
31837
|
{ session }
|
|
31732
31838
|
).toArray();
|
|
@@ -31898,7 +32004,7 @@ function useIncidentReportService() {
|
|
|
31898
32004
|
}
|
|
31899
32005
|
|
|
31900
32006
|
// src/controllers/incident-report.controller.ts
|
|
31901
|
-
import { BadRequestError as BadRequestError161, logger as logger141 } from "@
|
|
32007
|
+
import { BadRequestError as BadRequestError161, logger as logger141 } from "@7365admin1/node-server-utils";
|
|
31902
32008
|
import Joi101 from "joi";
|
|
31903
32009
|
function useIncidentReportController() {
|
|
31904
32010
|
const { add: _add, updateIncidentReportById: _updateIncidentReportById } = useIncidentReportService();
|
|
@@ -32056,7 +32162,7 @@ function useIncidentReportController() {
|
|
|
32056
32162
|
// src/models/nfc-patrol-settings.model.ts
|
|
32057
32163
|
import { ObjectId as ObjectId98 } from "mongodb";
|
|
32058
32164
|
import Joi102 from "joi";
|
|
32059
|
-
import { BadRequestError as BadRequestError162, logger as logger142 } from "@
|
|
32165
|
+
import { BadRequestError as BadRequestError162, logger as logger142 } from "@7365admin1/node-server-utils";
|
|
32060
32166
|
var objectId = Joi102.string().hex().length(24);
|
|
32061
32167
|
var nfcPatrolSettingsSchema = Joi102.object({
|
|
32062
32168
|
site: objectId.required(),
|
|
@@ -32113,7 +32219,15 @@ function MNfcPatrolSettingsUpdate(value) {
|
|
|
32113
32219
|
}
|
|
32114
32220
|
|
|
32115
32221
|
// src/repositories/nfc-patrol-settings.repository.ts
|
|
32116
|
-
import {
|
|
32222
|
+
import {
|
|
32223
|
+
BadRequestError as BadRequestError163,
|
|
32224
|
+
InternalServerError as InternalServerError56,
|
|
32225
|
+
logger as logger143,
|
|
32226
|
+
makeCacheKey as makeCacheKey53,
|
|
32227
|
+
NotFoundError as NotFoundError44,
|
|
32228
|
+
useAtlas as useAtlas89,
|
|
32229
|
+
useCache as useCache55
|
|
32230
|
+
} from "@7365admin1/node-server-utils";
|
|
32117
32231
|
import { ObjectId as ObjectId99 } from "mongodb";
|
|
32118
32232
|
function useNfcPatrolSettingsRepository() {
|
|
32119
32233
|
const db = useAtlas89.getDb();
|
|
@@ -32237,7 +32351,11 @@ function useNfcPatrolSettingsRepository() {
|
|
|
32237
32351
|
}
|
|
32238
32352
|
|
|
32239
32353
|
// src/services/nfc-patrol-settings.service.ts
|
|
32240
|
-
import {
|
|
32354
|
+
import {
|
|
32355
|
+
BadRequestError as BadRequestError164,
|
|
32356
|
+
logger as logger144,
|
|
32357
|
+
useAtlas as useAtlas90
|
|
32358
|
+
} from "@7365admin1/node-server-utils";
|
|
32241
32359
|
function useNfcPatrolSettingsService() {
|
|
32242
32360
|
const {
|
|
32243
32361
|
createNfcPatrolSettings,
|
|
@@ -32303,7 +32421,7 @@ function useNfcPatrolSettingsService() {
|
|
|
32303
32421
|
|
|
32304
32422
|
// src/controllers/nfc-patrol-settings.controller.ts
|
|
32305
32423
|
import Joi103 from "joi";
|
|
32306
|
-
import { BadRequestError as BadRequestError165, logger as logger145 } from "@
|
|
32424
|
+
import { BadRequestError as BadRequestError165, logger as logger145 } from "@7365admin1/node-server-utils";
|
|
32307
32425
|
function useNfcPatrolSettingsController() {
|
|
32308
32426
|
const { getNfcPatrolSettingsBySite: _getNfcPatrolSettingsBySite } = useNfcPatrolSettingsService();
|
|
32309
32427
|
const { updateNfcPatrolSettings: _updateNfcPatrolSettings } = useNfcPatrolSettingsService();
|
|
@@ -32352,7 +32470,7 @@ function useNfcPatrolSettingsController() {
|
|
|
32352
32470
|
}
|
|
32353
32471
|
|
|
32354
32472
|
// src/services/occurrence-entry.service.ts
|
|
32355
|
-
import { useAtlas as useAtlas92 } from "@
|
|
32473
|
+
import { useAtlas as useAtlas92 } from "@7365admin1/node-server-utils";
|
|
32356
32474
|
|
|
32357
32475
|
// src/repositories/occurrence-subject.repo.ts
|
|
32358
32476
|
import {
|
|
@@ -32364,7 +32482,7 @@ import {
|
|
|
32364
32482
|
paginate as paginate46,
|
|
32365
32483
|
useAtlas as useAtlas91,
|
|
32366
32484
|
useCache as useCache56
|
|
32367
|
-
} from "@
|
|
32485
|
+
} from "@7365admin1/node-server-utils";
|
|
32368
32486
|
|
|
32369
32487
|
// src/models/occurrence-subject.model.ts
|
|
32370
32488
|
import { ObjectId as ObjectId100 } from "mongodb";
|
|
@@ -32741,7 +32859,7 @@ function useOccurrenceEntryService() {
|
|
|
32741
32859
|
}
|
|
32742
32860
|
|
|
32743
32861
|
// src/controllers/occurrence-entry.controller.ts
|
|
32744
|
-
import { BadRequestError as BadRequestError167, logger as logger147 } from "@
|
|
32862
|
+
import { BadRequestError as BadRequestError167, logger as logger147 } from "@7365admin1/node-server-utils";
|
|
32745
32863
|
import Joi105 from "joi";
|
|
32746
32864
|
function useOccurrenceEntryController() {
|
|
32747
32865
|
const { add: _add, updateOccurrenceEntryById: _updateOccurrenceEntryById } = useOccurrenceEntryService();
|
|
@@ -33009,7 +33127,7 @@ import {
|
|
|
33009
33127
|
paginate as paginate47,
|
|
33010
33128
|
useAtlas as useAtlas93,
|
|
33011
33129
|
useCache as useCache57
|
|
33012
|
-
} from "@
|
|
33130
|
+
} from "@7365admin1/node-server-utils";
|
|
33013
33131
|
import { ObjectId as ObjectId103 } from "mongodb";
|
|
33014
33132
|
function useOnlineFormRepo() {
|
|
33015
33133
|
const db = useAtlas93.getDb();
|
|
@@ -33282,7 +33400,7 @@ function useOnlineFormRepo() {
|
|
|
33282
33400
|
}
|
|
33283
33401
|
|
|
33284
33402
|
// src/controllers/online-form.controller.ts
|
|
33285
|
-
import { BadRequestError as BadRequestError169, logger as logger149 } from "@
|
|
33403
|
+
import { BadRequestError as BadRequestError169, logger as logger149 } from "@7365admin1/node-server-utils";
|
|
33286
33404
|
import Joi107 from "joi";
|
|
33287
33405
|
function useOnlineFormController() {
|
|
33288
33406
|
const {
|
|
@@ -33463,7 +33581,7 @@ function useOnlineFormController() {
|
|
|
33463
33581
|
}
|
|
33464
33582
|
|
|
33465
33583
|
// src/services/occurrence-subject.service.ts
|
|
33466
|
-
import { useAtlas as useAtlas94 } from "@
|
|
33584
|
+
import { useAtlas as useAtlas94 } from "@7365admin1/node-server-utils";
|
|
33467
33585
|
function useOccurrenceSubjectService() {
|
|
33468
33586
|
const {
|
|
33469
33587
|
add: _add,
|
|
@@ -33504,7 +33622,7 @@ function useOccurrenceSubjectService() {
|
|
|
33504
33622
|
}
|
|
33505
33623
|
|
|
33506
33624
|
// src/controllers/occurrence-subject.controller.ts
|
|
33507
|
-
import { BadRequestError as BadRequestError170, logger as logger150 } from "@
|
|
33625
|
+
import { BadRequestError as BadRequestError170, logger as logger150 } from "@7365admin1/node-server-utils";
|
|
33508
33626
|
import Joi108 from "joi";
|
|
33509
33627
|
function useOccurrenceSubjectController() {
|
|
33510
33628
|
const {
|
|
@@ -33659,7 +33777,7 @@ function useOccurrenceSubjectController() {
|
|
|
33659
33777
|
// src/models/nfc-patrol-log.model.ts
|
|
33660
33778
|
import { ObjectId as ObjectId104 } from "mongodb";
|
|
33661
33779
|
import Joi109 from "joi";
|
|
33662
|
-
import { BadRequestError as BadRequestError171, logger as logger151 } from "@
|
|
33780
|
+
import { BadRequestError as BadRequestError171, logger as logger151 } from "@7365admin1/node-server-utils";
|
|
33663
33781
|
var schemaNfcPatrolLog = Joi109.object({
|
|
33664
33782
|
_id: Joi109.string().length(24).hex().optional().allow(null, ""),
|
|
33665
33783
|
site: Joi109.string().length(24).hex().required(),
|
|
@@ -33755,7 +33873,7 @@ import {
|
|
|
33755
33873
|
paginate as paginate48,
|
|
33756
33874
|
useAtlas as useAtlas95,
|
|
33757
33875
|
useCache as useCache58
|
|
33758
|
-
} from "@
|
|
33876
|
+
} from "@7365admin1/node-server-utils";
|
|
33759
33877
|
import { ObjectId as ObjectId105 } from "mongodb";
|
|
33760
33878
|
function useNfcPatrolLogRepo() {
|
|
33761
33879
|
const db = useAtlas95.getDb();
|
|
@@ -33887,7 +34005,9 @@ function useNfcPatrolLogRepo() {
|
|
|
33887
34005
|
}
|
|
33888
34006
|
|
|
33889
34007
|
// src/services/nfc-patrol-log.service.ts
|
|
33890
|
-
import {
|
|
34008
|
+
import {
|
|
34009
|
+
useAtlas as useAtlas96
|
|
34010
|
+
} from "@7365admin1/node-server-utils";
|
|
33891
34011
|
function useNfcPatrolLogService() {
|
|
33892
34012
|
const { add: _add } = useNfcPatrolLogRepo();
|
|
33893
34013
|
async function add(value) {
|
|
@@ -33910,7 +34030,10 @@ function useNfcPatrolLogService() {
|
|
|
33910
34030
|
}
|
|
33911
34031
|
|
|
33912
34032
|
// src/controllers/nfc-patrol-log.controller.ts
|
|
33913
|
-
import {
|
|
34033
|
+
import {
|
|
34034
|
+
BadRequestError as BadRequestError174,
|
|
34035
|
+
logger as logger154
|
|
34036
|
+
} from "@7365admin1/node-server-utils";
|
|
33914
34037
|
import Joi110 from "joi";
|
|
33915
34038
|
function useNfcPatrolLogController() {
|
|
33916
34039
|
const { add: _add } = useNfcPatrolLogService();
|