@chevre/domain 25.2.0-alpha.51 → 25.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import type { AcceptPayActionRepo } from '../../../repo/action/acceptPay';
|
|
3
|
+
import type { AsyncActionRepo } from '../../../repo/asyncAction';
|
|
3
4
|
import type { TaskRepo } from '../../../repo/task';
|
|
4
5
|
interface IFindAcceptActionResult {
|
|
5
6
|
/**
|
|
@@ -38,8 +39,11 @@ declare function findAcceptAction(params: {
|
|
|
38
39
|
*/
|
|
39
40
|
id: string;
|
|
40
41
|
};
|
|
42
|
+
}, options: {
|
|
43
|
+
useAsyncAction: boolean;
|
|
41
44
|
}): (repos: {
|
|
42
45
|
acceptPayAction: AcceptPayActionRepo;
|
|
46
|
+
asyncAction: AsyncActionRepo;
|
|
43
47
|
task: TaskRepo;
|
|
44
48
|
}) => Promise<IFindAcceptActionResult>;
|
|
45
49
|
export { findAcceptAction, };
|
|
@@ -2,16 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findAcceptAction = findAcceptAction;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
function findAcceptAction(params) {
|
|
5
|
+
function findAcceptAction(params, options) {
|
|
6
6
|
return async (repos) => {
|
|
7
|
-
//
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
// 非同期アクションに対応(2026-07-28~)
|
|
8
|
+
const { useAsyncAction } = options;
|
|
9
|
+
let task;
|
|
10
|
+
if (useAsyncAction) {
|
|
11
|
+
// まず非同期アクションを参照
|
|
12
|
+
task = await repos.asyncAction.findAsyncActionById({
|
|
13
|
+
id: { $eq: params.sameAs.id },
|
|
14
|
+
project: { id: { $eq: params.project.id } },
|
|
15
|
+
name: factory_1.factory.taskName.PublishPaymentUrl
|
|
16
|
+
}, ['status', 'executionResults']);
|
|
17
|
+
}
|
|
18
|
+
// 非同期アクションが存在しなければタスクを参照
|
|
19
|
+
if (task === undefined) {
|
|
20
|
+
task = (await repos.task.projectFields({
|
|
21
|
+
limit: 1,
|
|
22
|
+
page: 1,
|
|
23
|
+
id: { $eq: params.sameAs.id },
|
|
24
|
+
project: { id: { $eq: params.project.id } },
|
|
25
|
+
name: factory_1.factory.taskName.PublishPaymentUrl
|
|
26
|
+
}, ['status', 'executionResults'])).shift();
|
|
27
|
+
}
|
|
15
28
|
if (task === undefined) {
|
|
16
29
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.taskName.PublishPaymentUrl);
|
|
17
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../../factory';
|
|
2
2
|
import type { AuthorizePaymentMethodActionRepo } from '../../../repo/action/authorizePaymentMethod';
|
|
3
|
+
import type { AsyncActionRepo } from '../../../repo/asyncAction';
|
|
3
4
|
import type { TaskRepo } from '../../../repo/task';
|
|
4
5
|
interface IFindAuthorizeActionResult {
|
|
5
6
|
/**
|
|
@@ -20,6 +21,7 @@ interface IFindAuthorizeActionResult {
|
|
|
20
21
|
}
|
|
21
22
|
interface IFindAuthorizeActionRepos {
|
|
22
23
|
authorizePaymentMethodAction: AuthorizePaymentMethodActionRepo;
|
|
24
|
+
asyncAction: AsyncActionRepo;
|
|
23
25
|
task: TaskRepo;
|
|
24
26
|
}
|
|
25
27
|
declare function findAuthorizeAction(params: {
|
|
@@ -38,5 +40,7 @@ declare function findAuthorizeAction(params: {
|
|
|
38
40
|
*/
|
|
39
41
|
id: string;
|
|
40
42
|
};
|
|
43
|
+
}, options: {
|
|
44
|
+
useAsyncAction: boolean;
|
|
41
45
|
}): (repos: IFindAuthorizeActionRepos) => Promise<IFindAuthorizeActionResult>;
|
|
42
46
|
export { IFindAuthorizeActionRepos, findAuthorizeAction, };
|
|
@@ -2,16 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findAuthorizeAction = findAuthorizeAction;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
function findAuthorizeAction(params) {
|
|
5
|
+
function findAuthorizeAction(params, options) {
|
|
6
6
|
return async (repos) => {
|
|
7
|
-
//
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
// 非同期アクションに対応(2026-07-28~)
|
|
8
|
+
const { useAsyncAction } = options;
|
|
9
|
+
let task;
|
|
10
|
+
if (useAsyncAction) {
|
|
11
|
+
// まず非同期アクションを参照
|
|
12
|
+
task = await repos.asyncAction.findAsyncActionById({
|
|
13
|
+
id: { $eq: params.sameAs.id },
|
|
14
|
+
project: { id: { $eq: params.project.id } },
|
|
15
|
+
name: factory_1.factory.taskName.AuthorizePayment
|
|
16
|
+
}, ['status', 'executionResults']);
|
|
17
|
+
}
|
|
18
|
+
// 非同期アクションが存在しなければタスクを参照
|
|
19
|
+
if (task === undefined) {
|
|
20
|
+
task = (await repos.task.projectFields({
|
|
21
|
+
limit: 1,
|
|
22
|
+
page: 1,
|
|
23
|
+
id: { $eq: params.sameAs.id },
|
|
24
|
+
project: { id: { $eq: params.project.id } },
|
|
25
|
+
name: factory_1.factory.taskName.AuthorizePayment
|
|
26
|
+
}, ['status', 'executionResults'])).shift();
|
|
27
|
+
}
|
|
15
28
|
if (task === undefined) {
|
|
16
29
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.taskName.AuthorizePayment);
|
|
17
30
|
}
|
package/package.json
CHANGED