@cinerino/sdk 8.0.0-alpha.3 → 8.0.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.
Files changed (31) hide show
  1. package/example/src/{transaction → cloud/transaction}/paymentAsyncForce.ts +2 -2
  2. package/example/src/cloud/transaction/processPlaceOrderByCreditCard3DS.ts +9 -4
  3. package/example/src/{transaction → cloud/transaction}/processPlaceOrderCOAEventByCreditCard.ts +6 -5
  4. package/example/src/{transaction → cloud/transaction}/processPlaceOrderCOAEventByMovieTicket.ts +6 -5
  5. package/example/src/{transaction → cloud/transaction}/processReturnOrder.ts +6 -5
  6. package/example/src/{transaction → cloud/transaction}/test/lockTransactionTest.ts +6 -5
  7. package/example/src/{transaction → cloud/transaction}/test/rateLimitTest.ts +6 -5
  8. package/lib/abstract/chevreTxn.d.ts +3 -3
  9. package/lib/abstract/chevreTxn.js +9 -4
  10. package/lib/abstract/cinerino/default.d.ts +0 -18
  11. package/lib/abstract/cinerino/default.js +0 -36
  12. package/lib/abstract/cinerino/service/transaction/placeOrder4sskts.d.ts +3 -3
  13. package/lib/abstract/cinerino/service/transaction/placeOrder4sskts.js +6 -3
  14. package/lib/abstract/cloud/admin.js +14 -14
  15. package/lib/abstract/cloud/pay.js +2 -2
  16. package/lib/abstract/cloud/txn/offer.d.ts +1 -2
  17. package/lib/abstract/cloud/txn/offer.js +15 -8
  18. package/lib/abstract/cloud/txn/transaction/placeOrder.d.ts +1 -2
  19. package/lib/abstract/cloud/txn/transaction/placeOrder.js +33 -23
  20. package/lib/abstract/cloud/txn/transaction/returnOrder.d.ts +1 -2
  21. package/lib/abstract/cloud/txn/transaction/returnOrder.js +9 -2
  22. package/lib/abstract/cloud/txn.js +4 -4
  23. package/lib/bundle.js +464 -960
  24. package/package.json +4 -4
  25. package/example/src/transaction/processPlaceOrderByCreditCard3DS.ts +0 -460
  26. package/lib/abstract/cinerino/service/offer.d.ts +0 -41
  27. package/lib/abstract/cinerino/service/offer.js +0 -136
  28. package/lib/abstract/cinerino/service/transaction/placeOrder.d.ts +0 -61
  29. package/lib/abstract/cinerino/service/transaction/placeOrder.js +0 -209
  30. package/lib/abstract/cinerino/service/transaction/returnOrder.d.ts +0 -22
  31. package/lib/abstract/cinerino/service/transaction/returnOrder.js +0 -141
@@ -1,6 +1,6 @@
1
- import { cloudPay, factory } from '../../../lib/index';
1
+ import { cloudPay, factory } from '../../../../lib/index';
2
2
 
3
- import { IAuthorizeMovieTicketObject, IPurpose } from '../../../lib/abstract/chevrePay/payment/factory';
3
+ import { IAuthorizeMovieTicketObject, IPurpose } from '../../../../lib/abstract/chevrePay/payment/factory';
4
4
 
5
5
  type IMinimizedPurchaseNumberAuthResult = Pick<
6
6
  factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult,
