@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.
Files changed (131) hide show
  1. package/example/src/chevre/countOffers.ts +32 -0
  2. package/example/src/chevre/findItemListElementByCatalogId.ts +30 -0
  3. package/example/src/chevre/importOffersFromCOA.ts +7 -1
  4. package/example/src/chevre/migrateOrderPaymentMethodIdentifier.ts +81 -0
  5. package/example/src/chevre/migratePayTransactionPaymentMethodId.ts +72 -0
  6. package/example/src/chevre/migratePayTransactionPaymentMethodIdentifier.ts +78 -0
  7. package/example/src/chevre/optimizeCatalogs.ts +54 -0
  8. package/example/src/chevre/processPay.ts +3 -4
  9. package/example/src/chevre/publishPermitOwnershipInfoToken.ts +56 -0
  10. package/example/src/chevre/pullAddOnsFromOffer.ts +26 -0
  11. package/example/src/chevre/pushIncludedInDataCatalog.ts +47 -0
  12. package/example/src/chevre/searchAggregateOffers.ts +48 -0
  13. package/example/src/chevre/searchEventTicketOffers.ts +5 -1
  14. package/example/src/chevre/searchEvents.ts +9 -7
  15. package/example/src/chevre/searchOfferCatalogs.ts +7 -3
  16. package/example/src/chevre/searchOffers.ts +5 -2
  17. package/example/src/chevre/searchOffersByCatalog.ts +15 -9
  18. package/example/src/chevre/searchOffersFromAggregateOffer.ts +168 -0
  19. package/example/src/chevre/searchOrders.ts +9 -7
  20. package/example/src/chevre/syncCatalogs2aggregateOffers.ts +85 -0
  21. package/lib/chevre/emailMessageBuilder.js +6 -5
  22. package/lib/chevre/repo/aggregateOffer.d.ts +62 -0
  23. package/lib/chevre/repo/aggregateOffer.js +562 -0
  24. package/lib/chevre/repo/assetTransaction.d.ts +16 -1
  25. package/lib/chevre/repo/assetTransaction.js +54 -2
  26. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +74 -0
  27. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +189 -0
  28. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +3 -3
  29. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +3 -3
  30. package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -3
  31. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +3 -0
  32. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +10 -1
  33. package/lib/chevre/repo/mongoose/schemas/order.d.ts +3 -0
  34. package/lib/chevre/repo/mongoose/schemas/order.js +7 -0
  35. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +9 -9
  36. package/lib/chevre/repo/mongoose/schemas/product.d.ts +3 -3
  37. package/lib/chevre/repo/mongoose/schemas/project.d.ts +3 -3
  38. package/lib/chevre/repo/mongoose/schemas/task.d.ts +3 -0
  39. package/lib/chevre/repo/mongoose/schemas/task.js +8 -0
  40. package/lib/chevre/repo/offer.d.ts +87 -51
  41. package/lib/chevre/repo/offer.js +513 -283
  42. package/lib/chevre/repo/offerCatalog.d.ts +32 -3
  43. package/lib/chevre/repo/offerCatalog.js +97 -10
  44. package/lib/chevre/repo/order.d.ts +15 -0
  45. package/lib/chevre/repo/order.js +58 -26
  46. package/lib/chevre/repo/task.d.ts +6 -2
  47. package/lib/chevre/repo/task.js +58 -4
  48. package/lib/chevre/repository.d.ts +3 -0
  49. package/lib/chevre/repository.js +5 -1
  50. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -41
  51. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.d.ts +2 -0
  52. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +2 -40
  53. package/lib/chevre/service/aggregation/event/findEventOffers.d.ts +16 -0
  54. package/lib/chevre/service/aggregation/event/findEventOffers.js +58 -0
  55. package/lib/chevre/service/assetTransaction/pay/account/validation.js +2 -2
  56. package/lib/chevre/service/assetTransaction/pay/factory.js +26 -18
  57. package/lib/chevre/service/assetTransaction/pay/potentialActions.js +3 -3
  58. package/lib/chevre/service/assetTransaction/pay.js +65 -46
  59. package/lib/chevre/service/assetTransaction/refund/factory.js +8 -2
  60. package/lib/chevre/service/assetTransaction/registerService.js +2 -1
  61. package/lib/chevre/service/assetTransaction/reserve.js +111 -35
  62. package/lib/chevre/service/offer/event/authorize.js +39 -35
  63. package/lib/chevre/service/offer/event/factory.d.ts +1 -1
  64. package/lib/chevre/service/offer/event/factory.js +8 -8
  65. package/lib/chevre/service/offer/event/importFromCOA.d.ts +2 -0
  66. package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +3 -0
  67. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +48 -17
  68. package/lib/chevre/service/offer/event/voidTransaction.js +57 -36
  69. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +2 -1
  70. package/lib/chevre/service/offer/eventServiceByCOA/factory.js +7 -11
  71. package/lib/chevre/service/offer/eventServiceByCOA.js +55 -27
  72. package/lib/chevre/service/offer/factory.d.ts +12 -4
  73. package/lib/chevre/service/offer/factory.js +9 -11
  74. package/lib/chevre/service/offer/product/searchProductOffers.d.ts +10 -1
  75. package/lib/chevre/service/offer/product/searchProductOffers.js +51 -12
  76. package/lib/chevre/service/offer/product.d.ts +2 -0
  77. package/lib/chevre/service/offer/product.js +3 -2
  78. package/lib/chevre/service/offer.d.ts +1 -0
  79. package/lib/chevre/service/offer.js +7 -1
  80. package/lib/chevre/service/order/confirmPayTransaction.d.ts +0 -2
  81. package/lib/chevre/service/order/confirmPayTransaction.js +20 -42
  82. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +27 -0
  83. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +226 -0
  84. package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +8 -6
  85. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +80 -57
  86. package/lib/chevre/service/order/onOrderStatusChanged.js +52 -9
  87. package/lib/chevre/service/order/payOrder.js +4 -45
  88. package/lib/chevre/service/order/placeOrder.js +11 -24
  89. package/lib/chevre/service/order.d.ts +3 -1
  90. package/lib/chevre/service/order.js +6 -2
  91. package/lib/chevre/service/payment/any/factory.js +33 -8
  92. package/lib/chevre/service/payment/any.js +30 -21
  93. package/lib/chevre/service/payment/creditCard.js +12 -12
  94. package/lib/chevre/service/payment/movieTicket/validation.js +2 -2
  95. package/lib/chevre/service/payment/movieTicket.js +10 -11
  96. package/lib/chevre/service/payment/paymentCard.js +9 -12
  97. package/lib/chevre/service/project.js +1 -1
  98. package/lib/chevre/service/reserve/checkInReservation.d.ts +8 -0
  99. package/lib/chevre/service/reserve/checkInReservation.js +3 -2
  100. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +3 -0
  101. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +4 -5
  102. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.d.ts +8 -0
  103. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +16 -11
  104. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -1
  105. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +3 -0
  106. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +3 -5
  107. package/lib/chevre/service/task/aggregateUseActionsOnEvent.js +2 -0
  108. package/lib/chevre/service/task/confirmPayTransaction.js +1 -3
  109. package/lib/chevre/service/task/importOffersFromCOA.js +3 -0
  110. package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +6 -0
  111. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +37 -0
  112. package/lib/chevre/service/task/onAuthorizationCreated.js +5 -1
  113. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -0
  114. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +7 -0
  115. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.d.ts +17 -0
  116. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +78 -0
  117. package/lib/chevre/service/task/onResourceUpdated.js +12 -0
  118. package/lib/chevre/service/task/returnPayTransaction.js +8 -3
  119. package/lib/chevre/service/transaction/placeOrderInProgress/result.js +32 -16
  120. package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +13 -11
  121. package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +53 -17
  122. package/lib/chevre/service/transaction/placeOrderInProgress.js +4 -1
  123. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +7 -6
  124. package/lib/chevre/service/transaction/returnOrder.js +5 -1
  125. package/lib/chevre/settings.d.ts +3 -3
  126. package/lib/chevre/settings.js +4 -12
  127. package/package.json +3 -3
  128. package/example/src/chevre/migrateAuthorizePaymentActionResult.ts +0 -83
  129. package/example/src/chevre/migrateEventOrganizer.ts +0 -154
  130. package/lib/chevre/repo/mongoose/schemas/offer.d.ts +0 -149
  131. package/lib/chevre/repo/mongoose/schemas/offer.js +0 -210
