@cinerino/sdk 5.17.0-alpha.1 → 5.17.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.
- package/example/src/transaction/processPlaceOrderByCreditCard3DS.ts +2 -1
- package/lib/abstract/chevrePay/payment.js +8 -8
- package/lib/abstract/chevreTxn/offer.js +5 -5
- package/lib/abstract/cinerino/pay/payment.js +40 -11
- package/lib/abstract/cinerino/pay.d.ts +2 -2
- package/lib/abstract/cinerino/service/offer.js +5 -2
- package/lib/abstract/service.d.ts +4 -0
- package/lib/abstract/service.js +3 -1
- package/lib/bundle.js +61 -27
- package/package.json +2 -2
|
@@ -47,7 +47,8 @@ async function main() {
|
|
|
47
47
|
|
|
48
48
|
const paymentService = await (await client.loadPay({
|
|
49
49
|
endpoint: <string>process.env.API_ENDPOINT,
|
|
50
|
-
auth: await auth()
|
|
50
|
+
auth: await auth(),
|
|
51
|
+
disableAutoRetry: true
|
|
51
52
|
})).createPaymentInstance({
|
|
52
53
|
project,
|
|
53
54
|
seller: { id: '' }
|
|
@@ -87,7 +87,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
87
87
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
88
88
|
body: params,
|
|
89
89
|
qs: {
|
|
90
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
90
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
91
91
|
}
|
|
92
92
|
})
|
|
93
93
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -109,7 +109,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
109
109
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
110
110
|
body: params,
|
|
111
111
|
qs: {
|
|
112
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
112
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
113
113
|
}
|
|
114
114
|
})
|
|
115
115
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -131,7 +131,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
131
131
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
132
132
|
body: params,
|
|
133
133
|
qs: {
|
|
134
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
134
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
135
135
|
}
|
|
136
136
|
})
|
|
137
137
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -153,7 +153,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
153
153
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
154
154
|
body: params,
|
|
155
155
|
qs: {
|
|
156
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
156
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
157
157
|
}
|
|
158
158
|
})
|
|
159
159
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -175,7 +175,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
175
175
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
176
176
|
body: params,
|
|
177
177
|
qs: {
|
|
178
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
178
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
179
179
|
}
|
|
180
180
|
})
|
|
181
181
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -197,7 +197,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
197
197
|
expectedStatusCodes: [http_status_1.OK],
|
|
198
198
|
body: params,
|
|
199
199
|
qs: {
|
|
200
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
200
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
201
201
|
}
|
|
202
202
|
})
|
|
203
203
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -222,7 +222,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
222
222
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
223
223
|
body: body,
|
|
224
224
|
qs: {
|
|
225
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
225
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
226
226
|
}
|
|
227
227
|
})];
|
|
228
228
|
case 1:
|
|
@@ -248,7 +248,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
248
248
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
249
249
|
body: body,
|
|
250
250
|
qs: {
|
|
251
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
251
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
252
252
|
}
|
|
253
253
|
})];
|
|
254
254
|
case 1:
|
|
@@ -109,7 +109,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
109
109
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
110
110
|
body: params,
|
|
111
111
|
qs: {
|
|
112
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
112
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
113
113
|
}
|
|
114
114
|
})
|
|
115
115
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -154,7 +154,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
154
154
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
155
155
|
body: body,
|
|
156
156
|
qs: {
|
|
157
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
157
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
158
158
|
}
|
|
159
159
|
})];
|
|
160
160
|
case 1:
|
|
@@ -177,7 +177,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
177
177
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
178
178
|
body: params,
|
|
179
179
|
qs: {
|
|
180
|
-
purpose: { id: params.purposeRaw } // 追加(2024-04-01
|
|
180
|
+
purpose: { id: params.purposeRaw } // 追加(2024-04-01~)
|
|
181
181
|
}
|
|
182
182
|
})
|
|
183
183
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -201,7 +201,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
201
201
|
expectedStatusCodes: [http_status_1.OK],
|
|
202
202
|
body: body,
|
|
203
203
|
qs: {
|
|
204
|
-
purpose: { id: params.purposeRaw } // 追加(2024-04-01
|
|
204
|
+
purpose: { id: params.purposeRaw } // 追加(2024-04-01~)
|
|
205
205
|
}
|
|
206
206
|
})
|
|
207
207
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -225,7 +225,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
225
225
|
expectedStatusCodes: [http_status_1.OK],
|
|
226
226
|
body: body,
|
|
227
227
|
qs: {
|
|
228
|
-
purpose: { id: params.purposeRaw } // 追加(2024-04-01
|
|
228
|
+
purpose: { id: params.purposeRaw } // 追加(2024-04-01~)
|
|
229
229
|
}
|
|
230
230
|
})
|
|
231
231
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -77,7 +77,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
77
77
|
// retry 429(2024-04-01~)
|
|
78
78
|
// retry 409(2024-04-01~)
|
|
79
79
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
80
|
-
body: params
|
|
80
|
+
body: params,
|
|
81
|
+
qs: {
|
|
82
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
83
|
+
}
|
|
81
84
|
})
|
|
82
85
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
83
86
|
return [2 /*return*/, response.json()];
|
|
@@ -98,8 +101,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
98
101
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
99
102
|
// retry 429(2024-04-01~)
|
|
100
103
|
// retry 409(2024-04-01~)
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
// retry 504(2024-04-03~)
|
|
105
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
106
|
+
body: params,
|
|
107
|
+
qs: {
|
|
108
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
109
|
+
}
|
|
103
110
|
})
|
|
104
111
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
105
112
|
return [2 /*return*/, response.json()];
|
|
@@ -121,7 +128,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
121
128
|
// retry 429(2024-04-01~)
|
|
122
129
|
// retry 409(2024-04-01~)
|
|
123
130
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
124
|
-
body: params
|
|
131
|
+
body: params,
|
|
132
|
+
qs: {
|
|
133
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
134
|
+
}
|
|
125
135
|
})
|
|
126
136
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
127
137
|
return [2 /*return*/, response.json()];
|
|
@@ -143,7 +153,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
143
153
|
// retry 429(2024-04-01~)
|
|
144
154
|
// retry 409(2024-04-01~)
|
|
145
155
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
146
|
-
body: params
|
|
156
|
+
body: params,
|
|
157
|
+
qs: {
|
|
158
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
159
|
+
}
|
|
147
160
|
})
|
|
148
161
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
149
162
|
return [2 /*return*/, response.json()];
|
|
@@ -164,8 +177,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
164
177
|
expectedStatusCodes: [http_status_1.OK],
|
|
165
178
|
// retry 429(2024-04-01~)
|
|
166
179
|
// retry 409(2024-04-01~)
|
|
167
|
-
|
|
168
|
-
|
|
180
|
+
// retry 504(2024-04-03~)
|
|
181
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
182
|
+
body: params,
|
|
183
|
+
qs: {
|
|
184
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
185
|
+
}
|
|
169
186
|
})
|
|
170
187
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
171
188
|
return [2 /*return*/, response.json()];
|
|
@@ -184,7 +201,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
184
201
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
185
202
|
method: 'POST',
|
|
186
203
|
expectedStatusCodes: [http_status_1.OK],
|
|
187
|
-
|
|
204
|
+
// retry 504(2024-04-03~)
|
|
205
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
206
|
+
body: params,
|
|
207
|
+
qs: {
|
|
208
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
209
|
+
}
|
|
188
210
|
})
|
|
189
211
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
190
212
|
return [2 /*return*/, response.json()];
|
|
@@ -225,7 +247,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
225
247
|
// retry 429(2024-04-01~)
|
|
226
248
|
// retry 409(2024-04-01~)
|
|
227
249
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
228
|
-
body: params
|
|
250
|
+
body: params,
|
|
251
|
+
qs: {
|
|
252
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
253
|
+
}
|
|
229
254
|
})];
|
|
230
255
|
case 1:
|
|
231
256
|
_a.sent();
|
|
@@ -247,8 +272,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
247
272
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
248
273
|
// retry 429(2024-04-01~)
|
|
249
274
|
// retry 409(2024-04-01~)
|
|
250
|
-
|
|
251
|
-
|
|
275
|
+
// retry 504(2024-04-03~)
|
|
276
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
277
|
+
body: params,
|
|
278
|
+
qs: {
|
|
279
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
280
|
+
}
|
|
252
281
|
})];
|
|
253
282
|
case 1:
|
|
254
283
|
_a.sent();
|
|
@@ -13,7 +13,7 @@ export declare namespace service {
|
|
|
13
13
|
* 決済サービス
|
|
14
14
|
*/
|
|
15
15
|
export declare class Pay {
|
|
16
|
-
options: Pick<IOptions, 'auth' | 'endpoint'>;
|
|
17
|
-
constructor(options: Pick<IOptions, 'auth' | 'endpoint'>);
|
|
16
|
+
options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>;
|
|
17
|
+
constructor(options: Pick<IOptions, 'auth' | 'endpoint' | 'disableAutoRetry'>);
|
|
18
18
|
createPaymentInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<PaymentService>;
|
|
19
19
|
}
|
|
@@ -97,7 +97,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
97
97
|
method: 'POST',
|
|
98
98
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
99
99
|
body: params,
|
|
100
|
-
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)
|
|
100
|
+
qs: __assign(__assign({ purpose: { id: params.purpose.id } }, ((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)
|
|
101
101
|
})
|
|
102
102
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
103
103
|
return [2 /*return*/, response.json()];
|
|
@@ -119,7 +119,10 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
119
119
|
uri: "/offers/" + object.itemOffered.typeOf + "/authorize/" + id + "/void",
|
|
120
120
|
method: 'PUT',
|
|
121
121
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
122
|
-
body: body
|
|
122
|
+
body: body,
|
|
123
|
+
qs: {
|
|
124
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
125
|
+
}
|
|
123
126
|
})];
|
|
124
127
|
case 1:
|
|
125
128
|
_a.sent();
|
|
@@ -29,6 +29,10 @@ export interface IOptions {
|
|
|
29
29
|
* リトライステータスコード(2024-04-01~)
|
|
30
30
|
*/
|
|
31
31
|
retryableStatusCodes?: number[];
|
|
32
|
+
/**
|
|
33
|
+
* レスポンスのステータスコードによってリトライする価値がある場合でも、自動リトライをさせないオプション(2024-04-03~)
|
|
34
|
+
*/
|
|
35
|
+
disableAutoRetry?: boolean;
|
|
32
36
|
}
|
|
33
37
|
export interface IAdditionalOptions {
|
|
34
38
|
/**
|
package/lib/abstract/service.js
CHANGED
|
@@ -107,7 +107,9 @@ var Service = /** @class */ (function () {
|
|
|
107
107
|
headers: headers,
|
|
108
108
|
body: JSON.stringify(defaultOptions.body)
|
|
109
109
|
};
|
|
110
|
-
retryableStatusCodes =
|
|
110
|
+
retryableStatusCodes = (this.options.disableAutoRetry === true)
|
|
111
|
+
? []
|
|
112
|
+
: __spreadArray(__spreadArray([], (Array.isArray(this.options.retryableStatusCodes)) ? this.options.retryableStatusCodes : []), (Array.isArray(defaultOptions.retryableStatusCodes)) ? defaultOptions.retryableStatusCodes : []);
|
|
111
113
|
// create request (using authClient or otherwise and return request obj)
|
|
112
114
|
if (this.options.auth !== undefined) {
|
|
113
115
|
return [2 /*return*/, this.options.auth.fetch(url, fetchOptions, defaultOptions.expectedStatusCodes, retryableStatusCodes)];
|
package/lib/bundle.js
CHANGED
|
@@ -12995,7 +12995,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
12995
12995
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
12996
12996
|
body: params,
|
|
12997
12997
|
qs: {
|
|
12998
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
12998
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
12999
12999
|
}
|
|
13000
13000
|
})
|
|
13001
13001
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13017,7 +13017,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13017
13017
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
13018
13018
|
body: params,
|
|
13019
13019
|
qs: {
|
|
13020
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13020
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13021
13021
|
}
|
|
13022
13022
|
})
|
|
13023
13023
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13039,7 +13039,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13039
13039
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
13040
13040
|
body: params,
|
|
13041
13041
|
qs: {
|
|
13042
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13042
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13043
13043
|
}
|
|
13044
13044
|
})
|
|
13045
13045
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13061,7 +13061,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13061
13061
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
13062
13062
|
body: params,
|
|
13063
13063
|
qs: {
|
|
13064
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13064
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13065
13065
|
}
|
|
13066
13066
|
})
|
|
13067
13067
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13083,7 +13083,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13083
13083
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
13084
13084
|
body: params,
|
|
13085
13085
|
qs: {
|
|
13086
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13086
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13087
13087
|
}
|
|
13088
13088
|
})
|
|
13089
13089
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13105,7 +13105,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13105
13105
|
expectedStatusCodes: [http_status_1.OK],
|
|
13106
13106
|
body: params,
|
|
13107
13107
|
qs: {
|
|
13108
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13108
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13109
13109
|
}
|
|
13110
13110
|
})
|
|
13111
13111
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13130,7 +13130,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13130
13130
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
13131
13131
|
body: body,
|
|
13132
13132
|
qs: {
|
|
13133
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13133
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13134
13134
|
}
|
|
13135
13135
|
})];
|
|
13136
13136
|
case 1:
|
|
@@ -13156,7 +13156,7 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
13156
13156
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
13157
13157
|
body: body,
|
|
13158
13158
|
qs: {
|
|
13159
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13159
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13160
13160
|
}
|
|
13161
13161
|
})];
|
|
13162
13162
|
case 1:
|
|
@@ -13435,7 +13435,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
13435
13435
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
13436
13436
|
body: params,
|
|
13437
13437
|
qs: {
|
|
13438
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13438
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13439
13439
|
}
|
|
13440
13440
|
})
|
|
13441
13441
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13480,7 +13480,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
13480
13480
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
13481
13481
|
body: body,
|
|
13482
13482
|
qs: {
|
|
13483
|
-
purpose: { id: params.purpose.id } // 追加(2024-04-01
|
|
13483
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-01~)
|
|
13484
13484
|
}
|
|
13485
13485
|
})];
|
|
13486
13486
|
case 1:
|
|
@@ -13503,7 +13503,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
13503
13503
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
13504
13504
|
body: params,
|
|
13505
13505
|
qs: {
|
|
13506
|
-
purpose: { id: params.purposeRaw } // 追加(2024-04-01
|
|
13506
|
+
purpose: { id: params.purposeRaw } // 追加(2024-04-01~)
|
|
13507
13507
|
}
|
|
13508
13508
|
})
|
|
13509
13509
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13527,7 +13527,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
13527
13527
|
expectedStatusCodes: [http_status_1.OK],
|
|
13528
13528
|
body: body,
|
|
13529
13529
|
qs: {
|
|
13530
|
-
purpose: { id: params.purposeRaw } // 追加(2024-04-01
|
|
13530
|
+
purpose: { id: params.purposeRaw } // 追加(2024-04-01~)
|
|
13531
13531
|
}
|
|
13532
13532
|
})
|
|
13533
13533
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -13551,7 +13551,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
13551
13551
|
expectedStatusCodes: [http_status_1.OK],
|
|
13552
13552
|
body: body,
|
|
13553
13553
|
qs: {
|
|
13554
|
-
purpose: { id: params.purposeRaw } // 追加(2024-04-01
|
|
13554
|
+
purpose: { id: params.purposeRaw } // 追加(2024-04-01~)
|
|
13555
13555
|
}
|
|
13556
13556
|
})
|
|
13557
13557
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -16175,7 +16175,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16175
16175
|
// retry 429(2024-04-01~)
|
|
16176
16176
|
// retry 409(2024-04-01~)
|
|
16177
16177
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
16178
|
-
body: params
|
|
16178
|
+
body: params,
|
|
16179
|
+
qs: {
|
|
16180
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16181
|
+
}
|
|
16179
16182
|
})
|
|
16180
16183
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16181
16184
|
return [2 /*return*/, response.json()];
|
|
@@ -16196,8 +16199,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16196
16199
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
16197
16200
|
// retry 429(2024-04-01~)
|
|
16198
16201
|
// retry 409(2024-04-01~)
|
|
16199
|
-
|
|
16200
|
-
|
|
16202
|
+
// retry 504(2024-04-03~)
|
|
16203
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
16204
|
+
body: params,
|
|
16205
|
+
qs: {
|
|
16206
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16207
|
+
}
|
|
16201
16208
|
})
|
|
16202
16209
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16203
16210
|
return [2 /*return*/, response.json()];
|
|
@@ -16219,7 +16226,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16219
16226
|
// retry 429(2024-04-01~)
|
|
16220
16227
|
// retry 409(2024-04-01~)
|
|
16221
16228
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
16222
|
-
body: params
|
|
16229
|
+
body: params,
|
|
16230
|
+
qs: {
|
|
16231
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16232
|
+
}
|
|
16223
16233
|
})
|
|
16224
16234
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16225
16235
|
return [2 /*return*/, response.json()];
|
|
@@ -16241,7 +16251,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16241
16251
|
// retry 429(2024-04-01~)
|
|
16242
16252
|
// retry 409(2024-04-01~)
|
|
16243
16253
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
16244
|
-
body: params
|
|
16254
|
+
body: params,
|
|
16255
|
+
qs: {
|
|
16256
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16257
|
+
}
|
|
16245
16258
|
})
|
|
16246
16259
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16247
16260
|
return [2 /*return*/, response.json()];
|
|
@@ -16262,8 +16275,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16262
16275
|
expectedStatusCodes: [http_status_1.OK],
|
|
16263
16276
|
// retry 429(2024-04-01~)
|
|
16264
16277
|
// retry 409(2024-04-01~)
|
|
16265
|
-
|
|
16266
|
-
|
|
16278
|
+
// retry 504(2024-04-03~)
|
|
16279
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
16280
|
+
body: params,
|
|
16281
|
+
qs: {
|
|
16282
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16283
|
+
}
|
|
16267
16284
|
})
|
|
16268
16285
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16269
16286
|
return [2 /*return*/, response.json()];
|
|
@@ -16282,7 +16299,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16282
16299
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.MovieTicket + "/check",
|
|
16283
16300
|
method: 'POST',
|
|
16284
16301
|
expectedStatusCodes: [http_status_1.OK],
|
|
16285
|
-
|
|
16302
|
+
// retry 504(2024-04-03~)
|
|
16303
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
16304
|
+
body: params,
|
|
16305
|
+
qs: {
|
|
16306
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16307
|
+
}
|
|
16286
16308
|
})
|
|
16287
16309
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
16288
16310
|
return [2 /*return*/, response.json()];
|
|
@@ -16323,7 +16345,10 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16323
16345
|
// retry 429(2024-04-01~)
|
|
16324
16346
|
// retry 409(2024-04-01~)
|
|
16325
16347
|
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.TOO_MANY_REQUESTS],
|
|
16326
|
-
body: params
|
|
16348
|
+
body: params,
|
|
16349
|
+
qs: {
|
|
16350
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16351
|
+
}
|
|
16327
16352
|
})];
|
|
16328
16353
|
case 1:
|
|
16329
16354
|
_a.sent();
|
|
@@ -16345,8 +16370,12 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
16345
16370
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
16346
16371
|
// retry 429(2024-04-01~)
|
|
16347
16372
|
// retry 409(2024-04-01~)
|
|
16348
|
-
|
|
16349
|
-
|
|
16373
|
+
// retry 504(2024-04-03~)
|
|
16374
|
+
retryableStatusCodes: [http_status_1.CONFLICT, http_status_1.GATEWAY_TIMEOUT, http_status_1.TOO_MANY_REQUESTS],
|
|
16375
|
+
body: params,
|
|
16376
|
+
qs: {
|
|
16377
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
16378
|
+
}
|
|
16350
16379
|
})];
|
|
16351
16380
|
case 1:
|
|
16352
16381
|
_a.sent();
|
|
@@ -17181,7 +17210,7 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
17181
17210
|
method: 'POST',
|
|
17182
17211
|
expectedStatusCodes: [http_status_1.CREATED],
|
|
17183
17212
|
body: params,
|
|
17184
|
-
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)
|
|
17213
|
+
qs: __assign(__assign({ purpose: { id: params.purpose.id } }, ((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)
|
|
17185
17214
|
})
|
|
17186
17215
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
17187
17216
|
return [2 /*return*/, response.json()];
|
|
@@ -17203,7 +17232,10 @@ var OfferService = /** @class */ (function (_super) {
|
|
|
17203
17232
|
uri: "/offers/" + object.itemOffered.typeOf + "/authorize/" + id + "/void",
|
|
17204
17233
|
method: 'PUT',
|
|
17205
17234
|
expectedStatusCodes: [http_status_1.NO_CONTENT],
|
|
17206
|
-
body: body
|
|
17235
|
+
body: body,
|
|
17236
|
+
qs: {
|
|
17237
|
+
purpose: { id: params.purpose.id } // 追加(2024-04-03~)
|
|
17238
|
+
}
|
|
17207
17239
|
})];
|
|
17208
17240
|
case 1:
|
|
17209
17241
|
_a.sent();
|
|
@@ -20310,7 +20342,9 @@ var Service = /** @class */ (function () {
|
|
|
20310
20342
|
headers: headers,
|
|
20311
20343
|
body: JSON.stringify(defaultOptions.body)
|
|
20312
20344
|
};
|
|
20313
|
-
retryableStatusCodes =
|
|
20345
|
+
retryableStatusCodes = (this.options.disableAutoRetry === true)
|
|
20346
|
+
? []
|
|
20347
|
+
: __spreadArray(__spreadArray([], (Array.isArray(this.options.retryableStatusCodes)) ? this.options.retryableStatusCodes : []), (Array.isArray(defaultOptions.retryableStatusCodes)) ? defaultOptions.retryableStatusCodes : []);
|
|
20314
20348
|
// create request (using authClient or otherwise and return request obj)
|
|
20315
20349
|
if (this.options.auth !== undefined) {
|
|
20316
20350
|
return [2 /*return*/, this.options.auth.fetch(url, fetchOptions, defaultOptions.expectedStatusCodes, retryableStatusCodes)];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "5.17.0
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"watchify": "^3.11.1"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@chevre/factory": "4.365.0
|
|
95
|
+
"@chevre/factory": "4.365.0",
|
|
96
96
|
"debug": "^3.2.6",
|
|
97
97
|
"http-status": "^1.4.2",
|
|
98
98
|
"idtoken-verifier": "^2.0.3",
|