@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
@@ -58,6 +58,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
58
58
  Object.defineProperty(exports, "__esModule", { value: true });
59
59
  exports.PlaceOrderTransactionService = void 0;
60
60
  var http_status_1 = require("http-status");
61
+ // import { IAdditionalOptions, IOptions, Service } from '../../../service';
61
62
  var service_1 = require("../../../service");
62
63
  var index_1 = require("../../../index");
63
64
  /**
@@ -65,21 +66,27 @@ var index_1 = require("../../../index");
65
66
  */
66
67
  var PlaceOrderTransactionService = /** @class */ (function (_super) {
67
68
  __extends(PlaceOrderTransactionService, _super);
68
- function PlaceOrderTransactionService(options) {
69
- return _super.call(this, options) || this;
69
+ function PlaceOrderTransactionService() {
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
  PlaceOrderTransactionService.prototype.start = function (params) {
75
82
  return __awaiter(this, void 0, void 0, function () {
76
- var agent, object, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, placeOrderService;
83
+ var agent, object, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, placeOrderService;
77
84
  return __generator(this, function (_b) {
78
85
  switch (_b.label) {
79
86
  case 0:
80
87
  agent = params.agent, object = params.object;
81
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
82
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
88
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
89
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
83
90
  case 1:
84
91
  chevreTxn = _b.sent();
85
92
  return [4 /*yield*/, chevreTxn.createPlaceOrderTransactionInstance({
@@ -103,13 +110,13 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
103
110
  */
104
111
  PlaceOrderTransactionService.prototype.setProfile = function (params) {
105
112
  return __awaiter(this, void 0, void 0, function () {
106
- var id, agent, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, placeOrderService;
113
+ var id, agent, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, placeOrderService;
107
114
  return __generator(this, function (_b) {
108
115
  switch (_b.label) {
109
116
  case 0:
110
117
  id = params.id, agent = params.agent;
111
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
112
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
118
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
119
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
113
120
  case 1:
114
121
  chevreTxn = _b.sent();
115
122
  return [4 /*yield*/, chevreTxn.createPlaceOrderTransactionInstance({
@@ -132,13 +139,13 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
132
139
  */
133
140
  PlaceOrderTransactionService.prototype.changeExpiringDate = function (params) {
134
141
  return __awaiter(this, void 0, void 0, function () {
135
- var id, expires, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, placeOrderService;
142
+ var id, expires, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, placeOrderService;
136
143
  return __generator(this, function (_b) {
137
144
  switch (_b.label) {
138
145
  case 0:
139
146
  id = params.id, expires = params.expires;
140
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
141
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
147
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
148
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
142
149
  case 1:
143
150
  chevreTxn = _b.sent();
144
151
  return [4 /*yield*/, chevreTxn.createPlaceOrderTransactionInstance({
@@ -161,20 +168,21 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
161
168
  */
162
169
  PlaceOrderTransactionService.prototype.confirm4tttsPOS = function (params) {
163
170
  return __awaiter(this, void 0, void 0, function () {
164
- var id, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, placeOrderService;
171
+ var id, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, placeOrderService;
165
172
  return __generator(this, function (_b) {
166
173
  switch (_b.label) {
167
174
  case 0:
168
175
  id = params.id;
169
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
170
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
176
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
177
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
171
178
  case 1:
172
179
  chevreTxn = _b.sent();
173
180
  return [4 /*yield*/, chevreTxn.createPlaceOrderTransactionInstance({
174
181
  project: project,
175
182
  seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' },
176
183
  retryableStatusCodes: __spreadArray(__spreadArray([], (Array.isArray(retryableStatusCodes)) ? retryableStatusCodes : []), [
177
- http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS
184
+ http_status_1.CONFLICT,
185
+ http_status_1.TOO_MANY_REQUESTS
178
186
  ])
179
187
  })];
180
188
  case 2:
@@ -192,20 +200,21 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
192
200
  */
193
201
  PlaceOrderTransactionService.prototype.confirmWithMiminalResponse = function (params) {
194
202
  return __awaiter(this, void 0, void 0, function () {
195
- var id, potentialActions, result, sendEmailMessage, email, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, placeOrderService;
203
+ var id, potentialActions, result, sendEmailMessage, email, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, placeOrderService;
196
204
  return __generator(this, function (_b) {
197
205
  switch (_b.label) {
198
206
  case 0:
199
207
  id = params.id, potentialActions = params.potentialActions, result = params.result, sendEmailMessage = params.sendEmailMessage, email = params.email;
200
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
201
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
208
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
209
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
202
210
  case 1:
203
211
  chevreTxn = _b.sent();
204
212
  return [4 /*yield*/, chevreTxn.createPlaceOrderTransactionInstance({
205
213
  project: project,
206
214
  seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' },
207
215
  retryableStatusCodes: __spreadArray(__spreadArray([], (Array.isArray(retryableStatusCodes)) ? retryableStatusCodes : []), [
208
- http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS
216
+ http_status_1.CONFLICT,
217
+ http_status_1.TOO_MANY_REQUESTS
209
218
  ])
210
219
  })];
211
220
  case 2:
@@ -224,20 +233,21 @@ var PlaceOrderTransactionService = /** @class */ (function (_super) {
224
233
  */
225
234
  PlaceOrderTransactionService.prototype.cancel = function (params) {
226
235
  return __awaiter(this, void 0, void 0, function () {
227
- var id, _a, auth, endpoint, project, seller, retryableStatusCodes, chevreTxn, placeOrderService;
236
+ var id, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevreTxn, placeOrderService;
228
237
  return __generator(this, function (_b) {
229
238
  switch (_b.label) {
230
239
  case 0:
231
240
  id = params.id;
232
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, retryableStatusCodes = _a.retryableStatusCodes;
233
- return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint })];
241
+ _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
242
+ return [4 /*yield*/, index_1.loadChevreTxn({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
234
243
  case 1:
235
244
  chevreTxn = _b.sent();
236
245
  return [4 /*yield*/, chevreTxn.createPlaceOrderTransactionInstance({
237
246
  project: project,
238
247
  seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' },
239
248
  retryableStatusCodes: __spreadArray(__spreadArray([], (Array.isArray(retryableStatusCodes)) ? retryableStatusCodes : []), [
240
- http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS
249
+ http_status_1.CONFLICT,
250
+ http_status_1.TOO_MANY_REQUESTS
241
251
  ])
242
252
  })];
243
253
  case 2:
@@ -1,11 +1,10 @@
1
1
  import type { IStartParams } from '../../../chevreTxn/transaction/returnOrder/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 ReturnOrderTransactionService extends Service {
8
- constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'> & IAdditionalOptions);
9
8
  /**
10
9
  * 取引を開始する
11
10
  */
@@ -57,6 +57,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
57
57
  };
58
58
  Object.defineProperty(exports, "__esModule", { value: true });
59
59
  exports.ReturnOrderTransactionService = void 0;
60
+ // import { IAdditionalOptions, IOptions, Service } from '../../../service';
60
61
  var service_1 = require("../../../service");
61
62
  var index_1 = require("../../../index");
62
63
  /**
@@ -64,9 +65,15 @@ var index_1 = require("../../../index");
64
65
  */
65
66
  var ReturnOrderTransactionService = /** @class */ (function (_super) {
66
67
  __extends(ReturnOrderTransactionService, _super);
67
- function ReturnOrderTransactionService(options) {
68
- return _super.call(this, options) || this;
68
+ function ReturnOrderTransactionService() {
69
+ return _super !== null && _super.apply(this, arguments) || this;
69
70
  }
71
+ // constructor(options: Pick<
72
+ // IOptions,
73
+ // 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'
74
+ // > & IAdditionalOptions) {
75
+ // super(options);
76
+ // }
70
77
  /**
71
78
  * 取引を開始する
72
79
  */
@@ -68,7 +68,7 @@ var service;
68
68
  })(ReturnOrder = transaction.ReturnOrder || (transaction.ReturnOrder = {}));
69
69
  })(transaction = service.transaction || (service.transaction = {}));
70
70
  })(service = exports.service || (exports.service = {}));
71
- var defaultPath = '/txn';
71
+ var defaultRetryableStatusCodes = [http_status_1.BAD_GATEWAY, http_status_1.SERVICE_UNAVAILABLE, http_status_1.FORBIDDEN, http_status_1.UNAUTHORIZED];
72
72
  /**
73
73
  * 取引サービス
74
74
  */
@@ -95,7 +95,7 @@ var CloudTxn = /** @class */ (function () {
95
95
  case 1:
96
96
  _a.svc = (_b.sent()).OfferService;
97
97
  _b.label = 2;
98
- case 2: return [2 /*return*/, new service.Offer.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [http_status_1.BAD_GATEWAY, http_status_1.FORBIDDEN, http_status_1.UNAUTHORIZED] }))];
98
+ case 2: return [2 /*return*/, new service.Offer.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
99
99
  }
100
100
  });
101
101
  });
@@ -112,7 +112,7 @@ var CloudTxn = /** @class */ (function () {
112
112
  case 1:
113
113
  _a.svc = (_b.sent()).PlaceOrderTransactionService;
114
114
  _b.label = 2;
115
- case 2: return [2 /*return*/, new service.transaction.PlaceOrder.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [http_status_1.BAD_GATEWAY, http_status_1.FORBIDDEN, http_status_1.UNAUTHORIZED] }))];
115
+ case 2: return [2 /*return*/, new service.transaction.PlaceOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
116
116
  }
117
117
  });
118
118
  });
@@ -129,7 +129,7 @@ var CloudTxn = /** @class */ (function () {
129
129
  case 1:
130
130
  _a.svc = (_b.sent()).ReturnOrderTransactionService;
131
131
  _b.label = 2;
132
- case 2: return [2 /*return*/, new service.transaction.ReturnOrder.svc(__assign(__assign(__assign({}, this.options), params), { defaultPath: defaultPath, retryableStatusCodes: [http_status_1.BAD_GATEWAY, http_status_1.FORBIDDEN, http_status_1.UNAUTHORIZED] }))];
132
+ case 2: return [2 /*return*/, new service.transaction.ReturnOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
133
133
  }
134
134
  });
135
135
  });