@chevre/domain 21.8.0-alpha.65 → 21.8.0-alpha.66
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.
|
@@ -53,6 +53,18 @@ schema.index({ 'offers.identifier': 1, 'project.id': 1 }, {
|
|
|
53
53
|
name: 'uniqueOfferIdentifier',
|
|
54
54
|
unique: true
|
|
55
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
|
+
});
|
|
56
68
|
schema.index({ 'offers.availability': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersAvailability' });
|
|
57
69
|
schema.index({ 'offers.itemOffered.typeOf': 1, 'offers.priceSpecification.price': 1 }, { name: 'searchByOffersItemOfferedTypeOf' });
|
|
58
70
|
schema.index({ 'offers.identifier': 1, 'offers.priceSpecification.price': 1 }, {
|
package/package.json
CHANGED
|
@@ -1,140 +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
|
-
availability: string;
|
|
56
|
-
availableAtOrFrom: any[];
|
|
57
|
-
addOn: 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
|
-
priceSpecification?: any;
|
|
68
|
-
color?: any;
|
|
69
|
-
category?: any;
|
|
70
|
-
eligibleSeatingType?: any;
|
|
71
|
-
eligibleMembershipType?: any;
|
|
72
|
-
eligibleMonetaryAmount?: any;
|
|
73
|
-
eligibleSubReservation?: any;
|
|
74
|
-
validFrom?: Date | undefined;
|
|
75
|
-
validThrough?: Date | undefined;
|
|
76
|
-
validRateLimit?: any;
|
|
77
|
-
advanceBookingRequirement?: any;
|
|
78
|
-
hasMerchantReturnPolicy?: any;
|
|
79
|
-
settings?: any;
|
|
80
|
-
eligibleDuration?: any;
|
|
81
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
82
|
-
additionalProperty: any[];
|
|
83
|
-
availability: string;
|
|
84
|
-
availableAtOrFrom: any[];
|
|
85
|
-
addOn: any[];
|
|
86
|
-
_id?: string | undefined;
|
|
87
|
-
name?: any;
|
|
88
|
-
typeOf?: string | undefined;
|
|
89
|
-
project?: any;
|
|
90
|
-
priceCurrency?: string | undefined;
|
|
91
|
-
alternateName?: any;
|
|
92
|
-
description?: any;
|
|
93
|
-
identifier?: string | undefined;
|
|
94
|
-
itemOffered?: any;
|
|
95
|
-
priceSpecification?: any;
|
|
96
|
-
color?: any;
|
|
97
|
-
category?: any;
|
|
98
|
-
eligibleSeatingType?: any;
|
|
99
|
-
eligibleMembershipType?: any;
|
|
100
|
-
eligibleMonetaryAmount?: any;
|
|
101
|
-
eligibleSubReservation?: any;
|
|
102
|
-
validFrom?: Date | undefined;
|
|
103
|
-
validThrough?: Date | undefined;
|
|
104
|
-
validRateLimit?: any;
|
|
105
|
-
advanceBookingRequirement?: any;
|
|
106
|
-
hasMerchantReturnPolicy?: any;
|
|
107
|
-
settings?: any;
|
|
108
|
-
eligibleDuration?: any;
|
|
109
|
-
}>> & Omit<import("mongoose").FlatRecord<{
|
|
110
|
-
additionalProperty: any[];
|
|
111
|
-
availability: string;
|
|
112
|
-
availableAtOrFrom: any[];
|
|
113
|
-
addOn: any[];
|
|
114
|
-
_id?: string | undefined;
|
|
115
|
-
name?: any;
|
|
116
|
-
typeOf?: string | undefined;
|
|
117
|
-
project?: any;
|
|
118
|
-
priceCurrency?: string | undefined;
|
|
119
|
-
alternateName?: any;
|
|
120
|
-
description?: any;
|
|
121
|
-
identifier?: string | undefined;
|
|
122
|
-
itemOffered?: any;
|
|
123
|
-
priceSpecification?: any;
|
|
124
|
-
color?: any;
|
|
125
|
-
category?: any;
|
|
126
|
-
eligibleSeatingType?: any;
|
|
127
|
-
eligibleMembershipType?: any;
|
|
128
|
-
eligibleMonetaryAmount?: any;
|
|
129
|
-
eligibleSubReservation?: any;
|
|
130
|
-
validFrom?: Date | undefined;
|
|
131
|
-
validThrough?: Date | undefined;
|
|
132
|
-
validRateLimit?: any;
|
|
133
|
-
advanceBookingRequirement?: any;
|
|
134
|
-
hasMerchantReturnPolicy?: any;
|
|
135
|
-
settings?: any;
|
|
136
|
-
eligibleDuration?: any;
|
|
137
|
-
}> & Required<{
|
|
138
|
-
_id: string;
|
|
139
|
-
}>, never>>;
|
|
140
|
-
export { modelName, schema };
|
|
@@ -1,211 +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
|
-
// offers: [SchemaTypes.Mixed],
|
|
33
|
-
priceCurrency: String,
|
|
34
|
-
priceSpecification: mongoose_1.SchemaTypes.Mixed,
|
|
35
|
-
// eligibleCustomerType: SchemaTypes.Mixed,
|
|
36
|
-
eligibleDuration: mongoose_1.SchemaTypes.Mixed,
|
|
37
|
-
eligibleMembershipType: mongoose_1.SchemaTypes.Mixed,
|
|
38
|
-
eligibleMonetaryAmount: mongoose_1.SchemaTypes.Mixed,
|
|
39
|
-
// eligibleQuantity: SchemaTypes.Mixed,
|
|
40
|
-
// eligibleRegion: SchemaTypes.Mixed,
|
|
41
|
-
eligibleSeatingType: mongoose_1.SchemaTypes.Mixed,
|
|
42
|
-
eligibleSubReservation: mongoose_1.SchemaTypes.Mixed,
|
|
43
|
-
// settings追加(2023-01-26~)
|
|
44
|
-
settings: mongoose_1.SchemaTypes.Mixed,
|
|
45
|
-
validFrom: Date,
|
|
46
|
-
validThrough: Date,
|
|
47
|
-
validRateLimit: mongoose_1.SchemaTypes.Mixed
|
|
48
|
-
}, {
|
|
49
|
-
collection: 'offers',
|
|
50
|
-
id: true,
|
|
51
|
-
read: 'primaryPreferred',
|
|
52
|
-
writeConcern: writeConcern_1.writeConcern,
|
|
53
|
-
// trueに変更(2022-08-08~)
|
|
54
|
-
strict: true,
|
|
55
|
-
strictQuery: false,
|
|
56
|
-
timestamps: {
|
|
57
|
-
createdAt: 'createdAt',
|
|
58
|
-
updatedAt: 'updatedAt'
|
|
59
|
-
},
|
|
60
|
-
toJSON: {
|
|
61
|
-
getters: false,
|
|
62
|
-
virtuals: false,
|
|
63
|
-
minimize: false,
|
|
64
|
-
versionKey: false
|
|
65
|
-
},
|
|
66
|
-
toObject: {
|
|
67
|
-
getters: false,
|
|
68
|
-
virtuals: true,
|
|
69
|
-
minimize: false,
|
|
70
|
-
versionKey: false
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
exports.schema = schema;
|
|
74
|
-
schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
|
|
75
|
-
schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
76
|
-
schema.index({ 'priceSpecification.price': 1 }, {
|
|
77
|
-
name: 'searchByPriceSpecificationPrice',
|
|
78
|
-
partialFilterExpression: {
|
|
79
|
-
'priceSpecification.price': { $exists: true }
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
schema.index({ 'project.id': 1, 'priceSpecification.price': 1 }, {
|
|
83
|
-
name: 'searchByProjectId-v20220721'
|
|
84
|
-
});
|
|
85
|
-
schema.index({ identifier: 1, 'priceSpecification.price': 1 }, {
|
|
86
|
-
name: 'searchByIdentifier',
|
|
87
|
-
partialFilterExpression: {
|
|
88
|
-
identifier: { $exists: true }
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
schema.index({ 'priceSpecification.referenceQuantity.value': 1, 'priceSpecification.price': 1 }, {
|
|
92
|
-
name: 'searchByPriceSpecificationReferenceQuantityValue',
|
|
93
|
-
partialFilterExpression: {
|
|
94
|
-
'priceSpecification.referenceQuantity.value': { $exists: true }
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
schema.index({ 'priceSpecification.accounting.accountsReceivable': 1, 'priceSpecification.price': 1 }, {
|
|
98
|
-
name: 'searchByPriceSpecificationAccountingAccountsReceivable',
|
|
99
|
-
partialFilterExpression: {
|
|
100
|
-
'priceSpecification.accounting.accountsReceivable': { $exists: true }
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
schema.index({ 'priceSpecification.accounting.operatingRevenue.codeValue': 1, 'priceSpecification.price': 1 }, {
|
|
104
|
-
name: 'searchByPriceSpecificationAccountingOperatingRevenueCodeValue',
|
|
105
|
-
partialFilterExpression: {
|
|
106
|
-
'priceSpecification.accounting.operatingRevenue.codeValue': { $exists: true }
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
schema.index({ 'priceSpecification.appliesToMovieTicket.serviceType': 1, 'priceSpecification.price': 1 }, {
|
|
110
|
-
name: 'searchByPriceSpecificationAppliesToMovieTicketServiceType',
|
|
111
|
-
partialFilterExpression: {
|
|
112
|
-
'priceSpecification.appliesToMovieTicket.serviceType': { $exists: true }
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
schema.index({ 'priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': 1, 'priceSpecification.price': 1 }, {
|
|
116
|
-
name: 'searchByPriceSpecificationAppliesToMovieTicketServiceOutputTypeOf',
|
|
117
|
-
partialFilterExpression: {
|
|
118
|
-
'priceSpecification.appliesToMovieTicket.serviceOutput.typeOf': { $exists: true }
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
schema.index({ 'name.ja': 1, 'priceSpecification.price': 1 }, {
|
|
122
|
-
name: 'searchByNameJa',
|
|
123
|
-
partialFilterExpression: {
|
|
124
|
-
'name.ja': { $exists: true }
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
schema.index({ 'name.en': 1, 'priceSpecification.price': 1 }, {
|
|
128
|
-
name: 'searchByNameEn',
|
|
129
|
-
partialFilterExpression: {
|
|
130
|
-
'name.en': { $exists: true }
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
schema.index({ alternateName: 1, 'priceSpecification.price': 1 }, {
|
|
134
|
-
name: 'searchByAlternateName',
|
|
135
|
-
partialFilterExpression: {
|
|
136
|
-
alternateName: { $exists: true }
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
schema.index({ 'category.id': 1, 'priceSpecification.price': 1 }, {
|
|
140
|
-
name: 'searchCategoryId',
|
|
141
|
-
partialFilterExpression: {
|
|
142
|
-
'category.id': { $exists: true }
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
schema.index({ 'category.codeValue': 1, 'priceSpecification.price': 1 }, {
|
|
146
|
-
name: 'searchByCategoryCodeValue',
|
|
147
|
-
partialFilterExpression: {
|
|
148
|
-
'category.codeValue': { $exists: true }
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
schema.index({ 'itemOffered.typeOf': 1, 'priceSpecification.price': 1 }, {
|
|
152
|
-
name: 'searchByItemOfferedTypeOf',
|
|
153
|
-
partialFilterExpression: {
|
|
154
|
-
'itemOffered.typeOf': { $exists: true }
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
schema.index({ 'availableAtOrFrom.id': 1, 'priceSpecification.price': 1 }, {
|
|
158
|
-
name: 'searchByAvailableAtOrFromId',
|
|
159
|
-
partialFilterExpression: {
|
|
160
|
-
'availableAtOrFrom.id': { $exists: true }
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
schema.index({ 'eligibleMembershipType.codeValue': 1, 'priceSpecification.price': 1 }, {
|
|
164
|
-
name: 'searchByEligibleMembershipTypeCodeValue',
|
|
165
|
-
partialFilterExpression: {
|
|
166
|
-
'eligibleMembershipType.codeValue': { $exists: true }
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
schema.index({ 'eligibleMonetaryAmount.currency': 1, 'priceSpecification.price': 1 }, {
|
|
170
|
-
name: 'searchByEligibleMonetaryAmountCurrency',
|
|
171
|
-
partialFilterExpression: {
|
|
172
|
-
'eligibleMonetaryAmount.currency': { $exists: true }
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
schema.index({ 'eligibleSeatingType.codeValue': 1, 'priceSpecification.price': 1 }, {
|
|
176
|
-
name: 'searchByEligibleSeatingTypeCodeValue',
|
|
177
|
-
partialFilterExpression: {
|
|
178
|
-
'eligibleSeatingType.codeValue': { $exists: true }
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
schema.index({ 'addOn.itemOffered.id': 1, 'priceSpecification.price': 1 }, {
|
|
182
|
-
name: 'searchByAddOnItemOfferedId',
|
|
183
|
-
partialFilterExpression: {
|
|
184
|
-
'addOn.itemOffered.id': { $exists: true }
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
schema.index({ 'hasMerchantReturnPolicy.id': 1, 'priceSpecification.price': 1 }, {
|
|
188
|
-
name: 'searchByHasMerchantReturnPolicyId',
|
|
189
|
-
partialFilterExpression: {
|
|
190
|
-
'hasMerchantReturnPolicy.id': { $exists: true }
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
schema.index({ additionalProperty: 1, 'priceSpecification.price': 1 }, {
|
|
194
|
-
name: 'searchByAdditionalProperty',
|
|
195
|
-
partialFilterExpression: {
|
|
196
|
-
additionalProperty: { $exists: true }
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
schema.index({ validFrom: 1, 'priceSpecification.price': 1 }, {
|
|
200
|
-
name: 'searchByValidFrom',
|
|
201
|
-
partialFilterExpression: {
|
|
202
|
-
validFrom: { $exists: true }
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
schema.index({ validThrough: 1, 'priceSpecification.price': 1 }, {
|
|
206
|
-
name: 'searchByValidThrough',
|
|
207
|
-
partialFilterExpression: {
|
|
208
|
-
validThrough: { $exists: true }
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
schema.index({ availability: 1, 'priceSpecification.price': 1 }, { name: 'searchByAvailability' });
|