@cinerino/sdk 13.2.0 → 13.3.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.
@@ -3,6 +3,7 @@ import * as client from '../../../../lib/index';
3
3
  import * as auth from '../../auth/authAsAdmin';
4
4
 
5
5
  const project = { id: String(process.env.PROJECT_ID) };
6
+ const SELLER_ID = '59d20831e53ebc2b4e774466';
6
7
 
7
8
  const profile = {
8
9
  email: <string>process.env.TEST_PROFILE_EMAIL,
@@ -30,21 +31,21 @@ async function main() {
30
31
  auth: authClient
31
32
  })).createPlaceOrderTransactionInstance({
32
33
  project,
33
- seller: { id: '' }
34
+ seller: { id: SELLER_ID }
34
35
  });
35
36
  const offerService = await (await client.loadChevreTxn({
36
37
  endpoint: <string>process.env.CHEVRE_ENDPOINT_TXN,
37
38
  auth: authClient
38
39
  })).createOfferInstance({
39
40
  project,
40
- seller: { id: '' }
41
+ seller: { id: SELLER_ID }
41
42
  });
42
43
  const paymentService = await (await client.loadChevrePay({
43
- endpoint: <string>process.env.CHEVRE_ENDPOINT_TXN,
44
+ endpoint: <string>process.env.CHEVRE_ENDPOINT_PAY,
44
45
  auth: authClient
45
46
  })).createPaymentInstance({
46
47
  project,
47
- seller: { id: '' }
48
+ seller: { id: SELLER_ID }
48
49
  });
49
50
 
50
51
  // 販売劇場検索
@@ -1,6 +1,6 @@
1
1
  // tslint:disable:no-implicit-dependencies no-console
2
- import * as client from '../../../lib/index';
3
- import * as authAsAdmin from '../auth/authAsAdmin';
2
+ import * as client from '../../../../lib/index';
3
+ import * as authAsAdmin from '../../auth/authAsAdmin';
4
4
 
5
5
  const project = { id: String(process.env.PROJECT_ID) };
6
6
 
