@medusajs/fulfillment-manual 0.0.3-snapshot-20240426112214 → 0.0.3-snapshot-20240520151134

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var manual_fulfillment_1 = require("./services/manual-fulfillment");
4
- var services = [manual_fulfillment_1.ManualFulfillmentService];
5
- var providerExport = {
6
- services: services,
3
+ const manual_fulfillment_1 = require("./services/manual-fulfillment");
4
+ const services = [manual_fulfillment_1.ManualFulfillmentService];
5
+ const providerExport = {
6
+ services,
7
7
  };
8
8
  exports.default = providerExport;
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxvRUFBd0U7QUFFeEUsSUFBTSxRQUFRLEdBQUcsQ0FBQyw2Q0FBd0IsQ0FBQyxDQUFBO0FBRTNDLElBQU0sY0FBYyxHQUEwQjtJQUM1QyxRQUFRLFVBQUE7Q0FDVCxDQUFBO0FBRUQsa0JBQWUsY0FBYyxDQUFBIn0=
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxzRUFBd0U7QUFFeEUsTUFBTSxRQUFRLEdBQUcsQ0FBQyw2Q0FBd0IsQ0FBQyxDQUFBO0FBRTNDLE1BQU0sY0FBYyxHQUEwQjtJQUM1QyxRQUFRO0NBQ1QsQ0FBQTtBQUVELGtCQUFlLGNBQWMsQ0FBQSJ9
@@ -1,110 +1,37 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
2
  Object.defineProperty(exports, "__esModule", { value: true });
54
3
  exports.ManualFulfillmentService = void 0;
55
- var utils_1 = require("@medusajs/utils");
4
+ const utils_1 = require("@medusajs/utils");
56
5
  // TODO rework type and DTO's
57
- var ManualFulfillmentService = /** @class */ (function (_super) {
58
- __extends(ManualFulfillmentService, _super);
59
- function ManualFulfillmentService() {
60
- return _super.call(this) || this;
6
+ class ManualFulfillmentService extends utils_1.AbstractFulfillmentProviderService {
7
+ constructor() {
8
+ super();
9
+ }
10
+ async getFulfillmentOptions() {
11
+ return [
12
+ {
13
+ id: "manual-fulfillment",
14
+ },
15
+ {
16
+ id: "manual-fulfillment-return",
17
+ is_return: true,
18
+ },
19
+ ];
20
+ }
21
+ async validateFulfillmentData(optionData, data, context) {
22
+ return data;
23
+ }
24
+ async validateOption(data) {
25
+ return true;
26
+ }
27
+ async createFulfillment() {
28
+ // No data is being sent anywhere
29
+ return {};
30
+ }
31
+ async cancelFulfillment(fulfillment) {
32
+ return {};
61
33
  }
62
- ManualFulfillmentService.prototype.getFulfillmentOptions = function () {
63
- return __awaiter(this, void 0, void 0, function () {
64
- return __generator(this, function (_a) {
65
- return [2 /*return*/, [
66
- {
67
- id: "manual-fulfillment",
68
- },
69
- {
70
- id: "manual-fulfillment-return",
71
- is_return: true,
72
- },
73
- ]];
74
- });
75
- });
76
- };
77
- ManualFulfillmentService.prototype.validateFulfillmentData = function (optionData, data, context) {
78
- return __awaiter(this, void 0, void 0, function () {
79
- return __generator(this, function (_a) {
80
- return [2 /*return*/, data];
81
- });
82
- });
83
- };
84
- ManualFulfillmentService.prototype.validateOption = function (data) {
85
- return __awaiter(this, void 0, void 0, function () {
86
- return __generator(this, function (_a) {
87
- return [2 /*return*/, true];
88
- });
89
- });
90
- };
91
- ManualFulfillmentService.prototype.createFulfillment = function () {
92
- return __awaiter(this, void 0, void 0, function () {
93
- return __generator(this, function (_a) {
94
- // No data is being sent anywhere
95
- return [2 /*return*/, {}];
96
- });
97
- });
98
- };
99
- ManualFulfillmentService.prototype.cancelFulfillment = function (fulfillment) {
100
- return __awaiter(this, void 0, void 0, function () {
101
- return __generator(this, function (_a) {
102
- return [2 /*return*/, {}];
103
- });
104
- });
105
- };
106
- ManualFulfillmentService.identifier = "manual";
107
- return ManualFulfillmentService;
108
- }(utils_1.AbstractFulfillmentProviderService));
34
+ }
109
35
  exports.ManualFulfillmentService = ManualFulfillmentService;
110
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFudWFsLWZ1bGZpbGxtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlcnZpY2VzL21hbnVhbC1mdWxmaWxsbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSx5Q0FBb0U7QUFFcEUsNkJBQTZCO0FBRTdCO0lBQThDLDRDQUFrQztJQUc5RTtlQUNFLGlCQUFPO0lBQ1QsQ0FBQztJQUVLLHdEQUFxQixHQUEzQjs7O2dCQUNFL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0w7Z0JBQ0UsRUFBRSxFQUFFLG9CQUFvQjthQUN6QjtZQUNEO2dCQUNFLEVBQUUsRUFBRSwyQkFBMkI7Z0JBQy9CLFNBQVMsRUFBRSxJQUFJO2FBQ2hCO1NBQ0YsQ0FBQTtJQUNILENBQUM7SUFFRCxLQUFLLENBQUMsdUJBQXVCLENBQzNCLFVBQW1DLEVBQ25DLElBQTZCLEVBQzdCLE9BQWdDO1FBRWhDLE9BQU8sSUFBSSxDQUFBO0lBQ2IsQ0FBQztJQUVELEtBQUssQ0FBQyxjQUFjLENBQUMsSUFBNkI7UUFDaEQsT0FBTyxJQUFJLENBQUE7SUFDYixDQUFDO0lBRUQsS0FBSyxDQUFDLGlCQUFpQjtRQUNyQixpQ0FBaUM7UUFDakMsT0FBTyxFQUFFLENBQUE7SUFDWCxDQUFDO0lBRUQsS0FBSyxDQUFDLGlCQUFpQixDQUFDLFdBQW9DO1FBQzFELE9BQU8sRUFBRSxDQUFBO0lBQ1gsQ0FBQzs7QUF0Q0gsNERBdUNDO0FBdENRLG1DQUFVLEdBQUcsUUFBUSxDQUFBIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/fulfillment-manual",
3
- "version": "0.0.3-snapshot-20240426112214",
3
+ "version": "0.0.3-snapshot-20240520151134",
4
4
  "description": "Manual fulfillment for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "typescript": "^4.9.5"
30
30
  },
31
31
  "dependencies": {
32
- "@medusajs/utils": "1.12.0-snapshot-20240426112214",
32
+ "@medusajs/utils": "1.12.0-snapshot-20240520151134",
33
33
  "body-parser": "^1.19.0",
34
34
  "express": "^4.17.1"
35
35
  },