@@ -1,149 +0,0 @@
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 = "Offer";
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
- additionalProperty: any[];
55
- addOn: any[];
56
- availability: string;
57
- availableAtOrFrom: any[];
58
- _id?: string | undefined;
59
- name?: any;
60
- typeOf?: string | undefined;
61
- project?: any;
62
- priceCurrency?: string | undefined;
63
- alternateName?: any;
64
- description?: any;
65
- identifier?: string | undefined;
66
- itemOffered?: any;
67
- eligibleQuantity?: any;
68
- color?: any;
69
- validFrom?: Date | undefined;
70
- category?: any;
71
- advanceBookingRequirement?: any;
72
- hasMerchantReturnPolicy?: any;
73
- priceSpecification?: any;
74
- eligibleCustomerType?: any;
75
- eligibleDuration?: any;
76
- eligibleMembershipType?: any;
77
- eligibleMonetaryAmount?: any;
78
- eligibleRegion?: any;
79
- eligibleSeatingType?: any;
80
- eligibleSubReservation?: any;
81
- settings?: any;
82
- validThrough?: Date | undefined;
83
- validRateLimit?: any;
84
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
85
- additionalProperty: any[];
86
- addOn: any[];
87
- availability: string;
88
- availableAtOrFrom: any[];
89
- _id?: string | undefined;
90
- name?: any;
91
- typeOf?: string | undefined;
92
- project?: any;
93
- priceCurrency?: string | undefined;
94
- alternateName?: any;
95
- description?: any;
96
- identifier?: string | undefined;
97
- itemOffered?: any;
98
- eligibleQuantity?: any;
99
- color?: any;
100
- validFrom?: Date | undefined;
101
- category?: any;
102
- advanceBookingRequirement?: any;
103
- hasMerchantReturnPolicy?: any;
104
- priceSpecification?: any;
105
- eligibleCustomerType?: any;
106
- eligibleDuration?: any;
107
- eligibleMembershipType?: any;
108
- eligibleMonetaryAmount?: any;
109
- eligibleRegion?: any;
110
- eligibleSeatingType?: any;
111
- eligibleSubReservation?: any;
112
- settings?: any;
113
- validThrough?: Date | undefined;
114
- validRateLimit?: any;
115
- }>> & Omit<import("mongoose").FlatRecord<{
116
- additionalProperty: any[];
117
- addOn: any[];
118
- availability: string;
119
- availableAtOrFrom: any[];
120
- _id?: string | undefined;
121
- name?: any;
122
- typeOf?: string | undefined;
123
- project?: any;
124
- priceCurrency?: string | undefined;
125
- alternateName?: any;
126
- description?: any;
127
- identifier?: string | undefined;
128
- itemOffered?: any;
129
- eligibleQuantity?: any;
130
- color?: any;
131
- validFrom?: Date | undefined;
132
- category?: any;
133
- advanceBookingRequirement?: any;
134
- hasMerchantReturnPolicy?: any;
135
- priceSpecification?: any;
136
- eligibleCustomerType?: any;
137
- eligibleDuration?: any;
138
- eligibleMembershipType?: any;
139
- eligibleMonetaryAmount?: any;
140
- eligibleRegion?: any;
141
- eligibleSeatingType?: any;
142
- eligibleSubReservation?: any;
143
- settings?: any;
144
- validThrough?: Date | undefined;
145
- validRateLimit?: any;
146
- }> & Required<{
147
- _id: string;
148
- }>, never>>;
149
- export { modelName, schema };
@@ -1,210 +0,0 @@
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 = 'Offer';
7
- exports.modelName = modelName;
8
- /**
9
- * 単価オファースキーマ
10
- */
11
- const schema = new mongoose_1.Schema({
12
- project: mongoose_1.SchemaTypes.Mixed,
13
- _id: String,
14
- identifier: String,
15
- typeOf: String,
16
- name: mongoose_1.SchemaTypes.Mixed,
17
- description: mongoose_1.SchemaTypes.Mixed,
18
- category: mongoose_1.SchemaTypes.Mixed,
19
- color: mongoose_1.SchemaTypes.Mixed,
20
- additionalProperty: [mongoose_1.SchemaTypes.Mixed],
21
- advanceBookingRequirement: mongoose_1.SchemaTypes.Mixed,
22
- alternateName: mongoose_1.SchemaTypes.Mixed,
23
- // acceptedPaymentMethod: SchemaTypes.Mixed, // 削除(2023-02-27~)
24
- addOn: [mongoose_1.SchemaTypes.Mixed],
25
- availability: {
26
- type: String,
27
- required: true
28
- },
29
- availableAtOrFrom: [mongoose_1.SchemaTypes.Mixed],
30
- hasMerchantReturnPolicy: mongoose_1.SchemaTypes.Mixed,
31
- itemOffered: mongoose_1.SchemaTypes.Mixed,
32
- priceCurrency: String,
33
- priceSpecification: mongoose_1.SchemaTypes.Mixed,
34
- eligibleCustomerType: mongoose_1.SchemaTypes.Mixed,
35
- eligibleDuration: mongoose_1.SchemaTypes.Mixed,
36
- eligibleMembershipType: mongoose_1.SchemaTypes.Mixed,
37
- eligibleMonetaryAmount: mongoose_1.SchemaTypes.Mixed,
38
- eligibleQuantity: mongoose_1.SchemaTypes.Mixed,
39
- eligibleRegion: mongoose_1.SchemaTypes.Mixed,
40
- eligibleSeatingType: mongoose_1.SchemaTypes.Mixed,
41
- eligibleSubReservation: mongoose_1.SchemaTypes.Mixed,
42
- // settings追加(2023-01-26~)
43
- settings: mongoose_1.SchemaTypes.Mixed,
44
- validFrom: Date,
45
- validThrough: Date,
46
- validRateLimit: mongoose_1.SchemaTypes.Mixed
47
- }, {
48
- collection: 'offers',
49
- id: true,
50
- read: 'primaryPreferred',
51
- writeConcern: writeConcern_1.writeConcern,
52
- // trueに変更(2022-08-08~)
53
- strict: true,
54
- strictQuery: false,
55
- timestamps: {
56
- createdAt: 'createdAt',
57
- updatedAt: 'updatedAt'
58
- },
59
- toJSON: {
60
- getters: false,
61
- virtuals: false,
62
- minimize: false,
63
- versionKey: false
64
- },
65
- toObject: {
66
- getters: false,
67
- virtuals: true,
68
- minimize: false,
69
- versionKey: false
70
- }
71
- });
72
- exports.schema = schema;
73
- schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
74
- schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
75
- schema.index({ 'priceSpecification.price': 1 }, {
76
- name: 'searchByPriceSpecificationPrice',
77
- partialFilterExpression: {
78
- 'priceSpecification.price': { $exists: true }
79
- }
80
- });
81
- schema.index({ 'project.id': 1, 'priceSpecification.price': 1 }, {
82
- name: 'searchByProjectId-v20220721'
83
- });
84
- schema.index({ identifier: 1, 'priceSpecification.price': 1 }, {
85
- name: 'searchByIdentifier',
86
- partialFilterExpression: {
87
- identifier: { $exists: true }
88
- }
89
- });
90
- schema.index({ 'priceSpecification.referenceQuantity.value': 1, 'priceSpecification.price': 1 }, {
91
- name: 'searchByPriceSpecificationReferenceQuantityValue',
92
- partialFilterExpression: {
93
- 'priceSpecification.referenceQuantity.value': { $exists: true }
94
- }
95
- });
96
- schema.index({ 'priceSpecification.accounting.accountsReceivable': 1, 'priceSpecification.price': 1 }, {
97
- name: 'searchByPriceSpecificationAccountingAccountsReceivable',
98
- partialFilterExpression: {
99
- 'priceSpecification.accounting.accountsReceivable': { $exists: true }
100
- }
101
- });
102
- schema.index({ 'priceSpecification.accounting.operatingRevenue.codeValue': 1, 'priceSpecification.price': 1 }, {
103
- name: 'searchByPriceSpecificationAccountingOperatingRevenueCodeValue',
104
- partialFilterExpression: {
105
- 'priceSpecification.accounting.operatingRevenue.codeValue': { $exists: true }
106
- }
107
- });
108
- schema.index({ 'priceSpecification.appliesToMovieTicket.serviceType': 1, 'priceSpecification.price': 1 }, {
109
- name: 'searchByPriceSpecificationAppliesToMovieTicketServiceType',
110
- partialFilterExpression: {
111
- 'priceSpecification.appliesToMovieTicket.serviceType': { $exists: true }
112
- }
113
- });
114
- schema.index({ 'priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': 1, 'priceSpecification.price': 1 }, {
115
- name: 'searchByPriceSpecificationAppliesToMovieTicketServiceOutputTypeOf',
116
- partialFilterExpression: {
117
- 'priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': { $exists: true }
118
- }
119
- });
120
- schema.index({ 'name.ja': 1, 'priceSpecification.price': 1 }, {
121
- name: 'searchByNameJa',
122
- partialFilterExpression: {
123
- 'name.ja': { $exists: true }
124
- }
125
- });
126
- schema.index({ 'name.en': 1, 'priceSpecification.price': 1 }, {
127
- name: 'searchByNameEn',
128
- partialFilterExpression: {
129
- 'name.en': { $exists: true }
130
- }
131
- });
132
- schema.index({ alternateName: 1, 'priceSpecification.price': 1 }, {
133
- name: 'searchByAlternateName',
134
- partialFilterExpression: {
135
- alternateName: { $exists: true }
136
- }
137
- });
138
- schema.index({ 'category.id': 1, 'priceSpecification.price': 1 }, {
139
- name: 'searchCategoryId',
140
- partialFilterExpression: {
141
- 'category.id': { $exists: true }
142
- }
143
- });
144
- schema.index({ 'category.codeValue': 1, 'priceSpecification.price': 1 }, {
145
- name: 'searchByCategoryCodeValue',
146
- partialFilterExpression: {
147
- 'category.codeValue': { $exists: true }
148
- }
149
- });
150
- schema.index({ 'itemOffered.typeOf': 1, 'priceSpecification.price': 1 }, {
151
- name: 'searchByItemOfferedTypeOf',
152
- partialFilterExpression: {
153
- 'itemOffered.typeOf': { $exists: true }
154
- }
155
- });
156
- schema.index({ 'availableAtOrFrom.id': 1, 'priceSpecification.price': 1 }, {
157
- name: 'searchByAvailableAtOrFromId',
158
- partialFilterExpression: {
159
- 'availableAtOrFrom.id': { $exists: true }
160
- }
161
- });
162
- schema.index({ 'eligibleMembershipType.codeValue': 1, 'priceSpecification.price': 1 }, {
163
- name: 'searchByEligibleMembershipTypeCodeValue',
164
- partialFilterExpression: {
165
- 'eligibleMembershipType.codeValue': { $exists: true }
166
- }
167
- });
168
- schema.index({ 'eligibleMonetaryAmount.currency': 1, 'priceSpecification.price': 1 }, {
169
- name: 'searchByEligibleMonetaryAmountCurrency',
170
- partialFilterExpression: {
171
- 'eligibleMonetaryAmount.currency': { $exists: true }
172
- }
173
- });
174
- schema.index({ 'eligibleSeatingType.codeValue': 1, 'priceSpecification.price': 1 }, {
175
- name: 'searchByEligibleSeatingTypeCodeValue',
176
- partialFilterExpression: {
177
- 'eligibleSeatingType.codeValue': { $exists: true }
178
- }
179
- });
180
- schema.index({ 'addOn.itemOffered.id': 1, 'priceSpecification.price': 1 }, {
181
- name: 'searchByAddOnItemOfferedId',
182
- partialFilterExpression: {
183
- 'addOn.itemOffered.id': { $exists: true }
184
- }
185
- });
186
- schema.index({ 'hasMerchantReturnPolicy.id': 1, 'priceSpecification.price': 1 }, {
187
- name: 'searchByHasMerchantReturnPolicyId',
188
- partialFilterExpression: {
189
- 'hasMerchantReturnPolicy.id': { $exists: true }
190
- }
191
- });
192
- schema.index({ additionalProperty: 1, 'priceSpecification.price': 1 }, {
193
- name: 'searchByAdditionalProperty',
194
- partialFilterExpression: {
195
- additionalProperty: { $exists: true }
196
- }
197
- });
198
- schema.index({ validFrom: 1, 'priceSpecification.price': 1 }, {
199
- name: 'searchByValidFrom',
200
- partialFilterExpression: {
201
- validFrom: { $exists: true }
202
- }
203
- });
204
- schema.index({ validThrough: 1, 'priceSpecification.price': 1 }, {
205
- name: 'searchByValidThrough',
206
- partialFilterExpression: {
207
- validThrough: { $exists: true }
208
- }
209
- });
210
- schema.index({ availability: 1, 'priceSpecification.price': 1 }, { name: 'searchByAvailability' });