@@ -81,7 +81,11 @@ async function main() {
81
81
 
82
82
  console.log('starting transaction...');
83
83
  const transaction = await placeOrderService.start({
84
- agent: {},
84
+ agent: {
85
+ identifier: [
86
+ { name: 'fromSamples', value: 'true' }
87
+ ]
88
+ },
85
89
  seller: { id: String(seller.id) },
86
90
  object: {
87
91
  // passport: { token: passportToken }
@@ -219,9 +223,10 @@ async function authorizeSeatReservationByEvent(params: {
219
223
  seller: { id: '' }
220
224
  });
221
225
 
222
- const offerService = new (await client.loadService()).Offer({
223
- endpoint: <string>process.env.API_ENDPOINT,
224
- auth: await auth(),
226
+ const offerService = await (await client.loadCloudTxn({
227
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
228
+ auth: await auth()
229
+ })).createOfferInstance({
225
230
  project,
226
231
  seller: { id: '' }
227
232
  });
@@ -1,7 +1,7 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
2
  import * as moment from 'moment';
3
- import * as client from '../../../lib/index';
4
- import { auth } from '../auth/clientCredentials';
3
+ import * as client from '../../../../lib/index';
4
+ import { auth } from '../../auth/clientCredentials';
5
5
 
6
6
  const project = { id: String(process.env.PROJECT_ID) };
7
7
 
@@ -38,9 +38,10 @@ async function main() {
38
38
  project
39
39
  });
40
40
 
41
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
42
- endpoint: <string>process.env.API_ENDPOINT,
43
- auth: await auth(),
41
+ const placeOrderService = await (await client.loadCloudTxn({
42
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
43
+ auth: await auth()
44
+ })).createPlaceOrderInstance({
44
45
  project,
45
46
  seller: { id: '' }
46
47
  });
@@ -1,7 +1,7 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
2
  import * as moment from 'moment';
3
- import * as client from '../../../lib/index';
4
- import { auth } from '../auth/clientCredentials';
3
+ import * as client from '../../../../lib/index';
4
+ import { auth } from '../../auth/clientCredentials';
5
5
  import { PaymentAsyncForceService } from './paymentAsyncForce';
6
6
 
7
7
  const project = { id: String(process.env.PROJECT_ID) };
@@ -36,9 +36,10 @@ async function main() {
36
36
  auth: await auth(),
37
37
  project
38
38
  });
39
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
40
- endpoint: <string>process.env.API_ENDPOINT,
41
- auth: await auth(),
39
+ const placeOrderService = await (await client.loadCloudTxn({
40
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
41
+ auth: await auth()
42
+ })).createPlaceOrderInstance({
42
43
  project,
43
44
  seller: { id: '' }
44
45
  });
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * 注文返品プロセス
4
4
  */
5
- import * as client from '../../../lib/index';
6
- import * as auth from '../auth/authAsAdmin';
5
+ import * as client from '../../../../lib/index';
6
+ import * as auth from '../../auth/authAsAdmin';
7
7
 
8
8
  async function main() {
9
9
  // 管理者として操作する場合はこちら
@@ -20,9 +20,10 @@ async function main() {
20
20
  // state: ''
21
21
  // });
22
22
 
23
- const returnOrderService = new (await client.loadService()).txn.ReturnOrder({
24
- endpoint: <string>process.env.API_ENDPOINT,
25
- auth: authClient,
23
+ const returnOrderService = await (await client.loadCloudTxn({
24
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
25
+ auth: authClient
26
+ })).createReturnOrderInstance({
26
27
  project: { id: 'cinerino' },
27
28
  seller: { id: '' }
28
29
  });
@@ -1,6 +1,6 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
- import * as client from '../../../../lib/index';
3
- import { auth as authClient } from '../../auth/clientCredentials';
2
+ import * as client from '../../../../../lib/index';
3
+ import { auth as authClient } from '../../../auth/clientCredentials';
4
4
 
5
5
  const project = { id: String(process.env.PROJECT_ID) };
6
6
 
@@ -18,9 +18,10 @@ async function main() {
18
18
  auth: await authClient(),
19
19
  project
20
20
  });
21
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
22
- endpoint: <string>process.env.API_ENDPOINT,
23
- auth: await authClient(),
21
+ const placeOrderService = await (await client.loadCloudTxn({
22
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
23
+ auth: await authClient()
24
+ })).createPlaceOrderInstance({
24
25
  project,
25
26
  seller: { id: 'xxx' }
26
27
  });
@@ -1,6 +1,6 @@
1
1
  // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
- import * as client from '../../../../lib/index';
3
- import { auth as authClient } from '../../auth/clientCredentials';
2
+ import * as client from '../../../../../lib/index';
3
+ import { auth as authClient } from '../../../auth/clientCredentials';
4
4
 
5
5
  const project = { id: String(process.env.PROJECT_ID) };
6
6
 
@@ -18,9 +18,10 @@ async function main() {
18
18
  auth: await authClient(),
19
19
  project
20
20
  });
21
- const placeOrderService = new (await client.loadService()).txn.PlaceOrder({
22
- endpoint: <string>process.env.API_ENDPOINT,
23
- auth: await authClient(),
21
+ const placeOrderService = await (await client.loadCloudTxn({
22
+ endpoint: <string>process.env.API_TXN_ENDPOINT,
23
+ auth: await authClient()
24
+ })).createPlaceOrderInstance({
24
25
  project,
25
26
  seller: { id: 'xxx' }
26
27
  });
@@ -43,10 +43,10 @@ export declare namespace service {
43
43
  * 取引サービス
44
44
  */
45
45
  export declare class ChevreTxn {
46
- options: Pick<IOptions, 'auth' | 'endpoint'>;
47
- constructor(options: Pick<IOptions, 'auth' | 'endpoint'>);
46
+ options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>;
47
+ constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>);
48
48
  createOfferInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
49
- createMoneyTransferTransactionInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MoneyTransferTransactionService>;
49
+ createMoneyTransferTransactionInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<MoneyTransferTransactionService>;
50
50
  createPlaceOrderTransactionInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<PlaceOrderTransactionService>;
51
51
  createReturnOrderTransactionInstance(params: Pick<IOptions, 'project' | 'retryableStatusCodes'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReturnOrderTransactionService>;
52
52
  }
@@ -46,6 +46,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
47
  }
48
48
  };
49
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
50
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
51
+ to[j] = from[i];
52
+ return to;
53
+ };
49
54
  Object.defineProperty(exports, "__esModule", { value: true });
50
55
  exports.ChevreTxn = exports.service = void 0;
51
56
  var service;
@@ -88,7 +93,7 @@ var ChevreTxn = /** @class */ (function () {
88
93
  case 1:
89
94
  _a.svc = (_b.sent()).OfferService;
90
95
  _b.label = 2;
91
- case 2: return [2 /*return*/, new service.Offer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
96
+ case 2: return [2 /*return*/, new service.Offer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: __spreadArray([], (Array.isArray(params.retryableStatusCodes)) ? params.retryableStatusCodes : []) }))];
92
97
  }
93
98
  });
94
99
  });
@@ -105,7 +110,7 @@ var ChevreTxn = /** @class */ (function () {
105
110
  case 1:
106
111
  _a.svc = (_b.sent()).MoneyTransferTransactionService;
107
112
  _b.label = 2;
108
- case 2: return [2 /*return*/, new service.transaction.MoneyTransfer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
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 : []) }))];
109
114
  }
