@chevre/domain 21.8.0-alpha.6 → 21.8.0-alpha.60

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 (129) hide show
  1. package/example/src/chevre/countOffers.ts +32 -0
  2. package/example/src/chevre/findItemListElementByCatalogId.ts +23 -0
  3. package/example/src/chevre/importOffersFromCOA.ts +7 -1
  4. package/example/src/chevre/migrateAggregateOffers.ts +89 -0
  5. package/example/src/chevre/migrateOrderPaymentMethodIdentifier.ts +81 -0
  6. package/example/src/chevre/migratePayTransactionPaymentMethodId.ts +72 -0
  7. package/example/src/chevre/migratePayTransactionPaymentMethodIdentifier.ts +78 -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/searchAggregateOffers.ts +48 -0
  12. package/example/src/chevre/searchEventTicketOffers.ts +3 -1
  13. package/example/src/chevre/searchEvents.ts +9 -7
  14. package/example/src/chevre/searchOffersByCatalog.ts +9 -5
  15. package/example/src/chevre/searchOffersFromAggregateOffer.ts +168 -0
  16. package/example/src/chevre/searchOrders.ts +9 -7
  17. package/example/src/chevre/sync2aggregateOffer.ts +27 -0
  18. package/example/src/chevre/syncAggregateOffer.ts +25 -0
  19. package/lib/chevre/emailMessageBuilder.js +6 -5
  20. package/lib/chevre/repo/aggregateOffer.d.ts +62 -0
  21. package/lib/chevre/repo/aggregateOffer.js +534 -0
  22. package/lib/chevre/repo/assetTransaction.d.ts +16 -1
  23. package/lib/chevre/repo/assetTransaction.js +54 -2
  24. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +74 -0
  25. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +177 -0
  26. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +3 -3
  27. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +3 -3
  28. package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -3
  29. package/lib/chevre/repo/mongoose/schemas/offer.d.ts +24 -33
  30. package/lib/chevre/repo/mongoose/schemas/offer.js +4 -3
  31. package/lib/chevre/repo/mongoose/schemas/order.d.ts +3 -0
  32. package/lib/chevre/repo/mongoose/schemas/order.js +7 -0
  33. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +9 -9
  34. package/lib/chevre/repo/mongoose/schemas/product.d.ts +3 -3
  35. package/lib/chevre/repo/mongoose/schemas/project.d.ts +3 -3
  36. package/lib/chevre/repo/mongoose/schemas/task.d.ts +3 -0
  37. package/lib/chevre/repo/mongoose/schemas/task.js +8 -0
  38. package/lib/chevre/repo/offer.d.ts +82 -47
  39. package/lib/chevre/repo/offer.js +1279 -289
  40. package/lib/chevre/repo/offerCatalog.d.ts +6 -0
  41. package/lib/chevre/repo/offerCatalog.js +13 -0
  42. package/lib/chevre/repo/order.d.ts +15 -0
  43. package/lib/chevre/repo/order.js +58 -26
  44. package/lib/chevre/repo/task.d.ts +7 -1
  45. package/lib/chevre/repo/task.js +100 -0
  46. package/lib/chevre/repository.d.ts +3 -0
  47. package/lib/chevre/repository.js +5 -1
  48. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -1
  49. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +2 -1
  50. package/lib/chevre/service/assetTransaction/pay/account/validation.js +2 -2
  51. package/lib/chevre/service/assetTransaction/pay/factory.js +26 -18
  52. package/lib/chevre/service/assetTransaction/pay/potentialActions.js +3 -3
  53. package/lib/chevre/service/assetTransaction/pay.js +65 -46
  54. package/lib/chevre/service/assetTransaction/refund/factory.js +8 -2
  55. package/lib/chevre/service/assetTransaction/registerService.js +2 -1
  56. package/lib/chevre/service/assetTransaction/reserve.js +111 -35
  57. package/lib/chevre/service/delivery.js +17 -0
  58. package/lib/chevre/service/offer/event/authorize.js +39 -35
  59. package/lib/chevre/service/offer/event/factory.d.ts +1 -1
  60. package/lib/chevre/service/offer/event/factory.js +8 -8
  61. package/lib/chevre/service/offer/event/importFromCOA.d.ts +2 -0
  62. package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +1 -0
  63. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +6 -3
  64. package/lib/chevre/service/offer/event/voidTransaction.js +57 -36
  65. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +2 -1
  66. package/lib/chevre/service/offer/eventServiceByCOA/factory.js +7 -11
  67. package/lib/chevre/service/offer/eventServiceByCOA.js +55 -27
  68. package/lib/chevre/service/offer/factory.d.ts +12 -4
  69. package/lib/chevre/service/offer/factory.js +9 -11
  70. package/lib/chevre/service/offer/product/searchProductOffers.d.ts +8 -1
  71. package/lib/chevre/service/offer/product/searchProductOffers.js +10 -3
  72. package/lib/chevre/service/offer/product.d.ts +1 -0
  73. package/lib/chevre/service/offer/product.js +3 -2
  74. package/lib/chevre/service/offer.d.ts +1 -0
  75. package/lib/chevre/service/offer.js +7 -1
  76. package/lib/chevre/service/order/confirmPayTransaction.d.ts +0 -2
  77. package/lib/chevre/service/order/confirmPayTransaction.js +29 -40
  78. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +27 -0
  79. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +226 -0
  80. package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +8 -6
  81. package/lib/chevre/service/order/onOrderStatusChanged/factory.js +80 -57
  82. package/lib/chevre/service/order/onOrderStatusChanged.js +81 -54
  83. package/lib/chevre/service/order/payOrder.d.ts +2 -10
  84. package/lib/chevre/service/order/payOrder.js +4 -45
  85. package/lib/chevre/service/order/placeOrder.js +11 -13
  86. package/lib/chevre/service/order.d.ts +3 -1
  87. package/lib/chevre/service/order.js +6 -2
  88. package/lib/chevre/service/payment/any/factory.js +33 -8
  89. package/lib/chevre/service/payment/any.js +30 -21
  90. package/lib/chevre/service/payment/creditCard.js +12 -12
  91. package/lib/chevre/service/payment/movieTicket/validation.js +2 -2
  92. package/lib/chevre/service/payment/movieTicket.js +10 -11
  93. package/lib/chevre/service/payment/paymentCard.js +9 -12
  94. package/lib/chevre/service/project.js +1 -1
  95. package/lib/chevre/service/reserve/checkInReservation.d.ts +8 -0
  96. package/lib/chevre/service/reserve/checkInReservation.js +3 -2
  97. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +3 -0
  98. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +4 -5
  99. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.d.ts +8 -0
  100. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +16 -11
  101. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -1
  102. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +3 -0
  103. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +3 -5
  104. package/lib/chevre/service/task/confirmPayTransaction.js +1 -3
  105. package/lib/chevre/service/task/importOffersFromCOA.js +3 -0
  106. package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +6 -0
  107. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +37 -0
  108. package/lib/chevre/service/task/onAuthorizationCreated.js +5 -1
  109. package/lib/chevre/service/task/onOrderPaymentCompleted.d.ts +6 -0
  110. package/lib/chevre/service/task/onOrderPaymentCompleted.js +35 -0
  111. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -0
  112. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +7 -0
  113. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.d.ts +17 -0
  114. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +60 -0
  115. package/lib/chevre/service/task/onResourceUpdated.js +12 -0
  116. package/lib/chevre/service/task/returnPayTransaction.js +8 -3
  117. package/lib/chevre/service/task/syncAggregateOffer.d.ts +7 -0
  118. package/lib/chevre/service/task/syncAggregateOffer.js +23 -0
  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 +5 -3
  126. package/lib/chevre/settings.js +6 -6
  127. package/package.json +3 -3
  128. package/example/src/chevre/migrateAuthorizePaymentActionResult.ts +0 -83
  129. package/example/src/chevre/migrateEventOrganizer.ts +0 -154
