@cinerino/sdk 15.0.0-alpha.2 → 15.0.0-alpha.21

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.
Files changed (40) hide show
  1. package/lib/abstract/chevre/product.js +0 -17
  2. package/lib/abstract/chevreAdmin/eventSeries.d.ts +1 -1
  3. package/lib/abstract/chevreAdmin/order.d.ts +3 -23
  4. package/lib/abstract/chevreAdmin/order.js +2 -6
  5. package/lib/abstract/chevreAdmin/reservation.d.ts +44 -6
  6. package/lib/abstract/chevreAdmin/reservation.js +1 -1
  7. package/lib/abstract/chevreAdmin.d.ts +0 -9
  8. package/lib/abstract/chevreAdmin.js +0 -9
  9. package/lib/abstract/chevreConsole/accountingReport.d.ts +5 -5
  10. package/lib/abstract/chevreConsole/accountingReport.js +2 -9
  11. package/lib/abstract/chevreConsole/customerType.d.ts +3 -1
  12. package/lib/abstract/chevreConsole/iam.d.ts +9 -58
  13. package/lib/abstract/chevreConsole/iam.js +16 -92
  14. package/lib/abstract/chevreConsole/offerCatalog.js +0 -32
  15. package/lib/abstract/chevreConsole/offerCatalogItem.d.ts +0 -22
  16. package/lib/abstract/chevreConsole/offerCatalogItem.js +0 -11
  17. package/lib/abstract/chevreConsole/order/factory.d.ts +89 -1
  18. package/lib/abstract/chevreConsole/order.d.ts +0 -5
  19. package/lib/abstract/chevreConsole/order.js +0 -12
  20. package/lib/abstract/chevreConsole/person.d.ts +6 -54
  21. package/lib/abstract/chevreConsole/person.js +5 -65
  22. package/lib/abstract/chevreConsole.d.ts +0 -18
  23. package/lib/abstract/chevreConsole.js +0 -19
  24. package/lib/abstract/chevreTxn/offer.d.ts +1 -1
  25. package/lib/abstract/cloud/admin/eventSeries.d.ts +2 -3
  26. package/lib/abstract/cloud/admin/offer.d.ts +1 -1
  27. package/lib/abstract/cloud/admin/order.d.ts +4 -14
  28. package/lib/abstract/cloud/admin/order.js +15 -3
  29. package/lib/abstract/cloud/admin/reservation.d.ts +2 -1
  30. package/lib/abstract/cloud/admin/reservation.js +9 -9
  31. package/lib/abstract/cloud/search/product.js +0 -3
  32. package/lib/bundle.js +4 -4
  33. package/lib/bundle.js.map +4 -4
  34. package/package.json +2 -2
  35. package/lib/abstract/chevreAdmin/authorization.d.ts +0 -72
  36. package/lib/abstract/chevreAdmin/authorization.js +0 -23
  37. package/lib/abstract/chevreConsole/advanceBookingRequirement.d.ts +0 -19
  38. package/lib/abstract/chevreConsole/advanceBookingRequirement.js +0 -46
  39. package/lib/abstract/chevreConsole/productModel.d.ts +0 -56
  40. package/lib/abstract/chevreConsole/productModel.js +0 -44
@@ -1,4 +1,10 @@
1
1
  import { factory } from '../../factory';
2
+ type IKeyOfProjection = keyof factory.order.IOrder | '_id';
3
+ /**
4
+ * 注文検索時projection
5
+ * 0->1(2024-07-29~)
6
+ */
7
+ export type IProjection = Partial<Record<IKeyOfProjection, 1>>;
2
8
  /**
3
9
  * オファー展開の検索結果としての注文
4
10
  */
@@ -15,9 +21,90 @@ export interface ISearchOrdersOptions {
15
21
  */
16
22
  $unwindAcceptedOffers?: '1';
17
23
  }
