diff --git a/CHANGELOG.md b/CHANGELOG.md index 155b4fbf..897cec72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ### Changed - 集計オファーのISubOfferを最適化 +- プロダクト検索条件と決済サービス検索条件を分離 ### Deprecated diff --git a/src/product.ts b/src/product.ts index ad1cacd2..692307b8 100644 --- a/src/product.ts +++ b/src/product.ts @@ -174,8 +174,8 @@ export interface ISearchConditions { }; }; typeOf?: { - $eq?: string; - $in?: string[]; + $eq?: ProductType; + $in?: ProductType[]; }; offers?: { $elemMatch?: { diff --git a/src/service/paymentService.ts b/src/service/paymentService.ts index a986b1ae..25f22853 100644 --- a/src/service/paymentService.ts +++ b/src/service/paymentService.ts @@ -1,7 +1,7 @@ import { IInvoice } from '../invoice'; import { IMultilingualString } from '../multilingualString'; import { IIssuedThrough, IPermit } from '../permit'; -import { IAvailableChannel as IProductAvailableChannel, IServiceType } from '../product'; +import { IAvailableChannel as IProductAvailableChannel, ISearchConditions as ISearchProductConditions, IServiceType } from '../product'; import { IProject } from '../project'; import { IPropertyValue } from '../propertyValue'; import { ISeller } from '../seller'; @@ -121,3 +121,9 @@ export interface IService extends Pick { serviceType: IServiceType; additionalProperty?: IPropertyValue[]; } +export type ISearchConditions = Omit & { + typeOf?: { + $eq?: PaymentServiceType; + $in?: PaymentServiceType[]; + }; +};