@chevre/domain 20.2.0-alpha.50 → 20.2.0-alpha.52
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.
|
@@ -33,7 +33,7 @@ class MongoRepository {
|
|
|
33
33
|
}
|
|
34
34
|
// tslint:disable-next-line:max-func-body-length
|
|
35
35
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
36
|
-
var _a, _b, _c, _d, _e, _f;
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
37
37
|
// MongoDB検索条件
|
|
38
38
|
const andConditions = [
|
|
39
39
|
{
|
|
@@ -69,20 +69,21 @@ class MongoRepository {
|
|
|
69
69
|
if (typeof params.identifier === 'string') {
|
|
70
70
|
if (params.identifier.length > 0) {
|
|
71
71
|
andConditions.push({
|
|
72
|
-
identifier: {
|
|
73
|
-
$exists: true,
|
|
74
|
-
$regex: new RegExp(params.identifier)
|
|
75
|
-
}
|
|
72
|
+
identifier: { $regex: new RegExp(params.identifier) }
|
|
76
73
|
});
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
|
-
else
|
|
80
|
-
|
|
76
|
+
else {
|
|
77
|
+
const identifierEq = (_f = params.identifier) === null || _f === void 0 ? void 0 : _f.$eq;
|
|
78
|
+
if (typeof identifierEq === 'string') {
|
|
81
79
|
andConditions.push({
|
|
82
|
-
identifier: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
identifier: { $eq: identifierEq }
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const identifierIn = (_g = params.identifier) === null || _g === void 0 ? void 0 : _g.$in;
|
|
84
|
+
if (Array.isArray(identifierIn)) {
|
|
85
|
+
andConditions.push({
|
|
86
|
+
identifier: { $in: identifierIn }
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -155,7 +156,7 @@ class MongoRepository {
|
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
const additionalPropertyElemMatch = (
|
|
159
|
+
const additionalPropertyElemMatch = (_h = params.additionalProperty) === null || _h === void 0 ? void 0 : _h.$elemMatch;
|
|
159
160
|
if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
|
|
160
161
|
andConditions.push({
|
|
161
162
|
additionalProperty: {
|
|
@@ -108,5 +108,9 @@ declare function authorize(params: {
|
|
|
108
108
|
purpose: factory.action.authorize.paymentMethod.any.IPurpose;
|
|
109
109
|
paymentServiceType: factory.service.paymentService.PaymentServiceType;
|
|
110
110
|
location?: factory.action.trade.pay.ILocation;
|
|
111
|
+
/**
|
|
112
|
+
* アクション失敗時に即時に決済取引を中止するかどうか
|
|
113
|
+
*/
|
|
114
|
+
useCancelPayTransactionOnFailed: boolean;
|
|
111
115
|
}): IAuthorizeOperation<IAuthorizePaymentAction>;
|
|
112
116
|
export { onPaymentStatusChanged, authorize, invalidatePaymentUrl, voidPayTransaction, person2username, processVoidPayTransaction, publishPaymentUrl };
|
|
@@ -268,6 +268,15 @@ function authorize(params) {
|
|
|
268
268
|
catch (__) {
|
|
269
269
|
// no op
|
|
270
270
|
}
|
|
271
|
+
// 即時に決済取引を中止するか?(2023-02-03~)
|
|
272
|
+
if (params.useCancelPayTransactionOnFailed) {
|
|
273
|
+
yield processVoidPayTransaction({
|
|
274
|
+
project: action.project,
|
|
275
|
+
agent: { id: action.project.id },
|
|
276
|
+
id: action.id,
|
|
277
|
+
purpose: action.purpose
|
|
278
|
+
})(repos);
|
|
279
|
+
}
|
|
271
280
|
throw error;
|
|
272
281
|
}
|
|
273
282
|
// アクションを完了
|
|
@@ -318,8 +318,8 @@ function processAuthorizeCreditCard(params) {
|
|
|
318
318
|
issuedThrough: { id: String(creditCardPaymentService.id) }
|
|
319
319
|
},
|
|
320
320
|
purpose: params.purpose,
|
|
321
|
-
paymentServiceType: factory.service.paymentService.PaymentServiceType.CreditCard
|
|
322
|
-
|
|
321
|
+
paymentServiceType: factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
322
|
+
useCancelPayTransactionOnFailed: false
|
|
323
323
|
})(repos);
|
|
324
324
|
});
|
|
325
325
|
}
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.
|
|
13
|
-
"@cinerino/sdk": "3.137.0
|
|
12
|
+
"@chevre/factory": "4.285.0",
|
|
13
|
+
"@cinerino/sdk": "3.137.0",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.2.0-alpha.
|
|
123
|
+
"version": "20.2.0-alpha.52"
|
|
124
124
|
}
|