24
+ /**
25
+ * 管理者による注文検索条件
26
+ */
27
+ export type IFindParams = Pick<factory.order.ISearchConditions, 'confirmationNumbers' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'sort'> & {
28
+ $projection?: IProjection;
29
+ $projectDisabled?: '1';
30
+ } & ISearchOrdersOptions & {
31
+ /**
32
+ * min: 1
33
+ * max: 20
34
+ */
35
+ limit: number;
36
+ /**
37
+ * min: 1
38
+ */
39
+ page: number;
40
+ customer?: Pick<factory.order.ICustomerSearchConditions, 'identifiers' | 'ids'> & {
41
+ givenName?: {
42
+ $eq?: string;
43
+ $regex?: string;
44
+ };
45
+ familyName?: {
46
+ $eq?: string;
47
+ $regex?: string;
48
+ };
49
+ email?: {
50
+ $eq?: string;
51
+ $regex?: string;
52
+ };
53
+ telephone?: string;
54
+ };
55
+ /**
56
+ * 決済方法
57
+ */
58
+ paymentMethods?: Pick<factory.order.IPaymentMethodsSearchConditions, 'accountIds' | 'paymentMethodIds'> & {
59
+ /**
60
+ * 決済方法区分コード
61
+ */
62
+ typeOfs?: string[];
63
+ /**
64
+ * 追加特性
65
+ */
66
+ additionalProperty?: {
67
+ /**
68
+ * すべてに一致する
69
+ */
70
+ $all?: factory.order.IIdentifier;
71
+ };
72
+ };
73
+ /**
74
+ * オファー
75
+ */
76
+ acceptedOffers?: {
77
+ itemOffered?: {
78
+ /**
79
+ * 予約ID
80
+ */
81
+ ids?: string[];
82
+ /**
83
+ * 予約番号
84
+ */
85
+ reservationNumbers?: string[];
86
+ reservationFor?: Pick<factory.order.IReservationForSearchConditions, 'ids' | 'location' | 'startFrom' | 'startThrough' | 'inSessionFrom' | 'inSessionThrough'> & {
87
+ superEvent?: {
88
+ /**
89
+ * 施設コンテンツID
90
+ */
91
+ ids?: string[];
92
+ /**
93
+ * 施設
94
+ */
95
+ location?: {
96
+ /**
97
+ * 施設コード
98
+ */
99
+ branchCodes?: string[];
100
+ };
101
+ };
102
+ };
103
+ };
104
+ };
105
+ };
18
106
  export type IAcceptedOffer = factory.order.IAcceptedOffer;
19
107
  export type IReturner = Pick<factory.iam.IMemberOfRole, 'typeOf' | 'id' | 'name'>;
