storemw-core-api 1.0.169 → 1.0.171
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/app.js +20 -2
- package/dist/app.js.map +1 -1
- package/dist/controllers/access_control/accessControlRoleController.js +5 -1
- package/dist/controllers/access_control/accessControlRoleController.js.map +1 -1
- package/dist/controllers/index.js +1 -1
- package/dist/controllers/item/itemController.js +22 -10
- package/dist/controllers/item/itemController.js.map +1 -1
- package/dist/lib/route_factory/RouteFactory.d.ts +15 -0
- package/dist/lib/route_factory/RouteFactory.js +21 -0
- package/dist/lib/route_factory/RouteFactory.js.map +1 -0
- package/dist/lib/route_factory/index.d.ts +6 -0
- package/dist/lib/route_factory/index.js +11 -0
- package/dist/lib/route_factory/index.js.map +1 -0
- package/dist/lib/route_factory/routeRegistry.d.ts +8 -0
- package/dist/lib/route_factory/routeRegistry.js +5 -0
- package/dist/lib/route_factory/routeRegistry.js.map +1 -0
- package/dist/lib/route_factory/routeSpec.d.ts +36 -0
- package/dist/lib/route_factory/routeSpec.js +81 -0
- package/dist/lib/route_factory/routeSpec.js.map +1 -0
- package/dist/models/item/BrandModel.d.ts +34 -23
- package/dist/models/item/CategoryModel.d.ts +34 -23
- package/dist/models/item/ItemModel.d.ts +100 -78
- package/dist/models/item/ProductModel.d.ts +33 -33
- package/dist/models/item/UomModel.d.ts +44 -33
- package/dist/route_contracts/access_control/accessControlPoliciesRoutes.d.ts +2 -0
- package/dist/route_contracts/access_control/accessControlPoliciesRoutes.js +21 -0
- package/dist/route_contracts/access_control/accessControlPoliciesRoutes.js.map +1 -0
- package/dist/route_contracts/access_control/accessControlRoleRoutes.d.ts +2 -0
- package/dist/route_contracts/access_control/accessControlRoleRoutes.js +48 -0
- package/dist/route_contracts/access_control/accessControlRoleRoutes.js.map +1 -0
- package/dist/route_contracts/access_control/accessControlRolesRoutes.d.ts +2 -0
- package/dist/route_contracts/access_control/accessControlRolesRoutes.js +37 -0
- package/dist/route_contracts/access_control/accessControlRolesRoutes.js.map +1 -0
- package/dist/route_contracts/access_control/accessControlRoutes.d.ts +2 -0
- package/dist/route_contracts/access_control/accessControlRoutes.js +18 -0
- package/dist/route_contracts/access_control/accessControlRoutes.js.map +1 -0
- package/dist/route_contracts/access_control/accessControlUserRolesRoutes.d.ts +2 -0
- package/dist/route_contracts/access_control/accessControlUserRolesRoutes.js +21 -0
- package/dist/route_contracts/access_control/accessControlUserRolesRoutes.js.map +1 -0
- package/dist/route_contracts/auth/authRoutes.d.ts +2 -0
- package/dist/route_contracts/auth/authRoutes.js +23 -0
- package/dist/route_contracts/auth/authRoutes.js.map +1 -0
- package/dist/route_contracts/index.d.ts +2 -0
- package/dist/route_contracts/index.js +39 -0
- package/dist/route_contracts/index.js.map +1 -0
- package/dist/route_specs/access_control/accessControlPoliciesRouteSpecs.d.ts +2 -0
- package/dist/route_specs/access_control/accessControlPoliciesRouteSpecs.js +21 -0
- package/dist/route_specs/access_control/accessControlPoliciesRouteSpecs.js.map +1 -0
- package/dist/route_specs/access_control/accessControlRoleRouteSpecs.d.ts +2 -0
- package/dist/route_specs/access_control/accessControlRoleRouteSpecs.js +48 -0
- package/dist/route_specs/access_control/accessControlRoleRouteSpecs.js.map +1 -0
- package/dist/route_specs/access_control/accessControlRolesRouteSpecs.d.ts +2 -0
- package/dist/route_specs/access_control/accessControlRolesRouteSpecs.js +37 -0
- package/dist/route_specs/access_control/accessControlRolesRouteSpecs.js.map +1 -0
- package/dist/route_specs/access_control/accessControlRouteSpecs.d.ts +2 -0
- package/dist/route_specs/access_control/accessControlRouteSpecs.js +18 -0
- package/dist/route_specs/access_control/accessControlRouteSpecs.js.map +1 -0
- package/dist/route_specs/access_control/accessControlUserRolesRouteSpecs.d.ts +2 -0
- package/dist/route_specs/access_control/accessControlUserRolesRouteSpecs.js +21 -0
- package/dist/route_specs/access_control/accessControlUserRolesRouteSpecs.js.map +1 -0
- package/dist/route_specs/auth/authRouteSpec.d.ts +2 -0
- package/dist/route_specs/auth/authRouteSpec.js +23 -0
- package/dist/route_specs/auth/authRouteSpec.js.map +1 -0
- package/dist/route_specs/index.d.ts +2 -0
- package/dist/route_specs/index.js +39 -0
- package/dist/route_specs/index.js.map +1 -0
- package/dist/routes/index.d.ts +33 -33
- package/dist/routes/index.js +33 -34
- package/dist/routes/index.js.map +1 -1
- package/dist/schema/middleware/route/index.d.ts +2 -2
- package/dist/schema/middleware/route/index.js +2 -1
- package/dist/schema/middleware/route/index.js.map +1 -1
- package/dist/schema/middleware/route/schemaAccessControl.d.ts +9 -0
- package/dist/schema/middleware/route/schemaAccessControl.js +5 -1
- package/dist/schema/middleware/route/schemaAccessControl.js.map +1 -1
- package/dist/schema/payload/item/schemaItemBrand.d.ts +28 -14
- package/dist/schema/payload/item/schemaItemBrand.js +4 -2
- package/dist/schema/payload/item/schemaItemBrand.js.map +1 -1
- package/dist/schema/payload/item/schemaItemCategory.d.ts +28 -14
- package/dist/schema/payload/item/schemaItemCategory.js +4 -2
- package/dist/schema/payload/item/schemaItemCategory.js.map +1 -1
- package/dist/schema/payload/item/schemaItemItem.d.ts +65 -65
- package/dist/schema/payload/item/schemaItemItem.js +3 -3
- package/dist/schema/payload/item/schemaItemItem.js.map +1 -1
- package/dist/schema/payload/item/schemaItemProduct.d.ts +41 -41
- package/dist/schema/payload/item/schemaItemProduct.js +1 -1
- package/dist/schema/payload/item/schemaItemProduct.js.map +1 -1
- package/dist/schema/payload/item/schemaItemUom.d.ts +28 -14
- package/dist/schema/payload/item/schemaItemUom.js +4 -2
- package/dist/schema/payload/item/schemaItemUom.js.map +1 -1
- package/dist/services/item/ItemBrandService.d.ts +11 -6
- package/dist/services/item/ItemBrandService.js +35 -6
- package/dist/services/item/ItemBrandService.js.map +1 -1
- package/dist/services/item/ItemCategoryService.d.ts +11 -6
- package/dist/services/item/ItemCategoryService.js +37 -7
- package/dist/services/item/ItemCategoryService.js.map +1 -1
- package/dist/services/item/ItemItemService.d.ts +29 -23
- package/dist/services/item/ItemItemService.js +57 -16
- package/dist/services/item/ItemItemService.js.map +1 -1
- package/dist/services/item/ItemProductService.d.ts +9 -9
- package/dist/services/item/ItemProductService.js +11 -10
- package/dist/services/item/ItemProductService.js.map +1 -1
- package/dist/services/item/ItemService.js +39 -12
- package/dist/services/item/ItemService.js.map +1 -1
- package/dist/services/item/ItemUomService.d.ts +14 -9
- package/dist/services/item/ItemUomService.js +35 -5
- package/dist/services/item/ItemUomService.js.map +1 -1
- package/package.json +11 -1
- package/prisma/schema.prisma +101 -92
- package/dist/access_control/extra/index.d.ts +0 -2
- package/dist/access_control/extra/index.js +0 -7
- package/dist/access_control/extra/index.js.map +0 -1
- package/dist/access_control/extra/policies/administrator.d.ts +0 -3
- package/dist/access_control/extra/policies/administrator.js +0 -13
- package/dist/access_control/extra/policies/administrator.js.map +0 -1
- package/dist/access_control/extra/types.d.ts +0 -11
- package/dist/access_control/extra/types.js +0 -3
- package/dist/access_control/extra/types.js.map +0 -1
- package/dist/controllers/utils/changePasswordUtilController.d.ts +0 -3
- package/dist/controllers/utils/changePasswordUtilController.js +0 -55
- package/dist/controllers/utils/changePasswordUtilController.js.map +0 -1
- package/dist/global.d.ts +0 -5
- package/dist/global.js +0 -12
- package/dist/global.js.map +0 -1
- package/dist/helpers/unuse/prismaHelper.d.ts +0 -2
- package/dist/helpers/unuse/prismaHelper.js +0 -76
- package/dist/helpers/unuse/prismaHelper.js.map +0 -1
- package/dist/lib/global.d.ts +0 -5
- package/dist/lib/global.js +0 -12
- package/dist/lib/global.js.map +0 -1
- package/dist/middlewares/request/initialPrisma.d.ts +0 -9
- package/dist/middlewares/request/initialPrisma.js +0 -41
- package/dist/middlewares/request/initialPrisma.js.map +0 -1
- package/dist/middlewares/request/unuse/initialPrisma.d.ts +0 -9
- package/dist/middlewares/request/unuse/initialPrisma.js +0 -41
- package/dist/middlewares/request/unuse/initialPrisma.js.map +0 -1
- package/dist/middlewares/route/bk_validateDocument.d.ts +0 -2
- package/dist/middlewares/route/bk_validateDocument.js +0 -34
- package/dist/middlewares/route/bk_validateDocument.js.map +0 -1
- package/dist/middlewares/route/validateSchedulerLog.d.ts +0 -5
- package/dist/middlewares/route/validateSchedulerLog.js +0 -20
- package/dist/middlewares/route/validateSchedulerLog.js.map +0 -1
- package/dist/routes/access_control/accessControlsRoutes.d.ts +0 -3
- package/dist/routes/access_control/accessControlsRoutes.js +0 -12
- package/dist/routes/access_control/accessControlsRoutes.js.map +0 -1
- package/dist/routes/utils/changePasswordUtilRoutes.d.ts +0 -2
- package/dist/routes/utils/changePasswordUtilRoutes.js +0 -11
- package/dist/routes/utils/changePasswordUtilRoutes.js.map +0 -1
- package/dist/schema/common/unuse/response.d.ts +0 -54
- package/dist/schema/common/unuse/response.js +0 -23
- package/dist/schema/common/unuse/response.js.map +0 -1
- package/dist/schema/middleware/request/validateQuery_bk250827.d.ts +0 -27
- package/dist/schema/middleware/request/validateQuery_bk250827.js +0 -63
- package/dist/schema/middleware/request/validateQuery_bk250827.js.map +0 -1
- package/dist/schema/middleware/route/bk_schemaDocument.d.ts +0 -10
- package/dist/schema/middleware/route/bk_schemaDocument.js +0 -10
- package/dist/schema/middleware/route/bk_schemaDocument.js.map +0 -1
- package/dist/schema/middleware/route/schemaSchedulerLog.d.ts +0 -4
- package/dist/schema/middleware/route/schemaSchedulerLog.js +0 -10
- package/dist/schema/middleware/route/schemaSchedulerLog.js.map +0 -1
- package/dist/schema/payload/utils/schemaChangePasswordUtil.d.ts +0 -53
- package/dist/schema/payload/utils/schemaChangePasswordUtil.js +0 -18
- package/dist/schema/payload/utils/schemaChangePasswordUtil.js.map +0 -1
- package/dist/services/utils/ChangePasswordUtilService.d.ts +0 -13
- package/dist/services/utils/ChangePasswordUtilService.js +0 -78
- package/dist/services/utils/ChangePasswordUtilService.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/route_factory/index.ts"],"names":[],"mappings":";;;AAAA,+CAA8D;AAArD,6GAAA,aAAa,OAAA;AAAE,8GAAA,cAAc,OAAA;AAEtC,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AAEtB,yCAAuD;AAA9C,sHAAA,yBAAyB,OAAA","sourcesContent":["export { registerRoute, routeRegistrar } from \"./RouteFactory\"\nexport type { RouteConfig } from \"./RouteFactory\"\nexport { routeRegistry } from \"./routeRegistry\"\nexport type { RegisteredRoute } from \"./routeRegistry\"\nexport { buildRouterFromRouteSpecs } from \"./routeSpec\"\nexport type { RouteSpec } from \"./routeSpec\""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeRegistry.js","sourceRoot":"","sources":["../../../src/lib/route_factory/routeRegistry.ts"],"names":[],"mappings":";;;AASa,QAAA,aAAa,GAAsB,EAAE,CAAA","sourcesContent":["import type { RouteSpec } from \"./routeSpec\"\n\nexport type RegisteredRoute = RouteSpec & {\n fullPath: string // resolved Express path (includes basePath + version + scope + path)\n scope: string // resolved domain scope (e.g. access_control, auth)\n version: string // resolved API version (e.g. v1, v2)\n mcpToolId: string // unique MCP tool identifier (scope.module.action.version)\n}\n\nexport const routeRegistry: RegisteredRoute[] = []"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { RequestHandler } from "express";
|
|
2
|
+
import { ZodSchema } from "zod";
|
|
3
|
+
declare const methodMap: {
|
|
4
|
+
readonly get: "get";
|
|
5
|
+
readonly post: "post";
|
|
6
|
+
readonly put: "put";
|
|
7
|
+
readonly delete: "delete";
|
|
8
|
+
readonly patch: "patch";
|
|
9
|
+
};
|
|
10
|
+
type HttpMethod = keyof typeof methodMap;
|
|
11
|
+
type RouteSpecCrudAction = "list" | "get" | "create" | "update" | "delete";
|
|
12
|
+
type RouteSpecRelationAction = "assign" | "unassign" | "link" | "unlink" | "attach" | "detach";
|
|
13
|
+
type RouteSpecDomainAction = "revoke" | "replace" | "approve" | "reject" | "sync" | "reset";
|
|
14
|
+
export type RouteSpec = {
|
|
15
|
+
version?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
method: HttpMethod;
|
|
18
|
+
path: string;
|
|
19
|
+
basePath?: string;
|
|
20
|
+
mcpValidation?: {
|
|
21
|
+
body?: ZodSchema;
|
|
22
|
+
params?: ZodSchema;
|
|
23
|
+
query?: ZodSchema;
|
|
24
|
+
};
|
|
25
|
+
handler: RequestHandler;
|
|
26
|
+
scope?: string;
|
|
27
|
+
module?: string;
|
|
28
|
+
action?: RouteSpecCrudAction | RouteSpecRelationAction | RouteSpecDomainAction;
|
|
29
|
+
description?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const buildRouterFromRouteSpecs: (specs: RouteSpec[], context?: {
|
|
32
|
+
basePath?: string;
|
|
33
|
+
version?: string;
|
|
34
|
+
scope?: string;
|
|
35
|
+
}) => import("express-serve-static-core").Router;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildRouterFromRouteSpecs = void 0;
|
|
4
|
+
const express_1 = require("express");
|
|
5
|
+
const routeRegistry_1 = require("./routeRegistry");
|
|
6
|
+
const methodMap = {
|
|
7
|
+
get: "get",
|
|
8
|
+
post: "post",
|
|
9
|
+
put: "put",
|
|
10
|
+
delete: "delete",
|
|
11
|
+
patch: "patch",
|
|
12
|
+
};
|
|
13
|
+
const clean = (p) => p ? p.replace(/^\/+|\/+$/g, "") : "";
|
|
14
|
+
const buildFullPath = (s, context) => {
|
|
15
|
+
const version = s.version ?? context?.version;
|
|
16
|
+
const scope = s.scope ?? context?.scope;
|
|
17
|
+
const parts = [
|
|
18
|
+
clean(context?.basePath),
|
|
19
|
+
version ? clean(version) : null, // 👈 version first
|
|
20
|
+
clean(scope),
|
|
21
|
+
clean(s.path),
|
|
22
|
+
].filter(Boolean);
|
|
23
|
+
return "/" + parts.join("/");
|
|
24
|
+
};
|
|
25
|
+
const buildValidationMiddleware = (validation) => {
|
|
26
|
+
if (!validation)
|
|
27
|
+
return [];
|
|
28
|
+
return [
|
|
29
|
+
(req, res, next) => {
|
|
30
|
+
// TODO: replace with real Zod parsing later
|
|
31
|
+
try {
|
|
32
|
+
if (validation.body) {
|
|
33
|
+
validation.body.parse(req.body);
|
|
34
|
+
}
|
|
35
|
+
if (validation.params) {
|
|
36
|
+
validation.params.parse(req.params);
|
|
37
|
+
}
|
|
38
|
+
if (validation.query) {
|
|
39
|
+
validation.query.parse(req.query);
|
|
40
|
+
}
|
|
41
|
+
next();
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
res.status(400).json({
|
|
45
|
+
message: "Validation error",
|
|
46
|
+
error: err.errors || err.message
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
};
|
|
52
|
+
const buildRouterFromRouteSpecs = (specs, context) => {
|
|
53
|
+
const router = (0, express_1.Router)();
|
|
54
|
+
specs.forEach((s) => {
|
|
55
|
+
const method = methodMap[s.method];
|
|
56
|
+
// const fullPath =
|
|
57
|
+
// `${context?.basePath ?? ""}${s.path}`
|
|
58
|
+
const fullPath = buildFullPath(s, context);
|
|
59
|
+
const finalScope = s.scope ?? context?.scope;
|
|
60
|
+
if (!finalScope) {
|
|
61
|
+
throw new Error(`Missing scope for route: ${s.method.toUpperCase()} ${fullPath}`);
|
|
62
|
+
}
|
|
63
|
+
const version = s.version ?? context?.version ?? "v1";
|
|
64
|
+
const mcpToolId = `${finalScope}.${s.module}.${s.action ?? s.method}.${version}`;
|
|
65
|
+
const validationMiddleware = buildValidationMiddleware(s.mcpValidation);
|
|
66
|
+
// const handler =
|
|
67
|
+
// router[method].bind(router)
|
|
68
|
+
router[method](fullPath, // ✅ use computed path with basePath
|
|
69
|
+
...validationMiddleware, s.handler);
|
|
70
|
+
routeRegistry_1.routeRegistry.push({
|
|
71
|
+
...s,
|
|
72
|
+
scope: finalScope,
|
|
73
|
+
fullPath,
|
|
74
|
+
version,
|
|
75
|
+
mcpToolId
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
return router;
|
|
79
|
+
};
|
|
80
|
+
exports.buildRouterFromRouteSpecs = buildRouterFromRouteSpecs;
|
|
81
|
+
//# sourceMappingURL=routeSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeSpec.js","sourceRoot":"","sources":["../../../src/lib/route_factory/routeSpec.ts"],"names":[],"mappings":"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","sourcesContent":["import { Router } from \"express\"\nimport type { RequestHandler } from \"express\"\nimport { ZodSchema } from \"zod\"\nimport { routeRegistry } from \"./routeRegistry\"\n\nconst methodMap = {\n get: \"get\",\n post: \"post\",\n put: \"put\",\n delete: \"delete\",\n patch: \"patch\",\n} as const\n\ntype HttpMethod = keyof typeof methodMap\n\ntype RouteSpecCrudAction =\n | \"list\"\n | \"get\"\n | \"create\"\n | \"update\"\n | \"delete\"\n\ntype RouteSpecRelationAction =\n | \"assign\"\n | \"unassign\"\n | \"link\"\n | \"unlink\"\n | \"attach\"\n | \"detach\"\n\ntype RouteSpecDomainAction =\n | \"revoke\"\n | \"replace\"\n | \"approve\"\n | \"reject\"\n | \"sync\"\n | \"reset\"\n\nexport type RouteSpec = {\n version?: string // API versioning (v1, v2)\n id?: string; // unique route identifier\n\n method: HttpMethod; // HTTP method used by the endpoint\n\n path: string; // Express-style route path (e.g. /role/:roleId)\n\n basePath?: string; // optional prefix applied to route\n\n mcpValidation?: {\n body?: ZodSchema; // request body validation schema\n params?: ZodSchema; // URL params validation schema\n query?: ZodSchema; // query string validation schema\n };\n\n handler: RequestHandler; // actual request handler (controller function)\n\n scope?: string; // logical domain grouping (e.g. access_control, auth)\n\n module?: string; // feature/module name (e.g. role, user_roles)\n\n action?: RouteSpecCrudAction | RouteSpecRelationAction | RouteSpecDomainAction; // business action (create, update, delete, assign, etc.)\n\n description?: string; // human-readable description of the endpoint\n};\n\nconst clean = (p?: string) =>\n p ? p.replace(/^\\/+|\\/+$/g, \"\") : \"\"\n\nconst buildFullPath = (\n s: RouteSpec,\n context?: { basePath?: string; version?: string; scope?: string }\n) => {\n const version = s.version ?? context?.version\n const scope = s.scope ?? context?.scope\n\n const parts = [\n clean(context?.basePath),\n version ? clean(version) : null, // 👈 version first\n clean(scope),\n clean(s.path),\n ].filter(Boolean)\n\n\n return \"/\" + parts.join(\"/\")\n}\n\nconst buildValidationMiddleware = (\n validation?: RouteSpec[\"mcpValidation\"]\n): RequestHandler[] => {\n if (!validation) return []\n\n return [\n (req, res, next) => {\n // TODO: replace with real Zod parsing later\n\n try {\n if (validation.body) {\n validation.body.parse(req.body)\n }\n\n if (validation.params) {\n validation.params.parse(req.params)\n }\n\n if (validation.query) {\n validation.query.parse(req.query)\n }\n\n next()\n } catch (err: any) {\n res.status(400).json({\n message: \"Validation error\",\n error: err.errors || err.message\n })\n }\n }\n ]\n}\n\nexport const buildRouterFromRouteSpecs = (\n specs: RouteSpec[],\n context?: {\n basePath?: string\n version?: string\n scope?: string\n }\n) => {\n const router = Router()\n\n specs.forEach((s) => {\n const method = methodMap[s.method]\n\n // const fullPath =\n // `${context?.basePath ?? \"\"}${s.path}`\n\n const fullPath = buildFullPath(s, context)\n\n const finalScope =\n s.scope ?? context?.scope\n\n if (!finalScope) {\n throw new Error(\n `Missing scope for route: ${s.method.toUpperCase()} ${fullPath}`\n )\n }\n\n const version = s.version ?? context?.version ?? \"v1\"\n\n const mcpToolId = `${finalScope}.${s.module}.${s.action ?? s.method}.${version}`\n\n const validationMiddleware =\n buildValidationMiddleware(s.mcpValidation)\n\n // const handler =\n // router[method].bind(router)\n\n router[method](\n fullPath, // ✅ use computed path with basePath\n ...validationMiddleware,\n s.handler\n )\n\n routeRegistry.push({\n ...s,\n scope: finalScope,\n fullPath,\n version,\n mcpToolId\n })\n })\n\n return router\n}"]}
|
|
@@ -11,9 +11,10 @@ export declare const ModelBrandFields: {
|
|
|
11
11
|
istrash: "istrash";
|
|
12
12
|
accountid: "accountid";
|
|
13
13
|
status: "status";
|
|
14
|
-
name: "name";
|
|
15
14
|
description: "description";
|
|
16
15
|
brand_id: "brand_id";
|
|
16
|
+
brand_name: "brand_name";
|
|
17
|
+
brand_code: "brand_code";
|
|
17
18
|
};
|
|
18
19
|
export type ModelBrand = brands;
|
|
19
20
|
export type ModelBrandOmitFields = typeof primaryKey | DefaultOmitFields;
|
|
@@ -41,7 +42,7 @@ export type ModelBrandListProps = {
|
|
|
41
42
|
};
|
|
42
43
|
export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
43
44
|
selectedPrisma: any;
|
|
44
|
-
primaryKey: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "
|
|
45
|
+
primaryKey: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "description" | "brand_id" | "brand_name" | "brand_code";
|
|
45
46
|
getFields: (prefix?: string, excludeKeywords?: string[]) => Promise<{
|
|
46
47
|
name: string;
|
|
47
48
|
type: string;
|
|
@@ -56,10 +57,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
56
57
|
isdelete: boolean | null;
|
|
57
58
|
istrash: boolean | null;
|
|
58
59
|
accountid: bigint;
|
|
59
|
-
status:
|
|
60
|
-
name: string | null;
|
|
60
|
+
status: boolean | null;
|
|
61
61
|
description: string | null;
|
|
62
62
|
brand_id: bigint;
|
|
63
|
+
brand_name: string | null;
|
|
64
|
+
brand_code: string;
|
|
63
65
|
}>;
|
|
64
66
|
createMany: ({ dataList, disableRollback, }: {
|
|
65
67
|
dataList: Omit<any, DefaultOmitFields>[];
|
|
@@ -72,10 +74,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
72
74
|
isdelete: boolean | null;
|
|
73
75
|
istrash: boolean | null;
|
|
74
76
|
accountid: bigint;
|
|
75
|
-
status:
|
|
76
|
-
name: string | null;
|
|
77
|
+
status: boolean | null;
|
|
77
78
|
description: string | null;
|
|
78
79
|
brand_id: bigint;
|
|
80
|
+
brand_name: string | null;
|
|
81
|
+
brand_code: string;
|
|
79
82
|
}[]>;
|
|
80
83
|
get: ({ id, where, include, }: {
|
|
81
84
|
id?: number;
|
|
@@ -89,10 +92,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
89
92
|
isdelete: boolean | null;
|
|
90
93
|
istrash: boolean | null;
|
|
91
94
|
accountid: bigint;
|
|
92
|
-
status:
|
|
93
|
-
name: string | null;
|
|
95
|
+
status: boolean | null;
|
|
94
96
|
description: string | null;
|
|
95
97
|
brand_id: bigint;
|
|
98
|
+
brand_name: string | null;
|
|
99
|
+
brand_code: string;
|
|
96
100
|
} | null>;
|
|
97
101
|
list: ({ where, orderBy, offset, limit, include, }?: any) => Promise<{
|
|
98
102
|
createdatetime: Date | null;
|
|
@@ -102,16 +106,17 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
102
106
|
isdelete: boolean | null;
|
|
103
107
|
istrash: boolean | null;
|
|
104
108
|
accountid: bigint;
|
|
105
|
-
status:
|
|
106
|
-
name: string | null;
|
|
109
|
+
status: boolean | null;
|
|
107
110
|
description: string | null;
|
|
108
111
|
brand_id: bigint;
|
|
112
|
+
brand_name: string | null;
|
|
113
|
+
brand_code: string;
|
|
109
114
|
}[]>;
|
|
110
115
|
count: ({ where, }?: {
|
|
111
116
|
where?: Record<string, any>;
|
|
112
117
|
}) => Promise<number>;
|
|
113
118
|
aggregate: ({ field, operation, where, }: {
|
|
114
|
-
field: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "
|
|
119
|
+
field: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "description" | "brand_id" | "brand_name" | "brand_code";
|
|
115
120
|
operation?: "sum" | "avg" | "min" | "max" | "count";
|
|
116
121
|
where?: Record<string, any>;
|
|
117
122
|
}) => Promise<number>;
|
|
@@ -126,10 +131,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
126
131
|
isdelete: boolean | null;
|
|
127
132
|
istrash: boolean | null;
|
|
128
133
|
accountid: bigint;
|
|
129
|
-
status:
|
|
130
|
-
name: string | null;
|
|
134
|
+
status: boolean | null;
|
|
131
135
|
description: string | null;
|
|
132
136
|
brand_id: bigint;
|
|
137
|
+
brand_name: string | null;
|
|
138
|
+
brand_code: string;
|
|
133
139
|
}>;
|
|
134
140
|
disableRollback?: boolean;
|
|
135
141
|
}) => Promise<{
|
|
@@ -140,10 +146,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
140
146
|
isdelete: boolean | null;
|
|
141
147
|
istrash: boolean | null;
|
|
142
148
|
accountid: bigint;
|
|
143
|
-
status:
|
|
144
|
-
name: string | null;
|
|
149
|
+
status: boolean | null;
|
|
145
150
|
description: string | null;
|
|
146
151
|
brand_id: bigint;
|
|
152
|
+
brand_name: string | null;
|
|
153
|
+
brand_code: string;
|
|
147
154
|
}>;
|
|
148
155
|
updateMany: ({ dataList, disableRollback, }: {
|
|
149
156
|
dataList: {
|
|
@@ -156,10 +163,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
156
163
|
isdelete: boolean | null;
|
|
157
164
|
istrash: boolean | null;
|
|
158
165
|
accountid: bigint;
|
|
159
|
-
status:
|
|
160
|
-
name: string | null;
|
|
166
|
+
status: boolean | null;
|
|
161
167
|
description: string | null;
|
|
162
168
|
brand_id: bigint;
|
|
169
|
+
brand_name: string | null;
|
|
170
|
+
brand_code: string;
|
|
163
171
|
}>;
|
|
164
172
|
}[];
|
|
165
173
|
disableRollback?: boolean;
|
|
@@ -171,10 +179,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
171
179
|
isdelete: boolean | null;
|
|
172
180
|
istrash: boolean | null;
|
|
173
181
|
accountid: bigint;
|
|
174
|
-
status:
|
|
175
|
-
name: string | null;
|
|
182
|
+
status: boolean | null;
|
|
176
183
|
description: string | null;
|
|
177
184
|
brand_id: bigint;
|
|
185
|
+
brand_name: string | null;
|
|
186
|
+
brand_code: string;
|
|
178
187
|
}[]>;
|
|
179
188
|
trash: ({ ids }: {
|
|
180
189
|
ids: number[];
|
|
@@ -186,10 +195,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
186
195
|
isdelete: boolean | null;
|
|
187
196
|
istrash: boolean | null;
|
|
188
197
|
accountid: bigint;
|
|
189
|
-
status:
|
|
190
|
-
name: string | null;
|
|
198
|
+
status: boolean | null;
|
|
191
199
|
description: string | null;
|
|
192
200
|
brand_id: bigint;
|
|
201
|
+
brand_name: string | null;
|
|
202
|
+
brand_code: string;
|
|
193
203
|
}[]>;
|
|
194
204
|
remove: ({ ids, where }: {
|
|
195
205
|
ids?: number[];
|
|
@@ -202,10 +212,11 @@ export declare const BrandModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
202
212
|
isdelete: boolean | null;
|
|
203
213
|
istrash: boolean | null;
|
|
204
214
|
accountid: bigint;
|
|
205
|
-
status:
|
|
206
|
-
name: string | null;
|
|
215
|
+
status: boolean | null;
|
|
207
216
|
description: string | null;
|
|
208
217
|
brand_id: bigint;
|
|
218
|
+
brand_name: string | null;
|
|
219
|
+
brand_code: string;
|
|
209
220
|
}[]>;
|
|
210
221
|
raw: <T = any>(query: string, params?: any[]) => Promise<T[]>;
|
|
211
222
|
};
|
|
@@ -11,10 +11,11 @@ export declare const ModelCategoryFields: {
|
|
|
11
11
|
istrash: "istrash";
|
|
12
12
|
accountid: "accountid";
|
|
13
13
|
status: "status";
|
|
14
|
-
name: "name";
|
|
15
14
|
description: "description";
|
|
16
15
|
category_id: "category_id";
|
|
16
|
+
category_code: "category_code";
|
|
17
17
|
parent_category_id: "parent_category_id";
|
|
18
|
+
category_name: "category_name";
|
|
18
19
|
};
|
|
19
20
|
export type ModelCategory = categories;
|
|
20
21
|
export type ModelCategoryOmitFields = typeof primaryKey | DefaultOmitFields;
|
|
@@ -42,7 +43,7 @@ export type ModelCategoryListProps = {
|
|
|
42
43
|
};
|
|
43
44
|
export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
44
45
|
selectedPrisma: any;
|
|
45
|
-
primaryKey: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "
|
|
46
|
+
primaryKey: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "description" | "category_id" | "category_code" | "parent_category_id" | "category_name";
|
|
46
47
|
getFields: (prefix?: string, excludeKeywords?: string[]) => Promise<{
|
|
47
48
|
name: string;
|
|
48
49
|
type: string;
|
|
@@ -57,11 +58,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
57
58
|
isdelete: boolean | null;
|
|
58
59
|
istrash: boolean | null;
|
|
59
60
|
accountid: bigint;
|
|
60
|
-
status:
|
|
61
|
-
name: string | null;
|
|
61
|
+
status: boolean | null;
|
|
62
62
|
description: string | null;
|
|
63
63
|
category_id: bigint;
|
|
64
|
+
category_code: string;
|
|
64
65
|
parent_category_id: bigint;
|
|
66
|
+
category_name: string | null;
|
|
65
67
|
}>;
|
|
66
68
|
createMany: ({ dataList, disableRollback, }: {
|
|
67
69
|
dataList: Omit<any, DefaultOmitFields>[];
|
|
@@ -74,11 +76,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
74
76
|
isdelete: boolean | null;
|
|
75
77
|
istrash: boolean | null;
|
|
76
78
|
accountid: bigint;
|
|
77
|
-
status:
|
|
78
|
-
name: string | null;
|
|
79
|
+
status: boolean | null;
|
|
79
80
|
description: string | null;
|
|
80
81
|
category_id: bigint;
|
|
82
|
+
category_code: string;
|
|
81
83
|
parent_category_id: bigint;
|
|
84
|
+
category_name: string | null;
|
|
82
85
|
}[]>;
|
|
83
86
|
get: ({ id, where, include, }: {
|
|
84
87
|
id?: number;
|
|
@@ -92,11 +95,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
92
95
|
isdelete: boolean | null;
|
|
93
96
|
istrash: boolean | null;
|
|
94
97
|
accountid: bigint;
|
|
95
|
-
status:
|
|
96
|
-
name: string | null;
|
|
98
|
+
status: boolean | null;
|
|
97
99
|
description: string | null;
|
|
98
100
|
category_id: bigint;
|
|
101
|
+
category_code: string;
|
|
99
102
|
parent_category_id: bigint;
|
|
103
|
+
category_name: string | null;
|
|
100
104
|
} | null>;
|
|
101
105
|
list: ({ where, orderBy, offset, limit, include, }?: any) => Promise<{
|
|
102
106
|
createdatetime: Date | null;
|
|
@@ -106,17 +110,18 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
106
110
|
isdelete: boolean | null;
|
|
107
111
|
istrash: boolean | null;
|
|
108
112
|
accountid: bigint;
|
|
109
|
-
status:
|
|
110
|
-
name: string | null;
|
|
113
|
+
status: boolean | null;
|
|
111
114
|
description: string | null;
|
|
112
115
|
category_id: bigint;
|
|
116
|
+
category_code: string;
|
|
113
117
|
parent_category_id: bigint;
|
|
118
|
+
category_name: string | null;
|
|
114
119
|
}[]>;
|
|
115
120
|
count: ({ where, }?: {
|
|
116
121
|
where?: Record<string, any>;
|
|
117
122
|
}) => Promise<number>;
|
|
118
123
|
aggregate: ({ field, operation, where, }: {
|
|
119
|
-
field: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "
|
|
124
|
+
field: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "description" | "category_id" | "category_code" | "parent_category_id" | "category_name";
|
|
120
125
|
operation?: "sum" | "avg" | "min" | "max" | "count";
|
|
121
126
|
where?: Record<string, any>;
|
|
122
127
|
}) => Promise<number>;
|
|
@@ -131,11 +136,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
131
136
|
isdelete: boolean | null;
|
|
132
137
|
istrash: boolean | null;
|
|
133
138
|
accountid: bigint;
|
|
134
|
-
status:
|
|
135
|
-
name: string | null;
|
|
139
|
+
status: boolean | null;
|
|
136
140
|
description: string | null;
|
|
137
141
|
category_id: bigint;
|
|
142
|
+
category_code: string;
|
|
138
143
|
parent_category_id: bigint;
|
|
144
|
+
category_name: string | null;
|
|
139
145
|
}>;
|
|
140
146
|
disableRollback?: boolean;
|
|
141
147
|
}) => Promise<{
|
|
@@ -146,11 +152,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
146
152
|
isdelete: boolean | null;
|
|
147
153
|
istrash: boolean | null;
|
|
148
154
|
accountid: bigint;
|
|
149
|
-
status:
|
|
150
|
-
name: string | null;
|
|
155
|
+
status: boolean | null;
|
|
151
156
|
description: string | null;
|
|
152
157
|
category_id: bigint;
|
|
158
|
+
category_code: string;
|
|
153
159
|
parent_category_id: bigint;
|
|
160
|
+
category_name: string | null;
|
|
154
161
|
}>;
|
|
155
162
|
updateMany: ({ dataList, disableRollback, }: {
|
|
156
163
|
dataList: {
|
|
@@ -163,11 +170,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
163
170
|
isdelete: boolean | null;
|
|
164
171
|
istrash: boolean | null;
|
|
165
172
|
accountid: bigint;
|
|
166
|
-
status:
|
|
167
|
-
name: string | null;
|
|
173
|
+
status: boolean | null;
|
|
168
174
|
description: string | null;
|
|
169
175
|
category_id: bigint;
|
|
176
|
+
category_code: string;
|
|
170
177
|
parent_category_id: bigint;
|
|
178
|
+
category_name: string | null;
|
|
171
179
|
}>;
|
|
172
180
|
}[];
|
|
173
181
|
disableRollback?: boolean;
|
|
@@ -179,11 +187,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
179
187
|
isdelete: boolean | null;
|
|
180
188
|
istrash: boolean | null;
|
|
181
189
|
accountid: bigint;
|
|
182
|
-
status:
|
|
183
|
-
name: string | null;
|
|
190
|
+
status: boolean | null;
|
|
184
191
|
description: string | null;
|
|
185
192
|
category_id: bigint;
|
|
193
|
+
category_code: string;
|
|
186
194
|
parent_category_id: bigint;
|
|
195
|
+
category_name: string | null;
|
|
187
196
|
}[]>;
|
|
188
197
|
trash: ({ ids }: {
|
|
189
198
|
ids: number[];
|
|
@@ -195,11 +204,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
195
204
|
isdelete: boolean | null;
|
|
196
205
|
istrash: boolean | null;
|
|
197
206
|
accountid: bigint;
|
|
198
|
-
status:
|
|
199
|
-
name: string | null;
|
|
207
|
+
status: boolean | null;
|
|
200
208
|
description: string | null;
|
|
201
209
|
category_id: bigint;
|
|
210
|
+
category_code: string;
|
|
202
211
|
parent_category_id: bigint;
|
|
212
|
+
category_name: string | null;
|
|
203
213
|
}[]>;
|
|
204
214
|
remove: ({ ids, where }: {
|
|
205
215
|
ids?: number[];
|
|
@@ -212,11 +222,12 @@ export declare const CategoryModel: ({ ...rest }: DefaultServiceProps) => {
|
|
|
212
222
|
isdelete: boolean | null;
|
|
213
223
|
istrash: boolean | null;
|
|
214
224
|
accountid: bigint;
|
|
215
|
-
status:
|
|
216
|
-
name: string | null;
|
|
225
|
+
status: boolean | null;
|
|
217
226
|
description: string | null;
|
|
218
227
|
category_id: bigint;
|
|
228
|
+
category_code: string;
|
|
219
229
|
parent_category_id: bigint;
|
|
230
|
+
category_name: string | null;
|
|
220
231
|
}[]>;
|
|
221
232
|
raw: <T = any>(query: string, params?: any[]) => Promise<T[]>;
|
|
222
233
|
};
|