@cinerino/sdk 17.0.0 → 17.1.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.
- package/lib/abstract/chevre/event/factory.d.ts +19 -1
- package/lib/abstract/chevreConsole/event.d.ts +1 -1
- package/lib/abstract/cinerino/service/event.d.ts +4 -14
- package/lib/abstract/cinerino/service/event.js +31 -44
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +3 -3
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
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' | 'additionalProperty' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | '
|
|
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
7
|
$minimumProjection?: boolean;
|
|
@@ -9,6 +9,24 @@ export type IFindParams = Pick<factory.event.screeningEvent.ISearchConditions, '
|
|
|
9
9
|
* offer.seller.makesOfferをアプリケーションIDでfilterする(max:2)
|
|
10
10
|
*/
|
|
11
11
|
sellerMakesOfferAvailableAtIn?: string[];
|
|
12
|
+
offers?: Pick<factory.event.screeningEvent.IOfferSearchConditions, 'seller'> & {
|
|
13
|
+
/**
|
|
14
|
+
* apiリクエストクライアントがseller.makesOffer.$elemMatchに含まれるものを検索
|
|
15
|
+
*/
|
|
16
|
+
availableFrom?: Date;
|
|
17
|
+
/**
|
|
18
|
+
* apiリクエストクライアントがseller.makesOffer.$elemMatchに含まれるものを検索
|
|
19
|
+
*/
|
|
20
|
+
availableThrough?: Date;
|
|
21
|
+
/**
|
|
22
|
+
* apiリクエストクライアントがseller.makesOffer.$elemMatchに含まれるものを検索
|
|
23
|
+
*/
|
|
24
|
+
validFrom?: Date;
|
|
25
|
+
/**
|
|
26
|
+
* apiリクエストクライアントがseller.makesOffer.$elemMatchに含まれるものを検索
|
|
27
|
+
*/
|
|
28
|
+
validThrough?: Date;
|
|
29
|
+
};
|
|
12
30
|
};
|
|
13
31
|
/**
|
|
14
32
|
* イベントのサブカタログ検索結果
|
|
@@ -19,7 +19,7 @@ export declare class EventService extends Service {
|
|
|
19
19
|
/**
|
|
20
20
|
* イベント検索
|
|
21
21
|
*/
|
|
22
|
-
projectFields(params:
|
|
22
|
+
projectFields(params: Pick<factory.event.screeningEvent.ISearchConditions, 'additionalProperty' | 'endFrom' | 'endThrough' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'limit' | 'location' | 'offers' | 'page' | 'sort' | 'startFrom' | 'startThrough' | 'superEvent' | 'typeOf'> & {
|
|
23
23
|
typeOf: factory.eventType.ScreeningEvent;
|
|
24
24
|
$projection?: IProjection;
|
|
25
25
|
}): Promise<IAdminSearchedEvent[]>;
|
|
@@ -20,13 +20,10 @@ type IScreeningEventOffer4COA = Omit<factory.event.screeningEvent.IOffer4COA, 's
|
|
|
20
20
|
type IScreeningEventExtensibleOffer = Omit<factory.event.screeningEvent.IExtensibleEventOffer, 'seller'> & {
|
|
21
21
|
seller: ISeller;
|
|
22
22
|
};
|
|
23
|
-
type
|
|
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
24
|
offers?: IScreeningEventOffer | IScreeningEventOffer4COA | IScreeningEventExtensibleOffer;
|
|
25
25
|
superEvent: Omit<factory.event.screeningEvent.ISuperEvent, 'soundFormat'>;
|
|
26
26
|
};
|
|
27
|
-
type IMinimizedEvent = Pick<factory.event.screeningEvent.IEvent, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'id' | 'location' | 'maximumAttendeeCapacity' | 'remainingAttendeeCapacity' | 'startDate'> & {
|
|
28
|
-
superEvent: Omit<factory.event.screeningEvent.ISuperEvent, 'soundFormat'>;
|
|
29
|
-
};
|
|
30
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'>;
|
|
31
28
|
/**
|
|
32
29
|
* COA券種オファーインターフェース
|
|
@@ -119,9 +116,9 @@ export interface ICOATicketOffer {
|
|
|
119
116
|
export declare class EventService extends Service {
|
|
120
117
|
constructor(options: IAdditionalOptions & Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'>);
|
|
121
118
|
/**
|
|
122
|
-
*
|
|
119
|
+
* イベント(公開属性)検索
|
|
123
120
|
*/
|
|
124
|
-
|
|
121
|
+
findEvents(params: Pick<IFindParams, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'offers' | 'startFrom' | 'startThrough' | 'superEvent' | '$projection' | 'sellerMakesOfferAvailableAtIn' | 'typeOf'>): Promise<IEventAsFindResult[]>;
|
|
125
122
|
/**
|
|
126
123
|
* 施設コンテンツ検索
|
|
127
124
|
*/
|
|
@@ -131,13 +128,6 @@ export declare class EventService extends Service {
|
|
|
131
128
|
[key in keyof factory.eventSeries.IEvent]?: 0;
|
|
132
129
|
};
|
|
133
130
|
}): Promise<IEventSeriesAsFindResult[]>;
|
|
134
|
-
/**
|
|
135
|
-
* イベント検索(最小限の属性)
|
|
136
|
-
*/
|
|
137
|
-
projectMinimumFields(params: Omit<factory.event.screeningEvent.ISearchConditions, 'project' | 'organizer' | 'typeOfIn'> & {
|
|
138
|
-
typeOf: factory.eventType.ScreeningEvent;
|
|
139
|
-
$projection?: never;
|
|
140
|
-
}): Promise<IMinimizedEvent[]>;
|
|
141
131
|
/**
|
|
142
132
|
* イベント集計検索
|
|
143
133
|
*/
|
|
@@ -158,7 +148,7 @@ export declare class EventService extends Service {
|
|
|
158
148
|
* 興行イベント
|
|
159
149
|
*/
|
|
160
150
|
typeOf: factory.eventType.ScreeningEvent;
|
|
161
|
-
}): Promise<
|
|
151
|
+
}): Promise<IEventAsFindResult>;
|
|
162
152
|
/**
|
|
163
153
|
* イベントに対する座席検索
|
|
164
154
|
* ルームの複数セクション非対応
|
|
@@ -12,33 +12,11 @@ class EventService extends service_1.Service {
|
|
|
12
12
|
super({ ...options, retryableStatusCodes: [http_status_1.status.BAD_GATEWAY, http_status_1.status.FORBIDDEN, http_status_1.status.UNAUTHORIZED] });
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* イベント(公開属性)検索
|
|
16
16
|
*/
|
|
17
|
-
async
|
|
18
|
-
// separate ScreeningEventSeries(2024-10-21~)
|
|
19
|
-
if (params?.typeOf !== factory_1.factory.eventType.ScreeningEvent) {
|
|
20
|
-
throw new factory_1.factory.errors.Argument('typeOf', `typeOf must be ${factory_1.factory.eventType.ScreeningEvent}`);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return this.fetch({
|
|
24
|
-
uri: '/events',
|
|
25
|
-
method: 'GET',
|
|
26
|
-
qs: params,
|
|
27
|
-
expectedStatusCodes: [http_status_1.status.OK]
|
|
28
|
-
})
|
|
29
|
-
.then(async (response) => {
|
|
30
|
-
return {
|
|
31
|
-
data: await response.json()
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 施設コンテンツ検索
|
|
38
|
-
*/
|
|
39
|
-
async searchEventSeries(params) {
|
|
17
|
+
async findEvents(params) {
|
|
40
18
|
return this.fetch({
|
|
41
|
-
uri: '/
|
|
19
|
+
uri: '/events',
|
|
42
20
|
method: 'GET',
|
|
43
21
|
qs: params,
|
|
44
22
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
@@ -46,22 +24,39 @@ class EventService extends service_1.Service {
|
|
|
46
24
|
.then(async (response) => response.json());
|
|
47
25
|
}
|
|
48
26
|
/**
|
|
49
|
-
*
|
|
27
|
+
* 施設コンテンツ検索
|
|
50
28
|
*/
|
|
51
|
-
async
|
|
52
|
-
// $minimumProjectionなので$projectionは無効
|
|
53
|
-
const { $projection, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
async searchEventSeries(params) {
|
|
54
30
|
return this.fetch({
|
|
55
|
-
uri: '/
|
|
31
|
+
uri: '/eventSeries',
|
|
56
32
|
method: 'GET',
|
|
57
|
-
qs:
|
|
58
|
-
...query,
|
|
59
|
-
$minimumProjection: true
|
|
60
|
-
},
|
|
33
|
+
qs: params,
|
|
61
34
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
62
35
|
})
|
|
63
36
|
.then(async (response) => response.json());
|
|
64
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
|
+
// }
|
|
65
60
|
/**
|
|
66
61
|
* イベント集計検索
|
|
67
62
|
*/
|
|
@@ -87,20 +82,12 @@ class EventService extends service_1.Service {
|
|
|
87
82
|
].includes(typeOf)) {
|
|
88
83
|
throw new factory_1.factory.errors.Argument('typeOf', 'invalid event type');
|
|
89
84
|
}
|
|
90
|
-
|
|
91
|
-
// return this.fetch({
|
|
92
|
-
// uri: `/events/${encodeURIComponent(String(id))}`,
|
|
93
|
-
// method: 'GET',
|
|
94
|
-
// expectedStatusCodes: [status.OK],
|
|
95
|
-
// qs: { typeOf }
|
|
96
|
-
// })
|
|
97
|
-
// .then(async (response) => response.json());
|
|
98
|
-
const event = (await this.search({
|
|
85
|
+
const event = (await this.findEvents({
|
|
99
86
|
limit: 1,
|
|
100
87
|
page: 1,
|
|
101
88
|
typeOf,
|
|
102
89
|
id: { $eq: String(id) }
|
|
103
|
-
})).
|
|
90
|
+
})).shift();
|
|
104
91
|
if (event === undefined) {
|
|
105
92
|
throw new factory_1.factory.errors.NotFound(typeOf);
|
|
106
93
|
}
|