@@ -10,16 +10,17 @@ async function main() {
10
10
  const loginTicket = authClient.verifyIdToken({});
11
11
  console.log('username is', loginTicket.getUsername());
12
12
 
13
- const orderService = await (await client.loadCloudAdmin({
13
+ const reservationService = await (await client.loadCloudAdmin({
14
14
  endpoint: <string>process.env.API_ADMIN_ENDPOINT,
15
15
  auth: authClient
16
- })).createOrderInstance({
16
+ })).createReservationInstance({
17
17
  project: project,
18
18
  seller: { id: '59d20831e53ebc2b4e774466' }
19
19
  });
20
- const { data } = await orderService.search({
20
+ const { data } = await reservationService.search({
21
21
  limit: 10,
22
- page: 1
22
+ page: 1,
23
+ typeOf: client.factory.reservationType.EventReservation
23
24
  });
24
25
  console.log(data);
25
26
  }
@@ -88,7 +88,7 @@ export function authorizeCreditCardAsyncForcibly(params: {
88
88
  }
89
89
 
90
90
  // エラーが存在すれば、これ以上待機する価値はなし
91
- if (authorizeAction.error !== undefined) {
91
+ if (authorizeAction.error !== undefined && authorizeAction.error.message !== '') {
92
92
  error = authorizeAction.error;
93
93
  break;
94
94
  }
@@ -68,6 +68,12 @@ export class PaymentAsyncForceService {
68
68
  object: IAuthorizeMovieTicketObject;
69
69
  purpose: IPurpose;
70
70
  checkedActionId: string;
71
+ instrumentOptions?: {
72
+ /**
73
+ * 対応決済方法オファーIDリスト
74
+ */
75
+ acceptedPaymentMethodOfferIds?: string[];
76
+ };
71
77
  }): Promise<{ id: string }> {
72
78
  // 決済承認タスク作成
73
79
  const authorizeTask = await this.paymentService.authorizeMovieTicketAsync(
@@ -19,23 +19,6 @@ const creditCard: client.factory.paymentMethod.paymentCard.creditCard.IUnchecked
19
19
  holderName: 'AA AA'
20
20
  };
21
21
 
22
- type ISellerMakesOffer = Omit<client.factory.event.screeningEvent.ISellerMakesOffer, 'availableAtOrFrom'> & {
23
- availableAtOrFrom?: client.factory.event.screeningEvent.IOfferAvailableAtOrFrom
24
- | client.factory.event.screeningEvent.IOfferAvailableAtOrFrom[];
25
- };
26
- type ISeller = Omit<client.factory.event.screeningEvent.ISeller, 'makesOffer'> & {
27
- makesOffer: ISellerMakesOffer[];
28
- };
29
- type IScreeningEventOffer = Omit<client.factory.event.screeningEvent.IOffer, 'seller'> & {
30
- seller: ISeller;
31
- };
32
- type IScreeningEventExtensibleOffer = Omit<client.factory.event.screeningEvent.IExtensibleEventOffer, 'seller'> & {
33
- seller: ISeller;
34
- };
35
- type IEvent = Omit<client.factory.event.screeningEvent.IEvent, 'offers'> & {
36
- offers?: IScreeningEventOffer | IScreeningEventExtensibleOffer;
37
- };
38
-
39
22
  // tslint:disable-next-line:max-func-body-length
40
23
  async function main() {
41
24
  const eventService = new (await client.loadService()).Event({
@@ -91,7 +74,7 @@ async function main() {
91
74
  });
92
75
  console.log(searchScreeningEventsResult.data.length, 'events found');
93
76
 
94
- const availableEvents = <IEvent[]>searchScreeningEventsResult.data;
77
+ const availableEvents = searchScreeningEventsResult.data;
95
78
  if (availableEvents.length === 0) {
96
79
  throw new Error('No available events');
97
80
  }
@@ -120,7 +103,7 @@ async function main() {
120
103
 
121
104
  // イベント決定
122
105
  // tslint:disable-next-line:insecure-random
123
- const screeningEvent: IEvent = availableEvents[Math.floor(availableEvents.length * Math.random())];
106
+ const screeningEvent = availableEvents[Math.floor(availableEvents.length * Math.random())];
124
107
 
125
108
  // 施設コンテンツ参照
126
109
  const eventSeries = (await eventService.searchEventSeries({
@@ -0,0 +1,248 @@
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
+ import { PaymentAsyncForceService } from './paymentAsyncForce';
6
+
7
+ const project = { id: String(process.env.PROJECT_ID) };
8
+ const { EVENT_ID } = process.env;
9
+ const paymentMethodType = 'MovieTicket';
10
+
11
+ // 取引に使用する決済カード
12
+ const movieTicket = {
13
+ accessCode: '3896',
14
+ identifier: '2412171273'
15
+ };
16
+ const SEAT_NUMBER = 'A-1';
17
+ const SEAT_SECTION = 'Default';
18
+
19
+ /**
20
+ * 決済サービスID
21
+ */
22
+ const paymentServiceId = '5f9a52994f3709000abe6417';
23
+
24
+ // tslint:disable-next-line:max-func-body-length
25
+ async function main() {
26
+ const eventService = new (await client.loadService()).Event({
27
+ endpoint: <string>process.env.API_ENDPOINT,
28
+ auth: await auth(),
29
+ project,
30
+ seller: { id: '' }
31
+ });
32
+
33
+ const sellerService = new (await client.loadService()).Seller({
34
+ endpoint: <string>process.env.API_ENDPOINT,
35
+ auth: await auth(),
36
+ project
37
+ });
38
+
39
+ const placeOrderService = await (await client.loadCloudTxn({
40
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
41
+ auth: await auth()
42
+ })).createPlaceOrderInstance({
43
+ project,
44
+ seller: { id: '' }
45
+ });
46
+
47
+ // 新しい決済サービス
48
+ const paymentService = await (await client.loadCloudPay({
49
+ endpoint: <string>process.env.API_PAY_ENDPOINT,
50
+ auth: await auth(),
51
+ disableAutoRetry: true
52
+ })).createPaymentInstance({
53
+ project,
54
+ seller: { id: '' }
55
+ });
56
+
57
+ // 販売劇場検索
58
+ const searchSellersResult = await sellerService.search({ branchCode: { $eq: '001' } });
59
+ // tslint:disable-next-line:insecure-random
60
+ const seller = searchSellersResult.data[Math.floor(searchSellersResult.data.length * Math.random())];
61
+ if (seller === undefined) {
62
+ throw new Error('No seller');
63
+ }
64
+ console.log('ordering from seller...', (<client.factory.multilingualString>seller.name).ja);
65
+
66
+ // イベント検索
67
+ const searchScreeningEventsResult = await eventService.search({
68
+ typeOf: client.factory.eventType.ScreeningEvent,
69
+ inSessionFrom: moment()
70
+ .toDate(),
71
+ inSessionThrough: moment()
72
+ .add(1, 'week')
73
+ .toDate(),
74
+ eventStatuses: [client.factory.eventStatusType.EventScheduled],
75
+ ...(typeof EVENT_ID === 'string') ? { id: { $eq: EVENT_ID } } : undefined
76
+ });
77
+ console.log(searchScreeningEventsResult.data.length, 'events found');
78
+
79
+ const availableEvents = searchScreeningEventsResult.data;
80
+ if (availableEvents.length === 0) {
81
+ throw new Error('No available events');
82
+ }
83
+
84
+ console.log('starting transaction...');
85
+ const transaction = await placeOrderService.start({
86
+ agent: {
87
+ identifier: [
88
+ { name: 'fromSamples', value: 'true' }
89
+ ]
90
+ },
91
+ seller: { id: String(seller.id) },
92
+ object: {
93
+ // passport: { token: passportToken }
94
+ }
95
+ });
96
+ console.log('transaction started', transaction.id);
97
+
98
+ try {
99
+ const eventIds: string[] = [];
100
+ /**
101
+ * 施設コンテンツの対応決済方法オファーIDリスト
102
+ */
103
+ const acceptedPaymentMethodOfferIds: string[] = [];
104
+
105
+ // イベント決定
106
+ // tslint:disable-next-line:insecure-random
107
+ const screeningEvent = availableEvents[Math.floor(availableEvents.length * Math.random())];
108
+
109
+ // 施設コンテンツ参照
110
+ const eventSeries = (await eventService.searchEventSeries({
111
+ limit: 1,
112
+ page: 1,
113
+ typeOf: client.factory.eventType.ScreeningEventSeries,
114
+ id: { $eq: screeningEvent.superEvent.id }
115
+ })).shift();
116
+ if (eventSeries === undefined) {
117
+ throw new Error('eventSeries not found');
118
+ }
119
+
120
+ console.log('eventSeries.offers?.typeOf ', eventSeries.offers?.typeOf);
121
+ if (eventSeries.offers?.typeOf === client.factory.offerType.AggregateOffer) {
122
+ // 施設コンテンツが対応決済方法管理に依存している場合、対応決済方法オファーを参照
123
+ const acceptedPaymentMethodService = await (await client.loadCloudSearch({
124
+ endpoint: <string>process.env.API_ENDPOINT,
125
+ auth: await auth()
126
+ })).createAcceptedPaymentMethodInstance({
127
+ project,
128
+ seller: { id: String(seller.id) }
129
+ });
130
+ const acceptedPaymentMethods = await acceptedPaymentMethodService.findAcceptedPaymentMethods({
131
+ limit: 10,
132
+ page: 1,
133
+ itemOfferedId: eventSeries.id
134
+ });
135
+ console.log(acceptedPaymentMethods.length, 'acceptedPaymentMethods found.');
136
+ const now = new Date();
137
+ const validAcceptedPaymentMethodOffer = acceptedPaymentMethods.find((acceptedPaymentMethod) => {
138
+ return acceptedPaymentMethod.acceptedPaymentMethod.id === paymentServiceId // 指定の決済サービスに対して
139
+ && moment(acceptedPaymentMethod.validFrom)
140
+ .isSameOrBefore(now) // 有効期間中の
141
+ && moment(acceptedPaymentMethod.validThrough)
142
+ .isSameOrAfter(now); // 有効期間中の
143
+ });
144
+ if (validAcceptedPaymentMethodOffer === undefined) {
145
+ throw new Error('有効な対応決済方法オファーが見つかりません');
146
+ }
147
+ console.log('有効な対応決済方法オファーが見つかりました', validAcceptedPaymentMethodOffer.id, validAcceptedPaymentMethodOffer.identifier);
148
+ acceptedPaymentMethodOfferIds.push(validAcceptedPaymentMethodOffer.id);
149
+ }
150
+
151
+ eventIds.push(screeningEvent.id);
152
+
153
+ await wait(3000);
154
+ console.log('checking movieTickets...');
155
+ const paymentAsyncForce = new PaymentAsyncForceService(paymentService);
156
+ const checkMovieTicketAction = await paymentAsyncForce.checkMovieTicketAsyncForcibly({
157
+ object: {
158
+ id: paymentServiceId,
159
+ paymentMethod: {
160
+ typeOf: paymentMethodType
161
+ },
162
+ movieTickets: [
163
+ {
164
+ accessCode: movieTicket.accessCode,
165
+ identifier: movieTicket.identifier,
166
+ // serviceType: '',
167
+ serviceOutput: {
168
+ reservationFor: {
169
+ typeOf: client.factory.eventType.ScreeningEvent,
170
+ id: screeningEvent.id
171
+ }
172
+ },
173
+ category: { codeValue: '' }
174
+ }
175
+ ],
176
+ seller: { id: String(seller.id) }
177
+ },
178
+ purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
179
+ });
180
+ // tslint:disable-next-line:no-null-keyword
181
+ console.dir(checkMovieTicketAction, { depth: null });
182
+ console.log('movieTickets checked. 有効券枚数:', checkMovieTicketAction.purchaseNumberAuthResult.ykknmiNumSum);
183
+
184
+ // 決済承認
185
+ await wait(3000);
186
+ console.log('authorizing payment...');
187
+ const authorizePaymentAction = await paymentAsyncForce.authorizeMovieTicketAsyncForcibly({
188
+ object: {
189
+ movieTickets: [
190
+ {
191
+ accessCode: movieTicket.accessCode,
192
+ identifier: movieTicket.identifier,
193
+ category: { codeValue: '01' },
194
+ serviceType: '01',
195
+ typeOf: paymentMethodType,
196
+ serviceOutput: {
197
+ reservationFor: {
198
+ typeOf: client.factory.eventType.ScreeningEvent,
199
+ id: screeningEvent.id
200
+ },
201
+ reservedTicket: {
202
+ ticketedSeat: {
203
+ typeOf: client.factory.placeType.Seat,
204
+ seatingType: '',
205
+ seatNumber: SEAT_NUMBER,
206
+ seatRow: '',
207
+ seatSection: SEAT_SECTION
208
+ }
209
+ }
210
+ }
211
+ }
212
+ ],
213
+ paymentMethod: 'MovieTicket',
214
+ issuedThrough: { id: paymentServiceId }
215
+ },
216
+ purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder },
217
+ checkedActionId: checkMovieTicketAction.id,
218
+ instrumentOptions: { acceptedPaymentMethodOfferIds }
219
+ });
220
+ console.log('payment authorized', authorizePaymentAction.id);
221
+
222
+ // tslint:disable-next-line:no-magic-numbers
223
+ await wait(3000);
224
+
225
+ console.log('canceling transaction...');
226
+ await placeOrderService.cancel({ id: transaction.id });
227
+ console.log('transaction canceled.');
228
+
229
+ } catch (error) {
230
+ console.error(error);
231
+
232
+ await wait(3000);
233
+
234
+ console.log('canceling transaction...');
235
+ await placeOrderService.cancel({ id: transaction.id });
236
+ console.log('transaction canceled.');
237
+ }
238
+ }
239
+
240
+ async function wait(waitInMilliseconds: number) {
241
+ return new Promise((resolve) => setTimeout(resolve, waitInMilliseconds));
242
+ }
243
+
244
+ main()
245
+ .then(() => {
246
+ console.log('success!');
247
+ })
248
+ .catch(console.error);
@@ -259,12 +259,14 @@ async function main() {
259
259
  }
260
260
 
261
261
  // wait callback...
262
+ // tslint:disable-next-line:max-func-body-length
262
263
  await new Promise<void>((resolve, reject) => {
263
264
  const rl = readline.createInterface({
264
265
  input: process.stdin,
265
266
  output: process.stdout
266
267
  });
267
268
 
269
+ // tslint:disable-next-line:max-func-body-length
268
270
  rl.question('callback received? y or n:\n', async (answer) => {
269
271
  try {
270
272
  if (answer !== 'y') {
@@ -18,7 +18,7 @@ export declare class ReservationService extends Service {
18
18
  /**
19
19
  * 予約検索
20
20
  */
21
- find<T extends factory.reservationType>(params: Omit<factory.reservation.ISearchConditions<T>, 'project' | 'provider'> & IProjectionSearchConditions<T> & {
21
+ find(params: Omit<factory.reservation.ISearchConditions<factory.reservationType.EventReservation>, 'project' | 'provider'> & IProjectionSearchConditions<factory.reservationType.EventReservation> & {
22
22
  /**
23
23
  * min: 1
24
24
  * max: 20
@@ -28,7 +28,7 @@ export declare class ReservationService extends Service {
28
28
  * min: 1
29
29
  */
30
30
  page: number;
31
- }): Promise<factory.reservation.IReservation<T>[]>;
31
+ }): Promise<factory.reservation.eventReservation.IReservation[]>;
32
32
  /**
33
33
  * 予約を使用する(入場する)
34
34
  */
@@ -2,8 +2,7 @@ import * as factory from '../../factory';
2
2
  import { IOptions, ISearchResult, Service } from '../../service';
3
3
  export declare type ICreditCard = factory.paymentMethod.paymentCard.creditCard.IUncheckedCardRaw | factory.paymentMethod.paymentCard.creditCard.IUncheckedCardTokenized;
4
4
  declare type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
5
- declare type IBusReservation = factory.reservation.IReservation<factory.reservationType.BusReservation>;
6
- declare type IReservationWithDetail = IEventReservation | IBusReservation;
5
+ declare type IReservationWithDetail = IEventReservation;
7
6
  declare type IGoodWithDetail = IReservationWithDetail | factory.permit.IPermit;
8
7
  export declare type IOwnershipInfoWithDetail = Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, 'typeOfGood'> & {
9
8
  typeOfGood: IGoodWithDetail;
@@ -1,8 +1,7 @@
1
1
  import * as factory from '../factory';
2
2
  import { ISearchResult, Service } from '../service';
3
3
  declare type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
4
- declare type IBusReservation = factory.reservation.IReservation<factory.reservationType.BusReservation>;
5
- declare type IReservationWithDetail = IEventReservation | IBusReservation;
4
+ declare type IReservationWithDetail = IEventReservation;
6
5
  declare type IGoodWithDetail = IReservationWithDetail | factory.permit.IPermit;
7
6
  export declare type IOwnershipInfo = (factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood> | (Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, 'typeOfGood'> & {
8
7
  typeOfGood: IGoodWithDetail;
@@ -2,8 +2,7 @@ import * as factory from '../../factory';
2
2
  import { IOptions, ISearchResult, Service } from '../../service';
3
3
  export declare type ICreditCard = factory.paymentMethod.paymentCard.creditCard.IUncheckedCardRaw | factory.paymentMethod.paymentCard.creditCard.IUncheckedCardTokenized;
4
4
  declare type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
5
- declare type IBusReservation = factory.reservation.IReservation<factory.reservationType.BusReservation>;
6
- declare type IReservationWithDetail = IEventReservation | IBusReservation;
5
+ declare type IReservationWithDetail = IEventReservation;
7
6
  declare type IGoodWithDetail = IReservationWithDetail | factory.permit.IPermit;
8
7
  export declare type IOwnershipInfoWithDetail = Omit<factory.ownershipInfo.IOwnershipInfo<factory.ownershipInfo.IGood>, 'typeOfGood'> & {
9
8
  typeOfGood: IGoodWithDetail;
@@ -61,7 +61,6 @@ import type { SellerReturnPolicyService } from './chevreConsole/sellerReturnPoli
61
61
  import type { TaskService } from './chevreConsole/task';
62
62
  import type { TicketService } from './chevreConsole/ticket';
63
63
  import type { TokenService } from './chevreConsole/token';
64
- import type { MoneyTransferTransactionService } from './chevreConsole/transaction/moneyTransfer';
65
64
  import type { PlaceOrderTransactionService } from './chevreConsole/transaction/placeOrder';
66
65
  import type { ReturnOrderTransactionService } from './chevreConsole/transaction/returnOrder';
67
66
  import type { TransactionNumberService } from './chevreConsole/transactionNumber';
@@ -514,13 +513,6 @@ export declare namespace service {
514
513
  * 取引サービス
515
514
  */
516
515
  namespace transaction {
517
- /**
518
- * 通貨転送取引サービス
519
- */
520
- type MoneyTransfer = MoneyTransferTransactionService;
521
- namespace MoneyTransfer {
522
- let svc: typeof MoneyTransferTransactionService | undefined;
523
- }
524
516
  /**
525
517
  * 注文取引サービス
526
518
  */
@@ -633,7 +625,6 @@ export declare class ChevreConsole {
633
625
  createRegisterServiceAssetTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<RegisterServiceAssetTransactionService>;
634
626
  createReserveAssetTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReserveAssetTransactionService>;
635
627
  createTokenInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<TokenService>;
636
- createMoneyTransferTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MoneyTransferTransactionService>;
637
628
  createPlaceOrderTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceOrderTransactionService>;
638
629
  createReturnOrderTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReturnOrderTransactionService>;
639
630
  createTransactionNumberInstance(params: Pick<IOptions, 'project'>): Promise<TransactionNumberService>;
@@ -251,9 +251,6 @@ var service;
251
251
  */
252
252
  var transaction;
253
253
  (function (transaction) {
254
- var MoneyTransfer;
255
- (function (MoneyTransfer) {
256
- })(MoneyTransfer = transaction.MoneyTransfer || (transaction.MoneyTransfer = {}));
257
254
  var PlaceOrder;
258
255
  (function (PlaceOrder) {
259
256
  })(PlaceOrder = transaction.PlaceOrder || (transaction.PlaceOrder = {}));
@@ -1340,24 +1337,6 @@ var ChevreConsole = /** @class */ (function () {
1340
1337
  });
1341
1338
  });
1342
1339
  };
1343
- ChevreConsole.prototype.createMoneyTransferTransactionInstance = function (params) {
1344
- return __awaiter(this, void 0, void 0, function () {
1345
- var _a;
1346
- return __generator(this, function (_b) {
1347
- switch (_b.label) {
1348
- case 0:
1349
- if (!(service.transaction.MoneyTransfer.svc === undefined)) return [3 /*break*/, 2];
1350
- _a = service.transaction.MoneyTransfer;
1351
- return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreConsole/transaction/moneyTransfer'); })];
1352
- case 1:
1353
- _a.svc =
1354
- (_b.sent()).MoneyTransferTransactionService;
1355
- _b.label = 2;
1356
- case 2: return [2 /*return*/, new service.transaction.MoneyTransfer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
1357
- }
1358
- });
1359
- });
1360
- };
1361
1340
  ChevreConsole.prototype.createPlaceOrderTransactionInstance = function (params) {
1362
1341
  return __awaiter(this, void 0, void 0, function () {
1363
1342
  var _a;
@@ -1,6 +1,5 @@
1
1
  import { IAdditionalOptions, IOptions, IUnset as IUnsetOnService } from './service';
2
2
  import type { OfferService } from './chevreTxn/offer';
3
- import type { MoneyTransferTransactionService } from './chevreTxn/transaction/moneyTransfer';
4
3
  import type { PlaceOrderTransactionService } from './chevreTxn/transaction/placeOrder';
5
4
  import type { ReturnOrderTransactionService } from './chevreTxn/transaction/returnOrder';
6
5
  export declare namespace service {
@@ -16,13 +15,6 @@ export declare namespace service {
16
15
  * 取引サービス
17
16
  */
18
17
  namespace transaction {
19
- /**
20
- * 通貨転送取引サービス
21
- */
22
- type MoneyTransfer = MoneyTransferTransactionService;
23
- namespace MoneyTransfer {
24
- let svc: typeof MoneyTransferTransactionService | undefined;
25
- }
26
18
  /**
27
19
  * 注文取引サービス
28
20
  */
@@ -46,7 +38,6 @@ export declare class ChevreTxn {
46
38
  options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>;
47
39
  constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>);
48
40
  createOfferInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
49
- createMoneyTransferTransactionInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<MoneyTransferTransactionService>;
50
41
  createPlaceOrderTransactionInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceOrderTransactionService>;
51
42
  createReturnOrderTransactionInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReturnOrderTransactionService>;
52
43
  }
@@ -63,9 +63,6 @@ var service;
63
63
  */
64
64
  var transaction;
65
65
  (function (transaction) {
66
- var MoneyTransfer;
67
- (function (MoneyTransfer) {
68
- })(MoneyTransfer = transaction.MoneyTransfer || (transaction.MoneyTransfer = {}));
69
66
  var PlaceOrder;
70
67
  (function (PlaceOrder) {
71
68
  })(PlaceOrder = transaction.PlaceOrder || (transaction.PlaceOrder = {}));
@@ -98,23 +95,6 @@ var ChevreTxn = /** @class */ (function () {
98
95
  });
99
96
  });
100
97
  };
101
- ChevreTxn.prototype.createMoneyTransferTransactionInstance = function (params) {
102
- return __awaiter(this, void 0, void 0, function () {
103
- var _a;
104
- return __generator(this, function (_b) {
105
- switch (_b.label) {
106
- case 0:
107
- if (!(service.transaction.MoneyTransfer.svc === undefined)) return [3 /*break*/, 2];
108
- _a = service.transaction.MoneyTransfer;
109
- return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreTxn/transaction/moneyTransfer'); })];
110
- case 1:
111
- _a.svc = (_b.sent()).MoneyTransferTransactionService;
112
- _b.label = 2;
113
- case 2: return [2 /*return*/, new service.transaction.MoneyTransfer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: __spreadArray([], (Array.isArray(params.retryableStatusCodes)) ? params.retryableStatusCodes : []) }))];
114
- }
115
- });
116
- });
117
- };
118
98
  ChevreTxn.prototype.createPlaceOrderTransactionInstance = function (params) {
119
99
  return __awaiter(this, void 0, void 0, function () {
120
100
  var _a;
@@ -1,6 +1,7 @@
1
1
  import { ITicket, IUseAction } from '../../chevreConsole/reservation/factory';
2
2
  import * as factory from '../../factory';
3
3
  import { Service } from '../../service';
4
+ declare type IReservationAsFindResult = Pick<factory.reservation.eventReservation.IReservation, 'additionalProperty' | 'additionalTicketText' | 'attended' | 'bookingTime' | 'checkedIn' | 'id' | 'reservationFor' | 'reservationNumber' | 'reservationStatus' | 'reservedTicket' | 'subReservation' | 'underName'>;
4
5
  /**
5
6
  * 予約サービス
6
7
  */
@@ -8,7 +9,7 @@ export declare class ReservationService extends Service {
8
9
  /**
9
10
  * 予約検索
10
11
  */
11
- search<T extends factory.reservationType>(params: Omit<factory.reservation.ISearchConditions<T>, 'project' | 'provider'> & {
12
+ search(params: Omit<factory.reservation.eventReservation.ISearchConditions, 'project' | 'provider'> & {
12
13
  /**
13
14
  * min: 1
14
15
  * max: 20
@@ -19,7 +20,7 @@ export declare class ReservationService extends Service {
19
20
  */
20
21
  page: number;
21
22
  }): Promise<{
22
- data: factory.reservation.IReservation<T>[];
23
+ data: IReservationAsFindResult[];
23
24
  }>;
24
25
  /**
25
26
  * 予約を使用する(入場する)
@@ -72,3 +73,4 @@ export declare class ReservationService extends Service {
72
73
  };
73
74
  }): Promise<void>;
74
75
  }
76
+ export {};