@medusajs/types
Advanced tools
Comparing version 1.8.7 to 1.8.8-beta-20230618193938
@@ -5,2 +5,3 @@ export * as CacheTypes from "./cache"; | ||
export * as InventoryTypes from "./inventory"; | ||
export * as ProductTypes from "./product"; | ||
export * as ModulesSdkTypes from "./modules-sdk"; | ||
@@ -10,1 +11,2 @@ export * as SearchTypes from "./search"; | ||
export * as TransactionBaseTypes from "./transaction-base"; | ||
export * as DAL from "./dal"; |
@@ -26,3 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TransactionBaseTypes = exports.StockLocationTypes = exports.SearchTypes = exports.ModulesSdkTypes = exports.InventoryTypes = exports.EventBusTypes = exports.CommonTypes = exports.CacheTypes = void 0; | ||
exports.DAL = exports.TransactionBaseTypes = exports.StockLocationTypes = exports.SearchTypes = exports.ModulesSdkTypes = exports.ProductTypes = exports.InventoryTypes = exports.EventBusTypes = exports.CommonTypes = exports.CacheTypes = void 0; | ||
exports.CacheTypes = __importStar(require("./cache")); | ||
@@ -32,2 +32,3 @@ exports.CommonTypes = __importStar(require("./common")); | ||
exports.InventoryTypes = __importStar(require("./inventory")); | ||
exports.ProductTypes = __importStar(require("./product")); | ||
exports.ModulesSdkTypes = __importStar(require("./modules-sdk")); | ||
@@ -37,2 +38,3 @@ exports.SearchTypes = __importStar(require("./search")); | ||
exports.TransactionBaseTypes = __importStar(require("./transaction-base")); | ||
exports.DAL = __importStar(require("./dal")); | ||
//# sourceMappingURL=bundles.js.map |
@@ -7,6 +7,6 @@ import { FindManyOptions, FindOneOptions, FindOperator, FindOptionsSelect, FindOptionsWhere, OrderByCondition } from "typeorm"; | ||
*/ | ||
export declare type WithRequiredProperty<T, K extends keyof T> = T & { | ||
export type WithRequiredProperty<T, K extends keyof T> = T & { | ||
[Property in K]-?: T[Property]; | ||
}; | ||
export declare type PartialPick<T, K extends keyof T> = { | ||
export type PartialPick<T, K extends keyof T> = { | ||
[P in K]?: T[P]; | ||
@@ -22,3 +22,3 @@ }; | ||
} | ||
export declare type Writable<T> = { | ||
export type Writable<T> = { | ||
-readonly [key in keyof T]: T[key] | FindOperator<T[key]> | FindOperator<T[key][]> | FindOperator<string[]>; | ||
@@ -35,3 +35,3 @@ }; | ||
} | ||
export declare type ExtendedFindConfig<TEntity> = (Omit<FindOneOptions<TEntity>, "where" | "relations" | "select"> | Omit<FindManyOptions<TEntity>, "where" | "relations" | "select">) & { | ||
export type ExtendedFindConfig<TEntity> = (Omit<FindOneOptions<TEntity>, "where" | "relations" | "select"> | Omit<FindManyOptions<TEntity>, "where" | "relations" | "select">) & { | ||
select?: FindOptionsSelect<TEntity>; | ||
@@ -44,12 +44,12 @@ relations?: FindOptionsRelations<TEntity>; | ||
}; | ||
export declare type QuerySelector<TEntity> = Selector<TEntity> & { | ||
export type QuerySelector<TEntity> = Selector<TEntity> & { | ||
q?: string; | ||
}; | ||
export declare type TreeQuerySelector<TEntity> = QuerySelector<TEntity> & { | ||
export type TreeQuerySelector<TEntity> = QuerySelector<TEntity> & { | ||
include_descendants_tree?: boolean; | ||
}; | ||
export declare type Selector<TEntity> = { | ||
export type Selector<TEntity> = { | ||
[key in keyof TEntity]?: TEntity[key] | TEntity[key][] | DateComparisonOperator | StringComparisonOperator | NumericalComparisonOperator | FindOperator<TEntity[key][] | string | string[]>; | ||
}; | ||
export declare type TotalField = "shipping_total" | "discount_total" | "tax_total" | "refunded_total" | "total" | "subtotal" | "refundable_amount" | "gift_card_total" | "gift_card_tax_total"; | ||
export type TotalField = "shipping_total" | "discount_total" | "tax_total" | "refunded_total" | "total" | "subtotal" | "refundable_amount" | "gift_card_total" | "gift_card_tax_total"; | ||
export interface CustomFindOptions<TModel, InKeys extends keyof TModel> { | ||
@@ -64,3 +64,3 @@ select?: FindManyOptions<TModel>["select"]; | ||
} | ||
export declare type QueryConfig<TEntity extends BaseEntity> = { | ||
export type QueryConfig<TEntity extends BaseEntity> = { | ||
defaultFields?: (keyof TEntity | string)[]; | ||
@@ -73,3 +73,3 @@ defaultRelations?: string[]; | ||
}; | ||
export declare type RequestQueryFields = { | ||
export type RequestQueryFields = { | ||
expand?: string; | ||
@@ -81,3 +81,3 @@ fields?: string; | ||
}; | ||
export declare type PaginatedResponse = { | ||
export type PaginatedResponse = { | ||
limit: number; | ||
@@ -87,3 +87,3 @@ offset: number; | ||
}; | ||
export declare type DeleteResponse = { | ||
export type DeleteResponse = { | ||
id: string; | ||
@@ -95,2 +95,4 @@ object: string; | ||
} | ||
export interface RepositoryTransformOptions { | ||
} | ||
export interface DateComparisonOperator { | ||
@@ -97,0 +99,0 @@ lt?: Date; |
import { RedisOptions } from "ioredis"; | ||
import { LoggerOptions } from "typeorm"; | ||
import { ExternalModuleDeclaration, InternalModuleDeclaration } from "../modules-sdk"; | ||
declare type SessionOptions = { | ||
type SessionOptions = { | ||
name?: string; | ||
@@ -12,3 +12,3 @@ resave?: boolean; | ||
}; | ||
export declare type HttpCompressionOptions = { | ||
export type HttpCompressionOptions = { | ||
enabled?: boolean; | ||
@@ -19,4 +19,5 @@ level?: number; | ||
}; | ||
export declare type ProjectConfigOptions = { | ||
export type ProjectConfigOptions = { | ||
redis_url?: string; | ||
redis_prefix?: string; | ||
redis_options?: RedisOptions; | ||
@@ -40,3 +41,3 @@ session_options?: SessionOptions; | ||
}; | ||
export declare type ConfigModule = { | ||
export type ConfigModule = { | ||
projectConfig: ProjectConfigOptions; | ||
@@ -43,0 +44,0 @@ featureFlags: Record<string, boolean | string>; |
import { AwilixContainer } from "awilix"; | ||
export declare type MedusaContainer = AwilixContainer & { | ||
export type MedusaContainer = AwilixContainer & { | ||
registerAdd: <T>(name: string, registration: T) => MedusaContainer; | ||
createScope: () => MedusaContainer; | ||
}; |
@@ -1,56 +0,7 @@ | ||
/// <reference types="node" /> | ||
declare type Dictionary<T = any> = { | ||
[k: string]: T; | ||
}; | ||
declare type Query<T> = T extends object ? T extends Scalar ? never : FilterQuery<T> : FilterValue<T>; | ||
declare type EntityProps<T> = { | ||
-readonly [K in keyof T as ExcludeFunctions<T, K>]?: T[K]; | ||
}; | ||
declare type ExpandScalar<T> = null | (T extends string ? string | RegExp : T extends Date ? Date | string : T); | ||
declare type Scalar = boolean | number | string | bigint | symbol | Date | RegExp | Buffer | { | ||
toHexString(): string; | ||
}; | ||
declare type ExcludeFunctions<T, K extends keyof T> = T[K] extends Function ? never : K extends symbol ? never : K; | ||
declare type ReadonlyPrimary<T> = T extends any[] ? Readonly<T> : T; | ||
declare const PrimaryKeyType: unique symbol; | ||
declare type Primary<T> = T extends { | ||
[PrimaryKeyType]?: infer PK; | ||
} ? ReadonlyPrimary<PK> : T extends { | ||
_id?: infer PK; | ||
} ? ReadonlyPrimary<PK> | string : T extends { | ||
uuid?: infer PK; | ||
} ? ReadonlyPrimary<PK> : T extends { | ||
id?: infer PK; | ||
} ? ReadonlyPrimary<PK> : never; | ||
export declare type OperatorMap<T> = { | ||
$and?: Query<T>[]; | ||
$or?: Query<T>[]; | ||
$eq?: ExpandScalar<T> | ExpandScalar<T>[]; | ||
$ne?: ExpandScalar<T>; | ||
$in?: ExpandScalar<T>[]; | ||
$nin?: ExpandScalar<T>[]; | ||
$not?: Query<T>; | ||
$gt?: ExpandScalar<T>; | ||
$gte?: ExpandScalar<T>; | ||
$lt?: ExpandScalar<T>; | ||
$lte?: ExpandScalar<T>; | ||
$like?: string; | ||
$re?: string; | ||
$ilike?: string; | ||
$fulltext?: string; | ||
$overlap?: string[]; | ||
$contains?: string[]; | ||
$contained?: string[]; | ||
$exists?: boolean; | ||
}; | ||
declare type FilterValue2<T> = T | ExpandScalar<T> | Primary<T>; | ||
declare type FilterValue<T> = OperatorMap<FilterValue2<T>> | FilterValue2<T> | FilterValue2<T>[] | null; | ||
declare type ExpandObject<T> = T extends object ? T extends Scalar ? never : { | ||
-readonly [K in keyof T as ExcludeFunctions<T, K>]?: Query<any> | FilterValue<any> | null; | ||
} : never; | ||
declare type ObjectQuery<T> = ExpandObject<T> & OperatorMap<T>; | ||
export declare type FilterQuery<T> = ObjectQuery<T> | NonNullable<ExpandScalar<Primary<T>>> | NonNullable<EntityProps<T> & OperatorMap<T>> | FilterQuery<T>[]; | ||
declare type Order<T> = { | ||
[key in keyof T]?: "ASC" | "DESC" | Order<T[key] extends Array<any> ? T[key][0] : T[key]>; | ||
}; | ||
import { Dictionary, FilterQuery, Order } from "./utils"; | ||
export { FilterQuery } from "./utils"; | ||
export interface BaseFilterable<T> { | ||
$and?: T; | ||
$or?: T; | ||
} | ||
export interface OptionsQuery<T, P extends string = never> { | ||
@@ -65,3 +16,3 @@ populate?: string[]; | ||
} | ||
export declare type FindOptions<T> = { | ||
export type FindOptions<T = any> = { | ||
where: FilterQuery<T>; | ||
@@ -68,0 +19,0 @@ options?: OptionsQuery<T, any>; |
import { FindOptions } from "./index"; | ||
import { RepositoryTransformOptions } from "../common"; | ||
/** | ||
@@ -7,5 +8,5 @@ * Data access layer (DAL) interface to implements for any repository service. | ||
*/ | ||
export interface RepositoryService<S = any> { | ||
find<T = S>(options?: FindOptions<T>): Promise<T[]>; | ||
findAndCount<T = S>(options?: FindOptions<T>): Promise<[T[], number]>; | ||
export interface RepositoryService<T = any> { | ||
find(options?: FindOptions<T>, transformOptions?: RepositoryTransformOptions): Promise<T[]>; | ||
findAndCount(options?: FindOptions<T>, transformOptions?: RepositoryTransformOptions): Promise<[T[], number]>; | ||
} |
@@ -1,11 +0,11 @@ | ||
export declare type Subscriber<T = unknown> = (data: T, eventName: string) => Promise<void>; | ||
export declare type SubscriberContext = { | ||
export type Subscriber<T = unknown> = (data: T, eventName: string) => Promise<void>; | ||
export type SubscriberContext = { | ||
subscriberId: string; | ||
}; | ||
export declare type SubscriberDescriptor = { | ||
export type SubscriberDescriptor = { | ||
id: string; | ||
subscriber: Subscriber; | ||
}; | ||
export declare type EventHandler<T = unknown> = (data: T, eventName: string) => Promise<void>; | ||
export declare type EmitData<T = unknown> = { | ||
export type EventHandler<T = unknown> = (data: T, eventName: string) => Promise<void>; | ||
export type EmitData<T = unknown> = { | ||
eventName: string; | ||
@@ -12,0 +12,0 @@ data: T; |
@@ -7,2 +7,4 @@ export * from "./bundles"; | ||
export * from "./modules-sdk"; | ||
export * from "./product"; | ||
export * from "./product-category"; | ||
export * from "./search"; | ||
@@ -12,1 +14,2 @@ export * from "./shared-context"; | ||
export * from "./transaction-base"; | ||
export * from "./dal"; |
@@ -23,2 +23,4 @@ "use strict"; | ||
__exportStar(require("./modules-sdk"), exports); | ||
__exportStar(require("./product"), exports); | ||
__exportStar(require("./product-category"), exports); | ||
__exportStar(require("./search"), exports); | ||
@@ -28,2 +30,3 @@ __exportStar(require("./shared-context"), exports); | ||
__exportStar(require("./transaction-base"), exports); | ||
__exportStar(require("./dal"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -64,3 +64,3 @@ import { NumericalComparisonOperator, StringComparisonOperator } from "../common"; | ||
*/ | ||
export declare type InventoryItemDTO = { | ||
export type InventoryItemDTO = { | ||
id: string; | ||
@@ -131,3 +131,3 @@ sku?: string | null; | ||
*/ | ||
export declare type ReservationItemDTO = { | ||
export type ReservationItemDTO = { | ||
id: string; | ||
@@ -184,3 +184,3 @@ location_id: string; | ||
*/ | ||
export declare type InventoryLevelDTO = { | ||
export type InventoryLevelDTO = { | ||
id: string; | ||
@@ -197,3 +197,3 @@ inventory_item_id: string; | ||
}; | ||
export declare type FilterableReservationItemProps = { | ||
export type FilterableReservationItemProps = { | ||
id?: string | string[]; | ||
@@ -208,3 +208,3 @@ type?: string | string[]; | ||
}; | ||
export declare type FilterableInventoryItemProps = { | ||
export type FilterableInventoryItemProps = { | ||
id?: string | string[]; | ||
@@ -218,3 +218,3 @@ location_id?: string | string[]; | ||
}; | ||
export declare type CreateInventoryItemInput = { | ||
export type CreateInventoryItemInput = { | ||
sku?: string; | ||
@@ -235,3 +235,3 @@ origin_country?: string; | ||
}; | ||
export declare type CreateReservationItemInput = { | ||
export type CreateReservationItemInput = { | ||
line_item_id?: string; | ||
@@ -246,3 +246,3 @@ inventory_item_id: string; | ||
}; | ||
export declare type FilterableInventoryLevelProps = { | ||
export type FilterableInventoryLevelProps = { | ||
inventory_item_id?: string | string[]; | ||
@@ -254,3 +254,3 @@ location_id?: string | string[]; | ||
}; | ||
export declare type CreateInventoryLevelInput = { | ||
export type CreateInventoryLevelInput = { | ||
inventory_item_id: string; | ||
@@ -262,7 +262,7 @@ location_id: string; | ||
}; | ||
export declare type UpdateInventoryLevelInput = { | ||
export type UpdateInventoryLevelInput = { | ||
stocked_quantity?: number; | ||
incoming_quantity?: number; | ||
}; | ||
export declare type UpdateReservationItemInput = { | ||
export type UpdateReservationItemInput = { | ||
quantity?: number; | ||
@@ -273,3 +273,3 @@ location_id?: string; | ||
}; | ||
export declare type ReserveQuantityContext = { | ||
export type ReserveQuantityContext = { | ||
locationId?: string; | ||
@@ -276,0 +276,0 @@ lineItemId?: string; |
@@ -17,3 +17,3 @@ import { CreateInventoryItemInput, CreateInventoryLevelInput, CreateReservationItemInput, FilterableInventoryItemProps, FilterableInventoryLevelProps, FilterableReservationItemProps, InventoryItemDTO, InventoryLevelDTO, ReservationItemDTO, UpdateInventoryLevelInput, UpdateReservationItemInput } from "./common"; | ||
updateReservationItem(reservationItemId: string, input: UpdateReservationItemInput, context?: SharedContext): Promise<ReservationItemDTO>; | ||
deleteReservationItemsByLineItem(lineItemId: string, context?: SharedContext): Promise<void>; | ||
deleteReservationItemsByLineItem(lineItemId: string | string[], context?: SharedContext): Promise<void>; | ||
deleteReservationItem(reservationItemId: string | string[], context?: SharedContext): Promise<void>; | ||
@@ -20,0 +20,0 @@ deleteInventoryItem(inventoryItemId: string, context?: SharedContext): Promise<void>; |
import { Logger as _Logger } from "winston"; | ||
import { MedusaContainer } from "../common/medusa-container"; | ||
export declare type Constructor<T> = new (...args: any[]) => T; | ||
export type Constructor<T> = new (...args: any[]) => T; | ||
export * from "../common/medusa-container"; | ||
export declare type LogLevel = "query" | "schema" | "error" | "warn" | "info" | "log" | "migration"; | ||
export declare type LoggerOptions = boolean | "all" | LogLevel[]; | ||
export declare type Logger = _Logger & { | ||
export type LogLevel = "query" | "schema" | "error" | "warn" | "info" | "log" | "migration"; | ||
export type LoggerOptions = boolean | "all" | LogLevel[]; | ||
export type Logger = _Logger & { | ||
progress: (activityId: string, msg: string) => void; | ||
@@ -20,3 +20,3 @@ info: (msg: string) => void; | ||
} | ||
export declare type InternalModuleDeclaration = { | ||
export type InternalModuleDeclaration = { | ||
scope: MODULE_SCOPE.INTERNAL; | ||
@@ -28,5 +28,5 @@ resources: MODULE_RESOURCE_TYPE; | ||
}; | ||
export declare type ExternalModuleDeclaration = { | ||
export type ExternalModuleDeclaration = { | ||
scope: MODULE_SCOPE.EXTERNAL; | ||
server: { | ||
server?: { | ||
type: "http"; | ||
@@ -37,3 +37,3 @@ url: string; | ||
}; | ||
export declare type ModuleResolution = { | ||
export type ModuleResolution = { | ||
resolutionPath: string | false; | ||
@@ -44,4 +44,5 @@ definition: ModuleDefinition; | ||
moduleDeclaration?: InternalModuleDeclaration | ExternalModuleDeclaration; | ||
moduleExports?: ModuleExports; | ||
}; | ||
export declare type ModuleDefinition = { | ||
export type ModuleDefinition = { | ||
key: string; | ||
@@ -56,3 +57,3 @@ registrationName: string; | ||
}; | ||
export declare type LoaderOptions<TOptions = Record<string, unknown>> = { | ||
export type LoaderOptions<TOptions = Record<string, unknown>> = { | ||
container: MedusaContainer; | ||
@@ -62,8 +63,8 @@ options?: TOptions; | ||
}; | ||
export declare type ModuleLoaderFunction = (options: LoaderOptions, moduleDeclaration?: InternalModuleDeclaration) => Promise<void>; | ||
export declare type ModulesResponse = { | ||
export type ModuleLoaderFunction = (options: LoaderOptions, moduleDeclaration?: InternalModuleDeclaration) => Promise<void>; | ||
export type ModulesResponse = { | ||
module: string; | ||
resolution: string | false; | ||
}[]; | ||
export declare type ModuleExports = { | ||
export type ModuleExports = { | ||
service: Constructor<any>; | ||
@@ -70,0 +71,0 @@ loaders?: ModuleLoaderFunction[]; |
@@ -1,2 +0,3 @@ | ||
import { OperatorMap } from "../dal"; | ||
import { BaseFilterable } from "../dal"; | ||
import { OperatorMap } from "../dal/utils"; | ||
export declare enum ProductStatus { | ||
@@ -27,6 +28,7 @@ DRAFT = "draft", | ||
material?: string | null; | ||
collection?: any; | ||
categories?: any; | ||
type: any; | ||
tags: any; | ||
collection: ProductCollectionDTO; | ||
categories?: ProductCategoryDTO[] | null; | ||
type: ProductTypeDTO[]; | ||
tags: ProductTagDTO[]; | ||
variants: ProductVariantDTO[]; | ||
options: ProductOptionDTO[]; | ||
@@ -65,11 +67,34 @@ discountable?: boolean; | ||
} | ||
export interface ProductTagDTO { | ||
export interface ProductCategoryDTO { | ||
id: string; | ||
name: string; | ||
description?: string; | ||
handle?: string; | ||
is_active?: boolean; | ||
is_internal?: boolean; | ||
rank?: number; | ||
parent_category?: ProductCategoryDTO; | ||
category_children: ProductCategoryDTO[]; | ||
created_at: string | Date; | ||
updated_at: string | Date; | ||
} | ||
export interface ProductVariantDTO { | ||
export interface ProductTagDTO { | ||
id: string; | ||
value: string; | ||
metadata?: Record<string, unknown> | null; | ||
products: ProductDTO[]; | ||
} | ||
export interface ProductCollectionDTO { | ||
id: string; | ||
title: string; | ||
handle: string; | ||
metadata?: Record<string, unknown> | null; | ||
deleted_at?: string | Date; | ||
} | ||
export interface ProductTypeDTO { | ||
id: string; | ||
value: string; | ||
metadata?: Record<string, unknown> | null; | ||
deleted_at?: string | Date; | ||
} | ||
export interface ProductOptionDTO { | ||
@@ -79,4 +104,5 @@ id: string; | ||
product: ProductDTO; | ||
values: ProductOptionValueDTO; | ||
values: ProductOptionValueDTO[]; | ||
metadata?: Record<string, unknown> | null; | ||
deleted_at?: string | Date; | ||
} | ||
@@ -89,2 +115,3 @@ export interface ProductOptionValueDTO { | ||
metadata?: Record<string, unknown> | null; | ||
deleted_at?: string | Date; | ||
} | ||
@@ -94,3 +121,4 @@ /** | ||
*/ | ||
export interface FilterableProductProps { | ||
export interface FilterableProductProps extends BaseFilterable<FilterableProductProps> { | ||
handle?: string | string[]; | ||
id?: string | string[]; | ||
@@ -101,18 +129,17 @@ tags?: { | ||
categories?: { | ||
id?: { | ||
[Operator in keyof OperatorMap<any>]: string[]; | ||
} | string[]; | ||
id?: string | string[] | OperatorMap<string>; | ||
}; | ||
category_ids?: string | string[] | OperatorMap<string>; | ||
} | ||
export interface FilterableProductTagProps { | ||
export interface FilterableProductTagProps extends BaseFilterable<FilterableProductTagProps> { | ||
id?: string | string[]; | ||
value?: string; | ||
} | ||
export interface FilterableProductCollectionProps { | ||
export interface FilterableProductCollectionProps extends BaseFilterable<FilterableProductCollectionProps> { | ||
id?: string | string[]; | ||
title?: string; | ||
} | ||
export interface FilterableProductVariantProps { | ||
export interface FilterableProductVariantProps extends BaseFilterable<FilterableProductVariantProps> { | ||
id?: string | string[]; | ||
sku?: string; | ||
sku?: string | string[]; | ||
options?: { | ||
@@ -122,1 +149,9 @@ id?: string[]; | ||
} | ||
export interface FilterableProductCategoryProps extends BaseFilterable<FilterableProductCategoryProps> { | ||
id?: string | string[]; | ||
parent_category_id?: string | string[] | null; | ||
handle?: string | string[]; | ||
is_active?: boolean; | ||
is_internal?: boolean; | ||
include_descendants_tree?: boolean; | ||
} |
@@ -1,10 +0,11 @@ | ||
import { FilterableProductCollectionProps, FilterableProductProps, FilterableProductTagProps, FilterableProductVariantProps, ProductCollectionDTO, ProductDTO, ProductTagDTO, ProductVariantDTO } from "./common"; | ||
import { FilterableProductCategoryProps, FilterableProductCollectionProps, FilterableProductProps, FilterableProductTagProps, FilterableProductVariantProps, ProductCategoryDTO, ProductCollectionDTO, ProductDTO, ProductTagDTO, ProductVariantDTO } from "./common"; | ||
import { FindConfig } from "../common"; | ||
import { SharedContext } from "../shared-context"; | ||
export interface IProductService { | ||
list<T = unknown>(filter: FilterableProductProps, config?: FindConfig<ProductDTO>, context?: SharedContext): Promise<T[]>; | ||
listAndCount<T = unknown>(filter: FilterableProductProps, config?: FindConfig<ProductDTO>, context?: SharedContext): Promise<[T[], number]>; | ||
listTags<T = unknown>(filter: FilterableProductTagProps, config?: FindConfig<ProductVariantDTO>, context?: SharedContext): Promise<T[]>; | ||
listVariants<T = unknown>(filter: FilterableProductVariantProps, config?: FindConfig<ProductTagDTO>, context?: SharedContext): Promise<T[]>; | ||
listCollections<T = unknown>(filter: FilterableProductCollectionProps, config?: FindConfig<ProductCollectionDTO>, context?: SharedContext): Promise<T[]>; | ||
export interface IProductModuleService<TProduct = any, TProductVariant = any, TProductTag = any, TProductCollection = any, TProductCategory = any> { | ||
list(filter: FilterableProductProps, config?: FindConfig<ProductDTO>, context?: SharedContext): Promise<ProductDTO[]>; | ||
listAndCount(filter: FilterableProductProps, config?: FindConfig<ProductDTO>, context?: SharedContext): Promise<[ProductDTO[], number]>; | ||
listTags(filter: FilterableProductTagProps, config?: FindConfig<ProductTagDTO>, context?: SharedContext): Promise<ProductTagDTO[]>; | ||
listVariants(filter: FilterableProductVariantProps, config?: FindConfig<ProductVariantDTO>, context?: SharedContext): Promise<ProductVariantDTO[]>; | ||
listCollections(filter: FilterableProductCollectionProps, config?: FindConfig<ProductCollectionDTO>, context?: SharedContext): Promise<ProductCollectionDTO[]>; | ||
listCategories(filters: FilterableProductCategoryProps, config?: FindConfig<ProductCategoryDTO>, sharedContext?: SharedContext): Promise<ProductCategoryDTO[]>; | ||
} |
@@ -5,3 +5,3 @@ export * from "./index-types"; | ||
export * from "./variant-keys"; | ||
export declare type IndexSettings = { | ||
export type IndexSettings = { | ||
/** | ||
@@ -8,0 +8,0 @@ * Settings specific to the provider. E.g. `searchableAttributes`. |
@@ -1,2 +0,2 @@ | ||
export declare type IndexSettings = { | ||
export type IndexSettings = { | ||
/** | ||
@@ -3,0 +3,0 @@ * Settings specific to the provider. E.g. `searchableAttributes`. |
import { EntityManager } from "typeorm"; | ||
export declare type SharedContext = { | ||
export type SharedContext = { | ||
transactionManager?: EntityManager; | ||
}; |
@@ -66,3 +66,3 @@ import { StringComparisonOperator } from "../common/common"; | ||
*/ | ||
export declare type StockLocationAddressDTO = { | ||
export type StockLocationAddressDTO = { | ||
id?: string; | ||
@@ -128,3 +128,3 @@ address_1: string; | ||
*/ | ||
export declare type StockLocationDTO = { | ||
export type StockLocationDTO = { | ||
id: string; | ||
@@ -148,6 +148,6 @@ name: string; | ||
*/ | ||
export declare type StockLocationExpandedDTO = StockLocationDTO & { | ||
export type StockLocationExpandedDTO = StockLocationDTO & { | ||
sales_channels?: any[]; | ||
}; | ||
export declare type FilterableStockLocationProps = { | ||
export type FilterableStockLocationProps = { | ||
id?: string | string[]; | ||
@@ -198,3 +198,3 @@ name?: string | string[] | StringComparisonOperator; | ||
*/ | ||
export declare type StockLocationAddressInput = { | ||
export type StockLocationAddressInput = { | ||
address_1: string; | ||
@@ -233,3 +233,3 @@ address_2?: string; | ||
*/ | ||
export declare type CreateStockLocationInput = { | ||
export type CreateStockLocationInput = { | ||
name: string; | ||
@@ -262,3 +262,3 @@ address_id?: string; | ||
*/ | ||
export declare type UpdateStockLocationInput = { | ||
export type UpdateStockLocationInput = { | ||
name?: string; | ||
@@ -265,0 +265,0 @@ address_id?: string; |
{ | ||
"name": "@medusajs/types", | ||
"version": "1.8.7", | ||
"version": "1.8.8-beta-20230618193938", | ||
"description": "Medusa Types definition", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": { | ||
@@ -22,2 +23,3 @@ "type": "git", | ||
"cross-env": "^5.2.1", | ||
"ioredis": "^5.2.5", | ||
"typeorm": "^0.3.16", | ||
@@ -24,0 +26,0 @@ "typescript": "^4.4.4", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76271
133
1779
6
2