@chevre/domain 20.4.0-alpha.5 → 20.4.0-alpha.7
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/lib/chevre/repo/mongoose/model/comments.d.ts +1 -1
- package/lib/chevre/repo/mongoose/model/comments.js +1 -1
- package/lib/chevre/repository.d.ts +6 -0
- package/lib/chevre/repository.js +8 -1
- package/lib/chevre/service/assetTransaction/pay.js +11 -5
- package/lib/chevre/service/payment/paymentCard.d.ts +2 -1
- package/lib/chevre/service/payment/paymentCard.js +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.schema = exports.modelName = void 0;
|
|
4
4
|
const mongoose = require("mongoose");
|
|
5
|
-
const modelName = '
|
|
5
|
+
const modelName = 'Comment';
|
|
6
6
|
exports.modelName = modelName;
|
|
7
7
|
const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
|
|
8
8
|
/**
|
|
@@ -11,6 +11,7 @@ import { MongoRepository as AggregationRepo } from './repo/aggregation';
|
|
|
11
11
|
import { MongoRepository as AssetTransactionRepo } from './repo/assetTransaction';
|
|
12
12
|
import { MongoRepository as CategoryCodeRepo } from './repo/categoryCode';
|
|
13
13
|
import { MongoRepository as CodeRepo } from './repo/code';
|
|
14
|
+
import { MongoRepository as CommentRepo } from './repo/comment';
|
|
14
15
|
import { MongoRepository as CreativeWorkRepo } from './repo/creativeWork';
|
|
15
16
|
import { MongoRepository as CustomerRepo } from './repo/customer';
|
|
16
17
|
import { MongoRepository as EmailMessageRepo } from './repo/emailMessage';
|
|
@@ -82,6 +83,11 @@ export declare class CategoryCode extends CategoryCodeRepo {
|
|
|
82
83
|
*/
|
|
83
84
|
export declare class Code extends CodeRepo {
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* コメントリポジトリ
|
|
88
|
+
*/
|
|
89
|
+
export declare class Comment extends CommentRepo {
|
|
90
|
+
}
|
|
85
91
|
/**
|
|
86
92
|
* 確認番号リポジトリ
|
|
87
93
|
*/
|
package/lib/chevre/repository.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rateLimit = exports.itemAvailability = exports.Trip = exports.TransactionNumber = exports.Transaction = exports.Telemetry = exports.Task = exports.ServiceOutputIdentifier = exports.ServiceOutput = exports.Seller = exports.Role = exports.Reservation = exports.Project = exports.Product = exports.PriceSpecification = exports.Place = exports.Permit = exports.Person = exports.paymentMethod = exports.OwnershipInfo = exports.OrderNumber = exports.Order = exports.OfferCatalog = exports.Offer = exports.MerchantReturnPolicy = exports.Member = exports.Event = exports.EmailMessage = exports.Customer = exports.CreativeWork = exports.ConfirmationNumber = exports.Code = exports.CategoryCode = exports.AssetTransaction = exports.action = exports.Aggregation = exports.AdditionalProperty = exports.Action = exports.AccountTransaction = exports.AccountTitle = exports.AccountingReport = exports.Account = void 0;
|
|
3
|
+
exports.rateLimit = exports.itemAvailability = exports.Trip = exports.TransactionNumber = exports.Transaction = exports.Telemetry = exports.Task = exports.ServiceOutputIdentifier = exports.ServiceOutput = exports.Seller = exports.Role = exports.Reservation = exports.Project = exports.Product = exports.PriceSpecification = exports.Place = exports.Permit = exports.Person = exports.paymentMethod = exports.OwnershipInfo = exports.OrderNumber = exports.Order = exports.OfferCatalog = exports.Offer = exports.MerchantReturnPolicy = exports.Member = exports.Event = exports.EmailMessage = exports.Customer = exports.CreativeWork = exports.ConfirmationNumber = exports.Comment = exports.Code = exports.CategoryCode = exports.AssetTransaction = exports.action = exports.Aggregation = exports.AdditionalProperty = exports.Action = exports.AccountTransaction = exports.AccountTitle = exports.AccountingReport = exports.Account = void 0;
|
|
4
4
|
// tslint:disable:max-classes-per-file completed-docs
|
|
5
5
|
/**
|
|
6
6
|
* リポジトリ
|
|
@@ -15,6 +15,7 @@ const aggregation_1 = require("./repo/aggregation");
|
|
|
15
15
|
const assetTransaction_1 = require("./repo/assetTransaction");
|
|
16
16
|
const categoryCode_1 = require("./repo/categoryCode");
|
|
17
17
|
const code_1 = require("./repo/code");
|
|
18
|
+
const comment_1 = require("./repo/comment");
|
|
18
19
|
const creativeWork_1 = require("./repo/creativeWork");
|
|
19
20
|
const customer_1 = require("./repo/customer");
|
|
20
21
|
const emailMessage_1 = require("./repo/emailMessage");
|
|
@@ -98,6 +99,12 @@ exports.CategoryCode = CategoryCode;
|
|
|
98
99
|
class Code extends code_1.MongoRepository {
|
|
99
100
|
}
|
|
100
101
|
exports.Code = Code;
|
|
102
|
+
/**
|
|
103
|
+
* コメントリポジトリ
|
|
104
|
+
*/
|
|
105
|
+
class Comment extends comment_1.MongoRepository {
|
|
106
|
+
}
|
|
107
|
+
exports.Comment = Comment;
|
|
101
108
|
/**
|
|
102
109
|
* 確認番号リポジトリ
|
|
103
110
|
*/
|
|
@@ -220,20 +220,26 @@ function validateSeller(params) {
|
|
|
220
220
|
}
|
|
221
221
|
function processAuthorizeAccount(params, transaction, paymentServiceId) {
|
|
222
222
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
var _a;
|
|
224
|
+
const amount = (_a = params.object.paymentMethod) === null || _a === void 0 ? void 0 : _a.amount;
|
|
225
|
+
if (typeof amount !== 'number') {
|
|
226
|
+
throw new factory.errors.ArgumentNull('object.paymentMethod?.amount');
|
|
227
|
+
}
|
|
223
228
|
yield (0, validation_1.validateAccount)(params)(repos);
|
|
224
|
-
const { pendingTransaction, currency } = yield PaymentCardPayment.authorize(params, paymentServiceId)(repos);
|
|
229
|
+
const { pendingTransaction, currency, accountNumber } = yield PaymentCardPayment.authorize(params, paymentServiceId)(repos);
|
|
225
230
|
const totalPaymentDue = {
|
|
226
231
|
typeOf: 'MonetaryAmount',
|
|
227
232
|
currency,
|
|
228
|
-
value:
|
|
229
|
-
|
|
230
|
-
|
|
233
|
+
value: amount
|
|
234
|
+
// value: (typeof pendingTransaction.object.amount === 'number')
|
|
235
|
+
// ? pendingTransaction.object.amount
|
|
236
|
+
// : pendingTransaction.object.amount.value
|
|
231
237
|
};
|
|
232
238
|
const savingPendingTransaction = {
|
|
233
239
|
typeOf: pendingTransaction.typeOf,
|
|
234
240
|
id: pendingTransaction.id,
|
|
235
241
|
transactionNumber: pendingTransaction.transactionNumber,
|
|
236
|
-
object: { fromLocation: { accountNumber
|
|
242
|
+
object: { fromLocation: { accountNumber } }
|
|
237
243
|
};
|
|
238
244
|
return saveAuthorizeResult({
|
|
239
245
|
id: transaction.id,
|
|
@@ -6,13 +6,14 @@ import { MongoRepository as ProductRepo } from '../../repo/product';
|
|
|
6
6
|
import { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
7
7
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
8
8
|
import { RedisRepository as TransactionNumberRepo } from '../../repo/transactionNumber';
|
|
9
|
-
declare type IPendingTransaction = Pick<factory.account.transaction.withdraw.ITransaction, 'id' | '
|
|
9
|
+
declare type IPendingTransaction = Pick<factory.account.transaction.withdraw.ITransaction, 'id' | 'transactionNumber' | 'typeOf'>;
|
|
10
10
|
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string): (repos: {
|
|
11
11
|
product: ProductRepo;
|
|
12
12
|
project: ProjectRepo;
|
|
13
13
|
}) => Promise<{
|
|
14
14
|
pendingTransaction: IPendingTransaction;
|
|
15
15
|
currency: string;
|
|
16
|
+
accountNumber: string;
|
|
16
17
|
}>;
|
|
17
18
|
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
18
19
|
product: ProductRepo;
|
|
@@ -55,7 +55,7 @@ function authorize(params, paymentServiceId) {
|
|
|
55
55
|
// PecorinoAPIのエラーをハンドリング
|
|
56
56
|
throw (0, errorHandler_1.handlePecorinoError)(error);
|
|
57
57
|
}
|
|
58
|
-
return { pendingTransaction, currency };
|
|
58
|
+
return { pendingTransaction, currency, accountNumber };
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
exports.authorize = authorize;
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@chevre/factory": "4.289.0-alpha.6",
|
|
13
|
-
"@cinerino/sdk": "3.140.0-alpha.
|
|
13
|
+
"@cinerino/sdk": "3.140.0-alpha.8",
|
|
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.4.0-alpha.
|
|
123
|
+
"version": "20.4.0-alpha.7"
|
|
124
124
|
}
|