@gorgo/medusa-integration 0.0.1
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/.medusa/server/src/admin/index.js +2259 -0
- package/.medusa/server/src/admin/index.mjs +2257 -0
- package/.medusa/server/src/api/admin/integrations/[provider_id]/enable/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/integrations/[provider_id]/enable/route.js +17 -0
- package/.medusa/server/src/api/admin/integrations/[provider_id]/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/integrations/[provider_id]/route.js +46 -0
- package/.medusa/server/src/api/admin/integrations/[provider_id]/test-connection/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/integrations/[provider_id]/test-connection/route.js +16 -0
- package/.medusa/server/src/api/admin/integrations/_helpers.d.ts +16 -0
- package/.medusa/server/src/api/admin/integrations/_helpers.js +52 -0
- package/.medusa/server/src/api/admin/integrations/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/integrations/middlewares.js +21 -0
- package/.medusa/server/src/api/admin/integrations/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/integrations/route.js +11 -0
- package/.medusa/server/src/api/admin/integrations/validators.d.ts +11 -0
- package/.medusa/server/src/api/admin/integrations/validators.js +15 -0
- package/.medusa/server/src/api/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/middlewares.js +10 -0
- package/.medusa/server/src/index.d.ts +10 -0
- package/.medusa/server/src/index.js +22 -0
- package/.medusa/server/src/jobs/test-integration-connections.d.ts +16 -0
- package/.medusa/server/src/jobs/test-integration-connections.js +53 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/build-zod.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/build-zod.unit.spec.js +64 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/define.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/define.unit.spec.js +41 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/introspect.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/introspect.unit.spec.js +93 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/validate.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/validate.unit.spec.js +64 -0
- package/.medusa/server/src/modules/integration/descriptor/build-zod.d.ts +8 -0
- package/.medusa/server/src/modules/integration/descriptor/build-zod.js +82 -0
- package/.medusa/server/src/modules/integration/descriptor/define.d.ts +74 -0
- package/.medusa/server/src/modules/integration/descriptor/define.js +31 -0
- package/.medusa/server/src/modules/integration/descriptor/index.d.ts +5 -0
- package/.medusa/server/src/modules/integration/descriptor/index.js +22 -0
- package/.medusa/server/src/modules/integration/descriptor/introspect.d.ts +5 -0
- package/.medusa/server/src/modules/integration/descriptor/introspect.js +67 -0
- package/.medusa/server/src/modules/integration/descriptor/meta.d.ts +7 -0
- package/.medusa/server/src/modules/integration/descriptor/meta.js +3 -0
- package/.medusa/server/src/modules/integration/descriptor/option.d.ts +104 -0
- package/.medusa/server/src/modules/integration/descriptor/option.js +3 -0
- package/.medusa/server/src/modules/integration/descriptor/validate.d.ts +29 -0
- package/.medusa/server/src/modules/integration/descriptor/validate.js +69 -0
- package/.medusa/server/src/modules/integration/index.d.ts +22 -0
- package/.medusa/server/src/modules/integration/index.js +15 -0
- package/.medusa/server/src/modules/integration/loaders/index.d.ts +1 -0
- package/.medusa/server/src/modules/integration/loaders/index.js +9 -0
- package/.medusa/server/src/modules/integration/loaders/load-providers.d.ts +5 -0
- package/.medusa/server/src/modules/integration/loaders/load-providers.js +35 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260610215533.d.ts +5 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260610215533.js +18 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260618154037.d.ts +5 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260618154037.js +27 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260622120502.d.ts +5 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260622120502.js +14 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260701095518.d.ts +5 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260701095518.js +14 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260708072033.d.ts +5 -0
- package/.medusa/server/src/modules/integration/migrations/Migration20260708072033.js +14 -0
- package/.medusa/server/src/modules/integration/models/integration.d.ts +13 -0
- package/.medusa/server/src/modules/integration/models/integration.js +27 -0
- package/.medusa/server/src/modules/integration/services/__tests__/crypto.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/services/__tests__/crypto.unit.spec.js +33 -0
- package/.medusa/server/src/modules/integration/services/__tests__/integration-provider.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/services/__tests__/integration-provider.unit.spec.js +77 -0
- package/.medusa/server/src/modules/integration/services/__tests__/secrets.unit.spec.d.ts +1 -0
- package/.medusa/server/src/modules/integration/services/__tests__/secrets.unit.spec.js +33 -0
- package/.medusa/server/src/modules/integration/services/crypto.d.ts +10 -0
- package/.medusa/server/src/modules/integration/services/crypto.js +41 -0
- package/.medusa/server/src/modules/integration/services/index.d.ts +3 -0
- package/.medusa/server/src/modules/integration/services/index.js +11 -0
- package/.medusa/server/src/modules/integration/services/integration-module.d.ts +113 -0
- package/.medusa/server/src/modules/integration/services/integration-module.js +219 -0
- package/.medusa/server/src/modules/integration/services/integration-provider.d.ts +49 -0
- package/.medusa/server/src/modules/integration/services/integration-provider.js +76 -0
- package/.medusa/server/src/modules/integration/services/secrets.d.ts +11 -0
- package/.medusa/server/src/modules/integration/services/secrets.js +31 -0
- package/.medusa/server/src/modules/integration/types/index.d.ts +13 -0
- package/.medusa/server/src/modules/integration/types/index.js +10 -0
- package/.medusa/server/src/modules/integration/utils/abstract-integration-provider.d.ts +39 -0
- package/.medusa/server/src/modules/integration/utils/abstract-integration-provider.js +42 -0
- package/.medusa/server/src/modules/integration/utils/index.d.ts +1 -0
- package/.medusa/server/src/modules/integration/utils/index.js +6 -0
- package/.medusa/server/src/subscribers/invalidate-options-cache.d.ts +5 -0
- package/.medusa/server/src/subscribers/invalidate-options-cache.js +13 -0
- package/.medusa/server/src/types/bundles.d.ts +1 -0
- package/.medusa/server/src/types/bundles.js +38 -0
- package/.medusa/server/src/types/http/index.d.ts +1 -0
- package/.medusa/server/src/types/http/index.js +18 -0
- package/.medusa/server/src/types/http/integration/admin/entities.d.ts +32 -0
- package/.medusa/server/src/types/http/integration/admin/entities.js +3 -0
- package/.medusa/server/src/types/http/integration/admin/index.d.ts +2 -0
- package/.medusa/server/src/types/http/integration/admin/index.js +19 -0
- package/.medusa/server/src/types/http/integration/admin/responses.d.ts +19 -0
- package/.medusa/server/src/types/http/integration/admin/responses.js +3 -0
- package/.medusa/server/src/types/http/integration/index.d.ts +1 -0
- package/.medusa/server/src/types/http/integration/index.js +18 -0
- package/.medusa/server/src/types/index.d.ts +3 -0
- package/.medusa/server/src/types/index.js +20 -0
- package/.medusa/server/src/types/integration/common.d.ts +70 -0
- package/.medusa/server/src/types/integration/common.js +3 -0
- package/.medusa/server/src/types/integration/index.d.ts +1 -0
- package/.medusa/server/src/types/integration/index.js +18 -0
- package/.medusa/server/src/workflows/integration/index.d.ts +2 -0
- package/.medusa/server/src/workflows/integration/index.js +19 -0
- package/.medusa/server/src/workflows/integration/steps/apply-integration-section.d.ts +22 -0
- package/.medusa/server/src/workflows/integration/steps/apply-integration-section.js +70 -0
- package/.medusa/server/src/workflows/integration/steps/delete-integration-record.d.ts +6 -0
- package/.medusa/server/src/workflows/integration/steps/delete-integration-record.js +16 -0
- package/.medusa/server/src/workflows/integration/steps/emit-integration-event.d.ts +5 -0
- package/.medusa/server/src/workflows/integration/steps/emit-integration-event.js +11 -0
- package/.medusa/server/src/workflows/integration/steps/index.d.ts +6 -0
- package/.medusa/server/src/workflows/integration/steps/index.js +16 -0
- package/.medusa/server/src/workflows/integration/steps/run-test-connection.d.ts +4 -0
- package/.medusa/server/src/workflows/integration/steps/run-test-connection.js +20 -0
- package/.medusa/server/src/workflows/integration/steps/set-integration-enabled.d.ts +19 -0
- package/.medusa/server/src/workflows/integration/steps/set-integration-enabled.js +27 -0
- package/.medusa/server/src/workflows/integration/steps/upsert-integration-record.d.ts +9 -0
- package/.medusa/server/src/workflows/integration/steps/upsert-integration-record.js +18 -0
- package/.medusa/server/src/workflows/integration/workflows/delete-integration.d.ts +7 -0
- package/.medusa/server/src/workflows/integration/workflows/delete-integration.js +18 -0
- package/.medusa/server/src/workflows/integration/workflows/index.d.ts +4 -0
- package/.medusa/server/src/workflows/integration/workflows/index.js +12 -0
- package/.medusa/server/src/workflows/integration/workflows/set-integration-enabled.d.ts +20 -0
- package/.medusa/server/src/workflows/integration/workflows/set-integration-enabled.js +20 -0
- package/.medusa/server/src/workflows/integration/workflows/test-integration-connection.d.ts +5 -0
- package/.medusa/server/src/workflows/integration/workflows/test-integration-connection.js +21 -0
- package/.medusa/server/src/workflows/integration/workflows/upsert-integration.d.ts +8 -0
- package/.medusa/server/src/workflows/integration/workflows/upsert-integration.js +30 -0
- package/LICENSE +21 -0
- package/README.md +46 -0
- package/package.json +79 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runTestConnectionStep = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const integration_1 = require("../../../modules/integration");
|
|
6
|
+
exports.runTestConnectionStep = (0, workflows_sdk_1.createStep)("run-test-connection", async (input, { container }) => {
|
|
7
|
+
const service = container.resolve(integration_1.INTEGRATION_MODULE);
|
|
8
|
+
const result = await service.runTestConnection(input.provider_id);
|
|
9
|
+
const existing = await service.findByProviderId(input.provider_id);
|
|
10
|
+
if (existing) {
|
|
11
|
+
await service.updateIntegrations({
|
|
12
|
+
id: existing.id,
|
|
13
|
+
last_test_at: new Date(),
|
|
14
|
+
last_test_status: result.status,
|
|
15
|
+
last_test_message: result.message ?? null,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return new workflows_sdk_1.StepResponse(result);
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVuLXRlc3QtY29ubmVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3MvaW50ZWdyYXRpb24vc3RlcHMvcnVuLXRlc3QtY29ubmVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxRUFBNEU7QUFDNUUsOERBQWlFO0FBT3BELFFBQUEscUJBQXFCLEdBQUcsSUFBQSwwQkFBVSxFQUM3QyxxQkFBcUIsRUFDckIsS0FBSyxFQUFFLEtBQWlDLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQ3pELE1BQU0sT0FBTyxHQUE2QixTQUFTLENBQUMsT0FBTyxDQUFDLGdDQUFrQixDQUFDLENBQUE7SUFDL0UsTUFBTSxNQUFNLEdBQUcsTUFBTSxPQUFPLENBQUMsaUJBQWlCLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBRWpFLE1BQU0sUUFBUSxHQUFHLE1BQU0sT0FBTyxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQTtJQUNsRSxJQUFJLFFBQVEsRUFBRSxDQUFDO1FBQ2IsTUFBTSxPQUFPLENBQUMsa0JBQWtCLENBQUM7WUFDL0IsRUFBRSxFQUFFLFFBQVEsQ0FBQyxFQUFFO1lBQ2YsWUFBWSxFQUFFLElBQUksSUFBSSxFQUFFO1lBQ3hCLGdCQUFnQixFQUFFLE1BQU0sQ0FBQyxNQUFNO1lBQy9CLGlCQUFpQixFQUFFLE1BQU0sQ0FBQyxPQUFPLElBQUksSUFBSTtTQUMxQyxDQUFDLENBQUE7SUFDSixDQUFDO0lBQ0QsT0FBTyxJQUFJLDRCQUFZLENBQUMsTUFBTSxDQUFDLENBQUE7QUFDakMsQ0FBQyxDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type SetIntegrationEnabledStepInput = {
|
|
2
|
+
provider_id: string;
|
|
3
|
+
is_enabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const setIntegrationEnabledStep: import("@medusajs/framework/workflows-sdk").StepFunction<SetIntegrationEnabledStepInput, {
|
|
6
|
+
id: string;
|
|
7
|
+
module: "payment" | "fulfillment" | "marketplace" | "crm" | "erp" | "pim" | "notification" | "feed" | "tax" | "other";
|
|
8
|
+
provider_id: string;
|
|
9
|
+
title: string | null;
|
|
10
|
+
options: Record<string, unknown>;
|
|
11
|
+
options_version: number;
|
|
12
|
+
is_enabled: boolean;
|
|
13
|
+
last_test_at: Date | null;
|
|
14
|
+
last_test_status: "ok" | "fail" | "skipped" | null;
|
|
15
|
+
last_test_message: string | null;
|
|
16
|
+
created_at: Date;
|
|
17
|
+
updated_at: Date;
|
|
18
|
+
deleted_at: Date | null;
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setIntegrationEnabledStep = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
+
const integration_1 = require("../../../modules/integration");
|
|
7
|
+
exports.setIntegrationEnabledStep = (0, workflows_sdk_1.createStep)("set-integration-enabled", async (input, { container }) => {
|
|
8
|
+
const service = container.resolve(integration_1.INTEGRATION_MODULE);
|
|
9
|
+
const existing = await service.findByProviderId(input.provider_id);
|
|
10
|
+
// Enabling/disabling only applies to a configured integration (an existing row).
|
|
11
|
+
if (!existing) {
|
|
12
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Integration "${input.provider_id}" is not configured`);
|
|
13
|
+
}
|
|
14
|
+
const record = await service.updateIntegrations({
|
|
15
|
+
id: existing.id,
|
|
16
|
+
is_enabled: input.is_enabled,
|
|
17
|
+
});
|
|
18
|
+
return new workflows_sdk_1.StepResponse(record, { id: existing.id, previous: existing.is_enabled });
|
|
19
|
+
},
|
|
20
|
+
// Roll back to the previous enabled state if a later step fails.
|
|
21
|
+
async (compensate, { container }) => {
|
|
22
|
+
if (!compensate)
|
|
23
|
+
return;
|
|
24
|
+
const service = container.resolve(integration_1.INTEGRATION_MODULE);
|
|
25
|
+
await service.updateIntegrations({ id: compensate.id, is_enabled: compensate.previous });
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LWludGVncmF0aW9uLWVuYWJsZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2ludGVncmF0aW9uL3N0ZXBzL3NldC1pbnRlZ3JhdGlvbi1lbmFibGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUE0RTtBQUM1RSxxREFBdUQ7QUFDdkQsOERBQWlFO0FBUXBELFFBQUEseUJBQXlCLEdBQUcsSUFBQSwwQkFBVSxFQUNqRCx5QkFBeUIsRUFDekIsS0FBSyxFQUFFLEtBQXFDLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQzdELE1BQU0sT0FBTyxHQUE2QixTQUFTLENBQUMsT0FBTyxDQUFDLGdDQUFrQixDQUFDLENBQUE7SUFDL0UsTUFBTSxRQUFRLEdBQUcsTUFBTSxPQUFPLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQ2xFLGlGQUFpRjtJQUNqRixJQUFJLENBQUMsUUFBUSxFQUFFLENBQUM7UUFDZCxNQUFNLElBQUksbUJBQVcsQ0FDbkIsbUJBQVcsQ0FBQyxLQUFLLENBQUMsU0FBUyxFQUMzQixnQkFBZ0IsS0FBSyxDQUFDLFdBQVcscUJBQXFCLENBQ3ZELENBQUE7SUFDSCxDQUFDO0lBQ0QsTUFBTSxNQUFNLEdBQUcsTUFBTSxPQUFPLENBQUMsa0JBQWtCLENBQUM7UUFDOUMsRUFBRSxFQUFFLFFBQVEsQ0FBQyxFQUFFO1FBQ2YsVUFBVSxFQUFFLEtBQUssQ0FBQyxVQUFVO0tBQzdCLENBQUMsQ0FBQTtJQUNGLE9BQU8sSUFBSSw0QkFBWSxDQUFDLE1BQU0sRUFBRSxFQUFFLEVBQUUsRUFBRSxRQUFRLENBQUMsRUFBRSxFQUFFLFFBQVEsRUFBRSxRQUFRLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQTtBQUNyRixDQUFDO0FBQ0QsaUVBQWlFO0FBQ2pFLEtBQUssRUFBRSxVQUFVLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQ2xDLElBQUksQ0FBQyxVQUFVO1FBQUUsT0FBTTtJQUN2QixNQUFNLE9BQU8sR0FBNkIsU0FBUyxDQUFDLE9BQU8sQ0FBQyxnQ0FBa0IsQ0FBQyxDQUFBO0lBQy9FLE1BQU0sT0FBTyxDQUFDLGtCQUFrQixDQUFDLEVBQUUsRUFBRSxFQUFFLFVBQVUsQ0FBQyxFQUFFLEVBQUUsVUFBVSxFQUFFLFVBQVUsQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFBO0FBQzFGLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ModuleKind } from "../../../modules/integration/descriptor/define";
|
|
2
|
+
export type UpsertIntegrationRecordStepInput = {
|
|
3
|
+
provider_id: string;
|
|
4
|
+
module: ModuleKind;
|
|
5
|
+
options_version: number;
|
|
6
|
+
options: Record<string, unknown>;
|
|
7
|
+
title?: string | null;
|
|
8
|
+
};
|
|
9
|
+
export declare const upsertIntegrationRecordStep: import("@medusajs/framework/workflows-sdk").StepFunction<UpsertIntegrationRecordStepInput, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upsertIntegrationRecordStep = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const integration_1 = require("../../../modules/integration");
|
|
6
|
+
exports.upsertIntegrationRecordStep = (0, workflows_sdk_1.createStep)("upsert-integration-record", async (input, { container }) => {
|
|
7
|
+
const service = container.resolve(integration_1.INTEGRATION_MODULE);
|
|
8
|
+
const existing = await service.findByProviderId(input.provider_id);
|
|
9
|
+
let record;
|
|
10
|
+
if (existing) {
|
|
11
|
+
record = await service.updateIntegrations({ id: existing.id, ...input });
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
record = await service.createIntegrations(input);
|
|
15
|
+
}
|
|
16
|
+
return new workflows_sdk_1.StepResponse(record, { id: record.id, existed: !!existing });
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBzZXJ0LWludGVncmF0aW9uLXJlY29yZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3MvaW50ZWdyYXRpb24vc3RlcHMvdXBzZXJ0LWludGVncmF0aW9uLXJlY29yZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxRUFBNEU7QUFDNUUsOERBQWlFO0FBWXBELFFBQUEsMkJBQTJCLEdBQUcsSUFBQSwwQkFBVSxFQUNuRCwyQkFBMkIsRUFDM0IsS0FBSyxFQUFFLEtBQXVDLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQy9ELE1BQU0sT0FBTyxHQUE2QixTQUFTLENBQUMsT0FBTyxDQUFDLGdDQUFrQixDQUFDLENBQUE7SUFDL0UsTUFBTSxRQUFRLEdBQUcsTUFBTSxPQUFPLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQ2xFLElBQUksTUFBTSxDQUFBO0lBQ1YsSUFBSSxRQUFRLEVBQUUsQ0FBQztRQUNiLE1BQU0sR0FBRyxNQUFNLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxFQUFFLEVBQUUsRUFBRSxRQUFRLENBQUMsRUFBRSxFQUFFLEdBQUcsS0FBSyxFQUFFLENBQUMsQ0FBQTtJQUMxRSxDQUFDO1NBQU0sQ0FBQztRQUNOLE1BQU0sR0FBRyxNQUFNLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUNsRCxDQUFDO0lBQ0QsT0FBTyxJQUFJLDRCQUFZLENBQUMsTUFBTSxFQUFFLEVBQUUsRUFBRSxFQUFFLE1BQU0sQ0FBQyxFQUFFLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFBO0FBQ3pFLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type DeleteIntegrationWorkflowInput = {
|
|
2
|
+
provider_id: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const deleteIntegrationWorkflowId = "delete-integration";
|
|
5
|
+
export declare const deleteIntegrationWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<DeleteIntegrationWorkflowInput, {
|
|
6
|
+
deleted: boolean;
|
|
7
|
+
}, []>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteIntegrationWorkflow = exports.deleteIntegrationWorkflowId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const steps_1 = require("../steps");
|
|
6
|
+
exports.deleteIntegrationWorkflowId = "delete-integration";
|
|
7
|
+
exports.deleteIntegrationWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.deleteIntegrationWorkflowId, function (input) {
|
|
8
|
+
const result = (0, steps_1.deleteIntegrationRecordStep)(input);
|
|
9
|
+
(0, steps_1.emitIntegrationEventStep)((0, workflows_sdk_1.transform)({ input }, (d) => ({
|
|
10
|
+
name: "integration.updated",
|
|
11
|
+
data: {
|
|
12
|
+
provider_id: d.input.provider_id,
|
|
13
|
+
change: "delete",
|
|
14
|
+
},
|
|
15
|
+
})));
|
|
16
|
+
return new workflows_sdk_1.WorkflowResponse(result);
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVsZXRlLWludGVncmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9pbnRlZ3JhdGlvbi93b3JrZmxvd3MvZGVsZXRlLWludGVncmF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUErRjtBQUMvRixvQ0FBZ0Y7QUFNbkUsUUFBQSwyQkFBMkIsR0FBRyxvQkFBb0IsQ0FBQTtBQUVsRCxRQUFBLHlCQUF5QixHQUFHLElBQUEsOEJBQWMsRUFDckQsbUNBQTJCLEVBQzNCLFVBQVUsS0FBcUM7SUFDN0MsTUFBTSxNQUFNLEdBQUcsSUFBQSxtQ0FBMkIsRUFBQyxLQUFLLENBQUMsQ0FBQTtJQUNqRCxJQUFBLGdDQUF3QixFQUN0QixJQUFBLHlCQUFTLEVBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQztRQUMzQixJQUFJLEVBQUUscUJBQXFCO1FBQzNCLElBQUksRUFBRTtZQUNKLFdBQVcsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLFdBQVc7WUFDaEMsTUFBTSxFQUFFLFFBQVE7U0FDakI7S0FDRixDQUFDLENBQUMsQ0FDSixDQUFBO0lBQ0QsT0FBTyxJQUFJLGdDQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ3JDLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { upsertIntegrationWorkflow } from "./upsert-integration";
|
|
2
|
+
export { deleteIntegrationWorkflow } from "./delete-integration";
|
|
3
|
+
export { testIntegrationConnectionWorkflow } from "./test-integration-connection";
|
|
4
|
+
export { setIntegrationEnabledWorkflow } from "./set-integration-enabled";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setIntegrationEnabledWorkflow = exports.testIntegrationConnectionWorkflow = exports.deleteIntegrationWorkflow = exports.upsertIntegrationWorkflow = void 0;
|
|
4
|
+
var upsert_integration_1 = require("./upsert-integration");
|
|
5
|
+
Object.defineProperty(exports, "upsertIntegrationWorkflow", { enumerable: true, get: function () { return upsert_integration_1.upsertIntegrationWorkflow; } });
|
|
6
|
+
var delete_integration_1 = require("./delete-integration");
|
|
7
|
+
Object.defineProperty(exports, "deleteIntegrationWorkflow", { enumerable: true, get: function () { return delete_integration_1.deleteIntegrationWorkflow; } });
|
|
8
|
+
var test_integration_connection_1 = require("./test-integration-connection");
|
|
9
|
+
Object.defineProperty(exports, "testIntegrationConnectionWorkflow", { enumerable: true, get: function () { return test_integration_connection_1.testIntegrationConnectionWorkflow; } });
|
|
10
|
+
var set_integration_enabled_1 = require("./set-integration-enabled");
|
|
11
|
+
Object.defineProperty(exports, "setIntegrationEnabledWorkflow", { enumerable: true, get: function () { return set_integration_enabled_1.setIntegrationEnabledWorkflow; } });
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2ludGVncmF0aW9uL3dvcmtmbG93cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyREFBZ0U7QUFBdkQsK0hBQUEseUJBQXlCLE9BQUE7QUFDbEMsMkRBQWdFO0FBQXZELCtIQUFBLHlCQUF5QixPQUFBO0FBQ2xDLDZFQUFpRjtBQUF4RSxnSkFBQSxpQ0FBaUMsT0FBQTtBQUMxQyxxRUFBeUU7QUFBaEUsd0lBQUEsNkJBQTZCLE9BQUEifQ==
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SetIntegrationEnabledWorkflowInput = {
|
|
2
|
+
provider_id: string;
|
|
3
|
+
is_enabled: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const setIntegrationEnabledWorkflowId = "set-integration-enabled";
|
|
6
|
+
export declare const setIntegrationEnabledWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<SetIntegrationEnabledWorkflowInput, {
|
|
7
|
+
id: string;
|
|
8
|
+
module: "payment" | "fulfillment" | "marketplace" | "crm" | "erp" | "pim" | "notification" | "feed" | "tax" | "other";
|
|
9
|
+
provider_id: string;
|
|
10
|
+
title: string | null;
|
|
11
|
+
options: Record<string, unknown>;
|
|
12
|
+
options_version: number;
|
|
13
|
+
is_enabled: boolean;
|
|
14
|
+
last_test_at: Date | null;
|
|
15
|
+
last_test_status: "ok" | "fail" | "skipped" | null;
|
|
16
|
+
last_test_message: string | null;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date;
|
|
19
|
+
deleted_at: Date | null;
|
|
20
|
+
}, []>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setIntegrationEnabledWorkflow = exports.setIntegrationEnabledWorkflowId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const steps_1 = require("../steps");
|
|
6
|
+
exports.setIntegrationEnabledWorkflowId = "set-integration-enabled";
|
|
7
|
+
exports.setIntegrationEnabledWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.setIntegrationEnabledWorkflowId, function (input) {
|
|
8
|
+
const record = (0, steps_1.setIntegrationEnabledStep)(input);
|
|
9
|
+
// `integration.updated` invalidates the resolved-options cache, so a disabled
|
|
10
|
+
// integration stops resolving (and an enabled one starts) on the next read.
|
|
11
|
+
(0, steps_1.emitIntegrationEventStep)((0, workflows_sdk_1.transform)({ input }, (d) => ({
|
|
12
|
+
name: "integration.updated",
|
|
13
|
+
data: {
|
|
14
|
+
provider_id: d.input.provider_id,
|
|
15
|
+
change: "enabled",
|
|
16
|
+
},
|
|
17
|
+
})));
|
|
18
|
+
return new workflows_sdk_1.WorkflowResponse(record);
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LWludGVncmF0aW9uLWVuYWJsZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2ludGVncmF0aW9uL3dvcmtmbG93cy9zZXQtaW50ZWdyYXRpb24tZW5hYmxlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxRUFBK0Y7QUFDL0Ysb0NBQThFO0FBT2pFLFFBQUEsK0JBQStCLEdBQUcseUJBQXlCLENBQUE7QUFFM0QsUUFBQSw2QkFBNkIsR0FBRyxJQUFBLDhCQUFjLEVBQ3pELHVDQUErQixFQUMvQixVQUFVLEtBQXlDO0lBQ2pELE1BQU0sTUFBTSxHQUFHLElBQUEsaUNBQXlCLEVBQUMsS0FBSyxDQUFDLENBQUE7SUFFL0MsOEVBQThFO0lBQzlFLDRFQUE0RTtJQUM1RSxJQUFBLGdDQUF3QixFQUN0QixJQUFBLHlCQUFTLEVBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQztRQUMzQixJQUFJLEVBQUUscUJBQXFCO1FBQzNCLElBQUksRUFBRTtZQUNKLFdBQVcsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLFdBQVc7WUFDaEMsTUFBTSxFQUFFLFNBQVM7U0FDbEI7S0FDRixDQUFDLENBQUMsQ0FDSixDQUFBO0lBRUQsT0FBTyxJQUFJLGdDQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ3JDLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type TestIntegrationConnectionWorkflowInput = {
|
|
2
|
+
provider_id: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const testIntegrationConnectionWorkflowId = "test-integration-connection";
|
|
5
|
+
export declare const testIntegrationConnectionWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<TestIntegrationConnectionWorkflowInput, import("../../..").TestConnectionResult, []>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testIntegrationConnectionWorkflow = exports.testIntegrationConnectionWorkflowId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const steps_1 = require("../steps");
|
|
6
|
+
exports.testIntegrationConnectionWorkflowId = "test-integration-connection";
|
|
7
|
+
exports.testIntegrationConnectionWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.testIntegrationConnectionWorkflowId, function (input) {
|
|
8
|
+
const result = (0, steps_1.runTestConnectionStep)((0, workflows_sdk_1.transform)({ input }, (d) => ({
|
|
9
|
+
provider_id: d.input.provider_id,
|
|
10
|
+
})));
|
|
11
|
+
(0, steps_1.emitIntegrationEventStep)((0, workflows_sdk_1.transform)({ input, result }, (d) => ({
|
|
12
|
+
name: "integration.tested",
|
|
13
|
+
data: {
|
|
14
|
+
provider_id: d.input.provider_id,
|
|
15
|
+
status: d.result.status,
|
|
16
|
+
message: d.result.message,
|
|
17
|
+
},
|
|
18
|
+
})));
|
|
19
|
+
return new workflows_sdk_1.WorkflowResponse(result);
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC1pbnRlZ3JhdGlvbi1jb25uZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9pbnRlZ3JhdGlvbi93b3JrZmxvd3MvdGVzdC1pbnRlZ3JhdGlvbi1jb25uZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUErRjtBQUMvRixvQ0FBMEU7QUFNN0QsUUFBQSxtQ0FBbUMsR0FBRyw2QkFBNkIsQ0FBQTtBQUVuRSxRQUFBLGlDQUFpQyxHQUFHLElBQUEsOEJBQWMsRUFDN0QsMkNBQW1DLEVBQ25DLFVBQVUsS0FBNkM7SUFDckQsTUFBTSxNQUFNLEdBQUcsSUFBQSw2QkFBcUIsRUFDbEMsSUFBQSx5QkFBUyxFQUFDLEVBQUUsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDM0IsV0FBVyxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsV0FBVztLQUNqQyxDQUFDLENBQUMsQ0FDSixDQUFBO0lBQ0QsSUFBQSxnQ0FBd0IsRUFDdEIsSUFBQSx5QkFBUyxFQUFDLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDO1FBQ25DLElBQUksRUFBRSxvQkFBb0I7UUFDMUIsSUFBSSxFQUFFO1lBQ0osV0FBVyxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsV0FBVztZQUNoQyxNQUFNLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxNQUFNO1lBQ3ZCLE9BQU8sRUFBRSxDQUFDLENBQUMsTUFBTSxDQUFDLE9BQU87U0FDMUI7S0FDRixDQUFDLENBQUMsQ0FDSixDQUFBO0lBQ0QsT0FBTyxJQUFJLGdDQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ3JDLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type UpsertIntegrationWorkflowInput = {
|
|
2
|
+
provider_id: string;
|
|
3
|
+
section_id?: string | null;
|
|
4
|
+
title?: string | null;
|
|
5
|
+
values: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export declare const upsertIntegrationWorkflowId = "upsert-integration";
|
|
8
|
+
export declare const upsertIntegrationWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<UpsertIntegrationWorkflowInput, any, []>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upsertIntegrationWorkflow = exports.upsertIntegrationWorkflowId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const steps_1 = require("../steps");
|
|
6
|
+
exports.upsertIntegrationWorkflowId = "upsert-integration";
|
|
7
|
+
exports.upsertIntegrationWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.upsertIntegrationWorkflowId, function (input) {
|
|
8
|
+
const prepared = (0, steps_1.applyIntegrationSectionStep)({
|
|
9
|
+
provider_id: input.provider_id,
|
|
10
|
+
section_id: input.section_id ?? null,
|
|
11
|
+
values: input.values,
|
|
12
|
+
});
|
|
13
|
+
const recordInput = (0, workflows_sdk_1.transform)({ input, prepared }, (data) => ({
|
|
14
|
+
provider_id: data.input.provider_id,
|
|
15
|
+
title: data.input.title ?? null,
|
|
16
|
+
module: data.prepared.module,
|
|
17
|
+
options_version: data.prepared.options_version,
|
|
18
|
+
options: data.prepared.options,
|
|
19
|
+
}));
|
|
20
|
+
const record = (0, steps_1.upsertIntegrationRecordStep)(recordInput);
|
|
21
|
+
(0, steps_1.emitIntegrationEventStep)((0, workflows_sdk_1.transform)({ input }, (d) => ({
|
|
22
|
+
name: "integration.updated",
|
|
23
|
+
data: {
|
|
24
|
+
provider_id: d.input.provider_id,
|
|
25
|
+
change: "update",
|
|
26
|
+
},
|
|
27
|
+
})));
|
|
28
|
+
return new workflows_sdk_1.WorkflowResponse(record);
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBzZXJ0LWludGVncmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9pbnRlZ3JhdGlvbi93b3JrZmxvd3MvdXBzZXJ0LWludGVncmF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUErRjtBQUMvRixvQ0FJaUI7QUFTSixRQUFBLDJCQUEyQixHQUFHLG9CQUFvQixDQUFBO0FBRWxELFFBQUEseUJBQXlCLEdBQUcsSUFBQSw4QkFBYyxFQUNyRCxtQ0FBMkIsRUFDM0IsVUFBVSxLQUFxQztJQUM3QyxNQUFNLFFBQVEsR0FBRyxJQUFBLG1DQUEyQixFQUFDO1FBQzNDLFdBQVcsRUFBRSxLQUFLLENBQUMsV0FBVztRQUM5QixVQUFVLEVBQUUsS0FBSyxDQUFDLFVBQVUsSUFBSSxJQUFJO1FBQ3BDLE1BQU0sRUFBRSxLQUFLLENBQUMsTUFBTTtLQUNyQixDQUFDLENBQUE7SUFFRixNQUFNLFdBQVcsR0FBRyxJQUFBLHlCQUFTLEVBQUMsRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLEVBQUUsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDNUQsV0FBVyxFQUFFLElBQUksQ0FBQyxLQUFLLENBQUMsV0FBVztRQUNuQyxLQUFLLEVBQUUsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLElBQUksSUFBSTtRQUMvQixNQUFNLEVBQUUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxNQUFNO1FBQzVCLGVBQWUsRUFBRSxJQUFJLENBQUMsUUFBUSxDQUFDLGVBQWU7UUFDOUMsT0FBTyxFQUFFLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTztLQUMvQixDQUFDLENBQUMsQ0FBQTtJQUVILE1BQU0sTUFBTSxHQUFHLElBQUEsbUNBQTJCLEVBQUMsV0FBVyxDQUFDLENBQUE7SUFFdkQsSUFBQSxnQ0FBd0IsRUFDdEIsSUFBQSx5QkFBUyxFQUFDLEVBQUUsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDM0IsSUFBSSxFQUFFLHFCQUFxQjtRQUMzQixJQUFJLEVBQUU7WUFDSixXQUFXLEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxXQUFXO1lBQ2hDLE1BQU0sRUFBRSxRQUFRO1NBQ2pCO0tBQ0YsQ0FBQyxDQUFDLENBQ0osQ0FBQTtJQUVELE9BQU8sSUFBSSxnQ0FBZ0IsQ0FBQyxNQUFNLENBQUMsQ0FBQTtBQUNyQyxDQUFDLENBQ0YsQ0FBQSJ9
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License Copyright (c) 2025 Gorgo
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free
|
|
4
|
+
of charge, to any person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use, copy, modify, merge,
|
|
7
|
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice
|
|
12
|
+
(including the next paragraph) shall be included in all copies or substantial
|
|
13
|
+
portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
16
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
18
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
19
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
Integration Module for Medusa
|
|
3
|
+
</h1>
|
|
4
|
+
|
|
5
|
+
<br/>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://medusajs.com">
|
|
9
|
+
<img src="https://img.shields.io/badge/Medusa-^2.17.2-blue?logo=medusa" alt="Medusa" />
|
|
10
|
+
</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://t.me/gorgojs_chat">
|
|
15
|
+
<img src="https://img.shields.io/badge/Telegram-Support_Chat-0088cc?logo=telegram&style=social" alt="Telegram Support Chat" />
|
|
16
|
+
</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://t.me/medusajs_chat">
|
|
21
|
+
<img src="https://img.shields.io/badge/Telegram-Medusa.js_Dev_Community_Chat-0088cc?logo=telegram&style=social" alt="Medusa.js Chat on Telegram" />
|
|
22
|
+
</a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
## 💬 Support & Community
|
|
26
|
+
|
|
27
|
+
Got questions or ideas about the plugin? Join the Telegram support chat — [@gorgojs_chat](https://t.me/gorgojs_chat)
|
|
28
|
+
|
|
29
|
+
Connect with other Medusa developers on Telegram — [@medusajs_chat](https://t.me/medusajs_chat)
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
- Medusa v2.17.2 or later
|
|
34
|
+
- Node.js v20 or later
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
yarn add @gorgo/medusa-integration
|
|
40
|
+
# or
|
|
41
|
+
npm install @gorgo/medusa-integration
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
Licensed under the [MIT License](LICENSE).
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gorgo/medusa-integration",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Integration module for Medusa",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
".medusa/server"
|
|
8
|
+
],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./.medusa/server/src/index.d.ts",
|
|
12
|
+
"default": "./.medusa/server/src/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./workflows": "./.medusa/server/src/workflows/index.js",
|
|
16
|
+
"./.medusa/server/src/modules/*": "./.medusa/server/src/modules/*/index.js",
|
|
17
|
+
"./modules/*": "./.medusa/server/src/modules/*/index.js",
|
|
18
|
+
"./providers/*": "./.medusa/server/src/providers/*/index.js",
|
|
19
|
+
"./*": "./.medusa/server/src/*.js",
|
|
20
|
+
"./admin": {
|
|
21
|
+
"import": "./.medusa/server/src/admin/index.mjs",
|
|
22
|
+
"require": "./.medusa/server/src/admin/index.js",
|
|
23
|
+
"default": "./.medusa/server/src/admin/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"medusa",
|
|
28
|
+
"medusa-v2",
|
|
29
|
+
"medusa-plugin",
|
|
30
|
+
"medusa-plugin-integration",
|
|
31
|
+
"medusa-plugin-other"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "medusa plugin:build",
|
|
35
|
+
"dev": "yarn predev && medusa plugin:develop",
|
|
36
|
+
"predev": "medusa plugin:publish",
|
|
37
|
+
"prepublishOnly": "medusa plugin:build",
|
|
38
|
+
"test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@medusajs/admin-sdk": "^2.17.2",
|
|
42
|
+
"@medusajs/cli": "^2.17.2",
|
|
43
|
+
"@medusajs/dashboard": "^2.17.2",
|
|
44
|
+
"@medusajs/framework": "^2.17.2",
|
|
45
|
+
"@medusajs/icons": "^2.17.2",
|
|
46
|
+
"@medusajs/medusa": "^2.17.2",
|
|
47
|
+
"@medusajs/test-utils": "^2.17.2",
|
|
48
|
+
"@medusajs/ui": "^4.1.15",
|
|
49
|
+
"@swc/core": "^1.7.28",
|
|
50
|
+
"@swc/jest": "^0.2.36",
|
|
51
|
+
"@types/jest": "^29.5.13",
|
|
52
|
+
"@types/node": "^20.0.0",
|
|
53
|
+
"@types/react": "^18.3.2",
|
|
54
|
+
"@types/react-dom": "^18.2.25",
|
|
55
|
+
"jest": "^29.7.0",
|
|
56
|
+
"prop-types": "^15.8.1",
|
|
57
|
+
"react": "^18.2.0",
|
|
58
|
+
"react-dom": "^18.2.0",
|
|
59
|
+
"ts-node": "^10.9.2",
|
|
60
|
+
"typescript": "^5.6.2",
|
|
61
|
+
"vite": "^5.2.11",
|
|
62
|
+
"yalc": "^1.0.0-pre.53",
|
|
63
|
+
"zod": "^4.0.2"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@medusajs/admin-sdk": "^2.17.2",
|
|
67
|
+
"@medusajs/cli": "^2.17.2",
|
|
68
|
+
"@medusajs/dashboard": "^2.17.2",
|
|
69
|
+
"@medusajs/deps": "^2.17.2",
|
|
70
|
+
"@medusajs/framework": "^2.17.2",
|
|
71
|
+
"@medusajs/icons": "^2.17.2",
|
|
72
|
+
"@medusajs/medusa": "^2.17.2",
|
|
73
|
+
"@medusajs/test-utils": "^2.17.2",
|
|
74
|
+
"@medusajs/ui": "^4.1.16"
|
|
75
|
+
},
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">=20"
|
|
78
|
+
}
|
|
79
|
+
}
|