@cinerino/sdk 3.151.0 → 3.152.0-alpha.1

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.
@@ -1,7 +1,6 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
2
  import * as moment from 'moment';
3
3
  import * as client from '../../../lib/index';
4
- // import { auth } from '../auth/clientCredentials';
5
4
  import * as auth from '../auth/auth';
6
5
 
7
6
  const project = { id: String(process.env.PROJECT_ID) };
@@ -16,20 +15,22 @@ const profile = {
16
15
  // 所有MovieTicket
17
16
  const movieTickets = [
18
17
  {
19
- typeOf: 'NewMembershipCoupon', // 決済方法区分
20
- identifier: '12345',
21
- accessCode: '12345'
18
+ // typeOf: 'NewMembershipCoupon', // 決済方法区分
19
+ typeOf: 'SurfRock', // 決済方法区分
20
+ identifier: '9077497068',
21
+ accessCode: '364'
22
22
  }
23
23
  ];
24
- const screeningEvent = { id: '12099100020230317301220' };
24
+ const screeningEvent = { id: '12099100020230326301220' };
25
25
  const selectedSeat = {
26
26
  seatSection: ' ',
27
- seatNumber: 'p-23'
27
+ seatNumber: 'p-20'
28
28
  };
29
29
  const ticketCode = '3900001';
30
30
  // const ticketCode = '10';
31
31
 
32
- const paymentServiceId: string = '641178b11b5485000bc67eb7';
32
+ // const paymentServiceId: string = '641178b11b5485000bc67eb7';
33
+ const paymentServiceId: string = '620f4e9afb4626000b812b05';
33
34
 
34
35
  // tslint:disable-next-line:max-func-body-length
35
36
  async function main() {
@@ -70,46 +71,6 @@ async function main() {
70
71
 
71
72
  await wait(2000);
72
73
 
73
- console.log('authorizing eventService offer...');
74
- const seatReservationAuth = await placeOrder4ssktsService.createSeatReservationAuthorization({
75
- object: {
76
- appliesToSurfrock: {
77
- identifier: movieTickets[0].identifier,
78
- serviceOutput: { typeOf: movieTickets[0].typeOf }
79
- },
80
- event: {
81
- id: screeningEvent.id
82
- },
83
- acceptedOffer: [
84
- {
85
- seatSection: selectedSeat.seatSection,
86
- seatNumber: selectedSeat.seatNumber,
87
- ticketInfo: {
88
- mvtkNum: '',
89
- ticketCode,
90
- mvtkAppPrice: 0,
91
- addGlasses: 0,
92
- kbnEisyahousiki: '00',
93
- mvtkKbnDenshiken: '00',
94
- mvtkKbnMaeuriken: '00',
95
- mvtkKbnKensyu: '00',
96
- mvtkSalesPrice: 0,
97
- ticketCount: 1,
98
- usePoint: 6,
99
- kbnMgtk: ''
100
- }
101
- }
102
- ]
103
- },
104
- purpose: { id: transaction.id, typeOf: transaction.typeOf }
105
- });
106
- console.log('eventService offer authorized', seatReservationAuth.id);
107
-
108
- const amount = seatReservationAuth.result.price;
109
- console.log('amount:', amount);
110
-
111
- await wait(2000);
112
-
113
74
  // MovieTicket認証
114
75
  const checkMovieTicketAction = await paymentService.checkMovieTicket({
115
76
  object: {
@@ -136,7 +97,8 @@ async function main() {
136
97
  },
137
98
  purpose: { id: transaction.id, typeOf: transaction.typeOf }
138
99
  });
139
- console.log('movie ticket:', checkMovieTicketAction);
100
+ console.log('checkMovieTicketAction:', checkMovieTicketAction);
101
+ console.log('purchaseNumberAuthResult.knyknrNoInfoOut:', checkMovieTicketAction.purchaseNumberAuthResult.knyknrNoInfoOut);
140
102
  const checkMovieTicketActionResult = checkMovieTicketAction;
141
103
 
142
104
  const availableMovieTickets = checkMovieTicketActionResult.movieTickets
@@ -163,7 +125,7 @@ async function main() {
163
125
  identifier: movieTicket.identifier,
164
126
  accessCode: movieTicket.accessCode,
165
127
  category: { codeValue: '' }, // 情報空でよし
166
- serviceType: movieTicket.serviceType, // 情報空でよし
128
+ serviceType: movieTicket.serviceType,
167
129
  serviceOutput: {
168
130
  reservationFor: {
169
131
  typeOf: client.factory.eventType.ScreeningEvent,
@@ -188,6 +150,46 @@ async function main() {
188
150
 
189
151
  await wait(2000);
190
152
 
153
+ console.log('authorizing eventService offer...');
154
+ const seatReservationAuth = await placeOrder4ssktsService.createSeatReservationAuthorization({
155
+ object: {
156
+ appliesToSurfrock: {
157
+ identifier: movieTickets[0].identifier,
158
+ serviceOutput: { typeOf: movieTickets[0].typeOf }
159
+ },
160
+ event: {
161
+ id: screeningEvent.id
162
+ },
163
+ acceptedOffer: [
164
+ {
165
+ seatSection: selectedSeat.seatSection,
166
+ seatNumber: selectedSeat.seatNumber,
167
+ ticketInfo: {
168
+ mvtkNum: '',
169
+ ticketCode,
170
+ mvtkAppPrice: 0,
171
+ addGlasses: 0,
172
+ kbnEisyahousiki: '00',
173
+ mvtkKbnDenshiken: '00',
174
+ mvtkKbnMaeuriken: '00',
175
+ mvtkKbnKensyu: '00',
176
+ mvtkSalesPrice: 0,
177
+ ticketCount: 1,
178
+ usePoint: 6,
179
+ kbnMgtk: ''
180
+ }
181
+ }
182
+ ]
183
+ },
184
+ purpose: { id: transaction.id, typeOf: transaction.typeOf }
185
+ });
186
+ console.log('eventService offer authorized', seatReservationAuth.id);
187
+
188
+ const amount = seatReservationAuth.result.price;
189
+ console.log('amount:', amount);
190
+
191
+ await wait(2000);
192
+
191
193
  console.log('setting customer profile...');
192
194
  await placeOrderService.setProfile({
193
195
  id: transaction.id,
@@ -117,7 +117,7 @@ export declare class OfferService extends Service {
117
117
  id: string;
118
118
  };
119
119
  };
120
- purpose: factory.action.authorize.offer.seatReservation.IPurpose;
120
+ purpose: factory.action.authorize.offer.seatReservation.IPurpose | string;
121
121
  result: {
122
122
  requestBody: factory.action.authorize.offer.seatReservation.IRequestBody<factory.service.webAPI.Identifier.COA>;
123
123
  responseBody: factory.action.authorize.offer.seatReservation.IResponseBody<factory.service.webAPI.Identifier.COA>;
@@ -134,7 +134,7 @@ export declare class OfferService extends Service {
134
134
  * 承認アクションID
135
135
  */
136
136
  id: string;
137
- purpose: IPurpose;
137
+ purpose: factory.action.authorize.offer.seatReservation.IPurpose | string;
138
138
  }): Promise<{
139
139
  theaterCode?: string;
140
140
  dateJouei?: string;
@@ -163,6 +163,6 @@ export declare class OfferService extends Service {
163
163
  id: string;
164
164
  };
165
165
  };
166
- purpose: factory.action.authorize.offer.seatReservation.IPurpose;
166
+ purpose: factory.action.authorize.offer.seatReservation.IPurpose | string;
167
167
  }): Promise<IAuthorizeCOAEventServiceResult>;
168
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.151.0",
3
+ "version": "3.152.0-alpha.1",
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.307.0",
100
+ "@chevre/factory": "4.308.0-alpha.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",