@cinerino/sdk 18.3.0-alpha.0 → 18.3.0-alpha.2

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.
@@ -1,9 +1,25 @@
1
1
  import { factory } from '../../factory';
2
2
  type IKeyOfProjection = keyof factory.event.screeningEvent.IEvent;
3
3
  type IProjection = Partial<Record<IKeyOfProjection, 0>>;
4
- export type IFindParams = Pick<factory.event.screeningEvent.ISearchConditions, 'limit' | 'page' | 'sort' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'startFrom' | 'startThrough' | 'superEvent'> & {
4
+ export type IFindParamsLegacy = Pick<factory.event.screeningEvent.ISearchConditions, 'limit' | 'page' | 'sort' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'startFrom' | 'startThrough'> & {
5
+ superEvent?: {
6
+ /**
7
+ * 施設コンテンツID
8
+ * 最大1つ指定可能
9
+ */
10
+ ids?: string[];
11
+ /**
12
+ * 施設コード
13
+ * 最大1つ指定可能
14
+ */
15
+ locationBranchCodes?: string[];
16
+ /**
17
+ * コンテンツコード
18
+ * 最大1つ指定可能
19
+ */
20
+ workPerformedIdentifiers?: string[];
21
+ };
5
22
  typeOf: factory.eventType.ScreeningEvent;
6
- $projection?: IProjection;
7
23
  /**
8
24
  * offer.seller.makesOfferをアプリケーションIDでfilterする(max:2)
9
25
  */
@@ -26,7 +42,38 @@ export type IFindParams = Pick<factory.event.screeningEvent.ISearchConditions, '
26
42
  */
27
43
  validThrough?: Date;
28
44
  };
45
+ $projection?: IProjection;
29
46
  };
47
+ export interface IFindSubEventsParams {
48
+ limit?: number;
49
+ page?: number;
50
+ id?: string;
51
+ ids?: string[];
52
+ identifiers?: string[];
53
+ eventStatuses?: factory.eventStatusType[];
54
+ startFrom?: Date;
55
+ startThrough?: Date;
56
+ eventSeriesId?: string;
57
+ movieTheaterCode?: string;
58
+ movieIdentifier?: string;
59
+ /**
60
+ * offerAvailableAtIdが指定された場合のみ、offerに関する検索条件が有効
61
+ */
62
+ offerAvailableAtId?: string;
63
+ offerAvailabilityEndsGte?: Date;
64
+ offerAvailabilityEndsLte?: Date;
65
+ offerAvailabilityStartsGte?: Date;
66
+ offerAvailabilityStartsLte?: Date;
67
+ offerValidFromGte?: Date;
68
+ offerValidFromLte?: Date;
69
+ offerValidThroughGte?: Date;
70
+ offerValidThroughLte?: Date;
71
+ /**
72
+ * offer.seller.makesOfferをアプリケーションIDでfilterする(max:2)
73
+ */
74
+ includeMakesOfferAvailableAtIds?: string[];
75
+ excludeFields?: (keyof factory.event.screeningEvent.IEvent)[];
76
+ }
30
77
  /**
31
78
  * イベントのサブカタログ検索結果
32
79
  */
@@ -1,6 +1,6 @@
1
1
  import type { ISearchWithReservationForIdResult } from '../chevreConsole/aggregateReservation';
2
2
  import { factory } from '../factory';
3
- import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParams } from './event/factory';
3
+ import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParamsLegacy, IFindSubEventsParams } from './event/factory';
4
4
  import { Service } from '../service';
5
5
  /**
6
6
  * イベントサービス
@@ -8,8 +8,13 @@ import { Service } from '../service';
8
8
  export declare class EventService extends Service {
9
9
  /**
10
10
  * イベント検索
11
+ * @deprecated use findSubEvents
11
12
  */
12
- projectFields(params: IFindParams): Promise<factory.event.screeningEvent.IEvent[]>;
13
+ projectFields(params: IFindParamsLegacy): Promise<factory.event.screeningEvent.IEvent[]>;
14
+ /**
15
+ * イベント検索
16
+ */
17
+ findSubEvents(params: IFindSubEventsParams): Promise<factory.event.screeningEvent.IEvent[]>;
13
18
  /**
14
19
  * イベント集計検索
15
20
  */
