@cinerino/sdk 17.1.0 → 18.0.0-alpha.0

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.
@@ -4,7 +4,6 @@ type IProjection = Partial<Record<IKeyOfProjection, 0>>;
4
4
  export type IFindParams = Pick<factory.event.screeningEvent.ISearchConditions, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'startFrom' | 'startThrough' | 'superEvent'> & {
5
5
  typeOf: factory.eventType.ScreeningEvent;
6
6
  $projection?: IProjection;
7
- $minimumProjection?: boolean;
8
7
  /**
9
8
  * offer.seller.makesOfferをアプリケーションIDでfilterする(max:2)
10
9
  */
@@ -1,15 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // export type ISellerMakesOffer =
4
- // Pick<factory.event.screeningEvent.ISellerMakesOffer, 'availabilityEnds' | 'availabilityStarts' | 'validFrom' | 'validThrough'> & {
5
- // itemOffered: {
6
- // serviceOutput: {
7
- // reservationFor: {
8
- // /**
9
- // * イベントID
10
- // */
11
- // id: string;
12
- // };
13
- // };
14
- // };
15
- // };
@@ -19,13 +19,6 @@ export declare class EventService extends Service {
19
19
  aggregateOffer?: 1;
20
20
  };
21
21
  }): Promise<ISearchWithReservationForIdResult[]>;
22
- /**
23
- * イベント取得
24
- */
25
- findById(params: {
26
- id: string;
27
- typeOf: factory.eventType.ScreeningEvent;
28
- }): Promise<factory.event.screeningEvent.IEvent>;
29
22
  /**
30
23
  * 興行オファー検索
31
24
  */
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventService = void 0;
4
4
  const http_status_1 = require("http-status");
5
- const factory_1 = require("../factory");
6
5
  const service_1 = require("../service");
7
6
  /**
8
7
  * イベントサービス
@@ -32,24 +31,6 @@ class EventService extends service_1.Service {
32
31
  })
33
32
  .then(async (response) => response.json());
34
33
  }
35
- /**
36
- * イベント取得
37
- */
38
- async findById(params) {
39
- const { id, typeOf } = params;
40
- if (![
41
- factory_1.factory.eventType.ScreeningEvent
42
- ].includes(typeOf)) {
43
- throw new factory_1.factory.errors.Argument('typeOf', 'invalid event type');
44
- }
45
- return this.fetch({
46
- uri: `/events/${encodeURIComponent(String(id))}`,
47
- method: 'GET',
48
- expectedStatusCodes: [http_status_1.status.OK],
49
- qs: { typeOf }
50
- })
51
- .then(async (response) => response.json());
52
- }
53
34
  /**
54
35
  * 興行オファー検索
55
36
  */
@@ -1,6 +1,5 @@
1
1
  import { CategoryCodeService } from './service/categoryCode';
2
2
  import { EmailMessageService } from './service/emailMessage';
3
- import { EventService } from './service/event';
4
3
  import { PlaceService } from './service/place';
5
4
  import { HasPOSService } from './service/place/hasPOS';
6
5
  import { SellerService } from './service/seller';