@@ -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,177 @@
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({ 'offers.availability': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersAvailability' });
57
+ schema.index({ 'offers.itemOffered.typeOf': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersItemOfferedTypeOf' });
58
+ schema.index({ 'offers.identifier': 1, 'offers.priceSpecification.price': 1 }, {
59
+ name: 'searchByOffersIdentifier',
60
+ partialFilterExpression: {
61
+ 'offers.identifier': { $exists: true }
62
+ }
63
+ });
64
+ schema.index({ 'offers.priceSpecification.referenceQuantity.value': 1, 'offers.priceSpecification.price': 1 }, {
65
+ name: 'searchByOffersPriceSpecificationReferenceQuantityValue',
66
+ partialFilterExpression: {
67
+ 'offers.priceSpecification.referenceQuantity.value': { $exists: true }
68
+ }
69
+ });
70
+ schema.index({ 'offers.priceSpecification.accounting.accountsReceivable': 1, 'offers.priceSpecification.price': 1 }, {
71
+ name: 'searchByOffersPriceSpecificationAccountingAccountsReceivable',
72
+ partialFilterExpression: {
73
+ 'offers.priceSpecification.accounting.accountsReceivable': { $exists: true }
74
+ }
75
+ });
76
+ schema.index({ 'offers.priceSpecification.accounting.operatingRevenue.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
77
+ name: 'searchByOffersPriceSpecificationAccountingOperatingRevenueCodeValue',
78
+ partialFilterExpression: {
79
+ 'offers.priceSpecification.accounting.operatingRevenue.codeValue': { $exists: true }
80
+ }
81
+ });
82
+ schema.index({ 'offers.priceSpecification.appliesToMovieTicket.serviceType': 1, 'offers.priceSpecification.price': 1 }, {
83
+ name: 'searchByOffersPriceSpecificationAppliesToMovieTicketServiceType',
84
+ partialFilterExpression: {
85
+ 'offers.priceSpecification.appliesToMovieTicket.serviceType': { $exists: true }
86
+ }
87
+ });
88
+ schema.index({ 'offers.priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': 1, 'offers.priceSpecification.price': 1 }, {
89
+ name: 'searchByOffersPriceSpecificationAppliesToMovieTicketServiceOutputTypeOf',
90
+ partialFilterExpression: {
91
+ 'offers.priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': { $exists: true }
92
+ }
93
+ });
94
+ schema.index({ 'offers.name.ja': 1, 'offers.priceSpecification.price': 1 }, {
95
+ name: 'searchByOffersNameJa',
96
+ partialFilterExpression: {
97
+ 'offers.name.ja': { $exists: true }
98
+ }
99
+ });
100
+ schema.index({ 'offers.name.en': 1, 'offers.priceSpecification.price': 1 }, {
101
+ name: 'searchByOffersNameEn',
102
+ partialFilterExpression: {
103
+ 'offers.name.en': { $exists: true }
104
+ }
105
+ });
106
+ schema.index({ 'offers.alternateName': 1, 'offers.priceSpecification.price': 1 }, {
107
+ name: 'searchByOffersAlternateName',
108
+ partialFilterExpression: {
109
+ 'offers.alternateName': { $exists: true }
110
+ }
111
+ });
112
+ schema.index({ 'offers.category.id': 1, 'offers.priceSpecification.price': 1 }, {
113
+ name: 'searchOffersCategoryId',
114
+ partialFilterExpression: {
115
+ 'offers.category.id': { $exists: true }
116
+ }
117
+ });
118
+ schema.index({ 'offers.category.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
119
+ name: 'searchByOffersCategoryCodeValue',
120
+ partialFilterExpression: {
121
+ 'offers.category.codeValue': { $exists: true }
122
+ }
123
+ });
124
+ schema.index({ 'offers.availableAtOrFrom.id': 1, 'offers.priceSpecification.price': 1 }, {
125
+ name: 'searchByOffersAvailableAtOrFromId',
126
+ partialFilterExpression: {
127
+ 'offers.availableAtOrFrom.id': { $exists: true }
128
+ }
129
+ });
130
+ schema.index({ 'offers.eligibleMembershipType.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
131
+ name: 'searchByOffersEligibleMembershipTypeCodeValue',
132
+ partialFilterExpression: {
133
+ 'offers.eligibleMembershipType.codeValue': { $exists: true }
134
+ }
135
+ });
136
+ schema.index({ 'offers.eligibleMonetaryAmount.currency': 1, 'offers.priceSpecification.price': 1 }, {
137
+ name: 'searchByOffersEligibleMonetaryAmountCurrency',
138
+ partialFilterExpression: {
139
+ 'offers.eligibleMonetaryAmount.currency': { $exists: true }
140
+ }
141
+ });
142
+ schema.index({ 'offers.eligibleSeatingType.codeValue': 1, 'offers.priceSpecification.price': 1 }, {
143
+ name: 'searchByOffersEligibleSeatingTypeCodeValue',
144
+ partialFilterExpression: {
145
+ 'offers.eligibleSeatingType.codeValue': { $exists: true }
146
+ }
147
+ });
148
+ schema.index({ 'offers.addOn.itemOffered.id': 1, 'offers.priceSpecification.price': 1 }, {
149
+ name: 'searchByOffersAddOnItemOfferedId',
150
+ partialFilterExpression: {
151
+ 'offers.addOn.itemOffered.id': { $exists: true }
152
+ }
153
+ });
154
+ schema.index({ 'offers.hasMerchantReturnPolicy.id': 1, 'offers.priceSpecification.price': 1 }, {
155
+ name: 'searchByOffersHasMerchantReturnPolicyId',
156
+ partialFilterExpression: {
157
+ 'offers.hasMerchantReturnPolicy.id': { $exists: true }
158
+ }
159
+ });
160
+ schema.index({ 'offers.additionalProperty': 1, 'offers.priceSpecification.price': 1 }, {
161
+ name: 'searchByOffersAdditionalProperty',
162
+ partialFilterExpression: {
163
+ 'offers.additionalProperty': { $exists: true }
164
+ }
165
+ });
166
+ schema.index({ 'offers.validFrom': 1, 'offers.priceSpecification.price': 1 }, {
167
+ name: 'searchByOffersValidFrom',
168
+ partialFilterExpression: {
169
+ 'offers.validFrom': { $exists: true }
170
+ }
171
+ });
172
+ schema.index({ 'offers.validThrough': 1, 'offers.priceSpecification.price': 1 }, {
173
+ name: 'searchByOffersValidThrough',
174
+ partialFilterExpression: {
175
+ 'offers.validThrough': { $exists: true }
176
+ }
177
+ });
@@ -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;
@@ -52,9 +52,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
52
52
  };
53
53
  }, {
54
54
  additionalProperty: any[];
55
- addOn: any[];
56
55
  availability: string;
57
56
  availableAtOrFrom: any[];
57
+ addOn: any[];
58
58
  _id?: string | undefined;
59
59
  name?: any;
60
60
  typeOf?: string | undefined;
@@ -64,28 +64,25 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
64
64
  description?: any;
65
65
  identifier?: string | undefined;
66
66
  itemOffered?: any;
67
- eligibleQuantity?: any;
67
+ priceSpecification?: any;
68
68
  color?: any;
69
- validFrom?: Date | undefined;
70
69
  category?: any;
71
- advanceBookingRequirement?: any;
72
- hasMerchantReturnPolicy?: any;
73
- priceSpecification?: any;
74
- eligibleCustomerType?: any;
75
- eligibleDuration?: any;
70
+ eligibleSeatingType?: any;
76
71
  eligibleMembershipType?: any;
77
72
  eligibleMonetaryAmount?: any;
78
- eligibleRegion?: any;
79
- eligibleSeatingType?: any;
80
73
  eligibleSubReservation?: any;
81
- settings?: any;
74
+ validFrom?: Date | undefined;
82
75
  validThrough?: Date | undefined;
83
76
  validRateLimit?: any;
77
+ advanceBookingRequirement?: any;
78
+ hasMerchantReturnPolicy?: any;
79
+ settings?: any;
80
+ eligibleDuration?: any;
84
81
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
85
82
  additionalProperty: any[];
86
- addOn: any[];
87
83
  availability: string;
88
84
  availableAtOrFrom: any[];
85
+ addOn: any[];
89
86
  _id?: string | undefined;
90
87
  name?: any;
91
88
  typeOf?: string | undefined;
@@ -95,28 +92,25 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
95
92
  description?: any;
96
93
  identifier?: string | undefined;
97
94
  itemOffered?: any;
98
- eligibleQuantity?: any;
95
+ priceSpecification?: any;
99
96
  color?: any;
100
- validFrom?: Date | undefined;
101
97
  category?: any;
102
- advanceBookingRequirement?: any;
103
- hasMerchantReturnPolicy?: any;
104
- priceSpecification?: any;
105
- eligibleCustomerType?: any;
106
- eligibleDuration?: any;
98
+ eligibleSeatingType?: any;
107
99
  eligibleMembershipType?: any;
108
100
  eligibleMonetaryAmount?: any;
109
- eligibleRegion?: any;
110
- eligibleSeatingType?: any;
111
101
  eligibleSubReservation?: any;
112
- settings?: any;
102
+ validFrom?: Date | undefined;
113
103
  validThrough?: Date | undefined;
114
104
  validRateLimit?: any;
105
+ advanceBookingRequirement?: any;
106
+ hasMerchantReturnPolicy?: any;
107
+ settings?: any;
108
+ eligibleDuration?: any;
115
109
  }>> & Omit<import("mongoose").FlatRecord<{
116
110
  additionalProperty: any[];
117
- addOn: any[];
118
111
  availability: string;
119
112
  availableAtOrFrom: any[];
113
+ addOn: any[];
120
114
  _id?: string | undefined;
121
115
  name?: any;
122
116
  typeOf?: string | undefined;
@@ -126,23 +120,20 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
126
120
  description?: any;
127
121
  identifier?: string | undefined;
128
122
  itemOffered?: any;
129
- eligibleQuantity?: any;
123
+ priceSpecification?: any;
130
124
  color?: any;
131
- validFrom?: Date | undefined;
132
125
  category?: any;
133
- advanceBookingRequirement?: any;
134
- hasMerchantReturnPolicy?: any;
135
- priceSpecification?: any;
136
- eligibleCustomerType?: any;
137
- eligibleDuration?: any;
126
+ eligibleSeatingType?: any;
138
127
  eligibleMembershipType?: any;
139
128
  eligibleMonetaryAmount?: any;
140
- eligibleRegion?: any;
141
- eligibleSeatingType?: any;
142
129
  eligibleSubReservation?: any;
143
- settings?: any;
130
+ validFrom?: Date | undefined;
144
131
  validThrough?: Date | undefined;
145
132
  validRateLimit?: any;
133
+ advanceBookingRequirement?: any;
134
+ hasMerchantReturnPolicy?: any;
135
+ settings?: any;
136
+ eligibleDuration?: any;
146
137
  }> & Required<{
147
138
  _id: string;
148
139
  }>, never>>;
@@ -29,14 +29,15 @@ const schema = new mongoose_1.Schema({
29
29
  availableAtOrFrom: [mongoose_1.SchemaTypes.Mixed],
30
30
  hasMerchantReturnPolicy: mongoose_1.SchemaTypes.Mixed,
31
31
  itemOffered: mongoose_1.SchemaTypes.Mixed,
32
+ // offers: [SchemaTypes.Mixed],
32
33
  priceCurrency: String,
33
34
  priceSpecification: mongoose_1.SchemaTypes.Mixed,
34
- eligibleCustomerType: mongoose_1.SchemaTypes.Mixed,
35
+ // eligibleCustomerType: SchemaTypes.Mixed,
35
36
  eligibleDuration: mongoose_1.SchemaTypes.Mixed,
36
37
  eligibleMembershipType: mongoose_1.SchemaTypes.Mixed,
37
38
  eligibleMonetaryAmount: mongoose_1.SchemaTypes.Mixed,
38
- eligibleQuantity: mongoose_1.SchemaTypes.Mixed,
39
- eligibleRegion: mongoose_1.SchemaTypes.Mixed,
39
+ // eligibleQuantity: SchemaTypes.Mixed,
40
+ // eligibleRegion: SchemaTypes.Mixed,
40
41
  eligibleSeatingType: mongoose_1.SchemaTypes.Mixed,
41
42
  eligibleSubReservation: mongoose_1.SchemaTypes.Mixed,
42
43
  // settings追加(2023-01-26~)
@@ -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;