@@ -9,6 +9,7 @@ const service_1 = require("../service");
9
9
  class EventService extends service_1.Service {
10
10
  /**
11
11
  * イベント検索
12
+ * @deprecated use findSubEvents
12
13
  */
13
14
  async projectFields(params) {
14
15
  return this.fetch({
@@ -19,6 +20,18 @@ class EventService extends service_1.Service {
19
20
  })
20
21
  .then(async (response) => response.json());
21
22
  }
23
+ /**
24
+ * イベント検索
25
+ */
26
+ async findSubEvents(params) {
27
+ return this.fetch({
28
+ uri: '/subEvents',
29
+ method: 'GET',
30
+ qs: params,
31
+ expectedStatusCodes: [http_status_1.status.OK]
32
+ })
33
+ .then(async (response) => response.json());
34
+ }
22
35
  /**
23
36
  * イベント集計検索
24
37
  */
@@ -5,7 +5,6 @@ import type { EmailMessageService } from './chevre/emailMessage';
5
5
  import type { EventService } from './chevre/event';
6
6
  import type { EventOfferService } from './chevre/eventOffer';
7
7
  import type { EventSeriesService } from './chevre/eventSeries';
8
- import type { PaymentProductService } from './chevre/paymentService';
9
8
  import type { PlaceService } from './chevre/place';
10
9
  import type { ProductService } from './chevre/product';
11
10
  import type { SeatOfferService } from './chevre/seatOffer';
@@ -54,13 +53,6 @@ export declare namespace service {
54
53
  namespace EventSeries {
55
54
  let svc: typeof EventSeriesService | undefined;
56
55
  }
57
- /**
58
- * 決済商品サービス
59
- */
60
- type PaymentProduct = PaymentProductService;
61
- namespace PaymentProduct {
62
- let svc: typeof PaymentProductService | undefined;
63
- }
64
56
  /**
65
57
  * 施設サービス
66
58
  */
@@ -102,7 +94,6 @@ export declare class Chevre {
102
94
  createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
103
95
  createEventOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventOfferService>;
104
96
  createEventSeriesInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventSeriesService>;
105
- createPaymentProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentProductService>;
106
97
  createPlaceInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceService>;
107
98
  createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
108
99
  createSeatOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<SeatOfferService>;
@@ -54,9 +54,6 @@ var service;
54
54
  let EventSeries;
55
55
  (function (EventSeries) {
56
56
  })(EventSeries = service.EventSeries || (service.EventSeries = {}));
57
- let PaymentProduct;
58
- (function (PaymentProduct) {
59
- })(PaymentProduct = service.PaymentProduct || (service.PaymentProduct = {}));
60
57
  let Place;
61
58
  (function (Place) {
62
59
  })(Place = service.Place || (service.Place = {}));
@@ -114,12 +111,6 @@ class Chevre {
114
111
  }
115
112
  return new service.EventSeries.svc({ ...this.options, ...params, retryableStatusCodes: [] });
116
113
  }
117
- async createPaymentProductInstance(params) {
118
- if (service.PaymentProduct.svc === undefined) {
119
- service.PaymentProduct.svc = (await Promise.resolve().then(() => __importStar(require('./chevre/paymentService.js')))).PaymentProductService;
120
- }
121
- return new service.PaymentProduct.svc({ ...this.options, ...params, retryableStatusCodes: [] });
122
- }
123
114
  async createPlaceInstance(params) {
124
115
  if (service.Place.svc === undefined) {
125
116
  service.Place.svc = (await Promise.resolve().then(() => __importStar(require('./chevre/place.js')))).PlaceService;
@@ -28,7 +28,6 @@ export declare class EventService extends Service {
28
28
  */
29
29
  findEventById(params: {
30
30
  id: string;
31
- typeOf: factory.eventType.ScreeningEvent;
32
31
  }): Promise<factory.event.screeningEvent.IEvent>;
33
32
  /**
34
33
  * 興行イベント編集
@@ -8,34 +8,6 @@ const service_1 = require("../service");
8
8
  * イベントサービス
9
9
  */
10
10
  class EventService extends service_1.Service {
11
- // discontinue(2026-01-30~)
12
- // /**
13
- // * 興行イベント複数作成
14
- // */
15
- // public async createScreeningEvents(
16
- // params: factory.event.screeningEvent.ICreateParams[],
17
- // // add options(2025-08-26~)
18
- // options: {
19
- // superEventId: string;
20
- // locationBranchCode: string;
21
- // hasTicketedSeat: boolean;
22
- // }
23
- // ): Promise<void> {
24
- // const { superEventId, locationBranchCode, hasTicketedSeat } = options;
25
- // await this.fetch({
26
- // uri: '/events',
27
- // method: 'POST',
28
- // body: params,
29
- // qs: {
30
- // expectsNoContent: '1',
31
- // typeOf: factory.eventType.ScreeningEvent,
32
- // superEventId,
33
- // locationBranchCode,
34
- // hasTicketedSeat
35
- // },
36
- // expectedStatusCodes: [status.NO_CONTENT]
37
- // });
38
- // }
39
11
  /**
40
12
  * 興行イベント複数追加パラメータ検証
41
13
  * consoleでのイベント追加時にのみ使用される想定
@@ -47,12 +19,10 @@ class EventService extends service_1.Service {
47
19
  method: 'POST',
48
20
  body: params,
49
21
  qs: {
50
- expectsNoContent: '1',
51
22
  typeOf: factory_1.factory.eventType.ScreeningEvent,
52
23
  superEventId,
53
24
  locationBranchCode,
54
25
  hasTicketedSeat,
55
- onlyValidate: true
56
26
  },
57
27
  expectedStatusCodes: [http_status_1.status.NO_CONTENT]
58
28
  });
@@ -73,12 +43,12 @@ class EventService extends service_1.Service {
73
43
  * イベント取得
74
44
  */
75
45
  async findEventById(params) {
76
- const { id, typeOf } = params;
46
+ const { id } = params;
77
47
  return this.fetch({
78
48
  uri: `/events/${encodeURIComponent(String(id))}`,
79
49
  method: 'GET',
80
50
  expectedStatusCodes: [http_status_1.status.OK],
81
- qs: { typeOf }
51
+ // qs: { typeOf }
82
52
  })
83
53
  .then(async (response) => response.json());
84
54
  }
@@ -6,7 +6,7 @@ export declare class EventSeriesService extends Service {
6
6
  /**
7
7
  * 施設コンテンツ削除
8
8
  */
9
- deleteById(params: {
9
+ deleteEventSeriesById(params: {
10
10
  id: string;
11
11
  }): Promise<void>;
12
12
  }
@@ -2,35 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventSeriesService = void 0;
4
4
  const http_status_1 = require("http-status");
5
- const factory_1 = require("../factory");
6
5
  const service_1 = require("../service");
6
+ const BASE_URI = '/eventSeries';
7
7
  /**
8
8
  * 施設コンテンツサービス
9
9
  */
10
10
  class EventSeriesService extends service_1.Service {
11
- // discontinue(2026-10-04~)
12
- // public async aggregateMaxVersion(params: {
13
- // workPerformed: {
14
- // identifier: { $eq: string };
15
- // };
16
- // location: {
17
- // branchCode: { $in: string[] };
18
- // };
19
- // }): Promise<{ maxVersion: string }> {
20
- // return this.fetch({
21
- // uri: `/events/${factory.eventType.ScreeningEventSeries}/aggregateScreeningEventMaxVersion`,
22
- // method: 'GET',
23
- // qs: params,
24
- // expectedStatusCodes: [status.OK]
25
- // })
26
- // .then(async (response) => response.json());
27
- // }
28
11
  /**
29
12
  * 施設コンテンツ削除
30
13
  */
31
- async deleteById(params) {
14
+ async deleteEventSeriesById(params) {
32
15
  await this.fetch({
33
- uri: `/events/${factory_1.factory.eventType.ScreeningEventSeries}/${encodeURIComponent(String(params.id))}`,
16
+ uri: `${BASE_URI}/${encodeURIComponent(String(params.id))}`,
34
17
  method: 'DELETE',
35
18
  expectedStatusCodes: [http_status_1.status.NO_CONTENT]
36
19
  });
@@ -1,4 +1,4 @@
1
- import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParams } from '../../chevre/event/factory';
1
+ import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParamsLegacy } from '../../chevre/event/factory';
2
2
  import type { ISearchWithReservationForIdResult } from '../../chevreConsole/aggregateReservation';
3
3
  import { factory } from '../../factory';
4
4
  import { ISearchResult, Service } from '../../service';
@@ -31,25 +31,7 @@ export declare class EventService extends Service {
31
31
  /**
32
32
  * イベント(公開属性)検索
33
33
  */
34
- findEvents(params: Pick<IFindParams, 'limit' | 'page' | 'sort' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'offers' | 'startFrom' | 'startThrough' | '$projection' | 'sellerMakesOfferAvailableAtIn' | 'typeOf'> & {
35
- superEvent?: {
36
- /**
37
- * 施設コンテンツID
38
- * 最大1つ指定可能
39
- */
40
- ids?: string[];
41
- /**
42
- * 施設コード
43
- * 最大1つ指定可能
44
- */
45
- locationBranchCodes?: string[];
46
- /**
47
- * コンテンツコード
48
- * 最大1つ指定可能
49
- */
50
- workPerformedIdentifiers?: string[];
51
- };
52
- }): Promise<IEventAsFindResult[]>;
34
+ findEvents(params: Pick<IFindParamsLegacy, 'limit' | 'page' | 'sort' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'offers' | 'startFrom' | 'startThrough' | 'superEvent' | 'sellerMakesOfferAvailableAtIn' | 'typeOf' | '$projection'>): Promise<IEventAsFindResult[]>;
53
35
  /**
54
36
  * イベントの予約集計検索
55
37
  * @deprecated ttts専用