110
115
  });
111
116
  });
@@ -122,7 +127,7 @@ var ChevreTxn = /** @class */ (function () {
122
127
  case 1:
123
128
  _a.svc = (_b.sent()).PlaceOrderTransactionService;
124
129
  _b.label = 2;
125
- case 2: return [2 /*return*/, new service.transaction.PlaceOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
130
+ case 2: return [2 /*return*/, new service.transaction.PlaceOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: __spreadArray([], (Array.isArray(params.retryableStatusCodes)) ? params.retryableStatusCodes : []) }))];
126
131
  }
127
132
  });
128
133
  });
@@ -139,7 +144,7 @@ var ChevreTxn = /** @class */ (function () {
139
144
  case 1:
140
145
  _a.svc = (_b.sent()).ReturnOrderTransactionService;
141
146
  _b.label = 2;
142
- case 2: return [2 /*return*/, new service.transaction.ReturnOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
147
+ case 2: return [2 /*return*/, new service.transaction.ReturnOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: __spreadArray([], (Array.isArray(params.retryableStatusCodes)) ? params.retryableStatusCodes : []) }))];
143
148
  }
144
149
  });
145
150
  });
@@ -10,7 +10,6 @@ import { CreativeWorkService } from './service/creativeWork';
10
10
  import { DeliveryService } from './service/delivery';
11
11
  import { EmailMessageService } from './service/emailMessage';
12
12
  import { EventService } from './service/event';
13
- import { OfferService } from './service/offer';
14
13
  import { OrderService } from './service/order';
15
14
  import { PermitService } from './service/permit';
16
15
  import { PersonService } from './service/person';
@@ -21,9 +20,7 @@ import { ProductService } from './service/product';
21
20
  import { ReservationService } from './service/reservation';
22
21
  import { SellerService } from './service/seller';
23
22
  import { TokenService } from './service/token';
24
- import { PlaceOrderTransactionService } from './service/transaction/placeOrder';
25
23
  import { PlaceOrderTransaction4ssktsService } from './service/transaction/placeOrder4sskts';
26
- import { ReturnOrderTransactionService } from './service/transaction/returnOrder';
27
24
  /**
28
25
  * サービスモジュール
29
26
  */
