@cinerino/sdk 12.9.0 → 12.11.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.
@@ -0,0 +1,36 @@
1
+ // tslint:disable:no-console
2
+ // tslint:disable-next-line:no-implicit-dependencies
3
+ import * as client from '../../../../lib/index';
4
+ import * as auth from '../../auth/authAsAdmin';
5
+
6
+ const PROJECT_ID = String(process.env.PROJECT_ID);
7
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
8
+
9
+ // tslint:disable-next-line:max-func-body-length
10
+ async function main() {
11
+ const authClient = await auth.login();
12
+ await authClient.refreshAccessToken();
13
+ const loginTicket = authClient.verifyIdToken({});
14
+ console.log('username is', loginTicket.getUsername());
15
+
16
+ const eventService = await (await client.loadChevreAdmin({
17
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
18
+ auth: authClient
19
+ })).createEventInstance({
20
+ project: { id: PROJECT_ID },
21
+ seller: { id: SELLER_ID }
22
+ });
23
+
24
+ const events = await eventService.findEvents({
25
+ limit: 10,
26
+ page: 1,
27
+ identifiers: ['x', '20251126ABC12345102200']
28
+ });
29
+ console.log(events);
30
+ }
31
+
32
+ main()
33
+ .then(() => {
34
+ console.log('success!');
35
+ })
36
+ .catch(console.error);
@@ -54,7 +54,10 @@ async function main() {
54
54
  identifier: APPLICATION_IDENTIFIER
55
55
  },
56
56
  validFrom,
57
- validThrough
57
+ validThrough,
58
+ offeredBy: {
59
+ identifier: 'xxx' // 外部組織定義のイベントオファーの場合、組織コードを指定する
60
+ }
58
61
  }
59
62
  ],
60
63
  {
@@ -72,7 +75,10 @@ async function main() {
72
75
  identifier: APPLICATION_IDENTIFIER
73
76
  },
74
77
  validFrom,
75
- validThrough
78
+ validThrough,
79
+ offeredBy: {
80
+ identifier: 'xxx' // 外部組織定義のイベントオファーの場合、組織コードを指定する
81
+ }
76
82
  }
77
83
  ],
78
84
  {
@@ -125,6 +125,16 @@ async function main() {
125
125
  // }
126
126
  // );
127
127
  // console.log('updated.');
128
+
129
+ // イベントを検索する場合
130
+ const events = await adminEventService.findEvents({
131
+ limit: 1,
132
+ page: 1,
133
+ identifiers: [identifier]
134
+ });
135
+ // tslint:disable-next-line:no-null-keyword
136
+ console.dir(events, { depth: null });
137
+ console.log(events.length, 'events found.');
128
138
  }
129
139
 
130
140
  main()
@@ -0,0 +1,338 @@
1
+ // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
+ import * as moment from 'moment';
3
+ import * as client from '../../../../lib/index';
4
+ import { auth } from '../../auth/clientCredentials';
5
+
6
+ const project = { id: String(process.env.PROJECT_ID) };
7
+ const {
8
+ /**
9
+ * 予約対象のイベントID
10
+ */
11
+ EVENT_ID,
12
+ /**
13
+ * 外部組織の発行したイベントオファートークン
14
+ */
15
+ SAMPLE_EVENT_OFFER_TOKEN
16
+ } = process.env;
17
+ const APPLICATION_IDENTIFIER = 'SmartTheaterTXN';
18
+
19
+ type ISellerMakesOffer = Omit<client.factory.event.screeningEvent.ISellerMakesOffer, 'availableAtOrFrom'> & {
20
+ availableAtOrFrom?: client.factory.event.screeningEvent.IOfferAvailableAtOrFrom
21
+ | client.factory.event.screeningEvent.IOfferAvailableAtOrFrom[];
22
+ };
23
+ type ISeller = Omit<client.factory.event.screeningEvent.ISeller, 'makesOffer'> & {
24
+ makesOffer: ISellerMakesOffer[];
25
+ };
26
+ type IScreeningEventOffer = Omit<client.factory.event.screeningEvent.IOffer, 'seller'> & {
27
+ seller: ISeller;
28
+ };
29
+ type IScreeningEventExtensibleOffer = Omit<client.factory.event.screeningEvent.IExtensibleEventOffer, 'seller'> & {
30
+ seller: ISeller;
31
+ };
32
+ type IEvent = Omit<client.factory.event.screeningEvent.IEvent, 'offers'> & {
33
+ offers?: IScreeningEventOffer | IScreeningEventExtensibleOffer;
34
+ };
35
+
36
+ // tslint:disable-next-line:max-func-body-length
37
+ async function main() {
38
+ const eventService = new (await client.loadService()).Event({
39
+ endpoint: <string>process.env.API_ENDPOINT,
40
+ auth: await auth(),
41
+ project,
42
+ seller: { id: '' }
43
+ });
44
+
45
+ const sellerService = new (await client.loadService()).Seller({
46
+ endpoint: <string>process.env.API_ENDPOINT,
47
+ auth: await auth(),
48
+ project
49
+ });
50
+
51
+ const placeOrderService = await (await client.loadCloudTxn({
52
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
53
+ auth: await auth()
54
+ })).createPlaceOrderInstance({
55
+ project,
56
+ seller: { id: '' }
57
+ });
58
+
59
+ // 販売劇場検索
60
+ const searchSellersResult = await sellerService.search({ branchCode: { $eq: '001' } });
61
+ // tslint:disable-next-line:insecure-random
62
+ const seller = searchSellersResult.data[Math.floor(searchSellersResult.data.length * Math.random())];
63
+ if (seller === undefined) {
64
+ throw new Error('No seller');
65
+ }
66
+ console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
67
+
68
+ // イベント検索
69
+ const searchScreeningEventsResult = await eventService.search({
70
+ typeOf: client.factory.eventType.ScreeningEvent,
71
+ inSessionFrom: moment()
72
+ .toDate(),
73
+ inSessionThrough: moment()
74
+ .add(1, 'week')
75
+ .toDate(),
76
+ eventStatuses: [client.factory.eventStatusType.EventScheduled],
77
+ ...(typeof EVENT_ID === 'string') ? { id: { $eq: EVENT_ID } } : undefined
78
+ });
79
+ console.log(searchScreeningEventsResult.data.length, 'events found');
80
+
81
+ const availableEvents = <IEvent[]>searchScreeningEventsResult.data;
82
+ if (availableEvents.length === 0) {
83
+ throw new Error('No available events');
84
+ }
85
+
86
+ console.log('starting transaction...');
87
+ const transaction = await placeOrderService.start({
88
+ agent: {
89
+ identifier: [
90
+ { name: 'fromSamples', value: 'true' }
91
+ ]
92
+ },
93
+ seller: { id: String(seller.id) },
94
+ object: {
95
+ // passport: { token: passportToken }
96
+ }
97
+ });
98
+ console.log('transaction started', transaction.id);
99
+
100
+ try {
101
+ const numEvents = 1;
102
+ // tslint:disable-next-line:max-line-length
103
+ const authorizeSeatReservationResults: { price: number }[] = [];
104
+
105
+ // tslint:disable-next-line:no-increment-decrement
106
+ for (let i = 0; i < numEvents; i++) {
107
+ // イベント決定
108
+ // tslint:disable-next-line:insecure-random
109
+ const screeningEvent: IEvent = availableEvents[Math.floor(availableEvents.length * Math.random())];
110
+ const authorizeSeatReservationResult = await authorizeSeatReservationByEvent({
111
+ event: screeningEvent,
112
+ transaction: transaction
113
+ });
114
+ authorizeSeatReservationResults.push(authorizeSeatReservationResult);
115
+ }
116
+ } catch (error) {
117
+ console.error(error);
118
+ }
119
+
120
+ await wait(3000);
121
+
122
+ console.log('canceling transaction...');
123
+ await placeOrderService.cancel({ id: transaction.id });
124
+ console.log('transaction canceled.');
125
+ }
126
+
127
+ type IAuthorizeReservationAction = Pick<client.factory.action.authorize.offer.eventService.IAction, 'id'> & {
128
+ result?: {
129
+ price?: number;
130
+ };
131
+ };
132
+
133
+ // tslint:disable-next-line:max-func-body-length
134
+ async function authorizeSeatReservationByEvent(params: {
135
+ event: IEvent;
136
+ transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
137
+ }): Promise<{
138
+ price: number;
139
+ }> {
140
+ const eventService = new (await client.loadService()).Event({
141
+ endpoint: <string>process.env.API_ENDPOINT,
142
+ auth: await auth(),
143
+ project,
144
+ seller: { id: '' }
145
+ });
146
+
147
+ const offerService = await (await client.loadCloudTxn({
148
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
149
+ auth: await auth()
150
+ })).createOfferInstance({
151
+ project,
152
+ seller: { id: '' }
153
+ });
154
+
155
+ const eventOfferService = await (await client.loadCloudSearch({
156
+ endpoint: <string>process.env.API_ENDPOINT,
157
+ auth: await auth()
158
+ })).createEventOfferInstance({
159
+ project,
160
+ seller: { id: '' }
161
+ });
162
+ const screeningEvent = params.event;
163
+ const transaction = params.transaction;
164
+
165
+ // 券種検索
166
+ let ticketOffers = await eventService.searchTicketOffers({
167
+ event: { id: screeningEvent.id }
168
+ });
169
+ console.log('チケットオファーは以下の通りです');
170
+ console.log(ticketOffers.map((o) => {
171
+ const unitPriceSpecification = o.priceSpecification.priceComponent
172
+ .filter((s) => s.typeOf === client.factory.priceSpecificationType.UnitPriceSpecification)
173
+ .map((s) => `単価:${s.price}/${(<client.factory.priceSpecification.IPriceSpecification<client.factory.priceSpecificationType.UnitPriceSpecification>>s).referenceQuantity.value}`)
174
+ .join(' ');
175
+ const categoryCodeCharge = o.priceSpecification.priceComponent
176
+ .filter((s) => s.typeOf === client.factory.priceSpecificationType.CategoryCodeChargeSpecification)
177
+ .map((s) => `+${(<client.factory.priceSpecification.IPriceSpecification<client.factory.priceSpecificationType.CategoryCodeChargeSpecification>>s).appliesToCategoryCode[0].codeValue}チャージ:${s.price} ${s.priceCurrency}`)
178
+ .join(' ');
179
+
180
+ return `${o.id} ${(<client.factory.multilingualString>o.name).ja} ${unitPriceSpecification} ${categoryCodeCharge}`;
181
+ })
182
+ .join('\n'));
183
+
184
+ // 空席検索
185
+ const searchSeatOffersResult = await eventService.searchSeats({
186
+ event: { id: screeningEvent.id },
187
+ limit: 100,
188
+ page: 1
189
+ });
190
+ const seatOffers = searchSeatOffersResult.data;
191
+ // console.log(seatOffers.length, 'seatOffers found');
192
+ // const seatOffers = offers[0].containsPlace;
193
+ console.log(seatOffers.length, 'seatOffers found');
194
+ const availableSeatOffers
195
+ = seatOffers.filter((o) => o.offers?.shift()?.availability === client.factory.itemAvailability.InStock);
196
+ console.log(availableSeatOffers.length, 'availableSeatOffers found');
197
+ if (availableSeatOffers.length <= 0) {
198
+ throw new Error('No available seats');
199
+ }
200
+
201
+ // ムビチケ以外のメンバーシップオファーを選択
202
+ ticketOffers = ticketOffers
203
+ .filter((offer) => {
204
+ const movieTicketTypeChargeSpecification = offer.priceSpecification.priceComponent.find(
205
+ (component) => component.typeOf === client.factory.priceSpecificationType.MovieTicketTypeChargeSpecification
206
+ );
207
+
208
+ return movieTicketTypeChargeSpecification === undefined;
209
+ });
210
+
211
+ const selectedTicketOffer = ticketOffers.shift();
212
+ if (selectedTicketOffer === undefined) {
213
+ throw new Error('selectedTicketOffer undefined');
214
+ }
215
+ console.log('ticket offer selected', selectedTicketOffer.id, selectedTicketOffer.identifier, selectedTicketOffer.name.ja);
216
+
217
+ // 座席をランダムに選択
218
+ const selectedScreeningRoomSection = String(availableSeatOffers[0].containedInPlace?.branchCode);
219
+ console.log('screening room section selected', selectedScreeningRoomSection);
220
+ console.log(selectedScreeningRoomSection);
221
+ const selectedSeatOffers = availableSeatOffers.slice(0, 1);
222
+ console.log(selectedSeatOffers.length, 'seats selected');
223
+
224
+ /**
225
+ * 拡張イベントオファー使用の場合のオファーチケットトークン
226
+ */
227
+ let ticketToken: string | undefined;
228
+ // 拡張イベントオファー使用の場合、イベントオファーチケットを発行する
229
+ if (screeningEvent.offers?.typeOf === client.factory.offerType.AggregateOffer) {
230
+ // イベントに対するイベントオファー検索
231
+ await wait(3000);
232
+ const eventOffers = await eventOfferService.findEventOffers({
233
+ limit: 20,
234
+ page: 1,
235
+ itemOfferedId: screeningEvent.id,
236
+ availableAtOrFromIdentifier: APPLICATION_IDENTIFIER // 指定のアプリケーションで有効なオファー
237
+ });
238
+ console.log(eventOffers.length, 'eventOffers found.', eventOffers);
239
+
240
+ // 有効なイベントオファーは?
241
+ const now = new Date();
242
+ const validEventOffer = eventOffers.find((eventOffer) => {
243
+ return moment(eventOffer.validFrom)
244
+ .isSameOrBefore(now)
245
+ && moment(eventOffer.validThrough)
246
+ .isSameOrAfter(now);
247
+ });
248
+ if (validEventOffer === undefined) {
249
+ throw new Error('有効なイベントオファーが見つかりません');
250
+ }
251
+ console.log('有効なイベントオファーが見つかりました', validEventOffer.id, validEventOffer.identifier);
252
+
253
+ /**
254
+ * 外部組織発行のイベントオファートークンが必要かどうか
255
+ */
256
+ const eventOfferTokenRequired = typeof validEventOffer.offeredBy?.identifier === 'string';
257
+ if (eventOfferTokenRequired) {
258
+ if (typeof SAMPLE_EVENT_OFFER_TOKEN !== 'string' || SAMPLE_EVENT_OFFER_TOKEN === '') {
259
+ throw new Error('イベントオファートークンが必要です');
260
+ }
261
+ }
262
+
263
+ await wait(3000);
264
+ // 拡張オファー使用の場合、オファーコードを指定してオファーチケットを発行
265
+ const issueEventServiceOfferTicketResult = await offerService.issueEventServiceOfferTicket({
266
+ audience: { id: transaction.id },
267
+ eventId: screeningEvent.id,
268
+ eventOfferId: validEventOffer.id, // 拡張オファー使用の場合、イベントオファーIDを指定する
269
+ ...(eventOfferTokenRequired)
270
+ ? {
271
+ ticketedOffer: {
272
+ token: SAMPLE_EVENT_OFFER_TOKEN // イベントオファートークンを指定する場合
273
+ }
274
+ }
275
+ : undefined
276
+ });
277
+ console.log('offer ticket issued.', ticketToken);
278
+ ticketToken = issueEventServiceOfferTicketResult.ticketToken;
279
+ } else {
280
+ // no op
281
+ }
282
+
283
+ await wait(3000);
284
+ console.log('authorizing seat reservation...');
285
+ const seatReservationAuth = <IAuthorizeReservationAction>await offerService.authorizeEventService({
286
+ object: {
287
+ reservationFor: {
288
+ id: screeningEvent.id
289
+ },
290
+ acceptedOffer: selectedSeatOffers.map((o) => {
291
+ return {
292
+ typeOf: selectedTicketOffer.typeOf,
293
+ id: String(selectedTicketOffer.id),
294
+ itemOffered: {
295
+ serviceOutput: {
296
+ typeOf: client.factory.reservationType.EventReservation,
297
+ reservedTicket: {
298
+ typeOf: 'Ticket',
299
+ ticketedSeat: {
300
+ typeOf: client.factory.placeType.Seat,
301
+ seatNumber: o.branchCode,
302
+ seatSection: selectedScreeningRoomSection,
303
+ seatRow: ''
304
+ }
305
+ }
306
+ }
307
+ }
308
+ };
309
+ })
310
+ },
311
+ purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder },
312
+ instrument: [
313
+ ...(typeof ticketToken === 'string')
314
+ ? [{ ticketToken, typeOf: <'Ticket'>'Ticket' }] // オファーチケットを指定する
315
+ : []
316
+ ]
317
+ });
318
+ console.log('seat reservation authorized', seatReservationAuth.id);
319
+
320
+ const price = seatReservationAuth.result?.price;
321
+ // 金額計算
322
+ if (typeof price !== 'number') {
323
+ throw new Error('result.price undefined');
324
+ }
325
+ console.log('price:', price);
326
+
327
+ return { price };
328
+ }
329
+
330
+ async function wait(waitInMilliseconds: number) {
331
+ return new Promise((resolve) => setTimeout(resolve, waitInMilliseconds));
332
+ }
333
+
334
+ main()
335
+ .then(() => {
336
+ console.log('success!');
337
+ })
338
+ .catch(console.error);
@@ -29,6 +29,41 @@ export interface IUpdateEventSellerMakesOfferParamsByIdentifier {
29
29
  location?: never;
30
30
  superEvent?: never;
31
31
  }
32
+ /**
33
+ * adminイベント検索パラメータ
34
+ */
35
+ export interface IFindParams {
36
+ /**
37
+ * max: 20
38
+ */
39
+ limit: number;
40
+ page: number;
41
+ /**
42
+ * イベント識別子リスト
43
+ * max length: 10
44
+ */
45
+ identifiers?: string[];
46
+ }
47
+ /**
48
+ * adminイベント検索結果
49
+ */
50
+ export declare type IEventAsFindResult = Pick<factory.event.screeningEvent.IEvent, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'id' | 'identifier' | 'location' | 'maximumPhysicalAttendeeCapacity' | 'startDate' | 'superEvent' | 'typeOf'> & {
51
+ offers: {
52
+ /**
53
+ * AggregateOfferであれば拡張イベントオファー使用
54
+ */
55
+ typeOf: factory.offerType.AggregateOffer | factory.offerType.Offer;
56
+ /**
57
+ * 興行
58
+ */
59
+ itemOffered: {
60
+ /**
61
+ * 興行ID
62
+ */
63
+ id: string;
64
+ };
65
+ };
66
+ };
32
67
  /**
33
68
  * イベントサービス
34
69
  */
@@ -93,5 +128,9 @@ export declare class EventService extends Service {
93
128
  };
94
129
  };
95
130
  }): Promise<void>;
131
+ /**
132
+ * 管理者によるイベント検索(在庫管理ロールが必要です)
133
+ */
134
+ findEvents(params: IFindParams): Promise<IEventAsFindResult[]>;
96
135
  }
97
136
  export {};
@@ -174,6 +174,25 @@ var EventService = /** @class */ (function (_super) {
174
174
  });
175
175
  });
176
176
  };
177
+ /**
178
+ * 管理者によるイベント検索(在庫管理ロールが必要です)
179
+ */
180
+ EventService.prototype.findEvents = function (params) {
181
+ return __awaiter(this, void 0, void 0, function () {
182
+ var _this = this;
183
+ return __generator(this, function (_a) {
184
+ return [2 /*return*/, this.fetch({
185
+ uri: '/events',
186
+ method: 'GET',
187
+ qs: params,
188
+ expectedStatusCodes: [http_status_1.OK]
189
+ })
190
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
191
+ return [2 /*return*/, response.json()];
192
+ }); }); })];
193
+ });
194
+ });
195
+ };
177
196
  return EventService;
178
197
  }(service_1.Service));
179
198
  exports.EventService = EventService;
@@ -1,6 +1,6 @@
1
1
  import * as factory from '../../factory';
2
2
  import { Service } from '../../service';
3
- import { ICreateParamsByIdentifier, IUpdateParamsByIdentifier } from '../../chevreAdmin/event';
3
+ import { ICreateParamsByIdentifier, IEventAsFindResult, IFindParams, IUpdateParamsByIdentifier } from '../../chevreAdmin/event';
4
4
  declare type ISendEmailMessageOnEventUpdated = Pick<factory.action.transfer.send.message.email.IAttributes, 'purpose' | 'recipient'> & {
5
5
  object: factory.action.transfer.send.message.email.IObjectAsEmailMessage;
6
6
  };
@@ -39,6 +39,10 @@ export declare class EventService extends Service {
39
39
  updateEventsByIdentifier(params: IUpdateParamsByIdentifier[], options: {
40
40
  typeOf: factory.eventType.ScreeningEvent;
41
41
  }): Promise<void>;
42
+ /**
43
+ * 管理者によるイベント検索(在庫管理ロールが必要です)
44
+ */
45
+ findEvents(params: IFindParams): Promise<IEventAsFindResult[]>;
42
46
  /**
43
47
  * イベントステータス更新
44
48
  */
@@ -136,6 +136,30 @@ var EventService = /** @class */ (function (_super) {
136
136
  });
137
137
  });
138
138
  };
139
+ /**
140
+ * 管理者によるイベント検索(在庫管理ロールが必要です)
141
+ */
142
+ EventService.prototype.findEvents = function (params) {
143
+ return __awaiter(this, void 0, void 0, function () {
144
+ var _a, auth, endpoint, project, seller, disableAutoRetry, chevreAdmin, eventService;
145
+ return __generator(this, function (_b) {
146
+ switch (_b.label) {
147
+ case 0:
148
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry;
149
+ return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
150
+ case 1:
151
+ chevreAdmin = _b.sent();
152
+ return [4 /*yield*/, chevreAdmin.createEventInstance({
153
+ project: project,
154
+ seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
155
+ })];
156
+ case 2:
157
+ eventService = _b.sent();
158
+ return [2 /*return*/, eventService.findEvents(params)];
159
+ }
160
+ });
161
+ });
162
+ };
139
163
  /**
140
164
  * イベントステータス更新
141
165
  */
package/lib/bundle.js CHANGED
@@ -3061,6 +3061,25 @@ var EventService = /** @class */ (function (_super) {
3061
3061
  });
3062
3062
  });
3063
3063
  };
3064
+ /**
3065
+ * 管理者によるイベント検索(在庫管理ロールが必要です)
3066
+ */
3067
+ EventService.prototype.findEvents = function (params) {
3068
+ return __awaiter(this, void 0, void 0, function () {
3069
+ var _this = this;
3070
+ return __generator(this, function (_a) {
3071
+ return [2 /*return*/, this.fetch({
3072
+ uri: '/events',
3073
+ method: 'GET',
3074
+ qs: params,
3075
+ expectedStatusCodes: [http_status_1.OK]
3076
+ })
3077
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
3078
+ return [2 /*return*/, response.json()];
3079
+ }); }); })];
3080
+ });
3081
+ });
3082
+ };
3064
3083
  return EventService;
3065
3084
  }(service_1.Service));
3066
3085
  exports.EventService = EventService;
@@ -21807,6 +21826,30 @@ var EventService = /** @class */ (function (_super) {
21807
21826
  });
21808
21827
  });
21809
21828
  };
21829
+ /**
21830
+ * 管理者によるイベント検索(在庫管理ロールが必要です)
21831
+ */
21832
+ EventService.prototype.findEvents = function (params) {
21833
+ return __awaiter(this, void 0, void 0, function () {
21834
+ var _a, auth, endpoint, project, seller, disableAutoRetry, chevreAdmin, eventService;
21835
+ return __generator(this, function (_b) {
21836
+ switch (_b.label) {
21837
+ case 0:
21838
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry;
21839
+ return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
21840
+ case 1:
21841
+ chevreAdmin = _b.sent();
21842
+ return [4 /*yield*/, chevreAdmin.createEventInstance({
21843
+ project: project,
21844
+ seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
21845
+ })];
21846
+ case 2:
21847
+ eventService = _b.sent();
21848
+ return [2 /*return*/, eventService.findEvents(params)];
21849
+ }
21850
+ });
21851
+ });
21852
+ };
21810
21853
  /**
21811
21854
  * イベントステータス更新
21812
21855
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "12.9.0",
3
+ "version": "12.11.0-alpha.0",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -93,7 +93,7 @@
93
93
  "watchify": "^3.11.1"
94
94
  },
95
95
  "dependencies": {
96
- "@chevre/factory": "5.3.0-alpha.1",
96
+ "@chevre/factory": "5.3.0",
97
97
  "debug": "3.2.7",
98
98
  "http-status": "1.7.4",
99
99
  "idtoken-verifier": "2.0.3",