@servicelabsco/slabs-access-manager 1.0.27 → 1.0.28
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/AGENTS.md +101 -0
- package/dist/access/es6.classes.d.ts +1 -1
- package/dist/access/jobs/set.business.script.schedule.job.js +8 -3
- package/dist/access/jobs/set.business.script.schedule.job.js.map +1 -1
- package/dist/access/libraries/process.app.integration.js +1 -1
- package/dist/access/libraries/process.app.integration.js.map +1 -1
- package/dist/accessUtility/entities/bulk.upload.entity.d.ts +13 -1
- package/dist/accessUtility/entities/bulk.upload.entity.js +30 -0
- package/dist/accessUtility/entities/bulk.upload.entity.js.map +1 -1
- package/dist/accessUtility/enums/bulk.upload.status.type.enum.d.ts +6 -0
- package/dist/accessUtility/enums/bulk.upload.status.type.enum.js +11 -0
- package/dist/accessUtility/enums/bulk.upload.status.type.enum.js.map +1 -0
- package/dist/accessUtility/enums/index.d.ts +1 -0
- package/dist/accessUtility/enums/index.js +1 -0
- package/dist/accessUtility/enums/index.js.map +1 -1
- package/dist/accessUtility/es6.classes.d.ts +6 -4
- package/dist/accessUtility/es6.classes.js +11 -1
- package/dist/accessUtility/es6.classes.js.map +1 -1
- package/dist/accessUtility/jobs/analyse.bulk.upload.job.js +8 -0
- package/dist/accessUtility/jobs/analyse.bulk.upload.job.js.map +1 -1
- package/dist/accessUtility/jobs/bulk.upload.job.d.ts +8 -4
- package/dist/accessUtility/jobs/bulk.upload.job.js +41 -7
- package/dist/accessUtility/jobs/bulk.upload.job.js.map +1 -1
- package/dist/accessUtility/jobs/index.d.ts +1 -0
- package/dist/accessUtility/jobs/index.js +1 -0
- package/dist/accessUtility/jobs/index.js.map +1 -1
- package/dist/accessUtility/jobs/set.bulk.upload.status.job.d.ts +10 -0
- package/dist/accessUtility/jobs/set.bulk.upload.status.job.js +36 -0
- package/dist/accessUtility/jobs/set.bulk.upload.status.job.js.map +1 -0
- package/dist/accessUtility/services/es6.jobs.service.d.ts +3 -1
- package/dist/accessUtility/services/es6.jobs.service.js +5 -1
- package/dist/accessUtility/services/es6.jobs.service.js.map +1 -1
- package/dist/accessWorkflow/es6.classes.d.ts +6 -5
- package/dist/accessWorkflow/es6.classes.js +2 -0
- package/dist/accessWorkflow/es6.classes.js.map +1 -1
- package/dist/accessWorkflow/jobs/bulk.upload.workflow.stage.status.job.d.ts +12 -0
- package/dist/accessWorkflow/jobs/bulk.upload.workflow.stage.status.job.js +59 -0
- package/dist/accessWorkflow/jobs/bulk.upload.workflow.stage.status.job.js.map +1 -0
- package/dist/accessWorkflow/jobs/index.d.ts +1 -0
- package/dist/accessWorkflow/jobs/index.js +1 -0
- package/dist/accessWorkflow/jobs/index.js.map +1 -1
- package/dist/accessWorkflow/libraries/common.workflow.generator.d.ts +1 -1
- package/dist/accessWorkflow/services/es6.jobs.service.d.ts +3 -1
- package/dist/accessWorkflow/services/es6.jobs.service.js +5 -1
- package/dist/accessWorkflow/services/es6.jobs.service.js.map +1 -1
- package/dist/config/source.hash.d.ts +1 -0
- package/dist/config/source.hash.js +1 -0
- package/dist/config/source.hash.js.map +1 -1
- package/dist/development/registries/development.entity.registry.js +0 -2
- package/dist/development/registries/development.entity.registry.js.map +1 -1
- package/dist/mcp/admin/tools/admin.tool.registry.js +0 -10
- package/dist/mcp/admin/tools/admin.tool.registry.js.map +1 -1
- package/dist/mcp/admin/tools/index.d.ts +0 -1
- package/dist/mcp/admin/tools/index.js +0 -1
- package/dist/mcp/admin/tools/index.js.map +1 -1
- package/dist/migrations/1780645998210-AddBulkUploadStatusTypeDataSeederTable.d.ts +7 -0
- package/dist/migrations/1780645998210-AddBulkUploadStatusTypeDataSeederTable.js +58 -0
- package/dist/migrations/1780645998210-AddBulkUploadStatusTypeDataSeederTable.js.map +1 -0
- package/dist/migrations/1780646053970-AddWorkflowColumnsUtlBulkUploadsTable.d.ts +5 -0
- package/dist/migrations/1780646053970-AddWorkflowColumnsUtlBulkUploadsTable.js +17 -0
- package/dist/migrations/1780646053970-AddWorkflowColumnsUtlBulkUploadsTable.js.map +1 -0
- package/package.json +1 -1
- package/dist/mcp/admin/tools/product/index.d.ts +0 -5
- package/dist/mcp/admin/tools/product/index.js +0 -22
- package/dist/mcp/admin/tools/product/index.js.map +0 -1
- package/dist/mcp/admin/tools/product/product.create.tool.d.ts +0 -18
- package/dist/mcp/admin/tools/product/product.create.tool.js +0 -23
- package/dist/mcp/admin/tools/product/product.create.tool.js.map +0 -1
- package/dist/mcp/admin/tools/product/product.delete.tool.d.ts +0 -17
- package/dist/mcp/admin/tools/product/product.delete.tool.js +0 -23
- package/dist/mcp/admin/tools/product/product.delete.tool.js.map +0 -1
- package/dist/mcp/admin/tools/product/product.get.tool.d.ts +0 -17
- package/dist/mcp/admin/tools/product/product.get.tool.js +0 -23
- package/dist/mcp/admin/tools/product/product.get.tool.js.map +0 -1
- package/dist/mcp/admin/tools/product/product.list.tool.d.ts +0 -23
- package/dist/mcp/admin/tools/product/product.list.tool.js +0 -40
- package/dist/mcp/admin/tools/product/product.list.tool.js.map +0 -1
- package/dist/mcp/admin/tools/product/product.update.tool.d.ts +0 -20
- package/dist/mcp/admin/tools/product/product.update.tool.js +0 -25
- package/dist/mcp/admin/tools/product/product.update.tool.js.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddBulkUploadStatusTypeDataSeederTable1780645998210 = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class AddBulkUploadStatusTypeDataSeederTable1780645998210 extends nestjs_utility_services_1.SeederUtility {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('sys_lookup_values');
|
|
8
|
+
this.process();
|
|
9
|
+
}
|
|
10
|
+
process() {
|
|
11
|
+
this.addLookupType();
|
|
12
|
+
this.addLookupValues();
|
|
13
|
+
}
|
|
14
|
+
addLookupType() {
|
|
15
|
+
this.addRecord({
|
|
16
|
+
id: 176,
|
|
17
|
+
name: 'Bulk Upload Status Types',
|
|
18
|
+
description: 'Approval states for bulk uploads',
|
|
19
|
+
}, 'sys_lookup_types');
|
|
20
|
+
}
|
|
21
|
+
addLookupValues() {
|
|
22
|
+
const records = [
|
|
23
|
+
{
|
|
24
|
+
id: 5107,
|
|
25
|
+
name: 'Pending Approval',
|
|
26
|
+
value: 'Pending Approval',
|
|
27
|
+
description: 'Pending Approval',
|
|
28
|
+
lookup_type_id: 176,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 5108,
|
|
32
|
+
name: 'Approved',
|
|
33
|
+
value: 'Approved',
|
|
34
|
+
description: 'Approved',
|
|
35
|
+
lookup_type_id: 176,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 5109,
|
|
39
|
+
name: 'Rejected',
|
|
40
|
+
value: 'Rejected',
|
|
41
|
+
description: 'Rejected',
|
|
42
|
+
lookup_type_id: 176,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 5110,
|
|
46
|
+
name: 'On Hold',
|
|
47
|
+
value: 'On Hold',
|
|
48
|
+
description: 'On Hold',
|
|
49
|
+
lookup_type_id: 176,
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
for (const record of records) {
|
|
53
|
+
this.addRecord(record);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.AddBulkUploadStatusTypeDataSeederTable1780645998210 = AddBulkUploadStatusTypeDataSeederTable1780645998210;
|
|
58
|
+
//# sourceMappingURL=1780645998210-AddBulkUploadStatusTypeDataSeederTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1780645998210-AddBulkUploadStatusTypeDataSeederTable.js","sourceRoot":"","sources":["../../src/migrations/1780645998210-AddBulkUploadStatusTypeDataSeederTable.ts"],"names":[],"mappings":";;;AAAA,oFAAuE;AAEvE,MAAa,mDAAoD,SAAQ,uCAAa;IAClF;QACI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa;QACT,IAAI,CAAC,SAAS,CACV;YACI,EAAE,EAAE,GAAG;YACP,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,kCAAkC;SAClD,EACD,kBAAkB,CACrB,CAAC;IACN,CAAC;IAED,eAAe;QACX,MAAM,OAAO,GAAG;YACZ;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,kBAAkB;gBAC/B,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,UAAU;gBACvB,cAAc,EAAE,GAAG;aACtB;YACD;gBACI,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,SAAS;gBACtB,cAAc,EAAE,GAAG;aACtB;SACJ,CAAC;QAEF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;CACJ;AA1DD,kHA0DC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddWorkflowColumnsUtlBulkUploadsTable1780646053970 = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class AddWorkflowColumnsUtlBulkUploadsTable1780646053970 extends nestjs_utility_services_1.MigrationUtility {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('utl_bulk_uploads');
|
|
8
|
+
this.process();
|
|
9
|
+
}
|
|
10
|
+
process() {
|
|
11
|
+
this.boolean('active', true);
|
|
12
|
+
this.foreign({ name: 'status_id', foreignTable: 'sys_lookup_values' });
|
|
13
|
+
this.foreign({ name: 'active_approval_id', foreignTable: 'wf_workflow_steps' });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.AddWorkflowColumnsUtlBulkUploadsTable1780646053970 = AddWorkflowColumnsUtlBulkUploadsTable1780646053970;
|
|
17
|
+
//# sourceMappingURL=1780646053970-AddWorkflowColumnsUtlBulkUploadsTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1780646053970-AddWorkflowColumnsUtlBulkUploadsTable.js","sourceRoot":"","sources":["../../src/migrations/1780646053970-AddWorkflowColumnsUtlBulkUploadsTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,kDAAmD,SAAQ,0CAAgB;IACpF;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACpF,CAAC;CACJ;AAXD,gHAWC"}
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./product.create.tool"), exports);
|
|
18
|
-
__exportStar(require("./product.delete.tool"), exports);
|
|
19
|
-
__exportStar(require("./product.get.tool"), exports);
|
|
20
|
-
__exportStar(require("./product.list.tool"), exports);
|
|
21
|
-
__exportStar(require("./product.update.tool"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/product/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,qDAAmC;AAAA,sDAAoC;AAAA,wDAAqC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
-
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
-
type ProductCreateInput = {
|
|
5
|
-
name: string;
|
|
6
|
-
attributes?: Record<string, unknown>;
|
|
7
|
-
};
|
|
8
|
-
export declare class ProductCreateTool extends McpTool<ProductCreateInput> {
|
|
9
|
-
readonly name = "product_create";
|
|
10
|
-
readonly title = "Create product (admin)";
|
|
11
|
-
readonly description = "Create a product record directly in the database (admin/development only). Returns the created row.";
|
|
12
|
-
readonly inputSchema: {
|
|
13
|
-
name: z.ZodString;
|
|
14
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
-
};
|
|
16
|
-
execute(args: ProductCreateInput): Promise<McpToolResultInterface>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductCreateTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
-
const inputSchema = {
|
|
7
|
-
name: zod_1.z.string().describe('Product name.'),
|
|
8
|
-
attributes: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Arbitrary JSON attributes (json column).'),
|
|
9
|
-
};
|
|
10
|
-
class ProductCreateTool extends mcp_tool_1.McpTool {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.name = 'product_create';
|
|
14
|
-
this.title = 'Create product (admin)';
|
|
15
|
-
this.description = 'Create a product record directly in the database (admin/development only). Returns the created row.';
|
|
16
|
-
this.inputSchema = inputSchema;
|
|
17
|
-
}
|
|
18
|
-
execute(args) {
|
|
19
|
-
return this.run(() => this.client.request({ method: 'POST', path: 'development/product', body: args }));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.ProductCreateTool = ProductCreateTool;
|
|
23
|
-
//# sourceMappingURL=product.create.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.create.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/product/product.create.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;IAC1C,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAChH,CAAC;AAWF,MAAa,iBAAkB,SAAQ,kBAA2B;IAAlE;;QACa,SAAI,GAAG,gBAAgB,CAAC;QACxB,UAAK,GAAG,wBAAwB,CAAC;QACjC,gBAAW,GAAG,qGAAqG,CAAC;QACpH,gBAAW,GAAG,WAAW,CAAC;IAKvC,CAAC;IAHG,OAAO,CAAC,IAAwB;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5G,CAAC;CACJ;AATD,8CASC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
-
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
-
type ProductDeleteInput = {
|
|
5
|
-
id: number;
|
|
6
|
-
};
|
|
7
|
-
export declare class ProductDeleteTool extends McpTool<ProductDeleteInput> {
|
|
8
|
-
readonly name = "product_delete";
|
|
9
|
-
readonly title = "Delete product (admin)";
|
|
10
|
-
readonly description = "Soft-delete a product record by id (sets deleted_at; not a hard delete). Admin/development only.";
|
|
11
|
-
readonly inputSchema: {
|
|
12
|
-
id: z.ZodNumber;
|
|
13
|
-
};
|
|
14
|
-
protected readonly destructive = true;
|
|
15
|
-
execute(args: ProductDeleteInput): Promise<McpToolResultInterface>;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductDeleteTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
-
const inputSchema = {
|
|
7
|
-
id: zod_1.z.number().int().positive().describe('Id of the product row to soft-delete.'),
|
|
8
|
-
};
|
|
9
|
-
class ProductDeleteTool extends mcp_tool_1.McpTool {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.name = 'product_delete';
|
|
13
|
-
this.title = 'Delete product (admin)';
|
|
14
|
-
this.description = 'Soft-delete a product record by id (sets deleted_at; not a hard delete). Admin/development only.';
|
|
15
|
-
this.inputSchema = inputSchema;
|
|
16
|
-
this.destructive = true;
|
|
17
|
-
}
|
|
18
|
-
execute(args) {
|
|
19
|
-
return this.run(() => this.client.request({ method: 'DELETE', path: `development/product/${args.id}` }));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.ProductDeleteTool = ProductDeleteTool;
|
|
23
|
-
//# sourceMappingURL=product.delete.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.delete.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/product/product.delete.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CACpF,CAAC;AAQF,MAAa,iBAAkB,SAAQ,kBAA2B;IAAlE;;QACa,SAAI,GAAG,gBAAgB,CAAC;QACxB,UAAK,GAAG,wBAAwB,CAAC;QACjC,gBAAW,GAAG,kGAAkG,CAAC;QACjH,gBAAW,GAAG,WAAW,CAAC;QAChB,gBAAW,GAAG,IAAI,CAAC;IAK1C,CAAC;IAHG,OAAO,CAAC,IAAwB;QAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC7G,CAAC;CACJ;AAVD,8CAUC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
-
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
-
type ProductGetInput = {
|
|
5
|
-
id: number;
|
|
6
|
-
};
|
|
7
|
-
export declare class ProductGetTool extends McpTool<ProductGetInput> {
|
|
8
|
-
readonly name = "product_get";
|
|
9
|
-
readonly title = "Get product (admin)";
|
|
10
|
-
readonly description = "Fetch a single product record by id directly from the database (admin/development only).";
|
|
11
|
-
readonly inputSchema: {
|
|
12
|
-
id: z.ZodNumber;
|
|
13
|
-
};
|
|
14
|
-
protected readonly readOnly = true;
|
|
15
|
-
execute(args: ProductGetInput): Promise<McpToolResultInterface>;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductGetTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
-
const inputSchema = {
|
|
7
|
-
id: zod_1.z.number().int().positive().describe('Id of the product row to fetch.'),
|
|
8
|
-
};
|
|
9
|
-
class ProductGetTool extends mcp_tool_1.McpTool {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.name = 'product_get';
|
|
13
|
-
this.title = 'Get product (admin)';
|
|
14
|
-
this.description = 'Fetch a single product record by id directly from the database (admin/development only).';
|
|
15
|
-
this.inputSchema = inputSchema;
|
|
16
|
-
this.readOnly = true;
|
|
17
|
-
}
|
|
18
|
-
execute(args) {
|
|
19
|
-
return this.run(() => this.client.request({ method: 'GET', path: `development/product/${args.id}` }));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.ProductGetTool = ProductGetTool;
|
|
23
|
-
//# sourceMappingURL=product.get.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.get.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/product/product.get.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CAC9E,CAAC;AAOF,MAAa,cAAe,SAAQ,kBAAwB;IAA5D;;QACa,SAAI,GAAG,aAAa,CAAC;QACrB,UAAK,GAAG,qBAAqB,CAAC;QAC9B,gBAAW,GAAG,0FAA0F,CAAC;QACzG,gBAAW,GAAG,WAAW,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC;IAKvC,CAAC;IAHG,OAAO,CAAC,IAAqB;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC1G,CAAC;CACJ;AAVD,wCAUC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
-
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
-
type ProductListInput = {
|
|
5
|
-
limit?: number;
|
|
6
|
-
offset?: number;
|
|
7
|
-
order?: string;
|
|
8
|
-
filter?: Record<string, unknown>;
|
|
9
|
-
};
|
|
10
|
-
export declare class ProductListTool extends McpTool<ProductListInput> {
|
|
11
|
-
readonly name = "product_list";
|
|
12
|
-
readonly title = "List products (admin)";
|
|
13
|
-
readonly description = "List product records directly from the database with paging, ordering, and column-equality filters (admin/development only).";
|
|
14
|
-
readonly inputSchema: {
|
|
15
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
16
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
17
|
-
order: z.ZodOptional<z.ZodString>;
|
|
18
|
-
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
19
|
-
};
|
|
20
|
-
protected readonly readOnly = true;
|
|
21
|
-
execute(args: ProductListInput): Promise<McpToolResultInterface>;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductListTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
-
const inputSchema = {
|
|
7
|
-
limit: zod_1.z.number().int().min(0).optional().describe('Max rows to return (default 50).'),
|
|
8
|
-
offset: zod_1.z.number().int().min(0).optional().describe('Rows to skip (default 0).'),
|
|
9
|
-
order: zod_1.z.string().optional().describe('Order as "column" or "column:asc|desc", e.g. "id:desc".'),
|
|
10
|
-
filter: zod_1.z
|
|
11
|
-
.record(zod_1.z.string(), zod_1.z.unknown())
|
|
12
|
-
.optional()
|
|
13
|
-
.describe('Column-equality filters, e.g. { "name": "Payments" }. Non-column keys are ignored.'),
|
|
14
|
-
};
|
|
15
|
-
class ProductListTool extends mcp_tool_1.McpTool {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.name = 'product_list';
|
|
19
|
-
this.title = 'List products (admin)';
|
|
20
|
-
this.description = 'List product records directly from the database with paging, ordering, and column-equality filters (admin/development only).';
|
|
21
|
-
this.inputSchema = inputSchema;
|
|
22
|
-
this.readOnly = true;
|
|
23
|
-
}
|
|
24
|
-
execute(args) {
|
|
25
|
-
const params = new URLSearchParams();
|
|
26
|
-
if (args.limit !== undefined)
|
|
27
|
-
params.set('limit', String(args.limit));
|
|
28
|
-
if (args.offset !== undefined)
|
|
29
|
-
params.set('offset', String(args.offset));
|
|
30
|
-
if (args.order)
|
|
31
|
-
params.set('order', args.order);
|
|
32
|
-
if (args.filter)
|
|
33
|
-
params.set('filter', JSON.stringify(args.filter));
|
|
34
|
-
const query = params.toString();
|
|
35
|
-
const path = `development/product${query ? `?${query}` : ''}`;
|
|
36
|
-
return this.run(() => this.client.request({ method: 'GET', path }));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.ProductListTool = ProductListTool;
|
|
40
|
-
//# sourceMappingURL=product.list.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.list.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/product/product.list.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACtF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAChF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;IAChG,MAAM,EAAE,OAAC;SACJ,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;SAC/B,QAAQ,EAAE;SACV,QAAQ,CAAC,oFAAoF,CAAC;CACtG,CAAC;AAaF,MAAa,eAAgB,SAAQ,kBAAyB;IAA9D;;QACa,SAAI,GAAG,cAAc,CAAC;QACtB,UAAK,GAAG,uBAAuB,CAAC;QAChC,gBAAW,GAChB,8HAA8H,CAAC;QAC1H,gBAAW,GAAG,WAAW,CAAC;QAChB,aAAQ,GAAG,IAAI,CAAC;IAcvC,CAAC;IAZG,OAAO,CAAC,IAAsB;QAC1B,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACzE,IAAI,IAAI,CAAC,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAEnE,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,sBAAsB,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAE9D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ;AApBD,0CAoBC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { McpToolResultInterface } from '../../../interfaces/mcp.tool.result.interface';
|
|
3
|
-
import { McpTool } from '../../../tools/mcp.tool';
|
|
4
|
-
type ProductUpdateInput = {
|
|
5
|
-
id: number;
|
|
6
|
-
name?: string;
|
|
7
|
-
attributes?: Record<string, unknown>;
|
|
8
|
-
};
|
|
9
|
-
export declare class ProductUpdateTool extends McpTool<ProductUpdateInput> {
|
|
10
|
-
readonly name = "product_update";
|
|
11
|
-
readonly title = "Update product (admin)";
|
|
12
|
-
readonly description = "Update fields of a product record directly in the database (admin/development only). Returns the updated row.";
|
|
13
|
-
readonly inputSchema: {
|
|
14
|
-
id: z.ZodNumber;
|
|
15
|
-
name: z.ZodOptional<z.ZodString>;
|
|
16
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
17
|
-
};
|
|
18
|
-
execute(args: ProductUpdateInput): Promise<McpToolResultInterface>;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductUpdateTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const mcp_tool_1 = require("../../../tools/mcp.tool");
|
|
6
|
-
const inputSchema = {
|
|
7
|
-
id: zod_1.z.number().int().positive().describe('Id of the product row to update.'),
|
|
8
|
-
name: zod_1.z.string().optional().describe('Product name.'),
|
|
9
|
-
attributes: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Arbitrary JSON attributes (json column).'),
|
|
10
|
-
};
|
|
11
|
-
class ProductUpdateTool extends mcp_tool_1.McpTool {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.name = 'product_update';
|
|
15
|
-
this.title = 'Update product (admin)';
|
|
16
|
-
this.description = 'Update fields of a product record directly in the database (admin/development only). Returns the updated row.';
|
|
17
|
-
this.inputSchema = inputSchema;
|
|
18
|
-
}
|
|
19
|
-
execute(args) {
|
|
20
|
-
const { id, ...body } = args;
|
|
21
|
-
return this.run(() => this.client.request({ method: 'PUT', path: `development/product/${id}`, body }));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.ProductUpdateTool = ProductUpdateTool;
|
|
25
|
-
//# sourceMappingURL=product.update.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product.update.tool.js","sourceRoot":"","sources":["../../../../../src/mcp/admin/tools/product/product.update.tool.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAAkD;AAElD,MAAM,WAAW,GAAG;IAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC5E,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;IACrD,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAChH,CAAC;AAYF,MAAa,iBAAkB,SAAQ,kBAA2B;IAAlE;;QACa,SAAI,GAAG,gBAAgB,CAAC;QACxB,UAAK,GAAG,wBAAwB,CAAC;QACjC,gBAAW,GAAG,+GAA+G,CAAC;QAC9H,gBAAW,GAAG,WAAW,CAAC;IAOvC,CAAC;IALG,OAAO,CAAC,IAAwB;QAC5B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3G,CAAC;CACJ;AAXD,8CAWC"}
|