@@ -61,11 +58,6 @@ export declare namespace service {
61
58
  */
62
59
  class Event extends EventService {
63
60
  }
64
- /**
65
- * オファーサービス
66
- */
67
- class Offer extends OfferService {
68
- }
69
61
  namespace order {
70
62
  export import factory = OrderServiceFactory;
71
63
  }
@@ -133,21 +125,11 @@ export declare namespace service {
133
125
  namespace placeOrder {
134
126
  export import factory = PlaceOrderTransactionServiceFactory;
135
127
  }
136
- /**
137
- * 注文取引サービス
138
- */
139
- class PlaceOrder extends PlaceOrderTransactionService {
140
- }
141
128
  /**
142
129
  * sskts専用注文取引サービス
143
130
  */
144
131
  class PlaceOrder4sskts extends PlaceOrderTransaction4ssktsService {
145
132
  }
146
- /**
147
- * 返品取引サービス
148
- */
149
- class ReturnOrder extends ReturnOrderTransactionService {
150
- }
151
133
  }
152
134
  /**
153
135
  * 取引サービス
@@ -29,7 +29,6 @@ var creativeWork_1 = require("./service/creativeWork");
29
29
  var delivery_1 = require("./service/delivery");
30
30
  var emailMessage_1 = require("./service/emailMessage");
31
31
  var event_1 = require("./service/event");
32
- var offer_1 = require("./service/offer");
33
32
  var order_1 = require("./service/order");
34
33
  var permit_1 = require("./service/permit");
35
34
  var person_1 = require("./service/person");
@@ -40,9 +39,7 @@ var product_1 = require("./service/product");
40
39
  var reservation_1 = require("./service/reservation");
41
40
  var seller_1 = require("./service/seller");
42
41
  var token_1 = require("./service/token");
43
- var placeOrder_1 = require("./service/transaction/placeOrder");
44
42
  var placeOrder4sskts_1 = require("./service/transaction/placeOrder4sskts");
45
- var returnOrder_1 = require("./service/transaction/returnOrder");
46
43
  /**
47
44
  * サービスモジュール
48
45
  */
@@ -114,17 +111,6 @@ var service;
114
111
  return Event;
115
112
  }(event_1.EventService));
116
113
  service.Event = Event;
117
- /**
118
- * オファーサービス
119
- */
120
- var Offer = /** @class */ (function (_super) {
121
- __extends(Offer, _super);
122
- function Offer() {
123
- return _super !== null && _super.apply(this, arguments) || this;
124
- }
125
- return Offer;
126
- }(offer_1.OfferService));
127
- service.Offer = Offer;
128
114
  var order;
129
115
  (function (order) {
130
116
  // tslint:disable-next-line:no-shadowed-variable
@@ -262,17 +248,6 @@ var service;
262
248
  // tslint:disable-next-line:no-shadowed-variable
263
249
  placeOrder.factory = PlaceOrderTransactionServiceFactory;
264
250
  })(placeOrder = transaction.placeOrder || (transaction.placeOrder = {}));
265
- /**
266
- * 注文取引サービス
267
- */
268
- var PlaceOrder = /** @class */ (function (_super) {
269
- __extends(PlaceOrder, _super);
270
- function PlaceOrder() {
271
- return _super !== null && _super.apply(this, arguments) || this;
272
- }
273
- return PlaceOrder;
274
- }(placeOrder_1.PlaceOrderTransactionService));
275
- transaction.PlaceOrder = PlaceOrder;
276
251
  /**
277
252
  * sskts専用注文取引サービス
278
253
  */
@@ -284,17 +259,6 @@ var service;
284
259
  return PlaceOrder4sskts;
285
260
  }(placeOrder4sskts_1.PlaceOrderTransaction4ssktsService));
286
261
  transaction.PlaceOrder4sskts = PlaceOrder4sskts;
287
- /**
288
- * 返品取引サービス
289
- */
290
- var ReturnOrder = /** @class */ (function (_super) {
291
- __extends(ReturnOrder, _super);
292
- function ReturnOrder() {
293
- return _super !== null && _super.apply(this, arguments) || this;
294
- }
295
- return ReturnOrder;
296
- }(returnOrder_1.ReturnOrderTransactionService));
297
- transaction.ReturnOrder = ReturnOrder;
298
262
  })(transaction = service.transaction || (service.transaction = {}));
