@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.41

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 (163) hide show
  1. package/lib/chevre/emailMessageBuilder.d.ts +9 -5
  2. package/lib/chevre/emailMessageBuilder.js +12 -11
  3. package/lib/chevre/factory/event.d.ts +1 -1
  4. package/lib/chevre/factory/event.js +1 -5
  5. package/lib/chevre/repo/acceptedOffer.d.ts +6 -5
  6. package/lib/chevre/repo/acceptedOffer.js +14 -9
  7. package/lib/chevre/repo/acceptedOfferInReserve.d.ts +6 -8
  8. package/lib/chevre/repo/acceptedOfferInReserve.js +13 -7
  9. package/lib/chevre/repo/adminAcceptedOffer.d.ts +25 -12
  10. package/lib/chevre/repo/adminAcceptedOffer.js +20 -10
  11. package/lib/chevre/repo/adminAccountTitle.d.ts +49 -0
  12. package/lib/chevre/repo/adminAccountTitle.js +212 -0
  13. package/lib/chevre/repo/adminAccountTitleCategory.d.ts +37 -0
  14. package/lib/chevre/repo/adminAccountTitleCategory.js +127 -0
  15. package/lib/chevre/repo/adminAccountTitleSet.d.ts +42 -0
  16. package/lib/chevre/repo/adminAccountTitleSet.js +149 -0
  17. package/lib/chevre/repo/adminEvent.d.ts +1 -7
  18. package/lib/chevre/repo/adminEvent.js +3 -9
  19. package/lib/chevre/repo/adminEventSeries.d.ts +67 -0
  20. package/lib/chevre/repo/adminEventSeries.js +178 -0
  21. package/lib/chevre/repo/{paymentServiceChannel.d.ts → adminPaymentServiceChannel.d.ts} +13 -11
  22. package/lib/chevre/repo/{paymentServiceChannel.js → adminPaymentServiceChannel.js} +20 -19
  23. package/lib/chevre/repo/adminTask.d.ts +2 -2
  24. package/lib/chevre/repo/adminTransaction.d.ts +20 -30
  25. package/lib/chevre/repo/aggregateEvent.js +0 -1
  26. package/lib/chevre/repo/categoryCode.js +0 -21
  27. package/lib/chevre/repo/event.d.ts +2 -2
  28. package/lib/chevre/repo/event.js +71 -110
  29. package/lib/chevre/repo/eventSeries.d.ts +5 -84
  30. package/lib/chevre/repo/eventSeries.js +21 -212
  31. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +1 -1
  32. package/lib/chevre/repo/issuer.d.ts +2 -6
  33. package/lib/chevre/repo/memberProgram.d.ts +1 -38
  34. package/lib/chevre/repo/memberProgram.js +1 -62
  35. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +1 -1
  36. package/lib/chevre/repo/mongoose/schemas/accountTitle.js +21 -25
  37. package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +1 -0
  38. package/lib/chevre/repo/mongoose/schemas/event.js +0 -13
  39. package/lib/chevre/repo/mongoose/schemas/eventSeries.js +1 -18
  40. package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -3
  41. package/lib/chevre/repo/mongoose/schemas/issuer.js +0 -10
  42. package/lib/chevre/repo/mongoose/schemas/message.d.ts +5 -1
  43. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +0 -1
  44. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +3 -12
  45. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -2
  46. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +6 -15
  47. package/lib/chevre/repo/mongoose/schemas/order.d.ts +22 -1
  48. package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
  49. package/lib/chevre/repo/mongoose/schemas/place.js +0 -9
  50. package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -2
  51. package/lib/chevre/repo/mongoose/schemas/project.js +1 -1
  52. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +3 -1
  53. package/lib/chevre/repo/mongoose/schemas/seller.js +0 -2
  54. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +1 -1
  55. package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -52
  56. package/lib/chevre/repo/offerCatalog.d.ts +0 -2
  57. package/lib/chevre/repo/offerCatalogItem.d.ts +13 -20
  58. package/lib/chevre/repo/offerCatalogItem.js +8 -86
  59. package/lib/chevre/repo/order.d.ts +2 -2
  60. package/lib/chevre/repo/order.js +0 -31
  61. package/lib/chevre/repo/orderInTransaction.d.ts +5 -25
  62. package/lib/chevre/repo/place/movieTheater.d.ts +3 -1
  63. package/lib/chevre/repo/place/movieTheater.js +3 -1
  64. package/lib/chevre/repo/place/{hasPOS.d.ts → pos.d.ts} +13 -20
  65. package/lib/chevre/repo/place/{hasPOS.js → pos.js} +66 -29
  66. package/lib/chevre/repo/place/screeningRoom.d.ts +24 -3
  67. package/lib/chevre/repo/place/screeningRoom.js +28 -17
  68. package/lib/chevre/repo/priceSpecification.d.ts +8 -8
  69. package/lib/chevre/repo/project.d.ts +13 -19
  70. package/lib/chevre/repo/project.js +27 -43
  71. package/lib/chevre/repo/projectMakesOffer.js +2 -2
  72. package/lib/chevre/repo/role.d.ts +1 -1
  73. package/lib/chevre/repo/role.js +1 -30
  74. package/lib/chevre/repo/seller.d.ts +11 -4
  75. package/lib/chevre/repo/seller.js +31 -58
  76. package/lib/chevre/repo/sellerPaymentAccepted.d.ts +14 -21
  77. package/lib/chevre/repo/sellerPaymentAccepted.js +65 -38
  78. package/lib/chevre/repo/task.d.ts +3 -3
  79. package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -3
  80. package/lib/chevre/repo/transaction/placeOrder.js +15 -36
  81. package/lib/chevre/repository.d.ts +30 -15
  82. package/lib/chevre/repository.js +63 -30
  83. package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -2
  84. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -2
  85. package/lib/chevre/service/aggregation.d.ts +0 -2
  86. package/lib/chevre/service/aggregation.js +1 -3
  87. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +1 -2
  88. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +2 -2
  89. package/lib/chevre/service/assetTransaction/reserve/start.js +2 -1
  90. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -1
  91. package/lib/chevre/service/event/saveScreeningEventSeries.d.ts +2 -2
  92. package/lib/chevre/service/event/saveScreeningEventSeries.js +2 -3
  93. package/lib/chevre/service/event/saveScreeningEvents.d.ts +2 -0
  94. package/lib/chevre/service/event/saveScreeningEvents.js +4 -4
  95. package/lib/chevre/service/event.d.ts +2 -0
  96. package/lib/chevre/service/event.js +0 -1
  97. package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -0
  98. package/lib/chevre/service/notification/sendEmailMessage.js +23 -6
  99. package/lib/chevre/service/offer/any.d.ts +1 -1
  100. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
  101. package/lib/chevre/service/offer/event/authorize/factory.js +1 -8
  102. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  103. package/lib/chevre/service/offer/event/issueEventOfferTicket.js +0 -11
  104. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -10
  105. package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +2 -8
  106. package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +2 -2
  107. package/lib/chevre/service/offer/event/searchOffersByIds.js +3 -9
  108. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +0 -1
  109. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
  110. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -7
  111. package/lib/chevre/service/offer/onEventChanged.js +9 -21
  112. package/lib/chevre/service/offer.js +1 -2
  113. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +4 -6
  114. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +23 -4
  115. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -1
  116. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +1 -1
  117. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  118. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  119. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  120. package/lib/chevre/service/order/sendOrder.js +2 -14
  121. package/lib/chevre/service/payment/creditCard/getGMOInfoFromSeller.js +1 -1
  122. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +3 -3
  123. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
  124. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +1 -1
  125. package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
  126. package/lib/chevre/service/project.d.ts +3 -3
  127. package/lib/chevre/service/project.js +1 -1
  128. package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
  129. package/lib/chevre/service/task/onResourceDeleted.js +8 -8
  130. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +7 -3
  131. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +51 -50
  132. package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
  133. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +1 -1
  134. package/lib/chevre/service/task/onResourceUpdated.js +10 -47
  135. package/lib/chevre/service/task/sendEmailMessage.js +3 -1
  136. package/lib/chevre/service/task/syncResourcesFromCOA.js +5 -3
  137. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +6 -3
  138. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +2 -15
  139. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +6 -4
  140. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +3 -7
  141. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +1 -1
  142. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  143. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  144. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
  145. package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +0 -2
  146. package/lib/chevre/service/transaction/placeOrder/confirm.js +6 -11
  147. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.d.ts +6 -3
  148. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +8 -9
  149. package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.d.ts +6 -3
  150. package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +2 -7
  151. package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +6 -3
  152. package/lib/chevre/service/transaction/returnOrder/potentialActions.js +4 -3
  153. package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
  154. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
  155. package/lib/chevre/service/transaction/returnOrder.d.ts +0 -2
  156. package/lib/chevre/service/transaction/returnOrder.js +6 -6
  157. package/package.json +2 -2
  158. package/lib/chevre/repo/accountTitle.d.ts +0 -28
  159. package/lib/chevre/repo/accountTitle.js +0 -30
  160. package/lib/chevre/service/aggregation/project.d.ts +0 -17
  161. package/lib/chevre/service/aggregation/project.js +0 -98
  162. package/lib/chevre/service/delivery/factory.d.ts +0 -16
  163. package/lib/chevre/service/delivery/factory.js +0 -124
