@chevre/domain 21.13.0-alpha.3 → 21.13.0-alpha.4
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/service/assetTransaction/pay.d.ts +5 -0
- package/lib/chevre/service/payment/any.d.ts +6 -1
- package/lib/chevre/service/payment/creditCard.d.ts +7 -2
- package/lib/chevre/service/payment/creditCard.js +24 -16
- package/lib/chevre/service/payment.d.ts +4 -0
- package/lib/chevre/service/task/pay.js +9 -14
- package/lib/chevre/service/task/refund.js +10 -16
- package/lib/chevre/service/task/voidPayTransaction.js +10 -16
- package/lib/chevre/service/task/voidPayment.js +8 -12
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ import type { MongoRepository as ActionRepo } from '../../repo/action';
|
|
|
8
8
|
import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
9
9
|
import type { MongoRepository as EventRepo } from '../../repo/event';
|
|
10
10
|
import type { MongoRepository as OrderRepo } from '../../repo/order';
|
|
11
|
+
import type { MongoRepository as PaymentServiceProviderRepo } from '../../repo/paymentServiceProvider';
|
|
11
12
|
import type { CognitoRepository as PersonRepo } from '../../repo/person';
|
|
12
13
|
import type { MongoRepository as ProductRepo } from '../../repo/product';
|
|
13
14
|
import type { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
@@ -18,6 +19,7 @@ export interface IStartOperationRepos {
|
|
|
18
19
|
accountingReport: AccountingReportRepo;
|
|
19
20
|
action: ActionRepo;
|
|
20
21
|
event: EventRepo;
|
|
22
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
21
23
|
person: PersonRepo;
|
|
22
24
|
product: ProductRepo;
|
|
23
25
|
project: ProjectRepo;
|
|
@@ -60,6 +62,7 @@ export type ICheckOperation<T> = (repos: {
|
|
|
60
62
|
seller: SellerRepo;
|
|
61
63
|
}) => Promise<T>;
|
|
62
64
|
export type IPublishPaymentUrlOperation<T> = (repos: {
|
|
65
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
63
66
|
person: PersonRepo;
|
|
64
67
|
product: ProductRepo;
|
|
65
68
|
project: ProjectRepo;
|
|
@@ -68,6 +71,7 @@ export type IPublishPaymentUrlOperation<T> = (repos: {
|
|
|
68
71
|
export type IInvalidatePaymentUrlOperation<T> = (repos: {
|
|
69
72
|
accountingReport: AccountingReportRepo;
|
|
70
73
|
action: ActionRepo;
|
|
74
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
71
75
|
product: ProductRepo;
|
|
72
76
|
project: ProjectRepo;
|
|
73
77
|
seller: SellerRepo;
|
|
@@ -130,6 +134,7 @@ export declare function exportTasksById(params: {
|
|
|
130
134
|
export declare function searchGMOTrade(params: {
|
|
131
135
|
transactionNumber: string;
|
|
132
136
|
}): (repos: {
|
|
137
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
133
138
|
product: ProductRepo;
|
|
134
139
|
seller: SellerRepo;
|
|
135
140
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -6,7 +6,8 @@ import type { MongoRepository as AccountingReportRepo } from '../../repo/account
|
|
|
6
6
|
import type { MongoRepository as ActionRepo } from '../../repo/action';
|
|
7
7
|
import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
8
8
|
import type { MongoRepository as EventRepo } from '../../repo/event';
|
|
9
|
-
import {
|
|
9
|
+
import type { MongoRepository as PaymentServiceProviderRepo } from '../../repo/paymentServiceProvider';
|
|
10
|
+
import type { CognitoRepository as PersonRepo } from '../../repo/person';
|
|
10
11
|
import type { MongoRepository as ProductRepo } from '../../repo/product';
|
|
11
12
|
import type { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
12
13
|
import type { MongoRepository as SellerRepo } from '../../repo/seller';
|
|
@@ -25,6 +26,7 @@ declare function voidPayTransaction(params: factory.task.IData<factory.taskName.
|
|
|
25
26
|
accountingReport: AccountingReportRepo;
|
|
26
27
|
action: ActionRepo;
|
|
27
28
|
assetTransaction: AssetTransactionRepo;
|
|
29
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
28
30
|
product: ProductRepo;
|
|
29
31
|
project: ProjectRepo;
|
|
30
32
|
seller: SellerRepo;
|
|
@@ -35,6 +37,7 @@ declare function invalidatePaymentUrl(params: factory.task.IData<factory.taskNam
|
|
|
35
37
|
accountingReport: AccountingReportRepo;
|
|
36
38
|
action: ActionRepo;
|
|
37
39
|
assetTransaction: AssetTransactionRepo;
|
|
40
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
38
41
|
product: ProductRepo;
|
|
39
42
|
project: ProjectRepo;
|
|
40
43
|
seller: SellerRepo;
|
|
@@ -60,6 +63,7 @@ interface IAuthorizeRepos {
|
|
|
60
63
|
action: ActionRepo;
|
|
61
64
|
assetTransaction: AssetTransactionRepo;
|
|
62
65
|
event: EventRepo;
|
|
66
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
63
67
|
person: PersonRepo;
|
|
64
68
|
product: ProductRepo;
|
|
65
69
|
project: ProjectRepo;
|
|
@@ -71,6 +75,7 @@ interface IAuthorizeRepos {
|
|
|
71
75
|
type IAuthorizeOperation<T> = (repos: IAuthorizeRepos) => Promise<T>;
|
|
72
76
|
interface IPublishPaymentUrlRepos {
|
|
73
77
|
assetTransaction: AssetTransactionRepo;
|
|
78
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
74
79
|
person: PersonRepo;
|
|
75
80
|
product: ProductRepo;
|
|
76
81
|
project: ProjectRepo;
|
|
@@ -5,7 +5,8 @@ import * as GMO from '@motionpicture/gmo-service';
|
|
|
5
5
|
import * as factory from '../../factory';
|
|
6
6
|
import type { MongoRepository as AccountingReportRepo } from '../../repo/accountingReport';
|
|
7
7
|
import type { MongoRepository as ActionRepo } from '../../repo/action';
|
|
8
|
-
import {
|
|
8
|
+
import type { MongoRepository as PaymentServiceProviderRepo } from '../../repo/paymentServiceProvider';
|
|
9
|
+
import type { CognitoRepository as PersonRepo } from '../../repo/person';
|
|
9
10
|
import type { MongoRepository as ProductRepo } from '../../repo/product';
|
|
10
11
|
import type { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
11
12
|
import type { MongoRepository as SellerRepo } from '../../repo/seller';
|
|
@@ -14,6 +15,7 @@ import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
|
14
15
|
* クレジットカード決済承認
|
|
15
16
|
*/
|
|
16
17
|
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string, searchTrade4accountId: boolean): (repos: {
|
|
18
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
17
19
|
person: PersonRepo;
|
|
18
20
|
product: ProductRepo;
|
|
19
21
|
project: ProjectRepo;
|
|
@@ -30,6 +32,7 @@ declare function authorize(params: factory.assetTransaction.pay.IStartParamsWith
|
|
|
30
32
|
* クレジットカード決済中止
|
|
31
33
|
*/
|
|
32
34
|
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
35
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
33
36
|
product: ProductRepo;
|
|
34
37
|
project: ProjectRepo;
|
|
35
38
|
seller: SellerRepo;
|
|
@@ -40,6 +43,7 @@ declare function voidTransaction(params: factory.task.voidPayment.IData): (repos
|
|
|
40
43
|
declare function payCreditCard(params: factory.task.pay.IData): (repos: {
|
|
41
44
|
action: ActionRepo;
|
|
42
45
|
accountingReport: AccountingReportRepo;
|
|
46
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
43
47
|
product: ProductRepo;
|
|
44
48
|
project: ProjectRepo;
|
|
45
49
|
seller: SellerRepo;
|
|
@@ -51,6 +55,7 @@ declare function payCreditCard(params: factory.task.pay.IData): (repos: {
|
|
|
51
55
|
declare function refundCreditCard(params: factory.task.refund.IData, requirePayAction: boolean): (repos: {
|
|
52
56
|
action: ActionRepo;
|
|
53
57
|
accountingReport: AccountingReportRepo;
|
|
58
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
54
59
|
product: ProductRepo;
|
|
55
60
|
project: ProjectRepo;
|
|
56
61
|
seller: SellerRepo;
|
|
@@ -67,8 +72,8 @@ declare function getGMOInfoFromSeller(params: {
|
|
|
67
72
|
};
|
|
68
73
|
paymentServiceId: string;
|
|
69
74
|
}): (repos: {
|
|
75
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
70
76
|
seller: SellerRepo;
|
|
71
|
-
product: ProductRepo;
|
|
72
77
|
}) => Promise<IGMOInfo>;
|
|
73
78
|
declare function searchGMOTrade(params: {
|
|
74
79
|
availableChannel: factory.product.IAvailableChannel;
|
|
@@ -526,7 +526,7 @@ function processChangeTransaction(params) {
|
|
|
526
526
|
}
|
|
527
527
|
function getGMOInfoFromSeller(params) {
|
|
528
528
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
529
|
-
var _a, _b, _c
|
|
529
|
+
var _a, _b, _c;
|
|
530
530
|
const sellers = yield repos.seller.search({
|
|
531
531
|
limit: 1,
|
|
532
532
|
page: 1,
|
|
@@ -541,31 +541,39 @@ function getGMOInfoFromSeller(params) {
|
|
|
541
541
|
throw new factory.errors.Argument('transaction', 'payment not accepted');
|
|
542
542
|
}
|
|
543
543
|
// 決済サービスからcredentialsを取得する
|
|
544
|
-
const paymentServices = yield repos.
|
|
544
|
+
const paymentServices = yield repos.paymentServiceProvider.search({
|
|
545
545
|
limit: 1,
|
|
546
546
|
page: 1,
|
|
547
|
-
|
|
548
|
-
typeOf: { $eq: factory.service.paymentService.PaymentServiceType.CreditCard },
|
|
549
|
-
// serviceType: { codeValue: { $eq: params.paymentMethodType } },
|
|
547
|
+
provider: { id: { $eq: params.seller.id } },
|
|
550
548
|
id: { $eq: params.paymentServiceId }
|
|
551
|
-
}
|
|
549
|
+
});
|
|
550
|
+
// const paymentServices = <factory.service.paymentService.IService[]>await repos.product.search(
|
|
551
|
+
// {
|
|
552
|
+
// limit: 1,
|
|
553
|
+
// page: 1,
|
|
554
|
+
// project: { id: { $eq: seller.project.id } },
|
|
555
|
+
// typeOf: { $eq: factory.service.paymentService.PaymentServiceType.CreditCard },
|
|
556
|
+
// // serviceType: { codeValue: { $eq: params.paymentMethodType } },
|
|
557
|
+
// id: { $eq: params.paymentServiceId }
|
|
558
|
+
// },
|
|
559
|
+
// [],
|
|
560
|
+
// []
|
|
561
|
+
// );
|
|
552
562
|
const paymentService = paymentServices.shift();
|
|
553
563
|
if (paymentService === undefined) {
|
|
554
564
|
throw new factory.errors.NotFound('PaymentService');
|
|
555
565
|
}
|
|
556
|
-
const provider =
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
const
|
|
566
|
+
const provider = paymentService.provider;
|
|
567
|
+
// const provider = paymentService.provider?.find((p) => p.id === params.seller.id);
|
|
568
|
+
// if (provider === undefined) {
|
|
569
|
+
// throw new factory.errors.NotFound('PaymentService provider');
|
|
570
|
+
// }
|
|
571
|
+
const shopId = (_b = provider.credentials) === null || _b === void 0 ? void 0 : _b.shopId;
|
|
572
|
+
const shopPass = (_c = provider.credentials) === null || _c === void 0 ? void 0 : _c.shopPass;
|
|
562
573
|
if (typeof shopId !== 'string' || typeof shopPass !== 'string') {
|
|
563
574
|
throw new factory.errors.Argument('transaction', 'Provider credentials not enough');
|
|
564
575
|
}
|
|
565
|
-
return {
|
|
566
|
-
shopId,
|
|
567
|
-
shopPass
|
|
568
|
-
};
|
|
576
|
+
return { shopId, shopPass };
|
|
569
577
|
});
|
|
570
578
|
}
|
|
571
579
|
exports.getGMOInfoFromSeller = getGMOInfoFromSeller;
|
|
@@ -5,6 +5,7 @@ import type { MongoRepository as AccountingReportRepo } from '../repo/accounting
|
|
|
5
5
|
import type { MongoRepository as ActionRepo } from '../repo/action';
|
|
6
6
|
import type { MongoRepository as AssetTransactionRepo } from '../repo/assetTransaction';
|
|
7
7
|
import type { MongoRepository as EventRepo } from '../repo/event';
|
|
8
|
+
import type { MongoRepository as PaymentServiceProviderRepo } from '../repo/paymentServiceProvider';
|
|
8
9
|
import type { MongoRepository as ProductRepo } from '../repo/product';
|
|
9
10
|
import type { MongoRepository as ProjectRepo } from '../repo/project';
|
|
10
11
|
import type { MongoRepository as SellerRepo } from '../repo/seller';
|
|
@@ -18,6 +19,7 @@ export declare function pay(params: factory.task.pay.IData): (repos: {
|
|
|
18
19
|
action: ActionRepo;
|
|
19
20
|
accountingReport: AccountingReportRepo;
|
|
20
21
|
event: EventRepo;
|
|
22
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
21
23
|
product: ProductRepo;
|
|
22
24
|
project: ProjectRepo;
|
|
23
25
|
seller: SellerRepo;
|
|
@@ -26,6 +28,7 @@ export declare function pay(params: factory.task.pay.IData): (repos: {
|
|
|
26
28
|
export declare function voidPayment(params: factory.task.voidPayment.IData): (repos: {
|
|
27
29
|
action: ActionRepo;
|
|
28
30
|
accountingReport: AccountingReportRepo;
|
|
31
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
29
32
|
product: ProductRepo;
|
|
30
33
|
project: ProjectRepo;
|
|
31
34
|
seller: SellerRepo;
|
|
@@ -37,6 +40,7 @@ export declare function voidPayment(params: factory.task.voidPayment.IData): (re
|
|
|
37
40
|
export declare function refund(params: factory.task.refund.IData): (repos: {
|
|
38
41
|
action: ActionRepo;
|
|
39
42
|
accountingReport: AccountingReportRepo;
|
|
43
|
+
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
40
44
|
product: ProductRepo;
|
|
41
45
|
project: ProjectRepo;
|
|
42
46
|
seller: SellerRepo;
|
|
@@ -13,6 +13,7 @@ exports.call = void 0;
|
|
|
13
13
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
14
14
|
const action_1 = require("../../repo/action");
|
|
15
15
|
const event_1 = require("../../repo/event");
|
|
16
|
+
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
16
17
|
const product_1 = require("../../repo/product");
|
|
17
18
|
const project_1 = require("../../repo/project");
|
|
18
19
|
const seller_1 = require("../../repo/seller");
|
|
@@ -23,21 +24,15 @@ const PaymentService = require("../payment");
|
|
|
23
24
|
*/
|
|
24
25
|
function call(data) {
|
|
25
26
|
return (settings) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const accountingReportRepo = new accountingReport_1.MongoRepository(settings.connection);
|
|
27
|
-
const actionRepo = new action_1.MongoRepository(settings.connection);
|
|
28
|
-
const eventRepo = new event_1.MongoRepository(settings.connection);
|
|
29
|
-
const productRepo = new product_1.MongoRepository(settings.connection);
|
|
30
|
-
const projectRepo = new project_1.MongoRepository(settings.connection);
|
|
31
|
-
const sellerRepo = new seller_1.MongoRepository(settings.connection);
|
|
32
|
-
const taskRepo = new task_1.MongoRepository(settings.connection);
|
|
33
27
|
yield PaymentService.pay(data)({
|
|
34
|
-
accountingReport:
|
|
35
|
-
action:
|
|
36
|
-
event:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
29
|
+
action: new action_1.MongoRepository(settings.connection),
|
|
30
|
+
event: new event_1.MongoRepository(settings.connection),
|
|
31
|
+
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
32
|
+
product: new product_1.MongoRepository(settings.connection),
|
|
33
|
+
project: new project_1.MongoRepository(settings.connection),
|
|
34
|
+
seller: new seller_1.MongoRepository(settings.connection),
|
|
35
|
+
task: new task_1.MongoRepository(settings.connection)
|
|
41
36
|
});
|
|
42
37
|
});
|
|
43
38
|
}
|
|
@@ -14,6 +14,7 @@ const factory = require("../../factory");
|
|
|
14
14
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
15
15
|
const action_1 = require("../../repo/action");
|
|
16
16
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
17
|
+
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
17
18
|
const product_1 = require("../../repo/product");
|
|
18
19
|
const project_1 = require("../../repo/project");
|
|
19
20
|
const seller_1 = require("../../repo/seller");
|
|
@@ -28,23 +29,16 @@ function call(data) {
|
|
|
28
29
|
if (settings.redisClient === undefined) {
|
|
29
30
|
throw new factory.errors.Argument('settings', 'redisClient required');
|
|
30
31
|
}
|
|
31
|
-
const accountingReportRepo = new accountingReport_1.MongoRepository(settings.connection);
|
|
32
|
-
const actionRepo = new action_1.MongoRepository(settings.connection);
|
|
33
|
-
const productRepo = new product_1.MongoRepository(settings.connection);
|
|
34
|
-
const projectRepo = new project_1.MongoRepository(settings.connection);
|
|
35
|
-
const sellerRepo = new seller_1.MongoRepository(settings.connection);
|
|
36
|
-
const taskRepo = new task_1.MongoRepository(settings.connection);
|
|
37
|
-
const transactionRepo = new assetTransaction_1.MongoRepository(settings.connection);
|
|
38
|
-
const transactionNumberRepo = new transactionNumber_1.RedisRepository(settings.redisClient);
|
|
39
32
|
yield PaymentService.refund(data)({
|
|
40
|
-
accountingReport:
|
|
41
|
-
action:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
34
|
+
action: new action_1.MongoRepository(settings.connection),
|
|
35
|
+
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
36
|
+
product: new product_1.MongoRepository(settings.connection),
|
|
37
|
+
project: new project_1.MongoRepository(settings.connection),
|
|
38
|
+
seller: new seller_1.MongoRepository(settings.connection),
|
|
39
|
+
task: new task_1.MongoRepository(settings.connection),
|
|
40
|
+
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
41
|
+
transactionNumber: new transactionNumber_1.RedisRepository(settings.redisClient)
|
|
48
42
|
});
|
|
49
43
|
});
|
|
50
44
|
}
|
|
@@ -13,6 +13,7 @@ exports.call = void 0;
|
|
|
13
13
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
14
14
|
const action_1 = require("../../repo/action");
|
|
15
15
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
16
|
+
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
16
17
|
const product_1 = require("../../repo/product");
|
|
17
18
|
const project_1 = require("../../repo/project");
|
|
18
19
|
const seller_1 = require("../../repo/seller");
|
|
@@ -24,23 +25,16 @@ const AnyPaymentService = require("../payment/any");
|
|
|
24
25
|
*/
|
|
25
26
|
function call(data) {
|
|
26
27
|
return (settings) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const accountingReportRepo = new accountingReport_1.MongoRepository(settings.connection);
|
|
28
|
-
const actionRepo = new action_1.MongoRepository(settings.connection);
|
|
29
|
-
const assetTransactionRepo = new assetTransaction_1.MongoRepository(settings.connection);
|
|
30
|
-
const productRepo = new product_1.MongoRepository(settings.connection);
|
|
31
|
-
const projectRepo = new project_1.MongoRepository(settings.connection);
|
|
32
|
-
const sellerRepo = new seller_1.MongoRepository(settings.connection);
|
|
33
|
-
const taskRepo = new task_1.MongoRepository(settings.connection);
|
|
34
|
-
const transactionRepo = new transaction_1.MongoRepository(settings.connection);
|
|
35
28
|
yield AnyPaymentService.voidPayTransaction(data)({
|
|
36
|
-
accountingReport:
|
|
37
|
-
action:
|
|
38
|
-
assetTransaction:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
30
|
+
action: new action_1.MongoRepository(settings.connection),
|
|
31
|
+
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
32
|
+
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
33
|
+
product: new product_1.MongoRepository(settings.connection),
|
|
34
|
+
project: new project_1.MongoRepository(settings.connection),
|
|
35
|
+
seller: new seller_1.MongoRepository(settings.connection),
|
|
36
|
+
task: new task_1.MongoRepository(settings.connection),
|
|
37
|
+
transaction: new transaction_1.MongoRepository(settings.connection)
|
|
44
38
|
});
|
|
45
39
|
});
|
|
46
40
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.call = void 0;
|
|
13
13
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
14
14
|
const action_1 = require("../../repo/action");
|
|
15
|
+
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
15
16
|
const product_1 = require("../../repo/product");
|
|
16
17
|
const project_1 = require("../../repo/project");
|
|
17
18
|
const seller_1 = require("../../repo/seller");
|
|
@@ -22,19 +23,14 @@ const PaymentService = require("../payment");
|
|
|
22
23
|
*/
|
|
23
24
|
function call(data) {
|
|
24
25
|
return (settings) => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const accountingReportRepo = new accountingReport_1.MongoRepository(settings.connection);
|
|
26
|
-
const actionRepo = new action_1.MongoRepository(settings.connection);
|
|
27
|
-
const productRepo = new product_1.MongoRepository(settings.connection);
|
|
28
|
-
const projectRepo = new project_1.MongoRepository(settings.connection);
|
|
29
|
-
const sellerRepo = new seller_1.MongoRepository(settings.connection);
|
|
30
|
-
const taskRepo = new task_1.MongoRepository(settings.connection);
|
|
31
26
|
yield PaymentService.voidPayment(data)({
|
|
32
|
-
accountingReport:
|
|
33
|
-
action:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
28
|
+
action: new action_1.MongoRepository(settings.connection),
|
|
29
|
+
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
30
|
+
product: new product_1.MongoRepository(settings.connection),
|
|
31
|
+
project: new project_1.MongoRepository(settings.connection),
|
|
32
|
+
seller: new seller_1.MongoRepository(settings.connection),
|
|
33
|
+
task: new task_1.MongoRepository(settings.connection)
|
|
38
34
|
});
|
|
39
35
|
});
|
|
40
36
|
}
|
package/package.json
CHANGED