299
263
  /**
300
264
  * 取引サービス
@@ -1,7 +1,6 @@
1
1
  import { IAuthorizeCOAEventServiceResult } from '../../../chevreTxc/offer/factory';
2
2
  import * as factory from '../../../factory';
3
- import { IAdditionalOptions, IOptions } from '../../../service';
4
- import { PlaceOrderTransactionService } from './placeOrder';
3
+ import { IAdditionalOptions, IOptions, Service } from '../../../service';
5
4
  interface IAppliesToSurfrock {
6
5
  identifier: string;
7
6
  serviceOutput: {
@@ -11,7 +10,8 @@ interface IAppliesToSurfrock {
11
10
  /**
12
11
  * 注文取引サービス(sskts専用)
13
12
  */
14
- export declare class PlaceOrderTransaction4ssktsService extends PlaceOrderTransactionService {
13
+ export declare class PlaceOrderTransaction4ssktsService extends Service {
14
+ typeOf: factory.transactionType.PlaceOrder;
15
15
  constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath'> & IAdditionalOptions);
16
16
  /**
17
17
  * COA興行オファー承認
@@ -64,14 +64,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  Object.defineProperty(exports, "__esModule", { value: true });
65
65
  exports.PlaceOrderTransaction4ssktsService = void 0;
66
66
  var http_status_1 = require("http-status");
67
- var placeOrder_1 = require("./placeOrder");
67
+ var factory = require("../../../factory");
68
+ var service_1 = require("../../../service");
68
69
  /**
69
70
  * 注文取引サービス(sskts専用)
70
71
  */
71
72
  var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
72
73
  __extends(PlaceOrderTransaction4ssktsService, _super);
73
74
  function PlaceOrderTransaction4ssktsService(options) {
74
- return _super.call(this, __assign(__assign({}, options), { defaultPath: '/txn' })) || this;
75
+ var _this = _super.call(this, __assign(__assign({}, options), { defaultPath: '/txn' })) || this;
76
+ _this.typeOf = factory.transactionType.PlaceOrder;
77
+ return _this;
75
78
  }
76
79
  /**
77
80
  * COA興行オファー承認
@@ -138,5 +141,5 @@ var PlaceOrderTransaction4ssktsService = /** @class */ (function (_super) {
138
141
  });
139
142
  };
140
143
  return PlaceOrderTransaction4ssktsService;
141
- }(placeOrder_1.PlaceOrderTransactionService));
144
+ }(service_1.Service));
142
145
  exports.PlaceOrderTransaction4ssktsService = PlaceOrderTransaction4ssktsService;
@@ -90,7 +90,7 @@ var service;
90
90
  (function (Reservation) {
91
91
  })(Reservation = service.Reservation || (service.Reservation = {}));
92
92
  })(service = exports.service || (exports.service = {}));
93
- var defaultPath = '/admin';
93
+ var defaultRetryableStatusCodes = [];
94
94
  /**
95
95
  * 管理サービス
96
96
  */
@@ -117,7 +117,7 @@ var CloudAdmin = /** @class */ (function () {
117
117
  case 1:
118
118
  _a.svc = (_b.sent()).AuthorizationService;
119
119
  _b.label = 2;
120
- case 2: return [2 /*return*/, new service.Authorization.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
120
+ case 2: return [2 /*return*/, new service.Authorization.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
121
121
  }
122
122
  });
123
123
  });
@@ -134,7 +134,7 @@ var CloudAdmin = /** @class */ (function () {
134
134
  case 1:
135
135
  _a.svc = (_b.sent()).CreativeWorkService;
136
136
  _b.label = 2;
137
- case 2: return [2 /*return*/, new service.CreativeWork.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
137
+ case 2: return [2 /*return*/, new service.CreativeWork.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
138
138
  }
139
139
  });
140
140
  });
@@ -151,7 +151,7 @@ var CloudAdmin = /** @class */ (function () {
151
151
  case 1:
152
152
  _a.svc = (_b.sent()).CustomerService;
153
153
  _b.label = 2;
154
- case 2: return [2 /*return*/, new service.Customer.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
154
+ case 2: return [2 /*return*/, new service.Customer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
155
155
  }
156
156
  });
157
157
  });
