@medusajs/types 1.8.6 → 1.8.7-next-20230524102522
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/common/common.d.ts +3 -0
- package/dist/common/config-module.d.ts +1 -1
- package/dist/inventory/common.d.ts +1 -1
- package/package.json +1 -1
- package/dist/admin/application.d.ts +0 -6
- package/dist/admin/application.js +0 -3
- package/dist/admin/application.js.map +0 -1
- package/dist/admin/common.d.ts +0 -14
- package/dist/admin/common.js +0 -3
- package/dist/admin/common.js.map +0 -1
- package/dist/admin/config.d.ts +0 -17
- package/dist/admin/config.js +0 -3
- package/dist/admin/config.js.map +0 -1
- package/dist/admin/helpers.d.ts +0 -14
- package/dist/admin/helpers.js +0 -3
- package/dist/admin/helpers.js.map +0 -1
- package/dist/admin/index.d.ts +0 -4
- package/dist/admin/index.js +0 -21
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/widget.d.ts +0 -20
- package/dist/admin/widget.js +0 -3
- package/dist/admin/widget.js.map +0 -1
- package/dist/tax/common.d.ts +0 -20
- package/dist/tax/common.js +0 -3
- package/dist/tax/common.js.map +0 -1
- package/dist/tax/index.d.ts +0 -2
- package/dist/tax/index.js +0 -19
- package/dist/tax/index.js.map +0 -1
- package/dist/tax/tax-calculation-strategy.d.ts +0 -23
- package/dist/tax/tax-calculation-strategy.js +0 -10
- package/dist/tax/tax-calculation-strategy.js.map +0 -1
package/dist/common/common.d.ts
CHANGED
|
@@ -22,10 +22,10 @@ export declare type ProjectConfigOptions = {
|
|
|
22
22
|
jwt_secret?: string;
|
|
23
23
|
cookie_secret?: string;
|
|
24
24
|
database_url?: string;
|
|
25
|
-
database_type: string;
|
|
26
25
|
database_database?: string;
|
|
27
26
|
database_schema?: string;
|
|
28
27
|
database_logging: LoggerOptions;
|
|
28
|
+
database_type?: string;
|
|
29
29
|
http_compression?: HttpCompressionOptions;
|
|
30
30
|
database_extra?: Record<string, unknown> & {
|
|
31
31
|
ssl: {
|
|
@@ -197,7 +197,7 @@ export declare type FilterableReservationItemProps = {
|
|
|
197
197
|
line_item_id?: string | string[];
|
|
198
198
|
inventory_item_id?: string | string[];
|
|
199
199
|
location_id?: string | string[];
|
|
200
|
-
description?: string;
|
|
200
|
+
description?: string | StringComparisonOperator;
|
|
201
201
|
created_by?: string | string[];
|
|
202
202
|
quantity?: number | NumericalComparisonOperator;
|
|
203
203
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DomainKey, HookPointKey, LoadedWidget, WidgetsConfig } from "./widget";
|
|
2
|
-
export declare type InjectionZone = `${DomainKey}.${HookPointKey}`;
|
|
3
|
-
export declare type InjectionZones = Map<InjectionZone, LoadedWidget[]>;
|
|
4
|
-
export interface Application {
|
|
5
|
-
registerWidgets(identifier: string, config: WidgetsConfig): void;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/admin/application.ts"],"names":[],"mappings":""}
|
package/dist/admin/common.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface IBaseExtension {
|
|
3
|
-
/**
|
|
4
|
-
* The name of the extension, used to identify it in the admin panel and improve debugging.
|
|
5
|
-
*/
|
|
6
|
-
name: string;
|
|
7
|
-
/**
|
|
8
|
-
* The component to render in the admin panel.
|
|
9
|
-
*/
|
|
10
|
-
Component: React.ComponentType<any>;
|
|
11
|
-
}
|
|
12
|
-
export interface IBaseLoadedExtension extends IBaseExtension {
|
|
13
|
-
origin: string;
|
|
14
|
-
}
|
package/dist/admin/common.js
DELETED
package/dist/admin/common.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/admin/common.ts"],"names":[],"mappings":""}
|
package/dist/admin/config.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Application } from "./application";
|
|
2
|
-
import { WidgetsConfig } from "./widget";
|
|
3
|
-
export declare type ExtensionConfig = {
|
|
4
|
-
/**
|
|
5
|
-
* A unique identifier for the customization configuration, used to differentiate it from other customization sources.
|
|
6
|
-
* It is recommended to use the name of the package where the customization configuration is defined, for example, `my-medusa-plugin`.
|
|
7
|
-
*/
|
|
8
|
-
identifier: string;
|
|
9
|
-
/**
|
|
10
|
-
* The configuration for custom widgets in the admin panel.
|
|
11
|
-
* Define your own widgets here to use in the admin panel.
|
|
12
|
-
*/
|
|
13
|
-
widgets?: WidgetsConfig;
|
|
14
|
-
};
|
|
15
|
-
export declare type Extension = {
|
|
16
|
-
setup(app: Application): void;
|
|
17
|
-
};
|
package/dist/admin/config.js
DELETED
package/dist/admin/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/admin/config.ts"],"names":[],"mappings":""}
|
package/dist/admin/helpers.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NavigateFunction } from "react-router-dom";
|
|
2
|
-
declare type NotificationFunction = (title: string, message: string) => void;
|
|
3
|
-
export declare type Notify = {
|
|
4
|
-
error: NotificationFunction;
|
|
5
|
-
success: NotificationFunction;
|
|
6
|
-
info: NotificationFunction;
|
|
7
|
-
warning: NotificationFunction;
|
|
8
|
-
};
|
|
9
|
-
export declare type Navigate = NavigateFunction;
|
|
10
|
-
export declare type FeatureFlagHelpers = {
|
|
11
|
-
isFeatureEnabled: (flag: string) => boolean;
|
|
12
|
-
featureToggleList: Record<string, boolean>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
package/dist/admin/helpers.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/admin/helpers.ts"],"names":[],"mappings":""}
|
package/dist/admin/index.d.ts
DELETED
package/dist/admin/index.js
DELETED
|
@@ -1,21 +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("./application"), exports);
|
|
18
|
-
__exportStar(require("./common"), exports);
|
|
19
|
-
__exportStar(require("./config"), exports);
|
|
20
|
-
__exportStar(require("./widget"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
package/dist/admin/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/admin/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,2CAAwB"}
|
package/dist/admin/widget.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IBaseExtension, IBaseLoadedExtension } from "./common";
|
|
2
|
-
import { FeatureFlagHelpers, Navigate, Notify } from "./helpers";
|
|
3
|
-
export interface Widget extends IBaseExtension {
|
|
4
|
-
}
|
|
5
|
-
export declare type DomainKey = "product" | "product_collection" | "order" | "customer";
|
|
6
|
-
export declare type HookPointKey = "details";
|
|
7
|
-
declare type HookPoint = {
|
|
8
|
-
[key in HookPointKey]?: Widget[];
|
|
9
|
-
};
|
|
10
|
-
export declare type WidgetsConfig = {
|
|
11
|
-
[key in DomainKey]?: HookPoint;
|
|
12
|
-
};
|
|
13
|
-
export interface LoadedWidget extends Widget, IBaseLoadedExtension {
|
|
14
|
-
}
|
|
15
|
-
export interface WidgetProps {
|
|
16
|
-
notify: Notify;
|
|
17
|
-
navigate: Navigate;
|
|
18
|
-
featureFlags: FeatureFlagHelpers;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
package/dist/admin/widget.js
DELETED
package/dist/admin/widget.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../src/admin/widget.ts"],"names":[],"mappings":""}
|
package/dist/tax/common.d.ts
DELETED
|
@@ -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
|
-
};
|
package/dist/tax/common.js
DELETED
package/dist/tax/common.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/tax/common.ts"],"names":[],"mappings":""}
|
package/dist/tax/index.d.ts
DELETED
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
|
package/dist/tax/index.js.map
DELETED
|
@@ -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"}
|