@medusajs/types 1.8.5 → 1.8.6-next-20230516074534

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.
@@ -1,3 +1,4 @@
1
+ import { RedisOptions } from "ioredis";
1
2
  import { LoggerOptions } from "typeorm";
2
3
  import { ExternalModuleDeclaration, InternalModuleDeclaration } from "../modules-sdk";
3
4
  declare type SessionOptions = {
@@ -16,6 +17,7 @@ export declare type HttpCompressionOptions = {
16
17
  };
17
18
  export declare type ProjectConfigOptions = {
18
19
  redis_url?: string;
20
+ redis_options?: RedisOptions;
19
21
  session_options?: SessionOptions;
20
22
  jwt_secret?: string;
21
23
  cookie_secret?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/types",
3
- "version": "1.8.5",
3
+ "version": "1.8.6-next-20230516074534",
4
4
  "description": "Medusa Types definition",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  "devDependencies": {
20
20
  "awilix": "^8.0.0",
21
21
  "cross-env": "^5.2.1",
22
- "typeorm": "npm:@medusajs/typeorm@0.3.16-next.0",
22
+ "typeorm": "^0.3.16",
23
23
  "typescript": "^4.4.4",
24
24
  "winston": "^3.8.2"
25
25
  },
@@ -1,20 +0,0 @@
1
- /** The amount of a gift card allocated to a line item */
2
- export declare type GiftCardAllocation = {
3
- amount: number;
4
- unit_amount: number;
5
- };
6
- /** The amount of a discount allocated to a line item */
7
- export declare type DiscountAllocation = {
8
- amount: number;
9
- unit_amount: number;
10
- };
11
- /**
12
- * A map of line item ids and its corresponding gift card and discount
13
- * allocations
14
- */
15
- export declare type LineAllocationsMap = {
16
- [K: string]: {
17
- gift_card?: GiftCardAllocation;
18
- discount?: DiscountAllocation;
19
- };
20
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/tax/common.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from "./common";
2
- export * from "./tax-calculation-strategy";
package/dist/tax/index.js DELETED
@@ -1,19 +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("./common"), exports);
18
- __exportStar(require("./tax-calculation-strategy"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tax/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,6DAA0C"}
@@ -1,23 +0,0 @@
1
- import { LineAllocationsMap } from "./common";
2
- export declare type TaxCalculationContext = {
3
- shipping_address: any;
4
- customer: any;
5
- region: any;
6
- is_return: boolean;
7
- shipping_methods: any;
8
- allocation_map: LineAllocationsMap;
9
- tax_calculation_strategy: ITaxCalculationStrategy;
10
- };
11
- export interface ITaxCalculationStrategy {
12
- /**
13
- * Calculates the tax amount for a given set of line items under applicable
14
- * tax conditions and calculation contexts.
15
- * @param items - the line items to calculate the tax total for
16
- * @param taxLines - the tax lines that applies to the calculation
17
- * @param calculationContext - other details relevant for the calculation
18
- * @return the tax total
19
- */
20
- calculate(items: any, // LineItem[],
21
- taxLines: any[], calculationContext: TaxCalculationContext): Promise<number>;
22
- }
23
- export declare function isTaxCalculationStrategy(object: any): object is ITaxCalculationStrategy;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isTaxCalculationStrategy = void 0;
4
- function isTaxCalculationStrategy(
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
- object) {
7
- return typeof object.calculate === "function";
8
- }
9
- exports.isTaxCalculationStrategy = isTaxCalculationStrategy;
10
- //# sourceMappingURL=tax-calculation-strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-calculation-strategy.js","sourceRoot":"","sources":["../../src/tax/tax-calculation-strategy.ts"],"names":[],"mappings":";;;AAsCA,SAAgB,wBAAwB;AACtC,8DAA8D;AAC9D,MAAW;IAEX,OAAO,OAAO,MAAM,CAAC,SAAS,KAAK,UAAU,CAAA;AAC/C,CAAC;AALD,4DAKC"}