@chevre/domain 24.0.0-alpha.26 → 24.0.0-alpha.28
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/errorHandler.js +1 -1
- package/lib/chevre/repo/accountTitle.d.ts +7 -3
- package/lib/chevre/repo/action/acceptCOAOffer.js +0 -2
- package/lib/chevre/repo/action/acceptPay.d.ts +4 -0
- package/lib/chevre/repo/action/acceptPay.js +40 -52
- package/lib/chevre/repo/action/actionProcess.d.ts +31 -1
- package/lib/chevre/repo/action/actionProcess.js +499 -4
- package/lib/chevre/repo/action/authorizeInvoice.d.ts +14 -1
- package/lib/chevre/repo/action/authorizeInvoice.js +36 -0
- package/lib/chevre/repo/action/authorizePaymentMethod.js +9 -47
- package/lib/chevre/repo/action.d.ts +8 -8
- package/lib/chevre/repo/action.js +2 -510
- package/lib/chevre/repo/aggregateOffer.d.ts +7 -3
- package/lib/chevre/repo/assetTransaction.d.ts +48 -22
- package/lib/chevre/repo/categoryCode.d.ts +8 -3
- package/lib/chevre/repo/comment.d.ts +7 -3
- package/lib/chevre/repo/creativeWork.d.ts +8 -7
- package/lib/chevre/repo/customer.d.ts +8 -3
- package/lib/chevre/repo/event.d.ts +11 -23
- package/lib/chevre/repo/event.js +22 -23
- package/lib/chevre/repo/eventSeries.d.ts +10 -4
- package/lib/chevre/repo/identity.d.ts +12 -3
- package/lib/chevre/repo/identityProvider.d.ts +7 -18
- package/lib/chevre/repo/issuer.d.ts +8 -8
- package/lib/chevre/repo/member.d.ts +7 -3
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +7 -3
- package/lib/chevre/repo/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/identity.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +3 -1
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +5 -2
- package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +1 -1
- package/lib/chevre/repo/movieTicketType.d.ts +2 -1
- package/lib/chevre/repo/offerCatalog.d.ts +8 -4
- package/lib/chevre/repo/order.d.ts +10 -4
- package/lib/chevre/repo/ownershipInfo.d.ts +8 -7
- package/lib/chevre/repo/paymentService.d.ts +8 -8
- package/lib/chevre/repo/place/movieTheater.d.ts +7 -3
- package/lib/chevre/repo/place/screeningRoom.d.ts +7 -3
- package/lib/chevre/repo/potentialAction.d.ts +7 -26
- package/lib/chevre/repo/priceSpecification.d.ts +47 -22
- package/lib/chevre/repo/priceSpecification.js +0 -6
- package/lib/chevre/repo/product.d.ts +7 -3
- package/lib/chevre/repo/project.d.ts +8 -11
- package/lib/chevre/repo/reservation.d.ts +18 -6
- package/lib/chevre/repo/reserveInterface.js +4 -4
- package/lib/chevre/repo/role.d.ts +39 -3
- package/lib/chevre/repo/schedule.js +1 -1
- package/lib/chevre/repo/seller.d.ts +7 -50
- package/lib/chevre/repo/task.d.ts +7 -67
- package/lib/chevre/repo/transaction.d.ts +103 -13
- package/lib/chevre/service/order/sendOrder.js +0 -1
- package/lib/chevre/service/payment/creditCard/voidTransaction.d.ts +9 -8
- package/lib/chevre/service/payment/creditCard/voidTransaction.js +15 -7
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +2 -0
- package/lib/chevre/service/task/voidPayment.js +2 -0
- package/package.json +3 -3
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import { Settings } from '../../../settings';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
4
4
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
5
5
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
6
6
|
import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
11
|
-
action: ActionRepo;
|
|
7
|
+
interface IVoidTransactionRepos {
|
|
8
|
+
authorizeInvoiceAction: AuthorizeInvoiceActionRepo;
|
|
12
9
|
paymentAccepted: SellerPaymentAcceptedRepo;
|
|
13
10
|
paymentService: PaymentServiceRepo;
|
|
14
11
|
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
15
|
-
}
|
|
16
|
-
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* クレジットカード決済中止
|
|
15
|
+
*/
|
|
16
|
+
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: IVoidTransactionRepos, settings: Settings) => Promise<void>;
|
|
17
|
+
export { IVoidTransactionRepos, voidTransaction };
|
|
@@ -57,12 +57,20 @@ function voidTransaction(params) {
|
|
|
57
57
|
requirePaymentAccepted: false
|
|
58
58
|
})(repos);
|
|
59
59
|
// authorizeInvoiceActionが存在すれば取消(2024-06-13~)
|
|
60
|
-
const authorizeInvoiceAction = (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
// const authorizeInvoiceAction = (<Pick<factory.action.authorize.invoice.IAction, 'id' | 'typeOf' | 'project'>[]>
|
|
61
|
+
// await repos.action.search(
|
|
62
|
+
// {
|
|
63
|
+
// limit: 1,
|
|
64
|
+
// page: 1,
|
|
65
|
+
// typeOf: { $eq: factory.actionType.AuthorizeAction },
|
|
66
|
+
// object: { paymentMethodId: { $eq: paymentMethodId } },
|
|
67
|
+
// sameAs: { id: { $eq: transaction.id } }
|
|
68
|
+
// },
|
|
69
|
+
// ['id', 'typeOf', 'project']
|
|
70
|
+
// )).shift();
|
|
71
|
+
const authorizeInvoiceAction = (await repos.authorizeInvoiceAction.findAuthorizeInvoiceActionsByPayTransaction({
|
|
72
|
+
paymentMethodId,
|
|
73
|
+
payTransactionId: transaction.id
|
|
66
74
|
}, ['id', 'typeOf', 'project'])).shift();
|
|
67
75
|
if (authorizeInvoiceAction !== undefined) {
|
|
68
76
|
const cancelAction = {
|
|
@@ -70,7 +78,7 @@ function voidTransaction(params) {
|
|
|
70
78
|
agent: { id: authorizeInvoiceAction.project.id, typeOf: factory.organizationType.Project }
|
|
71
79
|
// ...(typeof params.sameAs?.id === 'string') ? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } } : undefined
|
|
72
80
|
};
|
|
73
|
-
await repos.
|
|
81
|
+
await repos.authorizeInvoiceAction.cancelWithVoid({ typeOf: authorizeInvoiceAction.typeOf, id: authorizeInvoiceAction.id, cancelAction });
|
|
74
82
|
}
|
|
75
83
|
const creditCardService = new GMO.service.Credit({
|
|
76
84
|
endpoint: String(availableChannel.serviceUrl),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AccountingReportRepo } from '../../../repo/accountingReport';
|
|
2
2
|
import type { ActionRepo } from '../../../repo/action';
|
|
3
|
+
import type { AuthorizeInvoiceActionRepo } from '../../../repo/action/authorizeInvoice';
|
|
3
4
|
import type { CredentialsRepo } from '../../../repo/credentials';
|
|
4
5
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
5
6
|
import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
@@ -11,6 +12,7 @@ import * as factory from '../../../factory';
|
|
|
11
12
|
import { Settings } from '../../../settings';
|
|
12
13
|
declare function voidPaymentByTask(params: factory.task.voidPayment.IData): (repos: {
|
|
13
14
|
action: ActionRepo;
|
|
15
|
+
authorizeInvoiceAction: AuthorizeInvoiceActionRepo;
|
|
14
16
|
accountingReport: AccountingReportRepo;
|
|
15
17
|
credentials: CredentialsRepo;
|
|
16
18
|
paymentAccepted: SellerPaymentAcceptedRepo;
|
|
@@ -27,6 +27,7 @@ exports.call = call;
|
|
|
27
27
|
const factory = __importStar(require("../../factory"));
|
|
28
28
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
29
29
|
const action_1 = require("../../repo/action");
|
|
30
|
+
const authorizeInvoice_1 = require("../../repo/action/authorizeInvoice");
|
|
30
31
|
const credentials_1 = require("../../repo/credentials");
|
|
31
32
|
const paymentService_1 = require("../../repo/paymentService");
|
|
32
33
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
@@ -50,6 +51,7 @@ function call(data) {
|
|
|
50
51
|
await (0, voidPaymentByTask_1.voidPaymentByTask)(data)({
|
|
51
52
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
52
53
|
action: new action_1.ActionRepo(connection),
|
|
54
|
+
authorizeInvoiceAction: new authorizeInvoice_1.AuthorizeInvoiceActionRepo(connection),
|
|
53
55
|
credentials: new credentials_1.CredentialsRepo(redisClient, {
|
|
54
56
|
scope: `${factory.service.paymentService.PaymentServiceType.MovieTicket}:${paymentServiceId}`,
|
|
55
57
|
expireInSeconds: (useCredentialsRepo) ? credentialsExpireInSeconds : 0
|
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"googleapis": "^85.0.0",
|
|
55
55
|
"jose": "6.0.12",
|
|
56
56
|
"json2csv": "4.5.4",
|
|
57
|
-
"mongoose": "8.0
|
|
57
|
+
"mongoose": "8.23.0",
|
|
58
58
|
"redis": "4.6.5",
|
|
59
59
|
"rimraf": "^2.7.1",
|
|
60
60
|
"size-limit": "12.0.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"vitest": "4.0.18"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"mongoose": "^8.
|
|
66
|
+
"mongoose": "^8.23.0",
|
|
67
67
|
"redis": "^4.6.5"
|
|
68
68
|
},
|
|
69
69
|
"engines": {
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"postversion": "git push origin --tags",
|
|
100
100
|
"prepublishOnly": "npm run clean && npm run build"
|
|
101
101
|
},
|
|
102
|
-
"version": "24.0.0-alpha.
|
|
102
|
+
"version": "24.0.0-alpha.28"
|
|
103
103
|
}
|