@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
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
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 { Schema } from 'mongoose';
|
|
26
|
+
declare const modelName = "AggregateOffer";
|
|
27
|
+
/**
|
|
28
|
+
* 集計オファースキーマ
|
|
29
|
+
*/
|
|
30
|
+
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
|
+
collection: string;
|
|
32
|
+
id: true;
|
|
33
|
+
read: string;
|
|
34
|
+
writeConcern: import("mongodb").WriteConcern;
|
|
35
|
+
strict: true;
|
|
36
|
+
strictQuery: false;
|
|
37
|
+
timestamps: {
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
};
|
|
41
|
+
toJSON: {
|
|
42
|
+
getters: false;
|
|
43
|
+
virtuals: false;
|
|
44
|
+
minimize: false;
|
|
45
|
+
versionKey: false;
|
|
46
|
+
};
|
|
47
|
+
toObject: {
|
|
48
|
+
getters: false;
|
|
49
|
+
virtuals: true;
|
|
50
|
+
minimize: false;
|
|
51
|
+
versionKey: false;
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
offers: any[];
|
|
55
|
+
includedInDataCatalog: any[];
|
|
56
|
+
_id?: string | undefined;
|
|
57
|
+
typeOf?: string | undefined;
|
|
58
|
+
project?: any;
|
|
59
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
60
|
+
offers: any[];
|
|
61
|
+
includedInDataCatalog: any[];
|
|
62
|
+
_id?: string | undefined;
|
|
63
|
+
typeOf?: string | undefined;
|
|
64
|
+
project?: any;
|
|
65
|
+
}>> & Omit<import("mongoose").FlatRecord<{
|
|
66
|
+
offers: any[];
|
|
67
|
+
includedInDataCatalog: any[];
|
|
68
|
+
_id?: string | undefined;
|
|
69
|
+
typeOf?: string | undefined;
|
|
70
|
+
project?: any;
|
|
71
|
+
}> & Required<{
|
|
72
|
+
_id: string;
|
|
73
|
+
}>, never>>;
|
|
74
|
+
export { modelName, schema };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.modelName = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const writeConcern_1 = require("../writeConcern");
|
|
6
|
+
const modelName = 'AggregateOffer';
|
|
7
|
+
exports.modelName = modelName;
|
|
8
|
+
/**
|
|
9
|
+
* 集計オファースキーマ
|
|
10
|
+
*/
|
|
11
|
+
const schema = new mongoose_1.Schema({
|
|
12
|
+
project: mongoose_1.SchemaTypes.Mixed,
|
|
13
|
+
_id: String,
|
|
14
|
+
typeOf: String,
|
|
15
|
+
offers: [mongoose_1.SchemaTypes.Mixed],
|
|
16
|
+
includedInDataCatalog: [mongoose_1.SchemaTypes.Mixed]
|
|
17
|
+
}, {
|
|
18
|
+
collection: 'aggregateOffers',
|
|
19
|
+
id: true,
|
|
20
|
+
read: 'primaryPreferred',
|
|
21
|
+
writeConcern: writeConcern_1.writeConcern,
|
|
22
|
+
strict: true,
|
|
23
|
+
strictQuery: false,
|
|
24
|
+
timestamps: {
|
|
25
|
+
createdAt: 'createdAt',
|
|
26
|
+
updatedAt: 'updatedAt'
|
|
27
|
+
},
|
|
28
|
+
toJSON: {
|
|
29
|
+
getters: false,
|
|
30
|
+
virtuals: false,
|
|
31
|
+
minimize: false,
|
|
32
|
+
versionKey: false
|
|
33
|
+
},
|
|
34
|
+
toObject: {
|
|
35
|
+
getters: false,
|
|
36
|
+
virtuals: true,
|
|
37
|
+
minimize: false,
|
|
38
|
+
versionKey: false
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
exports.schema = schema;
|
|
42
|
+
schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
|
|
43
|
+
schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
44
|
+
schema.index({ 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersPriceSpecificationPrice' });
|
|
45
|
+
schema.index({ 'project.id': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByProjectId' });
|
|
46
|
+
// オファーIDはグローバルユニーク
|
|
47
|
+
schema.index({ 'offers.id': 1 }, {
|
|
48
|
+
name: 'uniqueOfferId',
|
|
49
|
+
unique: true
|
|
50
|
+
});
|
|
51
|
+
// オファーコードはプロジェクト内ユニーク
|
|
52
|
+
schema.index({ 'offers.identifier': 1, 'project.id': 1 }, {
|
|
53
|
+
name: 'uniqueOfferIdentifier',
|
|
54
|
+
unique: true
|
|
55
|
+
});
|
|
56
|
+
schema.index({ 'includedInDataCatalog.id': 1 }, {
|
|
57
|
+
name: 'searchByIncludedInDataCatalogId',
|
|
58
|
+
partialFilterExpression: {
|
|
59
|
+
'includedInDataCatalog.id': { $exists: true }
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
schema.index({ 'offers.includedInDataCatalog.id': 1, 'offers.priceSpecification.price': 1 }, {
|
|
63
|
+
name: 'searchByOffersIncludedInDataCatalogId',
|
|
64
|
+
partialFilterExpression: {
|
|
65
|
+
'offers.includedInDataCatalog.id': { $exists: true }
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
schema.index({ 'offers.availability': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersAvailability' });
|
|
69
|
+
schema.index({ 'offers.itemOffered.typeOf': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersItemOfferedTypeOf' });
|
|
70
|
+
schema.index({ 'offers.identifier': 1, 'offers.priceSpecification.price': 1 }, {
|
|
71
|
+
name: 'searchByOffersIdentifier',
|
|
72
|
+
partialFilterExpression: {
|
|
73
|
+
'offers.identifier': { $exists: true }
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
schema.index({ 'offers.priceSpecification.referenceQuantity.value': 1, 'offers.priceSpecification.price': 1 }, {
|
|
77
|
+
name: 'searchByOffersPriceSpecificationReferenceQuantityValue',
|
|
78
|
+
partialFilterExpression: {
|
|
79
|
+
'offers.priceSpecification.referenceQuantity.value': { $exists: true }
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
schema.index({ 'offers.priceSpecification.accounting.accountsReceivable': 1, 'offers.priceSpecification.price': 1 }, {
|
|
83
|
+
name: 'searchByOffersPriceSpecificationAccountingAccountsReceivable',
|
|
84
|
+
partialFilterExpression: {
|
|
85
|
+
'offers.priceSpecification.accounting.accountsReceivable': { $exists: true }
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
schema.index({ 'offers.priceSpecification.accounting.operatingRevenue.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
|
|
89
|
+
name: 'searchByOffersPriceSpecificationAccountingOperatingRevenueCodeValue',
|
|
90
|
+
partialFilterExpression: {
|
|
91
|
+
'offers.priceSpecification.accounting.operatingRevenue.codeValue': { $exists: true }
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
schema.index({ 'offers.priceSpecification.appliesToMovieTicket.serviceType': 1, 'offers.priceSpecification.price': 1 }, {
|
|
95
|
+
name: 'searchByOffersPriceSpecificationAppliesToMovieTicketServiceType',
|
|
96
|
+
partialFilterExpression: {
|
|
97
|
+
'offers.priceSpecification.appliesToMovieTicket.serviceType': { $exists: true }
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
schema.index({ 'offers.priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': 1, 'offers.priceSpecification.price': 1 }, {
|
|
101
|
+
name: 'searchByOffersPriceSpecificationAppliesToMovieTicketServiceOutputTypeOf',
|
|
102
|
+
partialFilterExpression: {
|
|
103
|
+
'offers.priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': { $exists: true }
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
schema.index({ 'offers.name.ja': 1, 'offers.priceSpecification.price': 1 }, {
|
|
107
|
+
name: 'searchByOffersNameJa',
|
|
108
|
+
partialFilterExpression: {
|
|
109
|
+
'offers.name.ja': { $exists: true }
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
schema.index({ 'offers.name.en': 1, 'offers.priceSpecification.price': 1 }, {
|
|
113
|
+
name: 'searchByOffersNameEn',
|
|
114
|
+
partialFilterExpression: {
|
|
115
|
+
'offers.name.en': { $exists: true }
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
schema.index({ 'offers.alternateName': 1, 'offers.priceSpecification.price': 1 }, {
|
|
119
|
+
name: 'searchByOffersAlternateName',
|
|
120
|
+
partialFilterExpression: {
|
|
121
|
+
'offers.alternateName': { $exists: true }
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
schema.index({ 'offers.category.id': 1, 'offers.priceSpecification.price': 1 }, {
|
|
125
|
+
name: 'searchOffersCategoryId',
|
|
126
|
+
partialFilterExpression: {
|
|
127
|
+
'offers.category.id': { $exists: true }
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
schema.index({ 'offers.category.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
|
|
131
|
+
name: 'searchByOffersCategoryCodeValue',
|
|
132
|
+
partialFilterExpression: {
|
|
133
|
+
'offers.category.codeValue': { $exists: true }
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
schema.index({ 'offers.availableAtOrFrom.id': 1, 'offers.priceSpecification.price': 1 }, {
|
|
137
|
+
name: 'searchByOffersAvailableAtOrFromId',
|
|
138
|
+
partialFilterExpression: {
|
|
139
|
+
'offers.availableAtOrFrom.id': { $exists: true }
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
schema.index({ 'offers.eligibleMembershipType.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
|
|
143
|
+
name: 'searchByOffersEligibleMembershipTypeCodeValue',
|
|
144
|
+
partialFilterExpression: {
|
|
145
|
+
'offers.eligibleMembershipType.codeValue': { $exists: true }
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
schema.index({ 'offers.eligibleMonetaryAmount.currency': 1, 'offers.priceSpecification.price': 1 }, {
|
|
149
|
+
name: 'searchByOffersEligibleMonetaryAmountCurrency',
|
|
150
|
+
partialFilterExpression: {
|
|
151
|
+
'offers.eligibleMonetaryAmount.currency': { $exists: true }
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
schema.index({ 'offers.eligibleSeatingType.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
|
|
155
|
+
name: 'searchByOffersEligibleSeatingTypeCodeValue',
|
|
156
|
+
partialFilterExpression: {
|
|
157
|
+
'offers.eligibleSeatingType.codeValue': { $exists: true }
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
schema.index({ 'offers.addOn.itemOffered.id': 1, 'offers.priceSpecification.price': 1 }, {
|
|
161
|
+
name: 'searchByOffersAddOnItemOfferedId',
|
|
162
|
+
partialFilterExpression: {
|
|
163
|
+
'offers.addOn.itemOffered.id': { $exists: true }
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
schema.index({ 'offers.hasMerchantReturnPolicy.id': 1, 'offers.priceSpecification.price': 1 }, {
|
|
167
|
+
name: 'searchByOffersHasMerchantReturnPolicyId',
|
|
168
|
+
partialFilterExpression: {
|
|
169
|
+
'offers.hasMerchantReturnPolicy.id': { $exists: true }
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
schema.index({ 'offers.additionalProperty': 1, 'offers.priceSpecification.price': 1 }, {
|
|
173
|
+
name: 'searchByOffersAdditionalProperty',
|
|
174
|
+
partialFilterExpression: {
|
|
175
|
+
'offers.additionalProperty': { $exists: true }
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
schema.index({ 'offers.validFrom': 1, 'offers.priceSpecification.price': 1 }, {
|
|
179
|
+
name: 'searchByOffersValidFrom',
|
|
180
|
+
partialFilterExpression: {
|
|
181
|
+
'offers.validFrom': { $exists: true }
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
schema.index({ 'offers.validThrough': 1, 'offers.priceSpecification.price': 1 }, {
|
|
185
|
+
name: 'searchByOffersValidThrough',
|
|
186
|
+
partialFilterExpression: {
|
|
187
|
+
'offers.validThrough': { $exists: true }
|
|
188
|
+
}
|
|
189
|
+
});
|
|
@@ -55,22 +55,22 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
55
55
|
object?: any;
|
|
56
56
|
typeOf?: string | undefined;
|
|
57
57
|
project?: any;
|
|
58
|
-
code?: string | undefined;
|
|
59
58
|
validFrom?: Date | undefined;
|
|
59
|
+
code?: string | undefined;
|
|
60
60
|
validUntil?: Date | undefined;
|
|
61
61
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
62
62
|
object?: any;
|
|
63
63
|
typeOf?: string | undefined;
|
|
64
64
|
project?: any;
|
|
65
|
-
code?: string | undefined;
|
|
66
65
|
validFrom?: Date | undefined;
|
|
66
|
+
code?: string | undefined;
|
|
67
67
|
validUntil?: Date | undefined;
|
|
68
68
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
69
69
|
object?: any;
|
|
70
70
|
typeOf?: string | undefined;
|
|
71
71
|
project?: any;
|
|
72
|
-
code?: string | undefined;
|
|
73
72
|
validFrom?: Date | undefined;
|
|
73
|
+
code?: string | undefined;
|
|
74
74
|
validUntil?: Date | undefined;
|
|
75
75
|
}> & {
|
|
76
76
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -59,6 +59,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
59
59
|
additionalProperty?: any;
|
|
60
60
|
identifier?: string | undefined;
|
|
61
61
|
duration?: string | undefined;
|
|
62
|
+
offers?: any;
|
|
62
63
|
alternativeHeadline?: string | undefined;
|
|
63
64
|
copyrightYear?: number | undefined;
|
|
64
65
|
datePublished?: Date | undefined;
|
|
@@ -66,7 +67,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
66
67
|
headline?: string | undefined;
|
|
67
68
|
thumbnailUrl?: string | undefined;
|
|
68
69
|
contentRating?: string | undefined;
|
|
69
|
-
offers?: any;
|
|
70
70
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
71
71
|
typeOf: string;
|
|
72
72
|
name?: any;
|
|
@@ -75,6 +75,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
75
75
|
additionalProperty?: any;
|
|
76
76
|
identifier?: string | undefined;
|
|
77
77
|
duration?: string | undefined;
|
|
78
|
+
offers?: any;
|
|
78
79
|
alternativeHeadline?: string | undefined;
|
|
79
80
|
copyrightYear?: number | undefined;
|
|
80
81
|
datePublished?: Date | undefined;
|
|
@@ -82,7 +83,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
82
83
|
headline?: string | undefined;
|
|
83
84
|
thumbnailUrl?: string | undefined;
|
|
84
85
|
contentRating?: string | undefined;
|
|
85
|
-
offers?: any;
|
|
86
86
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
87
87
|
typeOf: string;
|
|
88
88
|
name?: any;
|
|
@@ -91,6 +91,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
91
91
|
additionalProperty?: any;
|
|
92
92
|
identifier?: string | undefined;
|
|
93
93
|
duration?: string | undefined;
|
|
94
|
+
offers?: any;
|
|
94
95
|
alternativeHeadline?: string | undefined;
|
|
95
96
|
copyrightYear?: number | undefined;
|
|
96
97
|
datePublished?: Date | undefined;
|
|
@@ -98,7 +99,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
98
99
|
headline?: string | undefined;
|
|
99
100
|
thumbnailUrl?: string | undefined;
|
|
100
101
|
contentRating?: string | undefined;
|
|
101
|
-
offers?: any;
|
|
102
102
|
}> & {
|
|
103
103
|
_id: import("mongoose").Types.ObjectId;
|
|
104
104
|
}, never>>;
|
|
@@ -67,9 +67,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
67
67
|
endDate?: Date | undefined;
|
|
68
68
|
location?: any;
|
|
69
69
|
duration?: string | undefined;
|
|
70
|
+
offers?: any;
|
|
70
71
|
alternativeHeadline?: any;
|
|
71
72
|
headline?: any;
|
|
72
|
-
offers?: any;
|
|
73
73
|
doorTime?: Date | undefined;
|
|
74
74
|
eventStatus?: string | undefined;
|
|
75
75
|
superEvent?: any;
|
|
@@ -101,9 +101,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
101
101
|
endDate?: Date | undefined;
|
|
102
102
|
location?: any;
|
|
103
103
|
duration?: string | undefined;
|
|
104
|
+
offers?: any;
|
|
104
105
|
alternativeHeadline?: any;
|
|
105
106
|
headline?: any;
|
|
106
|
-
offers?: any;
|
|
107
107
|
doorTime?: Date | undefined;
|
|
108
108
|
eventStatus?: string | undefined;
|
|
109
109
|
superEvent?: any;
|
|
@@ -135,9 +135,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
135
135
|
endDate?: Date | undefined;
|
|
136
136
|
location?: any;
|
|
137
137
|
duration?: string | undefined;
|
|
138
|
+
offers?: any;
|
|
138
139
|
alternativeHeadline?: any;
|
|
139
140
|
headline?: any;
|
|
140
|
-
offers?: any;
|
|
141
141
|
doorTime?: Date | undefined;
|
|
142
142
|
eventStatus?: string | undefined;
|
|
143
143
|
superEvent?: any;
|
|
@@ -61,6 +61,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
61
61
|
alternateName?: any;
|
|
62
62
|
description?: any;
|
|
63
63
|
itemOffered?: any;
|
|
64
|
+
dateSynced?: Date | undefined;
|
|
64
65
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
65
66
|
typeOf: string;
|
|
66
67
|
additionalProperty: any[];
|
|
@@ -72,6 +73,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
72
73
|
alternateName?: any;
|
|
73
74
|
description?: any;
|
|
74
75
|
itemOffered?: any;
|
|
76
|
+
dateSynced?: Date | undefined;
|
|
75
77
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
76
78
|
typeOf: string;
|
|
77
79
|
additionalProperty: any[];
|
|
@@ -83,6 +85,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
83
85
|
alternateName?: any;
|
|
84
86
|
description?: any;
|
|
85
87
|
itemOffered?: any;
|
|
88
|
+
dateSynced?: Date | undefined;
|
|
86
89
|
}> & Required<{
|
|
87
90
|
_id: string;
|
|
88
91
|
}>, never>>;
|
|
@@ -24,7 +24,10 @@ const schema = new mongoose_1.Schema({
|
|
|
24
24
|
},
|
|
25
25
|
itemListElement: [mongoose_1.SchemaTypes.Mixed],
|
|
26
26
|
itemOffered: mongoose_1.SchemaTypes.Mixed,
|
|
27
|
-
additionalProperty: [mongoose_1.SchemaTypes.Mixed]
|
|
27
|
+
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
28
|
+
dateSynced: Date // 追加(2023-09-13~)
|
|
29
|
+
// ticketTypes: SchemaTypes.Mixed,
|
|
30
|
+
// id: SchemaTypes.Mixed
|
|
28
31
|
}, {
|
|
29
32
|
collection: 'offerCatalogs',
|
|
30
33
|
id: true,
|
|
@@ -58,6 +61,12 @@ schema.index({ identifier: 1 }, {
|
|
|
58
61
|
schema.index({ 'project.id': 1, identifier: 1 }, {
|
|
59
62
|
name: 'searchByProjectId-v20220721'
|
|
60
63
|
});
|
|
64
|
+
schema.index({ 'itemListElement.typeOf': 1, identifier: 1 }, {
|
|
65
|
+
name: 'searchByItemListElementTypeOf',
|
|
66
|
+
partialFilterExpression: {
|
|
67
|
+
'itemListElement.typeOf': { $exists: true }
|
|
68
|
+
}
|
|
69
|
+
});
|
|
61
70
|
schema.index({ 'itemListElement.id': 1, identifier: 1 }, {
|
|
62
71
|
name: 'searchByItemListElementId',
|
|
63
72
|
partialFilterExpression: {
|
|
@@ -72,6 +72,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
72
72
|
customer?: any;
|
|
73
73
|
returner?: any;
|
|
74
74
|
orderStatus?: string | undefined;
|
|
75
|
+
previousOrderStatus?: string | undefined;
|
|
75
76
|
isGift?: boolean | undefined;
|
|
76
77
|
dateReturned?: Date | undefined;
|
|
77
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
@@ -95,6 +96,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
95
96
|
customer?: any;
|
|
96
97
|
returner?: any;
|
|
97
98
|
orderStatus?: string | undefined;
|
|
99
|
+
previousOrderStatus?: string | undefined;
|
|
98
100
|
isGift?: boolean | undefined;
|
|
99
101
|
dateReturned?: Date | undefined;
|
|
100
102
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
@@ -118,6 +120,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
118
120
|
customer?: any;
|
|
119
121
|
returner?: any;
|
|
120
122
|
orderStatus?: string | undefined;
|
|
123
|
+
previousOrderStatus?: string | undefined;
|
|
121
124
|
isGift?: boolean | undefined;
|
|
122
125
|
dateReturned?: Date | undefined;
|
|
123
126
|
}> & {
|
|
@@ -29,6 +29,7 @@ const schema = new mongoose_1.Schema({
|
|
|
29
29
|
discounts: [mongoose_1.SchemaTypes.Mixed],
|
|
30
30
|
url: String,
|
|
31
31
|
orderStatus: String,
|
|
32
|
+
previousOrderStatus: String,
|
|
32
33
|
orderDate: Date,
|
|
33
34
|
isGift: Boolean,
|
|
34
35
|
dateReturned: Date,
|
|
@@ -184,6 +185,12 @@ schema.index({ 'paymentMethods.typeOf': 1, orderDate: -1 }, {
|
|
|
184
185
|
'paymentMethods.typeOf': { $exists: true }
|
|
185
186
|
}
|
|
186
187
|
});
|
|
188
|
+
schema.index({ 'paymentMethods.paymentMethod.identifier': 1, orderDate: -1 }, {
|
|
189
|
+
name: 'searchByPaymentMethodIdentifier',
|
|
190
|
+
partialFilterExpression: {
|
|
191
|
+
'paymentMethods.paymentMethod.identifier': { $exists: true }
|
|
192
|
+
}
|
|
193
|
+
});
|
|
187
194
|
schema.index({ 'paymentMethods.paymentMethodId': 1, orderDate: -1 }, {
|
|
188
195
|
name: 'searchByPaymentMethodIdAndOrderDate',
|
|
189
196
|
partialFilterExpression: {
|
|
@@ -57,36 +57,36 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
57
57
|
name?: any;
|
|
58
58
|
project?: any;
|
|
59
59
|
priceCurrency?: string | undefined;
|
|
60
|
+
validFrom?: Date | undefined;
|
|
61
|
+
validThrough?: Date | undefined;
|
|
62
|
+
appliesToMovieTicket?: any;
|
|
60
63
|
valueAddedTaxIncluded?: boolean | undefined;
|
|
61
64
|
appliesToCategoryCode?: any;
|
|
62
65
|
appliesToVideoFormat?: string | undefined;
|
|
63
|
-
appliesToMovieTicket?: any;
|
|
64
|
-
validFrom?: Date | undefined;
|
|
65
|
-
validThrough?: Date | undefined;
|
|
66
66
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
67
67
|
typeOf: string;
|
|
68
68
|
price: number;
|
|
69
69
|
name?: any;
|
|
70
70
|
project?: any;
|
|
71
71
|
priceCurrency?: string | undefined;
|
|
72
|
+
validFrom?: Date | undefined;
|
|
73
|
+
validThrough?: Date | undefined;
|
|
74
|
+
appliesToMovieTicket?: any;
|
|
72
75
|
valueAddedTaxIncluded?: boolean | undefined;
|
|
73
76
|
appliesToCategoryCode?: any;
|
|
74
77
|
appliesToVideoFormat?: string | undefined;
|
|
75
|
-
appliesToMovieTicket?: any;
|
|
76
|
-
validFrom?: Date | undefined;
|
|
77
|
-
validThrough?: Date | undefined;
|
|
78
78
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
79
79
|
typeOf: string;
|
|
80
80
|
price: number;
|
|
81
81
|
name?: any;
|
|
82
82
|
project?: any;
|
|
83
83
|
priceCurrency?: string | undefined;
|
|
84
|
+
validFrom?: Date | undefined;
|
|
85
|
+
validThrough?: Date | undefined;
|
|
86
|
+
appliesToMovieTicket?: any;
|
|
84
87
|
valueAddedTaxIncluded?: boolean | undefined;
|
|
85
88
|
appliesToCategoryCode?: any;
|
|
86
89
|
appliesToVideoFormat?: string | undefined;
|
|
87
|
-
appliesToMovieTicket?: any;
|
|
88
|
-
validFrom?: Date | undefined;
|
|
89
|
-
validThrough?: Date | undefined;
|
|
90
90
|
}> & {
|
|
91
91
|
_id: import("mongoose").Types.ObjectId;
|
|
92
92
|
}, never>>;
|
|
@@ -54,8 +54,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
56
|
additionalProperty: any[];
|
|
57
|
-
provider: any[];
|
|
58
57
|
offers: any[];
|
|
58
|
+
provider: any[];
|
|
59
59
|
productID: string;
|
|
60
60
|
name?: any;
|
|
61
61
|
project?: any;
|
|
@@ -67,8 +67,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
67
67
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
68
68
|
typeOf: string;
|
|
69
69
|
additionalProperty: any[];
|
|
70
|
-
provider: any[];
|
|
71
70
|
offers: any[];
|
|
71
|
+
provider: any[];
|
|
72
72
|
productID: string;
|
|
73
73
|
name?: any;
|
|
74
74
|
project?: any;
|
|
@@ -80,8 +80,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
80
80
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
81
81
|
typeOf: string;
|
|
82
82
|
additionalProperty: any[];
|
|
83
|
-
provider: any[];
|
|
84
83
|
offers: any[];
|
|
84
|
+
provider: any[];
|
|
85
85
|
productID: string;
|
|
86
86
|
name?: any;
|
|
87
87
|
project?: any;
|
|
@@ -56,27 +56,27 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
56
56
|
_id?: string | undefined;
|
|
57
57
|
name?: string | undefined;
|
|
58
58
|
alternateName?: string | undefined;
|
|
59
|
+
settings?: any;
|
|
59
60
|
logo?: string | undefined;
|
|
60
61
|
aggregateReservation?: any;
|
|
61
|
-
settings?: any;
|
|
62
62
|
subscription?: any;
|
|
63
63
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
64
64
|
typeOf: string;
|
|
65
65
|
_id?: string | undefined;
|
|
66
66
|
name?: string | undefined;
|
|
67
67
|
alternateName?: string | undefined;
|
|
68
|
+
settings?: any;
|
|
68
69
|
logo?: string | undefined;
|
|
69
70
|
aggregateReservation?: any;
|
|
70
|
-
settings?: any;
|
|
71
71
|
subscription?: any;
|
|
72
72
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
73
73
|
typeOf: string;
|
|
74
74
|
_id?: string | undefined;
|
|
75
75
|
name?: string | undefined;
|
|
76
76
|
alternateName?: string | undefined;
|
|
77
|
+
settings?: any;
|
|
77
78
|
logo?: string | undefined;
|
|
78
79
|
aggregateReservation?: any;
|
|
79
|
-
settings?: any;
|
|
80
80
|
subscription?: any;
|
|
81
81
|
}> & Required<{
|
|
82
82
|
_id: string;
|
|
@@ -57,6 +57,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
57
57
|
status?: string | undefined;
|
|
58
58
|
data?: any;
|
|
59
59
|
project?: any;
|
|
60
|
+
identifier?: string | undefined;
|
|
60
61
|
runsAt?: Date | undefined;
|
|
61
62
|
remainingNumberOfTries?: number | undefined;
|
|
62
63
|
lastTriedAt?: Date | undefined;
|
|
@@ -69,6 +70,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
69
70
|
status?: string | undefined;
|
|
70
71
|
data?: any;
|
|
71
72
|
project?: any;
|
|
73
|
+
identifier?: string | undefined;
|
|
72
74
|
runsAt?: Date | undefined;
|
|
73
75
|
remainingNumberOfTries?: number | undefined;
|
|
74
76
|
lastTriedAt?: Date | undefined;
|
|
@@ -81,6 +83,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
81
83
|
status?: string | undefined;
|
|
82
84
|
data?: any;
|
|
83
85
|
project?: any;
|
|
86
|
+
identifier?: string | undefined;
|
|
84
87
|
runsAt?: Date | undefined;
|
|
85
88
|
remainingNumberOfTries?: number | undefined;
|
|
86
89
|
lastTriedAt?: Date | undefined;
|
|
@@ -9,6 +9,7 @@ exports.modelName = modelName;
|
|
|
9
9
|
* タスクスキーマ
|
|
10
10
|
*/
|
|
11
11
|
const schema = new mongoose_1.Schema({
|
|
12
|
+
identifier: String,
|
|
12
13
|
project: mongoose_1.SchemaTypes.Mixed,
|
|
13
14
|
name: String,
|
|
14
15
|
status: String,
|
|
@@ -52,6 +53,13 @@ schema.index({ 'project.id': 1, runsAt: -1 }, { name: 'searchByProjectId-v202207
|
|
|
52
53
|
schema.index({ name: 1, runsAt: -1 }, { name: 'searchByName-v2' });
|
|
53
54
|
schema.index({ status: 1, runsAt: -1 }, { name: 'searchByStatus-v2' });
|
|
54
55
|
schema.index({ runsAt: -1 }, { name: 'searchByRunsAt-v2' });
|
|
56
|
+
// identifier追加(2023-09-01~)
|
|
57
|
+
schema.index({ identifier: 1, runsAt: -1 }, {
|
|
58
|
+
name: 'searchByIdentifier',
|
|
59
|
+
partialFilterExpression: {
|
|
60
|
+
identifier: { $exists: true }
|
|
61
|
+
}
|
|
62
|
+
});
|
|
55
63
|
schema.index({ dateAborted: 1, runsAt: -1 }, {
|
|
56
64
|
name: 'searchByDateAborted',
|
|
57
65
|
partialFilterExpression: {
|