storemw-core-api 1.0.146 → 1.0.148

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.
Files changed (87) hide show
  1. package/dist/app.js +1 -0
  2. package/dist/app.js.map +1 -1
  3. package/dist/controllers/index.d.ts +1 -0
  4. package/dist/controllers/index.js +6 -1
  5. package/dist/controllers/index.js.map +1 -1
  6. package/dist/controllers/scheduler/schedulerLogController.d.ts +9 -0
  7. package/dist/controllers/scheduler/schedulerLogController.js +133 -0
  8. package/dist/controllers/scheduler/schedulerLogController.js.map +1 -0
  9. package/dist/features/auth_token/authTokenRegistry.js +1 -1
  10. package/dist/features/auth_token/authTokenRegistry.js.map +1 -1
  11. package/dist/features/auth_token/authTokenType.d.ts +2 -1
  12. package/dist/features/auth_token/authTokenType.js.map +1 -1
  13. package/dist/features/core_config/coreConfigType.js.map +1 -1
  14. package/dist/features/file_storage/fileStorageType.d.ts +4 -3
  15. package/dist/features/file_storage/fileStorageType.js.map +1 -1
  16. package/dist/features/reset_password/resetPasswordType.d.ts +7 -6
  17. package/dist/features/reset_password/resetPasswordType.js.map +1 -1
  18. package/dist/features/smtp_email/smtpEmailType.d.ts +7 -6
  19. package/dist/features/smtp_email/smtpEmailType.js.map +1 -1
  20. package/dist/features/user_me/userMeRegistry.js +0 -18
  21. package/dist/features/user_me/userMeRegistry.js.map +1 -1
  22. package/dist/features/user_me/userMeType.d.ts +4 -3
  23. package/dist/features/user_me/userMeType.js.map +1 -1
  24. package/dist/middlewares/route/index.d.ts +1 -0
  25. package/dist/middlewares/route/index.js +7 -2
  26. package/dist/middlewares/route/index.js.map +1 -1
  27. package/dist/middlewares/route/validateSchedulerLog.d.ts +5 -0
  28. package/dist/middlewares/route/validateSchedulerLog.js +20 -0
  29. package/dist/middlewares/route/validateSchedulerLog.js.map +1 -0
  30. package/dist/models/index.d.ts +2 -0
  31. package/dist/models/index.js +4 -1
  32. package/dist/models/index.js.map +1 -1
  33. package/dist/models/scheduler/SchedulerLogModel.d.ts +371 -0
  34. package/dist/models/scheduler/SchedulerLogModel.js +13 -0
  35. package/dist/models/scheduler/SchedulerLogModel.js.map +1 -0
  36. package/dist/routes/index.d.ts +1 -0
  37. package/dist/routes/index.js +3 -1
  38. package/dist/routes/index.js.map +1 -1
  39. package/dist/routes/scheduler/schedulerLogRoutes.d.ts +2 -0
  40. package/dist/routes/scheduler/schedulerLogRoutes.js +13 -0
  41. package/dist/routes/scheduler/schedulerLogRoutes.js.map +1 -0
  42. package/dist/routes/scheduler/schedulerLogsRoutes.d.ts +2 -0
  43. package/dist/routes/scheduler/schedulerLogsRoutes.js +13 -0
  44. package/dist/routes/scheduler/schedulerLogsRoutes.js.map +1 -0
  45. package/dist/routes/scheduler/schedulersRoutes.d.ts +2 -0
  46. package/dist/routes/scheduler/schedulersRoutes.js +12 -0
  47. package/dist/routes/scheduler/schedulersRoutes.js.map +1 -0
  48. package/dist/schema/middleware/route/index.d.ts +2 -0
  49. package/dist/schema/middleware/route/index.js +3 -1
  50. package/dist/schema/middleware/route/index.js.map +1 -1
  51. package/dist/schema/middleware/route/schemaSchedulerLog.d.ts +4 -0
  52. package/dist/schema/middleware/route/schemaSchedulerLog.js +10 -0
  53. package/dist/schema/middleware/route/schemaSchedulerLog.js.map +1 -0
  54. package/dist/schema/payload/index.d.ts +2 -0
  55. package/dist/schema/payload/index.js +4 -1
  56. package/dist/schema/payload/index.js.map +1 -1
  57. package/dist/schema/payload/scheduler/schemaSchedulerLog.d.ts +267 -0
  58. package/dist/schema/payload/scheduler/schemaSchedulerLog.js +48 -0
  59. package/dist/schema/payload/scheduler/schemaSchedulerLog.js.map +1 -0
  60. package/dist/services/access_control/AccessControlService.js +2 -2
  61. package/dist/services/access_control/AccessControlService.js.map +1 -1
  62. package/dist/services/auth/AuthService.js +14 -2
  63. package/dist/services/auth/AuthService.js.map +1 -1
  64. package/dist/services/file/FileService.js +56 -50
  65. package/dist/services/file/FileService.js.map +1 -1
  66. package/dist/services/gateway/SmtpEmailService.js +12 -6
  67. package/dist/services/gateway/SmtpEmailService.js.map +1 -1
  68. package/dist/services/index.d.ts +2 -0
  69. package/dist/services/index.js +4 -1
  70. package/dist/services/index.js.map +1 -1
  71. package/dist/services/reset_password/ResetPasswordService.js +18 -12
  72. package/dist/services/reset_password/ResetPasswordService.js.map +1 -1
  73. package/dist/services/scheduler/SchedulerLogService.d.ts +101 -0
  74. package/dist/services/scheduler/SchedulerLogService.js +146 -0
  75. package/dist/services/scheduler/SchedulerLogService.js.map +1 -0
  76. package/dist/services/user/UserMeService.js +12 -3
  77. package/dist/services/user/UserMeService.js.map +1 -1
  78. package/dist/utils/featureUtils.d.ts +5 -0
  79. package/dist/utils/featureUtils.js +3 -0
  80. package/dist/utils/featureUtils.js.map +1 -0
  81. package/dist/utils/index.d.ts +1 -0
  82. package/dist/utils/index.js.map +1 -1
  83. package/dist/utils/serviceUtils.d.ts +2 -18
  84. package/dist/utils/serviceUtils.js +0 -1
  85. package/dist/utils/serviceUtils.js.map +1 -1
  86. package/package.json +1 -1
  87. package/prisma/schema.prisma +30 -0
@@ -0,0 +1,2 @@
1
+ import { Router } from "express";
2
+ export declare const schedulersRoutes: Router;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schedulersRoutes = void 0;
4
+ const express_1 = require("express");
5
+ const router = (0, express_1.Router)();
6
+ const schedulerLogRoutes_1 = require("./schedulerLogRoutes");
7
+ const schedulerLogsRoutes_1 = require("./schedulerLogsRoutes");
8
+ /** scheduler logs - Merge Scheduler Logs Routes */
9
+ router.use(["/log"], schedulerLogRoutes_1.schedulerLogRoutes);
10
+ router.use(["/logs"], schedulerLogsRoutes_1.schedulerLogsRoutes);
11
+ exports.schedulersRoutes = router;
12
+ //# sourceMappingURL=schedulersRoutes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedulersRoutes.js","sourceRoot":"","sources":["../../../src/routes/scheduler/schedulersRoutes.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAEjC,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;AAExB,6DAAyD;AACzD,+DAA2D;AAE3D,mDAAmD;AACnD,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,uCAAkB,CAAC,CAAA;AACxC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,yCAAmB,CAAC,CAAA;AAE7B,QAAA,gBAAgB,GAAW,MAAM,CAAA","sourcesContent":["import { Router } from \"express\";\n\nconst router = Router();\n\nimport { schedulerLogRoutes } from \"./schedulerLogRoutes\"\nimport { schedulerLogsRoutes } from \"./schedulerLogsRoutes\"\n\n/** scheduler logs - Merge Scheduler Logs Routes */\nrouter.use([\"/log\"], schedulerLogRoutes)\nrouter.use([\"/logs\"], schedulerLogsRoutes)\n\nexport const schedulersRoutes: Router = router\n"]}
@@ -2,6 +2,7 @@ export { schemaRouteDocumentList } from "./schemaDocument";
2
2
  export { schemaRouteRepositoryList } from "./schemaRepository";
3
3
  export { schemaRouteUserList } from "./schemaUser";
4
4
  export { schemaRouteBusinessList } from "./schemaBusiness";
5
+ export { schemaRouteSchedulerLogList } from "./schemaSchedulerLog";
5
6
  export { schemaRouteAccessKeyList } from "./schemaAccessKey";
6
7
  export { schemaRouteOneTimeCodeList } from "./schemaOneTimeCode";
7
8
  export { schemaRouteAccountList } from "./schemaAccount";
@@ -20,6 +21,7 @@ export type { SchemaRouteAccountList } from "./schemaAccount";
20
21
  export type { SchemaRouteSubscriptionPlanList } from "./schemaSubscriptionPlan";
21
22
  export type { SchemaRouteSubscriptionAccountList } from "./schemaSubscriptionAccount";
22
23
  export type { SchemaRouteBusinessList } from "./schemaBusiness";
24
+ export type { SchemaRouteSchedulerLogList } from "./schemaSchedulerLog";
23
25
  export type { SchemaRouteAccessKeyList } from "./schemaAccessKey";
24
26
  export type { SchemaRouteOneTimeCodeList } from "./schemaOneTimeCode";
25
27
  export type { SchemaRouteUserBranchList } from "./schemaUserBranch";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.schemaRouteAccessControlListPolicyOptions = exports.schemaQueryList = exports.schemaRouteRegionList = exports.schemaRouteLocationList = exports.schemaRouteFileList = exports.schemaRouteItemList = exports.schemaRouteUserBranchList = exports.schemaRouteSubscriptionAccountList = exports.schemaRouteSubscriptionPlanList = exports.schemaRouteAccountList = exports.schemaRouteOneTimeCodeList = exports.schemaRouteAccessKeyList = exports.schemaRouteBusinessList = exports.schemaRouteUserList = exports.schemaRouteRepositoryList = exports.schemaRouteDocumentList = void 0;
3
+ exports.schemaRouteAccessControlListPolicyOptions = exports.schemaQueryList = exports.schemaRouteRegionList = exports.schemaRouteLocationList = exports.schemaRouteFileList = exports.schemaRouteItemList = exports.schemaRouteUserBranchList = exports.schemaRouteSubscriptionAccountList = exports.schemaRouteSubscriptionPlanList = exports.schemaRouteAccountList = exports.schemaRouteOneTimeCodeList = exports.schemaRouteAccessKeyList = exports.schemaRouteSchedulerLogList = exports.schemaRouteBusinessList = exports.schemaRouteUserList = exports.schemaRouteRepositoryList = exports.schemaRouteDocumentList = void 0;
4
4
  var schemaDocument_1 = require("./schemaDocument");
5
5
  Object.defineProperty(exports, "schemaRouteDocumentList", { enumerable: true, get: function () { return schemaDocument_1.schemaRouteDocumentList; } });
6
6
  var schemaRepository_1 = require("./schemaRepository");