20
- export type IExternalOrder = Pick<factory.order.IOrder, 'project' | 'typeOf' | 'seller' | 'customer' | 'confirmationNumber' | 'orderNumber' | 'price' | 'priceCurrency' | 'orderDate' | 'name' | 'orderStatus' | 'orderedItem' | 'paymentMethods'>;
21
108
  export interface IUpdateChangeableAttributesParams {
22
109
  confirmationNumber: string;
23
110
  orderNumber: string;
@@ -26,3 +113,4 @@ export interface IUpdateChangeableAttributesParams {
26
113
  */
27
114
  name?: string;
28
115
  }
116
+ export {};
@@ -1,14 +1,9 @@
1
1
  import { factory } from '../factory';
2
2
  import { Service } from '../service';
3
- import { IExternalOrder } from './order/factory';
4
3
  /**
5
4
  * 注文サービス
6
5
  */
7
6
  export declare class OrderService extends Service {
8
- /**
9
- * 取引なしに作成する
10
- */
11
- createWithoutTransaction(params: IExternalOrder): Promise<IExternalOrder>;
12
7
  /**
13
8
  * 決済取引確定
14
9
  */
@@ -7,18 +7,6 @@ const service_1 = require("../service");
7
7
  * 注文サービス
8
8
  */
9
9
  class OrderService extends service_1.Service {
10
- /**
11
- * 取引なしに作成する
12
- */
13
- async createWithoutTransaction(params) {
14
- return this.fetch({
15
- uri: `/orders`,
16
- method: 'POST',
17
- body: params,
18
- expectedStatusCodes: [http_status_1.status.CREATED]
19
- })
20
- .then(async (response) => response.json());
21
- }
22
10
  /**
23
11
  * 決済取引確定
24
12
  */
@@ -1,44 +1,13 @@
1
1
  import { factory } from '../factory';
2
- import { IOptions, IProjectionSearchConditions, ISearchResult, Service } from '../service';
3
- import { ISearchOrdersOptions } from './order/factory';
4
- export type IPerson = factory.person.IPerson;
2
+ import { IOptions, Service } from '../service';
5
3
  /**
6
4
  * 会員サービス
7
5
  */
8
6
  export declare class PersonService extends Service<IOptions> {
9
- /**
10
- * プロフィール検索
11
- */
12
- getProfile(params: {
13
- /**
14
- * 未指定の場合`me`がセットされます
15
- */
16
- id?: string;
17
- iss: string;
18
- }): Promise<factory.person.IProfile>;
19
- /**
20
- * プロフィール更新
21
- */
22
- updateProfile(params: factory.person.IProfile & {
23
- /**
24
- * 未指定の場合`me`がセットされます
25
- */
26
- id?: string;
27
- iss: string;
28
- }): Promise<void>;
29
- /**
30
- * 注文を検索する
31
- */
32
- searchOrders(params: factory.order.ISearchConditions & {
33
- /**
34
- * 未指定の場合`me`がセットされます
35
- */
36
- id?: string;
37
- } & IProjectionSearchConditions & ISearchOrdersOptions): Promise<ISearchResult<factory.order.IOrder[]>>;
38
7
  /**
39
8
  * 会員検索
40
9
  */
41
- search(params: {
10
+ findPeople(params: {
42
11
  id?: string;
43
12
  username?: string;
44
13
  email?: string;
@@ -46,29 +15,12 @@ export declare class PersonService extends Service<IOptions> {
46
15
  givenName?: string;
47
16
  familyName?: string;
48
17
  iss: string;
49
- }): Promise<ISearchResult<IPerson[]>>;
18
+ }): Promise<factory.person.IPerson[]>;
50
19
  /**
51
20
  * ユーザー取得
52
21
  */
53
- findById(params: {
54
- /**
55
- * 未指定の場合`me`がセットされます
56
- */
57
- id?: string;
58
- iss: string;
59
- }): Promise<IPerson>;
60
- /**
61
- * 会員削除
62
- */
63
- deleteById(params: {
64
- /**
65
- * 未指定の場合`me`がセットされます
66
- */
67
- id?: string;
68
- /**
69
- * 管理者による削除の場合、物理削除かどうかを指定できます
70
- */
71
- physically?: boolean;
22
+ findPersonById(params: {
23
+ id: string;
72
24
  iss: string;
73
- }): Promise<void>;
25
+ }): Promise<factory.person.IPerson>;
74
26
  }
@@ -7,90 +7,30 @@ const service_1 = require("../service");
7
7
  * 会員サービス
8
8
  */
9
9
  class PersonService extends service_1.Service {
10
- /**
11
- * プロフィール検索
12
- */
13
- async getProfile(params) {
14
- const id = (typeof params.id === 'string') ? params.id : 'me';
15
- return this.fetch({
16
- uri: `/people/${id}/profile`,
17
- method: 'GET',
18
- expectedStatusCodes: [http_status_1.status.OK],
19
- qs: { iss: params.iss }
20
- })
21
- .then(async (response) => response.json());
22
- }
23
- /**
24
- * プロフィール更新
25
- */
26
- async updateProfile(params) {
27
- const id = (typeof params.id === 'string') ? params.id : 'me';
28
- await this.fetch({
29
- uri: `/people/${id}/profile`,
30
- method: 'PATCH',
31
- body: params,
32
- expectedStatusCodes: [http_status_1.status.NO_CONTENT],
33
- qs: { iss: params.iss }
34
- });
35
- }
36
- /**
37
- * 注文を検索する
38
- */
39
- async searchOrders(params) {
40
- const id = (typeof params.id === 'string') ? params.id : 'me';
41
- return this.fetch({
42
- uri: `/people/${id}/orders`,
43
- method: 'GET',
44
- qs: params,
45
- expectedStatusCodes: [http_status_1.status.OK]
46
- })
47
- .then(async (response) => {
48
- return {
49
- data: await response.json()
50
- };
51
- });
52
- }
53
10
  /**
54
11
  * 会員検索
55
12
  */
56
- async search(params) {
13
+ async findPeople(params) {
57
14
  return this.fetch({
58
15
  uri: '/people',
59
16
  method: 'GET',
60
17
  qs: params,
61
18
  expectedStatusCodes: [http_status_1.status.OK]
62
19
  })
63
- .then(async (response) => {
64
- return {
65
- data: await response.json()
66
- };
67
- });
20
+ .then(async (response) => response.json());
68
21
  }
69
22
  /**
70
23
  * ユーザー取得
71
24
  */
72
- async findById(params) {
73
- const id = (typeof params.id === 'string') ? params.id : 'me';
25
+ async findPersonById(params) {
26
+ const { id, iss } = params;
74
27
  return this.fetch({
75
28
  uri: `/people/${id}`,
76
29
  method: 'GET',
77
30
  expectedStatusCodes: [http_status_1.status.OK],
78
- qs: { iss: params.iss }
31
+ qs: { iss }
79
32
  })
80
33
  .then(async (response) => response.json());
81
34
  }
82
- /**
83
- * 会員削除
84
- */
85
- async deleteById(params) {
86
- const id = (typeof params.id === 'string') ? params.id : 'me';
87
- await this.fetch({
88
- uri: `/people/${id}`,
89
- method: 'DELETE',
90
- body: params,
91
- expectedStatusCodes: [http_status_1.status.NO_CONTENT],
92
- qs: { iss: params.iss }
93
- });
94
- }
95
35
  }
96
36
  exports.PersonService = PersonService;
@@ -3,7 +3,6 @@ import type { AccountingReportService } from './chevreConsole/accountingReport';
3
3
  import type { AccountTitleService } from './chevreConsole/accountTitle';
4
4
  import type { ActionService } from './chevreConsole/action';
5
5
  import type { AdditionalPropertyService } from './chevreConsole/additionalProperty';
6
- import type { AdvanceBookingRequirementService } from './chevreConsole/advanceBookingRequirement';
7
6
  import type { AggregateOfferService } from './chevreConsole/aggregateOffer';
8
7
  import type { AggregateReservationService } from './chevreConsole/aggregateReservation';
9
8
  import type { AggregationService } from './chevreConsole/aggregation';
@@ -44,7 +43,6 @@ import type { PlaceService } from './chevreConsole/place';
44
43
  import type { HasPOSService } from './chevreConsole/place/hasPOS';
45
44
  import type { PriceSpecificationService } from './chevreConsole/priceSpecification';
46
45
  import type { ProductService } from './chevreConsole/product';
47
- import type { ProductModelService } from './chevreConsole/productModel';
48
46
  import type { ProjectService } from './chevreConsole/project';
49
47
  import type { ProjectMakesOfferService } from './chevreConsole/projectMakesOffer';
50
48
  import type { ReservationService } from './chevreConsole/reservation';
@@ -89,13 +87,6 @@ export declare namespace service {
89
87
  namespace AdditionalProperty {
90
88
  let svc: typeof AdditionalPropertyService | undefined;
91
89
  }
92
- /**
93
- * 事前予約要件サービス
94
- */
95
- type AdvanceBookingRequirement = AdvanceBookingRequirementService;
96
- namespace AdvanceBookingRequirement {
97
- let svc: typeof AdvanceBookingRequirementService | undefined;
98
- }
99
90
  /**
100
91
  * 集計オファーサービス
101
92
  */
@@ -329,13 +320,6 @@ export declare namespace service {
329
320
  namespace Product {
330
321
  let svc: typeof ProductService | undefined;
331
322
  }
332
- /**
333
- * プロダクトモデルサービス
334
- */
335
- type ProductModel = ProductModelService;
336
- namespace ProductModel {
337
- let svc: typeof ProductModelService | undefined;
338
- }
339
323
  /**
340
324
  * プロジェクトサービス
341
325
  */
@@ -501,7 +485,6 @@ export declare class ChevreConsole {
501
485
  createAccountTitleInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AccountTitleService>;
502
486
  createActionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ActionService>;
503
487
  createAdditionalPropertyInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AdditionalPropertyService>;
504
- createAdvanceBookingRequirementInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AdvanceBookingRequirementService>;
505
488
  createAggregateOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateOfferService>;
506
489
  createAggregateReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<AggregateReservationService>;
507
490
  createAggregationInstance(): Promise<AggregationService>;
@@ -535,7 +518,6 @@ export declare class ChevreConsole {
535
518
  createHasPOSInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<HasPOSService>;
536
519
  createPriceSpecificationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PriceSpecificationService>;
537
520
  createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
538
- createProductModelInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductModelService>;
539
521
  createProjectInstance(): Promise<ProjectService>;
540
522
  createProjectMakesOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProjectMakesOfferService>;
541
523
  createReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReservationService>;
@@ -48,9 +48,6 @@ var service;
48
48
  let AdditionalProperty;
49
49
  (function (AdditionalProperty) {
50
50
  })(AdditionalProperty = service.AdditionalProperty || (service.AdditionalProperty = {}));
51
- let AdvanceBookingRequirement;
52
- (function (AdvanceBookingRequirement) {
53
- })(AdvanceBookingRequirement = service.AdvanceBookingRequirement || (service.AdvanceBookingRequirement = {}));
54
51
  let AggregateOffer;
55
52
  (function (AggregateOffer) {
56
53
  })(AggregateOffer = service.AggregateOffer || (service.AggregateOffer = {}));
@@ -153,9 +150,6 @@ var service;
153
150
  let Product;
154
151
  (function (Product) {
155
152
  })(Product = service.Product || (service.Product = {}));
156
- let ProductModel;
157
- (function (ProductModel) {
158
- })(ProductModel = service.ProductModel || (service.ProductModel = {}));
159
153
  let Project;
160
154
  (function (Project) {
161
155
  })(Project = service.Project || (service.Project = {}));
@@ -261,13 +255,6 @@ class ChevreConsole {
261
255
  }
262
256
  return new service.AdditionalProperty.svc({ ...this.options, ...params, retryableStatusCodes: [] });
263
257
  }
264
- async createAdvanceBookingRequirementInstance(params) {
265
- if (service.AdvanceBookingRequirement.svc === undefined) {
266
- service.AdvanceBookingRequirement.svc =
267
- (await Promise.resolve().then(() => __importStar(require('./chevreConsole/advanceBookingRequirement.js')))).AdvanceBookingRequirementService;
268
- }
269
- return new service.AdvanceBookingRequirement.svc({ ...this.options, ...params, retryableStatusCodes: [] });
270
- }
271
258
  async createAggregateOfferInstance(params) {
272
259
  if (service.AggregateOffer.svc === undefined) {
273
260
  service.AggregateOffer.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/aggregateOffer.js')))).AggregateOfferService;
@@ -466,12 +453,6 @@ class ChevreConsole {
466
453
  }
467
454
  return new service.Product.svc({ ...this.options, ...params, retryableStatusCodes: [] });
468
455
  }
469
- async createProductModelInstance(params) {
470
- if (service.ProductModel.svc === undefined) {
471
- service.ProductModel.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/productModel.js')))).ProductModelService;
472
- }
473
- return new service.ProductModel.svc({ ...this.options, ...params, retryableStatusCodes: [] });
474
- }
475
456
  async createProjectInstance() {
476
457
  if (service.Project.svc === undefined) {
477
458
  service.Project.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/project.js')))).ProjectService;
@@ -42,7 +42,7 @@ export declare class OfferService extends Service {
42
42
  id: string;
43
43
  object: {
44
44
  itemOffered: {
45
- typeOf: factory.actionType.MoneyTransfer | factory.product.ProductType;
45
+ typeOf: factory.product.ProductType.EventService;
46
46
  };
47
47
  };
48
48
  purpose: IPurpose;
@@ -18,9 +18,8 @@ export declare class EventSeriesService extends Service {
18
18
  locationId: string;
19
19
  /**
20
20
  * オファータイプ
21
- * 対応決済方法管理を使用する場合、AggregateOfferを指定する
22
- * AggregateOfferを指定した場合、非対応決済方法区分の指定(offers.unacceptedPaymentMethod)は無視される
21
+ * Offerで固定
23
22
  */
24
- offerType: factory.offerType.AggregateOffer | factory.offerType.Offer;
23
+ offerType: factory.offerType.Offer;
25
24
  }): Promise<void>;
26
25
  }
@@ -36,7 +36,7 @@ export declare class OfferService extends Service {
36
36
  /**
37
37
  * 最大長:20
38
38
  */
39
- params: Pick<factory.unitPriceOffer.ICreateParams, 'acceptedPaymentMethod' | 'addOn' | 'additionalProperty' | 'advanceBookingRequirement' | 'alternateName' | 'availability' | 'availableAtOrFrom' | 'category' | 'color' | 'description' | 'eligibleSeatingType' | 'hasMerchantReturnPolicy' | 'identifier' | 'itemOffered' | 'name' | 'priceSpecification' | 'settings' | 'validFrom' | 'validThrough'>[], options: {
39
+ params: Pick<factory.unitPriceOffer.ICreateParams, 'acceptedPaymentMethod' | 'addOn' | 'additionalProperty' | 'alternateName' | 'availability' | 'availableAtOrFrom' | 'category' | 'color' | 'description' | 'eligibleSeatingType' | 'hasMerchantReturnPolicy' | 'identifier' | 'itemOffered' | 'name' | 'priceSpecification' | 'settings' | 'validFrom' | 'validThrough'>[], options: {
40
40
  productType: factory.product.ProductType.EventService | factory.product.ProductType.Product;
41
41
  }): Promise<void>;
42
42
  }
@@ -1,7 +1,7 @@
1
1
  import { factory } from '../../factory';
2
- import { ISearchResult, Service } from '../../service';
3
- import { IOrderAsFindByConfirmationNumberResult, ISearchOrdersOptions } from '../../chevreAsset/order/factory';
4
- import { IOrderAsSearchResult, IOrderAsSearchWithUnwindAcceptedOffersResult, IReturner, IUpdateChangeableAttributesParams } from '../../chevreConsole/order/factory';
2
+ import { Service } from '../../service';
3
+ import { IOrderAsFindByConfirmationNumberResult } from '../../chevreAsset/order/factory';
4
+ import { IFindParams, IOrderAsSearchResult, IOrderAsSearchWithUnwindAcceptedOffersResult, IReturner, IUpdateChangeableAttributesParams } from '../../chevreConsole/order/factory';
5
5
  /**
6
6
  * 注文管理サービス
7
7
  */
@@ -18,17 +18,7 @@ export declare class OrderService extends Service {
18
18
  /**
19
19
  * 注文を検索する
20
20
  */
21
- search(params: Omit<factory.order.ISearchConditions, 'project' | 'provider'> & Pick<ISearchOrdersOptions, '$unwindAcceptedOffers'> & {
22
- /**
23
- * min: 1
24
- * max: 20
25
- */
26
- limit: number;
27
- /**
28
- * min: 1
29
- */
30
- page: number;
31
- }): Promise<ISearchResult<IOrderAsSearchWithUnwindAcceptedOffersResult[] | Omit<IOrderAsSearchResult, 'identifier' | 'url' | 'additionalProperty'>[]>>;
21
+ findOrders(params: Pick<IFindParams, '$unwindAcceptedOffers' | 'acceptedOffers' | 'confirmationNumbers' | 'customer' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'paymentMethods' | 'limit' | 'page' | 'sort'>): Promise<IOrderAsSearchWithUnwindAcceptedOffersResult[] | IOrderAsSearchResult[]>;
32
22
  /**
33
23
  * 返品者検索
34
24
  */
@@ -26,7 +26,20 @@ class OrderService extends service_1.Service {
26
26
  /**
27
27
  * 注文を検索する
28
28
  */
29
- async search(params) {
29
+ async findOrders(params
30
+ // & Pick<ISearchOrdersOptions, '$unwindAcceptedOffers'>
31
+ // & {
32
+ // /**
33
+ // * min: 1
34
+ // * max: 20
35
+ // */
36
+ // limit: number;
37
+ // /**
38
+ // * min: 1
39
+ // */
40
+ // page: number;
41
+ // }
42
+ ) {
30
43
  const { auth, endpoint, project, seller } = this.options;
31
44
  const chevreAdmin = await (0, index_1.loadChevreAdmin)({ auth, endpoint });
32
45
  // const { project, ...validQueries } = req.query;
@@ -48,13 +61,12 @@ class OrderService extends service_1.Service {
48
61
  project,
49
62
  seller: { id: (typeof seller?.id === 'string') ? seller.id : '' }
50
63
  });
51
- const { data } = await orderService.search({
64
+ return orderService.findOrders({
52
65
  ...params,
53
66
  limit,
54
67
  page
55
68
  // $projection: DEFAULT_PROJECTION
56
69
  });
57
- return { data };
58
70
  }
59
71
  /**
60
72
  * 返品者検索
@@ -4,7 +4,7 @@ import { Service } from '../../service';
4
4
  /**
5
5
  * 予約検索条件
6
6
  */
7
- type IFindParams = Pick<factory.reservation.eventReservation.ISearchConditions, 'typeOf' | 'bookingFrom' | 'bookingThrough' | 'ids' | 'reservationNumbers' | 'reservationStatuses'> & {
7
+ type IFindParams = Pick<factory.reservation.eventReservation.ISearchConditions, 'bookingFrom' | 'bookingThrough' | 'ids' | 'reservationNumbers' | 'reservationStatuses'> & {
8
8
  underName?: {
9
9
  email?: {
10
10
  $regex?: string;
@@ -18,6 +18,7 @@ type IFindParams = Pick<factory.reservation.eventReservation.ISearchConditions,
18
18
  };
19
19
  };
20
20
  reservationFor?: Pick<factory.reservation.eventReservation.IReservationForSearchConditions, 'startFrom' | 'startThrough' | 'ids'> & {
21
+ id?: string;
21
22
  location?: {
22
23
  branchCodes?: string[];
23
24
  };
@@ -34,18 +34,18 @@ class ReservationService extends service_1.Service {
34
34
  project,
35
35
  seller: { id: (typeof seller?.id === 'string') ? seller.id : '' }
36
36
  });
37
- return await reservationService.find({
37
+ return await reservationService.findReservations({
38
38
  ...params,
39
39
  limit,
40
40
  page,
41
- // statusを明示的に制限(2023-05-29~)
42
- reservationStatus: {
43
- $in: [
44
- factory_1.factory.reservationStatusType.ReservationCancelled,
45
- factory_1.factory.reservationStatusType.ReservationConfirmed
46
- ]
47
- },
48
- typeOf: factory_1.factory.reservationType.EventReservation
41
+ // // statusを明示的に制限(2023-05-29~)
42
+ // reservationStatus: {
43
+ // $in: [
44
+ // factory.reservationStatusType.ReservationCancelled,
45
+ // factory.reservationStatusType.ReservationConfirmed
46
+ // ]
47
+ // },
48
+ // typeOf: factory.reservationType.EventReservation
49
49
  });
50
50
  }
51
51
  /**
@@ -7,9 +7,6 @@ const service_1 = require("../../service");
7
7
  * プロダクト(興行、アドオンなど)サービス
8
8
  */
9
9
  class ProductService extends service_1.Service {
10
- // constructor(options: IAdditionalOptions & Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'>) {
11
- // super({ ...options, retryableStatusCodes: [BAD_GATEWAY, FORBIDDEN, UNAUTHORIZED] });
12
- // }
13
10
  /**
14
11
  * プロダクトタイプ指定でプロダクトを検索する
15
12
  */