@@ -18,11 +17,6 @@ export declare namespace service {
18
17
  */
19
18
  class EmailMessage extends EmailMessageService {
20
19
  }
21
- /**
22
- * イベントサービス
23
- */
24
- class Event extends EventService {
25
- }
26
20
  /**
27
21
  * 施設サービス
28
22
  */
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.service = void 0;
4
4
  const categoryCode_1 = require("./service/categoryCode");
5
5
  const emailMessage_1 = require("./service/emailMessage");
6
- const event_1 = require("./service/event");
7
6
  const place_1 = require("./service/place");
8
7
  const hasPOS_1 = require("./service/place/hasPOS");
9
8
  const seller_1 = require("./service/seller");
@@ -24,12 +23,6 @@ var service;
24
23
  class EmailMessage extends emailMessage_1.EmailMessageService {
25
24
  }
26
25
  service.EmailMessage = EmailMessage;
27
- /**
28
- * イベントサービス
29
- */
30
- class Event extends event_1.EventService {
31
- }
32
- service.Event = Event;
33
26
  /**
34
27
  * 施設サービス
35
28
  */
@@ -1,30 +1,4 @@
1
- import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParams } from '../../chevre/event/factory';
2
- import type { ISearchWithReservationForIdResult } from '../../chevreConsole/aggregateReservation';
3
- import { factory } from '../../factory';
4
- import { IAdditionalOptions, IOptions, ISearchResult, Service } from '../../service';
5
- type ISellerMakesOffer = Omit<factory.event.screeningEvent.ISellerMakesOffer, 'availableAtOrFrom'> & {
6
- availableAtOrFrom?: factory.event.screeningEvent.IOfferAvailableAtOrFrom | factory.event.screeningEvent.IOfferAvailableAtOrFrom[];
7
- };
8
- type ISeller = Omit<factory.event.screeningEvent.ISeller, 'makesOffer'> & {
9
- makesOffer: ISellerMakesOffer[];
10
- };
11
- type ISeller4COA = Omit<factory.event.screeningEvent.ISeller4COA, 'makesOffer'> & {
12
- makesOffer: ISellerMakesOffer[];
13
- };
14
- type IScreeningEventOffer = Omit<factory.event.screeningEvent.IOffer, 'seller'> & {
15
- seller: ISeller;
16
- };
17
- type IScreeningEventOffer4COA = Omit<factory.event.screeningEvent.IOffer4COA, 'seller'> & {
18
- seller: ISeller4COA;
19
- };
20
- type IScreeningEventExtensibleOffer = Omit<factory.event.screeningEvent.IExtensibleEventOffer, 'seller'> & {
21
- seller: ISeller;
22
- };
23
- type IEventAsFindResult = Pick<factory.event.screeningEvent.IEvent, 'id' | 'additionalProperty' | 'aggregateReservation' | 'attendeeCount' | 'checkInCount' | 'coaInfo' | 'doorTime' | 'endDate' | 'eventStatus' | 'identifier' | 'location' | 'maximumAttendeeCapacity' | 'name' | 'organizer' | 'project' | 'remainingAttendeeCapacity' | 'startDate' | 'typeOf' | 'maximumPhysicalAttendeeCapacity'> & {
24
- offers?: IScreeningEventOffer | IScreeningEventOffer4COA | IScreeningEventExtensibleOffer;
25
- superEvent: Omit<factory.event.screeningEvent.ISuperEvent, 'soundFormat'>;
26
- };
27
- type IEventSeriesAsFindResult = Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'coaInfo' | 'description' | 'dubLanguage' | 'duration' | 'endDate' | 'eventStatus' | 'headline' | 'identifier' | 'kanaName' | 'location' | 'name' | 'offers' | 'organizer' | 'project' | 'soundFormat' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed' | 'subEvent' | 'id'>;
1
+ import { IAdditionalOptions, IOptions, Service } from '../../service';
28
2
  /**
29
3
  * COA券種オファーインターフェース
30
4
  */
