@chevre/domain 22.11.0-alpha.38 → 22.11.0-alpha.39
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/order/confirmPayTransaction.d.ts +6 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +3 -3
- package/lib/chevre/service/task/confirmPayTransaction.d.ts +2 -2
- package/lib/chevre/service/task/confirmPayTransaction.js +3 -2
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +5 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +3 -3
- package/lib/chevre/service/taskHandler.js +1 -0
- package/package.json +2 -2
|
@@ -8,7 +8,12 @@ import type { OrderRepo } from '../../repo/order';
|
|
|
8
8
|
import type { ProjectRepo } from '../../repo/project';
|
|
9
9
|
import type { TaskRepo } from '../../repo/task';
|
|
10
10
|
import type { TransactionRepo } from '../../repo/transaction';
|
|
11
|
-
declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction
|
|
11
|
+
declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction> & {
|
|
12
|
+
project: {
|
|
13
|
+
id: string;
|
|
14
|
+
typeOf: factory.organizationType.Project;
|
|
15
|
+
};
|
|
16
|
+
}, options: {}): (repos: {
|
|
12
17
|
acceptedOffer: AcceptedOfferRepo;
|
|
13
18
|
action: ActionRepo;
|
|
14
19
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -60,14 +60,14 @@ function createConfirmReserveTransactionTasksIfNotExist(order, simpleOrder, opti
|
|
|
60
60
|
}
|
|
61
61
|
yield Promise.all(confirmObjects.map((confirmObject) => __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
const data = {
|
|
63
|
-
project: order.project,
|
|
63
|
+
// project: order.project, // discontinue(2025-08-20~)
|
|
64
64
|
typeOf: factory.actionType.ConfirmAction,
|
|
65
65
|
object: confirmObject,
|
|
66
|
-
agent: order.project,
|
|
66
|
+
// agent: order.project, // discontinue(2025-08-20~)
|
|
67
67
|
purpose: simpleOrder
|
|
68
68
|
// instrument廃止(2024-03-13~)
|
|
69
69
|
};
|
|
70
|
-
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s',
|
|
70
|
+
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s', order.project.id, factory.taskName.ConfirmReserveTransaction, data.purpose.typeOf, data.purpose.orderNumber, data.object.typeOf, data.object.transactionNumber);
|
|
71
71
|
const confirmReserveTransactionTask = {
|
|
72
72
|
alternateName: taskIdentifier,
|
|
73
73
|
identifier: taskIdentifier,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IOperationExecute } from '../taskHandler';
|
|
1
|
+
import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
|
|
2
2
|
import * as factory from '../../factory';
|
|
3
3
|
/**
|
|
4
4
|
* タスク実行関数
|
|
5
5
|
*/
|
|
6
|
-
export declare function call(
|
|
6
|
+
export declare function call(params: Pick<factory.task.ITask<factory.taskName.ConfirmPayTransaction>, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
|
|
@@ -23,9 +23,10 @@ const confirmPayTransaction_1 = require("../order/confirmPayTransaction");
|
|
|
23
23
|
/**
|
|
24
24
|
* タスク実行関数
|
|
25
25
|
*/
|
|
26
|
-
function call(
|
|
26
|
+
function call(params) {
|
|
27
|
+
// export function call(data: factory.task.IData<factory.taskName.ConfirmPayTransaction>): IOperationExecute<void> {
|
|
27
28
|
return (_a) => __awaiter(this, [_a], void 0, function* ({ connection }) {
|
|
28
|
-
yield (0, confirmPayTransaction_1.confirmPayTransaction)(data, {})({
|
|
29
|
+
yield (0, confirmPayTransaction_1.confirmPayTransaction)(Object.assign(Object.assign({}, params.data), { project: params.project }), {})({
|
|
29
30
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
30
31
|
action: new action_1.ActionRepo(connection),
|
|
31
32
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
@@ -17,10 +17,14 @@ export declare function call(params: Pick<factory.task.ITask<factory.taskName.Co
|
|
|
17
17
|
/**
|
|
18
18
|
* 予約を確定する
|
|
19
19
|
*/
|
|
20
|
-
export declare function confirmReserveTransaction(params: factory.task.IData<factory.taskName.ConfirmReserveTransaction> & {
|
|
20
|
+
export declare function confirmReserveTransaction(params: Omit<factory.task.IData<factory.taskName.ConfirmReserveTransaction>, 'agent' | 'project'> & {
|
|
21
21
|
sameAs?: {
|
|
22
22
|
id: string;
|
|
23
23
|
};
|
|
24
|
+
project: {
|
|
25
|
+
id: string;
|
|
26
|
+
typeOf: factory.organizationType.Project;
|
|
27
|
+
};
|
|
24
28
|
}, options: {
|
|
25
29
|
sendOrder: boolean;
|
|
26
30
|
useOnOrderStatusChanged: boolean;
|
|
@@ -52,7 +52,7 @@ function call(params) {
|
|
|
52
52
|
endpoint: coaAuthClient.options.endpoint, // same as authClient(2024-07-17~)
|
|
53
53
|
auth: coaAuthClient
|
|
54
54
|
}, { timeout: settings.coa.timeout });
|
|
55
|
-
yield confirmReserveTransaction(Object.assign(Object.assign({}, params.data), { sameAs: { id: params.id } }), {
|
|
55
|
+
yield confirmReserveTransaction(Object.assign(Object.assign({}, params.data), { project: params.project, sameAs: { id: params.id } }), {
|
|
56
56
|
sendOrder: true,
|
|
57
57
|
useOnOrderStatusChanged: true
|
|
58
58
|
})({
|
|
@@ -179,8 +179,8 @@ function confirmReserveTransaction(params, options) {
|
|
|
179
179
|
default:
|
|
180
180
|
confirmActionObject = params.object;
|
|
181
181
|
}
|
|
182
|
-
const {
|
|
183
|
-
const confirmActionAttributes = Object.assign({ agent, project, purpose, typeOf, object: confirmActionObject }, (typeof (sameAs === null || sameAs === void 0 ? void 0 : sameAs.id) === 'string') ? { sameAs: { id: sameAs.id, typeOf: 'Task' } } : undefined // link sameAs(2024-06-10~)
|
|
182
|
+
const { project, purpose, typeOf, sameAs } = params;
|
|
183
|
+
const confirmActionAttributes = Object.assign({ agent: project, project, purpose, typeOf, object: confirmActionObject }, (typeof (sameAs === null || sameAs === void 0 ? void 0 : sameAs.id) === 'string') ? { sameAs: { id: sameAs.id, typeOf: 'Task' } } : undefined // link sameAs(2024-06-10~)
|
|
184
184
|
);
|
|
185
185
|
const action = yield repos.action.start(confirmActionAttributes, Object.assign({}, (recipe !== undefined) ? { recipe } : undefined // add recipe(2024-06-11~)
|
|
186
186
|
));
|
|
@@ -62,6 +62,7 @@ function executeTask(task, next) {
|
|
|
62
62
|
case factory.taskName.Refund:
|
|
63
63
|
case factory.taskName.VoidPayTransaction:
|
|
64
64
|
case factory.taskName.VoidReserveTransaction:
|
|
65
|
+
case factory.taskName.ConfirmPayTransaction:
|
|
65
66
|
case factory.taskName.ConfirmReserveTransaction:
|
|
66
67
|
case factory.taskName.ReturnPayTransaction:
|
|
67
68
|
case factory.taskName.ReturnReserveTransaction:
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.600.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.600.0",
|
|
14
|
-
"@chevre/factory": "4.396.0-alpha.
|
|
14
|
+
"@chevre/factory": "4.396.0-alpha.9",
|
|
15
15
|
"@cinerino/sdk": "11.2.0-alpha.2",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.0",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"postversion": "git push origin --tags",
|
|
116
116
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
117
117
|
},
|
|
118
|
-
"version": "22.11.0-alpha.
|
|
118
|
+
"version": "22.11.0-alpha.39"
|
|
119
119
|
}
|