@cinerino/sdk 5.2.0-alpha.3 → 5.2.0-alpha.5
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/example/src/chevre/transaction/processPlaceOrder.ts +1 -1
- package/example/src/transaction/processPlaceOrderByAnonymousCreditCardAndMembership.ts +6 -6
- package/example/src/transaction/processPlaceOrderByAnonymousCreditCardAndMyMembership.ts +13 -6
- package/example/src/transaction/processPlaceOrderByCash.ts +12 -6
- package/lib/abstract/chevreAdmin/seller.d.ts +21 -5
- package/lib/abstract/chevreAdmin/seller.js +50 -12
- package/lib/abstract/chevreTxn/offer.d.ts +12 -7
- package/lib/abstract/chevreTxn/offer.js +3 -3
- package/lib/abstract/chevreTxn/transaction/placeOrder/factory.d.ts +5 -5
- package/lib/abstract/service/offer.d.ts +36 -6
- package/lib/abstract/service/offer.js +70 -12
- package/lib/abstract/service/transaction/placeOrder.d.ts +1 -23
- package/lib/abstract/service/transaction/placeOrder.js +0 -39
- package/lib/abstract/service/transaction/placeOrder4sskts.d.ts +8 -8
- package/lib/abstract/service/transaction/placeOrder4sskts.js +3 -3
- package/lib/bundle.js +135 -78
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ const profile = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export type IAuthorizeReservationAction
|
|
16
|
-
= client.factory.action.authorize.offer.
|
|
16
|
+
= client.factory.action.authorize.offer.eventService.IAction<client.factory.service.webAPI.Identifier.Chevre>;
|
|
17
17
|
|
|
18
18
|
// tslint:disable-next-line:max-func-body-length
|
|
19
19
|
async function main() {
|
|
@@ -120,7 +120,7 @@ async function main() {
|
|
|
120
120
|
const numEvents = 1;
|
|
121
121
|
let amount = 0;
|
|
122
122
|
// tslint:disable-next-line:max-line-length
|
|
123
|
-
const authorizeSeatReservationResults: client.factory.action.authorize.offer.
|
|
123
|
+
const authorizeSeatReservationResults: client.factory.action.authorize.offer.eventService.IResult<client.factory.service.webAPI.Identifier.Chevre>[] = [];
|
|
124
124
|
|
|
125
125
|
// tslint:disable-next-line:no-increment-decrement
|
|
126
126
|
for (let i = 0; i < numEvents; i++) {
|
|
@@ -132,7 +132,7 @@ async function main() {
|
|
|
132
132
|
// seller: seller,
|
|
133
133
|
transaction: transaction
|
|
134
134
|
});
|
|
135
|
-
amount += authorizeSeatReservationResult.price;
|
|
135
|
+
amount += Number(authorizeSeatReservationResult.price);
|
|
136
136
|
authorizeSeatReservationResults.push(authorizeSeatReservationResult);
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -254,14 +254,14 @@ async function main() {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
export type IAuthorizeReservationAction
|
|
257
|
-
= client.factory.action.authorize.offer.
|
|
257
|
+
= client.factory.action.authorize.offer.eventService.IAction<client.factory.service.webAPI.Identifier.Chevre>;
|
|
258
258
|
|
|
259
259
|
// tslint:disable-next-line:max-func-body-length
|
|
260
260
|
async function authorizeSeatReservationByEvent(params: {
|
|
261
261
|
event: client.factory.event.screeningEvent.IEvent;
|
|
262
262
|
// seller: client.factory.seller.ISeller;
|
|
263
263
|
transaction: Pick<client.factory.transaction.placeOrder.ITransaction, 'id'>;
|
|
264
|
-
}): Promise<client.factory.action.authorize.offer.
|
|
264
|
+
}): Promise<client.factory.action.authorize.offer.eventService.IResult<client.factory.service.webAPI.Identifier.Chevre>> {
|
|
265
265
|
const eventService = new (await client.loadService()).Event({
|
|
266
266
|
endpoint: <string>process.env.API_ENDPOINT,
|
|
267
267
|
auth: await auth(),
|
|
@@ -269,7 +269,7 @@ async function authorizeSeatReservationByEvent(params: {
|
|
|
269
269
|
seller: { id: '' }
|
|
270
270
|
});
|
|
271
271
|
|
|
272
|
-
const
|
|
272
|
+
const offerService = new (await client.loadService()).Offer({
|
|
273
273
|
endpoint: <string>process.env.API_ENDPOINT,
|
|
274
274
|
auth: await auth(),
|
|
275
275
|
project,
|
|
@@ -341,7 +341,7 @@ async function authorizeSeatReservationByEvent(params: {
|
|
|
341
341
|
|
|
342
342
|
await wait(5000);
|
|
343
343
|
console.log('authorizing seat reservation...');
|
|
344
|
-
const seatReservationAuth = <IAuthorizeReservationAction>await
|
|
344
|
+
const seatReservationAuth = <IAuthorizeReservationAction>await offerService.authorizeEventService({
|
|
345
345
|
object: {
|
|
346
346
|
reservationFor: {
|
|
347
347
|
id: screeningEvent.id
|
|
@@ -34,6 +34,13 @@ async function main() {
|
|
|
34
34
|
project
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
const offerService = new (await client.loadService()).Offer({
|
|
38
|
+
endpoint: <string>process.env.API_ENDPOINT,
|
|
39
|
+
auth: authClient,
|
|
40
|
+
project,
|
|
41
|
+
seller: { id: '' }
|
|
42
|
+
});
|
|
43
|
+
|
|
37
44
|
const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
|
|
38
45
|
endpoint: <string>process.env.API_ENDPOINT,
|
|
39
46
|
auth: authClient,
|
|
@@ -148,8 +155,8 @@ async function main() {
|
|
|
148
155
|
event: screeningEvent,
|
|
149
156
|
// seller: seller,
|
|
150
157
|
transaction: { id: transaction.id }
|
|
151
|
-
})(eventService,
|
|
152
|
-
amount += authorizeSeatReservationResult.price;
|
|
158
|
+
})(eventService, offerService, ownershipInfoService, tokenService);
|
|
159
|
+
amount += Number(authorizeSeatReservationResult.price);
|
|
153
160
|
authorizeSeatReservationResults.push(authorizeSeatReservationResult);
|
|
154
161
|
}
|
|
155
162
|
|
|
@@ -271,7 +278,7 @@ async function main() {
|
|
|
271
278
|
}
|
|
272
279
|
|
|
273
280
|
export type IAuthorizeReservationAction
|
|
274
|
-
= client.factory.action.authorize.offer.
|
|
281
|
+
= client.factory.action.authorize.offer.eventService.IAction<client.factory.service.webAPI.Identifier.Chevre>;
|
|
275
282
|
|
|
276
283
|
function authorizeSeatReservationByEvent(params: {
|
|
277
284
|
event: client.factory.event.screeningEvent.IEvent;
|
|
@@ -281,10 +288,10 @@ function authorizeSeatReservationByEvent(params: {
|
|
|
281
288
|
// tslint:disable-next-line:max-func-body-length
|
|
282
289
|
return async (
|
|
283
290
|
eventService: client.service.Event,
|
|
284
|
-
|
|
291
|
+
offerService: client.service.Offer,
|
|
285
292
|
ownershipInfoService: client.service.person.OwnershipInfo,
|
|
286
293
|
tokenService: client.service.Token
|
|
287
|
-
): Promise<client.factory.action.authorize.offer.
|
|
294
|
+
): Promise<client.factory.action.authorize.offer.eventService.IResult<client.factory.service.webAPI.Identifier.Chevre>> => {
|
|
288
295
|
const screeningEvent = params.event;
|
|
289
296
|
const transaction = params.transaction;
|
|
290
297
|
|
|
@@ -381,7 +388,7 @@ function authorizeSeatReservationByEvent(params: {
|
|
|
381
388
|
|
|
382
389
|
await wait(5000);
|
|
383
390
|
console.log('authorizing seat reservation...');
|
|
384
|
-
const seatReservationAuth = <IAuthorizeReservationAction>await
|
|
391
|
+
const seatReservationAuth = <IAuthorizeReservationAction>await offerService.authorizeEventService({
|
|
385
392
|
object: {
|
|
386
393
|
reservationFor: {
|
|
387
394
|
id: screeningEvent.id
|
|
@@ -15,7 +15,7 @@ const profile = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export type IAuthorizeReservationAction
|
|
18
|
-
= client.factory.action.authorize.offer.
|
|
18
|
+
= client.factory.action.authorize.offer.eventService.IAction<client.factory.service.webAPI.Identifier.Chevre>;
|
|
19
19
|
|
|
20
20
|
// tslint:disable-next-line:max-func-body-length
|
|
21
21
|
async function main() {
|
|
@@ -41,6 +41,12 @@ async function main() {
|
|
|
41
41
|
project,
|
|
42
42
|
seller: { id: '' }
|
|
43
43
|
});
|
|
44
|
+
const offerService = new (await client.loadService()).Offer({
|
|
45
|
+
endpoint: <string>process.env.API_ENDPOINT,
|
|
46
|
+
auth: authClient,
|
|
47
|
+
project,
|
|
48
|
+
seller: { id: '' }
|
|
49
|
+
});
|
|
44
50
|
const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
|
|
45
51
|
endpoint: <string>process.env.API_ENDPOINT,
|
|
46
52
|
auth: authClient,
|
|
@@ -226,7 +232,7 @@ async function main() {
|
|
|
226
232
|
|
|
227
233
|
await wait(5000);
|
|
228
234
|
console.log('authorizing seat reservation...');
|
|
229
|
-
const seatReservationAuth = <IAuthorizeReservationAction>await
|
|
235
|
+
const seatReservationAuth = <IAuthorizeReservationAction>await offerService.authorizeEventService({
|
|
230
236
|
object: {
|
|
231
237
|
reservationFor: { id: screeningEvent.id },
|
|
232
238
|
acceptedOffer: selectedSeatOffers.map((o) => {
|
|
@@ -256,11 +262,11 @@ async function main() {
|
|
|
256
262
|
console.log('seat reservation authorized', seatReservationAuth.id);
|
|
257
263
|
|
|
258
264
|
// 金額計算
|
|
259
|
-
|
|
260
|
-
throw new Error('座席予約承認結果は必ず存在します');
|
|
261
|
-
}
|
|
262
|
-
const amount = seatReservationAuth.result.price;
|
|
265
|
+
const amount = seatReservationAuth.result?.price;
|
|
263
266
|
console.log('金額は', amount);
|
|
267
|
+
if (typeof amount !== 'number') {
|
|
268
|
+
throw new Error('seatReservationAuth.result.price undefined');
|
|
269
|
+
}
|
|
264
270
|
|
|
265
271
|
console.log('authorizing any payment...');
|
|
266
272
|
const anyPaymentAuth = await paymentService.authorizeAnyPayment({
|
|
@@ -5,6 +5,7 @@ declare type IKeyOfProjection = keyof factory.seller.ISeller | '_id';
|
|
|
5
5
|
declare type IProjection = {
|
|
6
6
|
[key in IKeyOfProjection]?: 0 | 1;
|
|
7
7
|
};
|
|
8
|
+
declare type IUpdatingSeller = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'telephone' | 'typeOf' | 'url'>;
|
|
8
9
|
/**
|
|
9
10
|
* 販売者サービス
|
|
10
11
|
*/
|
|
@@ -12,7 +13,7 @@ export declare class SellerService extends Service<IOptions> {
|
|
|
12
13
|
/**
|
|
13
14
|
* 販売者作成
|
|
14
15
|
*/
|
|
15
|
-
create(params:
|
|
16
|
+
create(params: IUpdatingSeller): Promise<IUpdatingSeller>;
|
|
16
17
|
/**
|
|
17
18
|
* 販売者取得
|
|
18
19
|
*/
|
|
@@ -21,19 +22,19 @@ export declare class SellerService extends Service<IOptions> {
|
|
|
21
22
|
qs: {
|
|
22
23
|
$projection: IProjection;
|
|
23
24
|
};
|
|
24
|
-
}): Promise<factory.seller.ISeller
|
|
25
|
+
}): Promise<Omit<factory.seller.ISeller, 'paymentAccepted'>>;
|
|
25
26
|
/**
|
|
26
27
|
* 販売者検索
|
|
27
28
|
*/
|
|
28
29
|
search(params: Omit<factory.seller.ISearchConditions, 'project' | 'id'> & {
|
|
29
30
|
$projection: IProjection;
|
|
30
|
-
}): Promise<ISearchResult<Omit<factory.seller.ISeller, 'hasMerchantReturnPolicy' | 'makesOffer'>[]>>;
|
|
31
|
+
}): Promise<ISearchResult<Omit<factory.seller.ISeller, 'hasMerchantReturnPolicy' | 'makesOffer' | 'paymentAccepted'>[]>>;
|
|
31
32
|
/**
|
|
32
33
|
* 販売者編集
|
|
33
34
|
*/
|
|
34
35
|
update(params: {
|
|
35
36
|
id: string;
|
|
36
|
-
attributes:
|
|
37
|
+
attributes: IUpdatingSeller & IUnset;
|
|
37
38
|
}): Promise<void>;
|
|
38
39
|
/**
|
|
39
40
|
* 販売者削除
|
|
@@ -68,8 +69,23 @@ export declare class SellerService extends Service<IOptions> {
|
|
|
68
69
|
qs: {
|
|
69
70
|
limit?: number;
|
|
70
71
|
page?: number;
|
|
72
|
+
codeValue?: {
|
|
73
|
+
$eq?: string;
|
|
74
|
+
};
|
|
71
75
|
};
|
|
72
|
-
}): Promise<
|
|
76
|
+
}): Promise<IPaymentAccepted[]>;
|
|
77
|
+
createPaymentAccepted(params: {
|
|
78
|
+
codeValue: string;
|
|
79
|
+
seller: {
|
|
80
|
+
id: string;
|
|
81
|
+
};
|
|
82
|
+
}): Promise<void>;
|
|
83
|
+
deletePaymentAccepted(params: {
|
|
84
|
+
codeValue: string;
|
|
85
|
+
seller: {
|
|
86
|
+
id: string;
|
|
87
|
+
};
|
|
88
|
+
}): Promise<void>;
|
|
73
89
|
/**
|
|
74
90
|
* 提供決済サービス検索
|
|
75
91
|
*/
|
|
@@ -50,6 +50,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50
50
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
54
|
+
var t = {};
|
|
55
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
56
|
+
t[p] = s[p];
|
|
57
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
58
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
59
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
60
|
+
t[p[i]] = s[p[i]];
|
|
61
|
+
}
|
|
62
|
+
return t;
|
|
63
|
+
};
|
|
53
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
65
|
exports.SellerService = void 0;
|
|
55
66
|
var http_status_1 = require("http-status");
|
|
@@ -208,18 +219,45 @@ var SellerService = /** @class */ (function (_super) {
|
|
|
208
219
|
qs: params.qs,
|
|
209
220
|
expectedStatusCodes: [http_status_1.OK]
|
|
210
221
|
})
|
|
211
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
223
|
+
return [2 /*return*/, response.json()];
|
|
224
|
+
}); }); })];
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
SellerService.prototype.createPaymentAccepted = function (params) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
230
|
+
var seller, body;
|
|
231
|
+
return __generator(this, function (_a) {
|
|
232
|
+
switch (_a.label) {
|
|
233
|
+
case 0:
|
|
234
|
+
seller = params.seller, body = __rest(params, ["seller"]);
|
|
235
|
+
return [4 /*yield*/, this.fetch({
|
|
236
|
+
uri: "/sellers/" + seller.id + "/paymentAccepted",
|
|
237
|
+
method: 'POST',
|
|
238
|
+
body: body,
|
|
239
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
240
|
+
})];
|
|
241
|
+
case 1:
|
|
242
|
+
_a.sent();
|
|
243
|
+
return [2 /*return*/];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
SellerService.prototype.deletePaymentAccepted = function (params) {
|
|
249
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
250
|
+
return __generator(this, function (_a) {
|
|
251
|
+
switch (_a.label) {
|
|
252
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
253
|
+
uri: "/sellers/" + params.seller.id + "/paymentAccepted/" + params.codeValue,
|
|
254
|
+
method: 'DELETE',
|
|
255
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
256
|
+
})];
|
|
257
|
+
case 1:
|
|
258
|
+
_a.sent();
|
|
259
|
+
return [2 /*return*/];
|
|
260
|
+
}
|
|
223
261
|
});
|
|
224
262
|
});
|
|
225
263
|
};
|
|
@@ -61,12 +61,17 @@ export declare class OfferService extends Service {
|
|
|
61
61
|
purpose: factory.action.authorize.offer.product.IPurpose;
|
|
62
62
|
}): Promise<IAuthorizeProductOfferResult>;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* 興行オファー承認
|
|
65
65
|
*/
|
|
66
66
|
authorizeEventService(params: {
|
|
67
|
-
object: factory.action.authorize.offer.
|
|
68
|
-
purpose: factory.action.authorize.offer.
|
|
67
|
+
object: factory.action.authorize.offer.eventService.IObjectWithoutDetail<factory.service.webAPI.Identifier.Chevre>;
|
|
68
|
+
purpose: factory.action.authorize.offer.eventService.IPurpose;
|
|
69
|
+
}, options?: {
|
|
69
70
|
expectsMinimalResponse?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* オファー未指定(座席をホールドするのみ)
|
|
73
|
+
*/
|
|
74
|
+
noOfferSpecified?: boolean;
|
|
70
75
|
}): Promise<IAuthorizeEventServiceResult | IMinimalAuthorizeEventServiceResult>;
|
|
71
76
|
/**
|
|
72
77
|
* オファー承認取消
|
|
@@ -88,7 +93,7 @@ export declare class OfferService extends Service {
|
|
|
88
93
|
*/
|
|
89
94
|
authorizeEventServiceByCOA(params: {
|
|
90
95
|
object: {
|
|
91
|
-
acceptedOffer: factory.action.authorize.offer.
|
|
96
|
+
acceptedOffer: factory.action.authorize.offer.eventService.IAcceptedOfferBeforeAuthorize4COA[];
|
|
92
97
|
event: {
|
|
93
98
|
id: string;
|
|
94
99
|
};
|
|
@@ -98,8 +103,8 @@ export declare class OfferService extends Service {
|
|
|
98
103
|
*/
|
|
99
104
|
purpose: string;
|
|
100
105
|
result: {
|
|
101
|
-
requestBody: factory.action.authorize.offer.
|
|
102
|
-
responseBody: factory.action.authorize.offer.
|
|
106
|
+
requestBody: factory.action.authorize.offer.eventService.IRequestBody<factory.service.webAPI.Identifier.COA>;
|
|
107
|
+
responseBody: factory.action.authorize.offer.eventService.IResponseBody<factory.service.webAPI.Identifier.COA>;
|
|
103
108
|
};
|
|
104
109
|
}): Promise<IAuthorizeCOAEventServiceResult>;
|
|
105
110
|
/**
|
|
@@ -131,7 +136,7 @@ export declare class OfferService extends Service {
|
|
|
131
136
|
*/
|
|
132
137
|
id: string;
|
|
133
138
|
object: {
|
|
134
|
-
acceptedOffer: factory.action.authorize.offer.
|
|
139
|
+
acceptedOffer: factory.action.authorize.offer.eventService.IAcceptedOfferBeforeAuthorize4COA[];
|
|
135
140
|
event: {
|
|
136
141
|
id: string;
|
|
137
142
|
};
|
|
@@ -116,9 +116,9 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
116
116
|
});
|
|
117
117
|
};
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* 興行オファー承認
|
|
120
120
|
*/
|
|
121
|
-
OfferService.prototype.authorizeEventService = function (params) {
|
|
121
|
+
OfferService.prototype.authorizeEventService = function (params, options) {
|
|
122
122
|
return __awaiter(this, void 0, void 0, function () {
|
|
123
123
|
var _this = this;
|
|
124
124
|
return __generator(this, function (_a) {
|
|
@@ -127,7 +127,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
127
127
|
method: 'POST',
|
|
128
128
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
129
129
|
body: params,
|
|
130
|
-
qs: __assign({}, (
|
|
130
|
+
qs: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.expectsMinimalResponse) === true) ? { expectsMinimalResponse: '1' } : undefined), ((options === null || options === void 0 ? void 0 : options.noOfferSpecified) === true) ? { noOfferSpecified: '1' } : undefined)
|
|
131
131
|
})
|
|
132
132
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
133
133
|
return [2 /*return*/, response.json()];
|
|
@@ -37,10 +37,10 @@ export interface IStartParams {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export declare type IStartPlaceOrderResult = Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'expires' | 'startDate' | 'id'>;
|
|
40
|
-
declare type IAuthorizeCOAEventServiceAction = factory.action.authorize.offer.
|
|
41
|
-
declare type IAuthorizeCOAEventServiceActionObject = factory.action.authorize.offer.
|
|
42
|
-
declare type IAuthorizeCOAEventServiceActionResult = factory.action.authorize.offer.
|
|
43
|
-
declare type IAuthorizeCOAEventServiceActionResponseBody = factory.action.authorize.offer.
|
|
40
|
+
declare type IAuthorizeCOAEventServiceAction = factory.action.authorize.offer.eventService.IAction<factory.service.webAPI.Identifier.COA>;
|
|
41
|
+
declare type IAuthorizeCOAEventServiceActionObject = factory.action.authorize.offer.eventService.IObject<factory.service.webAPI.Identifier.COA>;
|
|
42
|
+
declare type IAuthorizeCOAEventServiceActionResult = factory.action.authorize.offer.eventService.IResult<factory.service.webAPI.Identifier.COA>;
|
|
43
|
+
declare type IAuthorizeCOAEventServiceActionResponseBody = factory.action.authorize.offer.eventService.IResponseBody<factory.service.webAPI.Identifier.COA>;
|
|
44
44
|
declare type IOptimizedAuthorizeCOAEventServiceActionResult = Pick<IAuthorizeCOAEventServiceActionResult, 'price' | 'priceCurrency' | 'amount'> & {
|
|
45
45
|
responseBody: Pick<IAuthorizeCOAEventServiceActionResponseBody, 'tmpReserveNum'>;
|
|
46
46
|
};
|
|
@@ -48,7 +48,7 @@ export declare type IAuthorizeCOAEventServiceResult = Pick<IAuthorizeCOAEventSer
|
|
|
48
48
|
object: Pick<IAuthorizeCOAEventServiceActionObject, 'typeOf' | 'acceptedOffer'>;
|
|
49
49
|
result: IOptimizedAuthorizeCOAEventServiceActionResult;
|
|
50
50
|
};
|
|
51
|
-
declare type IAuthorizeEventServiceAction = factory.action.authorize.offer.
|
|
51
|
+
declare type IAuthorizeEventServiceAction = factory.action.authorize.offer.eventService.IAction<factory.service.webAPI.Identifier.Chevre>;
|
|
52
52
|
export declare type IAuthorizeEventServiceResult = Pick<IAuthorizeEventServiceAction, 'id'> & {
|
|
53
53
|
result?: {
|
|
54
54
|
price?: number;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { IAuthorizeEventServiceResult, IMinimalAuthorizeEventServiceResult } from '../chevreTxn/transaction/placeOrder/factory';
|
|
1
2
|
import * as factory from '../factory';
|
|
2
|
-
import {
|
|
3
|
-
export interface IPurpose {
|
|
4
|
-
typeOf: factory.transactionType;
|
|
5
|
-
id: string;
|
|
6
|
-
}
|
|
3
|
+
import { Service } from '../service';
|
|
7
4
|
interface ISearchConditions {
|
|
8
5
|
limit?: number;
|
|
9
6
|
page?: number;
|
|
@@ -20,7 +17,40 @@ interface ISearchConditions {
|
|
|
20
17
|
export declare class OfferService extends Service {
|
|
21
18
|
/**
|
|
22
19
|
* オファー検索
|
|
20
|
+
* 管理者権限が必要です
|
|
21
|
+
*/
|
|
22
|
+
search(params: ISearchConditions): Promise<factory.unitPriceOffer.IUnitPriceOffer[]>;
|
|
23
|
+
/**
|
|
24
|
+
* 興行オファー承認
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
authorizeEventService(params: {
|
|
27
|
+
object: factory.action.authorize.offer.eventService.IObjectWithoutDetail<factory.service.webAPI.Identifier.Chevre>;
|
|
28
|
+
purpose: factory.action.authorize.offer.eventService.IPurpose;
|
|
29
|
+
}, options?: {
|
|
30
|
+
/**
|
|
31
|
+
* レスポンスを最小化する
|
|
32
|
+
* Promise<IMinimalAuthorizeEventServiceResult>が返ります
|
|
33
|
+
*/
|
|
34
|
+
expectsMinimalResponse?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* オファー未指定(座席をホールドするのみ)
|
|
37
|
+
*/
|
|
38
|
+
noOfferSpecified?: boolean;
|
|
39
|
+
}): Promise<IAuthorizeEventServiceResult | IMinimalAuthorizeEventServiceResult>;
|
|
40
|
+
/**
|
|
41
|
+
* 興行オファー承認取消
|
|
42
|
+
*/
|
|
43
|
+
voidAuthorization(params: {
|
|
44
|
+
/**
|
|
45
|
+
* アクションID
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
object: {
|
|
49
|
+
itemOffered: {
|
|
50
|
+
typeOf: factory.product.ProductType.EventService;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
purpose: factory.action.authorize.offer.eventService.IPurpose;
|
|
54
|
+
}): Promise<void>;
|
|
25
55
|
}
|
|
26
56
|
export {};
|
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
17
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -50,9 +61,21 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50
61
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
62
|
}
|
|
52
63
|
};
|
|
64
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
65
|
+
var t = {};
|
|
66
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
67
|
+
t[p] = s[p];
|
|
68
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
69
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
70
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
71
|
+
t[p[i]] = s[p[i]];
|
|
72
|
+
}
|
|
73
|
+
return t;
|
|
74
|
+
};
|
|
53
75
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
76
|
exports.OfferService = void 0;
|
|
55
77
|
var http_status_1 = require("http-status");
|
|
78
|
+
var factory = require("../factory");
|
|
56
79
|
var service_1 = require("../service");
|
|
57
80
|
/**
|
|
58
81
|
* オファーサービス
|
|
@@ -64,6 +87,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
64
87
|
}
|
|
65
88
|
/**
|
|
66
89
|
* オファー検索
|
|
90
|
+
* 管理者権限が必要です
|
|
67
91
|
*/
|
|
68
92
|
OfferService.prototype.search = function (
|
|
69
93
|
// params: factory.offer.ISearchConditions
|
|
@@ -77,18 +101,52 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
77
101
|
qs: params,
|
|
78
102
|
expectedStatusCodes: [http_status_1.OK]
|
|
79
103
|
})
|
|
80
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
104
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
105
|
+
return [2 /*return*/, response.json()];
|
|
106
|
+
}); }); })];
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* 興行オファー承認
|
|
112
|
+
*/
|
|
113
|
+
OfferService.prototype.authorizeEventService = function (params, options) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
+
var _this = this;
|
|
116
|
+
return __generator(this, function (_a) {
|
|
117
|
+
return [2 /*return*/, this.fetch({
|
|
118
|
+
uri: "/offers/" + factory.product.ProductType.EventService + "/authorize",
|
|
119
|
+
method: 'POST',
|
|
120
|
+
expectedStatusCodes: [http_status_1.CREATED],
|
|
121
|
+
body: params,
|
|
122
|
+
qs: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.expectsMinimalResponse) === true) ? { expectsMinimalResponse: '1' } : undefined), ((options === null || options === void 0 ? void 0 : options.noOfferSpecified) === true) ? { noOfferSpecified: '1' } : undefined)
|
|
123
|
+
})
|
|
124
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
125
|
+
return [2 /*return*/, response.json()];
|
|
126
|
+
}); }); })];
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* 興行オファー承認取消
|
|
132
|
+
*/
|
|
133
|
+
OfferService.prototype.voidAuthorization = function (params) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
var id, object, body;
|
|
136
|
+
return __generator(this, function (_a) {
|
|
137
|
+
switch (_a.label) {
|
|
138
|
+
case 0:
|
|
139
|
+
id = params.id, object = params.object, body = __rest(params, ["id", "object"]);
|
|
140
|
+
return [4 /*yield*/, this.fetch({
|
|
141
|
+
uri: "/offers/" + object.itemOffered.typeOf + "/authorize/" + id + "/void",
|
|
142
|
+
method: 'PUT',
|
|
143
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
144
|
+
body: body
|
|
145
|
+
})];
|
|
146
|
+
case 1:
|
|
147
|
+
_a.sent();
|
|
148
|
+
return [2 /*return*/];
|
|
149
|
+
}
|
|
92
150
|
});
|
|
93
151
|
});
|
|
94
152
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IConfirmResult, IMinimalConfirmResult, IStartParams, IStartPlaceOrderResult } from '../../chevreTxn/transaction/placeOrder/factory';
|
|
2
2
|
import * as factory from '../../factory';
|
|
3
3
|
import { Service } from '../../service';
|
|
4
4
|
import { ISetProfileParams, TransactionService } from '../transaction';
|
|
@@ -11,28 +11,6 @@ export declare class PlaceOrderTransactionService extends Service implements Tra
|
|
|
11
11
|
* 取引開始
|
|
12
12
|
*/
|
|
13
13
|
start(params: IStartParams): Promise<IStartPlaceOrderResult>;
|
|
14
|
-
/**
|
|
15
|
-
* イベントオファー承認
|
|
16
|
-
*/
|
|
17
|
-
authorizeSeatReservation(params: {
|
|
18
|
-
object: factory.action.authorize.offer.seatReservation.IObjectWithoutDetail<factory.service.webAPI.Identifier.Chevre>;
|
|
19
|
-
purpose: factory.action.authorize.offer.seatReservation.IPurpose;
|
|
20
|
-
/**
|
|
21
|
-
* レスポンスを最小化する
|
|
22
|
-
* Promise<IMinimalAuthorizeEventServiceResult>が返ります
|
|
23
|
-
*/
|
|
24
|
-
expectsMinimalResponse?: boolean;
|
|
25
|
-
}): Promise<IAuthorizeEventServiceResult | IMinimalAuthorizeEventServiceResult>;
|
|
26
|
-
/**
|
|
27
|
-
* イベントオファー承認取消
|
|
28
|
-
*/
|
|
29
|
-
voidSeatReservation(params: {
|
|
30
|
-
/**
|
|
31
|
-
* アクションID
|
|
32
|
-
*/
|
|
33
|
-
id: string;
|
|
34
|
-
purpose: factory.action.authorize.offer.seatReservation.IPurpose;
|
|
35
|
-
}): Promise<void>;
|
|
36
14
|
/**
|
|
37
15
|
* 取引人プロフィール変更
|
|
38
16
|
*/
|
|
@@ -95,45 +95,6 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
/**
|
|
99
|
-
* イベントオファー承認
|
|
100
|
-
*/
|
|
101
|
-
PlaceOrderTransactionService.prototype.authorizeSeatReservation = function (params) {
|
|
102
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
var _this = this;
|
|
104
|
-
return __generator(this, function (_a) {
|
|
105
|
-
return [2 /*return*/, this.fetch({
|
|
106
|
-
uri: "/transactions/" + this.typeOf + "/" + params.purpose.id + "/actions/authorize/offer/seatReservation",
|
|
107
|
-
method: 'POST',
|
|
108
|
-
expectedStatusCodes: [http_status_1.CREATED],
|
|
109
|
-
body: params.object,
|
|
110
|
-
qs: __assign({}, (params.expectsMinimalResponse === true) ? { expectsMinimalResponse: '1' } : undefined)
|
|
111
|
-
})
|
|
112
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
113
|
-
return [2 /*return*/, response.json()];
|
|
114
|
-
}); }); })];
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* イベントオファー承認取消
|
|
120
|
-
*/
|
|
121
|
-
PlaceOrderTransactionService.prototype.voidSeatReservation = function (params) {
|
|
122
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
-
return __generator(this, function (_a) {
|
|
124
|
-
switch (_a.label) {
|
|
125
|
-
case 0: return [4 /*yield*/, this.fetch({
|
|
126
|
-
uri: "/transactions/" + this.typeOf + "/" + params.purpose.id + "/actions/authorize/offer/seatReservation/" + params.id + "/cancel",
|
|
127
|
-
method: 'PUT',
|
|
128
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
129
|
-
})];
|
|
130
|
-
case 1:
|
|
131
|
-
_a.sent();
|
|
132
|
-
return [2 /*return*/];
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
98
|
/**
|
|
138
99
|
* 取引人プロフィール変更
|
|
139
100
|
*/
|
|
@@ -12,7 +12,7 @@ interface IAppliesToSurfrock {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class PlaceOrderTransaction4ssktsService extends PlaceOrderTransactionService {
|
|
14
14
|
/**
|
|
15
|
-
* COA
|
|
15
|
+
* COA興行オファー承認
|
|
16
16
|
*/
|
|
17
17
|
createSeatReservationAuthorization(params: {
|
|
18
18
|
object: {
|
|
@@ -25,26 +25,26 @@ export declare class PlaceOrderTransaction4ssktsService extends PlaceOrderTransa
|
|
|
25
25
|
/**
|
|
26
26
|
* オファー
|
|
27
27
|
*/
|
|
28
|
-
acceptedOffer: factory.action.authorize.offer.
|
|
28
|
+
acceptedOffer: factory.action.authorize.offer.eventService.IAcceptedOfferWithoutDetail4COA[];
|
|
29
29
|
/**
|
|
30
30
|
* 会員オファーの場合の適用MovieTicketを指定する
|
|
31
31
|
*/
|
|
32
32
|
appliesToSurfrock?: IAppliesToSurfrock;
|
|
33
33
|
};
|
|
34
|
-
purpose: factory.action.authorize.offer.
|
|
34
|
+
purpose: factory.action.authorize.offer.eventService.IPurpose;
|
|
35
35
|
}): Promise<IAuthorizeCOAEventServiceResult>;
|
|
36
36
|
/**
|
|
37
|
-
* COA
|
|
37
|
+
* COA興行オファー承認取消
|
|
38
38
|
*/
|
|
39
39
|
cancelSeatReservationAuthorization(params: {
|
|
40
40
|
/**
|
|
41
41
|
* アクションID
|
|
42
42
|
*/
|
|
43
43
|
id: string;
|
|
44
|
-
purpose: factory.action.authorize.offer.
|
|
44
|
+
purpose: factory.action.authorize.offer.eventService.IPurpose;
|
|
45
45
|
}): Promise<void>;
|
|
46
46
|
/**
|
|
47
|
-
* COA
|
|
47
|
+
* COA興行オファー承認の供給情報を変更する
|
|
48
48
|
* 完了ステータスの承認アクションに対して券種変更する際に使用
|
|
49
49
|
*/
|
|
50
50
|
changeSeatReservationOffers(params: {
|
|
@@ -62,13 +62,13 @@ export declare class PlaceOrderTransaction4ssktsService extends PlaceOrderTransa
|
|
|
62
62
|
/**
|
|
63
63
|
* オファー
|
|
64
64
|
*/
|
|
65
|
-
acceptedOffer: factory.action.authorize.offer.
|
|
65
|
+
acceptedOffer: factory.action.authorize.offer.eventService.IAcceptedOfferWithoutDetail4COA[];
|
|
66
66
|
/**
|
|
67
67
|
* 会員オファーの場合の適用MovieTicketを指定する
|
|
68
68
|
*/
|
|
69
69
|
appliesToSurfrock?: IAppliesToSurfrock;
|
|
70
70
|
};
|
|
71
|
-
purpose: factory.action.authorize.offer.
|
|
71
|
+
purpose: factory.action.authorize.offer.eventService.IPurpose;
|
|
72
72
|
}): Promise<IAuthorizeCOAEventServiceResult>;
|
|
73
73
|
}
|
|
74
74
|
export {};
|
|
@@ -77,7 +77,7 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
|
|
|
77
77
|
// super(options)/* istanbul ignore next */;
|
|
78
78
|
// }
|
|
79
79
|
/**
|
|
80
|
-
* COA
|
|
80
|
+
* COA興行オファー承認
|
|
81
81
|
*/
|
|
82
82
|
PlaceOrderTransaction4ssktsService.prototype.createSeatReservationAuthorization = function (params) {
|
|
83
83
|
var _a, _b;
|
|
@@ -99,7 +99,7 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
|
|
|
99
99
|
});
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
|
-
* COA
|
|
102
|
+
* COA興行オファー承認取消
|
|
103
103
|
*/
|
|
104
104
|
PlaceOrderTransaction4ssktsService.prototype.cancelSeatReservationAuthorization = function (params) {
|
|
105
105
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -118,7 +118,7 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
|
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
120
|
/**
|
|
121
|
-
* COA
|
|
121
|
+
* COA興行オファー承認の供給情報を変更する
|
|
122
122
|
* 完了ステータスの承認アクションに対して券種変更する際に使用
|
|
123
123
|
*/
|
|
124
124
|
PlaceOrderTransaction4ssktsService.prototype.changeSeatReservationOffers = function (params) {
|
package/lib/bundle.js
CHANGED
|
@@ -10617,6 +10617,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
10617
10617
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
10618
10618
|
}
|
|
10619
10619
|
};
|
|
10620
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
10621
|
+
var t = {};
|
|
10622
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
10623
|
+
t[p] = s[p];
|
|
10624
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
10625
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
10626
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
10627
|
+
t[p[i]] = s[p[i]];
|
|
10628
|
+
}
|
|
10629
|
+
return t;
|
|
10630
|
+
};
|
|
10620
10631
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10621
10632
|
exports.SellerService = void 0;
|
|
10622
10633
|
var http_status_1 = require("http-status");
|
|
@@ -10775,18 +10786,45 @@ var SellerService = /** @class */ (function (_super) {
|
|
|
10775
10786
|
qs: params.qs,
|
|
10776
10787
|
expectedStatusCodes: [http_status_1.OK]
|
|
10777
10788
|
})
|
|
10778
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10789
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
10790
|
+
return [2 /*return*/, response.json()];
|
|
10791
|
+
}); }); })];
|
|
10792
|
+
});
|
|
10793
|
+
});
|
|
10794
|
+
};
|
|
10795
|
+
SellerService.prototype.createPaymentAccepted = function (params) {
|
|
10796
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10797
|
+
var seller, body;
|
|
10798
|
+
return __generator(this, function (_a) {
|
|
10799
|
+
switch (_a.label) {
|
|
10800
|
+
case 0:
|
|
10801
|
+
seller = params.seller, body = __rest(params, ["seller"]);
|
|
10802
|
+
return [4 /*yield*/, this.fetch({
|
|
10803
|
+
uri: "/sellers/" + seller.id + "/paymentAccepted",
|
|
10804
|
+
method: 'POST',
|
|
10805
|
+
body: body,
|
|
10806
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
10807
|
+
})];
|
|
10808
|
+
case 1:
|
|
10809
|
+
_a.sent();
|
|
10810
|
+
return [2 /*return*/];
|
|
10811
|
+
}
|
|
10812
|
+
});
|
|
10813
|
+
});
|
|
10814
|
+
};
|
|
10815
|
+
SellerService.prototype.deletePaymentAccepted = function (params) {
|
|
10816
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10817
|
+
return __generator(this, function (_a) {
|
|
10818
|
+
switch (_a.label) {
|
|
10819
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
10820
|
+
uri: "/sellers/" + params.seller.id + "/paymentAccepted/" + params.codeValue,
|
|
10821
|
+
method: 'DELETE',
|
|
10822
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
10823
|
+
})];
|
|
10824
|
+
case 1:
|
|
10825
|
+
_a.sent();
|
|
10826
|
+
return [2 /*return*/];
|
|
10827
|
+
}
|
|
10790
10828
|
});
|
|
10791
10829
|
});
|
|
10792
10830
|
};
|
|
@@ -12228,9 +12266,9 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
12228
12266
|
});
|
|
12229
12267
|
};
|
|
12230
12268
|
/**
|
|
12231
|
-
*
|
|
12269
|
+
* 興行オファー承認
|
|
12232
12270
|
*/
|
|
12233
|
-
OfferService.prototype.authorizeEventService = function (params) {
|
|
12271
|
+
OfferService.prototype.authorizeEventService = function (params, options) {
|
|
12234
12272
|
return __awaiter(this, void 0, void 0, function () {
|
|
12235
12273
|
var _this = this;
|
|
12236
12274
|
return __generator(this, function (_a) {
|
|
@@ -12239,7 +12277,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
12239
12277
|
method: 'POST',
|
|
12240
12278
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
12241
12279
|
body: params,
|
|
12242
|
-
qs: __assign({}, (
|
|
12280
|
+
qs: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.expectsMinimalResponse) === true) ? { expectsMinimalResponse: '1' } : undefined), ((options === null || options === void 0 ? void 0 : options.noOfferSpecified) === true) ? { noOfferSpecified: '1' } : undefined)
|
|
12243
12281
|
})
|
|
12244
12282
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
12245
12283
|
return [2 /*return*/, response.json()];
|
|
@@ -14750,6 +14788,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14750
14788
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14751
14789
|
};
|
|
14752
14790
|
})();
|
|
14791
|
+
var __assign = (this && this.__assign) || function () {
|
|
14792
|
+
__assign = Object.assign || function(t) {
|
|
14793
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14794
|
+
s = arguments[i];
|
|
14795
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
14796
|
+
t[p] = s[p];
|
|
14797
|
+
}
|
|
14798
|
+
return t;
|
|
14799
|
+
};
|
|
14800
|
+
return __assign.apply(this, arguments);
|
|
14801
|
+
};
|
|
14753
14802
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14754
14803
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14755
14804
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -14786,9 +14835,21 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14786
14835
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
14787
14836
|
}
|
|
14788
14837
|
};
|
|
14838
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14839
|
+
var t = {};
|
|
14840
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14841
|
+
t[p] = s[p];
|
|
14842
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
14843
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
14844
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
14845
|
+
t[p[i]] = s[p[i]];
|
|
14846
|
+
}
|
|
14847
|
+
return t;
|
|
14848
|
+
};
|
|
14789
14849
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14790
14850
|
exports.OfferService = void 0;
|
|
14791
14851
|
var http_status_1 = require("http-status");
|
|
14852
|
+
var factory = require("../factory");
|
|
14792
14853
|
var service_1 = require("../service");
|
|
14793
14854
|
/**
|
|
14794
14855
|
* オファーサービス
|
|
@@ -14800,6 +14861,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
14800
14861
|
}
|
|
14801
14862
|
/**
|
|
14802
14863
|
* オファー検索
|
|
14864
|
+
* 管理者権限が必要です
|
|
14803
14865
|
*/
|
|
14804
14866
|
OfferService.prototype.search = function (
|
|
14805
14867
|
// params: factory.offer.ISearchConditions
|
|
@@ -14813,18 +14875,52 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
14813
14875
|
qs: params,
|
|
14814
14876
|
expectedStatusCodes: [http_status_1.OK]
|
|
14815
14877
|
})
|
|
14816
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14878
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
14879
|
+
return [2 /*return*/, response.json()];
|
|
14880
|
+
}); }); })];
|
|
14881
|
+
});
|
|
14882
|
+
});
|
|
14883
|
+
};
|
|
14884
|
+
/**
|
|
14885
|
+
* 興行オファー承認
|
|
14886
|
+
*/
|
|
14887
|
+
OfferService.prototype.authorizeEventService = function (params, options) {
|
|
14888
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
14889
|
+
var _this = this;
|
|
14890
|
+
return __generator(this, function (_a) {
|
|
14891
|
+
return [2 /*return*/, this.fetch({
|
|
14892
|
+
uri: "/offers/" + factory.product.ProductType.EventService + "/authorize",
|
|
14893
|
+
method: 'POST',
|
|
14894
|
+
expectedStatusCodes: [http_status_1.CREATED],
|
|
14895
|
+
body: params,
|
|
14896
|
+
qs: __assign(__assign({}, ((options === null || options === void 0 ? void 0 : options.expectsMinimalResponse) === true) ? { expectsMinimalResponse: '1' } : undefined), ((options === null || options === void 0 ? void 0 : options.noOfferSpecified) === true) ? { noOfferSpecified: '1' } : undefined)
|
|
14897
|
+
})
|
|
14898
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
14899
|
+
return [2 /*return*/, response.json()];
|
|
14900
|
+
}); }); })];
|
|
14901
|
+
});
|
|
14902
|
+
});
|
|
14903
|
+
};
|
|
14904
|
+
/**
|
|
14905
|
+
* 興行オファー承認取消
|
|
14906
|
+
*/
|
|
14907
|
+
OfferService.prototype.voidAuthorization = function (params) {
|
|
14908
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
14909
|
+
var id, object, body;
|
|
14910
|
+
return __generator(this, function (_a) {
|
|
14911
|
+
switch (_a.label) {
|
|
14912
|
+
case 0:
|
|
14913
|
+
id = params.id, object = params.object, body = __rest(params, ["id", "object"]);
|
|
14914
|
+
return [4 /*yield*/, this.fetch({
|
|
14915
|
+
uri: "/offers/" + object.itemOffered.typeOf + "/authorize/" + id + "/void",
|
|
14916
|
+
method: 'PUT',
|
|
14917
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
14918
|
+
body: body
|
|
14919
|
+
})];
|
|
14920
|
+
case 1:
|
|
14921
|
+
_a.sent();
|
|
14922
|
+
return [2 /*return*/];
|
|
14923
|
+
}
|
|
14828
14924
|
});
|
|
14829
14925
|
});
|
|
14830
14926
|
};
|
|
@@ -14832,7 +14928,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
14832
14928
|
}(service_1.Service));
|
|
14833
14929
|
exports.OfferService = OfferService;
|
|
14834
14930
|
|
|
14835
|
-
},{"../service":85,"http-status":316}],93:[function(require,module,exports){
|
|
14931
|
+
},{"../factory":80,"../service":85,"http-status":316}],93:[function(require,module,exports){
|
|
14836
14932
|
"use strict";
|
|
14837
14933
|
var __extends = (this && this.__extends) || (function () {
|
|
14838
14934
|
var extendStatics = function (d, b) {
|
|
@@ -16839,45 +16935,6 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
|
|
|
16839
16935
|
});
|
|
16840
16936
|
});
|
|
16841
16937
|
};
|
|
16842
|
-
/**
|
|
16843
|
-
* イベントオファー承認
|
|
16844
|
-
*/
|
|
16845
|
-
PlaceOrderTransactionService.prototype.authorizeSeatReservation = function (params) {
|
|
16846
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
16847
|
-
var _this = this;
|
|
16848
|
-
return __generator(this, function (_a) {
|
|
16849
|
-
return [2 /*return*/, this.fetch({
|
|
16850
|
-
uri: "/transactions/" + this.typeOf + "/" + params.purpose.id + "/actions/authorize/offer/seatReservation",
|
|
16851
|
-
method: 'POST',
|
|
16852
|
-
expectedStatusCodes: [http_status_1.CREATED],
|
|
16853
|
-
body: params.object,
|
|
16854
|
-
qs: __assign({}, (params.expectsMinimalResponse === true) ? { expectsMinimalResponse: '1' } : undefined)
|
|
16855
|
-
})
|
|
16856
|
-
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16857
|
-
return [2 /*return*/, response.json()];
|
|
16858
|
-
}); }); })];
|
|
16859
|
-
});
|
|
16860
|
-
});
|
|
16861
|
-
};
|
|
16862
|
-
/**
|
|
16863
|
-
* イベントオファー承認取消
|
|
16864
|
-
*/
|
|
16865
|
-
PlaceOrderTransactionService.prototype.voidSeatReservation = function (params) {
|
|
16866
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
16867
|
-
return __generator(this, function (_a) {
|
|
16868
|
-
switch (_a.label) {
|
|
16869
|
-
case 0: return [4 /*yield*/, this.fetch({
|
|
16870
|
-
uri: "/transactions/" + this.typeOf + "/" + params.purpose.id + "/actions/authorize/offer/seatReservation/" + params.id + "/cancel",
|
|
16871
|
-
method: 'PUT',
|
|
16872
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
16873
|
-
})];
|
|
16874
|
-
case 1:
|
|
16875
|
-
_a.sent();
|
|
16876
|
-
return [2 /*return*/];
|
|
16877
|
-
}
|
|
16878
|
-
});
|
|
16879
|
-
});
|
|
16880
|
-
};
|
|
16881
16938
|
/**
|
|
16882
16939
|
* 取引人プロフィール変更
|
|
16883
16940
|
*/
|
|
@@ -17060,7 +17117,7 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
|
|
|
17060
17117
|
// super(options)/* istanbul ignore next */;
|
|
17061
17118
|
// }
|
|
17062
17119
|
/**
|
|
17063
|
-
* COA
|
|
17120
|
+
* COA興行オファー承認
|
|
17064
17121
|
*/
|
|
17065
17122
|
PlaceOrderTransaction4ssktsService.prototype.createSeatReservationAuthorization = function (params) {
|
|
17066
17123
|
var _a, _b;
|
|
@@ -17082,7 +17139,7 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
|
|
|
17082
17139
|
});
|
|
17083
17140
|
};
|
|
17084
17141
|
/**
|
|
17085
|
-
* COA
|
|
17142
|
+
* COA興行オファー承認取消
|
|
17086
17143
|
*/
|
|
17087
17144
|
PlaceOrderTransaction4ssktsService.prototype.cancelSeatReservationAuthorization = function (params) {
|
|
17088
17145
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -17101,7 +17158,7 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
|
|
|
17101
17158
|
});
|
|
17102
17159
|
};
|
|
17103
17160
|
/**
|
|
17104
|
-
* COA
|
|
17161
|
+
* COA興行オファー承認の供給情報を変更する
|
|
17105
17162
|
* 完了ステータスの承認アクションに対して券種変更する際に使用
|
|
17106
17163
|
*/
|
|
17107
17164
|
PlaceOrderTransaction4ssktsService.prototype.changeSeatReservationOffers = function (params) {
|
|
@@ -19305,10 +19362,6 @@ var ObjectType;
|
|
|
19305
19362
|
})(ObjectType = exports.ObjectType || (exports.ObjectType = {}));
|
|
19306
19363
|
|
|
19307
19364
|
},{}],133:[function(require,module,exports){
|
|
19308
|
-
arguments[4][9][0].apply(exports,arguments)
|
|
19309
|
-
},{"dup":9}],134:[function(require,module,exports){
|
|
19310
|
-
arguments[4][9][0].apply(exports,arguments)
|
|
19311
|
-
},{"dup":9}],135:[function(require,module,exports){
|
|
19312
19365
|
"use strict";
|
|
19313
19366
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19314
19367
|
exports.ObjectType = void 0;
|
|
@@ -19317,7 +19370,11 @@ var ObjectType;
|
|
|
19317
19370
|
ObjectType["SeatReservation"] = "SeatReservation";
|
|
19318
19371
|
})(ObjectType = exports.ObjectType || (exports.ObjectType = {}));
|
|
19319
19372
|
|
|
19320
|
-
},{}],
|
|
19373
|
+
},{}],134:[function(require,module,exports){
|
|
19374
|
+
arguments[4][9][0].apply(exports,arguments)
|
|
19375
|
+
},{"dup":9}],135:[function(require,module,exports){
|
|
19376
|
+
arguments[4][9][0].apply(exports,arguments)
|
|
19377
|
+
},{"dup":9}],136:[function(require,module,exports){
|
|
19321
19378
|
"use strict";
|
|
19322
19379
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19323
19380
|
exports.ServiceIdentifier = exports.ResultType = void 0;
|
|
@@ -20219,9 +20276,9 @@ exports.cognito = cognito;
|
|
|
20219
20276
|
exports.waiter = waiter;
|
|
20220
20277
|
var AccountFactory = require("./account");
|
|
20221
20278
|
var PointAwardAuthorizeActionFactory = require("./action/authorize/award/point");
|
|
20279
|
+
var AuthorizeEventServiceOfferActionFactory = require("./action/authorize/offer/eventService");
|
|
20222
20280
|
var AuthorizeMoneyTransferOfferActionFactory = require("./action/authorize/offer/moneyTransfer");
|
|
20223
20281
|
var AuthorizeProductOfferActionFactory = require("./action/authorize/offer/product");
|
|
20224
|
-
var AuthorizeSeatReservationOfferActionFactory = require("./action/authorize/offer/seatReservation");
|
|
20225
20282
|
var AuthorizeAnyPaymentActionFactory = require("./action/authorize/paymentMethod/any");
|
|
20226
20283
|
var CancelReservationActionFactory = require("./action/cancel/reservation");
|
|
20227
20284
|
var CheckMovieTicketActionFactory = require("./action/check/paymentMethod/movieTicket");
|
|
@@ -20382,11 +20439,11 @@ var action;
|
|
|
20382
20439
|
// tslint:disable-next-line:no-shadowed-variable
|
|
20383
20440
|
var offer;
|
|
20384
20441
|
(function (offer) {
|
|
20442
|
+
offer.eventService = AuthorizeEventServiceOfferActionFactory;
|
|
20385
20443
|
// tslint:disable-next-line:no-shadowed-variable
|
|
20386
20444
|
offer.moneyTransfer = AuthorizeMoneyTransferOfferActionFactory;
|
|
20387
20445
|
// tslint:disable-next-line:no-shadowed-variable
|
|
20388
20446
|
offer.product = AuthorizeProductOfferActionFactory;
|
|
20389
|
-
offer.seatReservation = AuthorizeSeatReservationOfferActionFactory;
|
|
20390
20447
|
})(offer = authorize.offer || (authorize.offer = {}));
|
|
20391
20448
|
})(authorize = action.authorize || (action.authorize = {}));
|
|
20392
20449
|
var cancel;
|
|
@@ -20637,7 +20694,7 @@ exports.assetTransactionType = assetTransactionType_1.AssetTransactionType;
|
|
|
20637
20694
|
exports.unitCode = unitCode_1.UnitCode;
|
|
20638
20695
|
exports.unitPriceOffer = UnitPriceOfferFactory;
|
|
20639
20696
|
|
|
20640
|
-
},{"./account":124,"./accountTitle":130,"./accountType":131,"./action/authorize/award/point":132,"./action/authorize/offer/
|
|
20697
|
+
},{"./account":124,"./accountTitle":130,"./accountType":131,"./action/authorize/award/point":132,"./action/authorize/offer/eventService":133,"./action/authorize/offer/moneyTransfer":134,"./action/authorize/offer/product":135,"./action/authorize/paymentMethod/any":136,"./action/cancel/reservation":137,"./action/check/paymentMethod/movieTicket":138,"./action/check/token":139,"./action/consume/use/reservation":140,"./action/interact/confirm/moneyTransfer":141,"./action/interact/confirm/pay":142,"./action/interact/confirm/registerService":143,"./action/interact/confirm/reservation":144,"./action/interact/inform":145,"./action/interact/register/service":146,"./action/reserve":147,"./action/trade/order":148,"./action/trade/pay":149,"./action/trade/refund":150,"./action/transfer/give/pointAward":151,"./action/transfer/moneyTransfer":152,"./action/transfer/return/moneyTransfer":153,"./action/transfer/return/order":154,"./action/transfer/return/paymentMethod":155,"./action/transfer/return/pointAward":156,"./action/transfer/return/reserveTransaction":157,"./action/transfer/send/message/email":158,"./action/transfer/send/order":159,"./action/update/delete/member":160,"./actionStatusType":161,"./actionType":162,"./additionalProperty":163,"./assetTransaction/cancelReservation":164,"./assetTransaction/moneyTransfer":165,"./assetTransaction/pay":166,"./assetTransaction/refund":167,"./assetTransaction/registerService":168,"./assetTransaction/reserve":169,"./assetTransactionType":170,"./authorization":171,"./categoryCode":172,"./clientUser":173,"./cognito":174,"./creativeWork/comment":175,"./creativeWork/message/email":176,"./creativeWork/movie":177,"./creativeWork/softwareApplication/webApplication":178,"./creativeWorkType":179,"./customer":180,"./encodingFormat":181,"./errorCode":193,"./errors":194,"./event/anyEvent":195,"./event/screeningEvent":196,"./event/screeningEventSeries":197,"./eventStatusType":198,"./eventType":199,"./iam":200,"./invoice":202,"./itemAvailability":203,"./language":204,"./merchantReturnPolicy":205,"./monetaryAmount":206,"./offer":207,"./offer/aggregateOffer":208,"./offerCatalog":209,"./offerItemCondition":210,"./offerType":211,"./order":212,"./orderStatus":213,"./organization":214,"./organizationType":215,"./ownershipInfo":216,"./paymentMethod/paymentCard/creditCard":217,"./paymentMethod/paymentCard/movieTicket":218,"./paymentStatusType":219,"./permit":220,"./person":221,"./personType":222,"./place/busStop":223,"./place/movieTheater":224,"./place/screeningRoom":225,"./place/screeningRoomSection":226,"./place/seat":227,"./placeType":228,"./priceCurrency":229,"./priceSpecification/unitPriceSpecification":230,"./priceSpecificationType":231,"./product":232,"./programMembership":233,"./project":234,"./propertyValue":235,"./propertyValue/locationFeatureSpecification":236,"./qualitativeValue":237,"./quantitativeValue":238,"./report/accountingReport":239,"./reservation/busReservation":240,"./reservation/event":241,"./reservationStatusType":242,"./reservationType":243,"./seller":244,"./service/paymentService":245,"./service/webAPI":246,"./sortType":247,"./task/accountMoneyTransfer":248,"./task/aggregateScreeningEvent":249,"./task/aggregateUseActionsOnEvent":250,"./task/cancelAccountMoneyTransfer":251,"./task/cancelMoneyTransfer":252,"./task/cancelPendingReservation":253,"./task/cancelReservation":254,"./task/createEvent":255,"./task/deleteTransaction":256,"./task/importEventCapacitiesFromCOA":257,"./task/importEventsFromCOA":258,"./task/importOffersFromCOA":259,"./task/moneyTransfer":260,"./task/onAuthorizationCreated":261,"./task/onEventChanged":262,"./task/onResourceUpdated":263,"./task/pay":264,"./task/refund":265,"./task/registerService":266,"./task/reserve":267,"./task/sendEmailMessage":268,"./task/syncScreeningRooms":269,"./task/triggerWebhook":270,"./task/useReservation":271,"./task/voidPayment":272,"./taskName":273,"./taskStatus":274,"./thing":275,"./transaction/moneyTransfer":276,"./transaction/placeOrder":277,"./transaction/returnOrder":278,"./transactionStatusType":279,"./transactionTasksExportationStatus":280,"./transactionType":281,"./trip/busTrip":282,"./tripType":283,"./unitCode":284,"./unitPriceOffer":285,"@waiter/factory":301}],202:[function(require,module,exports){
|
|
20641
20698
|
arguments[4][9][0].apply(exports,arguments)
|
|
20642
20699
|
},{"dup":9}],203:[function(require,module,exports){
|
|
20643
20700
|
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "5.2.0-alpha.
|
|
3
|
+
"version": "5.2.0-alpha.5",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"watchify": "^3.11.1"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@chevre/factory": "4.343.0-alpha.
|
|
100
|
+
"@chevre/factory": "4.343.0-alpha.4",
|
|
101
101
|
"debug": "^3.2.6",
|
|
102
102
|
"http-status": "^1.4.2",
|
|
103
103
|
"idtoken-verifier": "^2.0.3",
|