@chevre/domain 28.2.0-alpha.1 → 28.2.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/inform.d.ts +2 -1
- package/lib/chevre/repo/action/update.d.ts +2 -1
- package/lib/chevre/repo/action/use.d.ts +2 -1
- package/lib/chevre/repo/additionalProperty.d.ts +4 -2
- package/lib/chevre/repo/additionalProperty.js +6 -7
- package/lib/chevre/repo/adminAction.d.ts +3 -2
- package/lib/chevre/repo/adminAssetTransaction.d.ts +3 -2
- package/lib/chevre/repo/adminAsyncAction.d.ts +3 -2
- package/lib/chevre/repo/adminCheckMovieTicketAction.d.ts +2 -1
- package/lib/chevre/repo/adminEvent.d.ts +4 -2
- package/lib/chevre/repo/adminEventSeries.d.ts +4 -2
- package/lib/chevre/repo/adminPaymentServiceChannel.d.ts +2 -1
- package/lib/chevre/repo/adminPendingReservation.d.ts +4 -3
- package/lib/chevre/repo/adminScheduledTask.d.ts +3 -2
- package/lib/chevre/repo/adminTask.d.ts +5 -4
- package/lib/chevre/repo/aggregateOffer.d.ts +6 -5
- package/lib/chevre/repo/aggregateOffer.js +0 -1
- package/lib/chevre/repo/assetTransaction.d.ts +4 -2
- package/lib/chevre/repo/authorization.d.ts +5 -3
- package/lib/chevre/repo/categoryCode.d.ts +5 -4
- package/lib/chevre/repo/categoryCode.js +0 -1
- package/lib/chevre/repo/creativeWork.d.ts +5 -4
- package/lib/chevre/repo/creativeWork.js +8 -9
- package/lib/chevre/repo/customer.d.ts +3 -2
- package/lib/chevre/repo/customerType.d.ts +4 -3
- package/lib/chevre/repo/emailMessage.d.ts +2 -1
- package/lib/chevre/repo/event.d.ts +4 -2
- package/lib/chevre/repo/eventOffer.d.ts +2 -1
- package/lib/chevre/repo/eventSeries.d.ts +4 -2
- package/lib/chevre/repo/factory/action/createMongoConditions.d.ts +1 -1
- package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +3 -2
- package/lib/chevre/repo/identity.d.ts +3 -2
- package/lib/chevre/repo/identityProvider.d.ts +3 -2
- package/lib/chevre/repo/issuer.d.ts +3 -2
- package/lib/chevre/repo/issuer.js +6 -7
- package/lib/chevre/repo/member.d.ts +4 -3
- package/lib/chevre/repo/message.d.ts +4 -3
- package/lib/chevre/repo/mongoose/types.d.ts +2 -0
- package/lib/chevre/repo/mongoose/types.js +2 -0
- package/lib/chevre/repo/movieTicketType.d.ts +2 -1
- package/lib/chevre/repo/movieTicketType.js +0 -4
- package/lib/chevre/repo/note.d.ts +4 -2
- package/lib/chevre/repo/noteAboutOrder.d.ts +5 -3
- package/lib/chevre/repo/noteAboutOrder.js +1 -1
- package/lib/chevre/repo/offerCatalog.d.ts +3 -2
- package/lib/chevre/repo/offerCatalog.js +5 -6
- package/lib/chevre/repo/offerCatalogItem.d.ts +2 -1
- package/lib/chevre/repo/offerCatalogItem.js +9 -7
- package/lib/chevre/repo/order.d.ts +4 -3
- package/lib/chevre/repo/paymentService.d.ts +4 -3
- package/lib/chevre/repo/paymentServiceProvider.d.ts +4 -2
- package/lib/chevre/repo/place/movieTheater.d.ts +4 -3
- package/lib/chevre/repo/place/movieTheater.js +6 -7
- package/lib/chevre/repo/place/screeningRoom.d.ts +3 -2
- package/lib/chevre/repo/place/section.js +1 -1
- package/lib/chevre/repo/potentialAction.d.ts +3 -2
- package/lib/chevre/repo/product.d.ts +4 -3
- package/lib/chevre/repo/project.d.ts +4 -3
- package/lib/chevre/repo/role.d.ts +2 -1
- package/lib/chevre/repo/seller.d.ts +4 -3
- package/lib/chevre/repo/sellerReturnPolicy.d.ts +4 -2
- package/lib/chevre/repo/setting.d.ts +4 -3
- package/lib/chevre/repo/ticket.d.ts +4 -3
- package/lib/chevre/repo/transaction/placeOrder.d.ts +16 -2
- package/lib/chevre/repo/webSite.d.ts +5 -3
- package/lib/chevre/repo/webSite.js +1 -1
- package/lib/chevre/service/reserve/findByCode.d.ts +3 -1
- package/lib/chevre/service/reserve/findByCode.js +18 -14
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Connection
|
|
1
|
+
import type { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from '../mongoose/types';
|
|
2
3
|
import { factory } from '../../factory';
|
|
3
4
|
type IKeyOfProjection = 'agent' | 'endDate' | 'expires' | 'project' | 'startDate' | 'status' | 'typeOf' | 'instrument' | 'object' | 'seller' | 'result' | 'tasksExportAction';
|
|
4
5
|
export type ITransactionInProgress = Pick<factory.transaction.placeOrder.ITransaction, IKeyOfProjection> & {
|
|
@@ -24,7 +25,20 @@ type IFindParams = Pick<factory.transaction.placeOrder.ISearchConditions, 'agent
|
|
|
24
25
|
export declare class PlaceOrderRepo {
|
|
25
26
|
private readonly transactionModel;
|
|
26
27
|
constructor(connection: Connection);
|
|
27
|
-
static CREATE_MONGO_CONDITIONS(params: IFindParams): FilterQuery<
|
|
28
|
+
static CREATE_MONGO_CONDITIONS(params: IFindParams): FilterQuery<{
|
|
29
|
+
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
30
|
+
endDate?: Date | undefined;
|
|
31
|
+
startDate: Date;
|
|
32
|
+
typeOf: factory.transactionType.PlaceOrder;
|
|
33
|
+
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
34
|
+
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
35
|
+
expires: Date;
|
|
36
|
+
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
37
|
+
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
38
|
+
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
39
|
+
status: factory.transactionStatusType;
|
|
40
|
+
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction/placeOrder").ITasksExportAction | undefined;
|
|
41
|
+
}>[];
|
|
28
42
|
countPlaceOrder(params: IFindParams): Promise<{
|
|
29
43
|
count: number;
|
|
30
44
|
}>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Connection
|
|
1
|
+
import { Connection } from 'mongoose';
|
|
2
|
+
import type { FilterQuery } from './mongoose/types';
|
|
2
3
|
import { factory } from '../factory';
|
|
4
|
+
import { IDocType } from './mongoose/schemas/webSite';
|
|
3
5
|
export type ISavingWebSite = Pick<factory.creativeWork.certification.webSite.ICertification, 'about' | 'certificationStatus' | 'project' | 'auditDate'> & {
|
|
4
6
|
id?: never;
|
|
5
7
|
datePublished?: never;
|
|
@@ -19,8 +21,8 @@ type IKeyOfProjection = keyof factory.creativeWork.certification.webSite.ICertif
|
|
|
19
21
|
export declare class WebSiteRepo {
|
|
20
22
|
private readonly webSiteModel;
|
|
21
23
|
constructor(connection: Connection);
|
|
22
|
-
static CREATE_FILTER_QUERY(params: factory.creativeWork.certification.webSite.ISearchConditions): FilterQuery<
|
|
23
|
-
|
|
24
|
+
static CREATE_FILTER_QUERY(params: factory.creativeWork.certification.webSite.ISearchConditions): FilterQuery<IDocType>[];
|
|
25
|
+
saveWebiSite(params: {
|
|
24
26
|
id?: string;
|
|
25
27
|
attributes: ISavingWebSite & IUnset;
|
|
26
28
|
}): Promise<{
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
3
3
|
import type { AuthorizationRepo } from '../../repo/authorization';
|
|
4
|
+
import type { OfferRepo } from '../../repo/offer/unitPriceInCatalog';
|
|
4
5
|
import type { OrderRepo } from '../../repo/order';
|
|
5
6
|
import type { ReservationRepo } from '../../repo/reservation';
|
|
6
7
|
type IReservationResult = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'additionalTicketText' | 'checkedIn' | 'reservationStatus'> & {
|
|
7
8
|
reservedTicket: {
|
|
8
|
-
ticketType
|
|
9
|
+
ticketType?: Pick<factory.assetTransaction.reserve.ITicketType, 'identifier'> & {
|
|
9
10
|
name: {
|
|
10
11
|
ja?: string;
|
|
11
12
|
};
|
|
@@ -30,6 +31,7 @@ declare function findByCode(params: {
|
|
|
30
31
|
}): (repos: {
|
|
31
32
|
acceptedOffer: AcceptedOfferRepo;
|
|
32
33
|
authorization: AuthorizationRepo;
|
|
34
|
+
offer: OfferRepo;
|
|
33
35
|
order: OrderRepo;
|
|
34
36
|
reservation: ReservationRepo;
|
|
35
37
|
}) => Promise<{
|
|
@@ -46,10 +46,22 @@ function findByCode(params) {
|
|
|
46
46
|
if (acceptedOffer.itemOffered.typeOf !== factory_1.factory.reservationType.EventReservation) {
|
|
47
47
|
throw new factory_1.factory.errors.Argument('id', `itemOffered.typeOf must be ${factory_1.factory.reservationType.EventReservation}`);
|
|
48
48
|
}
|
|
49
|
-
ticketType
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
// acceptedOffer.itemOffered.reservedTicket.ticketType廃止につき、単価オファー情報を参照(2026-11-11~)
|
|
50
|
+
const unitPriceOffer = (await repos.offer.findUnitPriceOffers({
|
|
51
|
+
id: { $eq: String(acceptedOffer.id) },
|
|
52
|
+
project: { id: { $eq: params.project.id } }
|
|
53
|
+
}, { identifier: 1, name: 1 })).shift();
|
|
54
|
+
// console.log('findByCode: unitPriceOffer found.', unitPriceOffer);
|
|
55
|
+
if (unitPriceOffer !== undefined) {
|
|
56
|
+
ticketType = {
|
|
57
|
+
identifier: unitPriceOffer.identifier,
|
|
58
|
+
name: { ja: unitPriceOffer.name?.ja }
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// ticketType = {
|
|
62
|
+
// identifier: acceptedOffer.itemOffered.reservedTicket.ticketType.identifier,
|
|
63
|
+
// name: { ja: acceptedOffer.itemOffered.reservedTicket.ticketType.name?.ja }
|
|
64
|
+
// };
|
|
53
65
|
}
|
|
54
66
|
else {
|
|
55
67
|
throw new factory_1.factory.errors.NotFound('orderNumber');
|
|
@@ -61,21 +73,13 @@ function findByCode(params) {
|
|
|
61
73
|
}
|
|
62
74
|
const reservationFromRepo = await repos.reservation.findReservationById({
|
|
63
75
|
id: reservationId,
|
|
64
|
-
inclusion: [
|
|
65
|
-
'additionalTicketText', 'checkedIn', 'reservationStatus',
|
|
66
|
-
// 'reservedTicket'
|
|
67
|
-
]
|
|
76
|
+
inclusion: ['additionalTicketText', 'checkedIn', 'reservationStatus']
|
|
68
77
|
});
|
|
69
78
|
const { id, additionalTicketText, checkedIn, reservationStatus } = reservationFromRepo;
|
|
70
79
|
const reservation = {
|
|
71
80
|
id, reservationStatus,
|
|
72
81
|
reservedTicket: {
|
|
73
|
-
|
|
74
|
-
// ticketType: {
|
|
75
|
-
// identifier: reservedTicket.ticketType.identifier,
|
|
76
|
-
// name: { ja: reservedTicket.ticketType.name?.ja }
|
|
77
|
-
// },
|
|
78
|
-
ticketType
|
|
82
|
+
...((ticketType !== undefined) && { ticketType })
|
|
79
83
|
},
|
|
80
84
|
...(typeof additionalTicketText === 'string') ? { additionalTicketText } : undefined,
|
|
81
85
|
...(typeof checkedIn === 'boolean') ? { checkedIn } : undefined
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"csvtojson": "^2.0.10",
|
|
47
47
|
"dependency-cruiser": "17.3.8",
|
|
48
48
|
"eslint": "9.39.2",
|
|
49
|
-
"mongoose": "8.
|
|
49
|
+
"mongoose": "8.24.8",
|
|
50
50
|
"rimraf": "6.1.3",
|
|
51
51
|
"size-limit": "12.0.0",
|
|
52
52
|
"typescript": "5.9.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@redis/client": "^6.2.1",
|
|
58
|
-
"mongoose": "^8.
|
|
58
|
+
"mongoose": "^8.24.8"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=22.0.0",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"postversion": "git push origin --tags",
|
|
90
90
|
"prepublishOnly": "npm run clean && npm run build"
|
|
91
91
|
},
|
|
92
|
-
"version": "28.2.0-alpha.
|
|
92
|
+
"version": "28.2.0-alpha.3"
|
|
93
93
|
}
|