@@ -1,22 +1,11 @@
1
1
  import { Connection } from 'mongoose';
2
2
  import { factory } from '../factory';
3
- type IMemberProgramTier = Pick<factory.issuer.IMemberProgramTier, 'identifier' | 'typeOf'>;
4
- type IMemberProgram = factory.issuer.IMemberProgram & {
5
- hasTiers?: IMemberProgramTier[];
6
- };
3
+ type IMemberProgram = factory.issuer.IMemberProgram;
7
4
  type IMemberProgramAsSearchResult = IMemberProgram & {
8
5
  hostingOrganization: {
9
6
  identifier: string;
10
7
  };
11
8
  };
12
- type IMemberProgramTierAsSearchResult = IMemberProgramTier & {
13
- isTierOf: {
14
- identifier: string;
15
- hostingOrganization: {
16
- identifier: string;
17
- };
18
- };
19
- };
20
9
  /**
21
10
  * メンバープログラムリポジトリ
22
11
  */
@@ -44,31 +33,6 @@ export declare class MemberProgramRepo {
44
33
  $in?: string[];
45
34
  };
46
35
  }): Promise<IMemberProgramAsSearchResult[]>;
47
- /**
48
- * tierを検索する
49
- */
50
- projectMemberProgramTiers(params: {
51
- limit?: number;
52
- page?: number;
53
- project?: {
54
- id?: {
55
- $eq?: string;
56
- };
57
- };
58
- isTierOf?: {
59
- hostingOrganization?: {
60
- id?: {
61
- $eq?: string;
62
- };
63
- };
64
- identifier?: {
65
- $eq?: string;
66
- };
67
- };
68
- identifier?: {
69
- $eq?: string;
70
- };
71
- }): Promise<IMemberProgramTierAsSearchResult[]>;
72
36
  create(params: {
73
37
  project: {
74
38
  id: string;
@@ -83,7 +47,6 @@ export declare class MemberProgramRepo {
83
47
  id: string;
84
48
  };
85
49
  identifier: string;
86
- hasTiers?: Pick<factory.issuer.IMemberProgramTier, 'identifier'>[];
87
50
  hostingOrganization: {
88
51
  id: string;
89
52
  };
@@ -47,7 +47,6 @@ class MemberProgramRepo {
47
47
  _id: 0,
48
48
  typeOf: '$hasMemberProgram.typeOf',
49
49
  identifier: '$hasMemberProgram.identifier',
50
- hasTiers: '$hasMemberProgram.hasTiers',
51
50
  hostingOrganization: {
52
51
  identifier: '$identifier'
53
52
  }
@@ -62,62 +61,6 @@ class MemberProgramRepo {
62
61
  return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
63
62
  .exec();
64
63
  }
65
- /**
66
- * tierを検索する
67
- */
68
- async projectMemberProgramTiers(params) {
69
- const matchStages = [];
70
- const projectIdEq = params.project?.id?.$eq;
71
- if (typeof projectIdEq === 'string') {
72
- matchStages.push({ $match: { 'project.id': { $eq: projectIdEq } } });
73
- }
74
- const hostingOrganizationIdEq = params.isTierOf?.hostingOrganization?.id?.$eq;
75
- if (typeof hostingOrganizationIdEq === 'string') {
76
- matchStages.push({ $match: { _id: { $eq: new mongoose_1.Types.ObjectId(hostingOrganizationIdEq) } } });
77
- }
78
- const memberProgramIdentifierEq = params.isTierOf?.identifier?.$eq;
79
- if (typeof memberProgramIdentifierEq === 'string') {
80
- matchStages.push({ $match: { 'hasMemberProgram.identifier': { $exists: true, $eq: memberProgramIdentifierEq } } });
81
- }
82
- const identifierEq = params.identifier?.$eq;
83
- if (typeof identifierEq === 'string') {
84
- matchStages.push({ $match: { 'hasMemberProgram.hasTiers.identifier': { $exists: true, $eq: identifierEq } } });
85
- }
86
- const aggregate = this.issuerModel.aggregate([
87
- {
88
- $unwind: {
89
- path: '$hasMemberProgram'
90
- }
91
- },
92
- {
93
- $unwind: {
94
- path: '$hasMemberProgram.hasTiers'
95
- }
96
- },
97
- ...matchStages,
98
- { $sort: { 'hasMemberProgram.hasTiers.identifier': factory_1.factory.sortType.Ascending } },
99
- {
100
- $project: {
101
- _id: 0,
102
- typeOf: '$hasMemberProgram.hasTiers.typeOf',
103
- identifier: '$hasMemberProgram.hasTiers.identifier',
104
- isTierOf: {
105
- identifier: '$hasMemberProgram.identifier',
106
- hostingOrganization: {
107
- identifier: '$identifier'
108
- }
109
- }
110
- }
111
- }
112
- ]);
113
- if (typeof params.limit === 'number' && params.limit > 0) {
114
- const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
115
- aggregate.skip(params.limit * (page - 1))
116
- .limit(params.limit);
117
- }
118
- return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
119
- .exec();
120
- }
121
64
  async create(params) {
122
65
  let doc = await this.issuerModel.findOne({
123
66
  _id: { $eq: params.hostingOrganization.id },
@@ -146,13 +89,9 @@ class MemberProgramRepo {
146
89
  }
147
90
  }
148
91
  async updateOne(params) {
149
- const hasTiers = (Array.isArray(params.hasTiers))
150
- ? params.hasTiers.map(({ identifier }) => ({ identifier, typeOf: 'MemberProgramTier' }))
151
- : [];
152
92
  const updatingMemberProgram = {
153
93
  typeOf: 'MemberProgram',
154
- identifier: params.identifier,
155
- hasTiers
94
+ identifier: params.identifier
156
95
  };
157
96
  const doc = await this.issuerModel.findOneAndUpdate({
158
97
  _id: { $eq: params.hostingOrganization.id },
@@ -1,7 +1,7 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- type IDocType = factory.accountTitle.IAccountTitle;
4
+ type IDocType = Pick<factory.accountTitle.IAccountTitle, 'additionalProperty' | 'codeValue' | 'hasCategoryCode' | 'name' | 'project' | 'typeOf'>;
5
5
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
6
6
  type ISchemaDefinition = SchemaDefinition<IDocType>;
7
7
  type ISchema = Schema<IDocType, IModel, Record<string, never>, Record<string, never>, IVirtuals, Record<string, never>, ISchemaDefinition, IDocType>;
@@ -8,18 +8,15 @@ const settings_1 = require("../../../settings");
8
8
  const modelName = 'AccountTitle';
9
9
  exports.modelName = modelName;
10
10
  const schemaDefinition = {
11
- project: mongoose_1.SchemaTypes.Mixed,
12
- typeOf: {
13
- type: String,
14
- required: true
15
- },
16
- codeValue: String,
11
+ project: { type: mongoose_1.SchemaTypes.Mixed, required: true },
12
+ typeOf: { type: String, required: true },
13
+ codeValue: { type: String, required: true },
17
14
  name: String,
18
- inCodeSet: mongoose_1.SchemaTypes.Mixed,
19
15
  hasCategoryCode: mongoose_1.SchemaTypes.Mixed,
20
- inDefinedTermSet: mongoose_1.SchemaTypes.Mixed,
21
- hasDefinedTerm: mongoose_1.SchemaTypes.Mixed,
22
16
  additionalProperty: mongoose_1.SchemaTypes.Mixed
17
+ // inCodeSet: SchemaTypes.Mixed, // discontinue(2026-10-16~)
18
+ // inDefinedTermSet: SchemaTypes.Mixed, // discontinue(2026-10-16~)
19
+ // hasDefinedTerm: SchemaTypes.Mixed, // discontinue(2026-10-16~)
23
20
  };
24
21
  const schemaOptions = {
25
22
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -98,24 +95,23 @@ const indexes = [
98
95
  'hasCategoryCode.codeValue': { $exists: true }
99
96
  }
100
97
  }
101
- ]
98
+ ],
99
+ // 'hasCategoryCode.hasCategoryCode.codeValue': null のインデックスが作成されてうまくいかない
100
+ // [
101
+ // {
102
+ // 'project.id': 1,
103
+ // 'hasCategoryCode.hasCategoryCode.codeValue': 1
104
+ // },
105
+ // {
106
+ // name: 'uniqueAccountTitleCode',
107
+ // unique: true,
108
+ // partialFilterExpression: {
109
+ // 'hasCategoryCode.hasCategoryCode.codeValue': { $exists: true }
110
+ // }
111
+ // }
112
+ // ]
102
113
  ];
103
114
  exports.indexes = indexes;
104
- // 'hasCategoryCode.hasCategoryCode.codeValue': null のインデックスは作成されてうまくいかないので保留
105
- // schema.index(
106
- // {
107
- // 'project.id': 1,
108
- // 'hasCategoryCode.hasCategoryCode.codeValue': 1
109
- // },
110
- // {
111
- // name: 'uniqueHasCategoryCodeHasCategoryCodeCodeValue',
112
- // unique: true,
113
- // partialFilterExpression: {
114
- // 'project.id': { $exists: true },
115
- // 'hasCategoryCode.hasCategoryCode.codeValue': { $exists: true }
116
- // }
117
- // }
118
- // );
119
115
  /**
120
116
  * 勘定科目スキーマ
121
117
  */
@@ -3,6 +3,7 @@ import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
4
  export type IDocType = Omit<factory.place.movieTheater.IPlace, 'id'> & {
5
5
  hasPOS?: factory.place.movieTheater.IPOS[];
6
+ hasEntranceGate?: factory.place.movieTheater.IEntranceGate[];
6
7
  };
7
8
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
8
9
  type ISchemaDefinition = SchemaDefinition<IDocType>;
@@ -88,10 +88,6 @@ const indexes = [
88
88
  }
89
89
  }
90
90
  ],
91
- [
92
- { typeOf: 1, startDate: 1 },
93
- { name: 'searchByTypeOf' }
94
- ],
95
91
  [
96
92
  { eventStatus: 1, startDate: 1 },
97
93
  { name: 'searchByEventStatus' }
@@ -182,15 +178,6 @@ const indexes = [
182
178
  name: 'searchByOffersItemOfferedId'
183
179
  }
184
180
  ],
185
- [
186
- { 'offers.seller.makesOffer': 1, startDate: 1 },
187
- {
188
- name: 'searchBySellerMakesOffer',
189
- partialFilterExpression: {
190
- 'offers.seller.makesOffer': { $exists: true }
191
- }
192
- }
193
- ],
194
181
  [
195
182
  { 'offers.seller.makesOffer.availableAtOrFrom.id': 1, startDate: 1 },
196
183
  {
@@ -26,7 +26,7 @@ const schemaDefinition = {
26
26
  startDate: { type: Date, required: true }, // required(2025-10-08~)
27
27
  subEvent: mongoose_1.SchemaTypes.Mixed, // support(2025-12-31~)
28
28
  workPerformed: mongoose_1.SchemaTypes.Mixed,
29
- soundFormat: mongoose_1.SchemaTypes.Mixed,
29
+ // soundFormat: SchemaTypes.Mixed, // discontinue(2026-10-07~)
30
30
  subtitleLanguage: mongoose_1.SchemaTypes.Mixed,
31
31
  dubLanguage: mongoose_1.SchemaTypes.Mixed,
32
32
  kanaName: String,
@@ -74,14 +74,6 @@ const indexes = [
74
74
  { 'organizer.id': 1, startDate: 1 },
75
75
  { name: 'organizerId' }
76
76
  ],
77
- [
78
- { typeOf: 1, startDate: 1 },
79
- { name: 'typeOf' }
80
- ],
81
- [
82
- { eventStatus: 1, startDate: 1 },
83
- { name: 'eventStatus' }
84
- ],
85
77
  [
86
78
  { 'location.id': 1, startDate: 1 },
87
79
  {
@@ -146,15 +138,6 @@ const indexes = [
146
138
  }
147
139
  }
148
140
  ],
149
- [
150
- { 'soundFormat.typeOf': 1, startDate: 1 },
151
- {
152
- name: 'soundFormatTypeOf',
153
- partialFilterExpression: {
154
- 'soundFormat.typeOf': { $exists: true }
155
- }
156
- }
157
- ],
158
141
  [
159
142
  { 'name.ja': 1, startDate: 1 },
160
143
  {
@@ -2,9 +2,7 @@ import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from '
2
2
  import { factory } from '../../../factory';
3
3
  import { IVirtuals } from '../virtuals';
4
4
  export type IDocType = Omit<factory.issuer.IIssuer, 'id'> & {
5
- hasMemberProgram?: (factory.issuer.IMemberProgram & {
6
- hasTiers?: Pick<factory.issuer.IMemberProgramTier, 'identifier' | 'typeOf'>[];
7
- })[];
5
+ hasMemberProgram?: factory.issuer.IMemberProgram[];
8
6
  };
9
7
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
10
8
  type ISchemaDefinition = SchemaDefinition<IDocType>;
@@ -61,16 +61,6 @@ const indexes = [
61
61
  }
62
62
  }
63
63
  ],
64
- [
65
- { 'project.id': 1, 'hasMemberProgram.hasTiers.identifier': 1 },
66
- {
67
- name: 'uniqueMemberProgramTierIdentifier',
68
- unique: true,
69
- partialFilterExpression: {
70
- 'hasMemberProgram.hasTiers.identifier': { $exists: true }
71
- }
72
- }
73
- ],
74
64
  [
75
65
  { 'hasMemberProgram.identifier': 1, identifier: 1 },
76
66
  { name: 'hasMemberProgramIdentifier' }
@@ -1,7 +1,11 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- export type IEmailMessage = factory.creativeWork.message.email.ICreativeWork & {
4
+ export type ISender = Pick<factory.creativeWork.message.email.ISender, 'name' | 'typeOf'> & {
5
+ email?: never;
6
+ };
7
+ export type IEmailMessage = Pick<factory.creativeWork.message.email.ICreativeWork, 'about' | 'identifier' | 'name' | 'text' | 'toRecipient' | 'typeOf'> & {
8
+ sender: ISender;
5
9
  datePublished: Date;
6
10
  mainEntity: Pick<factory.order.ISimpleOrder, 'orderNumber' | 'typeOf'>;
7
11
  project: {
@@ -3,7 +3,6 @@ import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
4
  export type IDocType = Omit<factory.offerCatalog.IOfferCatalog, 'id'> & {
5
5
  _id: string;
6
- alternateName?: any;
7
6
  dateSynced?: Date;
8
7
  };
9
8
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
@@ -10,24 +10,15 @@ exports.modelName = modelName;
10
10
  const schemaDefinition = {
11
11
  project: { type: mongoose_1.SchemaTypes.Mixed, required: true },
12
12
  _id: String,
13
- identifier: {
14
- type: String,
15
- required: true
16
- },
13
+ identifier: { type: String, required: true },
17
14
  name: mongoose_1.SchemaTypes.Mixed,
18
15
  description: mongoose_1.SchemaTypes.Mixed,
19
- alternateName: mongoose_1.SchemaTypes.Mixed,
20
- typeOf: {
21
- type: String,
22
- required: true
23
- },
16
+ // alternateName: SchemaTypes.Mixed,
17
+ typeOf: { type: String, required: true },
24
18
  itemListElement: [mongoose_1.SchemaTypes.Mixed],
25
19
  itemOffered: { type: mongoose_1.SchemaTypes.Mixed, required: true },
26
20
  additionalProperty: [mongoose_1.SchemaTypes.Mixed],
27
21
  dateSynced: Date // 追加(2023-09-13~)
28
- // createdAt: SchemaTypes.Mixed,
29
- // updatedAt: SchemaTypes.Mixed,
30
- // __v: SchemaTypes.Mixed
31
22
  };
32
23
  const schemaOptions = {
33
24
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -1,9 +1,8 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- export type IDocType = Omit<factory.offerCatalog.IOfferCatalog, 'id'> & {
4
+ export type IDocType = Pick<factory.offerCatalog.IOfferCatalog, 'description' | 'identifier' | 'itemListElement' | 'itemOffered' | 'name' | 'project' | 'relatedOffer' | 'typeOf'> & {
5
5
  _id: string;
6
- alternateName?: any;
7
6
  dateSynced?: Date;
8
7
  };
9
8
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
@@ -9,25 +9,16 @@ const modelName = 'OfferCatalogItem';
9
9
  exports.modelName = modelName;
10
10
  const schemaDefinition = {
11
11
  project: { type: mongoose_1.SchemaTypes.Mixed, required: true },
12
- identifier: {
13
- type: String,
14
- required: true
15
- },
16
- name: mongoose_1.SchemaTypes.Mixed,
17
- description: mongoose_1.SchemaTypes.Mixed,
18
- alternateName: mongoose_1.SchemaTypes.Mixed,
19
- typeOf: {
20
- type: String,
21
- required: true
22
- },
12
+ identifier: { type: String, required: true },
13
+ typeOf: { type: String, required: true },
23
14
  itemListElement: [mongoose_1.SchemaTypes.Mixed],
24
15
  itemOffered: { type: mongoose_1.SchemaTypes.Mixed, required: true },
25
- additionalProperty: [mongoose_1.SchemaTypes.Mixed],
16
+ name: mongoose_1.SchemaTypes.Mixed,
17
+ description: mongoose_1.SchemaTypes.Mixed,
18
+ // alternateName: SchemaTypes.Mixed,
19
+ // additionalProperty: [SchemaTypes.Mixed], // discontinue(2026-10-15~)
26
20
  dateSynced: Date,
27
21
  relatedOffer: mongoose_1.SchemaTypes.Mixed
28
- // createdAt: SchemaTypes.Mixed,
29
- // updatedAt: SchemaTypes.Mixed,
30
- // __v: SchemaTypes.Mixed
31
22
  };
32
23
  const schemaOptions = {
33
24
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -1,8 +1,29 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
+ export type IMinimizedReservationFor = Pick<factory.acceptedOffer.IEventAsReservationFor, 'endDate' | 'id' | 'startDate' | 'typeOf'> & {
5
+ location: Pick<factory.acceptedOffer.IEventAsReservationFor['location'], 'branchCode' | 'typeOf'>;
6
+ superEvent: Pick<factory.acceptedOffer.ISuperEvent, 'id' | 'typeOf'> & {
7
+ location: Pick<factory.acceptedOffer.ISuperEvent['location'], 'branchCode' | 'typeOf'>;
8
+ workPerformed: Pick<factory.acceptedOffer.ISuperEvent['workPerformed'], 'identifier' | 'typeOf'>;
9
+ };
10
+ };
11
+ export type IMinimizedItemOffered = Pick<factory.acceptedOffer.IEventReservation, 'id' | 'reservationNumber' | 'typeOf'> & {
12
+ /**
13
+ * 予約番号ごとに、ひとつめのオファーのみreservationForを含むように変更するのでoptionalに
14
+ * 2026-06-04~
15
+ */
16
+ reservationFor?: IMinimizedReservationFor;
17
+ reservedTicket?: never;
18
+ };
19
+ export type IMinimizedAcceptedOffer = Pick<factory.acceptedOffer.IOptimizedAcceptedOffer, 'id' | 'offeredThrough' | 'serialNumber' | 'typeOf'> & {
20
+ itemOffered: IMinimizedItemOffered;
21
+ priceSpecification?: never;
22
+ name?: never;
23
+ };
24
+ export type IAcceptedOfferInDoc = IMinimizedAcceptedOffer | factory.acceptedOffer.ICOAAcceptedOffer;
4
25
  type IDocType = Omit<factory.order.IOrder, 'id'> & {
5
- acceptedOffers?: factory.order.IAcceptedOffer[];
26
+ acceptedOffers?: IAcceptedOfferInDoc[];
6
27
  /**
7
28
  * 注文取引IDとして再定義(2026-06-22~)
8
29
  */
@@ -1,7 +1,7 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- type IDocType = Omit<factory.serviceChannel.IServiceChannel, 'id'>;
4
+ type IDocType = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'project' | 'providesService' | 'serviceUrl' | 'typeOf'>;
5
5
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
6
6
  type ISchemaDefinition = SchemaDefinition<IDocType>;
7
7
  type ISchema = Schema<IDocType, IModel, Record<string, never>, Record<string, never>, IVirtuals, Record<string, never>, ISchemaDefinition, IDocType>;
@@ -34,15 +34,6 @@ const schemaDefinition = {
34
34
  // ↓ルームの施設からの分離に伴い属性追加(2023-06-22~)
35
35
  openSeatingAllowed: mongoose_1.SchemaTypes.Mixed,
36
36
  amenityFeature: mongoose_1.SchemaTypes.Mixed
37
- // ↓migrated to civicStructures(2024-09-19~)
38
- // alternateName: SchemaTypes.Mixed,
39
- // hasEntranceGate: [SchemaTypes.Mixed],
40
- // hasPOS: [SchemaTypes.Mixed],
41
- // sameAs: String,
42
- // telephone: String,
43
- // url: String,
44
- // kanaName: String,
45
- // offers: SchemaTypes.Mixed,
46
37
  };
47
38
  const schemaOptions = {
48
39
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -1,9 +1,8 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- type IDocType = Omit<factory.project.IProject, 'id'> & {
4
+ type IDocType = Pick<factory.project.IProject, 'alternateName' | 'hasMerchantReturnPolicy' | 'logo' | 'name' | 'settings' | 'subscription' | 'typeOf'> & {
5
5
  _id: string;
6
- aggregateReservation?: any;
7
6
  makesOffer?: factory.project.IMakesOffer[];
8
7
  };
9
8
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
@@ -9,7 +9,7 @@ const modelName = 'Project';
9
9
  exports.modelName = modelName;
10
10
  const schemaDefinition = {
11
11
  _id: String,
12
- aggregateReservation: mongoose_1.SchemaTypes.Mixed,
12
+ // aggregateReservation: SchemaTypes.Mixed, // discontinue(2026-10-20~)
13
13
  alternateName: String,
14
14
  logo: String,
15
15
  hasMerchantReturnPolicy: mongoose_1.SchemaTypes.Mixed,
@@ -1,7 +1,9 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- type IDocType = Omit<factory.seller.ISeller, 'id'>;
4
+ type IDocType = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
5
+ paymentAccepted?: factory.seller.IPaymentAccepted[];
6
+ };
5
7
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
6
8
  type ISchemaDefinition = SchemaDefinition<IDocType>;
7
9
  type ISchema = Schema<IDocType, IModel, Record<string, never>, Record<string, never>, IVirtuals, Record<string, never>, ISchemaDefinition, IDocType>;
@@ -9,12 +9,10 @@ const modelName = 'Seller';
9
9
  exports.modelName = modelName;
10
10
  const schemaDefinition = {
11
11
  additionalProperty: [mongoose_1.SchemaTypes.Mixed],
12
- // areaServed: [SchemaTypes.Mixed],
13
12
  branchCode: String,
14
13
  hasMerchantReturnPolicy: [mongoose_1.SchemaTypes.Mixed],
15
14
  makesOffer: [mongoose_1.SchemaTypes.Mixed],
16
15
  name: mongoose_1.SchemaTypes.Mixed,
17
- // parentOrganization: SchemaTypes.Mixed,
18
16
  paymentAccepted: [mongoose_1.SchemaTypes.Mixed],
19
17
  project: mongoose_1.SchemaTypes.Mixed,
20
18
  typeOf: {
@@ -1,7 +1,7 @@
1
1
  import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
2
2
  import { IVirtuals } from '../virtuals';
3
3
  import { factory } from '../../../factory';
4
- type IPlaceOrder = Pick<factory.transaction.placeOrder.ITransaction, 'agent' | 'endDate' | 'error' | 'expires' | 'instrument' | 'object' | 'potentialActions' | 'project' | 'result' | 'seller' | 'startDate' | 'status' | 'tasksExportAction' | 'typeOf'>;
4
+ type IPlaceOrder = Pick<factory.transaction.placeOrder.ITransaction, 'agent' | 'endDate' | 'expires' | 'instrument' | 'object' | 'project' | 'result' | 'seller' | 'startDate' | 'status' | 'tasksExportAction' | 'typeOf'>;
5
5
  type IDocType = IPlaceOrder;
6
6
  type IModel = Model<IDocType, Record<string, never>, Record<string, never>, IVirtuals>;
7
7
  type ISchemaDefinition = SchemaDefinition<IDocType>;