@chevre/domain 26.1.0-alpha.2 → 26.1.0-alpha.3
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/action/anyAction/actionProcess.d.ts +40 -1
- package/lib/chevre/repo/action/checkMovieTicket.d.ts +4 -7
- package/lib/chevre/repo/adminAction.d.ts +2 -1
- package/lib/chevre/repo/adminCheckMovieTicketAction.d.ts +2 -10
- package/lib/chevre/repo/adminCheckMovieTicketAction.js +1 -2
- package/lib/chevre/repo/factory/action/createMongoConditions.d.ts +2 -1
- package/lib/chevre/repo/factory/action/createMongoConditions.js +30 -27
- package/lib/chevre/repo/mongoose/schemas/action/checkMovieTicket.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/action/checkMovieTicket.js +0 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +30 -27
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.js +9 -1
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Connection } from 'mongoose';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
3
|
import { IModel as IActionModel, IDocType } from '../../mongoose/schemas/action';
|
|
4
|
+
import { IFindAnyActionsParams } from '../../factory/action/createMongoConditions';
|
|
4
5
|
import { ActionRecipeRepo, IActionRecipe, IRecipeAsActionAttributes } from './actionRecipe';
|
|
5
6
|
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.paymentMethod.any.IAction) : never;
|
|
6
7
|
type IAuthorizeAction = factory.action.authorize.invoice.IAction | factory.action.authorize.offer.eventService.IAction | factory.action.authorize.paymentMethod.any.IAction | factory.action.authorize.ticketedObject.IAction;
|
|
@@ -72,7 +73,45 @@ export declare class ActionProcessRepo<TAction extends IAction<factory.actionTyp
|
|
|
72
73
|
* 汎用アクション検索
|
|
73
74
|
* 継承クラスから呼ぶ想定
|
|
74
75
|
*/
|
|
75
|
-
protected findAnyActionsLegacy(params: Pick<
|
|
76
|
+
protected findAnyActionsLegacy(params: Pick<IFindAnyActionsParams, 'limit' | 'page' | 'project' | 'id' | 'actionStatus' | 'typeOf' | 'purpose' | 'sameAs'> & {
|
|
77
|
+
object?: {
|
|
78
|
+
id?: never;
|
|
79
|
+
movieTickets?: never;
|
|
80
|
+
object?: never;
|
|
81
|
+
orderNumber?: never;
|
|
82
|
+
reservationFor?: never;
|
|
83
|
+
reservationNumber?: never;
|
|
84
|
+
event?: never;
|
|
85
|
+
paymentMethod?: {
|
|
86
|
+
accountId?: {
|
|
87
|
+
$eq?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* 決済アクションの決済方法ID
|
|
91
|
+
*/
|
|
92
|
+
paymentMethodId?: {
|
|
93
|
+
$eq?: string;
|
|
94
|
+
$in?: string[];
|
|
95
|
+
};
|
|
96
|
+
typeOf?: never;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* 承認アクションの決済方法ID
|
|
100
|
+
*/
|
|
101
|
+
paymentMethodId?: {
|
|
102
|
+
$eq?: string;
|
|
103
|
+
};
|
|
104
|
+
typeOf?: {
|
|
105
|
+
$eq?: string;
|
|
106
|
+
$in?: string[];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* 確定アクション、採用アクションなどの資産取引番号
|
|
110
|
+
*/
|
|
111
|
+
transactionNumber?: {
|
|
112
|
+
$eq?: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
76
115
|
sort?: never;
|
|
77
116
|
actionStatusTypes?: never;
|
|
78
117
|
agent?: never;
|
|
@@ -6,10 +6,7 @@ export type IMinimizedPurchaseNumberAuthResult = Pick<factory.action.check.payme
|
|
|
6
6
|
knyknrNoInfoOut: Omit<factory.action.check.paymentMethod.movieTicket.IPurchaseNumberInfo, 'ykknInfo' | 'mkknInfo'>[] | null;
|
|
7
7
|
};
|
|
8
8
|
type StartableActionType = factory.actionType.CheckAction;
|
|
9
|
-
type ICheckMovieTicketAction =
|
|
10
|
-
potentialActions?: never;
|
|
11
|
-
result?: never;
|
|
12
|
-
};
|
|
9
|
+
type ICheckMovieTicketAction = factory.action.check.paymentMethod.movieTicket.IAction;
|
|
13
10
|
/**
|
|
14
11
|
* 決済カード認証アクションリポジトリ
|
|
15
12
|
*/
|
|
@@ -23,7 +20,7 @@ export declare class CheckMovieTicketActionRepo extends DedicatedActionProcessRe
|
|
|
23
20
|
*/
|
|
24
21
|
private readonly legacyActionModel;
|
|
25
22
|
constructor(connection: Connection);
|
|
26
|
-
startCheckMovieTicketAction(attributes: Pick<factory.action.check.paymentMethod.movieTicket.IAttributes, 'agent' | '
|
|
23
|
+
startCheckMovieTicketAction(attributes: Pick<factory.action.check.paymentMethod.movieTicket.IAttributes, 'agent' | 'object' | 'project' | 'purpose' | 'sameAs' | 'typeOf'> & {
|
|
27
24
|
potentialActions?: never;
|
|
28
25
|
}, options?: {
|
|
29
26
|
recipe?: IRecipeAsActionAttributes<factory.recipe.RecipeCategory.checkMovieTicket>;
|
|
@@ -47,7 +44,7 @@ export declare class CheckMovieTicketActionRepo extends DedicatedActionProcessRe
|
|
|
47
44
|
purpose?: {
|
|
48
45
|
id: string;
|
|
49
46
|
};
|
|
50
|
-
}): Promise<Pick<
|
|
47
|
+
}): Promise<Pick<import("@chevre/factory/lib/chevre/action/check/paymentMethod/movieTicket").IAction, "error" | "id" | "purpose" | "actionStatus"> | null>;
|
|
51
48
|
/**
|
|
52
49
|
* アクションIDからレシピのafterMediaを参照する
|
|
53
50
|
*/
|
|
@@ -106,6 +103,6 @@ export declare class CheckMovieTicketActionRepo extends DedicatedActionProcessRe
|
|
|
106
103
|
*/
|
|
107
104
|
id: string;
|
|
108
105
|
};
|
|
109
|
-
}): Promise<Pick<
|
|
106
|
+
}): Promise<Pick<import("@chevre/factory/lib/chevre/action/check/paymentMethod/movieTicket").IAction, "id"> | null>;
|
|
110
107
|
}
|
|
111
108
|
export {};
|
|
@@ -2,6 +2,7 @@ import type { Connection, FilterQuery } from 'mongoose';
|
|
|
2
2
|
import { factory } from '../factory';
|
|
3
3
|
import type { IDocType } from './mongoose/schemas/action';
|
|
4
4
|
import { IKeyOfProjection, IAction, IActionRecipe, ActionProcessRepo } from './action/anyAction/actionProcess';
|
|
5
|
+
import { IFindAnyActionsParams } from './factory/action/createMongoConditions';
|
|
5
6
|
type IAvailableActionRecipe = IActionRecipe<Exclude<factory.recipe.RecipeCategory, factory.recipe.RecipeCategory.publishPaymentUrl | factory.recipe.RecipeCategory.checkMovieTicket | factory.recipe.RecipeCategory.acceptCOAOffer | factory.recipe.RecipeCategory.authorizeInvoice | factory.recipe.RecipeCategory.authorizeInvoice3ds | factory.recipe.RecipeCategory.payCreditCard | factory.recipe.RecipeCategory.payMovieTicket | factory.recipe.RecipeCategory.refundCreditCard | factory.recipe.RecipeCategory.refundMovieTicket>>;
|
|
6
7
|
type StartableActionType = factory.actionType;
|
|
7
8
|
export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.paymentMethod.any.IAction) : never;
|
|
@@ -17,7 +18,7 @@ export declare class AdminActionRepo extends ActionProcessRepo<IAction<Startable
|
|
|
17
18
|
/**
|
|
18
19
|
* 汎用アクション検索
|
|
19
20
|
*/
|
|
20
|
-
adminFindAnyActions(params:
|
|
21
|
+
adminFindAnyActions(params: IFindAnyActionsParams, inclusion: IKeyOfProjection[]): Promise<IAction<StartableActionType>[]>;
|
|
21
22
|
/**
|
|
22
23
|
* 取引に対するアクションを検索する
|
|
23
24
|
*/
|
|
@@ -5,15 +5,7 @@ type IAction = IDocType & {
|
|
|
5
5
|
id: string;
|
|
6
6
|
};
|
|
7
7
|
type IKeyOfProjection = keyof IDocType;
|
|
8
|
-
type IFindParams =
|
|
9
|
-
id?: string;
|
|
10
|
-
sameAs?: {
|
|
11
|
-
id?: string;
|
|
12
|
-
};
|
|
13
|
-
purpose?: {
|
|
14
|
-
id?: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
8
|
+
type IFindParams = factory.action.check.paymentMethod.movieTicket.IFindParams;
|
|
17
9
|
/**
|
|
18
10
|
* 決済カード認証アクション(専用コレクション分離済)管理リポジトリ
|
|
19
11
|
*/
|
|
@@ -23,7 +15,7 @@ export declare class AdminCheckMovieTicketActionRepo {
|
|
|
23
15
|
*/
|
|
24
16
|
private readonly checkMovieTicketActionModel;
|
|
25
17
|
constructor(connection: Connection);
|
|
26
|
-
static CREATE_MONGO_CONDITIONS(params: Pick<IFindParams, 'id' | 'project' | 'purpose' | 'sameAs' | 'startFrom' | 'startThrough'>): FilterQuery<
|
|
18
|
+
static CREATE_MONGO_CONDITIONS(params: Pick<IFindParams, 'id' | 'project' | 'purpose' | 'sameAs' | 'startFrom' | 'startThrough'>): FilterQuery<IDocType>[];
|
|
27
19
|
findCheckMovieTicketActions(params: IFindParams, inclusion: IKeyOfProjection[]): Promise<IAction[]>;
|
|
28
20
|
}
|
|
29
21
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FilterQuery } from 'mongoose';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
3
|
import { IDocType } from '../../mongoose/schemas/action';
|
|
4
|
-
export
|
|
4
|
+
export type IFindAnyActionsParams = factory.action.ISearchConditions;
|
|
5
|
+
export declare function createMongoConditions(params: IFindAnyActionsParams): FilterQuery<IDocType>[];
|
|
@@ -75,24 +75,26 @@ function createMongoConditions(params) {
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
78
|
+
// 認証アクションのコレクション分離につき廃止(2026-08-21~)
|
|
79
|
+
// const objectMovieTicketsIdentifierEq = params.object?.movieTickets?.identifier?.$eq;
|
|
80
|
+
// if (typeof objectMovieTicketsIdentifierEq === 'string') {
|
|
81
|
+
// andConditions.push({
|
|
82
|
+
// 'object.movieTickets.identifier': {
|
|
83
|
+
// $exists: true,
|
|
84
|
+
// $eq: objectMovieTicketsIdentifierEq
|
|
85
|
+
// }
|
|
86
|
+
// });
|
|
87
|
+
// }
|
|
88
|
+
// 認証アクションのコレクション分離につき廃止(2026-08-21~)
|
|
89
|
+
// const objectMovieTicketsServiceOutputReservationForIdEq = params.object?.movieTickets?.serviceOutput?.reservationFor?.id?.$eq;
|
|
90
|
+
// if (typeof objectMovieTicketsServiceOutputReservationForIdEq === 'string') {
|
|
91
|
+
// andConditions.push({
|
|
92
|
+
// 'object.movieTickets.serviceOutput.reservationFor.id': {
|
|
93
|
+
// $exists: true,
|
|
94
|
+
// $eq: objectMovieTicketsServiceOutputReservationForIdEq
|
|
95
|
+
// }
|
|
96
|
+
// });
|
|
97
|
+
// }
|
|
96
98
|
const objectPaymentMethodIdEq = params.object?.paymentMethodId?.$eq;
|
|
97
99
|
if (typeof objectPaymentMethodIdEq === 'string') {
|
|
98
100
|
andConditions.push({
|
|
@@ -165,15 +167,16 @@ function createMongoConditions(params) {
|
|
|
165
167
|
}
|
|
166
168
|
});
|
|
167
169
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
170
|
+
// 認証アクションのコレクション分離につき廃止(2026-08-21~)
|
|
171
|
+
// const objectPaymentMethodTypeOfEq = params.object?.paymentMethod?.typeOf?.$eq;
|
|
172
|
+
// if (typeof objectPaymentMethodTypeOfEq === 'string') {
|
|
173
|
+
// andConditions.push({
|
|
174
|
+
// 'object.paymentMethod.typeOf': {
|
|
175
|
+
// $exists: true,
|
|
176
|
+
// $eq: objectPaymentMethodTypeOfEq
|
|
177
|
+
// }
|
|
178
|
+
// });
|
|
179
|
+
// }
|
|
177
180
|
const objectTypeOfEq = params.object?.typeOf?.$eq;
|
|
178
181
|
if (typeof objectTypeOfEq === 'string') {
|
|
179
182
|
andConditions.push({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
|
|
2
2
|
import { IVirtuals } from '../../virtuals';
|
|
3
3
|
import { factory } from '../../../../factory';
|
|
4
|
-
type IDocType = Pick<factory.action.check.paymentMethod.movieTicket.IAction, 'actionStatus' | 'agent' | 'endDate' | 'error' | 'expires' | '
|
|
4
|
+
type IDocType = Pick<factory.action.check.paymentMethod.movieTicket.IAction, 'actionStatus' | 'agent' | 'endDate' | 'error' | 'expires' | 'object' | 'project' | 'purpose' | 'sameAs' | 'startDate' | 'typeOf'>;
|
|
5
5
|
type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
|
|
6
6
|
type ISchemaDefinition = SchemaDefinition<IDocType>;
|
|
7
7
|
type ISchema = Schema<IDocType, IModel, Record<string, never>, Record<string, never>, IVirtuals, Record<string, never>, ISchemaDefinition, IDocType>;
|
|
@@ -18,10 +18,7 @@ const schemaDefinition = {
|
|
|
18
18
|
error: mongoose_1.SchemaTypes.Mixed,
|
|
19
19
|
endDate: Date,
|
|
20
20
|
purpose: mongoose_1.SchemaTypes.Mixed,
|
|
21
|
-
instrument: mongoose_1.SchemaTypes.Mixed,
|
|
22
21
|
sameAs: mongoose_1.SchemaTypes.Mixed,
|
|
23
|
-
// potentialActions: SchemaTypes.Mixed,
|
|
24
|
-
// result: SchemaTypes.Mixed,
|
|
25
22
|
};
|
|
26
23
|
const schemaOptions = {
|
|
27
24
|
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
@@ -173,24 +173,26 @@ const indexes = [
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
],
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
176
|
+
// 認証アクションのコレクション分離につき廃止(2026-08-21~)
|
|
177
|
+
// [
|
|
178
|
+
// { 'object.movieTickets.identifier': 1, startDate: -1 },
|
|
179
|
+
// {
|
|
180
|
+
// name: 'searchByObjectMovieTicketsIdentifier',
|
|
181
|
+
// partialFilterExpression: {
|
|
182
|
+
// 'object.movieTickets.identifier': { $exists: true }
|
|
183
|
+
// }
|
|
184
|
+
// }
|
|
185
|
+
// ],
|
|
186
|
+
// 認証アクションのコレクション分離につき廃止(2026-08-21~)
|
|
187
|
+
// [
|
|
188
|
+
// { 'object.movieTickets.serviceOutput.reservationFor.id': 1, startDate: -1 },
|
|
189
|
+
// {
|
|
190
|
+
// name: 'searchByObjectMovieTicketsServiceOutputReservationForId',
|
|
191
|
+
// partialFilterExpression: {
|
|
192
|
+
// 'object.movieTickets.serviceOutput.reservationFor.id': { $exists: true }
|
|
193
|
+
// }
|
|
194
|
+
// }
|
|
195
|
+
// ],
|
|
194
196
|
[
|
|
195
197
|
{ 'object.paymentMethod.accountId': 1, startDate: -1 },
|
|
196
198
|
{
|
|
@@ -209,15 +211,16 @@ const indexes = [
|
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
],
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
// 認証アクションのコレクション分離につき廃止(2026-08-21~)
|
|
215
|
+
// [
|
|
216
|
+
// { 'object.paymentMethod.typeOf': 1, startDate: -1 },
|
|
217
|
+
// {
|
|
218
|
+
// name: 'searchByObjectPaymentMethodTypeOf',
|
|
219
|
+
// partialFilterExpression: {
|
|
220
|
+
// 'object.paymentMethod.typeOf': { $exists: true }
|
|
221
|
+
// }
|
|
222
|
+
// }
|
|
223
|
+
// ],
|
|
221
224
|
[
|
|
222
225
|
{ 'object.paymentMethodId': 1, startDate: -1 },
|
|
223
226
|
{
|
|
@@ -85,7 +85,15 @@ const indexes = [
|
|
|
85
85
|
[
|
|
86
86
|
{ 'recipeFor.id': 1, dateCreated: -1 },
|
|
87
87
|
{ name: 'searchByRecipeForId' }
|
|
88
|
-
]
|
|
88
|
+
],
|
|
89
|
+
// テスト環境ではユニークインデックス適用済(2026-08-21~)
|
|
90
|
+
// [
|
|
91
|
+
// { 'recipeFor.id': 1 }, // support unique index(2026-08-21~)
|
|
92
|
+
// {
|
|
93
|
+
// unique: true,
|
|
94
|
+
// name: 'uniqueActionId'
|
|
95
|
+
// }
|
|
96
|
+
// ]
|
|
89
97
|
];
|
|
90
98
|
exports.indexes = indexes;
|
|
91
99
|
/**
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.1090.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.1090.0",
|
|
14
|
-
"@chevre/factory": "10.
|
|
14
|
+
"@chevre/factory": "10.4.0-alpha.1",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"postversion": "git push origin --tags",
|
|
89
89
|
"prepublishOnly": "npm run clean && npm run build"
|
|
90
90
|
},
|
|
91
|
-
"version": "26.1.0-alpha.
|
|
91
|
+
"version": "26.1.0-alpha.3"
|
|
92
92
|
}
|