@@ -168,7 +168,7 @@ var CloudAdmin = /** @class */ (function () {
168
168
  case 1:
169
169
  _a.svc = (_b.sent()).EventService;
170
170
  _b.label = 2;
171
- case 2: return [2 /*return*/, new service.Event.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
171
+ case 2: return [2 /*return*/, new service.Event.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
172
172
  }
173
173
  });
174
174
  });
@@ -185,7 +185,7 @@ var CloudAdmin = /** @class */ (function () {
185
185
  case 1:
186
186
  _a.svc = (_b.sent()).MeService;
187
187
  _b.label = 2;
188
- case 2: return [2 /*return*/, new service.Me.svc(__assign(__assign({}, this.options), { defaultPath: defaultPath }))];
188
+ case 2: return [2 /*return*/, new service.Me.svc(__assign({}, this.options))];
189
189
  }
190
190
  });
191
191
  });
@@ -202,7 +202,7 @@ var CloudAdmin = /** @class */ (function () {
202
202
  case 1:
203
203
  _a.svc = (_b.sent()).MemberService;
204
204
  _b.label = 2;
205
- case 2: return [2 /*return*/, new service.Member.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
205
+ case 2: return [2 /*return*/, new service.Member.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
206
206
  }
207
207
  });
208
208
  });
@@ -219,7 +219,7 @@ var CloudAdmin = /** @class */ (function () {
219
219
  case 1:
220
220
  _a.svc = (_b.sent()).NoteService;
221
221
  _b.label = 2;
222
- case 2: return [2 /*return*/, new service.Note.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
222
+ case 2: return [2 /*return*/, new service.Note.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
223
223
  }
224
224
  });
225
225
  });
@@ -236,7 +236,7 @@ var CloudAdmin = /** @class */ (function () {
236
236
  case 1:
237
237
  _a.svc = (_b.sent()).OfferService;
238
238
  _b.label = 2;
239
- case 2: return [2 /*return*/, new service.Offer.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
239
+ case 2: return [2 /*return*/, new service.Offer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
240
240
  }
241
241
  });
242
242
  });
@@ -253,7 +253,7 @@ var CloudAdmin = /** @class */ (function () {
253
253
  case 1:
254
254
  _a.svc = (_b.sent()).OfferCatalogService;
255
255
  _b.label = 2;
256
- case 2: return [2 /*return*/, new service.OfferCatalog.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
256
+ case 2: return [2 /*return*/, new service.OfferCatalog.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
257
257
  }
258
258
  });
259
259
  });
@@ -270,7 +270,7 @@ var CloudAdmin = /** @class */ (function () {
270
270
  case 1:
271
271
  _a.svc = (_b.sent()).OfferCatalogItemService;
272
272
  _b.label = 2;
273
- case 2: return [2 /*return*/, new service.OfferCatalogItem.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
273
+ case 2: return [2 /*return*/, new service.OfferCatalogItem.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
274
274
  }
275
275
  });
276
276
  });
@@ -287,7 +287,7 @@ var CloudAdmin = /** @class */ (function () {
287
287
  case 1:
288
288
  _a.svc = (_b.sent()).OrderService;
289
289
  _b.label = 2;
290
- case 2: return [2 /*return*/, new service.Order.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
290
+ case 2: return [2 /*return*/, new service.Order.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
291
291
  }
292
292
  });
293
293
  });
@@ -304,7 +304,7 @@ var CloudAdmin = /** @class */ (function () {
304
304
  case 1:
305
305
  _a.svc = (_b.sent()).ProductService;
306
306
  _b.label = 2;
307
- case 2: return [2 /*return*/, new service.Product.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
307
+ case 2: return [2 /*return*/, new service.Product.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
308
308
  }
309
309
  });
310
310
  });
@@ -321,7 +321,7 @@ var CloudAdmin = /** @class */ (function () {
321
321
  case 1:
322
322
  _a.svc = (_b.sent()).ReservationService;
323
323
  _b.label = 2;
324
- case 2: return [2 /*return*/, new service.Reservation.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [] }))];
324
+ case 2: return [2 /*return*/, new service.Reservation.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
325
325
  }
326
326
  });
327
327
  });
@@ -56,7 +56,7 @@ var service;
56
56
  (function (Payment) {
57
57
  })(Payment = service.Payment || (service.Payment = {}));
58
58
  })(service = exports.service || (exports.service = {}));
