@medusajs/fulfillment-manual 2.1.2-preview-20241211060152 → 2.1.2-preview-20241211090145

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,12 @@
1
1
  import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils";
2
- import { FulfillmentOption } from "@medusajs/types";
2
+ import { CalculatedShippingOptionPrice, FulfillmentOption } from "@medusajs/types";
3
3
  export declare class ManualFulfillmentService extends AbstractFulfillmentProviderService {
4
4
  static identifier: string;
5
5
  constructor();
6
6
  getFulfillmentOptions(): Promise<FulfillmentOption[]>;
7
7
  validateFulfillmentData(optionData: Record<string, unknown>, data: Record<string, unknown>, context: Record<string, unknown>): Promise<any>;
8
+ calculatePrice(optionData: Record<string, unknown>, data: Record<string, unknown>, context: Record<string, unknown>): Promise<CalculatedShippingOptionPrice>;
9
+ canCalculate(): Promise<boolean>;
8
10
  validateOption(data: Record<string, any>): Promise<boolean>;
9
11
  createFulfillment(): Promise<Record<string, any>>;
10
12
  cancelFulfillment(): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"manual-fulfillment.d.ts","sourceRoot":"","sources":["../../src/services/manual-fulfillment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAInD,qBAAa,wBAAyB,SAAQ,kCAAkC;IAC9E,MAAM,CAAC,UAAU,SAAW;;IAMtB,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAYrD,uBAAuB,CAC3B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,GAAG,CAAC;IAIT,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG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IAAI,OAAO,CAAC,GAAG,CAAC;CAG9C"}
@@ -21,6 +21,12 @@ class ManualFulfillmentService extends utils_1.AbstractFulfillmentProviderServic
21
21
  async validateFulfillmentData(optionData, data, context) {
22
22
  return data;
23
23
  }
24
+ async calculatePrice(optionData, data, context) {
25
+ throw new Error("Manual fulfillment does not support price calculation");
26
+ }
27
+ async canCalculate() {
28
+ return false;
29
+ }
24
30
  async validateOption(data) {
25
31
  return true;
26
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"manual-fulfillment.js","sourceRoot":"","sources":["../../src/services/manual-fulfillment.ts"],"names":[],"mappings":";;;AAAA,qDAA8E;AAG9E,6BAA6B;AAE7B,MAAa,wBAAyB,SAAQ,0CAAkC;IAG9E;QACE,KAAK,EAAE,CAAA;IACT,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO;YACL;gBACE,EAAE,EAAE,oBAAoB;aACzB;YACD;gBACE,EAAE,EAAE,2BAA2B;gBAC/B,SAAS,EAAE,IAAI;aAChB;SACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,UAAmC,EACnC,IAA6B,EAC7B,OAAgC;QAEhC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,IAAyB;QAC5C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,iCAAiC;QACjC,OAAO,EAAE,CAAA;IACX,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,OAAO,EAAE,CAAA;IACX,CAAC;;AA1CH,4DA2CC;AA1CQ,mCAAU,GAAG,QAAQ,CAAA"}
1
+ {"version":3,"file":"manual-fulfillment.js","sourceRoot":"","sources":["../../src/services/manual-fulfillment.ts"],"names":[],"mappings":";;;AAAA,qDAA8E;AAM9E,6BAA6B;AAE7B,MAAa,wBAAyB,SAAQ,0CAAkC;IAG9E;QACE,KAAK,EAAE,CAAA;IACT,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO;YACL;gBACE,EAAE,EAAE,oBAAoB;aACzB;YACD;gBACE,EAAE,EAAE,2BAA2B;gBAC/B,SAAS,EAAE,IAAI;aAChB;SACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,UAAmC,EACnC,IAA6B,EAC7B,OAAgC;QAEhC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,UAAmC,EACnC,IAA6B,EAC7B,OAAgC;QAEhC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;IAC1E,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,KAAK,CAAA;IACd,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,IAAyB;QAC5C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,iCAAiC;QACjC,OAAO,EAAE,CAAA;IACX,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,OAAO,EAAE,CAAA;IACX,CAAC;;AAtDH,4DAuDC;AAtDQ,mCAAU,GAAG,QAAQ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/fulfillment-manual",
3
- "version": "2.1.2-preview-20241211060152",
3
+ "version": "2.1.2-preview-20241211090145",
4
4
  "description": "Manual fulfillment for Medusa",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "watch": "tsc --watch"
26
26
  },
27
27
  "devDependencies": {
28
- "@medusajs/framework": "2.1.2-preview-20241211060152",
28
+ "@medusajs/framework": "2.1.2-preview-20241211090145",
29
29
  "@swc/core": "^1.7.28",
30
30
  "@swc/jest": "^0.2.36",
31
31
  "jest": "^29.7.0",
@@ -33,7 +33,7 @@
33
33
  "typescript": "^5.6.2"
34
34
  },
35
35
  "peerDependencies": {
36
- "@medusajs/framework": "2.1.2-preview-20241211060152"
36
+ "@medusajs/framework": "2.1.2-preview-20241211090145"
37
37
  },
38
38
  "keywords": [
39
39
  "medusa-plugin",