@@ -115,236 +89,4 @@ export interface ICOATicketOffer {
115
89
  */
116
90
  export declare class EventService extends Service {
117
91
  constructor(options: IAdditionalOptions & Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'>);
118
- /**
119
- * イベント(公開属性)検索
120
- */
121
- findEvents(params: Pick<IFindParams, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'offers' | 'startFrom' | 'startThrough' | 'superEvent' | '$projection' | 'sellerMakesOfferAvailableAtIn' | 'typeOf'>): Promise<IEventAsFindResult[]>;
122
- /**
123
- * 施設コンテンツ検索
124
- */
125
- searchEventSeries(params: Omit<factory.eventSeries.ISearchConditions, 'project' | 'organizer' | 'typeOfIn'> & {
126
- typeOf: factory.eventType.ScreeningEventSeries;
127
- $projection?: {
128
- [key in keyof factory.eventSeries.IEvent]?: 0;
129
- };
130
- }): Promise<IEventSeriesAsFindResult[]>;
131
- /**
132
- * イベント集計検索
133
- */
134
- searchAggregations(params: Pick<factory.event.screeningEvent.ISearchConditions, 'page' | 'limit' | 'sort' | 'typeOf' | 'id' | 'startFrom' | 'startThrough'> & {
135
- $projection?: {
136
- aggregateEntranceGate?: 1;
137
- aggregateOffer?: 1;
138
- };
139
- }): Promise<ISearchWithReservationForIdResult[]>;
140
- /**
141
- * イベント取得
142
- * alias of search
143
- */
144
- findById(params: {
145
- id: string;
146
- /**
147
- * イベントタイプ
148
- * 興行イベント
149
- */
150
- typeOf: factory.eventType.ScreeningEvent;
151
- }): Promise<IEventAsFindResult>;
152
- /**
153
- * イベントに対する座席検索
154
- * ルームの複数セクション非対応
155
- * 自動的にルームのひとつめのセクションが選択されます
156
- * @deprecated use SeatOfferService
157
- */
158
- findSeatOffersDeprecated(params: {
159
- /**
160
- * イベント
161
- */
162
- event: {
163
- id: string;
164
- };
165
- limit: number;
166
- page: number;
167
- }): Promise<ISearchResult<Omit<ISeatAsEventOffer, 'containedInPlace'>[]> & {
168
- /**
169
- * デフォルトセクションコード
170
- */
171
- sectionCode?: string;
172
- }>;
173
- /**
174
- * 興行オファー検索
175
- * サブカタログ設定有無による違いについては、includedInDataCatalogパラメータの説明を参照してください
176
- */
177
- searchTicketOffers(params: {
178
- limit?: number;
179
- page?: number;
180
- /**
181
- * イベント
182
- */
183
- event: {
184
- id: string;
185
- };
186
- /**
187
- * 潜在的な価格仕様をレスポンスに含めるかどうか
188
- * 未決定の座席区分加算料金など
189
- * trueを指定した場合、
190
- * 区分加算料金を適用するオファーにはpriceSpecification.priceComponentにfactory.product.IPotentialCategoryCodeChargePriceComponentが含まれ、
191
- * 区分加算料金を適用しないオファーには含まれない
192
- */
193
- includePotentialSpec?: boolean;
194
- /**
195
- * サブカタログに含まれるオファーを検索する場合、強制的にサブカタログの適用決済カード条件に変更されます
196
- */
197
- priceSpecification?: {
198
- /**
199
- * 適用決済カード条件
200
- */
201
- appliesToMovieTicket?: {
202
- serviceType?: {
203
- /**
204
- * 適用決済カード区分が存在するかどうか
205
- */
206
- $exists?: boolean;
207
- };
208
- serviceOutput?: {
209
- typeOf?: {
210
- /**
211
- * 適用決済方法タイプ(完全一致)
212
- */
213
- $eq?: string;
214
- };
215
- };
216
- };
217
- };
218
- /**
219
- * オファーの含まれるカタログ
220
- */
221
- includedInDataCatalog?: {
222
- /**
223
- * 明示的にサブカタログIDを指定します
224
- * オファーによるカタログの場合、指定の必要なし
225
- * サブカタログによるカタログの場合、未指定であれば一つ目のサブカタログのオファーを検索します
226
- */
227
- id?: string;
228
- };
229
- }): Promise<Omit<factory.product.ITicketOffer, 'priceCurrency'>[]>;
230
- /**
231
- * イベントに対する券種オファー検索(COA券種)
232
- */
233
- searchTicketOffers4COA(params: {
234
- /**
235
- * イベント
236
- */
237
- event: {
238
- id: string;
239
- };
240
- /**
241
- * ムビチケ券種もほしい場合に指定
242
- */
243
- movieTicket?: {
244
- /**
245
- * 電子券区分
246
- */
247
- kbnDenshiken: string;
248
- /**
249
- * 前売券区分
250
- */
251
- kbnMaeuriken: string;
252
- /**
253
- * 券種区分
254
- */
255
- kbnKensyu: string;
256
- /**
257
- * 販売単価
258
- */
259
- salesPrice: number;
260
- /**
261
- * 計上単価
262
- */
263
- appPrice: number;
264
- /**
265
- * 映写方式区分
266
- */
267
- kbnEisyahousiki: string;
268
- };
269
- }): Promise<ICOATicketOffer[]>;
270
- /**
271
- * オファーで利用可能な適用決済カード条件を検索する
272
- * サブカタログが設定されている場合、ひとつめのサブカタログについてのみ検索されます
273
- */
274
- searchOfferAppliesToMovieTicket(params: {
275
- limit?: number;
276
- page?: number;
277
- /**
278
- * イベント
279
- */
280
- event: {
281
- id: string;
282
- };
283
- }): Promise<Pick<factory.priceSpecification.unitPrice.IAppliesToMovieTicket, 'serviceOutput'>[]>;
284
- /**
285
- * サブカタログ検索
286
- * オファーによるカタログ設定の場合、空配列が返却されます
287
- */
288
- searchOfferCatalogItems(params: {
289
- /**
290
- * max:10なので注意
291
- */
292
- limit?: number;
293
- page?: number;
294
- /**
295
- * イベントID
296
- */
297
- id: string;
298
- includedInDataCatalog?: {
299
- /**
300
- * 明示的なカタログID指定
301
- * 未指定であればひとつめのカタログが自動選択されます
302
- */
303
- id: string;
304
- };
305
- }): Promise<ISearchOfferCatalogItemResult[]>;
306
- /**
307
- * サブカタログ利用可能性検索
308
- * 各サブカタログにクライアントで利用可能なオファーが含まれているかを検索します
309
- */
310
- searchOfferCatalogItemAvailabilities(params: {
311
- /**
312
- * max:10なので注意
313
- */
314
- limit?: number;
315
- page?: number;
316
- /**
317
- * イベントID
318
- */
319
- id: string;
320
- includedInDataCatalog?: {
321
- /**
322
- * 明示的なカタログID指定
323
- * 未指定であればひとつめのカタログが自動選択されます
324
- */
325
- id: string;
326
- };
327
- }): Promise<ISearchOfferCatalogItemAvailabilityResult[]>;
328
- /**
329
- * カタログ検索
330
- * プロダクトの複数カタログに対応
331
- */
332
- searchOfferCatalogs(params: {
333
- /**
334
- * max:10なので注意
335
- */
336
- limit: number;
337
- page: number;
338
- typeOf: factory.eventType.ScreeningEvent;
339
- /**
340
- * イベントID
341
- */
342
- id: string;
343
- }): Promise<{
344
- /**
345
- * カタログID
346
- */
347
- id: string;
348
- }[]>;
349
92
  }
350
- export {};
@@ -2,7 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventService = void 0;
4
4
  const http_status_1 = require("http-status");
5
- const factory_1 = require("../../factory");
5
+ // import {
6
+ // ISearchOfferCatalogItemAvailabilityResult,
7
+ // ISearchOfferCatalogItemResult,
8
+ // ISeatAsEventOffer,
9
+ // IFindParams
10
+ // } from '../../chevre/event/factory';
11
+ // import type { ISearchWithReservationForIdResult } from '../../chevreConsole/aggregateReservation';
12
+ // import { factory } from '../../factory';
6
13
  const service_1 = require("../../service");
7
14
  /**
8
15
  * イベントサービス
@@ -11,193 +18,5 @@ class EventService extends service_1.Service {
11
18
  constructor(options) {
12
19
  super({ ...options, retryableStatusCodes: [http_status_1.status.BAD_GATEWAY, http_status_1.status.FORBIDDEN, http_status_1.status.UNAUTHORIZED] });
13
20
  }
14
- /**
15
- * イベント(公開属性)検索
16
- */
17
- async findEvents(params) {
18
- return this.fetch({
19
- uri: '/events',
20
- method: 'GET',
21
- qs: params,
22
- expectedStatusCodes: [http_status_1.status.OK]
23
- })
24
- .then(async (response) => response.json());
25
- }
26
- /**
27
- * 施設コンテンツ検索
28
- */
29
- async searchEventSeries(params) {
30
- return this.fetch({
31
- uri: '/eventSeries',
32
- method: 'GET',
33
- qs: params,
34
- expectedStatusCodes: [http_status_1.status.OK]
35
- })
36
- .then(async (response) => response.json());
37
- }
38
- // /**
39
- // * イベント検索(最小限の属性)
40
- // */
41
- // public async projectMinimumFields(
42
- // params: Omit<factory.event.screeningEvent.ISearchConditions, 'project' | 'organizer' | 'typeOfIn'> & {
43
- // typeOf: factory.eventType.ScreeningEvent;
44
- // $projection?: never; // $minimumProjectionなので$projectionは無効
45
- // }
46
- // ): Promise<IMinimizedEvent[]> {
47
- // // $minimumProjectionなので$projectionは無効
48
- // const { $projection, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
49
- // return this.fetch({
50
- // uri: '/events',
51
- // method: 'GET',
52
- // qs: {
53
- // ...query,
54
- // $minimumProjection: true
55
- // },
56
- // expectedStatusCodes: [status.OK]
57
- // })
58
- // .then(async (response) => response.json());
59
- // }
60
- /**
61
- * イベント集計検索
62
- */
63
- async searchAggregations(params) {
64
- return this.fetch({
65
- uri: '/events/aggregations',
66
- method: 'GET',
67
- qs: params,
68
- expectedStatusCodes: [http_status_1.status.OK]
69
- })
70
- .then(async (response) => response.json());
71
- }
72
- /**
73
- * イベント取得
74
- * alias of search
75
- */
76
- async findById(params) {
77
- const { id, typeOf } = params;
78
- if (![
79
- // factory.eventType.Event,
80
- factory_1.factory.eventType.ScreeningEvent
81
- // factory.eventType.ScreeningEventSeries
82
- ].includes(typeOf)) {
83
- throw new factory_1.factory.errors.Argument('typeOf', 'invalid event type');
84
- }
85
- const event = (await this.findEvents({
86
- limit: 1,
87
- page: 1,
88
- typeOf,
89
- id: { $eq: String(id) }
90
- })).shift();
91
- if (event === undefined) {
92
- throw new factory_1.factory.errors.NotFound(typeOf);
93
- }
94
- return event;
95
- }
96
- /**
97
- * イベントに対する座席検索
98
- * ルームの複数セクション非対応
99
- * 自動的にルームのひとつめのセクションが選択されます
100
- * @deprecated use SeatOfferService
101
- */
102
- async findSeatOffersDeprecated(params) {
103
- const { event, limit, page } = params;
104
- return this.fetch({
105
- uri: `/events/${encodeURIComponent(String(event.id))}/seats`,
106
- method: 'GET',
107
- qs: { limit, page },
108
- expectedStatusCodes: [http_status_1.status.OK]
109
- })
110
- .then(async (response) => {
111
- const seatOffers = await response.json();
112
- return {
113
- data: seatOffers,
114
- // 座席のないイベントに対応
115
- ...(seatOffers.length > 0) ? { sectionCode: seatOffers[0].containedInPlace?.branchCode } : undefined
116
- };
117
- });
118
- }
119
- /**
120
- * 興行オファー検索
121
- * サブカタログ設定有無による違いについては、includedInDataCatalogパラメータの説明を参照してください
122
- */
123
- async searchTicketOffers(params) {
124
- const { event, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
125
- return this.fetch({
126
- uri: `/events/${params.event.id}/offers/ticket`,
127
- method: 'GET',
128
- expectedStatusCodes: [http_status_1.status.OK],
129
- qs: query
130
- })
131
- .then(async (response) => response.json());
132
- }
133
- /**
134
- * イベントに対する券種オファー検索(COA券種)
135
- */
136
- async searchTicketOffers4COA(params) {
137
- const { event, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
138
- return this.fetch({
139
- uri: `/events/${params.event.id}/offers/ticket`,
140
- method: 'GET',
141
- expectedStatusCodes: [http_status_1.status.OK],
142
- qs: query
143
- })
144
- .then(async (response) => response.json());
145
- }
146
- /**
147
- * オファーで利用可能な適用決済カード条件を検索する
148
- * サブカタログが設定されている場合、ひとつめのサブカタログについてのみ検索されます
149
- */
150
- async searchOfferAppliesToMovieTicket(params) {
151
- const { event, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
152
- return this.fetch({
153
- uri: `/events/${params.event.id}/offers/appliesToMovieTicket`,
154
- method: 'GET',
155
- expectedStatusCodes: [http_status_1.status.OK],
156
- qs: query
157
- })
158
- .then(async (response) => response.json());
159
- }
160
- /**
161
- * サブカタログ検索
162
- * オファーによるカタログ設定の場合、空配列が返却されます
163
- */
164
- async searchOfferCatalogItems(params) {
165
- const { id, ...query } = params;
166
- return this.fetch({
167
- uri: `/events/${encodeURIComponent(String(id))}/offerCatalogItems`,
168
- method: 'GET',
169
- qs: query,
170
- expectedStatusCodes: [http_status_1.status.OK]
171
- })
172
- .then(async (response) => response.json());
173
- }
174
- /**
175
- * サブカタログ利用可能性検索
176
- * 各サブカタログにクライアントで利用可能なオファーが含まれているかを検索します
177
- */
178
- async searchOfferCatalogItemAvailabilities(params) {
179
- const { id, ...query } = params;
180
- return this.fetch({
181
- uri: `/events/${encodeURIComponent(String(id))}/offerCatalogItemAvailabilities`,
182
- method: 'GET',
183
- qs: query,
184
- expectedStatusCodes: [http_status_1.status.OK]
185
- })
186
- .then(async (response) => response.json());
187
- }
188
- /**
189
- * カタログ検索
190
- * プロダクトの複数カタログに対応
191
- */
192
- async searchOfferCatalogs(params) {
193
- const { id, limit, page, typeOf } = params;
194
- return this.fetch({
195
- uri: `/events/${encodeURIComponent(String(id))}/hasOfferCatalog`,
196
- method: 'GET',
197
- qs: { limit, page, typeOf },
198
- expectedStatusCodes: [http_status_1.status.OK]
199
- })
200
- .then(async (response) => response.json());
201
- }
202
21
  }
203
22
  exports.EventService = EventService;