From d07131865fd6e4ba8360b8588e51f43bf86ea7c9 Mon Sep 17 00:00:00 2001 From: Tetsu Yamazaki Date: Tue, 26 Dec 2023 14:15:16 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=AD=E3=83=80=E3=82=AF=E3=83=88?= =?UTF-8?q?=E6=A4=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E3=81=A8=E6=B1=BA=E6=B8=88?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=93=E3=82=B9=E6=A4=9C=E7=B4=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E3=82=92=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/product.ts | 4 ++-- src/service/paymentService.ts | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) 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[]; + }; +};