@@ -9,6 +9,8 @@ var schemaUser_1 = require("./schemaUser");
9
9
  Object.defineProperty(exports, "schemaRouteUserList", { enumerable: true, get: function () { return schemaUser_1.schemaRouteUserList; } });
10
10
  var schemaBusiness_1 = require("./schemaBusiness");
11
11
  Object.defineProperty(exports, "schemaRouteBusinessList", { enumerable: true, get: function () { return schemaBusiness_1.schemaRouteBusinessList; } });
12
+ var schemaSchedulerLog_1 = require("./schemaSchedulerLog");
13
+ Object.defineProperty(exports, "schemaRouteSchedulerLogList", { enumerable: true, get: function () { return schemaSchedulerLog_1.schemaRouteSchedulerLogList; } });
12
14
  var schemaAccessKey_1 = require("./schemaAccessKey");
13
15
  Object.defineProperty(exports, "schemaRouteAccessKeyList", { enumerable: true, get: function () { return schemaAccessKey_1.schemaRouteAccessKeyList; } });
14
16
  var schemaOneTimeCode_1 = require("./schemaOneTimeCode");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/middleware/route/index.ts"],"names":[],"mappings":";;;AAAA,mDAA0D;AAAjD,yHAAA,uBAAuB,OAAA;AAChC,uDAA8D;AAArD,6HAAA,yBAAyB,OAAA;AAClC,2CAAkD;AAAzC,iHAAA,mBAAmB,OAAA;AAC5B,mDAA0D;AAAjD,yHAAA,uBAAuB,OAAA;AAChC,qDAA4D;AAAnD,2HAAA,wBAAwB,OAAA;AACjC,yDAAgE;AAAvD,+HAAA,0BAA0B,OAAA;AACnC,iDAAwD;AAA/C,uHAAA,sBAAsB,OAAA;AAC/B,mEAA0E;AAAjE,yIAAA,+BAA+B,OAAA;AACxC,yEAAgF;AAAvE,+IAAA,kCAAkC,OAAA;AAC3C,uDAA8D;AAArD,6HAAA,yBAAyB,OAAA;AAClC,2CAAkD;AAAzC,iHAAA,mBAAmB,OAAA;AAC5B,2CAAkD;AAAzC,iHAAA,mBAAmB,OAAA;AAC5B,mDAA0D;AAAjD,yHAAA,uBAAuB,OAAA;AAChC,+CAAsD;AAA7C,qHAAA,qBAAqB,OAAA;AAC9B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,6DAAiF;AAAxE,gJAAA,yCAAyC,OAAA","sourcesContent":["export { schemaRouteDocumentList } from \"./schemaDocument\"\nexport { schemaRouteRepositoryList } from \"./schemaRepository\"\nexport { schemaRouteUserList } from \"./schemaUser\"\nexport { schemaRouteBusinessList } from \"./schemaBusiness\"\nexport { schemaRouteAccessKeyList } from \"./schemaAccessKey\"\nexport { schemaRouteOneTimeCodeList } from \"./schemaOneTimeCode\"\nexport { schemaRouteAccountList } from \"./schemaAccount\"\nexport { schemaRouteSubscriptionPlanList } from \"./schemaSubscriptionPlan\"\nexport { schemaRouteSubscriptionAccountList } from \"./schemaSubscriptionAccount\"\nexport { schemaRouteUserBranchList } from \"./schemaUserBranch\"\nexport { schemaRouteItemList } from \"./schemaItem\"\nexport { schemaRouteFileList } from \"./schemaFile\"\nexport { schemaRouteLocationList } from \"./schemaLocation\"\nexport { schemaRouteRegionList } from \"./schemaRegion\"\nexport { schemaQueryList } from \"./schemaQueryList\"\nexport { schemaRouteAccessControlListPolicyOptions } from \"./schemaAccessControl\"\n\nexport type { QueryList } from \"./schemaQueryList\"\nexport type { SchemaRouteUserList } from \"./schemaUser\"\nexport type { SchemaRouteAccountList } from \"./schemaAccount\"\nexport type { SchemaRouteSubscriptionPlanList } from \"./schemaSubscriptionPlan\"\nexport type { SchemaRouteSubscriptionAccountList } from \"./schemaSubscriptionAccount\"\nexport type { SchemaRouteBusinessList } from \"./schemaBusiness\"\nexport type { SchemaRouteAccessKeyList } from \"./schemaAccessKey\"\nexport type { SchemaRouteOneTimeCodeList } from \"./schemaOneTimeCode\"\nexport type { SchemaRouteUserBranchList } from \"./schemaUserBranch\"\nexport type { SchemaRouteItemList } from \"./schemaItem\"\nexport type { SchemaRouteFileList } from \"./schemaFile\"\nexport type { SchemaRouteRegionList } from \"./schemaRegion\"\nexport type { SchemaRouteDocumentList } from \"./schemaDocument\"\nexport type { SchemaRouteRepositoryList } from \"./schemaRepository\"\nexport type { SchemaRouteAccessControlListPolicyOptions } from \"./schemaAccessControl\""]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/middleware/route/index.ts"],"names":[],"mappings":";;;AAAA,mDAA0D;AAAjD,yHAAA,uBAAuB,OAAA;AAChC,uDAA8D;AAArD,6HAAA,yBAAyB,OAAA;AAClC,2CAAkD;AAAzC,iHAAA,mBAAmB,OAAA;AAC5B,mDAA0D;AAAjD,yHAAA,uBAAuB,OAAA;AAChC,2DAAkE;AAAzD,iIAAA,2BAA2B,OAAA;AACpC,qDAA4D;AAAnD,2HAAA,wBAAwB,OAAA;AACjC,yDAAgE;AAAvD,+HAAA,0BAA0B,OAAA;AACnC,iDAAwD;AAA/C,uHAAA,sBAAsB,OAAA;AAC/B,mEAA0E;AAAjE,yIAAA,+BAA+B,OAAA;AACxC,yEAAgF;AAAvE,+IAAA,kCAAkC,OAAA;AAC3C,uDAA8D;AAArD,6HAAA,yBAAyB,OAAA;AAClC,2CAAkD;AAAzC,iHAAA,mBAAmB,OAAA;AAC5B,2CAAkD;AAAzC,iHAAA,mBAAmB,OAAA;AAC5B,mDAA0D;AAAjD,yHAAA,uBAAuB,OAAA;AAChC,+CAAsD;AAA7C,qHAAA,qBAAqB,OAAA;AAC9B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,6DAAiF;AAAxE,gJAAA,yCAAyC,OAAA","sourcesContent":["export { schemaRouteDocumentList } from \"./schemaDocument\"\nexport { schemaRouteRepositoryList } from \"./schemaRepository\"\nexport { schemaRouteUserList } from \"./schemaUser\"\nexport { schemaRouteBusinessList } from \"./schemaBusiness\"\nexport { schemaRouteSchedulerLogList } from \"./schemaSchedulerLog\"\nexport { schemaRouteAccessKeyList } from \"./schemaAccessKey\"\nexport { schemaRouteOneTimeCodeList } from \"./schemaOneTimeCode\"\nexport { schemaRouteAccountList } from \"./schemaAccount\"\nexport { schemaRouteSubscriptionPlanList } from \"./schemaSubscriptionPlan\"\nexport { schemaRouteSubscriptionAccountList } from \"./schemaSubscriptionAccount\"\nexport { schemaRouteUserBranchList } from \"./schemaUserBranch\"\nexport { schemaRouteItemList } from \"./schemaItem\"\nexport { schemaRouteFileList } from \"./schemaFile\"\nexport { schemaRouteLocationList } from \"./schemaLocation\"\nexport { schemaRouteRegionList } from \"./schemaRegion\"\nexport { schemaQueryList } from \"./schemaQueryList\"\nexport { schemaRouteAccessControlListPolicyOptions } from \"./schemaAccessControl\"\n\nexport type { QueryList } from \"./schemaQueryList\"\nexport type { SchemaRouteUserList } from \"./schemaUser\"\nexport type { SchemaRouteAccountList } from \"./schemaAccount\"\nexport type { SchemaRouteSubscriptionPlanList } from \"./schemaSubscriptionPlan\"\nexport type { SchemaRouteSubscriptionAccountList } from \"./schemaSubscriptionAccount\"\nexport type { SchemaRouteBusinessList } from \"./schemaBusiness\"\nexport type { SchemaRouteSchedulerLogList } from \"./schemaSchedulerLog\"\nexport type { SchemaRouteAccessKeyList } from \"./schemaAccessKey\"\nexport type { SchemaRouteOneTimeCodeList } from \"./schemaOneTimeCode\"\nexport type { SchemaRouteUserBranchList } from \"./schemaUserBranch\"\nexport type { SchemaRouteItemList } from \"./schemaItem\"\nexport type { SchemaRouteFileList } from \"./schemaFile\"\nexport type { SchemaRouteRegionList } from \"./schemaRegion\"\nexport type { SchemaRouteDocumentList } from \"./schemaDocument\"\nexport type { SchemaRouteRepositoryList } from \"./schemaRepository\"\nexport type { SchemaRouteAccessControlListPolicyOptions } from \"./schemaAccessControl\""]}
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ /** Route Parameters */
3
+ export declare const schemaRouteSchedulerLogList: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
4
+ export type SchemaRouteSchedulerLogList = z.infer<typeof schemaRouteSchedulerLogList>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schemaRouteSchedulerLogList = void 0;
4
+ const zod_1 = require("zod");
5
+ /** Route Parameters */
6
+ exports.schemaRouteSchedulerLogList = zod_1.z.object({
7
+ // userType: z
8
+ // .enum(["administrator", "customer", "worker", "retailer"])
9
+ });
10
+ //# sourceMappingURL=schemaSchedulerLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaSchedulerLog.js","sourceRoot":"","sources":["../../../../src/schema/middleware/route/schemaSchedulerLog.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,uBAAuB;AACV,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;AAChD,cAAc;AACd,iEAAiE;CACpE,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\n/** Route Parameters */\nexport const schemaRouteSchedulerLogList = z.object({\n // userType: z\n // .enum([\"administrator\", \"customer\", \"worker\", \"retailer\"])\n});\n\nexport type SchemaRouteSchedulerLogList = z.infer<typeof schemaRouteSchedulerLogList>;"]}
@@ -74,5 +74,7 @@ export { schemaRegionStateCreatePayload, schemaRegionStateDeletePayload, schemaR
74
74
  export type { SchemaRegionStateCreatePayload, SchemaRegionStateDeletePayload } from "./region/schemaRegionState";
75
75
  export { schemaRegionAreaCreatePayload, schemaRegionAreaDeletePayload, schemaRegionAreaUpdatePayload, } from "./region/schemaRegionArea";
76
76
  export type { SchemaRegionAreaCreatePayload, SchemaRegionAreaDeletePayload, SchemaRegionAreaUpdatePayload } from "./region/schemaRegionArea";
77
+ export { schemaSchedulerLogCreatePayload, schemaSchedulerLogDeletePayload } from "./scheduler/schemaSchedulerLog";
78
+ export type { SchemaSchedulerLogCreatePayload, SchedulerLogFlowTypeEnum, SchemaSchedulerLogDeletePayload } from "./scheduler/schemaSchedulerLog";
77
79
  export { schemaAccessKeyUtilValidatePayload, schemaAccessKeyUtilAccountOwnerPayload } from "./utils/schemaAccessKeyUtil";
78
80
  export type { SchemaAccessKeyUtilValidatePayload, SchemaAccessKeyUtilAccountOwnerPayload } from "./utils/schemaAccessKeyUtil";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schemaDocumentDeliveryOrderUpdatePayload = exports.schemaDocumentDeliveryOrderCreatePayload = exports.schemaDocumentProformaSalesUpdatePayload = exports.schemaDocumentProformaSalesCreatePayload = exports.schemaDocumentSalesOrderUpdatePayload = exports.schemaDocumentSalesOrderCreatePayload = exports.eNumDocumentTypes = exports.schemaDocumentDeletePayload = exports.schemaFileDeletePayload = exports.schemaFileUploadPayload = exports.schemaUserAgentUpdatePayload = exports.schemaUserAgentCreatePayload = exports.schemaUserMemberUpdatePayload = exports.schemaUserMemberCreatePayload = exports.schemaUserDriverUpdatePayload = exports.schemaUserDriverCreatePayload = exports.schemaUserWorkerUpdatePayload = exports.schemaUserWorkerCreatePayload = exports.schemaUserAdministratorUpdatePayload = exports.schemaUserAdministratorCreatePayload = exports.schemaUserRetailerUpdatePayload = exports.schemaUserRetailerCreatePayload = exports.schemaUserCustomerUpdatePayload = exports.schemaUserCustomerCreatePayload = exports.schemaUserOperatorUpdatePayload = exports.schemaUserOperatorCreatePayload = exports.schemaUserMeUpdatePayload = exports.schemaUserMeChangePasswordPayload = exports.schemaUserCredential = exports.schemaUserDeletePayload = exports.schemaAccountSubscribeCancelPayload = exports.schemaAccountSubscribeCreatePayload = exports.schemaSubscribePlanDeletePayload = exports.schemaSubscribePlanUpdatePayload = exports.schemaSubscribePlanCreatePayload = exports.schemaBusinessDeletePayload = exports.schemaBusinessUpdatePayload = exports.schemaBusiness = exports.schemaBusinessCreatePayload = exports.schemaAccountDeletePayload = exports.schemaAccountUpdatePayload = exports.schemaAccountCreatePayload = exports.schemaResetPasswordPerformPayload = exports.schemaResetPasswordValidateCodePayload = exports.schemaResetPasswordRequestPayload = exports.schemaAccessKeyRevokePayload = exports.schemaAccessKeyCreatePayload = exports.schemaAuthTokenOperatorPayload = exports.schemaAuthTokenOptionalAccountPayload = exports.schemaAuthTokenPayload = void 0;
4
- exports.schemaAccessKeyUtilAccountOwnerPayload = exports.schemaAccessKeyUtilValidatePayload = exports.schemaRegionAreaUpdatePayload = exports.schemaRegionAreaDeletePayload = exports.schemaRegionAreaCreatePayload = exports.schemaRegionStateUpdatePayload = exports.schemaRegionStateDeletePayload = exports.schemaRegionStateCreatePayload = exports.schemaRegionCountryDeletePayload = exports.schemaRegionCountryUpdatePayload = exports.schemaRegionCountryCreatePayload = exports.schemaInjectionFieldDeletePayload = exports.schemaInjectionFieldCreatePayload = exports.schemaInjectionFieldReplacePayload = exports.schemaSlot = exports.schemaLocationSlotDeletePayload = exports.schemaLocationSlotUpdatePayload = exports.schemaLocationSlotCreatePayload = exports.schemaLocationRackDeletePayload = exports.schemaLocationRackUpdatePayload = exports.schemaLocationRackCreatePayload = exports.schemaLocationLocationDeletePayload = exports.schemaLocationLocationUpdatePayload = exports.schemaLocationLocationCreatePayload = exports.schemaItemUomUpdatePayload = exports.schemaItemUomCreatePayload = exports.schemaItemBrandUpdatePayload = exports.schemaItemBrandCreatePayload = exports.schemaItemCategoryUpdatePayload = exports.schemaItemCategoryCreatePayload = exports.schemaItemItem = exports.schemaItemItemUpdatePayload = exports.schemaItemItemCreatePayload = exports.schemaItemProductUpdatePayload = exports.schemaItemProductCreatePayload = exports.schemaItemDeletePayload = exports.schemaDocumentTripOrderUpdatePayload = exports.schemaDocumentTripOrderCreatePayload = exports.schemaDocumentCashSalesUpdatePayload = exports.schemaDocumentCashSalesCreatePayload = exports.schemaDocumentReplacementDeliveryOrderUpdatePayload = exports.schemaDocumentReplacementDeliveryOrderCreatePayload = void 0;
4
+ exports.schemaAccessKeyUtilAccountOwnerPayload = exports.schemaAccessKeyUtilValidatePayload = exports.schemaSchedulerLogDeletePayload = exports.schemaSchedulerLogCreatePayload = exports.schemaRegionAreaUpdatePayload = exports.schemaRegionAreaDeletePayload = exports.schemaRegionAreaCreatePayload = exports.schemaRegionStateUpdatePayload = exports.schemaRegionStateDeletePayload = exports.schemaRegionStateCreatePayload = exports.schemaRegionCountryDeletePayload = exports.schemaRegionCountryUpdatePayload = exports.schemaRegionCountryCreatePayload = exports.schemaInjectionFieldDeletePayload = exports.schemaInjectionFieldCreatePayload = exports.schemaInjectionFieldReplacePayload = exports.schemaSlot = exports.schemaLocationSlotDeletePayload = exports.schemaLocationSlotUpdatePayload = exports.schemaLocationSlotCreatePayload = exports.schemaLocationRackDeletePayload = exports.schemaLocationRackUpdatePayload = exports.schemaLocationRackCreatePayload = exports.schemaLocationLocationDeletePayload = exports.schemaLocationLocationUpdatePayload = exports.schemaLocationLocationCreatePayload = exports.schemaItemUomUpdatePayload = exports.schemaItemUomCreatePayload = exports.schemaItemBrandUpdatePayload = exports.schemaItemBrandCreatePayload = exports.schemaItemCategoryUpdatePayload = exports.schemaItemCategoryCreatePayload = exports.schemaItemItem = exports.schemaItemItemUpdatePayload = exports.schemaItemItemCreatePayload = exports.schemaItemProductUpdatePayload = exports.schemaItemProductCreatePayload = exports.schemaItemDeletePayload = exports.schemaDocumentTripOrderUpdatePayload = exports.schemaDocumentTripOrderCreatePayload = exports.schemaDocumentCashSalesUpdatePayload = exports.schemaDocumentCashSalesCreatePayload = exports.schemaDocumentReplacementDeliveryOrderUpdatePayload = exports.schemaDocumentReplacementDeliveryOrderCreatePayload = void 0;
5
5
  var schemaAuthToken_1 = require("./auth/schemaAuthToken");
6
6
  Object.defineProperty(exports, "schemaAuthTokenPayload", { enumerable: true, get: function () { return schemaAuthToken_1.schemaAuthTokenPayload; } });
7
7
  Object.defineProperty(exports, "schemaAuthTokenOptionalAccountPayload", { enumerable: true, get: function () { return schemaAuthToken_1.schemaAuthTokenOptionalAccountPayload; } });
@@ -130,6 +130,9 @@ var schemaRegionArea_1 = require("./region/schemaRegionArea");
130
130
  Object.defineProperty(exports, "schemaRegionAreaCreatePayload", { enumerable: true, get: function () { return schemaRegionArea_1.schemaRegionAreaCreatePayload; } });
131
131
  Object.defineProperty(exports, "schemaRegionAreaDeletePayload", { enumerable: true, get: function () { return schemaRegionArea_1.schemaRegionAreaDeletePayload; } });
132
132
  Object.defineProperty(exports, "schemaRegionAreaUpdatePayload", { enumerable: true, get: function () { return schemaRegionArea_1.schemaRegionAreaUpdatePayload; } });
133
+ var schemaSchedulerLog_1 = require("./scheduler/schemaSchedulerLog");
134
+ Object.defineProperty(exports, "schemaSchedulerLogCreatePayload", { enumerable: true, get: function () { return schemaSchedulerLog_1.schemaSchedulerLogCreatePayload; } });
135
+ Object.defineProperty(exports, "schemaSchedulerLogDeletePayload", { enumerable: true, get: function () { return schemaSchedulerLog_1.schemaSchedulerLogDeletePayload; } });
133
136
  // export { schemaChangePasswordUtilPayload } from "./utils/unuse/schemaChangePasswordUtil";
134
137
  // export type { SchemaChangePasswordUtilPayload } from "./utils/unuse/schemaChangePasswordUtil";
135
138
  var schemaAccessKeyUtil_1 = require("./utils/schemaAccessKeyUtil");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/payload/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAuI;AAA9H,yHAAA,sBAAsB,OAAA;AAAE,wIAAA,qCAAqC,OAAA;AAAE,iIAAA,8BAA8B,OAAA;AAGtG,gEAA0G;AAAjG,+HAAA,4BAA4B,OAAA;AAAE,+HAAA,4BAA4B,OAAA;AAGnE,4EAAoK;AAA3J,wIAAA,iCAAiC,OAAA;AAAE,6IAAA,sCAAsC,OAAA;AAAE,wIAAA,iCAAiC,OAAA;AAGrH,yDAA6H;AAApH,2HAAA,0BAA0B,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AAG3F,4DAAkJ;AAAzI,6HAAA,2BAA2B,OAAA;AAAE,gHAAA,cAAc,OAAA;AAAE,6HAAA,2BAA2B,OAAA;AAAE,6HAAA,2BAA2B,OAAA;AAG9G,0EAA0J;AAAjJ,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAE7G,gFAAiI;AAAxH,6IAAA,mCAAmC,OAAA;AAAE,6IAAA,mCAAmC,OAAA;AAGjF,gDAAkF;AAAzE,qHAAA,uBAAuB,OAAA;AAAE,kHAAA,oBAAoB,OAAA;AAEtD,oDAAmG;AAA1F,iIAAA,iCAAiC,OAAA;AAAE,yHAAA,yBAAyB,OAAA;AAErE,gEAA6G;AAApG,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAEzE,gEAA6G;AAApG,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAA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6G;AAApG,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAEzE,0DAAoG;AAA3F,+HAAA,4BAA4B,OAAA;AAAE,+HAAA,4BAA4B,OAAA;AAEnE,sDAA8F;AAArF,2HAAA,0BAA0B,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AAG/D,4EAAmK;AAA1J,6IAAA,mCAAmC,OAAA;AAAE,6IAAA,mCAAmC,OAAA;AAAE,6IAAA,mCAAmC,OAAA;AAEtH,oEAAmJ;AAA1I,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAE1G,oEAA8J;AAArJ,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAAE,gHAAA,UAAU,OAAA;AAGtH,+EAAkK;AAAzJ,0IAAA,kCAAkC,OAAA;AAAE,yIAAA,iCAAiC,OAAA;AAAE,yIAAA,iCAAiC,OAAA;AAGjH,oEAAoJ;AAA3I,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAE7G,gEAA4I;AAAnI,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAEvG,8DAAyI;AAAhI,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAGpG,4FAA4F;AAC5F,iGAAiG;AACjG,mEAAyH;AAAhH,yIAAA,kCAAkC,OAAA;AAAE,6IAAA,sCAAsC,OAAA","sourcesContent":["export { schemaAuthTokenPayload, schemaAuthTokenOptionalAccountPayload, schemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\nexport type { SchemaAuthTokenPayload, SchemaAuthTokenOptionalAccountPayload, SchemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\n\nexport { schemaAccessKeyCreatePayload, schemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\nexport type { SchemaAccessKeyCreatePayload, SchemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\n\nexport { schemaResetPasswordRequestPayload, schemaResetPasswordValidateCodePayload, schemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\nexport type { SchemaResetPasswordRequestPayload, SchemaResetPasswordValidateCodePayload, SchemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\n\nexport { schemaAccountCreatePayload, schemaAccountUpdatePayload, schemaAccountDeletePayload } from \"./account/schemaAccount\";\nexport type { SchemaAccountCreatePayload, SchemaAccountUpdatePayload, SchemaAccountDeletePayload } from \"./account/schemaAccount\";\n\nexport { schemaBusinessCreatePayload, schemaBusiness, schemaBusinessUpdatePayload, schemaBusinessDeletePayload } from \"./business/schemaBusiness\";\nexport type { SchemaBusinessCreatePayload, SchemaBusinessUpdatePayload, SchemaBusinessDeletePayload } from \"./business/schemaBusiness\";\n\nexport { schemaSubscribePlanCreatePayload, schemaSubscribePlanUpdatePayload, schemaSubscribePlanDeletePayload } from \"./subscription/schemaSubscribePlan\";\nexport type { SchemaSubscribePlanCreatePayload, SchemaSubscribePlanUpdatePayload, SchemaSubscribePlanDeletePayload } from \"./subscription/schemaSubscribePlan\";\nexport { schemaAccountSubscribeCreatePayload, schemaAccountSubscribeCancelPayload } from \"./subscription/schemaAccountSubscribe\";\nexport type { SchemaAccountSubscribeCreatePayload, SchemaAccountSubscribeCancelPayload } from \"./subscription/schemaAccountSubscribe\";\n\nexport { schemaUserDeletePayload, schemaUserCredential } from \"./user/schemaUser\";\nexport type { SchemaUserDeletePayload } from \"./user/schemaUser\";\nexport { schemaUserMeChangePasswordPayload, schemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport type { SchemaUserMeChangePasswordPayload, SchemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport { schemaUserOperatorCreatePayload, schemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport type { SchemaUserOperatorCreatePayload, SchemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport { schemaUserCustomerCreatePayload, schemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport type { SchemaUserCustomerCreatePayload, SchemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport { schemaUserRetailerCreatePayload, schemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport type { SchemaUserRetailerCreatePayload, SchemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport { schemaUserAdministratorCreatePayload, schemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport type { SchemaUserAdministratorCreatePayload, SchemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport { schemaUserWorkerCreatePayload, schemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport type { SchemaUserWorkerCreatePayload, SchemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport { schemaUserDriverCreatePayload, schemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport type { SchemaUserDriverCreatePayload, SchemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport { schemaUserMemberCreatePayload, schemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport type { SchemaUserMemberCreatePayload, SchemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport { schemaUserAgentCreatePayload, schemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\nexport type { SchemaUserAgentCreatePayload, SchemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\n\nexport { schemaFileUploadPayload, schemaFileDeletePayload } from \"./file/schemaFile\";\nexport type { SchemaFileUploadPayload, SchemaFileDeletePayload } from \"./file/schemaFile\";\n\nexport { schemaDocumentDeletePayload, eNumDocumentTypes } from \"./document/schemaDocument\";\nexport type { SchemaDocumentDeletePayload } from \"./document/schemaDocument\";\nexport { schemaDocumentSalesOrderCreatePayload, schemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport type { SchemaDocumentSalesOrderCreatePayload, SchemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport { schemaDocumentProformaSalesCreatePayload, schemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport type { SchemaDocumentProformaSalesCreatePayload, SchemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport { schemaDocumentDeliveryOrderCreatePayload, schemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport type { SchemaDocumentDeliveryOrderCreatePayload, SchemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport { schemaDocumentReplacementDeliveryOrderCreatePayload, schemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport type { SchemaDocumentReplacementDeliveryOrderCreatePayload, SchemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport { schemaDocumentCashSalesCreatePayload, schemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport type { SchemaDocumentCashSalesCreatePayload, SchemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport { schemaDocumentTripOrderCreatePayload, schemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\nexport type { SchemaDocumentTripOrderCreatePayload, SchemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\n\nexport { schemaItemDeletePayload } from \"./item/schemaItem\";\nexport type { SchemaItemDeletePayload } from \"./item/schemaItem\";\nexport { schemaItemProductCreatePayload, schemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport type { SchemaItemProductCreatePayload, SchemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport { schemaItemItemCreatePayload, schemaItemItemUpdatePayload, schemaItemItem } from \"./item/schemaItemItem\";\nexport type { SchemaItemItemCreatePayload, SchemaItemItemUpdatePayload } from \"./item/schemaItemItem\";\nexport { schemaItemCategoryCreatePayload, schemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport type { SchemaItemCategoryCreatePayload, SchemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport { schemaItemBrandCreatePayload, schemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport type { SchemaItemBrandCreatePayload, SchemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport { schemaItemUomCreatePayload, schemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\nexport type { SchemaItemUomCreatePayload, SchemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\n\nexport { schemaLocationLocationCreatePayload, schemaLocationLocationUpdatePayload, schemaLocationLocationDeletePayload, } from \"./location/schemaLocationLocation\";\nexport type { SchemaLocationLocationCreatePayload, SchemaLocationLocationUpdatePayload, SchemaLocationLocationDeletePayload } from \"./location/schemaLocationLocation\";\nexport { schemaLocationRackCreatePayload, schemaLocationRackUpdatePayload, schemaLocationRackDeletePayload, } from \"./location/schemaLocationRack\";\nexport type { SchemaLocationRackCreatePayload, SchemaLocationRackUpdatePayload, SchemaLocationRackDeletePayload } from \"./location/schemaLocationRack\";\nexport { schemaLocationSlotCreatePayload, schemaLocationSlotUpdatePayload, schemaLocationSlotDeletePayload, schemaSlot } from \"./location/schemaLocationSlot\";\nexport type { SchemaLocationSlotCreatePayload, SchemaLocationSlotUpdatePayload, SchemaLocationSlotDeletePayload } from \"./location/schemaLocationSlot\";\n\nexport { schemaInjectionFieldReplacePayload, schemaInjectionFieldCreatePayload, schemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\nexport type { SchemaInjectionFieldReplacePayload, SchemaInjectionFieldCreatePayload, SchemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\n\nexport { schemaRegionCountryCreatePayload, schemaRegionCountryUpdatePayload, schemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport type { SchemaRegionCountryCreatePayload, SchemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport { schemaRegionStateCreatePayload, schemaRegionStateDeletePayload, schemaRegionStateUpdatePayload } from \"./region/schemaRegionState\";\nexport type { SchemaRegionStateCreatePayload, SchemaRegionStateDeletePayload } from \"./region/schemaRegionState\";\nexport { schemaRegionAreaCreatePayload, schemaRegionAreaDeletePayload, schemaRegionAreaUpdatePayload, } from \"./region/schemaRegionArea\";\nexport type { SchemaRegionAreaCreatePayload, SchemaRegionAreaDeletePayload, SchemaRegionAreaUpdatePayload } from \"./region/schemaRegionArea\";\n\n// export { schemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\n// export type { SchemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\nexport { schemaAccessKeyUtilValidatePayload, schemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";\nexport type { SchemaAccessKeyUtilValidatePayload, SchemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/payload/index.ts"],"names":[],"mappings":";;;;AAAA,0DAAuI;AAA9H,yHAAA,sBAAsB,OAAA;AAAE,wIAAA,qCAAqC,OAAA;AAAE,iIAAA,8BAA8B,OAAA;AAGtG,gEAA0G;AAAjG,+HAAA,4BAA4B,OAAA;AAAE,+HAAA,4BAA4B,OAAA;AAGnE,4EAAoK;AAA3J,wIAAA,iCAAiC,OAAA;AAAE,6IAAA,sCAAsC,OAAA;AAAE,wIAAA,iCAAiC,OAAA;AAGrH,yDAA6H;AAApH,2HAAA,0BAA0B,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AAAE,2HAAA,0BAA0B,OAAA;AAG3F,4DAAkJ;AAAzI,6HAAA,2BA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AA,gCAAgC,OAAA;AAAE,uIAAA,gCAAgC,OAAA;AAE7G,gEAA4I;AAAnI,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAAE,mIAAA,8BAA8B,OAAA;AAEvG,8DAAyI;AAAhI,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAGpG,qEAAkH;AAAzG,qIAAA,+BAA+B,OAAA;AAAE,qIAAA,+BAA+B,OAAA;AAGzE,4FAA4F;AAC5F,iGAAiG;AACjG,mEAAyH;AAAhH,yIAAA,kCAAkC,OAAA;AAAE,6IAAA,sCAAsC,OAAA","sourcesContent":["export { schemaAuthTokenPayload, schemaAuthTokenOptionalAccountPayload, schemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\nexport type { SchemaAuthTokenPayload, SchemaAuthTokenOptionalAccountPayload, SchemaAuthTokenOperatorPayload } from \"./auth/schemaAuthToken\";\n\nexport { schemaAccessKeyCreatePayload, schemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\nexport type { SchemaAccessKeyCreatePayload, SchemaAccessKeyRevokePayload } from \"./access_key/schemaAccessKey\";\n\nexport { schemaResetPasswordRequestPayload, schemaResetPasswordValidateCodePayload, schemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\nexport type { SchemaResetPasswordRequestPayload, SchemaResetPasswordValidateCodePayload, SchemaResetPasswordPerformPayload } from \"./reset_password/schemaResetPassword\";\n\nexport { schemaAccountCreatePayload, schemaAccountUpdatePayload, schemaAccountDeletePayload } from \"./account/schemaAccount\";\nexport type { SchemaAccountCreatePayload, SchemaAccountUpdatePayload, SchemaAccountDeletePayload } from \"./account/schemaAccount\";\n\nexport { schemaBusinessCreatePayload, schemaBusiness, schemaBusinessUpdatePayload, schemaBusinessDeletePayload } from \"./business/schemaBusiness\";\nexport type { SchemaBusinessCreatePayload, SchemaBusinessUpdatePayload, SchemaBusinessDeletePayload } from \"./business/schemaBusiness\";\n\nexport { schemaSubscribePlanCreatePayload, schemaSubscribePlanUpdatePayload, schemaSubscribePlanDeletePayload } from \"./subscription/schemaSubscribePlan\";\nexport type { SchemaSubscribePlanCreatePayload, SchemaSubscribePlanUpdatePayload, SchemaSubscribePlanDeletePayload } from \"./subscription/schemaSubscribePlan\";\nexport { schemaAccountSubscribeCreatePayload, schemaAccountSubscribeCancelPayload } from \"./subscription/schemaAccountSubscribe\";\nexport type { SchemaAccountSubscribeCreatePayload, SchemaAccountSubscribeCancelPayload } from \"./subscription/schemaAccountSubscribe\";\n\nexport { schemaUserDeletePayload, schemaUserCredential } from \"./user/schemaUser\";\nexport type { SchemaUserDeletePayload } from \"./user/schemaUser\";\nexport { schemaUserMeChangePasswordPayload, schemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport type { SchemaUserMeChangePasswordPayload, SchemaUserMeUpdatePayload } from \"./user/schemaUserMe\";\nexport { schemaUserOperatorCreatePayload, schemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport type { SchemaUserOperatorCreatePayload, SchemaUserOperatorUpdatePayload } from \"./user/schemaUserOperator\";\nexport { schemaUserCustomerCreatePayload, schemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport type { SchemaUserCustomerCreatePayload, SchemaUserCustomerUpdatePayload } from \"./user/schemaUserCustomer\";\nexport { schemaUserRetailerCreatePayload, schemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport type { SchemaUserRetailerCreatePayload, SchemaUserRetailerUpdatePayload } from \"./user/schemaUserRetailer\";\nexport { schemaUserAdministratorCreatePayload, schemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport type { SchemaUserAdministratorCreatePayload, SchemaUserAdministratorUpdatePayload } from \"./user/schemaUserAdministrator\";\nexport { schemaUserWorkerCreatePayload, schemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport type { SchemaUserWorkerCreatePayload, SchemaUserWorkerUpdatePayload } from \"./user/schemaUserWorker\";\nexport { schemaUserDriverCreatePayload, schemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport type { SchemaUserDriverCreatePayload, SchemaUserDriverUpdatePayload } from \"./user/schemaUserDriver\";\nexport { schemaUserMemberCreatePayload, schemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport type { SchemaUserMemberCreatePayload, SchemaUserMemberUpdatePayload } from \"./user/schemaUserMember\";\nexport { schemaUserAgentCreatePayload, schemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\nexport type { SchemaUserAgentCreatePayload, SchemaUserAgentUpdatePayload } from \"./user/schemaUserAgent\";\n\nexport { schemaFileUploadPayload, schemaFileDeletePayload } from \"./file/schemaFile\";\nexport type { SchemaFileUploadPayload, SchemaFileDeletePayload } from \"./file/schemaFile\";\n\nexport { schemaDocumentDeletePayload, eNumDocumentTypes } from \"./document/schemaDocument\";\nexport type { SchemaDocumentDeletePayload } from \"./document/schemaDocument\";\nexport { schemaDocumentSalesOrderCreatePayload, schemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport type { SchemaDocumentSalesOrderCreatePayload, SchemaDocumentSalesOrderUpdatePayload } from \"./document/schemaDocumentSalesOrder\";\nexport { schemaDocumentProformaSalesCreatePayload, schemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport type { SchemaDocumentProformaSalesCreatePayload, SchemaDocumentProformaSalesUpdatePayload } from \"./document/schemaDocumentProformaSales\";\nexport { schemaDocumentDeliveryOrderCreatePayload, schemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport type { SchemaDocumentDeliveryOrderCreatePayload, SchemaDocumentDeliveryOrderUpdatePayload } from \"./document/schemaDocumentDeliveryOrder\";\nexport { schemaDocumentReplacementDeliveryOrderCreatePayload, schemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport type { SchemaDocumentReplacementDeliveryOrderCreatePayload, SchemaDocumentReplacementDeliveryOrderUpdatePayload } from \"./document/schemaDocumentReplacementDeliveryOrder\";\nexport { schemaDocumentCashSalesCreatePayload, schemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport type { SchemaDocumentCashSalesCreatePayload, SchemaDocumentCashSalesUpdatePayload } from \"./document/schemaDocumentCashSales\";\nexport { schemaDocumentTripOrderCreatePayload, schemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\nexport type { SchemaDocumentTripOrderCreatePayload, SchemaDocumentTripOrderUpdatePayload } from \"./document/schemaDocumentTripOrder\";\n\nexport { schemaItemDeletePayload } from \"./item/schemaItem\";\nexport type { SchemaItemDeletePayload } from \"./item/schemaItem\";\nexport { schemaItemProductCreatePayload, schemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport type { SchemaItemProductCreatePayload, SchemaItemProductUpdatePayload } from \"./item/schemaItemProduct\";\nexport { schemaItemItemCreatePayload, schemaItemItemUpdatePayload, schemaItemItem } from \"./item/schemaItemItem\";\nexport type { SchemaItemItemCreatePayload, SchemaItemItemUpdatePayload } from \"./item/schemaItemItem\";\nexport { schemaItemCategoryCreatePayload, schemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport type { SchemaItemCategoryCreatePayload, SchemaItemCategoryUpdatePayload } from \"./item/schemaItemCategory\";\nexport { schemaItemBrandCreatePayload, schemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport type { SchemaItemBrandCreatePayload, SchemaItemBrandUpdatePayload } from \"./item/schemaItemBrand\";\nexport { schemaItemUomCreatePayload, schemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\nexport type { SchemaItemUomCreatePayload, SchemaItemUomUpdatePayload } from \"./item/schemaItemUom\";\n\nexport { schemaLocationLocationCreatePayload, schemaLocationLocationUpdatePayload, schemaLocationLocationDeletePayload, } from \"./location/schemaLocationLocation\";\nexport type { SchemaLocationLocationCreatePayload, SchemaLocationLocationUpdatePayload, SchemaLocationLocationDeletePayload } from \"./location/schemaLocationLocation\";\nexport { schemaLocationRackCreatePayload, schemaLocationRackUpdatePayload, schemaLocationRackDeletePayload, } from \"./location/schemaLocationRack\";\nexport type { SchemaLocationRackCreatePayload, SchemaLocationRackUpdatePayload, SchemaLocationRackDeletePayload } from \"./location/schemaLocationRack\";\nexport { schemaLocationSlotCreatePayload, schemaLocationSlotUpdatePayload, schemaLocationSlotDeletePayload, schemaSlot } from \"./location/schemaLocationSlot\";\nexport type { SchemaLocationSlotCreatePayload, SchemaLocationSlotUpdatePayload, SchemaLocationSlotDeletePayload } from \"./location/schemaLocationSlot\";\n\nexport { schemaInjectionFieldReplacePayload, schemaInjectionFieldCreatePayload, schemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\nexport type { SchemaInjectionFieldReplacePayload, SchemaInjectionFieldCreatePayload, SchemaInjectionFieldDeletePayload } from \"./injection_field/schemaInjectionField\";\n\nexport { schemaRegionCountryCreatePayload, schemaRegionCountryUpdatePayload, schemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport type { SchemaRegionCountryCreatePayload, SchemaRegionCountryDeletePayload } from \"./region/schemaRegionCountry\";\nexport { schemaRegionStateCreatePayload, schemaRegionStateDeletePayload, schemaRegionStateUpdatePayload } from \"./region/schemaRegionState\";\nexport type { SchemaRegionStateCreatePayload, SchemaRegionStateDeletePayload } from \"./region/schemaRegionState\";\nexport { schemaRegionAreaCreatePayload, schemaRegionAreaDeletePayload, schemaRegionAreaUpdatePayload, } from \"./region/schemaRegionArea\";\nexport type { SchemaRegionAreaCreatePayload, SchemaRegionAreaDeletePayload, SchemaRegionAreaUpdatePayload } from \"./region/schemaRegionArea\";\n\nexport { schemaSchedulerLogCreatePayload, schemaSchedulerLogDeletePayload } from \"./scheduler/schemaSchedulerLog\";\nexport type { SchemaSchedulerLogCreatePayload, SchedulerLogFlowTypeEnum, SchemaSchedulerLogDeletePayload } from \"./scheduler/schemaSchedulerLog\";\n\n// export { schemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\n// export type { SchemaChangePasswordUtilPayload } from \"./utils/unuse/schemaChangePasswordUtil\";\nexport { schemaAccessKeyUtilValidatePayload, schemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";\nexport type { SchemaAccessKeyUtilValidatePayload, SchemaAccessKeyUtilAccountOwnerPayload } from \"./utils/schemaAccessKeyUtil\";"]}
@@ -0,0 +1,267 @@
1
+ import { z } from "zod";
2
+ export declare const SchedulerLogFlowTypeEnum: z.ZodEnum<["in", "out"]>;
3
+ export declare const schemaSchedulerLog: z.ZodObject<{
4
+ schedulerTaskId: z.ZodNumber;
5
+ flowType: z.ZodEnum<["in", "out"]>;
6
+ fieldRef: z.ZodString;
7
+ fieldModule: z.ZodString;
8
+ sourceType: z.ZodString;
9
+ sourceEntityId: z.ZodString;
10
+ sourceEntityLabel: z.ZodString;
11
+ sourceEntityData: z.ZodString;
12
+ destinationType: z.ZodString;
13
+ destinationEntityId: z.ZodString;
14
+ destinationEntityLabel: z.ZodString;
15
+ destinationSubmitPayload: z.ZodString;
16
+ destinationSubmitResponse: z.ZodString;
17
+ logAction: z.ZodString;
18
+ logLabel: z.ZodString;
19
+ logStatus: z.ZodBoolean;
20
+ logMessage: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ schedulerTaskId: number;
23
+ flowType: "in" | "out";
24
+ fieldRef: string;
25
+ fieldModule: string;
26
+ sourceType: string;
27
+ sourceEntityId: string;
28
+ sourceEntityLabel: string;
29
+ sourceEntityData: string;
30
+ destinationType: string;
31
+ destinationEntityId: string;
32
+ destinationEntityLabel: string;
33
+ destinationSubmitPayload: string;
34
+ destinationSubmitResponse: string;
35
+ logAction: string;
36
+ logLabel: string;
37
+ logStatus: boolean;
38
+ logMessage: string;
39
+ }, {
40
+ schedulerTaskId: number;
41
+ flowType: "in" | "out";
42
+ fieldRef: string;
43
+ fieldModule: string;
44
+ sourceType: string;
45
+ sourceEntityId: string;
46
+ sourceEntityLabel: string;
47
+ sourceEntityData: string;
48
+ destinationType: string;
49
+ destinationEntityId: string;
50
+ destinationEntityLabel: string;
51
+ destinationSubmitPayload: string;
52
+ destinationSubmitResponse: string;
53
+ logAction: string;
54
+ logLabel: string;
55
+ logStatus: boolean;
56
+ logMessage: string;
57
+ }>;
58
+ export declare const schemaSchedulerLogScope: z.ZodObject<{
59
+ target: z.ZodLiteral<"scheduler_log">;
60
+ action: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ target: "scheduler_log";
63
+ action: string;
64
+ }, {
65
+ target: "scheduler_log";
66
+ action: string;
67
+ }>;
68
+ /** Create */
69
+ export declare const schemaSchedulerLogCreatePayload: z.ZodObject<{
70
+ scope: z.ZodObject<{
71
+ target: z.ZodLiteral<"scheduler_log">;
72
+ action: z.ZodString;
73
+ }, "strip", z.ZodTypeAny, {
74
+ target: "scheduler_log";
75
+ action: string;
76
+ }, {
77
+ target: "scheduler_log";
78
+ action: string;
79
+ }>;
80
+ payload: z.ZodObject<{
81
+ schedulerLog: z.ZodObject<{
82
+ schedulerTaskId: z.ZodNumber;
83
+ flowType: z.ZodEnum<["in", "out"]>;
84
+ fieldRef: z.ZodString;
85
+ fieldModule: z.ZodString;
86
+ sourceType: z.ZodString;
87
+ sourceEntityId: z.ZodString;
88
+ sourceEntityLabel: z.ZodString;
89
+ sourceEntityData: z.ZodString;
90
+ destinationType: z.ZodString;
91
+ destinationEntityId: z.ZodString;
92
+ destinationEntityLabel: z.ZodString;
93
+ destinationSubmitPayload: z.ZodString;
94
+ destinationSubmitResponse: z.ZodString;
95
+ logAction: z.ZodString;
96
+ logLabel: z.ZodString;
97
+ logStatus: z.ZodBoolean;
98
+ logMessage: z.ZodString;
99
+ }, "strip", z.ZodTypeAny, {
100
+ schedulerTaskId: number;
101
+ flowType: "in" | "out";
102
+ fieldRef: string;
103
+ fieldModule: string;
104
+ sourceType: string;
105
+ sourceEntityId: string;
106
+ sourceEntityLabel: string;
107
+ sourceEntityData: string;
108
+ destinationType: string;
109
+ destinationEntityId: string;
110
+ destinationEntityLabel: string;
111
+ destinationSubmitPayload: string;
112
+ destinationSubmitResponse: string;
113
+ logAction: string;
114
+ logLabel: string;
115
+ logStatus: boolean;
116
+ logMessage: string;
117
+ }, {
118
+ schedulerTaskId: number;
119
+ flowType: "in" | "out";
120
+ fieldRef: string;
121
+ fieldModule: string;
122
+ sourceType: string;
123
+ sourceEntityId: string;
124
+ sourceEntityLabel: string;
125
+ sourceEntityData: string;
126
+ destinationType: string;
127
+ destinationEntityId: string;
128
+ destinationEntityLabel: string;
129
+ destinationSubmitPayload: string;
130
+ destinationSubmitResponse: string;
131
+ logAction: string;
132
+ logLabel: string;
133
+ logStatus: boolean;
134
+ logMessage: string;
135
+ }>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ schedulerLog: {
138
+ schedulerTaskId: number;
139
+ flowType: "in" | "out";
140
+ fieldRef: string;
141
+ fieldModule: string;
142
+ sourceType: string;
143
+ sourceEntityId: string;
144
+ sourceEntityLabel: string;
145
+ sourceEntityData: string;
146
+ destinationType: string;
147
+ destinationEntityId: string;
148
+ destinationEntityLabel: string;
149
+ destinationSubmitPayload: string;
150
+ destinationSubmitResponse: string;
151
+ logAction: string;
152
+ logLabel: string;
153
+ logStatus: boolean;
154
+ logMessage: string;
155
+ };
156
+ }, {
157
+ schedulerLog: {
158
+ schedulerTaskId: number;
159
+ flowType: "in" | "out";
160
+ fieldRef: string;
161
+ fieldModule: string;
162
+ sourceType: string;
163
+ sourceEntityId: string;
164
+ sourceEntityLabel: string;
165
+ sourceEntityData: string;
166
+ destinationType: string;
167
+ destinationEntityId: string;
168
+ destinationEntityLabel: string;
169
+ destinationSubmitPayload: string;
170
+ destinationSubmitResponse: string;
171
+ logAction: string;
172
+ logLabel: string;
173
+ logStatus: boolean;
174
+ logMessage: string;
175
+ };
176
+ }>;
177
+ }, "strip", z.ZodTypeAny, {
178
+ scope: {
179
+ target: "scheduler_log";
180
+ action: string;
181
+ };
182
+ payload: {
183
+ schedulerLog: {
184
+ schedulerTaskId: number;
185
+ flowType: "in" | "out";
186
+ fieldRef: string;
187
+ fieldModule: string;
188
+ sourceType: string;
189
+ sourceEntityId: string;
190
+ sourceEntityLabel: string;
191
+ sourceEntityData: string;
192
+ destinationType: string;
193
+ destinationEntityId: string;
194
+ destinationEntityLabel: string;
195
+ destinationSubmitPayload: string;
196
+ destinationSubmitResponse: string;
197
+ logAction: string;
198
+ logLabel: string;
199
+ logStatus: boolean;
200
+ logMessage: string;
201
+ };
202
+ };
203
+ }, {
204
+ scope: {
205
+ target: "scheduler_log";
206
+ action: string;
207
+ };
208
+ payload: {
209
+ schedulerLog: {
210
+ schedulerTaskId: number;
211
+ flowType: "in" | "out";
212
+ fieldRef: string;
213
+ fieldModule: string;
214
+ sourceType: string;
215
+ sourceEntityId: string;
216
+ sourceEntityLabel: string;
217
+ sourceEntityData: string;
218
+ destinationType: string;
219
+ destinationEntityId: string;
220
+ destinationEntityLabel: string;
221
+ destinationSubmitPayload: string;
222
+ destinationSubmitResponse: string;
223
+ logAction: string;
224
+ logLabel: string;
225
+ logStatus: boolean;
226
+ logMessage: string;
227
+ };
228
+ };
229
+ }>;
230
+ export type SchemaSchedulerLogCreatePayload = z.infer<typeof schemaSchedulerLogCreatePayload>;
231
+ /** Delete */
232
+ export declare const schemaSchedulerLogDeletePayload: z.ZodObject<{
233
+ scope: z.ZodObject<{
234
+ target: z.ZodLiteral<"scheduler_log">;
235
+ action: z.ZodString;
236
+ }, "strip", z.ZodTypeAny, {
237
+ target: "scheduler_log";
238
+ action: string;
239
+ }, {
240
+ target: "scheduler_log";
241
+ action: string;
242
+ }>;
243
+ payload: z.ZodObject<{
244
+ ids: z.ZodArray<z.ZodNumber, "many">;
245
+ }, "strip", z.ZodTypeAny, {
246
+ ids: number[];
247
+ }, {
248
+ ids: number[];
249
+ }>;
250
+ }, "strip", z.ZodTypeAny, {
251
+ scope: {
252
+ target: "scheduler_log";
253
+ action: string;
254
+ };
255
+ payload: {
256
+ ids: number[];
257
+ };
258
+ }, {
259
+ scope: {
260
+ target: "scheduler_log";
261
+ action: string;
262
+ };
263
+ payload: {
264
+ ids: number[];
265
+ };
266
+ }>;
267
+ export type SchemaSchedulerLogDeletePayload = z.infer<typeof schemaSchedulerLogDeletePayload>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schemaSchedulerLogDeletePayload = exports.schemaSchedulerLogCreatePayload = exports.schemaSchedulerLogScope = exports.schemaSchedulerLog = exports.SchedulerLogFlowTypeEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ // Hardcoded enum (safe and type-safe)
6
+ exports.SchedulerLogFlowTypeEnum = zod_1.z.enum(["in", "out"], {
7
+ errorMap: () => ({
8
+ message: 'Invalid flowType. Allowed values: "in" or "out"',
9
+ }),
10
+ });
11
+ exports.schemaSchedulerLog = zod_1.z.object({
12
+ schedulerTaskId: zod_1.z.number(),
13
+ flowType: exports.SchedulerLogFlowTypeEnum,
14
+ fieldRef: zod_1.z.string().min(1, "field_ref is required"),
15
+ fieldModule: zod_1.z.string().min(1, "field_module is required"),
16
+ sourceType: zod_1.z.string(),
17
+ sourceEntityId: zod_1.z.string(),
18
+ sourceEntityLabel: zod_1.z.string(),
19
+ sourceEntityData: zod_1.z.string(),
20
+ destinationType: zod_1.z.string(),
21
+ destinationEntityId: zod_1.z.string(),
22
+ destinationEntityLabel: zod_1.z.string(),
23
+ destinationSubmitPayload: zod_1.z.string(),
24
+ destinationSubmitResponse: zod_1.z.string(),
25
+ logAction: zod_1.z.string(),
26
+ logLabel: zod_1.z.string(),
27
+ logStatus: zod_1.z.boolean(),
28
+ logMessage: zod_1.z.string()
29
+ });
30
+ exports.schemaSchedulerLogScope = zod_1.z.object({
31
+ target: zod_1.z.literal("scheduler_log"),
32
+ action: zod_1.z.string(),
33
+ });
34
+ /** Create */
35
+ exports.schemaSchedulerLogCreatePayload = zod_1.z.object({
36
+ scope: exports.schemaSchedulerLogScope,
37
+ payload: zod_1.z.object({
38
+ schedulerLog: exports.schemaSchedulerLog
39
+ })
40
+ });
41
+ /** Delete */
42
+ exports.schemaSchedulerLogDeletePayload = zod_1.z.object({
43
+ scope: exports.schemaSchedulerLogScope,
44
+ payload: zod_1.z.object({
45
+ ids: zod_1.z.array(zod_1.z.number()).min(1, "ids must contain at least one number"),
46
+ }),
47
+ });
48
+ //# sourceMappingURL=schemaSchedulerLog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaSchedulerLog.js","sourceRoot":"","sources":["../../../../src/schema/payload/scheduler/schemaSchedulerLog.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAIxB,sCAAsC;AACzB,QAAA,wBAAwB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;IAC1D,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;QACb,OAAO,EAAE,iDAAiD;KAC7D,CAAC;CACL,CAAC,CAAC;AAEU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,QAAQ,EAAE,gCAAwB;IAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;IACpD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;IAE1D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC7B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;IAE5B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE;IAC3B,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC/B,sBAAsB,EAAE,OAAC,CAAC,MAAM,EAAE;IAClC,wBAAwB,EAAE,OAAC,CAAC,MAAM,EAAE;IACpC,yBAAyB,EAAE,OAAC,CAAC,MAAM,EAAE;IAErC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;IACtB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAA;AAEW,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IAClC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAEF,aAAa;AACA,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,KAAK,EAAE,+BAAuB;IAC9B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,YAAY,EAAE,0BAAkB;KACnC,CAAC;CACL,CAAC,CAAC;AAIH,aAAa;AACA,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,KAAK,EAAE,+BAAuB;IAC9B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,GAAG,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,sCAAsC,CAAC;KAC1E,CAAC;CACL,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { _, dayjs } from \"@/utils\";\n\n// Hardcoded enum (safe and type-safe)\nexport const SchedulerLogFlowTypeEnum = z.enum([\"in\", \"out\"], {\n errorMap: () => ({\n message: 'Invalid flowType. Allowed values: \"in\" or \"out\"',\n }),\n});\n\nexport const schemaSchedulerLog = z.object({\n schedulerTaskId: z.number(),\n flowType: SchedulerLogFlowTypeEnum,\n fieldRef: z.string().min(1, \"field_ref is required\"),\n fieldModule: z.string().min(1, \"field_module is required\"),\n\n sourceType: z.string(),\n sourceEntityId: z.string(),\n sourceEntityLabel: z.string(),\n sourceEntityData: z.string(),\n\n destinationType: z.string(),\n destinationEntityId: z.string(),\n destinationEntityLabel: z.string(),\n destinationSubmitPayload: z.string(),\n destinationSubmitResponse: z.string(),\n\n logAction: z.string(),\n logLabel: z.string(),\n logStatus: z.boolean(),\n logMessage: z.string()\n})\n\nexport const schemaSchedulerLogScope = z.object({\n target: z.literal(\"scheduler_log\"),\n action: z.string(),\n})\n\n/** Create */\nexport const schemaSchedulerLogCreatePayload = z.object({\n scope: schemaSchedulerLogScope,\n payload: z.object({\n schedulerLog: schemaSchedulerLog\n })\n});\n\nexport type SchemaSchedulerLogCreatePayload = z.infer<typeof schemaSchedulerLogCreatePayload>;\n\n/** Delete */\nexport const schemaSchedulerLogDeletePayload = z.object({\n scope: schemaSchedulerLogScope,\n payload: z.object({\n ids: z.array(z.number()).min(1, \"ids must contain at least one number\"),\n }),\n});\n\nexport type SchemaSchedulerLogDeletePayload = z.infer<typeof schemaSchedulerLogDeletePayload>;"]}
@@ -15,8 +15,8 @@ const AccessControlService = (props) => {
15
15
  const coreConfig = features_1.CoreConfigHook.onSetup();
16
16
  // If extendAccessControl exists and now returns maps
17
17
  let maps = {};
18
- if (coreConfig.extendAccessControl) {
19
- maps = coreConfig.extendAccessControl(access_control_1.userTypePolicies); // merge policies + get maps
18
+ if (coreConfig?.extendAccessControl) {
19
+ maps = coreConfig?.extendAccessControl(access_control_1.userTypePolicies); // merge policies + get maps
20
20
  }
21
21
  // coreConfig.extendAccessControl?.(userTypePolicies);
22
22
  isExtended = true;
@@ -1 +1 @@
1
- {"version":3,"file":"AccessControlService.js","sourceRoot":"","sources":["../../../src/services/access_control/AccessControlService.ts"],"names":[],"mappings":";;;AAEA,yCAA4C;AAE5C,qDAW0B;AAI1B,mCAAqC;AAiB9B,MAAM,oBAAoB,GAAG,CAIlC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,SAAS;IACT,+DAA+D;IAC/D,6CAA6C;IAC7C,0FAA0F;IAC1F,gEAAgE;IAChE,kBAAkB;IAClB,SAAS;IACT,KAAK;IAEL,OAAO;QACH,eAAe;QACf,eAAe;QACf,WAAW;QACX,qBAAqB;QACrB,8BAA8B;QAC9B,kCAAkC;KACrC,CAAC;AACN,CAAC,CAAC;AA5PW,QAAA,oBAAoB,wBA4P/B","sourcesContent":["import { NextFunction, Request } from \"express\";\nimport { UserType } from \"@/services\";\nimport { CoreConfigHook } from \"@/features\";\n\nimport {\n AccessPolicyWithExtra,\n AccessControlScope,\n AccessControlModuleOf,\n AccessControlAction,\n\n accessControlScopesMap,\n accessControlModulesMap,\n accessControlActionsMap,\n\n userTypePolicies\n} from \"@/access_control\";\n\nimport { DefaultServiceProps, getDefaultServiceProps } from \"@/utils\";\n\nimport { throwError } from \"@/utils\";\n\n// Intersection type for requests\ntype AuthRequest = Request & { actionUserType?: UserType };\n\n// Helper type: core scopes + extra scopes if provided\nexport type AccessControlScopeOrExtra<ExtraScopes extends string> =\n [ExtraScopes] extends [never] ? AccessControlScope : AccessControlScope | ExtraScopes;\n\nexport type AccessControlServiceProps = DefaultServiceProps & {\n // userType: UserType\n};\n\nexport type AccessControlListOptionsProps = {\n userType?: UserType\n};\n\nexport const AccessControlService = <\n ExtraScopes extends string = never,\n ExtraModules extends Record<ExtraScopes, string> = Record<ExtraScopes, string>,\n ExtraActions extends Record<ExtraScopes, Record<string, string>> = Record<ExtraScopes, Record<string, string>>\n>(props: AccessControlServiceProps) => {\n\n let isExtended = false;\n\n // 🟢 Service-level variables to store maps from consumer\n let extraScopeModuleMap: Map<string, { value: string; label: string }[]> | undefined;\n let extraActionMap: Map<string, string> | undefined;\n\n const getAccessPolicy = (userType: UserType) => {\n // Apply consumer extras only once\n if (!isExtended) {\n const coreConfig = CoreConfigHook.onSetup();\n\n // If extendAccessControl exists and now returns maps\n let maps: {\n extraScopeModuleMap?: Map<string, { value: string; label: string }[]>;\n extraActionMap?: Map<string, string>;\n } = {};\n\n if (coreConfig.extendAccessControl) {\n maps = coreConfig.extendAccessControl(userTypePolicies as any); // merge policies + get maps\n }\n\n // coreConfig.extendAccessControl?.(userTypePolicies);\n\n isExtended = true;\n\n // Store maps in service-level variables so we can reuse\n extraScopeModuleMap = maps.extraScopeModuleMap;\n extraActionMap = maps.extraActionMap;\n }\n\n // console.log('userTypePolicies', userTypePolicies)\n\n const policy = userTypePolicies[userType] as AccessPolicyWithExtra<ExtraScopes>;\n if (!policy || Object.keys(policy).length <= 0) throwError(`Empty access control policy for user type: ${userType}`);\n\n // Return policy + maps\n return {\n policy,\n extraScopeModuleMap,\n extraActionMap,\n };\n\n };\n\n const getUserType = (req: AuthRequest) => {\n const userType = req?.actionUserType ?? \"\";\n if (!userType) throwError(\"Invalid user type in request for access control\");\n return userType;\n };\n\n const isActionAllowed = <\n S extends AccessControlScope | ExtraScopes\n >(\n policy: AccessPolicyWithExtra<ExtraScopes>,\n scope: S,\n module: S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n action: S extends AccessControlScope ? AccessControlAction : string\n ): boolean => {\n const scopePolicy = policy[scope as keyof typeof policy] as\n | Record<string, Record<string, boolean>>\n | undefined;\n if (!scopePolicy) return false;\n\n const modulePolicy = scopePolicy[module];\n if (!modulePolicy) return false;\n\n return modulePolicy[action as string] ?? false;\n };\n\n const checkAccess = <\n S extends AccessControlScope | ExtraScopes,\n M extends S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n A extends S extends AccessControlScope ? AccessControlAction : string\n >(\n userType: UserType,\n policy: AccessPolicyWithExtra<ExtraScopes>,\n scope: S,\n module: M,\n action: A\n ): boolean => {\n // TS infers ExtraScopes, S, M, A automatically\n const allowed = isActionAllowed(policy, scope, module, action);\n\n if (!allowed) throwError(`Access denied: ${scope}.${module}.${action} (${userType})`);\n return allowed;\n };\n\n // ------------------\n // Programmatic validator\n // ------------------\n const validateAccessControl = <\n S extends AccessControlScopeOrExtra<ExtraScopes>,\n M extends S extends AccessControlScope\n ? AccessControlModuleOf<S>\n : ExtraModules[S & keyof ExtraModules],\n A extends S extends AccessControlScope\n ? AccessControlAction\n : ExtraActions[S & keyof ExtraActions][M & keyof ExtraActions[S & keyof ExtraActions]]\n >(\n req: Request,\n scope: S,\n module: M,\n action: A\n ): boolean => {\n\n const userType = getUserType(req);\n\n if (!userType) throwError(\"Invalid user type\");\n\n const { policy } = getAccessPolicy(userType)\n\n return checkAccess(userType, policy, scope, module, action);\n };\n\n /** for listAccessControlPolicyOptions */\n const buildScopeTree = <\n T extends AccessPolicyWithExtra<any, any, any>\n >(\n policy: T,\n extraScopeModuleMap?: Map<string, { value: string; label: string }[]>,\n extraActionMap?: Map<string, string>\n ) => {\n const scopes: {\n key: string;\n label: string;\n modules: {\n key: string;\n label: string;\n actions: { key: string; label: string }[];\n }[];\n }[] = [];\n\n // Loop through each scope in the policy\n Object.entries(policy).forEach(([scopeKey, modules]) => {\n // Build modules array for this scope\n const modulesArr: {\n key: string;\n label: string;\n actions: { key: string; label: string }[];\n }[] = [];\n\n Object.entries(modules as Record<string, Record<string, boolean>>).forEach(\n ([moduleKey, actions]) => {\n const actionArr = Object.entries(actions)\n .filter(([_, allowed]) => allowed) // Only include true actions\n .map(([actionKey]) => ({\n key: actionKey,\n permission_key: `${scopeKey}.${moduleKey}.${actionKey}`,\n label:\n accessControlActionsMap.get(actionKey as AccessControlAction) ||\n extraActionMap?.get(actionKey) ||\n actionKey,\n }));\n\n if (actionArr.length > 0) {\n modulesArr.push({\n key: moduleKey,\n label:\n accessControlModulesMap.get(scopeKey as AccessControlScope)?.find(\n (m) => m.value === moduleKey\n )?.label || extraScopeModuleMap?.get(scopeKey)?.find((m) => m.value === moduleKey)?.label || moduleKey,\n actions: actionArr,\n });\n }\n }\n );\n\n if (modulesArr.length > 0) {\n scopes.push({\n key: scopeKey,\n label:\n accessControlScopesMap.get(scopeKey as AccessControlScope) ||\n extraScopeModuleMap?.get(scopeKey)?.[0]?.label ||\n scopeKey,\n modules: modulesArr,\n });\n }\n });\n\n return { scopes };\n };\n\n const listAccessControlPolicyOptions = ({ userType }: AccessControlListOptionsProps) => {\n\n // Determine userType\n const uType = userType || (props.actionUserType as UserType);\n\n if (!uType) throwError(\"Invalid user type\");\n\n // Get full policy (core + extra) for this user type\n const { policy, extraScopeModuleMap, extraActionMap } = getAccessPolicy(uType);\n\n const policyTree = buildScopeTree(policy, extraScopeModuleMap, extraActionMap);\n\n return {\n options: policyTree\n };\n };\n\n\n\n // const validateAccessControl = <\n // S extends AccessControlScopeOrExtra<ExtraScopes>,\n // M extends S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n // A extends S extends AccessControlScope ? AccessControlAction : string\n // >(\n // scope: S,\n // module: M,\n // action: A\n // ): boolean => {\n // // const userType = getUserType(req);\n\n // const userType = props?.actionUserType as UserType\n\n // if (!userType) throwError(\"Invalid user type in request for access control middleware\");\n\n // const policy = getAccessPolicy(userType) as AccessPolicyWithExtra<ExtraScopes>;\n // return checkAccess(userType, policy, scope, module, action);\n // };\n\n // --- Middleware version (Express compatible) ---\n // const validateAccessControlMiddleware = <\n // S extends AccessControlScopeOrExtra<ExtraScopes>,\n // M extends S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n // A extends S extends AccessControlScope ? AccessControlAction : string\n // >(\n // scope: S,\n // module: M,\n // action: A\n // ) => {\n // return (req: AuthRequest, res: any, next: Function) => {\n // const userType = getUserType(req);\n // const policy = getAccessPolicy(userType) as AccessPolicyWithExtra<ExtraScopes>;\n // checkAccess(userType, policy, scope, module, action);\n // next();\n // };\n // };\n\n return {\n getAccessPolicy,\n // getUserType,\n checkAccess,\n validateAccessControl,\n listAccessControlPolicyOptions,\n // validateAccessControlMiddleware\n };\n};"]}
1
+ {"version":3,"file":"AccessControlService.js","sourceRoot":"","sources":["../../../src/services/access_control/AccessControlService.ts"],"names":[],"mappings":";;;AAEA,yCAA4C;AAE5C,qDAW0B;AAI1B,mCAAqC;AAiB9B,MAAM,oBAAoB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gBAAgB;IAChB,SAAS;IACT,+DAA+D;IAC/D,6CAA6C;IAC7C,0FAA0F;IAC1F,gEAAgE;IAChE,kBAAkB;IAClB,SAAS;IACT,KAAK;IAEL,OAAO;QACH,eAAe;QACf,eAAe;QACf,WAAW;QACX,qBAAqB;QACrB,8BAA8B;QAC9B,kCAAkC;KACrC,CAAC;AACN,CAAC,CAAC;AA5PW,QAAA,oBAAoB,wBA4P/B","sourcesContent":["import { NextFunction, Request } from \"express\";\nimport { UserType } from \"@/services\";\nimport { CoreConfigHook } from \"@/features\";\n\nimport {\n AccessPolicyWithExtra,\n AccessControlScope,\n AccessControlModuleOf,\n AccessControlAction,\n\n accessControlScopesMap,\n accessControlModulesMap,\n accessControlActionsMap,\n\n userTypePolicies\n} from \"@/access_control\";\n\nimport { DefaultServiceProps, getDefaultServiceProps } from \"@/utils\";\n\nimport { throwError } from \"@/utils\";\n\n// Intersection type for requests\ntype AuthRequest = Request & { actionUserType?: UserType };\n\n// Helper type: core scopes + extra scopes if provided\nexport type AccessControlScopeOrExtra<ExtraScopes extends string> =\n [ExtraScopes] extends [never] ? AccessControlScope : AccessControlScope | ExtraScopes;\n\nexport type AccessControlServiceProps = DefaultServiceProps & {\n // userType: UserType\n};\n\nexport type AccessControlListOptionsProps = {\n userType?: UserType\n};\n\nexport const AccessControlService = <\n ExtraScopes extends string = never,\n ExtraModules extends Record<ExtraScopes, string> = Record<ExtraScopes, string>,\n ExtraActions extends Record<ExtraScopes, Record<string, string>> = Record<ExtraScopes, Record<string, string>>\n>(props: AccessControlServiceProps) => {\n\n let isExtended = false;\n\n // 🟢 Service-level variables to store maps from consumer\n let extraScopeModuleMap: Map<string, { value: string; label: string }[]> | undefined;\n let extraActionMap: Map<string, string> | undefined;\n\n const getAccessPolicy = (userType: UserType) => {\n // Apply consumer extras only once\n if (!isExtended) {\n const coreConfig = CoreConfigHook.onSetup();\n\n // If extendAccessControl exists and now returns maps\n let maps: {\n extraScopeModuleMap?: Map<string, { value: string; label: string }[]>;\n extraActionMap?: Map<string, string>;\n } = {};\n\n if (coreConfig?.extendAccessControl) {\n maps = coreConfig?.extendAccessControl(userTypePolicies as any); // merge policies + get maps\n }\n\n // coreConfig.extendAccessControl?.(userTypePolicies);\n\n isExtended = true;\n\n // Store maps in service-level variables so we can reuse\n extraScopeModuleMap = maps.extraScopeModuleMap;\n extraActionMap = maps.extraActionMap;\n }\n\n // console.log('userTypePolicies', userTypePolicies)\n\n const policy = userTypePolicies[userType] as AccessPolicyWithExtra<ExtraScopes>;\n if (!policy || Object.keys(policy).length <= 0) throwError(`Empty access control policy for user type: ${userType}`);\n\n // Return policy + maps\n return {\n policy,\n extraScopeModuleMap,\n extraActionMap,\n };\n\n };\n\n const getUserType = (req: AuthRequest) => {\n const userType = req?.actionUserType ?? \"\";\n if (!userType) throwError(\"Invalid user type in request for access control\");\n return userType;\n };\n\n const isActionAllowed = <\n S extends AccessControlScope | ExtraScopes\n >(\n policy: AccessPolicyWithExtra<ExtraScopes>,\n scope: S,\n module: S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n action: S extends AccessControlScope ? AccessControlAction : string\n ): boolean => {\n const scopePolicy = policy[scope as keyof typeof policy] as\n | Record<string, Record<string, boolean>>\n | undefined;\n if (!scopePolicy) return false;\n\n const modulePolicy = scopePolicy[module];\n if (!modulePolicy) return false;\n\n return modulePolicy[action as string] ?? false;\n };\n\n const checkAccess = <\n S extends AccessControlScope | ExtraScopes,\n M extends S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n A extends S extends AccessControlScope ? AccessControlAction : string\n >(\n userType: UserType,\n policy: AccessPolicyWithExtra<ExtraScopes>,\n scope: S,\n module: M,\n action: A\n ): boolean => {\n // TS infers ExtraScopes, S, M, A automatically\n const allowed = isActionAllowed(policy, scope, module, action);\n\n if (!allowed) throwError(`Access denied: ${scope}.${module}.${action} (${userType})`);\n return allowed;\n };\n\n // ------------------\n // Programmatic validator\n // ------------------\n const validateAccessControl = <\n S extends AccessControlScopeOrExtra<ExtraScopes>,\n M extends S extends AccessControlScope\n ? AccessControlModuleOf<S>\n : ExtraModules[S & keyof ExtraModules],\n A extends S extends AccessControlScope\n ? AccessControlAction\n : ExtraActions[S & keyof ExtraActions][M & keyof ExtraActions[S & keyof ExtraActions]]\n >(\n req: Request,\n scope: S,\n module: M,\n action: A\n ): boolean => {\n\n const userType = getUserType(req);\n\n if (!userType) throwError(\"Invalid user type\");\n\n const { policy } = getAccessPolicy(userType)\n\n return checkAccess(userType, policy, scope, module, action);\n };\n\n /** for listAccessControlPolicyOptions */\n const buildScopeTree = <\n T extends AccessPolicyWithExtra<any, any, any>\n >(\n policy: T,\n extraScopeModuleMap?: Map<string, { value: string; label: string }[]>,\n extraActionMap?: Map<string, string>\n ) => {\n const scopes: {\n key: string;\n label: string;\n modules: {\n key: string;\n label: string;\n actions: { key: string; label: string }[];\n }[];\n }[] = [];\n\n // Loop through each scope in the policy\n Object.entries(policy).forEach(([scopeKey, modules]) => {\n // Build modules array for this scope\n const modulesArr: {\n key: string;\n label: string;\n actions: { key: string; label: string }[];\n }[] = [];\n\n Object.entries(modules as Record<string, Record<string, boolean>>).forEach(\n ([moduleKey, actions]) => {\n const actionArr = Object.entries(actions)\n .filter(([_, allowed]) => allowed) // Only include true actions\n .map(([actionKey]) => ({\n key: actionKey,\n permission_key: `${scopeKey}.${moduleKey}.${actionKey}`,\n label:\n accessControlActionsMap.get(actionKey as AccessControlAction) ||\n extraActionMap?.get(actionKey) ||\n actionKey,\n }));\n\n if (actionArr.length > 0) {\n modulesArr.push({\n key: moduleKey,\n label:\n accessControlModulesMap.get(scopeKey as AccessControlScope)?.find(\n (m) => m.value === moduleKey\n )?.label || extraScopeModuleMap?.get(scopeKey)?.find((m) => m.value === moduleKey)?.label || moduleKey,\n actions: actionArr,\n });\n }\n }\n );\n\n if (modulesArr.length > 0) {\n scopes.push({\n key: scopeKey,\n label:\n accessControlScopesMap.get(scopeKey as AccessControlScope) ||\n extraScopeModuleMap?.get(scopeKey)?.[0]?.label ||\n scopeKey,\n modules: modulesArr,\n });\n }\n });\n\n return { scopes };\n };\n\n const listAccessControlPolicyOptions = ({ userType }: AccessControlListOptionsProps) => {\n\n // Determine userType\n const uType = userType || (props.actionUserType as UserType);\n\n if (!uType) throwError(\"Invalid user type\");\n\n // Get full policy (core + extra) for this user type\n const { policy, extraScopeModuleMap, extraActionMap } = getAccessPolicy(uType);\n\n const policyTree = buildScopeTree(policy, extraScopeModuleMap, extraActionMap);\n\n return {\n options: policyTree\n };\n };\n\n\n\n // const validateAccessControl = <\n // S extends AccessControlScopeOrExtra<ExtraScopes>,\n // M extends S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n // A extends S extends AccessControlScope ? AccessControlAction : string\n // >(\n // scope: S,\n // module: M,\n // action: A\n // ): boolean => {\n // // const userType = getUserType(req);\n\n // const userType = props?.actionUserType as UserType\n\n // if (!userType) throwError(\"Invalid user type in request for access control middleware\");\n\n // const policy = getAccessPolicy(userType) as AccessPolicyWithExtra<ExtraScopes>;\n // return checkAccess(userType, policy, scope, module, action);\n // };\n\n // --- Middleware version (Express compatible) ---\n // const validateAccessControlMiddleware = <\n // S extends AccessControlScopeOrExtra<ExtraScopes>,\n // M extends S extends AccessControlScope ? AccessControlModuleOf<S> : string,\n // A extends S extends AccessControlScope ? AccessControlAction : string\n // >(\n // scope: S,\n // module: M,\n // action: A\n // ) => {\n // return (req: AuthRequest, res: any, next: Function) => {\n // const userType = getUserType(req);\n // const policy = getAccessPolicy(userType) as AccessPolicyWithExtra<ExtraScopes>;\n // checkAccess(userType, policy, scope, module, action);\n // next();\n // };\n // };\n\n return {\n getAccessPolicy,\n // getUserType,\n checkAccess,\n validateAccessControl,\n listAccessControlPolicyOptions,\n // validateAccessControlMiddleware\n };\n};"]}