@chevre/domain 21.8.0-alpha.8 → 21.8.0
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/example/src/chevre/countOffers.ts +32 -0
- package/example/src/chevre/findItemListElementByCatalogId.ts +30 -0
- package/example/src/chevre/importOffersFromCOA.ts +7 -1
- package/example/src/chevre/migrateOrderPaymentMethodIdentifier.ts +81 -0
- package/example/src/chevre/migratePayTransactionPaymentMethodId.ts +72 -0
- package/example/src/chevre/migratePayTransactionPaymentMethodIdentifier.ts +78 -0
- package/example/src/chevre/optimizeCatalogs.ts +54 -0
- package/example/src/chevre/processPay.ts +3 -4
- package/example/src/chevre/publishPermitOwnershipInfoToken.ts +56 -0
- package/example/src/chevre/pullAddOnsFromOffer.ts +26 -0
- package/example/src/chevre/pushIncludedInDataCatalog.ts +47 -0
- package/example/src/chevre/searchAggregateOffers.ts +48 -0
- package/example/src/chevre/searchEventTicketOffers.ts +5 -1
- package/example/src/chevre/searchEvents.ts +9 -7
- package/example/src/chevre/searchOfferCatalogs.ts +7 -3
- package/example/src/chevre/searchOffers.ts +5 -2
- package/example/src/chevre/searchOffersByCatalog.ts +15 -9
- package/example/src/chevre/searchOffersFromAggregateOffer.ts +168 -0
- package/example/src/chevre/searchOrders.ts +9 -7
- package/example/src/chevre/syncCatalogs2aggregateOffers.ts +85 -0
- package/lib/chevre/emailMessageBuilder.js +6 -5
- package/lib/chevre/repo/aggregateOffer.d.ts +62 -0
- package/lib/chevre/repo/aggregateOffer.js +562 -0
- package/lib/chevre/repo/assetTransaction.d.ts +16 -1
- package/lib/chevre/repo/assetTransaction.js +54 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +74 -0
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +189 -0
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +3 -0
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +10 -1
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +3 -0
- package/lib/chevre/repo/mongoose/schemas/order.js +7 -0
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +9 -9
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +3 -0
- package/lib/chevre/repo/mongoose/schemas/task.js +8 -0
- package/lib/chevre/repo/offer.d.ts +87 -51
- package/lib/chevre/repo/offer.js +513 -283
- package/lib/chevre/repo/offerCatalog.d.ts +32 -3
- package/lib/chevre/repo/offerCatalog.js +97 -10
- package/lib/chevre/repo/order.d.ts +15 -0
- package/lib/chevre/repo/order.js +58 -26
- package/lib/chevre/repo/task.d.ts +6 -2
- package/lib/chevre/repo/task.js +58 -4
- package/lib/chevre/repository.d.ts +3 -0
- package/lib/chevre/repository.js +5 -1
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -41
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.d.ts +2 -0
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +2 -40
- package/lib/chevre/service/aggregation/event/findEventOffers.d.ts +16 -0
- package/lib/chevre/service/aggregation/event/findEventOffers.js +58 -0
- package/lib/chevre/service/assetTransaction/pay/account/validation.js +2 -2
- package/lib/chevre/service/assetTransaction/pay/factory.js +26 -18
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +3 -3
- package/lib/chevre/service/assetTransaction/pay.js +65 -46
- package/lib/chevre/service/assetTransaction/refund/factory.js +8 -2
- package/lib/chevre/service/assetTransaction/registerService.js +2 -1
- package/lib/chevre/service/assetTransaction/reserve.js +111 -35
- package/lib/chevre/service/offer/event/authorize.js +39 -35
- package/lib/chevre/service/offer/event/factory.d.ts +1 -1
- package/lib/chevre/service/offer/event/factory.js +8 -8
- package/lib/chevre/service/offer/event/importFromCOA.d.ts +2 -0
- package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +3 -0
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +48 -17
- package/lib/chevre/service/offer/event/voidTransaction.js +57 -36
- package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +2 -1
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +7 -11
- package/lib/chevre/service/offer/eventServiceByCOA.js +55 -27
- package/lib/chevre/service/offer/factory.d.ts +12 -4
- package/lib/chevre/service/offer/factory.js +9 -11
- package/lib/chevre/service/offer/product/searchProductOffers.d.ts +10 -1
- package/lib/chevre/service/offer/product/searchProductOffers.js +51 -12
- package/lib/chevre/service/offer/product.d.ts +2 -0
- package/lib/chevre/service/offer/product.js +3 -2
- package/lib/chevre/service/offer.d.ts +1 -0
- package/lib/chevre/service/offer.js +7 -1
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +0 -2
- package/lib/chevre/service/order/confirmPayTransaction.js +20 -42
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +27 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +226 -0
- package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +8 -6
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +80 -57
- package/lib/chevre/service/order/onOrderStatusChanged.js +52 -9
- package/lib/chevre/service/order/payOrder.js +4 -45
- package/lib/chevre/service/order/placeOrder.js +11 -24
- package/lib/chevre/service/order.d.ts +3 -1
- package/lib/chevre/service/order.js +6 -2
- package/lib/chevre/service/payment/any/factory.js +33 -8
- package/lib/chevre/service/payment/any.js +30 -21
- package/lib/chevre/service/payment/creditCard.js +12 -12
- package/lib/chevre/service/payment/movieTicket/validation.js +2 -2
- package/lib/chevre/service/payment/movieTicket.js +10 -11
- package/lib/chevre/service/payment/paymentCard.js +9 -12
- package/lib/chevre/service/project.js +1 -1
- package/lib/chevre/service/reserve/checkInReservation.d.ts +8 -0
- package/lib/chevre/service/reserve/checkInReservation.js +3 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +3 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +4 -5
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.d.ts +8 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +16 -11
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +3 -0
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +3 -5
- package/lib/chevre/service/task/aggregateUseActionsOnEvent.js +2 -0
- package/lib/chevre/service/task/confirmPayTransaction.js +1 -3
- package/lib/chevre/service/task/importOffersFromCOA.js +3 -0
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +6 -0
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +37 -0
- package/lib/chevre/service/task/onAuthorizationCreated.js +5 -1
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +7 -0
- package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.d.ts +17 -0
- package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +78 -0
- package/lib/chevre/service/task/onResourceUpdated.js +12 -0
- package/lib/chevre/service/task/returnPayTransaction.js +8 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +32 -16
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +13 -11
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +53 -17
- package/lib/chevre/service/transaction/placeOrderInProgress.js +4 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +7 -6
- package/lib/chevre/service/transaction/returnOrder.js +5 -1
- package/lib/chevre/settings.d.ts +3 -3
- package/lib/chevre/settings.js +4 -12
- package/package.json +3 -3
- package/example/src/chevre/migrateAuthorizePaymentActionResult.ts +0 -83
- package/example/src/chevre/migrateEventOrganizer.ts +0 -154
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +0 -149
- package/lib/chevre/repo/mongoose/schemas/offer.js +0 -210
|
@@ -1,50 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import { Connection } from 'mongoose';
|
|
1
|
+
import { AnyExpression, Connection, PipelineStage } from 'mongoose';
|
|
26
2
|
import * as factory from '../factory';
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
3
|
+
type IMatchStage = PipelineStage.Match;
|
|
4
|
+
type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer;
|
|
5
|
+
type IProjection = {
|
|
6
|
+
[key in KeyOfUnitPriceOffer]?: 0 | 1;
|
|
7
|
+
};
|
|
8
|
+
export type IUnitPriceOfferFromAggregateOffer = factory.unitPriceOffer.IUnitPriceOffer & {
|
|
9
|
+
offerIndex?: number;
|
|
10
|
+
parentOffer?: {
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
30
14
|
/**
|
|
31
|
-
*
|
|
15
|
+
* 単価オファーリポジトリ
|
|
32
16
|
*/
|
|
33
17
|
export declare class MongoRepository {
|
|
34
|
-
private readonly
|
|
18
|
+
private readonly aggregateOfferModel;
|
|
35
19
|
private readonly offerCatalogModel;
|
|
36
20
|
constructor(connection: Connection);
|
|
37
|
-
static
|
|
21
|
+
static CREATE_AGGREGATE_OFFERS_MATCH_CONDITIONS(params: factory.unitPriceOffer.ISearchConditions): IMatchStage[];
|
|
22
|
+
static CREATE_AGGREGATE_OFFERS_PROJECTION(params: IProjection): {
|
|
23
|
+
[field: string]: AnyExpression;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* カタログIDで単価オファーを全て検索する
|
|
27
|
+
* 必ずカタログデータから単価オファーIDを参照する
|
|
28
|
+
*/
|
|
29
|
+
searchAllByOfferCatalogId(params: {
|
|
30
|
+
subOfferCatalog: {
|
|
31
|
+
/**
|
|
32
|
+
* サブカタログID
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
projection?: IProjection;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
offers: IUnitPriceOfferFromAggregateOffer[];
|
|
39
|
+
}>;
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
+
* 単価オファーIDとカタログIDで単価オファーを検索する
|
|
42
|
+
* 必ずカタログデータから単価オファーIDを参照する
|
|
41
43
|
*/
|
|
42
|
-
|
|
44
|
+
searchByIdsAndOfferCatalogId(params: {
|
|
43
45
|
/**
|
|
44
|
-
* 指定したID
|
|
46
|
+
* 指定したIDの単価オファーだけ取得
|
|
45
47
|
*/
|
|
46
|
-
ids
|
|
47
|
-
|
|
48
|
+
ids: string[];
|
|
49
|
+
subOfferCatalog: {
|
|
50
|
+
/**
|
|
51
|
+
* サブカタログID
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
};
|
|
55
|
+
availableAtOrFrom?: {
|
|
56
|
+
id?: string;
|
|
57
|
+
};
|
|
58
|
+
unacceptedPaymentMethod?: string[];
|
|
59
|
+
excludeAppliesToMovieTicket: boolean;
|
|
60
|
+
onlyValid?: boolean;
|
|
61
|
+
limit?: number;
|
|
62
|
+
page?: number;
|
|
63
|
+
projection?: IProjection;
|
|
64
|
+
}): Promise<{
|
|
65
|
+
offers: IUnitPriceOfferFromAggregateOffer[];
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* カタログに含まれるオファーを検索する(カタログ内ソートは保証しない)
|
|
69
|
+
* カタログ内ソートインデックスはsortedOfferIdsで判断する
|
|
70
|
+
*/
|
|
71
|
+
searchByOfferCatalogIdWithSortIndex(params: {
|
|
72
|
+
subOfferCatalog: {
|
|
73
|
+
/**
|
|
74
|
+
* サブカタログID
|
|
75
|
+
*/
|
|
48
76
|
id: string;
|
|
49
77
|
};
|
|
50
78
|
availableAtOrFrom?: {
|
|
@@ -53,20 +81,31 @@ export declare class MongoRepository {
|
|
|
53
81
|
unacceptedPaymentMethod?: string[];
|
|
54
82
|
excludeAppliesToMovieTicket: boolean;
|
|
55
83
|
onlyValid?: boolean;
|
|
84
|
+
useIncludeInDataCatalog: boolean;
|
|
56
85
|
limit?: number;
|
|
57
86
|
page?: number;
|
|
58
|
-
sort: boolean;
|
|
59
87
|
projection?: IProjection;
|
|
60
88
|
}): Promise<{
|
|
61
|
-
offers:
|
|
89
|
+
offers: IUnitPriceOfferFromAggregateOffer[];
|
|
90
|
+
/**
|
|
91
|
+
* カタログ内ソートされた集計オファーIDリスト
|
|
92
|
+
*/
|
|
62
93
|
sortedOfferIds: string[];
|
|
63
94
|
}>;
|
|
64
|
-
|
|
95
|
+
findAggregateOfferById(params: {
|
|
96
|
+
project: {
|
|
97
|
+
id: string;
|
|
98
|
+
};
|
|
65
99
|
id: string;
|
|
100
|
+
}): Promise<factory.aggregateOffer.IAggregateOffer>;
|
|
101
|
+
count(params: Omit<factory.unitPriceOffer.ISearchConditions, 'limit' | 'page' | 'sort'>): Promise<number>;
|
|
102
|
+
search(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<IUnitPriceOfferFromAggregateOffer[]>;
|
|
103
|
+
save(params: factory.unitPriceOffer.IUnitPriceOffer & {
|
|
104
|
+
$unset?: any;
|
|
66
105
|
}): Promise<factory.unitPriceOffer.IUnitPriceOffer>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
106
|
+
/**
|
|
107
|
+
* sskts専用オファー保管
|
|
108
|
+
*/
|
|
70
109
|
saveManyByIdentifier(params: {
|
|
71
110
|
attributes: factory.unitPriceOffer.IUnitPriceOffer;
|
|
72
111
|
upsert?: boolean;
|
|
@@ -87,17 +126,14 @@ export declare class MongoRepository {
|
|
|
87
126
|
};
|
|
88
127
|
}): Promise<import("mongodb").UpdateResult | undefined>;
|
|
89
128
|
deleteById(params: {
|
|
90
|
-
id: string;
|
|
91
|
-
}): Promise<void>;
|
|
92
|
-
deleteByProject(params: {
|
|
93
129
|
project: {
|
|
94
130
|
id: string;
|
|
95
131
|
};
|
|
132
|
+
id: string;
|
|
96
133
|
}): Promise<void>;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}): Promise<import("mongodb").UpdateResult>;
|
|
134
|
+
/**
|
|
135
|
+
* サブカタログから集計オファーIDリストを検索する
|
|
136
|
+
*/
|
|
137
|
+
private searchAggregateOfferIdsBySubOfferCatalog;
|
|
102
138
|
}
|
|
103
139
|
export {};
|