New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@medusajs/types

Package Overview
Dependencies
Maintainers
2
Versions
3111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medusajs/types - npm Package Compare versions

Comparing version 1.11.1-next-20230912130318 to 1.11.1-next-20230913180203

dist/dal/entity.d.ts

7

dist/dal/index.d.ts
import { Dictionary, FilterQuery, Order } from "./utils";
export { FilterQuery } from "./utils";
export interface BaseFilterable<T> {
$and?: T;
$or?: T;
$and?: (T | BaseFilterable<T>)[];
$or?: (T | BaseFilterable<T>)[];
}

@@ -17,5 +17,6 @@ export interface OptionsQuery<T, P extends string = never> {

export type FindOptions<T = any> = {
where: FilterQuery<T>;
where: FilterQuery<T> & BaseFilterable<FilterQuery<T>>;
options?: OptionsQuery<T, any>;
};
export * from "./repository-service";
export * from "./entity";

@@ -18,2 +18,3 @@ "use strict";

__exportStar(require("./repository-service"), exports);
__exportStar(require("./entity"), exports);
//# sourceMappingURL=index.js.map

@@ -6,4 +6,18 @@ export type JoinerRelationship = {

serviceName: string;
/**
* If true, the relationship is an internal service from the medusa core
* TODO: Remove when there are no more "internal" services
*/
isInternalService?: boolean;
/**
* In an inverted relationship the foreign key is on the other service and the primary key is on the current service
*/
inverse?: boolean;
/**
* Force the relationship to return a list
*/
isList?: boolean;
/**
* Extra arguments to pass to the remoteFetchData callback
*/
args?: Record<string, any>;

@@ -13,2 +27,5 @@ };

name: string;
/**
* Extra arguments to pass to the remoteFetchData callback
*/
args?: Record<string, any>;

@@ -18,3 +35,9 @@ }

serviceName: string;
/**
* Property name to use as entrypoint to the service
*/
alias?: JoinerServiceConfigAlias | JoinerServiceConfigAlias[];
/**
* alias for deeper nested relationships (e.g. { 'price': 'prices.calculated_price_set.amount' })
*/
fieldAlias?: Record<string, string | {

@@ -30,2 +53,5 @@ path: string;

}[];
/**
* Extra arguments to pass to the remoteFetchData callback
*/
args?: Record<string, any>;

@@ -32,0 +58,0 @@ }

@@ -21,8 +21,12 @@ import { JoinerRelationship, JoinerServiceConfig } from "../joiner";

dependencies?: string[];
definition?: ModuleDefinition;
resolve?: string;
options?: Record<string, unknown>;
/**
* @deprecated The property should not be used.
* If multiple modules are registered with the same key, the alias can be used to differentiate them
*/
resolve?: string;
options?: Record<string, unknown>;
alias?: string;
/**
* If the module is the main module for the key when multiple ones are registered
*/
main?: boolean;

@@ -32,2 +36,3 @@ };

scope: MODULE_SCOPE.EXTERNAL;
definition?: ModuleDefinition;
server?: {

@@ -39,3 +44,9 @@ type: "http";

options?: Record<string, unknown>;
/**
* If multiple modules are registered with the same key, the alias can be used to differentiate them
*/
alias?: string;
/**
* If the module is the main module for the key when multiple ones are registered
*/
main?: boolean;

@@ -65,2 +76,3 @@ };

isQueryable?: boolean;
isLegacy?: boolean;
dependencies?: string[];

@@ -108,7 +120,22 @@ defaultModuleDeclaration: InternalModuleDeclaration | ExternalModuleDeclaration;

primaryKeys?: string[];
/**
* If the module is a link module
*/
isLink?: boolean;
/**
* Keys that can be used to link to other modules
*/
linkableKeys?: string[];
/**
* If true it expands a RemoteQuery property but doesn't create a pivot table
*/
isReadOnlyLink?: boolean;
databaseConfig?: {
/**
* Name of the pivot table. If not provided it is auto generated
*/
tableName?: string;
/**
* Prefix for the id column. If not provided it is "link"
*/
idPrefix?: string;

@@ -119,2 +146,5 @@ extraFields?: Record<string, {

nullable?: boolean;
/**
* Mikro-orm options for the column
*/
options?: Record<string, unknown>;

@@ -125,3 +155,9 @@ }>;

export declare type ModuleJoinerRelationship = JoinerRelationship & {
/**
* If true, the relationship is an internal service from the medusa core TODO: Remove when there are no more "internal" services
*/
isInternalService?: boolean;
/**
* If true, the link joiner will cascade deleting the relationship
*/
deleteCascade?: boolean;

@@ -128,0 +164,0 @@ };

import { BaseFilterable } from "../../dal";
import { FilterableMoneyAmountProps, MoneyAmountDTO } from "./money-amount";
export interface PricingContext {
currency_code?: string;
context?: {
currency_code?: string;
};
}
export interface PricingFilters {
id: string[];
}
export interface PriceSetDTO {

@@ -7,0 +12,0 @@ id: string;

import { FindConfig } from "../common";
import { ModuleJoinerConfig } from "../modules-sdk";
import { Context } from "../shared-context";
import { CalculatedPriceSetDTO, CreateCurrencyDTO, CreateMoneyAmountDTO, CreatePriceSetDTO, CurrencyDTO, FilterableCurrencyProps, FilterableMoneyAmountProps, FilterablePriceSetProps, MoneyAmountDTO, PriceSetDTO, PricingContext, UpdateCurrencyDTO, UpdateMoneyAmountDTO, UpdatePriceSetDTO } from "./common";
import { CalculatedPriceSetDTO, CreateCurrencyDTO, CreateMoneyAmountDTO, CreatePriceSetDTO, CurrencyDTO, FilterableCurrencyProps, FilterableMoneyAmountProps, FilterablePriceSetProps, MoneyAmountDTO, PriceSetDTO, PricingContext, PricingFilters, UpdateCurrencyDTO, UpdateMoneyAmountDTO, UpdatePriceSetDTO } from "./common";
export interface IPricingModuleService {
__joinerConfig(): ModuleJoinerConfig;
calculatePrices(priceSetIds: string[], pricingContext: PricingContext, sharedContext?: Context): Promise<CalculatedPriceSetDTO>;
calculatePrices(filters: PricingFilters, context?: PricingContext, sharedContext?: Context): Promise<CalculatedPriceSetDTO>;
retrieve(id: string, config?: FindConfig<PriceSetDTO>, sharedContext?: Context): Promise<PriceSetDTO>;

@@ -9,0 +9,0 @@ list(filters?: FilterablePriceSetProps, config?: FindConfig<PriceSetDTO>, sharedContext?: Context): Promise<PriceSetDTO[]>;

@@ -145,2 +145,3 @@ import { BaseFilterable } from "../dal";

export interface FilterableProductProps extends BaseFilterable<FilterableProductProps> {
q?: string;
handle?: string | string[];

@@ -153,2 +154,4 @@ id?: string | string[];

id?: string | string[] | OperatorMap<string>;
is_internal?: boolean;
is_active?: boolean;
};

@@ -155,0 +158,0 @@ category_id?: string | string[] | OperatorMap<string>;

{
"name": "@medusajs/types",
"version": "1.11.1-next-20230912130318",
"version": "1.11.1-next-20230913180203",
"description": "Medusa Types definition",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc