@cinerino/sdk 16.4.0-alpha.8 → 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 +30 -0
- package/lib/abstract/chevre/event.d.ts +2 -13
- package/lib/abstract/chevre.d.ts +0 -9
- package/lib/abstract/chevre.js +0 -9
- package/lib/abstract/chevreAdmin/order.d.ts +8 -5
- package/lib/abstract/chevreAdmin/order.js +10 -4
- package/lib/abstract/chevreConsole/action.d.ts +10 -9
- package/lib/abstract/chevreConsole/action.js +5 -15
- package/lib/abstract/chevreConsole/assetTransaction.d.ts +3 -3
- package/lib/abstract/chevreConsole/assetTransaction.js +3 -7
- package/lib/abstract/chevreConsole/checkAction.d.ts +24 -0
- package/lib/abstract/{chevre/note.js → chevreConsole/checkAction.js} +6 -10
- package/lib/abstract/chevreConsole/event.d.ts +1 -1
- package/lib/abstract/chevreConsole/informAction.d.ts +18 -0
- package/lib/abstract/chevreConsole/informAction.js +20 -0
- package/lib/abstract/chevreConsole/order/factory.d.ts +10 -1
- package/lib/abstract/chevreConsole/transaction/placeOrder.d.ts +3 -1
- package/lib/abstract/chevreConsole/updateAction.d.ts +17 -0
- package/lib/abstract/chevreConsole/updateAction.js +20 -0
- package/lib/abstract/chevreConsole/useAction.d.ts +17 -0
- package/lib/abstract/chevreConsole/useAction.js +20 -0
- package/lib/abstract/chevreConsole.d.ts +27 -9
- package/lib/abstract/chevreConsole.js +36 -9
- package/lib/abstract/cinerino/service/event.d.ts +5 -24
- package/lib/abstract/cinerino/service/event.js +31 -44
- package/lib/abstract/cloud/admin/order.d.ts +2 -3
- package/lib/abstract/cloud/admin/order.js +2 -2
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +4 -4
- package/package.json +2 -2
- package/lib/abstract/chevre/note.d.ts +0 -32
- package/lib/abstract/chevreConsole/ownershipInfo.d.ts +0 -35
- package/lib/abstract/chevreConsole/ownershipInfo.js +0 -27
|
@@ -45,6 +45,18 @@ var service;
|
|
|
45
45
|
let Action;
|
|
46
46
|
(function (Action) {
|
|
47
47
|
})(Action = service.Action || (service.Action = {}));
|
|
48
|
+
let UpdateAction;
|
|
49
|
+
(function (UpdateAction) {
|
|
50
|
+
})(UpdateAction = service.UpdateAction || (service.UpdateAction = {}));
|
|
51
|
+
let InformAction;
|
|
52
|
+
(function (InformAction) {
|
|
53
|
+
})(InformAction = service.InformAction || (service.InformAction = {}));
|
|
54
|
+
let UseAction;
|
|
55
|
+
(function (UseAction) {
|
|
56
|
+
})(UseAction = service.UseAction || (service.UseAction = {}));
|
|
57
|
+
let CheckAction;
|
|
58
|
+
(function (CheckAction) {
|
|
59
|
+
})(CheckAction = service.CheckAction || (service.CheckAction = {}));
|
|
48
60
|
let AdditionalProperty;
|
|
49
61
|
(function (AdditionalProperty) {
|
|
50
62
|
})(AdditionalProperty = service.AdditionalProperty || (service.AdditionalProperty = {}));
|
|
@@ -117,9 +129,6 @@ var service;
|
|
|
117
129
|
let Order;
|
|
118
130
|
(function (Order) {
|
|
119
131
|
})(Order = service.Order || (service.Order = {}));
|
|
120
|
-
let OwnershipInfo;
|
|
121
|
-
(function (OwnershipInfo) {
|
|
122
|
-
})(OwnershipInfo = service.OwnershipInfo || (service.OwnershipInfo = {}));
|
|
123
132
|
let PaymentProduct;
|
|
124
133
|
(function (PaymentProduct) {
|
|
125
134
|
})(PaymentProduct = service.PaymentProduct || (service.PaymentProduct = {}));
|
|
@@ -252,6 +261,30 @@ class ChevreConsole {
|
|
|
252
261
|
}
|
|
253
262
|
return new service.Action.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
254
263
|
}
|
|
264
|
+
async createUpdateActionInstance(params) {
|
|
265
|
+
if (service.UpdateAction.svc === undefined) {
|
|
266
|
+
service.UpdateAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/updateAction.js')))).UpdateActionService;
|
|
267
|
+
}
|
|
268
|
+
return new service.UpdateAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
269
|
+
}
|
|
270
|
+
async createInformActionInstance(params) {
|
|
271
|
+
if (service.InformAction.svc === undefined) {
|
|
272
|
+
service.InformAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/informAction.js')))).InformActionService;
|
|
273
|
+
}
|
|
274
|
+
return new service.InformAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
275
|
+
}
|
|
276
|
+
async createUseActionInstance(params) {
|
|
277
|
+
if (service.UseAction.svc === undefined) {
|
|
278
|
+
service.UseAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/useAction.js')))).UseActionService;
|
|
279
|
+
}
|
|
280
|
+
return new service.UseAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
281
|
+
}
|
|
282
|
+
async createCheckActionInstance(params) {
|
|
283
|
+
if (service.CheckAction.svc === undefined) {
|
|
284
|
+
service.CheckAction.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/checkAction.js')))).CheckActionService;
|
|
285
|
+
}
|
|
286
|
+
return new service.CheckAction.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
287
|
+
}
|
|
255
288
|
async createAdditionalPropertyInstance(params) {
|
|
256
289
|
if (service.AdditionalProperty.svc === undefined) {
|
|
257
290
|
service.AdditionalProperty.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/additionalProperty.js')))).AdditionalPropertyService;
|
|
@@ -396,12 +429,6 @@ class ChevreConsole {
|
|
|
396
429
|
}
|
|
397
430
|
return new service.Order.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
398
431
|
}
|
|
399
|
-
async createOwnershipInfoInstance(params) {
|
|
400
|
-
if (service.OwnershipInfo.svc === undefined) {
|
|
401
|
-
service.OwnershipInfo.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/ownershipInfo.js')))).OwnershipInfoService;
|
|
402
|
-
}
|
|
403
|
-
return new service.OwnershipInfo.svc({ ...this.options, ...params, retryableStatusCodes: [] });
|
|
404
|
-
}
|
|
405
432
|
async createPaymentProductInstance(params) {
|
|
406
433
|
if (service.PaymentProduct.svc === undefined) {
|
|
407
434
|
service.PaymentProduct.svc = (await Promise.resolve().then(() => __importStar(require('./chevreConsole/paymentService.js')))).PaymentProductService;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer } from '../../chevre/event/factory';
|
|
1
|
+
import { ISearchOfferCatalogItemAvailabilityResult, ISearchOfferCatalogItemResult, ISeatAsEventOffer, IFindParams } from '../../chevre/event/factory';
|
|
2
2
|
import type { ISearchWithReservationForIdResult } from '../../chevreConsole/aggregateReservation';
|
|
3
3
|
import { factory } from '../../factory';
|
|
4
4
|
import { IAdditionalOptions, IOptions, ISearchResult, Service } from '../../service';
|
|
5
|
-
type IKeyOfProjection = keyof factory.event.screeningEvent.IEvent;
|
|
6
|
-
type IProjection = Partial<Record<IKeyOfProjection, 0>>;
|
|
7
5
|
type ISellerMakesOffer = Omit<factory.event.screeningEvent.ISellerMakesOffer, 'availableAtOrFrom'> & {
|
|
8
6
|
availableAtOrFrom?: factory.event.screeningEvent.IOfferAvailableAtOrFrom | factory.event.screeningEvent.IOfferAvailableAtOrFrom[];
|
|
9
7
|
};
|
|
@@ -22,13 +20,10 @@ type IScreeningEventOffer4COA = Omit<factory.event.screeningEvent.IOffer4COA, 's
|
|
|
22
20
|
type IScreeningEventExtensibleOffer = Omit<factory.event.screeningEvent.IExtensibleEventOffer, 'seller'> & {
|
|
23
21
|
seller: ISeller;
|
|
24
22
|
};
|
|
25
|
-
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'> & {
|
|
26
24
|
offers?: IScreeningEventOffer | IScreeningEventOffer4COA | IScreeningEventExtensibleOffer;
|
|
27
25
|
superEvent: Omit<factory.event.screeningEvent.ISuperEvent, 'soundFormat'>;
|
|
28
26
|
};
|
|
29
|
-
type IMinimizedEvent = Pick<factory.event.screeningEvent.IEvent, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'id' | 'location' | 'maximumAttendeeCapacity' | 'remainingAttendeeCapacity' | 'startDate'> & {
|
|
30
|
-
superEvent: Omit<factory.event.screeningEvent.ISuperEvent, 'soundFormat'>;
|
|
31
|
-
};
|
|
32
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'>;
|
|
33
28
|
/**
|
|
34
29
|
* COA券種オファーインターフェース
|
|
@@ -121,16 +116,9 @@ export interface ICOATicketOffer {
|
|
|
121
116
|
export declare class EventService extends Service {
|
|
122
117
|
constructor(options: IAdditionalOptions & Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'>);
|
|
123
118
|
/**
|
|
124
|
-
*
|
|
119
|
+
* イベント(公開属性)検索
|
|
125
120
|
*/
|
|
126
|
-
|
|
127
|
-
typeOf: factory.eventType.ScreeningEvent;
|
|
128
|
-
$projection?: IProjection;
|
|
129
|
-
/**
|
|
130
|
-
* offer.seller.makesOfferをアプリケーションIDでfilterする(max:2)
|
|
131
|
-
*/
|
|
132
|
-
sellerMakesOfferAvailableAtIn?: string[];
|
|
133
|
-
}): Promise<ISearchResult<IEvent[]>>;
|
|
121
|
+
findEvents(params: Pick<IFindParams, 'limit' | 'page' | 'sort' | 'additionalProperty' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'location' | 'offers' | 'startFrom' | 'startThrough' | 'superEvent' | '$projection' | 'sellerMakesOfferAvailableAtIn' | 'typeOf'>): Promise<IEventAsFindResult[]>;
|
|
134
122
|
/**
|
|
135
123
|
* 施設コンテンツ検索
|
|
136
124
|
*/
|
|
@@ -140,13 +128,6 @@ export declare class EventService extends Service {
|
|
|
140
128
|
[key in keyof factory.eventSeries.IEvent]?: 0;
|
|
141
129
|
};
|
|
142
130
|
}): Promise<IEventSeriesAsFindResult[]>;
|
|
143
|
-
/**
|
|
144
|
-
* イベント検索(最小限の属性)
|
|
145
|
-
*/
|
|
146
|
-
projectMinimumFields(params: Omit<factory.event.screeningEvent.ISearchConditions, 'project' | 'organizer' | 'typeOfIn'> & {
|
|
147
|
-
typeOf: factory.eventType.ScreeningEvent;
|
|
148
|
-
$projection?: never;
|
|
149
|
-
}): Promise<IMinimizedEvent[]>;
|
|
150
131
|
/**
|
|
151
132
|
* イベント集計検索
|
|
152
133
|
*/
|
|
@@ -167,7 +148,7 @@ export declare class EventService extends Service {
|
|
|
167
148
|
* 興行イベント
|
|
168
149
|
*/
|
|
169
150
|
typeOf: factory.eventType.ScreeningEvent;
|
|
170
|
-
}): Promise<
|
|
151
|
+
}): Promise<IEventAsFindResult>;
|
|
171
152
|
/**
|
|
172
153
|
* イベントに対する座席検索
|
|
173
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
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { factory } from '../../factory';
|
|
2
1
|
import { Service } from '../../service';
|
|
3
|
-
import { IFindParams, IFindAcceptedOffersParams, IOrderAsSearchResult, IOrderAsFindAcceptedOffersResult, IReturner, IUpdateChangeableAttributesParams } from '../../chevreConsole/order/factory';
|
|
2
|
+
import { IFindParams, IFindAcceptedOffersParams, IOrderAsSearchResult, IOrderAsFindAcceptedOffersResult, IAcceptedOfferMinimized, IReturner, IUpdateChangeableAttributesParams } from '../../chevreConsole/order/factory';
|
|
4
3
|
type IFindOrderParams = Pick<IFindParams, 'acceptedOffers' | 'confirmationNumbers' | 'customer' | 'name' | 'orderDate' | 'orderNumbers' | 'orderStatuses' | 'paymentMethods' | 'limit' | 'page' | 'sort'>;
|
|
5
4
|
/**
|
|
6
5
|
* 注文管理サービス
|
|
@@ -34,7 +33,7 @@ export declare class OrderService extends Service {
|
|
|
34
33
|
}, conditions: {
|
|
35
34
|
limit?: number;
|
|
36
35
|
page?: number;
|
|
37
|
-
}): Promise<
|
|
36
|
+
}): Promise<IAcceptedOfferMinimized[]>;
|
|
38
37
|
/**
|
|
39
38
|
* 変更可能な属性を更新する
|
|
40
39
|
*/
|
|
@@ -67,7 +67,7 @@ class OrderService extends service_1.Service {
|
|
|
67
67
|
...params,
|
|
68
68
|
limit,
|
|
69
69
|
page
|
|
70
|
-
});
|
|
70
|
+
}, { minimizeReservationFor: true });
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* 返品者検索
|
|
@@ -91,7 +91,7 @@ class OrderService extends service_1.Service {
|
|
|
91
91
|
project,
|
|
92
92
|
seller: { id: (typeof seller?.id === 'string') ? seller.id : '' }
|
|
93
93
|
});
|
|
94
|
-
return orderService.
|
|
94
|
+
return orderService.findAcceptedOffersByOrderNumber({ orderNumber: String(params.orderNumber) }, conditions, { minimizeReservationFor: true });
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* 変更可能な属性を更新する
|