@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.
- package/lib/abstract/chevre/event/factory.d.ts +0 -1
- package/lib/abstract/chevre/event/factory.js +0 -13
- package/lib/abstract/chevre/event.d.ts +0 -7
- package/lib/abstract/chevre/event.js +0 -19
- package/lib/abstract/cinerino/default.d.ts +0 -6
- package/lib/abstract/cinerino/default.js +0 -7
- package/lib/abstract/cinerino/service/event.d.ts +1 -259
- package/lib/abstract/cinerino/service/event.js +8 -189
- package/lib/abstract/cloud/search/event.d.ts +198 -0
- package/lib/abstract/cloud/search/event.js +266 -0
- package/lib/abstract/cloud/search/eventSeries.d.ts +19 -0
- package/lib/abstract/cloud/search/eventSeries.js +27 -0
- package/lib/abstract/cloud/search.d.ts +26 -0
- package/lib/abstract/cloud/search.js +32 -0
- package/lib/bundle.js +4 -4
- package/lib/bundle.js.map +4 -4
- package/package.json +2 -2
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParams } from '../../chevre/event/factory';
|
|
2
|
+
import type { ISearchWithReservationForIdResult } from '../../chevreConsole/aggregateReservation';
|
|
3
|
+
import { factory } from '../../factory';
|
|
4
|
+
import { 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
|
+
/**
|
|
28
|
+
* イベントサービス
|
|
29
|
+
*/
|
|
30
|
+
export declare class EventService extends Service {
|
|
31
|
+
/**
|
|
32
|
+
* イベント(公開属性)検索
|
|
33
|
+
*/
|
|
34
|
+
findEvents(params: Pick<IFindParams, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'offers' | 'startFrom' | 'startThrough' | 'superEvent' | '$projection' | 'sellerMakesOfferAvailableAtIn' | 'typeOf'>): Promise<IEventAsFindResult[]>;
|
|
35
|
+
/**
|
|
36
|
+
* イベントの予約集計検索
|
|
37
|
+
* @deprecated ttts専用
|
|
38
|
+
*/
|
|
39
|
+
findAggregateReservations4ttts(params: Pick<factory.event.screeningEvent.ISearchConditions, 'page' | 'limit' | 'sort' | 'typeOf' | 'id' | 'startFrom' | 'startThrough'>): Promise<ISearchWithReservationForIdResult[]>;
|
|
40
|
+
/**
|
|
41
|
+
* イベントに対する座席検索
|
|
42
|
+
* ルームの複数セクション非対応
|
|
43
|
+
* 自動的にルームのひとつめのセクションが選択されます
|
|
44
|
+
* @deprecated use SeatOfferService
|
|
45
|
+
*/
|
|
46
|
+
findSeatOffersDeprecated(params: {
|
|
47
|
+
/**
|
|
48
|
+
* イベント
|
|
49
|
+
*/
|
|
50
|
+
event: {
|
|
51
|
+
id: string;
|
|
52
|
+
};
|
|
53
|
+
limit: number;
|
|
54
|
+
page: number;
|
|
55
|
+
}): Promise<ISearchResult<Omit<ISeatAsEventOffer, 'containedInPlace'>[]> & {
|
|
56
|
+
/**
|
|
57
|
+
* デフォルトセクションコード
|
|
58
|
+
*/
|
|
59
|
+
sectionCode?: string;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* 興行オファー検索
|
|
63
|
+
* サブカタログ設定有無による違いについては、includedInDataCatalogパラメータの説明を参照してください
|
|
64
|
+
*/
|
|
65
|
+
searchTicketOffers(params: {
|
|
66
|
+
limit?: number;
|
|
67
|
+
page?: number;
|
|
68
|
+
/**
|
|
69
|
+
* イベント
|
|
70
|
+
*/
|
|
71
|
+
event: {
|
|
72
|
+
id: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 潜在的な価格仕様をレスポンスに含めるかどうか
|
|
76
|
+
* 未決定の座席区分加算料金など
|
|
77
|
+
* trueを指定した場合、
|
|
78
|
+
* 区分加算料金を適用するオファーにはpriceSpecification.priceComponentにfactory.product.IPotentialCategoryCodeChargePriceComponentが含まれ、
|
|
79
|
+
* 区分加算料金を適用しないオファーには含まれない
|
|
80
|
+
*/
|
|
81
|
+
includePotentialSpec?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* サブカタログに含まれるオファーを検索する場合、強制的にサブカタログの適用決済カード条件に変更されます
|
|
84
|
+
*/
|
|
85
|
+
priceSpecification?: {
|
|
86
|
+
/**
|
|
87
|
+
* 適用決済カード条件
|
|
88
|
+
*/
|
|
89
|
+
appliesToMovieTicket?: {
|
|
90
|
+
serviceType?: {
|
|
91
|
+
/**
|
|
92
|
+
* 適用決済カード区分が存在するかどうか
|
|
93
|
+
*/
|
|
94
|
+
$exists?: boolean;
|
|
95
|
+
};
|
|
96
|
+
serviceOutput?: {
|
|
97
|
+
typeOf?: {
|
|
98
|
+
/**
|
|
99
|
+
* 適用決済方法タイプ(完全一致)
|
|
100
|
+
*/
|
|
101
|
+
$eq?: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* オファーの含まれるカタログ
|
|
108
|
+
*/
|
|
109
|
+
includedInDataCatalog?: {
|
|
110
|
+
/**
|
|
111
|
+
* 明示的にサブカタログIDを指定します
|
|
112
|
+
* オファーによるカタログの場合、指定の必要なし
|
|
113
|
+
* サブカタログによるカタログの場合、未指定であれば一つ目のサブカタログのオファーを検索します
|
|
114
|
+
*/
|
|
115
|
+
id?: string;
|
|
116
|
+
};
|
|
117
|
+
}): Promise<Omit<factory.product.ITicketOffer, 'priceCurrency'>[]>;
|
|
118
|
+
/**
|
|
119
|
+
* オファーで利用可能な適用決済カード条件を検索する
|
|
120
|
+
* サブカタログが設定されている場合、ひとつめのサブカタログについてのみ検索されます
|
|
121
|
+
*/
|
|
122
|
+
searchOfferAppliesToMovieTicket(params: {
|
|
123
|
+
limit?: number;
|
|
124
|
+
page?: number;
|
|
125
|
+
/**
|
|
126
|
+
* イベント
|
|
127
|
+
*/
|
|
128
|
+
event: {
|
|
129
|
+
id: string;
|
|
130
|
+
};
|
|
131
|
+
}): Promise<Pick<factory.priceSpecification.unitPrice.IAppliesToMovieTicket, 'serviceOutput'>[]>;
|
|
132
|
+
/**
|
|
133
|
+
* サブカタログ検索
|
|
134
|
+
* オファーによるカタログ設定の場合、空配列が返却されます
|
|
135
|
+
*/
|
|
136
|
+
searchOfferCatalogItems(params: {
|
|
137
|
+
/**
|
|
138
|
+
* max:10なので注意
|
|
139
|
+
*/
|
|
140
|
+
limit?: number;
|
|
141
|
+
page?: number;
|
|
142
|
+
/**
|
|
143
|
+
* イベントID
|
|
144
|
+
*/
|
|
145
|
+
id: string;
|
|
146
|
+
includedInDataCatalog?: {
|
|
147
|
+
/**
|
|
148
|
+
* 明示的なカタログID指定
|
|
149
|
+
* 未指定であればひとつめのカタログが自動選択されます
|
|
150
|
+
*/
|
|
151
|
+
id: string;
|
|
152
|
+
};
|
|
153
|
+
}): Promise<ISearchOfferCatalogItemResult[]>;
|
|
154
|
+
/**
|
|
155
|
+
* サブカタログ利用可能性検索
|
|
156
|
+
* 各サブカタログにクライアントで利用可能なオファーが含まれているかを検索します
|
|
157
|
+
*/
|
|
158
|
+
searchOfferCatalogItemAvailabilities(params: {
|
|
159
|
+
/**
|
|
160
|
+
* max:10なので注意
|
|
161
|
+
*/
|
|
162
|
+
limit?: number;
|
|
163
|
+
page?: number;
|
|
164
|
+
/**
|
|
165
|
+
* イベントID
|
|
166
|
+
*/
|
|
167
|
+
id: string;
|
|
168
|
+
includedInDataCatalog?: {
|
|
169
|
+
/**
|
|
170
|
+
* 明示的なカタログID指定
|
|
171
|
+
* 未指定であればひとつめのカタログが自動選択されます
|
|
172
|
+
*/
|
|
173
|
+
id: string;
|
|
174
|
+
};
|
|
175
|
+
}): Promise<ISearchOfferCatalogItemAvailabilityResult[]>;
|
|
176
|
+
/**
|
|
177
|
+
* カタログ検索
|
|
178
|
+
* プロダクトの複数カタログに対応
|
|
179
|
+
*/
|
|
180
|
+
searchOfferCatalogs(params: {
|
|
181
|
+
/**
|
|
182
|
+
* max:10なので注意
|
|
183
|
+
*/
|
|
184
|
+
limit: number;
|
|
185
|
+
page: number;
|
|
186
|
+
typeOf: factory.eventType.ScreeningEvent;
|
|
187
|
+
/**
|
|
188
|
+
* イベントID
|
|
189
|
+
*/
|
|
190
|
+
id: string;
|
|
191
|
+
}): Promise<{
|
|
192
|
+
/**
|
|
193
|
+
* カタログID
|
|
194
|
+
*/
|
|
195
|
+
id: string;
|
|
196
|
+
}[]>;
|
|
197
|
+
}
|
|
198
|
+
export {};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventService = void 0;
|
|
4
|
+
const http_status_1 = require("http-status");
|
|
5
|
+
const service_1 = require("../../service");
|
|
6
|
+
// /**
|
|
7
|
+
// * COA券種オファーインターフェース
|
|
8
|
+
// */
|
|
9
|
+
// export interface ICOATicketOffer {
|
|
10
|
+
// /**
|
|
11
|
+
// * チケットコード
|
|
12
|
+
// */
|
|
13
|
+
// ticketCode: string;
|
|
14
|
+
// /**
|
|
15
|
+
// * チケット名
|
|
16
|
+
// */
|
|
17
|
+
// ticketName: string;
|
|
18
|
+
// /**
|
|
19
|
+
// * チケット名(カナ)
|
|
20
|
+
// */
|
|
21
|
+
// ticketNameKana: string;
|
|
22
|
+
// /**
|
|
23
|
+
// * チケット名(英)
|
|
24
|
+
// */
|
|
25
|
+
// ticketNameEng: string;
|
|
26
|
+
// /**
|
|
27
|
+
// * 標準単価
|
|
28
|
+
// */
|
|
29
|
+
// stdPrice: number;
|
|
30
|
+
// /**
|
|
31
|
+
// * 加算単価(3D,IMAX、4DX等の加算料金)
|
|
32
|
+
// */
|
|
33
|
+
// addPrice: number;
|
|
34
|
+
// /**
|
|
35
|
+
// * 販売単価(標準単価+加算単価)
|
|
36
|
+
// */
|
|
37
|
+
// salePrice: number;
|
|
38
|
+
// /**
|
|
39
|
+
// * 人数制限(制限が無い場合は1)
|
|
40
|
+
// */
|
|
41
|
+
// limitCount: number;
|
|
42
|
+
// /**
|
|
43
|
+
// * 制限単位(1:n人単位、2:n人以上)
|
|
44
|
+
// */
|
|
45
|
+
// limitUnit: string;
|
|
46
|
+
// /**
|
|
47
|
+
// * チケット備考(注意事項等)
|
|
48
|
+
// */
|
|
49
|
+
// ticketNote: string;
|
|
50
|
+
// /**
|
|
51
|
+
// * メガネ単価
|
|
52
|
+
// */
|
|
53
|
+
// addGlasses: number;
|
|
54
|
+
// /**
|
|
55
|
+
// * 会員用フラグ(1:会員専用チケットも表示する。会員以外の場合は0をセット)
|
|
56
|
+
// */
|
|
57
|
+
// flgMember: '0' | '1';
|
|
58
|
+
// /**
|
|
59
|
+
// * ポイント購入の場合の消費ポイント
|
|
60
|
+
// */
|
|
61
|
+
// usePoint: number;
|
|
62
|
+
// /**
|
|
63
|
+
// * ムビチケ券種フラグ
|
|
64
|
+
// */
|
|
65
|
+
// flgMvtk: boolean;
|
|
66
|
+
// /**
|
|
67
|
+
// * ムビチケ計上単価
|
|
68
|
+
// */
|
|
69
|
+
// mvtkAppPrice: number;
|
|
70
|
+
// /**
|
|
71
|
+
// * ムビチケ映写方式区分
|
|
72
|
+
// */
|
|
73
|
+
// kbnEisyahousiki: string;
|
|
74
|
+
// /**
|
|
75
|
+
// * ムビチケ電子券区分
|
|
76
|
+
// */
|
|
77
|
+
// mvtkKbnDenshiken: string;
|
|
78
|
+
// /**
|
|
79
|
+
// * ムビチケ前売券区分
|
|
80
|
+
// */
|
|
81
|
+
// mvtkKbnMaeuriken: string;
|
|
82
|
+
// /**
|
|
83
|
+
// * ムビチケ券種区分
|
|
84
|
+
// */
|
|
85
|
+
// mvtkKbnKensyu: string;
|
|
86
|
+
// /**
|
|
87
|
+
// * ムビチケ販売単価
|
|
88
|
+
// */
|
|
89
|
+
// mvtkSalesPrice: number;
|
|
90
|
+
// }
|
|
91
|
+
const BASE_URI = '/events';
|
|
92
|
+
/**
|
|
93
|
+
* イベントサービス
|
|
94
|
+
*/
|
|
95
|
+
class EventService extends service_1.Service {
|
|
96
|
+
// constructor(options: IAdditionalOptions & Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'>) {
|
|
97
|
+
// super({ ...options, retryableStatusCodes: [status.BAD_GATEWAY, status.FORBIDDEN, status.UNAUTHORIZED] });
|
|
98
|
+
// }
|
|
99
|
+
/**
|
|
100
|
+
* イベント(公開属性)検索
|
|
101
|
+
*/
|
|
102
|
+
async findEvents(params) {
|
|
103
|
+
return this.fetch({
|
|
104
|
+
uri: BASE_URI,
|
|
105
|
+
method: 'GET',
|
|
106
|
+
qs: params,
|
|
107
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
108
|
+
})
|
|
109
|
+
.then(async (response) => response.json());
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* イベントの予約集計検索
|
|
113
|
+
* @deprecated ttts専用
|
|
114
|
+
*/
|
|
115
|
+
async findAggregateReservations4ttts(params) {
|
|
116
|
+
return this.fetch({
|
|
117
|
+
uri: `${BASE_URI}/aggregations`,
|
|
118
|
+
method: 'GET',
|
|
119
|
+
qs: params,
|
|
120
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
121
|
+
})
|
|
122
|
+
.then(async (response) => response.json());
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* イベントに対する座席検索
|
|
126
|
+
* ルームの複数セクション非対応
|
|
127
|
+
* 自動的にルームのひとつめのセクションが選択されます
|
|
128
|
+
* @deprecated use SeatOfferService
|
|
129
|
+
*/
|
|
130
|
+
async findSeatOffersDeprecated(params) {
|
|
131
|
+
const { event, limit, page } = params;
|
|
132
|
+
return this.fetch({
|
|
133
|
+
uri: `${BASE_URI}/${encodeURIComponent(String(event.id))}/seats`,
|
|
134
|
+
method: 'GET',
|
|
135
|
+
qs: { limit, page },
|
|
136
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
137
|
+
})
|
|
138
|
+
.then(async (response) => {
|
|
139
|
+
const seatOffers = await response.json();
|
|
140
|
+
return {
|
|
141
|
+
data: seatOffers,
|
|
142
|
+
// 座席のないイベントに対応
|
|
143
|
+
...(seatOffers.length > 0) ? { sectionCode: seatOffers[0].containedInPlace?.branchCode } : undefined
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* 興行オファー検索
|
|
149
|
+
* サブカタログ設定有無による違いについては、includedInDataCatalogパラメータの説明を参照してください
|
|
150
|
+
*/
|
|
151
|
+
async searchTicketOffers(params) {
|
|
152
|
+
const { event, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
153
|
+
return this.fetch({
|
|
154
|
+
uri: `${BASE_URI}/${params.event.id}/offers/ticket`,
|
|
155
|
+
method: 'GET',
|
|
156
|
+
expectedStatusCodes: [http_status_1.status.OK],
|
|
157
|
+
qs: query
|
|
158
|
+
})
|
|
159
|
+
.then(async (response) => response.json());
|
|
160
|
+
}
|
|
161
|
+
// /**
|
|
162
|
+
// * イベントに対する券種オファー検索(COA券種)
|
|
163
|
+
// */
|
|
164
|
+
// public async searchTicketOffers4COA(params: {
|
|
165
|
+
// /**
|
|
166
|
+
// * イベント
|
|
167
|
+
// */
|
|
168
|
+
// event: { id: string };
|
|
169
|
+
// // seller: { typeOf: factory.organizationType; id: string };
|
|
170
|
+
// /**
|
|
171
|
+
// * ムビチケ券種もほしい場合に指定
|
|
172
|
+
// */
|
|
173
|
+
// movieTicket?: {
|
|
174
|
+
// /**
|
|
175
|
+
// * 電子券区分
|
|
176
|
+
// */
|
|
177
|
+
// kbnDenshiken: string;
|
|
178
|
+
// /**
|
|
179
|
+
// * 前売券区分
|
|
180
|
+
// */
|
|
181
|
+
// kbnMaeuriken: string;
|
|
182
|
+
// /**
|
|
183
|
+
// * 券種区分
|
|
184
|
+
// */
|
|
185
|
+
// kbnKensyu: string;
|
|
186
|
+
// /**
|
|
187
|
+
// * 販売単価
|
|
188
|
+
// */
|
|
189
|
+
// salesPrice: number;
|
|
190
|
+
// /**
|
|
191
|
+
// * 計上単価
|
|
192
|
+
// */
|
|
193
|
+
// appPrice: number;
|
|
194
|
+
// /**
|
|
195
|
+
// * 映写方式区分
|
|
196
|
+
// */
|
|
197
|
+
// kbnEisyahousiki: string;
|
|
198
|
+
// };
|
|
199
|
+
// }): Promise<ICOATicketOffer[]> {
|
|
200
|
+
// const { event, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
201
|
+
// return this.fetch({
|
|
202
|
+
// uri: `${BASE_URI}/${params.event.id}/offers/ticket`,
|
|
203
|
+
// method: 'GET',
|
|
204
|
+
// expectedStatusCodes: [status.OK],
|
|
205
|
+
// qs: query
|
|
206
|
+
// })
|
|
207
|
+
// .then(async (response) => response.json());
|
|
208
|
+
// }
|
|
209
|
+
/**
|
|
210
|
+
* オファーで利用可能な適用決済カード条件を検索する
|
|
211
|
+
* サブカタログが設定されている場合、ひとつめのサブカタログについてのみ検索されます
|
|
212
|
+
*/
|
|
213
|
+
async searchOfferAppliesToMovieTicket(params) {
|
|
214
|
+
const { event, ...query } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
215
|
+
return this.fetch({
|
|
216
|
+
uri: `${BASE_URI}/${params.event.id}/offers/appliesToMovieTicket`,
|
|
217
|
+
method: 'GET',
|
|
218
|
+
expectedStatusCodes: [http_status_1.status.OK],
|
|
219
|
+
qs: query
|
|
220
|
+
})
|
|
221
|
+
.then(async (response) => response.json());
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* サブカタログ検索
|
|
225
|
+
* オファーによるカタログ設定の場合、空配列が返却されます
|
|
226
|
+
*/
|
|
227
|
+
async searchOfferCatalogItems(params) {
|
|
228
|
+
const { id, ...query } = params;
|
|
229
|
+
return this.fetch({
|
|
230
|
+
uri: `${BASE_URI}/${encodeURIComponent(String(id))}/offerCatalogItems`,
|
|
231
|
+
method: 'GET',
|
|
232
|
+
qs: query,
|
|
233
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
234
|
+
})
|
|
235
|
+
.then(async (response) => response.json());
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* サブカタログ利用可能性検索
|
|
239
|
+
* 各サブカタログにクライアントで利用可能なオファーが含まれているかを検索します
|
|
240
|
+
*/
|
|
241
|
+
async searchOfferCatalogItemAvailabilities(params) {
|
|
242
|
+
const { id, ...query } = params;
|
|
243
|
+
return this.fetch({
|
|
244
|
+
uri: `${BASE_URI}/${encodeURIComponent(String(id))}/offerCatalogItemAvailabilities`,
|
|
245
|
+
method: 'GET',
|
|
246
|
+
qs: query,
|
|
247
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
248
|
+
})
|
|
249
|
+
.then(async (response) => response.json());
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* カタログ検索
|
|
253
|
+
* プロダクトの複数カタログに対応
|
|
254
|
+
*/
|
|
255
|
+
async searchOfferCatalogs(params) {
|
|
256
|
+
const { id, limit, page, typeOf } = params;
|
|
257
|
+
return this.fetch({
|
|
258
|
+
uri: `${BASE_URI}/${encodeURIComponent(String(id))}/hasOfferCatalog`,
|
|
259
|
+
method: 'GET',
|
|
260
|
+
qs: { limit, page, typeOf },
|
|
261
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
262
|
+
})
|
|
263
|
+
.then(async (response) => response.json());
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
exports.EventService = EventService;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { factory } from '../../factory';
|
|
2
|
+
import { Service } from '../../service';
|
|
3
|
+
type IEventSeriesAsFindResult = Pick<factory.eventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'coaInfo' | 'description' | 'dubLanguage' | 'duration' | 'endDate' | 'eventStatus' | 'headline' | 'identifier' | 'kanaName' | 'location' | 'name' | 'offers' | 'organizer' | 'project' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'workPerformed' | 'subEvent' | 'id'>;
|
|
4
|
+
type IFindParams = Pick<factory.eventSeries.ISearchConditions, 'additionalProperty' | 'endFrom' | 'endThrough' | 'id' | 'inSessionFrom' | 'inSessionThrough' | 'limit' | 'location' | 'name' | 'page' | 'sort' | 'startFrom' | 'startThrough' | 'videoFormat' | 'workPerformed'> & {
|
|
5
|
+
typeOf: factory.eventType.ScreeningEventSeries;
|
|
6
|
+
$projection?: {
|
|
7
|
+
[key in keyof factory.eventSeries.IEvent]?: 0;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* 施設コンテンツサービス
|
|
12
|
+
*/
|
|
13
|
+
export declare class EventSeriesService extends Service {
|
|
14
|
+
/**
|
|
15
|
+
* 施設コンテンツ検索
|
|
16
|
+
*/
|
|
17
|
+
findEventSeries(params: IFindParams): Promise<IEventSeriesAsFindResult[]>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventSeriesService = void 0;
|
|
4
|
+
const http_status_1 = require("http-status");
|
|
5
|
+
const service_1 = require("../../service");
|
|
6
|
+
const BASE_URI = '/eventSeries';
|
|
7
|
+
/**
|
|
8
|
+
* 施設コンテンツサービス
|
|
9
|
+
*/
|
|
10
|
+
class EventSeriesService extends service_1.Service {
|
|
11
|
+
// constructor(options: IAdditionalOptions & Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'>) {
|
|
12
|
+
// super({ ...options, retryableStatusCodes: [status.BAD_GATEWAY, status.FORBIDDEN, status.UNAUTHORIZED] });
|
|
13
|
+
// }
|
|
14
|
+
/**
|
|
15
|
+
* 施設コンテンツ検索
|
|
16
|
+
*/
|
|
17
|
+
async findEventSeries(params) {
|
|
18
|
+
return this.fetch({
|
|
19
|
+
uri: BASE_URI,
|
|
20
|
+
method: 'GET',
|
|
21
|
+
qs: params,
|
|
22
|
+
expectedStatusCodes: [http_status_1.status.OK]
|
|
23
|
+
})
|
|
24
|
+
.then(async (response) => response.json());
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.EventSeriesService = EventSeriesService;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IAdditionalOptions, IOptions } from '../service';
|
|
2
2
|
import type { CreativeWorkService } from './search/creativeWork';
|
|
3
|
+
import type { EventService } from './search/event';
|
|
3
4
|
import type { EventOfferService } from './search/eventOffer';
|
|
5
|
+
import type { EventSeriesService } from './search/eventSeries';
|
|
4
6
|
import type { PaymentProductService } from './search/paymentService';
|
|
5
7
|
import type { PlaceService } from './search/place';
|
|
6
8
|
import type { ProductService } from './search/product';
|
|
@@ -16,6 +18,20 @@ export declare namespace service {
|
|
|
16
18
|
namespace CreativeWork {
|
|
17
19
|
let svc: typeof CreativeWorkService | undefined;
|
|
18
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* イベントサービス
|
|
23
|
+
*/
|
|
24
|
+
type Event = EventService;
|
|
25
|
+
namespace Event {
|
|
26
|
+
let svc: typeof EventService | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 施設コンテンツサービス
|
|
30
|
+
*/
|
|
31
|
+
type EventSeries = EventSeriesService;
|
|
32
|
+
namespace EventSeries {
|
|
33
|
+
let svc: typeof EventSeriesService | undefined;
|
|
34
|
+
}
|
|
19
35
|
/**
|
|
20
36
|
* イベントオファーサービス
|
|
21
37
|
*/
|
|
@@ -70,6 +86,16 @@ export declare class CloudSearch {
|
|
|
70
86
|
* プロダクトサービスインスタンス生成
|
|
71
87
|
*/
|
|
72
88
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
89
|
+
/**
|
|
90
|
+
* イベントサービスインスタンス生成
|
|
91
|
+
* 販売者指定必須
|
|
92
|
+
*/
|
|
93
|
+
createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
|
|
94
|
+
/**
|
|
95
|
+
* 施設コンテンツサービスインスタンス生成
|
|
96
|
+
* 販売者指定必須
|
|
97
|
+
*/
|
|
98
|
+
createEventSeriesInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventSeriesService>;
|
|
73
99
|
/**
|
|
74
100
|
* イベントオファーサービスインスタンス生成
|
|
75
101
|
* 販売者指定必須
|
|
@@ -43,6 +43,12 @@ var service;
|
|
|
43
43
|
let CreativeWork;
|
|
44
44
|
(function (CreativeWork) {
|
|
45
45
|
})(CreativeWork = service.CreativeWork || (service.CreativeWork = {}));
|
|
46
|
+
let Event;
|
|
47
|
+
(function (Event) {
|
|
48
|
+
})(Event = service.Event || (service.Event = {}));
|
|
49
|
+
let EventSeries;
|
|
50
|
+
(function (EventSeries) {
|
|
51
|
+
})(EventSeries = service.EventSeries || (service.EventSeries = {}));
|
|
46
52
|
let EventOffer;
|
|
47
53
|
(function (EventOffer) {
|
|
48
54
|
})(EventOffer = service.EventOffer || (service.EventOffer = {}));
|
|
@@ -104,6 +110,32 @@ class CloudSearch {
|
|
|
104
110
|
retryableStatusCodes: defaultRetryableStatusCodes
|
|
105
111
|
});
|
|
106
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* イベントサービスインスタンス生成
|
|
115
|
+
* 販売者指定必須
|
|
116
|
+
*/
|
|
117
|
+
async createEventInstance(params) {
|
|
118
|
+
if (service.Event.svc === undefined) {
|
|
119
|
+
service.Event.svc = (await Promise.resolve().then(() => __importStar(require('./search/event.js')))).EventService;
|
|
120
|
+
}
|
|
121
|
+
return new service.Event.svc({
|
|
122
|
+
...this.options, ...params,
|
|
123
|
+
retryableStatusCodes: defaultRetryableStatusCodes
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* 施設コンテンツサービスインスタンス生成
|
|
128
|
+
* 販売者指定必須
|
|
129
|
+
*/
|
|
130
|
+
async createEventSeriesInstance(params) {
|
|
131
|
+
if (service.EventSeries.svc === undefined) {
|
|
132
|
+
service.EventSeries.svc = (await Promise.resolve().then(() => __importStar(require('./search/eventSeries.js')))).EventSeriesService;
|
|
133
|
+
}
|
|
134
|
+
return new service.EventSeries.svc({
|
|
135
|
+
...this.options, ...params,
|
|
136
|
+
retryableStatusCodes: defaultRetryableStatusCodes
|
|
137
|
+
});
|
|
138
|
+
}
|
|
107
139
|
/**
|
|
108
140
|
* イベントオファーサービスインスタンス生成
|
|
109
141
|
* 販売者指定必須
|