59
- var defaultPath = '/pay';
59
+ var defaultRetryableStatusCodes = [http_status_1.BAD_GATEWAY, http_status_1.SERVICE_UNAVAILABLE, http_status_1.FORBIDDEN, http_status_1.UNAUTHORIZED];
60
60
  /**
61
61
  * 決済サービス
62
62
  */
@@ -83,7 +83,7 @@ var CloudPay = /** @class */ (function () {
83
83
  case 1:
84
84
  _a.svc = (_b.sent()).PaymentService;
85
85
  _b.label = 2;
86
- case 2: return [2 /*return*/, new service.Payment.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [http_status_1.BAD_GATEWAY, http_status_1.FORBIDDEN, http_status_1.UNAUTHORIZED] }))];
86
+ case 2: return [2 /*return*/, new service.Payment.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
87
87
  }
88
88
  });
89
89
  });
@@ -1,11 +1,10 @@
1
1
  import type { IAuthorizeEventServiceResult, IMinimalAuthorizeEventServiceResult } from '../../chevreTxn/transaction/placeOrder/factory';
2
2
  import * as factory from '../../factory';
3
- import { IAdditionalOptions, IOptions, Service } from '../../service';
3
+ import { Service } from '../../service';
4
4
  /**
5
5
  * オファーサービス
6
6
  */
7
7
  export declare class OfferService extends Service {
8
- constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'> & IAdditionalOptions);
9
8
  /**
10
9
  * 興行オファー承認
11
10
  */
@@ -58,6 +58,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
58
58
  Object.defineProperty(exports, "__esModule", { value: true });
59
59
  exports.OfferService = void 0;
60
60
  var factory = require("../../factory");
61
+ // import { IAdditionalOptions, IOptions, Service } from '../../service';
61
62
  var service_1 = require("../../service");
62
63
  var index_1 = require("../../../index");
63
64
  /**
@@ -65,20 +66,26 @@ var index_1 = require("../../../index");
65
66
  */
66
67
  var OfferService = /** @class */ (function (_super) {
67
68
  __extends(OfferService, _super);
68
- function OfferService(options) {
69
- return _super.call(this, options) || this;
69
+ function OfferService() {
70
+ return _super !== null && _super.apply(this, arguments) || this;
70
71
  }
72
+ // constructor(options: Pick<
73
+ // IOptions,
74
+ // 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'
75
+ // > & IAdditionalOptions) {
76
+ // super(options);
77
+ // }
71
78
  /**
72
79
  * 興行オファー承認
73
80
  */
74
81
  OfferService.prototype.authorizeEventService = function (params, options) {
75
82
  return __awaiter(this, void 0, void 0, function () {
76
- var _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, offerService;
83
+ var _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, offerService;
77
84
  return __generator(this, function (_b) {
78
85
  switch (_b.label) {
79
86
  case 0:
80
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
81
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
87
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
88
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
82
89
  case 1:
83
90
  chevreTxn = _b.sent();
84
91
  return [4 /*yield*/, chevreTxn.createOfferInstance({
@@ -104,13 +111,13 @@ var OfferService = /** @class */ (function (_super) {
104
111
  */
105
112
  OfferService.prototype.voidAuthorization = function (params) {
106
113
  return __awaiter(this, void 0, void 0, function () {
107
- var id, purpose, object, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, offerService;
114
+ var id, purpose, object, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, offerService;
108
115
  return __generator(this, function (_b) {
109
116
  switch (_b.label) {
110
117
  case 0:
111
118
  id = params.id, purpose = params.purpose, object = params.object;
112
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
113
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
119
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
120
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
114
121
  case 1:
115
122
  chevreTxn = _b.sent();
116
123
  return [4 /*yield*/, chevreTxn.createOfferInstance({
@@ -1,12 +1,11 @@
1
1
  import type { ISetProfileParams } from '../../../chevreTxn/transaction';
2
2
  import type { IConfirmResult4tttsPOS, IMinimalConfirmResult, IStartParams, IStartPlaceOrderResult } from '../../../chevreTxn/transaction/placeOrder/factory';
3
3
  import * as factory from '../../../factory';
4
- import { IAdditionalOptions, IOptions, Service } from '../../../service';
4
+ import { Service } from '../../../service';
5
5
  /**
6
6
  * 注文取引サービス
7
7
  */
8
8
  export declare class PlaceOrderTransactionService extends Service {
9
- constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'> & IAdditionalOptions);
10
9
  /**
11
10
  * 取引開始
12
11
  */