storemw-core-api 1.0.69 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/user/userController.js +108 -0
- package/dist/controllers/user/userController.js.map +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +5 -2
- package/dist/models/index.js.map +1 -1
- package/dist/models/user/DriverModel.d.ts +212 -0
- package/dist/models/user/DriverModel.js +13 -0
- package/dist/models/user/DriverModel.js.map +1 -0
- package/dist/schema/middleware/route/schemaUser.d.ts +3 -3
- package/dist/schema/middleware/route/schemaUser.js +3 -1
- package/dist/schema/middleware/route/schemaUser.js.map +1 -1
- package/dist/schema/payload/index.d.ts +2 -0
- package/dist/schema/payload/index.js +5 -2
- package/dist/schema/payload/index.js.map +1 -1
- package/dist/schema/payload/user/schemaUser.d.ts +5 -5
- package/dist/schema/payload/user/schemaUser.js +3 -1
- package/dist/schema/payload/user/schemaUser.js.map +1 -1
- package/dist/schema/payload/user/schemaUserDriver.d.ts +291 -0
- package/dist/schema/payload/user/schemaUserDriver.js +42 -0
- package/dist/schema/payload/user/schemaUserDriver.js.map +1 -0
- package/dist/services/user/DriverService.d.ts +87 -0
- package/dist/services/user/DriverService.js +235 -0
- package/dist/services/user/DriverService.js.map +1 -0
- package/dist/services/user/UserService.d.ts +11 -0
- package/dist/services/user/UserService.js +93 -2
- package/dist/services/user/UserService.js.map +1 -1
- package/package.json +1 -1
- package/prisma/schema.prisma +16 -16
|
@@ -19,6 +19,9 @@ const getRootName = (requestUserType, toSingular) => {
|
|
|
19
19
|
case "retailer":
|
|
20
20
|
rootName = toSingular ? "retailer" : "retailers";
|
|
21
21
|
break;
|
|
22
|
+
case "driver":
|
|
23
|
+
rootName = toSingular ? "driver" : "drivers";
|
|
24
|
+
break;
|
|
22
25
|
case "worker":
|
|
23
26
|
rootName = toSingular ? "worker" : "workers";
|
|
24
27
|
break;
|
|
@@ -253,6 +256,58 @@ const createUser = async (req, res, next) => {
|
|
|
253
256
|
[`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)
|
|
254
257
|
};
|
|
255
258
|
}
|
|
259
|
+
if (requestUserType === "driver") {
|
|
260
|
+
let request = payload_1.schemaUserDriverCreatePayload.parse({
|
|
261
|
+
scope: {
|
|
262
|
+
target: reqScope.target,
|
|
263
|
+
action: reqScope.action
|
|
264
|
+
},
|
|
265
|
+
payload: {
|
|
266
|
+
credential: {
|
|
267
|
+
username: reqPayload.credential.username,
|
|
268
|
+
password: reqPayload.credential.password,
|
|
269
|
+
firstname: reqPayload.credential.firstname,
|
|
270
|
+
lastname: reqPayload.credential.lastname,
|
|
271
|
+
contact: reqPayload.credential.contact,
|
|
272
|
+
email: reqPayload.credential.email,
|
|
273
|
+
address: reqPayload.credential.address,
|
|
274
|
+
status: reqPayload.credential.status
|
|
275
|
+
},
|
|
276
|
+
driver: {
|
|
277
|
+
companyName: reqPayload.driver.company_name,
|
|
278
|
+
remark: reqPayload.driver.remark
|
|
279
|
+
},
|
|
280
|
+
props: {
|
|
281
|
+
location_id: reqPayload.props.location_id
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
let payload = {
|
|
286
|
+
userType: requestUserType,
|
|
287
|
+
data: {
|
|
288
|
+
user: {
|
|
289
|
+
loginUsername: request.payload.credential.username,
|
|
290
|
+
loginPassword: request.payload.credential.password,
|
|
291
|
+
address: request?.payload?.credential?.address ?? "",
|
|
292
|
+
contact: request.payload.credential.contact,
|
|
293
|
+
email: request.payload.credential.email,
|
|
294
|
+
firstname: request.payload.credential.firstname,
|
|
295
|
+
lastname: request.payload.credential.lastname,
|
|
296
|
+
status: request.payload.credential.status === 1
|
|
297
|
+
},
|
|
298
|
+
driver: {
|
|
299
|
+
companyName: request.payload.driver.companyName ?? "",
|
|
300
|
+
remark: request.payload.driver.remark ?? ""
|
|
301
|
+
},
|
|
302
|
+
props: {
|
|
303
|
+
locationIds: request.payload.props.location_id.map(i => Number(i))
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
response = {
|
|
308
|
+
[`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)
|
|
309
|
+
};
|
|
310
|
+
}
|
|
256
311
|
if (requestUserType === "retailer") {
|
|
257
312
|
let request = payload_1.schemaUserRetailerCreatePayload.parse({
|
|
258
313
|
scope: {
|
|
@@ -530,6 +585,59 @@ const updateUser = async (req, res, next) => {
|
|
|
530
585
|
[`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)
|
|
531
586
|
};
|
|
532
587
|
}
|
|
588
|
+
if (requestUserType === "driver") {
|
|
589
|
+
let request = payload_1.schemaUserDriverUpdatePayload.parse({
|
|
590
|
+
scope: {
|
|
591
|
+
target: reqScope.target,
|
|
592
|
+
action: reqScope.action
|
|
593
|
+
},
|
|
594
|
+
payload: {
|
|
595
|
+
credential: {
|
|
596
|
+
username: reqPayload.credential.username,
|
|
597
|
+
password: reqPayload.credential.password,
|
|
598
|
+
firstname: reqPayload.credential.firstname,
|
|
599
|
+
lastname: reqPayload.credential.lastname,
|
|
600
|
+
contact: reqPayload.credential.contact,
|
|
601
|
+
email: reqPayload.credential.email,
|
|
602
|
+
address: reqPayload.credential.address,
|
|
603
|
+
status: reqPayload.credential.status
|
|
604
|
+
},
|
|
605
|
+
driver: {
|
|
606
|
+
companyName: reqPayload.driver.company_name,
|
|
607
|
+
remark: reqPayload.driver.remark
|
|
608
|
+
},
|
|
609
|
+
props: {
|
|
610
|
+
location_id: reqPayload.props.location_id
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
let payload = {
|
|
615
|
+
id: Number(userId),
|
|
616
|
+
userType: requestUserType,
|
|
617
|
+
data: {
|
|
618
|
+
user: {
|
|
619
|
+
loginUsername: request.payload.credential.username,
|
|
620
|
+
...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),
|
|
621
|
+
address: request?.payload?.credential?.address ?? "",
|
|
622
|
+
contact: request.payload.credential.contact,
|
|
623
|
+
email: request.payload.credential.email,
|
|
624
|
+
firstname: request.payload.credential.firstname,
|
|
625
|
+
lastname: request.payload.credential.lastname,
|
|
626
|
+
status: request.payload.credential.status === 1
|
|
627
|
+
},
|
|
628
|
+
driver: {
|
|
629
|
+
companyName: request.payload.driver.companyName ?? "",
|
|
630
|
+
remark: request.payload.driver.remark ?? ""
|
|
631
|
+
},
|
|
632
|
+
props: {
|
|
633
|
+
locationIds: request.payload.props.location_id.map(i => Number(i))
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
response = {
|
|
638
|
+
[`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)
|
|
639
|
+
};
|
|
640
|
+
}
|
|
533
641
|
if (requestUserType === "retailer") {
|
|
534
642
|
let request = payload_1.schemaUserRetailerUpdatePayload.parse({
|
|
535
643
|
scope: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userController.js","sourceRoot":"","sources":["../../../src/controllers/user/userController.ts"],"names":[],"mappings":";;;AAEA,mCAAqF;AAErF,yCAAsG;AACtG,8CAY0B;AAI1B,MAAM,WAAW,GAAG,CAAC,eAA6C,EAAE,UAAmB,EAAE,EAAE;IAEvF,IAAI,QAAQ,GAAQ,EAAE,CAAA;IAEtB,QAAQ,eAAe,EAAE,CAAC;QACtB,KAAK,UAAU;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;YAAC,MAAM;QACzE,KAAK,eAAe;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,CAAC;YAAC,MAAM;QACxF,KAAK,UAAU;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;YAAC,MAAM;QACzE,KAAK,UAAU;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC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/C,CAAA;QAED,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAEpD,OAAO,IAAA,mBAAW,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;IAElF,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;AACL,CAAC,CAAC;AA1BW,QAAA,WAAW,eA0BtB;AAEF,sDAAsD;AAC/C,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAgB,EAAE;IAEpG,IAAI,CAAC;QAED,MAAM,YAAY,GAAG,GAAG,CAAC,KAA6B,CAAC;QACvD,MAAM,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,QAAwC,CAAC;QAE5E,MAAM,WAAW,GAAG,IAAA,sBAAW,EAAC;YAC5B,GAAG,IAAA,8BAAsB,EAAC,GAAG,CAAC;YAC9B,QAAQ,EAAE,eAAe;SAC5B,CAAC,CAAA;QAEF,MAAM,IAAI,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC;QAE5C,IAAI,QAAQ,GAAG;YACX,UAAU,EAAE,IAAI;SACnB,CAAA;QAED,OAAO,IAAA,mBAAW,EAAC,GAAG,EAAE,QAAQ,EAAE,wBAAwB,CAAC,CAAC;IAEhE,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B","sourcesContent":["import { Request, Response, NextFunction } from \"express\";\n\nimport { getDefaultServiceProps, sendSuccess, sendError, HTTP_STATUS } from \"@/utils\"\n\nimport { UserService, UserType, UserCreateProps, UserServiceProps, UserUpdateProps } from \"@/services\"\nimport {\n schemaUserCustomerCreatePayload,\n schemaUserCustomerUpdatePayload,\n schemaUserRetailerCreatePayload,\n schemaUserRetailerUpdatePayload,\n schemaUserAdministratorCreatePayload,\n schemaUserAdministratorUpdatePayload,\n schemaUserWorkerCreatePayload,\n schemaUserWorkerUpdatePayload,\n schemaUserDeletePayload,\n schemaUserOperatorCreatePayload,\n schemaUserOperatorUpdatePayload\n} from \"@/schema/payload\";\nimport { QueryList } from \"@/schema/middleware/route\";\nimport { RequestAuthContext } from \"@/middlewares/request\";\n\nconst getRootName = (requestUserType: UserServiceProps[\"userType\"], toSingular: boolean) => {\n\n let rootName: any = ``\n\n switch (requestUserType) {\n case \"operator\": rootName = toSingular ? \"operator\" : \"operators\"; break;\n case \"administrator\": rootName = toSingular ? \"administrator\" : \"administrators\"; break;\n case \"customer\": rootName = toSingular ? \"customer\" : \"customers\"; break;\n case \"retailer\": rootName = toSingular ? \"retailer\" : \"retailers\"; break;\n case \"worker\": rootName = toSingular ? \"worker\" : \"workers\"; break;\n }\n\n return rootName\n}\n\n/** user/:userType/:userId : get user */\nexport const getUser = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n try {\n\n const { userId, userType } = req.params;\n const requestQuery = req.query as unknown as QueryList;\n const requestUserType = userType as UserServiceProps[\"userType\"];\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const data = await userService.getUser({ id: Number(userId), datatypes: requestQuery.datatypes })\n\n return sendSuccess(res, data, \"Retrieved successfully\", getRootName(requestUserType, true));\n\n } catch (error: any) {\n next(error)\n }\n}\n\n/** user : create user */\nexport const createUser = async (req: Request, res: Response, next: NextFunction): Promise<void> => {\n try {\n\n const requestUserType = req.body.scope.target as UserServiceProps[\"userType\"]\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n let response: any = {}\n\n let reqScope = req.body.scope\n let reqPayload = req.body.payload\n\n if (requestUserType === \"operator\") {\n\n let request = schemaUserOperatorCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n operator: {}\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"customer\") {\n\n let request = schemaUserCustomerCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n customer: {\n code: reqPayload.customer.code,\n accountCode: reqPayload.customer.account_code,\n companyName: reqPayload.customer.company_name,\n regNo: reqPayload.customer.reg_no,\n secondaryRegNo: reqPayload.customer.secondary_reg_no,\n gstNo: reqPayload.customer.gst_no,\n taxIdentificationNo: reqPayload.customer.tax_identification_no,\n taxRegistrationNo: reqPayload.customer.tax_registration_no,\n remark: reqPayload.customer.remark\n },\n props: {\n salesperson: reqPayload.props.salesperson\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n customer: {\n code: request.payload.customer.code,\n accountCode: request.payload.customer.accountCode,\n companyName: request.payload.customer.companyName,\n regNo: request.payload.customer.regNo,\n secondaryRegNo: request.payload.customer.secondaryRegNo,\n remark: request.payload.customer.remark,\n gstNo: request.payload.customer.gstNo,\n taxIdentificationNo: request.payload.customer.taxIdentificationNo,\n taxRegistrationNo: request.payload.customer.taxRegistrationNo,\n // salesperson: request.payload.props.salesperson,\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"administrator\") {\n\n let request = schemaUserAdministratorCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload?.credential?.address ?? \"\",\n status: reqPayload.credential.status\n },\n administrator: {\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n administrator: {},\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"worker\") {\n\n let request = schemaUserWorkerCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n worker: {\n remark: reqPayload.worker.remark\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n worker: {\n remark: request.payload.worker.remark ?? \"\"\n },\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"retailer\") {\n\n let request = schemaUserRetailerCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n retailer: {\n code: reqPayload.retailer.code,\n accountCode: reqPayload.retailer.account_code,\n companyName: reqPayload.retailer.company_name,\n regNo: reqPayload.retailer.reg_no,\n gstNo: reqPayload.retailer.gst_no,\n remark: reqPayload.retailer.remark,\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n retailer: {\n code: request.payload.retailer.code,\n accountCode: request.payload.retailer.accountCode,\n companyName: request.payload.retailer.companyName,\n regNo: request.payload.retailer.regNo,\n remark: request.payload.retailer.remark,\n gstNo: request.payload.retailer.gstNo\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n\n sendSuccess(res, response, `User(${requestUserType}) created successfully`)\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** user/:userId : update user */\nexport const updateUser = async (req: Request, res: Response, next: NextFunction): Promise<void> => {\n try {\n\n const { userId } = req.params;\n const requestUserType = req.body.scope.target as UserServiceProps[\"userType\"]\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n let response: any = {}\n\n let reqScope = req.body.scope\n let reqPayload = req.body.payload\n\n if (requestUserType === \"customer\") {\n\n let request = schemaUserCustomerUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address ?? \"\",\n status: reqPayload.credential.status\n },\n customer: {\n code: reqPayload.customer.code,\n accountCode: reqPayload.customer.account_code,\n companyName: reqPayload.customer.company_name,\n regNo: reqPayload.customer.reg_no,\n secondaryRegNo: reqPayload.customer.secondary_reg_no,\n gstNo: reqPayload.customer.gst_no,\n taxIdentificationNo: reqPayload.customer.tax_identification_no,\n taxRegistrationNo: reqPayload.customer.tax_registration_no,\n remark: reqPayload.customer.remark\n },\n props: {\n salesperson: reqPayload.props.salesperson\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request.payload.credential.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n customer: {\n code: request.payload.customer.code,\n accountCode: request.payload.customer.accountCode,\n companyName: request.payload.customer.companyName,\n regNo: request.payload.customer.regNo,\n secondaryRegNo: request.payload.customer.secondaryRegNo,\n remark: request.payload.customer.remark,\n gstNo: request.payload.customer.gstNo,\n taxIdentificationNo: request.payload.customer.taxIdentificationNo,\n taxRegistrationNo: request.payload.customer.taxRegistrationNo,\n // salesperson: request.payload.props.salesperson,\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n\n if (requestUserType === \"operator\") {\n\n let request = schemaUserOperatorUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n operator: {},\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n operator: {},\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"administrator\") {\n\n let request = schemaUserAdministratorUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n administrator: {},\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n administrator: {},\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"worker\") {\n\n let request = schemaUserWorkerUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n worker: {\n remark: reqPayload.worker.remark\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n worker: {\n remark: request.payload.worker.remark\n },\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"retailer\") {\n\n let request = schemaUserRetailerUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n // username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n retailer: {\n code: reqPayload.retailer.code,\n accountCode: reqPayload.retailer.account_code,\n companyName: reqPayload.retailer.company_name,\n regNo: reqPayload.retailer.reg_no,\n gstNo: reqPayload.retailer.gst_no,\n remark: reqPayload.retailer.remark,\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n retailer: {\n code: request.payload.retailer.code,\n accountCode: request.payload.retailer.accountCode,\n companyName: request.payload.retailer.companyName,\n regNo: request.payload.retailer.regNo,\n remark: request.payload.retailer.remark,\n gstNo: request.payload.retailer.gstNo\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n sendSuccess(res, response, `User(${requestUserType}) updated successfully`)\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** users : list users */\nexport const listUsers = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n\n try {\n\n const r = req as RequestAuthContext; // ✅ cast here\n\n const requestQuery = req.query as unknown as QueryList;\n const requestUserType = req.params.userType as UserServiceProps[\"userType\"];\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const { data, total } = await userService.listUsers({\n ...requestQuery,\n includePassword: false\n });\n\n let response = {\n [`${getRootName(requestUserType, false)}`]: data,\n total,\n }\n\n return sendSuccess(res, response, \"Retrieved successfully\");\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** users/delete : delete users */\nexport const deleteUsers = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n\n try {\n\n const requestUserType = req.body.scope.target as UserServiceProps[\"userType\"]\n // const requestQuery = req.query as unknown as QueryList;\n // const requestFileId = Number(req.params.fileId)\n\n const request = schemaUserDeletePayload.parse(req.body)\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const payload = {\n ids: request.payload.ids.map(i => BigInt(i))\n }\n\n const data = await userService.removeUsers(payload);\n\n return sendSuccess(res, data, \"Deleted\", getRootName(requestUserType, false));\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** user/data_types/:userType : get user data types */\nexport const getUserDataTypes = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n\n try {\n\n const requestQuery = req.query as unknown as QueryList;\n const requestUserType = req.params.userType as UserServiceProps[\"userType\"];\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const data = userService.getUserDataTypes();\n\n let response = {\n data_types: data\n }\n\n return sendSuccess(res, response, \"Retrieved successfully\");\n\n } catch (error: any) {\n next(error)\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"userController.js","sourceRoot":"","sources":["../../../src/controllers/user/userController.ts"],"names":[],"mappings":";;;AAEA,mCAAqF;AAErF,yCAAiH;AACjH,8CAc0B;AAI1B,MAAM,WAAW,GAAG,CAAC,eAA6C,EAAE,UAAmB,EAAE,EAAE;IAEvF,IAAI,QAAQ,GAAQ,EAAE,CAAA;IAEtB,QAAQ,eAAe,EAAE,CAAC;QACtB,KAAK,UAAU;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;YAAC,MAAM;QACzE,KAAK,eAAe;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB,CAAC;YAAC,MAAM;QACxF,KAAK,UAAU;YAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;YAAC,MAAM;Q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G,IAAA,8BAAsB,EAAC,GAAG,CAAC;YAC9B,QAAQ,EAAE,eAAe;SAC5B,CAAC,CAAA;QAEF,MAAM,IAAI,GAAG,WAAW,CAAC,gBAAgB,EAAE,CAAC;QAE5C,IAAI,QAAQ,GAAG;YACX,UAAU,EAAE,IAAI;SACnB,CAAA;QAED,OAAO,IAAA,mBAAW,EAAC,GAAG,EAAE,QAAQ,EAAE,wBAAwB,CAAC,CAAC;IAEhE,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B","sourcesContent":["import { Request, Response, NextFunction } from \"express\";\n\nimport { getDefaultServiceProps, sendSuccess, sendError, HTTP_STATUS } from \"@/utils\"\n\nimport { UserService, UserType, UserCreateProps, UserServiceProps, UserUpdateProps, userTypes } from \"@/services\"\nimport {\n schemaUserCustomerCreatePayload,\n schemaUserCustomerUpdatePayload,\n schemaUserRetailerCreatePayload,\n schemaUserRetailerUpdatePayload,\n schemaUserAdministratorCreatePayload,\n schemaUserAdministratorUpdatePayload,\n schemaUserWorkerCreatePayload,\n schemaUserWorkerUpdatePayload,\n schemaUserDeletePayload,\n schemaUserOperatorCreatePayload,\n schemaUserOperatorUpdatePayload,\n schemaUserDriverCreatePayload,\n schemaUserDriverUpdatePayload\n} from \"@/schema/payload\";\nimport { QueryList } from \"@/schema/middleware/route\";\nimport { RequestAuthContext } from \"@/middlewares/request\";\n\nconst getRootName = (requestUserType: UserServiceProps[\"userType\"], toSingular: boolean) => {\n\n let rootName: any = ``\n\n switch (requestUserType) {\n case \"operator\": rootName = toSingular ? \"operator\" : \"operators\"; break;\n case \"administrator\": rootName = toSingular ? \"administrator\" : \"administrators\"; break;\n case \"customer\": rootName = toSingular ? \"customer\" : \"customers\"; break;\n case \"retailer\": rootName = toSingular ? \"retailer\" : \"retailers\"; break;\n case \"driver\": rootName = toSingular ? \"driver\" : \"drivers\"; break;\n case \"worker\": rootName = toSingular ? \"worker\" : \"workers\"; break;\n }\n\n return rootName\n}\n\n/** user/:userType/:userId : get user */\nexport const getUser = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n try {\n\n const { userId, userType } = req.params;\n const requestQuery = req.query as unknown as QueryList;\n const requestUserType = userType as UserServiceProps[\"userType\"];\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const data = await userService.getUser({ id: Number(userId), datatypes: requestQuery.datatypes })\n\n return sendSuccess(res, data, \"Retrieved successfully\", getRootName(requestUserType, true));\n\n } catch (error: any) {\n next(error)\n }\n}\n\n/** user : create user */\nexport const createUser = async (req: Request, res: Response, next: NextFunction): Promise<void> => {\n try {\n\n const requestUserType = req.body.scope.target as UserServiceProps[\"userType\"]\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n let response: any = {}\n\n let reqScope = req.body.scope\n let reqPayload = req.body.payload\n\n if (requestUserType === \"operator\") {\n\n let request = schemaUserOperatorCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n operator: {}\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"customer\") {\n\n let request = schemaUserCustomerCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n customer: {\n code: reqPayload.customer.code,\n accountCode: reqPayload.customer.account_code,\n companyName: reqPayload.customer.company_name,\n regNo: reqPayload.customer.reg_no,\n secondaryRegNo: reqPayload.customer.secondary_reg_no,\n gstNo: reqPayload.customer.gst_no,\n taxIdentificationNo: reqPayload.customer.tax_identification_no,\n taxRegistrationNo: reqPayload.customer.tax_registration_no,\n remark: reqPayload.customer.remark\n },\n props: {\n salesperson: reqPayload.props.salesperson\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n customer: {\n code: request.payload.customer.code,\n accountCode: request.payload.customer.accountCode,\n companyName: request.payload.customer.companyName,\n regNo: request.payload.customer.regNo,\n secondaryRegNo: request.payload.customer.secondaryRegNo,\n remark: request.payload.customer.remark,\n gstNo: request.payload.customer.gstNo,\n taxIdentificationNo: request.payload.customer.taxIdentificationNo,\n taxRegistrationNo: request.payload.customer.taxRegistrationNo,\n // salesperson: request.payload.props.salesperson,\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"administrator\") {\n\n let request = schemaUserAdministratorCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload?.credential?.address ?? \"\",\n status: reqPayload.credential.status\n },\n administrator: {\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n administrator: {},\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"worker\") {\n\n let request = schemaUserWorkerCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n worker: {\n remark: reqPayload.worker.remark\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n worker: {\n remark: request.payload.worker.remark ?? \"\"\n },\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"driver\") {\n\n let request = schemaUserDriverCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n driver: {\n companyName: reqPayload.driver.company_name,\n remark: reqPayload.driver.remark\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n driver: {\n companyName: request.payload.driver.companyName ?? \"\",\n remark: request.payload.driver.remark ?? \"\"\n },\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n if (requestUserType === \"retailer\") {\n\n let request = schemaUserRetailerCreatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n retailer: {\n code: reqPayload.retailer.code,\n accountCode: reqPayload.retailer.account_code,\n companyName: reqPayload.retailer.company_name,\n regNo: reqPayload.retailer.reg_no,\n gstNo: reqPayload.retailer.gst_no,\n remark: reqPayload.retailer.remark,\n }\n }\n })\n\n let payload: UserCreateProps = {\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n loginPassword: request.payload.credential.password,\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n retailer: {\n code: request.payload.retailer.code,\n accountCode: request.payload.retailer.accountCode,\n companyName: request.payload.retailer.companyName,\n regNo: request.payload.retailer.regNo,\n remark: request.payload.retailer.remark,\n gstNo: request.payload.retailer.gstNo\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.createUser(payload)\n }\n }\n\n\n sendSuccess(res, response, `User(${requestUserType}) created successfully`)\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** user/:userId : update user */\nexport const updateUser = async (req: Request, res: Response, next: NextFunction): Promise<void> => {\n try {\n\n const { userId } = req.params;\n const requestUserType = req.body.scope.target as UserServiceProps[\"userType\"]\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n let response: any = {}\n\n let reqScope = req.body.scope\n let reqPayload = req.body.payload\n\n if (requestUserType === \"customer\") {\n\n let request = schemaUserCustomerUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address ?? \"\",\n status: reqPayload.credential.status\n },\n customer: {\n code: reqPayload.customer.code,\n accountCode: reqPayload.customer.account_code,\n companyName: reqPayload.customer.company_name,\n regNo: reqPayload.customer.reg_no,\n secondaryRegNo: reqPayload.customer.secondary_reg_no,\n gstNo: reqPayload.customer.gst_no,\n taxIdentificationNo: reqPayload.customer.tax_identification_no,\n taxRegistrationNo: reqPayload.customer.tax_registration_no,\n remark: reqPayload.customer.remark\n },\n props: {\n salesperson: reqPayload.props.salesperson\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request.payload.credential.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n customer: {\n code: request.payload.customer.code,\n accountCode: request.payload.customer.accountCode,\n companyName: request.payload.customer.companyName,\n regNo: request.payload.customer.regNo,\n secondaryRegNo: request.payload.customer.secondaryRegNo,\n remark: request.payload.customer.remark,\n gstNo: request.payload.customer.gstNo,\n taxIdentificationNo: request.payload.customer.taxIdentificationNo,\n taxRegistrationNo: request.payload.customer.taxRegistrationNo,\n // salesperson: request.payload.props.salesperson,\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"operator\") {\n\n let request = schemaUserOperatorUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n operator: {},\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n operator: {},\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"administrator\") {\n\n let request = schemaUserAdministratorUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n administrator: {},\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n administrator: {},\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"worker\") {\n\n let request = schemaUserWorkerUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n worker: {\n remark: reqPayload.worker.remark\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n worker: {\n remark: request.payload.worker.remark\n },\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"driver\") {\n\n let request = schemaUserDriverUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n driver: {\n companyName: reqPayload.driver.company_name,\n remark: reqPayload.driver.remark\n },\n props: {\n location_id: reqPayload.props.location_id\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n driver: {\n companyName: request.payload.driver.companyName ?? \"\",\n remark: request.payload.driver.remark ?? \"\"\n },\n props: {\n locationIds: request.payload.props.location_id.map(i => Number(i))\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n if (requestUserType === \"retailer\") {\n\n let request = schemaUserRetailerUpdatePayload.parse({\n scope: {\n target: reqScope.target,\n action: reqScope.action\n },\n payload: {\n credential: {\n // username: reqPayload.credential.username,\n password: reqPayload.credential.password,\n firstname: reqPayload.credential.firstname,\n lastname: reqPayload.credential.lastname,\n contact: reqPayload.credential.contact,\n email: reqPayload.credential.email,\n address: reqPayload.credential.address,\n status: reqPayload.credential.status\n },\n retailer: {\n code: reqPayload.retailer.code,\n accountCode: reqPayload.retailer.account_code,\n companyName: reqPayload.retailer.company_name,\n regNo: reqPayload.retailer.reg_no,\n gstNo: reqPayload.retailer.gst_no,\n remark: reqPayload.retailer.remark,\n }\n }\n })\n\n let payload: UserUpdateProps = {\n id: Number(userId),\n userType: requestUserType,\n data: {\n user: {\n loginUsername: request.payload.credential.username,\n ...(request.payload.credential.password ? { loginPassword: request.payload.credential.password } : {}),\n address: request?.payload?.credential?.address ?? \"\",\n contact: request.payload.credential.contact,\n email: request.payload.credential.email,\n firstname: request.payload.credential.firstname,\n lastname: request.payload.credential.lastname,\n status: request.payload.credential.status === 1\n },\n retailer: {\n code: request.payload.retailer.code,\n accountCode: request.payload.retailer.accountCode,\n companyName: request.payload.retailer.companyName,\n regNo: request.payload.retailer.regNo,\n remark: request.payload.retailer.remark,\n gstNo: request.payload.retailer.gstNo\n }\n }\n }\n\n response = {\n [`${getRootName(requestUserType, true)}`]: await userService.updateUser(payload)\n }\n }\n\n sendSuccess(res, response, `User(${requestUserType}) updated successfully`)\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** users : list users */\nexport const listUsers = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n\n try {\n\n const r = req as RequestAuthContext; // ✅ cast here\n\n const requestQuery = req.query as unknown as QueryList;\n const requestUserType = req.params.userType as UserServiceProps[\"userType\"];\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const { data, total } = await userService.listUsers({\n ...requestQuery,\n includePassword: false\n });\n\n let response = {\n [`${getRootName(requestUserType, false)}`]: data,\n total,\n }\n\n return sendSuccess(res, response, \"Retrieved successfully\");\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** users/delete : delete users */\nexport const deleteUsers = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n\n try {\n\n const requestUserType = req.body.scope.target as UserServiceProps[\"userType\"]\n // const requestQuery = req.query as unknown as QueryList;\n // const requestFileId = Number(req.params.fileId)\n\n const request = schemaUserDeletePayload.parse(req.body)\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const payload = {\n ids: request.payload.ids.map(i => BigInt(i))\n }\n\n const data = await userService.removeUsers(payload);\n\n return sendSuccess(res, data, \"Deleted\", getRootName(requestUserType, false));\n\n } catch (error: any) {\n next(error)\n }\n};\n\n/** user/data_types/:userType : get user data types */\nexport const getUserDataTypes = async (req: Request, res: Response, next: NextFunction): Promise<any> => {\n\n try {\n\n const requestQuery = req.query as unknown as QueryList;\n const requestUserType = req.params.userType as UserServiceProps[\"userType\"];\n\n const userService = UserService({\n ...getDefaultServiceProps(req),\n userType: requestUserType\n })\n\n const data = userService.getUserDataTypes();\n\n let response = {\n data_types: data\n }\n\n return sendSuccess(res, response, \"Retrieved successfully\");\n\n } catch (error: any) {\n next(error)\n }\n};\n"]}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { RetailerModel, ModelRetailerFields } from "./user/RetailerModel";
|
|
|
6
6
|
export { AdministratorModel, ModelAdministratorFields } from "./user/AdministratorModel";
|
|
7
7
|
export { OperatorModel, ModelOperatorFields } from "./user/OperatorModel";
|
|
8
8
|
export { WorkerModel, ModelWorkerFields } from "./user/WorkerModel";
|
|
9
|
+
export { DriverModel, ModelDriverFields } from "./user/DriverModel";
|
|
9
10
|
export type { ModelUser, ModelUserCreateProps, ModelUserGetProps, ModelUserListProps } from "./user/UserModel";
|
|
10
11
|
export type { ModelUserStatus, ModelUserStatusCreateProps, ModelUserStatusGetProps, ModelUserStatusListProps } from "./user/UserStatusModel";
|
|
11
12
|
export type { ModelUserProp, ModelUserPropCreateProps, ModelUserPropGetProps, ModelUserPropListProps } from "./user/UserPropModel";
|
|
@@ -14,6 +15,7 @@ export type { ModelRetailer, ModelRetailerCreateProps, ModelRetailerGetProps, Mo
|
|
|
14
15
|
export type { ModelAdministrator, ModelAdministratorCreateProps, ModelAdministratorGetProps, ModelAdministratorListProps } from "./user/AdministratorModel";
|
|
15
16
|
export type { ModelOperator, ModelOperatorCreateProps, ModelOperatorGetProps, ModelOperatorListProps } from "./user/OperatorModel";
|
|
16
17
|
export type { ModelWorker, ModelWorkerCreateProps, ModelWorkerGetProps, ModelWorkerListProps } from "./user/WorkerModel";
|
|
18
|
+
export type { ModelDriver, ModelDriverCreateProps, ModelDriverGetProps, ModelDriverListProps } from "./user/DriverModel";
|
|
17
19
|
export { BusinessModel, ModelBusinessFields } from "./business/BusinessModel";
|
|
18
20
|
export { AccountModel, ModelAccountFields } from "./account/AccountModel";
|
|
19
21
|
export type { ModelBusiness, ModelBusinessCreateProps, ModelBusinessGetProps, ModelBusinessListProps } from "./business/BusinessModel";
|
package/dist/models/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.ModelNumberDateSequenceFields = exports.NumberDateSequenceModel = exports.ModelDocumentDocumentFields = exports.DocumentDocumentModel = exports.ModelDocumentItemFields = exports.DocumentItemModel = exports.ModelDocumentPaymentFields = exports.DocumentPaymentModel = exports.ModelDocumentLocationFields = exports.DocumentLocationModel = exports.ModelDocumentAmountFields = exports.DocumentAmountModel = exports.ModelDocumentProfileFields = exports.DocumentProfileModel = exports.ModelDocumentTotalFields = exports.DocumentTotalModel = exports.ModelDocumentFields = exports.DocumentModel = exports.ModelCategoryFields = exports.CategoryModel = exports.ModelUomFields = exports.UomModel = exports.ModelBrandFields = exports.BrandModel = exports.ModelItemFields = exports.ItemModel = exports.ModelProductFields = exports.ProductModel = exports.ModelAreaFields = exports.AreaModel = exports.ModelStateFields = exports.StateModel = void 0;
|
|
3
|
+
exports.ModelItemInjectionFieldFields = exports.ItemInjectionFieldModel = exports.ModelLogisticInjectionFieldFields = exports.LogisticInjectionFieldModel = exports.ModelRepositoryInjectionFieldFields = exports.RepositoryInjectionFieldModel = exports.ModelDocumentInjectionFieldFields = exports.DocumentInjectionFieldModel = exports.ModelUserInjectionFieldFields = exports.UserInjectionFieldModel = exports.ModelInjectionFieldFields = exports.InjectionFieldModel = exports.ModelLocationSlotFields = exports.LocationSlotModel = exports.ModelLocationRackFields = exports.LocationRackModel = exports.ModelLocationFields = exports.LocationModel = exports.ModelFileFields = exports.FileModel = exports.ModelGroupOwnerFields = exports.GroupOwnerModel = exports.ModelGroupFields = exports.GroupModel = exports.ModelBranchUserFields = exports.BranchUserModel = exports.ModelUserBranchFields = exports.UserBranchModel = exports.ModelAccountFields = exports.AccountModel = exports.ModelBusinessFields = exports.BusinessModel = exports.ModelDriverFields = exports.DriverModel = exports.ModelWorkerFields = exports.WorkerModel = exports.ModelOperatorFields = exports.OperatorModel = exports.ModelAdministratorFields = exports.AdministratorModel = exports.ModelRetailerFields = exports.RetailerModel = exports.ModelCustomerFields = exports.CustomerModel = exports.ModelUserPropFields = exports.UserPropModel = exports.ModelUserStatusFields = exports.UserStatusModel = exports.ModelUserFields = exports.UserModel = void 0;
|
|
4
|
+
exports.ModelNumberDateSequenceFields = exports.NumberDateSequenceModel = exports.ModelDocumentDocumentFields = exports.DocumentDocumentModel = exports.ModelDocumentItemFields = exports.DocumentItemModel = exports.ModelDocumentPaymentFields = exports.DocumentPaymentModel = exports.ModelDocumentLocationFields = exports.DocumentLocationModel = exports.ModelDocumentAmountFields = exports.DocumentAmountModel = exports.ModelDocumentProfileFields = exports.DocumentProfileModel = exports.ModelDocumentTotalFields = exports.DocumentTotalModel = exports.ModelDocumentFields = exports.DocumentModel = exports.ModelCategoryFields = exports.CategoryModel = exports.ModelUomFields = exports.UomModel = exports.ModelBrandFields = exports.BrandModel = exports.ModelItemFields = exports.ItemModel = exports.ModelProductFields = exports.ProductModel = exports.ModelAreaFields = exports.AreaModel = exports.ModelStateFields = exports.StateModel = exports.ModelCountryFields = exports.CountryModel = void 0;
|
|
5
5
|
var UserModel_1 = require("./user/UserModel");
|
|
6
6
|
Object.defineProperty(exports, "UserModel", { enumerable: true, get: function () { return UserModel_1.UserModel; } });
|
|
7
7
|
Object.defineProperty(exports, "ModelUserFields", { enumerable: true, get: function () { return UserModel_1.ModelUserFields; } });
|
|
@@ -26,6 +26,9 @@ Object.defineProperty(exports, "ModelOperatorFields", { enumerable: true, get: f
|
|
|
26
26
|
var WorkerModel_1 = require("./user/WorkerModel");
|
|
27
27
|
Object.defineProperty(exports, "WorkerModel", { enumerable: true, get: function () { return WorkerModel_1.WorkerModel; } });
|
|
28
28
|
Object.defineProperty(exports, "ModelWorkerFields", { enumerable: true, get: function () { return WorkerModel_1.ModelWorkerFields; } });
|
|
29
|
+
var DriverModel_1 = require("./user/DriverModel");
|
|
30
|
+
Object.defineProperty(exports, "DriverModel", { enumerable: true, get: function () { return DriverModel_1.DriverModel; } });
|
|
31
|
+
Object.defineProperty(exports, "ModelDriverFields", { enumerable: true, get: function () { return DriverModel_1.ModelDriverFields; } });
|
|
29
32
|
var BusinessModel_1 = require("./business/BusinessModel");
|
|
30
33
|
Object.defineProperty(exports, "BusinessModel", { enumerable: true, get: function () { return BusinessModel_1.BusinessModel; } });
|
|
31
34
|
Object.defineProperty(exports, "ModelBusinessFields", { enumerable: true, get: function () { return BusinessModel_1.ModelBusinessFields; } });
|
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;AAAA,8CAA6D;AAApD,sGAAA,SAAS,OAAA;AAAE,4GAAA,eAAe,OAAA;AACnC,0DAA+E;AAAtE,kHAAA,eAAe,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAC/C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,gEAAwF;AAA/E,wHAAA,kBAAkB,OAAA;AAAE,8HAAA,wBAAwB,OAAA;AACrD,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,O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usModel, ModelUserStatusFields } from \"./user/UserStatusModel\"\nexport { UserPropModel, ModelUserPropFields } from \"./user/UserPropModel\"\nexport { CustomerModel, ModelCustomerFields } from \"./user/CustomerModel\"\nexport { RetailerModel, ModelRetailerFields } from \"./user/RetailerModel\"\nexport { AdministratorModel, ModelAdministratorFields } from \"./user/AdministratorModel\"\nexport { OperatorModel, ModelOperatorFields } from \"./user/OperatorModel\"\nexport { WorkerModel, ModelWorkerFields } from \"./user/WorkerModel\"\nexport type { ModelUser, ModelUserCreateProps, ModelUserGetProps, ModelUserListProps } from \"./user/UserModel\";\nexport type { ModelUserStatus, ModelUserStatusCreateProps, ModelUserStatusGetProps, ModelUserStatusListProps } from \"./user/UserStatusModel\";\nexport type { ModelUserProp, ModelUserPropCreateProps, ModelUserPropGetProps, ModelUserPropListProps } from \"./user/UserPropModel\";\nexport type { ModelCustomer, ModelCustomerCreateProps, ModelCustomerGetProps, ModelCustomerListProps } from \"./user/CustomerModel\";\nexport type { ModelRetailer, ModelRetailerCreateProps, ModelRetailerGetProps, ModelRetailerListProps } from \"./user/RetailerModel\";\nexport type { ModelAdministrator, ModelAdministratorCreateProps, ModelAdministratorGetProps, ModelAdministratorListProps } from \"./user/AdministratorModel\";\nexport type { ModelOperator, ModelOperatorCreateProps, ModelOperatorGetProps, ModelOperatorListProps } from \"./user/OperatorModel\";\nexport type { ModelWorker, ModelWorkerCreateProps, ModelWorkerGetProps, ModelWorkerListProps } from \"./user/WorkerModel\";\n\nexport { BusinessModel, ModelBusinessFields } from \"./business/BusinessModel\"\nexport { AccountModel, ModelAccountFields } from \"./account/AccountModel\"\nexport type { ModelBusiness, ModelBusinessCreateProps, ModelBusinessGetProps, ModelBusinessListProps } from \"./business/BusinessModel\";\nexport type { ModelAccount, ModelAccountCreateProps, ModelAccountGetProps, ModelAccountListProps } from \"./account/AccountModel\";\n\nexport { UserBranchModel, ModelUserBranchFields } from \"./branch/UserBranchModel\"\nexport { BranchUserModel, ModelBranchUserFields } from \"./branch_user/BranchUserModel\"\nexport type { ModelUserBranch, ModelUserBranchCreateProps, ModelUserBranchGetProps, ModelUserBranchListProps } from \"./branch/UserBranchModel\";\nexport type { ModelBranchUser, ModelBranchUserCreateProps, ModelBranchUserGetProps, ModelBranchUserListProps } from \"./branch_user/BranchUserModel\";\n\nexport { GroupModel, ModelGroupFields } from \"./group/GroupModel\"\nexport { GroupOwnerModel, ModelGroupOwnerFields } from \"./group/GroupOwnerModel\"\nexport type { ModelGroup, ModelGroupCreateProps, ModelGroupGetProps, ModelGroupListProps } from \"./group/GroupModel\";\nexport type { ModelGroupOwner, ModelGroupOwnerCreateProps, ModelGroupOwnerGetProps, ModelGroupOwnerListProps } from \"./group/GroupOwnerModel\";\n\nexport { FileModel, ModelFileFields } from \"./file/FileModel\"\nexport type { ModelFile, ModelFileCreateProps, ModelFileGetProps, ModelFileListProps } from \"./file/FileModel\";\n\nexport { LocationModel, ModelLocationFields } from \"./location/LocationModel\"\nexport { LocationRackModel, ModelLocationRackFields } from \"./location/LocationRackModel\"\nexport { LocationSlotModel, ModelLocationSlotFields } from \"./location/LocationSlotModel\"\nexport type { ModelLocation, ModelLocationCreateProps, ModelLocationGetProps, ModelLocationListProps } from \"./location/LocationModel\";\nexport type { ModelLocationRack, ModelLocationRackCreateProps, ModelLocationRackGetProps, ModelLocationRackListProps } from \"./location/LocationRackModel\";\nexport type { ModelLocationSlot, ModelLocationSlotCreateProps, ModelLocationSlotGetProps, ModelLocationSlotListProps } from \"./location/LocationSlotModel\";\n\nexport { InjectionFieldModel, ModelInjectionFieldFields } from \"./injection_field/InjectionFieldModel\"\nexport { UserInjectionFieldModel, ModelUserInjectionFieldFields } from \"./injection_field/UserInjectionFieldModel\"\nexport { DocumentInjectionFieldModel, ModelDocumentInjectionFieldFields } from \"./injection_field/DocumentInjectionFieldModel\"\nexport { RepositoryInjectionFieldModel, ModelRepositoryInjectionFieldFields } from \"./injection_field/RepositoryInjectionFieldModel\"\nexport { LogisticInjectionFieldModel, ModelLogisticInjectionFieldFields } from \"./injection_field/LogisticInjectionFieldModel\"\nexport { ItemInjectionFieldModel, ModelItemInjectionFieldFields } from \"./injection_field/ItemInjectionFieldModel\"\nexport type { InjectionFieldTargetTableName } from \"./injection_field/InjectionFieldModel\"\nexport type { ModelUserInjectionField, ModelUserInjectionFieldCreateProps, ModelUserInjectionFieldGetProps, ModelUserInjectionFieldListProps } from \"./injection_field/UserInjectionFieldModel\";\nexport type { ModelDocumentInjectionField, ModelDocumentInjectionFieldCreateProps, ModelDocumentInjectionFieldGetProps, ModelDocumentInjectionFieldListProps } from \"./injection_field/DocumentInjectionFieldModel\";\nexport type { ModelRepositoryInjectionField, ModelRepositoryInjectionFieldCreateProps, ModelRepositoryInjectionFieldGetProps, ModelRepositoryInjectionFieldListProps } from \"./injection_field/RepositoryInjectionFieldModel\";\nexport type { ModelLogisticInjectionField, ModelLogisticInjectionFieldCreateProps, ModelLogisticInjectionFieldGetProps, ModelLogisticInjectionFieldListProps } from \"./injection_field/LogisticInjectionFieldModel\";\nexport type { ModelItemInjectionField, ModelItemInjectionFieldCreateProps, ModelItemInjectionFieldGetProps, ModelItemInjectionFieldListProps } from \"./injection_field/ItemInjectionFieldModel\";\n\nexport { CountryModel, ModelCountryFields } from \"./region/CountryModel\"\nexport { StateModel, ModelStateFields } from \"./region/StateModel\"\nexport { AreaModel, ModelAreaFields } from \"./region/AreaModel\"\nexport type { ModelCountry, ModelCountryCreateProps, ModelCountryGetProps, ModelCountryListProps } from \"./region/CountryModel\";\nexport type { ModelState, ModelStateCreateProps, ModelStateGetProps, ModelStateListProps } from \"./region/StateModel\";\nexport type { ModelArea, ModelAreaCreateProps, ModelAreaGetProps, ModelAreaListProps } from \"./region/AreaModel\";\n\nexport { ProductModel, ModelProductFields } from \"./item/ProductModel\"\nexport { ItemModel, ModelItemFields } from \"./item/ItemModel\"\nexport { BrandModel, ModelBrandFields } from \"./item/BrandModel\"\nexport { UomModel, ModelUomFields } from \"./item/UomModel\"\nexport { CategoryModel, ModelCategoryFields } from \"./item/CategoryModel\"\nexport type { ModelProduct, ModelProductCreateProps, ModelProductGetProps, ModelProductListProps } from \"./item/ProductModel\";\nexport type { ModelItem, ModelItemCreateProps, ModelItemGetProps, ModelItemListProps } from \"./item/ItemModel\";\nexport type { ModelBrand, ModelBrandCreateProps, ModelBrandGetProps, ModelBrandListProps } from \"./item/BrandModel\";\nexport type { ModelUom, ModelUomCreateProps, ModelUomGetProps, ModelUomListProps } from \"./item/UomModel\";\nexport type { ModelCategory, ModelCategoryCreateProps, ModelCategoryGetProps, ModelCategoryListProps } from \"./item/CategoryModel\";\n\nexport { DocumentModel, ModelDocumentFields } from \"./document/DocumentModel\"\n// export { DocumentNumberModel, ModelDocumentNumberFields } from \"./document/DocumentNumberModel_unuse\"\nexport { DocumentTotalModel, ModelDocumentTotalFields } from \"./document/DocumentTotalModel\"\nexport { DocumentProfileModel, ModelDocumentProfileFields } from \"./document/DocumentProfileModel\"\nexport { DocumentAmountModel, ModelDocumentAmountFields } from \"./document/DocumentAmountModel\"\nexport { DocumentLocationModel, ModelDocumentLocationFields } from \"./document/DocumentLocationModel\"\n// export { DocumentPropModel, ModelDocumentPropFields } from \"./document/DocumentPropModel\"\nexport { DocumentPaymentModel, ModelDocumentPaymentFields } from \"./document/DocumentPaymentModel\"\nexport { DocumentItemModel, ModelDocumentItemFields } from \"./document/DocumentItemModel\"\nexport { DocumentDocumentModel, ModelDocumentDocumentFields } from \"./document/DocumentDocumentModel\"\nexport type { ModelDocument, ModelDocumentCreateProps, ModelDocumentGetProps, ModelDocumentListProps } from \"./document/DocumentModel\";\nexport type { ModelDocumentProfile, ModelDocumentProfileCreateProps, ModelDocumentProfileGetProps, ModelDocumentProfileListProps } from \"./document/DocumentProfileModel\";\nexport type { ModelDocumentAmount, ModelDocumentAmountCreateProps, ModelDocumentAmountGetProps, ModelDocumentAmountListProps } from \"./document/DocumentAmountModel\";\n// export type { ModelDocumentNumber, ModelDocumentNumberCreateProps, ModelDocumentNumberGetProps, ModelDocumentNumberListProps } from \"./document/DocumentNumberModel_unuse\";\nexport type { ModelDocumentLocation, ModelDocumentLocationCreateProps, ModelDocumentLocationGetProps, ModelDocumentLocationListProps } from \"./document/DocumentLocationModel\";\n// export type { ModelDocumentProp, ModelDocumentPropCreateProps, ModelDocumentPropGetProps, ModelDocumentPropListProps } from \"./document/DocumentPropModel\";\nexport type { ModelDocumentPayment, ModelDocumentPaymentCreateProps, ModelDocumentPaymentGetProps, ModelDocumentPaymentListProps } from \"./document/DocumentPaymentModel\";\nexport type { ModelDocumentTotal, ModelDocumentTotalCreateProps, ModelDocumentTotalGetProps, ModelDocumentTotalListProps } from \"./document/DocumentTotalModel\";\nexport type { ModelDocumentItem, ModelDocumentItemCreateProps, ModelDocumentItemGetProps, ModelDocumentItemListProps } from \"./document/DocumentItemModel\";\nexport type { ModelDocumentDocument, ModelDocumentDocumentCreateProps, ModelDocumentDocumentGetProps, ModelDocumentDocumentListProps } from \"./document/DocumentDocumentModel\";\n\nexport { NumberDateSequenceModel, ModelNumberDateSequenceFields } from \"./others/NumberDateSequenceModel\"\nexport type { ModelNumberDateSequence, ModelNumberDateSequenceCreateProps, ModelNumberDateSequenceGetProps, ModelNumberDateSequenceListProps } from \"./others/NumberDateSequenceModel\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;AAAA,8CAA6D;AAApD,sGAAA,SAAS,OAAA;AAAE,4GAAA,eAAe,OAAA;AACnC,0DAA+E;AAAtE,kHAAA,eAAe,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAC/C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,gEAAwF;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EAAqG;AAA5F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAY3D,4EAAyG;AAAhG,kIAAA,uBAAuB,OAAA;AAAE,wIAAA,6BAA6B,OAAA","sourcesContent":["export { UserModel, ModelUserFields } from \"./user/UserModel\"\nexport { UserStatusModel, ModelUserStatusFields } from \"./user/UserStatusModel\"\nexport { UserPropModel, ModelUserPropFields } from \"./user/UserPropModel\"\nexport { CustomerModel, ModelCustomerFields } from \"./user/CustomerModel\"\nexport { RetailerModel, ModelRetailerFields } from \"./user/RetailerModel\"\nexport { AdministratorModel, ModelAdministratorFields } from \"./user/AdministratorModel\"\nexport { OperatorModel, ModelOperatorFields } from \"./user/OperatorModel\"\nexport { WorkerModel, ModelWorkerFields } from \"./user/WorkerModel\"\nexport { DriverModel, ModelDriverFields } from \"./user/DriverModel\"\nexport type { ModelUser, ModelUserCreateProps, ModelUserGetProps, ModelUserListProps } from \"./user/UserModel\";\nexport type { ModelUserStatus, ModelUserStatusCreateProps, ModelUserStatusGetProps, ModelUserStatusListProps } from \"./user/UserStatusModel\";\nexport type { ModelUserProp, ModelUserPropCreateProps, ModelUserPropGetProps, ModelUserPropListProps } from \"./user/UserPropModel\";\nexport type { ModelCustomer, ModelCustomerCreateProps, ModelCustomerGetProps, ModelCustomerListProps } from \"./user/CustomerModel\";\nexport type { ModelRetailer, ModelRetailerCreateProps, ModelRetailerGetProps, ModelRetailerListProps } from \"./user/RetailerModel\";\nexport type { ModelAdministrator, ModelAdministratorCreateProps, ModelAdministratorGetProps, ModelAdministratorListProps } from \"./user/AdministratorModel\";\nexport type { ModelOperator, ModelOperatorCreateProps, ModelOperatorGetProps, ModelOperatorListProps } from \"./user/OperatorModel\";\nexport type { ModelWorker, ModelWorkerCreateProps, ModelWorkerGetProps, ModelWorkerListProps } from \"./user/WorkerModel\";\nexport type { ModelDriver, ModelDriverCreateProps, ModelDriverGetProps, ModelDriverListProps } from \"./user/DriverModel\";\n\nexport { BusinessModel, ModelBusinessFields } from \"./business/BusinessModel\"\nexport { AccountModel, ModelAccountFields } from \"./account/AccountModel\"\nexport type { ModelBusiness, ModelBusinessCreateProps, ModelBusinessGetProps, ModelBusinessListProps } from \"./business/BusinessModel\";\nexport type { ModelAccount, ModelAccountCreateProps, ModelAccountGetProps, ModelAccountListProps } from \"./account/AccountModel\";\n\nexport { UserBranchModel, ModelUserBranchFields } from \"./branch/UserBranchModel\"\nexport { BranchUserModel, ModelBranchUserFields } from \"./branch_user/BranchUserModel\"\nexport type { ModelUserBranch, ModelUserBranchCreateProps, ModelUserBranchGetProps, ModelUserBranchListProps } from \"./branch/UserBranchModel\";\nexport type { ModelBranchUser, ModelBranchUserCreateProps, ModelBranchUserGetProps, ModelBranchUserListProps } from \"./branch_user/BranchUserModel\";\n\nexport { GroupModel, ModelGroupFields } from \"./group/GroupModel\"\nexport { GroupOwnerModel, ModelGroupOwnerFields } from \"./group/GroupOwnerModel\"\nexport type { ModelGroup, ModelGroupCreateProps, ModelGroupGetProps, ModelGroupListProps } from \"./group/GroupModel\";\nexport type { ModelGroupOwner, ModelGroupOwnerCreateProps, ModelGroupOwnerGetProps, ModelGroupOwnerListProps } from \"./group/GroupOwnerModel\";\n\nexport { FileModel, ModelFileFields } from \"./file/FileModel\"\nexport type { ModelFile, ModelFileCreateProps, ModelFileGetProps, ModelFileListProps } from \"./file/FileModel\";\n\nexport { LocationModel, ModelLocationFields } from \"./location/LocationModel\"\nexport { LocationRackModel, ModelLocationRackFields } from \"./location/LocationRackModel\"\nexport { LocationSlotModel, ModelLocationSlotFields } from \"./location/LocationSlotModel\"\nexport type { ModelLocation, ModelLocationCreateProps, ModelLocationGetProps, ModelLocationListProps } from \"./location/LocationModel\";\nexport type { ModelLocationRack, ModelLocationRackCreateProps, ModelLocationRackGetProps, ModelLocationRackListProps } from \"./location/LocationRackModel\";\nexport type { ModelLocationSlot, ModelLocationSlotCreateProps, ModelLocationSlotGetProps, ModelLocationSlotListProps } from \"./location/LocationSlotModel\";\n\nexport { InjectionFieldModel, ModelInjectionFieldFields } from \"./injection_field/InjectionFieldModel\"\nexport { UserInjectionFieldModel, ModelUserInjectionFieldFields } from \"./injection_field/UserInjectionFieldModel\"\nexport { DocumentInjectionFieldModel, ModelDocumentInjectionFieldFields } from \"./injection_field/DocumentInjectionFieldModel\"\nexport { RepositoryInjectionFieldModel, ModelRepositoryInjectionFieldFields } from \"./injection_field/RepositoryInjectionFieldModel\"\nexport { LogisticInjectionFieldModel, ModelLogisticInjectionFieldFields } from \"./injection_field/LogisticInjectionFieldModel\"\nexport { ItemInjectionFieldModel, ModelItemInjectionFieldFields } from \"./injection_field/ItemInjectionFieldModel\"\nexport type { InjectionFieldTargetTableName } from \"./injection_field/InjectionFieldModel\"\nexport type { ModelUserInjectionField, ModelUserInjectionFieldCreateProps, ModelUserInjectionFieldGetProps, ModelUserInjectionFieldListProps } from \"./injection_field/UserInjectionFieldModel\";\nexport type { ModelDocumentInjectionField, ModelDocumentInjectionFieldCreateProps, ModelDocumentInjectionFieldGetProps, ModelDocumentInjectionFieldListProps } from \"./injection_field/DocumentInjectionFieldModel\";\nexport type { ModelRepositoryInjectionField, ModelRepositoryInjectionFieldCreateProps, ModelRepositoryInjectionFieldGetProps, ModelRepositoryInjectionFieldListProps } from \"./injection_field/RepositoryInjectionFieldModel\";\nexport type { ModelLogisticInjectionField, ModelLogisticInjectionFieldCreateProps, ModelLogisticInjectionFieldGetProps, ModelLogisticInjectionFieldListProps } from \"./injection_field/LogisticInjectionFieldModel\";\nexport type { ModelItemInjectionField, ModelItemInjectionFieldCreateProps, ModelItemInjectionFieldGetProps, ModelItemInjectionFieldListProps } from \"./injection_field/ItemInjectionFieldModel\";\n\nexport { CountryModel, ModelCountryFields } from \"./region/CountryModel\"\nexport { StateModel, ModelStateFields } from \"./region/StateModel\"\nexport { AreaModel, ModelAreaFields } from \"./region/AreaModel\"\nexport type { ModelCountry, ModelCountryCreateProps, ModelCountryGetProps, ModelCountryListProps } from \"./region/CountryModel\";\nexport type { ModelState, ModelStateCreateProps, ModelStateGetProps, ModelStateListProps } from \"./region/StateModel\";\nexport type { ModelArea, ModelAreaCreateProps, ModelAreaGetProps, ModelAreaListProps } from \"./region/AreaModel\";\n\nexport { ProductModel, ModelProductFields } from \"./item/ProductModel\"\nexport { ItemModel, ModelItemFields } from \"./item/ItemModel\"\nexport { BrandModel, ModelBrandFields } from \"./item/BrandModel\"\nexport { UomModel, ModelUomFields } from \"./item/UomModel\"\nexport { CategoryModel, ModelCategoryFields } from \"./item/CategoryModel\"\nexport type { ModelProduct, ModelProductCreateProps, ModelProductGetProps, ModelProductListProps } from \"./item/ProductModel\";\nexport type { ModelItem, ModelItemCreateProps, ModelItemGetProps, ModelItemListProps } from \"./item/ItemModel\";\nexport type { ModelBrand, ModelBrandCreateProps, ModelBrandGetProps, ModelBrandListProps } from \"./item/BrandModel\";\nexport type { ModelUom, ModelUomCreateProps, ModelUomGetProps, ModelUomListProps } from \"./item/UomModel\";\nexport type { ModelCategory, ModelCategoryCreateProps, ModelCategoryGetProps, ModelCategoryListProps } from \"./item/CategoryModel\";\n\nexport { DocumentModel, ModelDocumentFields } from \"./document/DocumentModel\"\n// export { DocumentNumberModel, ModelDocumentNumberFields } from \"./document/DocumentNumberModel_unuse\"\nexport { DocumentTotalModel, ModelDocumentTotalFields } from \"./document/DocumentTotalModel\"\nexport { DocumentProfileModel, ModelDocumentProfileFields } from \"./document/DocumentProfileModel\"\nexport { DocumentAmountModel, ModelDocumentAmountFields } from \"./document/DocumentAmountModel\"\nexport { DocumentLocationModel, ModelDocumentLocationFields } from \"./document/DocumentLocationModel\"\n// export { DocumentPropModel, ModelDocumentPropFields } from \"./document/DocumentPropModel\"\nexport { DocumentPaymentModel, ModelDocumentPaymentFields } from \"./document/DocumentPaymentModel\"\nexport { DocumentItemModel, ModelDocumentItemFields } from \"./document/DocumentItemModel\"\nexport { DocumentDocumentModel, ModelDocumentDocumentFields } from \"./document/DocumentDocumentModel\"\nexport type { ModelDocument, ModelDocumentCreateProps, ModelDocumentGetProps, ModelDocumentListProps } from \"./document/DocumentModel\";\nexport type { ModelDocumentProfile, ModelDocumentProfileCreateProps, ModelDocumentProfileGetProps, ModelDocumentProfileListProps } from \"./document/DocumentProfileModel\";\nexport type { ModelDocumentAmount, ModelDocumentAmountCreateProps, ModelDocumentAmountGetProps, ModelDocumentAmountListProps } from \"./document/DocumentAmountModel\";\n// export type { ModelDocumentNumber, ModelDocumentNumberCreateProps, ModelDocumentNumberGetProps, ModelDocumentNumberListProps } from \"./document/DocumentNumberModel_unuse\";\nexport type { ModelDocumentLocation, ModelDocumentLocationCreateProps, ModelDocumentLocationGetProps, ModelDocumentLocationListProps } from \"./document/DocumentLocationModel\";\n// export type { ModelDocumentProp, ModelDocumentPropCreateProps, ModelDocumentPropGetProps, ModelDocumentPropListProps } from \"./document/DocumentPropModel\";\nexport type { ModelDocumentPayment, ModelDocumentPaymentCreateProps, ModelDocumentPaymentGetProps, ModelDocumentPaymentListProps } from \"./document/DocumentPaymentModel\";\nexport type { ModelDocumentTotal, ModelDocumentTotalCreateProps, ModelDocumentTotalGetProps, ModelDocumentTotalListProps } from \"./document/DocumentTotalModel\";\nexport type { ModelDocumentItem, ModelDocumentItemCreateProps, ModelDocumentItemGetProps, ModelDocumentItemListProps } from \"./document/DocumentItemModel\";\nexport type { ModelDocumentDocument, ModelDocumentDocumentCreateProps, ModelDocumentDocumentGetProps, ModelDocumentDocumentListProps } from \"./document/DocumentDocumentModel\";\n\nexport { NumberDateSequenceModel, ModelNumberDateSequenceFields } from \"./others/NumberDateSequenceModel\"\nexport type { ModelNumberDateSequence, ModelNumberDateSequenceCreateProps, ModelNumberDateSequenceGetProps, ModelNumberDateSequenceListProps } from \"./others/NumberDateSequenceModel\";\n"]}
|