@yoryoboy/bi-mcp 1.13.0 → 1.14.0
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/.tsbuildinfo +1 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +2 -2
- package/dist/mcp-use.json +2 -2
- package/dist/src/services/vtex/__tests__/vtex-payments.test.js +95 -0
- package/dist/src/services/vtex/__tests__/vtex-payments.test.js.map +7 -0
- package/dist/src/services/vtex/vtex-payments-write.js +64 -0
- package/dist/src/services/vtex/vtex-payments-write.js.map +7 -0
- package/dist/src/services/vtex/vtex-payments.js +43 -0
- package/dist/src/services/vtex/vtex-payments.js.map +7 -0
- package/dist/src/tools/vtex/__tests__/commercial-condition-references.test.js +14 -0
- package/dist/src/tools/vtex/__tests__/commercial-condition-references.test.js.map +7 -0
- package/dist/src/tools/vtex/__tests__/commercial-conditions.test.js +276 -0
- package/dist/src/tools/vtex/__tests__/commercial-conditions.test.js.map +7 -0
- package/dist/src/tools/vtex/__tests__/payment-rules.test.js +253 -0
- package/dist/src/tools/vtex/__tests__/payment-rules.test.js.map +7 -0
- package/dist/src/tools/vtex/catalog-admin-products-skus.js +3 -1
- package/dist/src/tools/vtex/catalog-admin-products-skus.js.map +2 -2
- package/dist/src/tools/vtex/commercial-conditions.js +220 -0
- package/dist/src/tools/vtex/commercial-conditions.js.map +7 -0
- package/dist/src/tools/vtex/create-sku.js +3 -1
- package/dist/src/tools/vtex/create-sku.js.map +2 -2
- package/dist/src/tools/vtex/index.js +2 -0
- package/dist/src/tools/vtex/index.js.map +2 -2
- package/dist/src/tools/vtex/payment-rules.js +229 -0
- package/dist/src/tools/vtex/payment-rules.js.map +7 -0
- package/dist/tests/vtex/vtex-commercial-conditions-docs.test.js +26 -0
- package/dist/tests/vtex/vtex-commercial-conditions-docs.test.js.map +7 -0
- package/dist/tests/vtex/vtex-commercial-conditions-surface.test.js +42 -0
- package/dist/tests/vtex/vtex-commercial-conditions-surface.test.js.map +7 -0
- package/dist/tests/vtex/vtex-commercial-conditions-workflow.test.js +190 -0
- package/dist/tests/vtex/vtex-commercial-conditions-workflow.test.js.map +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { getVtexApiClients } from "./vtex-api.js";
|
|
2
|
+
function normalizeCommercialConditionId(value) {
|
|
3
|
+
return String(value);
|
|
4
|
+
}
|
|
5
|
+
function normalizePayload(payload) {
|
|
6
|
+
if (payload.commercialConditionId === void 0) {
|
|
7
|
+
return payload;
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
...payload,
|
|
11
|
+
commercialConditionId: normalizeCommercialConditionId(payload.commercialConditionId)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
async function createCommercialCondition(profileId, payload) {
|
|
15
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
16
|
+
const response = await vtexApi.post(
|
|
17
|
+
"/api/payments/pvt/commercial-condition",
|
|
18
|
+
payload
|
|
19
|
+
);
|
|
20
|
+
return response.data;
|
|
21
|
+
}
|
|
22
|
+
async function updateCommercialCondition(profileId, commercialConditionId, payload) {
|
|
23
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
24
|
+
const response = await vtexApi.put(
|
|
25
|
+
`/api/payments/pvt/commercial-condition/${normalizeCommercialConditionId(commercialConditionId)}`,
|
|
26
|
+
payload
|
|
27
|
+
);
|
|
28
|
+
return response.data;
|
|
29
|
+
}
|
|
30
|
+
async function deleteCommercialCondition(profileId, commercialConditionId) {
|
|
31
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
32
|
+
await vtexApi.delete(
|
|
33
|
+
`/api/payments/pvt/commercial-condition/${normalizeCommercialConditionId(commercialConditionId)}`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
async function createPaymentRule(profileId, payload) {
|
|
37
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
38
|
+
const response = await vtexApi.post(
|
|
39
|
+
"/api/pvt/rules",
|
|
40
|
+
normalizePayload(payload)
|
|
41
|
+
);
|
|
42
|
+
return response.data;
|
|
43
|
+
}
|
|
44
|
+
async function updatePaymentRule(profileId, ruleId, payload) {
|
|
45
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
46
|
+
const response = await vtexApi.put(
|
|
47
|
+
`/api/pvt/rules/${ruleId}`,
|
|
48
|
+
normalizePayload(payload)
|
|
49
|
+
);
|
|
50
|
+
return response.data;
|
|
51
|
+
}
|
|
52
|
+
async function deletePaymentRule(profileId, ruleId) {
|
|
53
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
54
|
+
await vtexApi.delete(`/api/pvt/rules/${ruleId}`);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
createCommercialCondition,
|
|
58
|
+
createPaymentRule,
|
|
59
|
+
deleteCommercialCondition,
|
|
60
|
+
deletePaymentRule,
|
|
61
|
+
updateCommercialCondition,
|
|
62
|
+
updatePaymentRule
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=vtex-payments-write.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/services/vtex/vtex-payments-write.ts"],
|
|
4
|
+
"sourcesContent": ["import { getVtexApiClients } from \"./vtex-api.js\";\n\nexport type VtexPaymentWriteRecord = Record<string, unknown>;\n\nexport interface VtexPaymentRuleWritePayload extends VtexPaymentWriteRecord {\n commercialConditionId?: number;\n}\n\nfunction normalizeCommercialConditionId(value: number): string {\n return String(value);\n}\n\nfunction normalizePayload(payload: VtexPaymentRuleWritePayload): VtexPaymentWriteRecord {\n if (payload.commercialConditionId === undefined) {\n return payload;\n }\n\n return {\n ...payload,\n commercialConditionId: normalizeCommercialConditionId(payload.commercialConditionId),\n };\n}\n\nexport async function createCommercialCondition(\n profileId: string,\n payload: VtexPaymentWriteRecord\n): Promise<VtexPaymentWriteRecord> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.post<VtexPaymentWriteRecord>(\n \"/api/payments/pvt/commercial-condition\",\n payload\n );\n\n return response.data;\n}\n\nexport async function updateCommercialCondition(\n profileId: string,\n commercialConditionId: number,\n payload: VtexPaymentWriteRecord\n): Promise<VtexPaymentWriteRecord> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.put<VtexPaymentWriteRecord>(\n `/api/payments/pvt/commercial-condition/${normalizeCommercialConditionId(commercialConditionId)}`,\n payload\n );\n\n return response.data;\n}\n\nexport async function deleteCommercialCondition(\n profileId: string,\n commercialConditionId: number\n): Promise<void> {\n const { vtexApi } = await getVtexApiClients(profileId);\n await vtexApi.delete(\n `/api/payments/pvt/commercial-condition/${normalizeCommercialConditionId(commercialConditionId)}`\n );\n}\n\nexport async function createPaymentRule(\n profileId: string,\n payload: VtexPaymentRuleWritePayload\n): Promise<VtexPaymentWriteRecord> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.post<VtexPaymentWriteRecord>(\n \"/api/pvt/rules\",\n normalizePayload(payload)\n );\n\n return response.data;\n}\n\nexport async function updatePaymentRule(\n profileId: string,\n ruleId: number,\n payload: VtexPaymentRuleWritePayload\n): Promise<VtexPaymentWriteRecord> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.put<VtexPaymentWriteRecord>(\n `/api/pvt/rules/${ruleId}`,\n normalizePayload(payload)\n );\n\n return response.data;\n}\n\nexport async function deletePaymentRule(profileId: string, ruleId: number): Promise<void> {\n const { vtexApi } = await getVtexApiClients(profileId);\n await vtexApi.delete(`/api/pvt/rules/${ruleId}`);\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,yBAAyB;AAQlC,SAAS,+BAA+B,OAAuB;AAC7D,SAAO,OAAO,KAAK;AACrB;AAEA,SAAS,iBAAiB,SAA8D;AACtF,MAAI,QAAQ,0BAA0B,QAAW;AAC/C,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,GAA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iClients } from "./vtex-api.js";
|
|
2
|
+
function toRecordArray(data) {
|
|
3
|
+
if (!Array.isArray(data)) {
|
|
4
|
+
return [];
|
|
5
|
+
}
|
|
6
|
+
return data.filter((item) => item !== null && typeof item === "object");
|
|
7
|
+
}
|
|
8
|
+
function normalizeCommercialConditionId(value) {
|
|
9
|
+
return String(value);
|
|
10
|
+
}
|
|
11
|
+
async function listCommercialConditions(profileId, search) {
|
|
12
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
13
|
+
const response = await vtexApi.get("/api/payments/pvt/commercial-condition", {
|
|
14
|
+
params: search ? { search } : void 0
|
|
15
|
+
});
|
|
16
|
+
return toRecordArray(response.data);
|
|
17
|
+
}
|
|
18
|
+
async function getCommercialCondition(profileId, commercialConditionId) {
|
|
19
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
20
|
+
const response = await vtexApi.get(
|
|
21
|
+
`/api/payments/pvt/commercial-condition/${normalizeCommercialConditionId(commercialConditionId)}`
|
|
22
|
+
);
|
|
23
|
+
return response.data;
|
|
24
|
+
}
|
|
25
|
+
async function listPaymentRules(profileId, filters) {
|
|
26
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
27
|
+
const response = await vtexApi.get("/api/pvt/rules", {
|
|
28
|
+
params: filters?.commercialConditionId === void 0 ? void 0 : { commercialConditionId: normalizeCommercialConditionId(filters.commercialConditionId) }
|
|
29
|
+
});
|
|
30
|
+
return toRecordArray(response.data);
|
|
31
|
+
}
|
|
32
|
+
async function getPaymentRule(profileId, ruleId) {
|
|
33
|
+
const { vtexApi } = await getVtexApiClients(profileId);
|
|
34
|
+
const response = await vtexApi.get(`/api/pvt/rules/${ruleId}`);
|
|
35
|
+
return response.data;
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
getCommercialCondition,
|
|
39
|
+
getPaymentRule,
|
|
40
|
+
listCommercialConditions,
|
|
41
|
+
listPaymentRules
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=vtex-payments.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/services/vtex/vtex-payments.ts"],
|
|
4
|
+
"sourcesContent": ["import { getVtexApiClients } from \"./vtex-api.js\";\n\nexport type VtexPaymentRecord = Record<string, unknown>;\n\nfunction toRecordArray(data: unknown): VtexPaymentRecord[] {\n if (!Array.isArray(data)) {\n return [];\n }\n\n return data.filter((item): item is VtexPaymentRecord => item !== null && typeof item === \"object\");\n}\n\nfunction normalizeCommercialConditionId(value: number): string {\n return String(value);\n}\n\nexport async function listCommercialConditions(\n profileId: string,\n search?: string\n): Promise<VtexPaymentRecord[]> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.get<unknown>(\"/api/payments/pvt/commercial-condition\", {\n params: search ? { search } : undefined,\n });\n\n return toRecordArray(response.data);\n}\n\nexport async function getCommercialCondition(\n profileId: string,\n commercialConditionId: number\n): Promise<VtexPaymentRecord> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.get<VtexPaymentRecord>(\n `/api/payments/pvt/commercial-condition/${normalizeCommercialConditionId(commercialConditionId)}`\n );\n\n return response.data;\n}\n\nexport async function listPaymentRules(\n profileId: string,\n filters?: { commercialConditionId?: number }\n): Promise<VtexPaymentRecord[]> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.get<unknown>(\"/api/pvt/rules\", {\n params:\n filters?.commercialConditionId === undefined\n ? undefined\n : { commercialConditionId: normalizeCommercialConditionId(filters.commercialConditionId) },\n });\n\n return toRecordArray(response.data);\n}\n\nexport async function getPaymentRule(profileId: string, ruleId: number): Promise<VtexPaymentRecord> {\n const { vtexApi } = await getVtexApiClients(profileId);\n const response = await vtexApi.get<VtexPaymentRecord>(`/api/pvt/rules/${ruleId}`);\n\n return response.data;\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,yBAAyB;AAIlC,SAAS,cAAc,MAAoC;AACzD,MAAI,CAAC,MAAM,QAAQ,IAAI,GAAG;AACxB,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,KAAK,OAAO,CAAC,SAAoC,SAAS,QAAQ,OAAO,SAAS,QAAQ;AACnG;AAEA,SAAS,+BAA+B,OAAuB;AAC7D,SAAO,OAAO,KAAK;AACrB;AAEA,eAAsB,yBACpB,WACA,QAC8B;AAC9B,QAAM,EAAE,QAAQ,IAAI,MAAM,kBAAkB,SAAS;AACrD,QAAM,WAAW,MAAM,QAAQ,IAAa,0CAA0C;AAAA,IACpF,QAAQ,SAAS,EAAE,OAAO,IAAI;AAAA,EAChC,CAAC;AAED,SAAO,cAAc,SAAS,IAAI;AACpC;AAEA,eAAsB,uBACpB,WACA,uBAC4B;AAC5B,QAAM,EAAE,QAAQ,IAAI,MAAM,kBAAkB,SAAS;AACrD,QAAM,WAAW,MAAM,QAAQ;AAAA,IAC7B,0CAA0C,+BAA+B,qBAAqB,CAAC;AAAA,EACjG;AAEA,SAAO,SAAS;AAClB;AAEA,eAAsB,iBACpB,WACA,SAC8B;AAC9B,QAAM,EAAE,QAAQ,IAAI,MAAM,kBAAkB,SAAS;AACrD,QAAM,WAAW,MAAM,QAAQ,IAAa,kBAAkB;AAAA,IAC5D,QACE,SAAS,0BAA0B,SAC/B,SACA,EAAE,uBAAuB,+BAA+B,QAAQ,qBAAqB,EAAE;AAAA,EAC/F,CAAC;AAED,SAAO,cAAc,SAAS,IAAI;AACpC;AAEA,eAAsB,eAAe,WAAmB,QAA4C;AAClG,QAAM,EAAE,QAAQ,IAAI,MAAM,kBAAkB,SAAS;AACrD,QAAM,WAAW,MAAM,QAAQ,IAAuB,kBAAkB,MAAM,EAAE;AAEhF,SAAO,SAAS;AAClB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
const createSkuModule = await import("../create-sku.js");
|
|
3
|
+
const updateSkuModule = await import("../catalog-admin-products-skus.js");
|
|
4
|
+
describe("commercial condition field references", () => {
|
|
5
|
+
it("points SKU commercialConditionId fields to the action-based management tools", () => {
|
|
6
|
+
const createDescription = createSkuModule.createSkuSchema.shape.commercialConditionId.description;
|
|
7
|
+
const updateDescription = updateSkuModule.updateSkuBasicFieldsSchema.shape.commercialConditionId.description;
|
|
8
|
+
expect(createDescription).toContain("vtex_commercial_conditions");
|
|
9
|
+
expect(createDescription).toContain("vtex_payment_rules");
|
|
10
|
+
expect(updateDescription).toContain("vtex_commercial_conditions");
|
|
11
|
+
expect(updateDescription).toContain("vtex_payment_rules");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=commercial-condition-references.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/tools/vtex/__tests__/commercial-condition-references.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { describe, expect, it } from \"vitest\";\n\nconst createSkuModule = await import(\"../create-sku.js\");\nconst updateSkuModule = await import(\"../catalog-admin-products-skus.js\");\n\ndescribe(\"commercial condition field references\", () => {\n it(\"points SKU commercialConditionId fields to the action-based management tools\", () => {\n const createDescription = createSkuModule.createSkuSchema.shape.commercialConditionId.description;\n const updateDescription = updateSkuModule.updateSkuBasicFieldsSchema.shape.commercialConditionId.description;\n\n expect(createDescription).toContain(\"vtex_commercial_conditions\");\n expect(createDescription).toContain(\"vtex_payment_rules\");\n expect(updateDescription).toContain(\"vtex_commercial_conditions\");\n expect(updateDescription).toContain(\"vtex_payment_rules\");\n });\n});\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,MAAM,kBAAkB,MAAM,OAAO,kBAAkB;AACvD,MAAM,kBAAkB,MAAM,OAAO,mCAAmC;AAExE,SAAS,yCAAyC,MAAM;AACtD,KAAG,gFAAgF,MAAM;AACvF,UAAM,oBAAoB,gBAAgB,gBAAgB,MAAM,sBAAsB;AACtF,UAAM,oBAAoB,gBAAgB,2BAA2B,MAAM,sBAAsB;AAEjG,WAAO,iBAAiB,EAAE,UAAU,4BAA4B;AAChE,WAAO,iBAAiB,EAAE,UAAU,oBAAoB;AACxD,WAAO,iBAAiB,EAAE,UAAU,4BAA4B;AAChE,WAAO,iBAAiB,EAAE,UAAU,oBAAoB;AAAA,EAC1D,CAAC;AACH,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
+
const objectMock = vi.fn((value) => ({ kind: "object", value }));
|
|
4
|
+
const errorMock = vi.fn((message) => ({ kind: "error", message }));
|
|
5
|
+
const listCommercialConditionsMock = vi.fn();
|
|
6
|
+
const getCommercialConditionMock = vi.fn();
|
|
7
|
+
const createCommercialConditionMock = vi.fn();
|
|
8
|
+
const updateCommercialConditionMock = vi.fn();
|
|
9
|
+
const deleteCommercialConditionMock = vi.fn();
|
|
10
|
+
const resolveVtexWriteProfileMock = vi.fn();
|
|
11
|
+
const buildWriteSuccessResponseMock = vi.fn((value) => ({ kind: "write", value }));
|
|
12
|
+
const handleVtexWriteErrorMock = vi.fn((_err, fallback) => ({ kind: "error", message: fallback }));
|
|
13
|
+
const requireExplicitConfirmationMock = vi.fn();
|
|
14
|
+
vi.mock("mcp-use/server", () => ({
|
|
15
|
+
object: objectMock,
|
|
16
|
+
error: errorMock
|
|
17
|
+
}));
|
|
18
|
+
vi.mock("../../../services/vtex/vtex-payments.js", () => ({
|
|
19
|
+
listCommercialConditions: listCommercialConditionsMock,
|
|
20
|
+
getCommercialCondition: getCommercialConditionMock
|
|
21
|
+
}));
|
|
22
|
+
vi.mock("../../../services/vtex/vtex-payments-write.js", () => ({
|
|
23
|
+
createCommercialCondition: createCommercialConditionMock,
|
|
24
|
+
updateCommercialCondition: updateCommercialConditionMock,
|
|
25
|
+
deleteCommercialCondition: deleteCommercialConditionMock
|
|
26
|
+
}));
|
|
27
|
+
vi.mock("../write-helpers.js", () => ({
|
|
28
|
+
confirmationSchemaField: z.boolean().optional().describe("confirmed"),
|
|
29
|
+
resolveVtexWriteProfile: resolveVtexWriteProfileMock,
|
|
30
|
+
buildWriteSuccessResponse: buildWriteSuccessResponseMock,
|
|
31
|
+
handleVtexWriteError: handleVtexWriteErrorMock,
|
|
32
|
+
requireExplicitConfirmation: requireExplicitConfirmationMock
|
|
33
|
+
}));
|
|
34
|
+
const module = await import("../commercial-conditions.js");
|
|
35
|
+
describe("vtex_commercial_conditions tool", () => {
|
|
36
|
+
beforeEach(() => {
|
|
37
|
+
vi.clearAllMocks();
|
|
38
|
+
resolveVtexWriteProfileMock.mockResolvedValue({
|
|
39
|
+
ok: true,
|
|
40
|
+
value: { profileId: "profile-1" }
|
|
41
|
+
});
|
|
42
|
+
requireExplicitConfirmationMock.mockReturnValue(null);
|
|
43
|
+
});
|
|
44
|
+
it("requires profileId and validates numeric commercialConditionId across actions", () => {
|
|
45
|
+
expect(() => module.commercialConditionsSchema.parse({ action: "list" })).toThrow();
|
|
46
|
+
expect(
|
|
47
|
+
() => module.commercialConditionsSchema.parse({
|
|
48
|
+
action: "get",
|
|
49
|
+
profileId: "profile-1",
|
|
50
|
+
commercialConditionId: 1.5
|
|
51
|
+
})
|
|
52
|
+
).toThrow();
|
|
53
|
+
expect(
|
|
54
|
+
module.commercialConditionsSchema.parse({
|
|
55
|
+
action: "list",
|
|
56
|
+
profileId: "profile-1",
|
|
57
|
+
search: "9 cuotas"
|
|
58
|
+
})
|
|
59
|
+
).toEqual({
|
|
60
|
+
action: "list",
|
|
61
|
+
profileId: "profile-1",
|
|
62
|
+
search: "9 cuotas"
|
|
63
|
+
});
|
|
64
|
+
expect(
|
|
65
|
+
module.commercialConditionsSchema.parse({
|
|
66
|
+
action: "get",
|
|
67
|
+
profileId: "profile-1",
|
|
68
|
+
commercialConditionId: 10
|
|
69
|
+
})
|
|
70
|
+
).toEqual({
|
|
71
|
+
action: "get",
|
|
72
|
+
profileId: "profile-1",
|
|
73
|
+
commercialConditionId: 10
|
|
74
|
+
});
|
|
75
|
+
expect(
|
|
76
|
+
module.commercialConditionsSchema.parse({
|
|
77
|
+
action: "create",
|
|
78
|
+
profileId: "profile-1",
|
|
79
|
+
name: "9 cuotas"
|
|
80
|
+
})
|
|
81
|
+
).toEqual({
|
|
82
|
+
action: "create",
|
|
83
|
+
profileId: "profile-1",
|
|
84
|
+
name: "9 cuotas"
|
|
85
|
+
});
|
|
86
|
+
expect(
|
|
87
|
+
module.commercialConditionsSchema.parse({
|
|
88
|
+
action: "update",
|
|
89
|
+
profileId: "profile-1",
|
|
90
|
+
commercialConditionId: 10,
|
|
91
|
+
name: "12 cuotas"
|
|
92
|
+
})
|
|
93
|
+
).toEqual({
|
|
94
|
+
action: "update",
|
|
95
|
+
profileId: "profile-1",
|
|
96
|
+
commercialConditionId: 10,
|
|
97
|
+
name: "12 cuotas"
|
|
98
|
+
});
|
|
99
|
+
expect(
|
|
100
|
+
module.commercialConditionsSchema.parse({
|
|
101
|
+
action: "delete",
|
|
102
|
+
profileId: "profile-1",
|
|
103
|
+
commercialConditionId: 10,
|
|
104
|
+
confirmed: true
|
|
105
|
+
})
|
|
106
|
+
).toEqual({
|
|
107
|
+
action: "delete",
|
|
108
|
+
profileId: "profile-1",
|
|
109
|
+
commercialConditionId: 10,
|
|
110
|
+
confirmed: true
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
it("returns compact list responses for commercial conditions", async () => {
|
|
114
|
+
listCommercialConditionsMock.mockResolvedValue([
|
|
115
|
+
{ id: 10, name: "9 cuotas", isActive: true },
|
|
116
|
+
{ id: 11, name: "12 cuotas", IsActive: false }
|
|
117
|
+
]);
|
|
118
|
+
const result = await module.commercialConditionsHandler({
|
|
119
|
+
action: "list",
|
|
120
|
+
profileId: "profile-1",
|
|
121
|
+
search: "cuotas"
|
|
122
|
+
});
|
|
123
|
+
expect(listCommercialConditionsMock).toHaveBeenCalledWith("profile-1", "cuotas");
|
|
124
|
+
expect(result).toEqual({
|
|
125
|
+
kind: "object",
|
|
126
|
+
value: {
|
|
127
|
+
metadata: {
|
|
128
|
+
total: 2,
|
|
129
|
+
profile_id: "profile-1",
|
|
130
|
+
search: "cuotas"
|
|
131
|
+
},
|
|
132
|
+
conditions_schema: ["id", "name", "is_active"],
|
|
133
|
+
conditions: [
|
|
134
|
+
[10, "9 cuotas", true],
|
|
135
|
+
[11, "12 cuotas", false]
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
it("creates, updates, gets and deletes commercial conditions through the service layer", async () => {
|
|
141
|
+
getCommercialConditionMock.mockResolvedValueOnce({ id: 10, name: "9 cuotas", isActive: true });
|
|
142
|
+
getCommercialConditionMock.mockResolvedValueOnce({
|
|
143
|
+
id: 10,
|
|
144
|
+
name: "9 cuotas",
|
|
145
|
+
description: "Promo base",
|
|
146
|
+
isActive: true
|
|
147
|
+
});
|
|
148
|
+
createCommercialConditionMock.mockResolvedValue({ id: 10, Name: "9 cuotas" });
|
|
149
|
+
updateCommercialConditionMock.mockResolvedValue({
|
|
150
|
+
id: 10,
|
|
151
|
+
Name: "12 cuotas",
|
|
152
|
+
Description: "Promo base",
|
|
153
|
+
IsActive: true
|
|
154
|
+
});
|
|
155
|
+
deleteCommercialConditionMock.mockResolvedValue(void 0);
|
|
156
|
+
const fetched = await module.commercialConditionsHandler({
|
|
157
|
+
action: "get",
|
|
158
|
+
profileId: "profile-1",
|
|
159
|
+
commercialConditionId: 10
|
|
160
|
+
});
|
|
161
|
+
const created = await module.commercialConditionsHandler({
|
|
162
|
+
action: "create",
|
|
163
|
+
profileId: "profile-1",
|
|
164
|
+
name: "9 cuotas",
|
|
165
|
+
description: "Promo"
|
|
166
|
+
});
|
|
167
|
+
const updated = await module.commercialConditionsHandler({
|
|
168
|
+
action: "update",
|
|
169
|
+
profileId: "profile-1",
|
|
170
|
+
commercialConditionId: 10,
|
|
171
|
+
name: "12 cuotas"
|
|
172
|
+
});
|
|
173
|
+
const deleted = await module.commercialConditionsHandler({
|
|
174
|
+
action: "delete",
|
|
175
|
+
profileId: "profile-1",
|
|
176
|
+
commercialConditionId: 10,
|
|
177
|
+
confirmed: true
|
|
178
|
+
});
|
|
179
|
+
expect(getCommercialConditionMock).toHaveBeenCalledWith("profile-1", 10);
|
|
180
|
+
expect(fetched).toEqual({
|
|
181
|
+
kind: "object",
|
|
182
|
+
value: {
|
|
183
|
+
profile_id: "profile-1",
|
|
184
|
+
commercial_condition_id: 10,
|
|
185
|
+
condition: { id: 10, name: "9 cuotas", is_active: true }
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
expect(createCommercialConditionMock).toHaveBeenCalledWith("profile-1", {
|
|
189
|
+
Name: "9 cuotas",
|
|
190
|
+
Description: "Promo"
|
|
191
|
+
});
|
|
192
|
+
expect(buildWriteSuccessResponseMock).toHaveBeenNthCalledWith(
|
|
193
|
+
1,
|
|
194
|
+
expect.objectContaining({
|
|
195
|
+
operation: "commercial_conditions_create",
|
|
196
|
+
resourceId: "10",
|
|
197
|
+
message: "Commercial condition created. You can now link it to payment rules or SKU assignments as needed.",
|
|
198
|
+
after: { id: 10, Name: "9 cuotas" }
|
|
199
|
+
})
|
|
200
|
+
);
|
|
201
|
+
expect(getCommercialConditionMock).toHaveBeenNthCalledWith(2, "profile-1", 10);
|
|
202
|
+
expect(updateCommercialConditionMock).toHaveBeenCalledWith("profile-1", 10, {
|
|
203
|
+
Name: "12 cuotas"
|
|
204
|
+
});
|
|
205
|
+
expect(buildWriteSuccessResponseMock).toHaveBeenNthCalledWith(
|
|
206
|
+
2,
|
|
207
|
+
expect.objectContaining({
|
|
208
|
+
operation: "commercial_conditions_update",
|
|
209
|
+
resourceId: "10",
|
|
210
|
+
message: "Commercial condition updated. Review linked payment rules and checkout behavior to confirm the intended installment strategy.",
|
|
211
|
+
before: {
|
|
212
|
+
id: 10,
|
|
213
|
+
name: "9 cuotas",
|
|
214
|
+
description: "Promo base",
|
|
215
|
+
isActive: true
|
|
216
|
+
},
|
|
217
|
+
after: {
|
|
218
|
+
id: 10,
|
|
219
|
+
Name: "12 cuotas",
|
|
220
|
+
Description: "Promo base",
|
|
221
|
+
IsActive: true
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
);
|
|
225
|
+
expect(deleteCommercialConditionMock).toHaveBeenCalledWith("profile-1", 10);
|
|
226
|
+
expect(created).toMatchObject({
|
|
227
|
+
kind: "write",
|
|
228
|
+
value: {
|
|
229
|
+
operation: "commercial_conditions_create",
|
|
230
|
+
riskLevel: "low",
|
|
231
|
+
message: "Commercial condition created. You can now link it to payment rules or SKU assignments as needed."
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
expect(updated).toMatchObject({
|
|
235
|
+
kind: "write",
|
|
236
|
+
value: {
|
|
237
|
+
operation: "commercial_conditions_update",
|
|
238
|
+
riskLevel: "medium",
|
|
239
|
+
message: "Commercial condition updated. Review linked payment rules and checkout behavior to confirm the intended installment strategy."
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
expect(deleted).toMatchObject({
|
|
243
|
+
kind: "write",
|
|
244
|
+
value: {
|
|
245
|
+
operation: "commercial_conditions_delete",
|
|
246
|
+
riskLevel: "high",
|
|
247
|
+
warnings: [
|
|
248
|
+
"Deleting a commercial condition can break linked payment rules and installment visibility until dependent rules are updated."
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
expect(JSON.stringify(created)).not.toContain("sandbox");
|
|
253
|
+
expect(JSON.stringify(created)).not.toContain("production");
|
|
254
|
+
expect(JSON.stringify(created)).not.toContain("legacy");
|
|
255
|
+
expect(JSON.stringify(updated)).not.toContain("sandbox");
|
|
256
|
+
expect(JSON.stringify(updated)).not.toContain("production");
|
|
257
|
+
expect(JSON.stringify(updated)).not.toContain("legacy");
|
|
258
|
+
});
|
|
259
|
+
it("requires explicit confirmation before deleting a commercial condition", async () => {
|
|
260
|
+
requireExplicitConfirmationMock.mockReturnValueOnce({
|
|
261
|
+
kind: "object",
|
|
262
|
+
value: { success: false, risk_level: "high" }
|
|
263
|
+
});
|
|
264
|
+
const result = await module.commercialConditionsHandler({
|
|
265
|
+
action: "delete",
|
|
266
|
+
profileId: "profile-1",
|
|
267
|
+
commercialConditionId: 10
|
|
268
|
+
});
|
|
269
|
+
expect(deleteCommercialConditionMock).not.toHaveBeenCalled();
|
|
270
|
+
expect(result).toEqual({
|
|
271
|
+
kind: "object",
|
|
272
|
+
value: { success: false, risk_level: "high" }
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
//# sourceMappingURL=commercial-conditions.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/tools/vtex/__tests__/commercial-conditions.test.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from \"zod\";\nimport { beforeEach, describe, expect, it, vi } from \"vitest\";\n\nconst objectMock = vi.fn((value) => ({ kind: \"object\", value }));\nconst errorMock = vi.fn((message) => ({ kind: \"error\", message }));\nconst listCommercialConditionsMock = vi.fn();\nconst getCommercialConditionMock = vi.fn();\nconst createCommercialConditionMock = vi.fn();\nconst updateCommercialConditionMock = vi.fn();\nconst deleteCommercialConditionMock = vi.fn();\nconst resolveVtexWriteProfileMock = vi.fn();\nconst buildWriteSuccessResponseMock = vi.fn((value) => ({ kind: \"write\", value }));\nconst handleVtexWriteErrorMock = vi.fn((_err, fallback) => ({ kind: \"error\", message: fallback }));\nconst requireExplicitConfirmationMock = vi.fn();\n\nvi.mock(\"mcp-use/server\", () => ({\n object: objectMock,\n error: errorMock,\n}));\n\nvi.mock(\"../../../services/vtex/vtex-payments.js\", () => ({\n listCommercialConditions: listCommercialConditionsMock,\n getCommercialCondition: getCommercialConditionMock,\n}));\n\nvi.mock(\"../../../services/vtex/vtex-payments-write.js\", () => ({\n createCommercialCondition: createCommercialConditionMock,\n updateCommercialCondition: updateCommercialConditionMock,\n deleteCommercialCondition: deleteCommercialConditionMock,\n}));\n\nvi.mock(\"../write-helpers.js\", () => ({\n confirmationSchemaField: z.boolean().optional().describe(\"confirmed\"),\n resolveVtexWriteProfile: resolveVtexWriteProfileMock,\n buildWriteSuccessResponse: buildWriteSuccessResponseMock,\n handleVtexWriteError: handleVtexWriteErrorMock,\n requireExplicitConfirmation: requireExplicitConfirmationMock,\n}));\n\nconst module = await import(\"../commercial-conditions.js\");\n\ndescribe(\"vtex_commercial_conditions tool\", () => {\n beforeEach(() => {\n vi.clearAllMocks();\n resolveVtexWriteProfileMock.mockResolvedValue({\n ok: true,\n value: { profileId: \"profile-1\" },\n });\n requireExplicitConfirmationMock.mockReturnValue(null);\n });\n\n it(\"requires profileId and validates numeric commercialConditionId across actions\", () => {\n expect(() => module.commercialConditionsSchema.parse({ action: \"list\" })).toThrow();\n expect(() =>\n module.commercialConditionsSchema.parse({\n action: \"get\",\n profileId: \"profile-1\",\n commercialConditionId: 1.5,\n })\n ).toThrow();\n\n expect(\n module.commercialConditionsSchema.parse({\n action: \"list\",\n profileId: \"profile-1\",\n search: \"9 cuotas\",\n })\n ).toEqual({\n action: \"list\",\n profileId: \"profile-1\",\n search: \"9 cuotas\",\n });\n\n expect(\n module.commercialConditionsSchema.parse({\n action: \"get\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n })\n ).toEqual({\n action: \"get\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n });\n\n expect(\n module.commercialConditionsSchema.parse({\n action: \"create\",\n profileId: \"profile-1\",\n name: \"9 cuotas\",\n })\n ).toEqual({\n action: \"create\",\n profileId: \"profile-1\",\n name: \"9 cuotas\",\n });\n\n expect(\n module.commercialConditionsSchema.parse({\n action: \"update\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n name: \"12 cuotas\",\n })\n ).toEqual({\n action: \"update\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n name: \"12 cuotas\",\n });\n\n expect(\n module.commercialConditionsSchema.parse({\n action: \"delete\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n confirmed: true,\n })\n ).toEqual({\n action: \"delete\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n confirmed: true,\n });\n });\n\n it(\"returns compact list responses for commercial conditions\", async () => {\n listCommercialConditionsMock.mockResolvedValue([\n { id: 10, name: \"9 cuotas\", isActive: true },\n { id: 11, name: \"12 cuotas\", IsActive: false },\n ]);\n\n const result = await module.commercialConditionsHandler({\n action: \"list\",\n profileId: \"profile-1\",\n search: \"cuotas\",\n });\n\n expect(listCommercialConditionsMock).toHaveBeenCalledWith(\"profile-1\", \"cuotas\");\n expect(result).toEqual({\n kind: \"object\",\n value: {\n metadata: {\n total: 2,\n profile_id: \"profile-1\",\n search: \"cuotas\",\n },\n conditions_schema: [\"id\", \"name\", \"is_active\"],\n conditions: [\n [10, \"9 cuotas\", true],\n [11, \"12 cuotas\", false],\n ],\n },\n });\n });\n\n it(\"creates, updates, gets and deletes commercial conditions through the service layer\", async () => {\n getCommercialConditionMock.mockResolvedValueOnce({ id: 10, name: \"9 cuotas\", isActive: true });\n getCommercialConditionMock.mockResolvedValueOnce({\n id: 10,\n name: \"9 cuotas\",\n description: \"Promo base\",\n isActive: true,\n });\n createCommercialConditionMock.mockResolvedValue({ id: 10, Name: \"9 cuotas\" });\n updateCommercialConditionMock.mockResolvedValue({\n id: 10,\n Name: \"12 cuotas\",\n Description: \"Promo base\",\n IsActive: true,\n });\n deleteCommercialConditionMock.mockResolvedValue(undefined);\n\n const fetched = await module.commercialConditionsHandler({\n action: \"get\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n });\n const created = await module.commercialConditionsHandler({\n action: \"create\",\n profileId: \"profile-1\",\n name: \"9 cuotas\",\n description: \"Promo\",\n });\n const updated = await module.commercialConditionsHandler({\n action: \"update\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n name: \"12 cuotas\",\n });\n const deleted = await module.commercialConditionsHandler({\n action: \"delete\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n confirmed: true,\n });\n\n expect(getCommercialConditionMock).toHaveBeenCalledWith(\"profile-1\", 10);\n expect(fetched).toEqual({\n kind: \"object\",\n value: {\n profile_id: \"profile-1\",\n commercial_condition_id: 10,\n condition: { id: 10, name: \"9 cuotas\", is_active: true },\n },\n });\n expect(createCommercialConditionMock).toHaveBeenCalledWith(\"profile-1\", {\n Name: \"9 cuotas\",\n Description: \"Promo\",\n });\n expect(buildWriteSuccessResponseMock).toHaveBeenNthCalledWith(\n 1,\n expect.objectContaining({\n operation: \"commercial_conditions_create\",\n resourceId: \"10\",\n message:\n \"Commercial condition created. You can now link it to payment rules or SKU assignments as needed.\",\n after: { id: 10, Name: \"9 cuotas\" },\n })\n );\n expect(getCommercialConditionMock).toHaveBeenNthCalledWith(2, \"profile-1\", 10);\n expect(updateCommercialConditionMock).toHaveBeenCalledWith(\"profile-1\", 10, {\n Name: \"12 cuotas\",\n });\n expect(buildWriteSuccessResponseMock).toHaveBeenNthCalledWith(\n 2,\n expect.objectContaining({\n operation: \"commercial_conditions_update\",\n resourceId: \"10\",\n message:\n \"Commercial condition updated. Review linked payment rules and checkout behavior to confirm the intended installment strategy.\",\n before: {\n id: 10,\n name: \"9 cuotas\",\n description: \"Promo base\",\n isActive: true,\n },\n after: {\n id: 10,\n Name: \"12 cuotas\",\n Description: \"Promo base\",\n IsActive: true,\n },\n })\n );\n expect(deleteCommercialConditionMock).toHaveBeenCalledWith(\"profile-1\", 10);\n expect(created).toMatchObject({\n kind: \"write\",\n value: {\n operation: \"commercial_conditions_create\",\n riskLevel: \"low\",\n message:\n \"Commercial condition created. You can now link it to payment rules or SKU assignments as needed.\",\n },\n });\n expect(updated).toMatchObject({\n kind: \"write\",\n value: {\n operation: \"commercial_conditions_update\",\n riskLevel: \"medium\",\n message:\n \"Commercial condition updated. Review linked payment rules and checkout behavior to confirm the intended installment strategy.\",\n },\n });\n expect(deleted).toMatchObject({\n kind: \"write\",\n value: {\n operation: \"commercial_conditions_delete\",\n riskLevel: \"high\",\n warnings: [\n \"Deleting a commercial condition can break linked payment rules and installment visibility until dependent rules are updated.\",\n ],\n },\n });\n expect(JSON.stringify(created)).not.toContain(\"sandbox\");\n expect(JSON.stringify(created)).not.toContain(\"production\");\n expect(JSON.stringify(created)).not.toContain(\"legacy\");\n expect(JSON.stringify(updated)).not.toContain(\"sandbox\");\n expect(JSON.stringify(updated)).not.toContain(\"production\");\n expect(JSON.stringify(updated)).not.toContain(\"legacy\");\n });\n\n it(\"requires explicit confirmation before deleting a commercial condition\", async () => {\n requireExplicitConfirmationMock.mockReturnValueOnce({\n kind: \"object\",\n value: { success: false, risk_level: \"high\" },\n });\n\n const result = await module.commercialConditionsHandler({\n action: \"delete\",\n profileId: \"profile-1\",\n commercialConditionId: 10,\n });\n\n expect(deleteCommercialConditionMock).not.toHaveBeenCalled();\n expect(result).toEqual({\n kind: \"object\",\n value: { success: false, risk_level: \"high\" },\n });\n });\n});\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,YAAY,UAAU,QAAQ,IAAI,UAAU;AAErD,MAAM,aAAa,GAAG,GAAG,CAAC,WAAW,EAAE,MAAM,UAAU,MAAM,EAAE;AAC/D,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,EAAE,MAAM,SAAS,QAAQ,EAAE;AACjE,MAAM,+BAA+B,GAAG,GAAG;AAC3C,MAAM,6BAA6B,GAAG,GAAG;AACzC,MAAM,gCAAgC,GAAG,GAAG;AAC5C,MAAM,gCAAgC,GAAG,GAAG;AAC5C,MAAM,gCAAgC,GAAG,GAAG;AAC5C,MAAM,8BAA8B,GAAG,GAAG;AAC1C,MAAM,gCAAgC,GAAG,GAAG,CAAC,WAAW,EAAE,MAAM,SAAS,MAAM,EAAE;AACjF,MAAM,2BAA2B,GAAG,GAAG,CAAC,MAAM,cAAc,EAAE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