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

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 (150) hide show
  1. package/lib/chevre/emailMessageBuilder.js +1 -1
  2. package/lib/chevre/factory/event.d.ts +1 -1
  3. package/lib/chevre/factory/event.js +1 -5
  4. package/lib/chevre/repo/acceptedOffer.d.ts +6 -5
  5. package/lib/chevre/repo/acceptedOffer.js +14 -9
  6. package/lib/chevre/repo/acceptedOfferInReserve.d.ts +6 -8
  7. package/lib/chevre/repo/acceptedOfferInReserve.js +13 -7
  8. package/lib/chevre/repo/adminAcceptedOffer.d.ts +25 -12
  9. package/lib/chevre/repo/adminAcceptedOffer.js +20 -10
  10. package/lib/chevre/repo/adminAccountTitle.d.ts +49 -0
  11. package/lib/chevre/repo/adminAccountTitle.js +212 -0
  12. package/lib/chevre/repo/adminAccountTitleCategory.d.ts +37 -0
  13. package/lib/chevre/repo/adminAccountTitleCategory.js +127 -0
  14. package/lib/chevre/repo/adminAccountTitleSet.d.ts +42 -0
  15. package/lib/chevre/repo/adminAccountTitleSet.js +149 -0
  16. package/lib/chevre/repo/adminEvent.d.ts +1 -7
  17. package/lib/chevre/repo/adminEvent.js +3 -9
  18. package/lib/chevre/repo/adminEventSeries.d.ts +67 -0
  19. package/lib/chevre/repo/adminEventSeries.js +178 -0
  20. package/lib/chevre/repo/{paymentServiceChannel.d.ts → adminPaymentServiceChannel.d.ts} +13 -11
  21. package/lib/chevre/repo/{paymentServiceChannel.js → adminPaymentServiceChannel.js} +20 -19
  22. package/lib/chevre/repo/adminTask.d.ts +2 -2
  23. package/lib/chevre/repo/adminTransaction.d.ts +20 -30
  24. package/lib/chevre/repo/aggregateEvent.js +0 -1
  25. package/lib/chevre/repo/categoryCode.js +0 -21
  26. package/lib/chevre/repo/event.d.ts +2 -2
  27. package/lib/chevre/repo/event.js +71 -110
  28. package/lib/chevre/repo/eventSeries.d.ts +5 -84
  29. package/lib/chevre/repo/eventSeries.js +21 -212
  30. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +1 -1
  31. package/lib/chevre/repo/issuer.d.ts +2 -6
  32. package/lib/chevre/repo/memberProgram.d.ts +1 -38
  33. package/lib/chevre/repo/memberProgram.js +1 -62
  34. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +1 -1
  35. package/lib/chevre/repo/mongoose/schemas/accountTitle.js +21 -25
  36. package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +1 -0
  37. package/lib/chevre/repo/mongoose/schemas/event.js +0 -13
  38. package/lib/chevre/repo/mongoose/schemas/eventSeries.js +1 -18
  39. package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -3
  40. package/lib/chevre/repo/mongoose/schemas/issuer.js +0 -10
  41. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +0 -1
  42. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +3 -12
  43. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -2
  44. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +6 -15
  45. package/lib/chevre/repo/mongoose/schemas/order.d.ts +22 -1
  46. package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
  47. package/lib/chevre/repo/mongoose/schemas/place.js +0 -9
  48. package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -2
  49. package/lib/chevre/repo/mongoose/schemas/project.js +1 -1
  50. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +3 -1
  51. package/lib/chevre/repo/mongoose/schemas/seller.js +0 -2
  52. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +1 -1
  53. package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -52
  54. package/lib/chevre/repo/offerCatalog.d.ts +0 -2
  55. package/lib/chevre/repo/offerCatalogItem.d.ts +13 -20
  56. package/lib/chevre/repo/offerCatalogItem.js +8 -86
  57. package/lib/chevre/repo/order.d.ts +2 -2
  58. package/lib/chevre/repo/order.js +0 -31
  59. package/lib/chevre/repo/orderInTransaction.d.ts +5 -25
  60. package/lib/chevre/repo/place/movieTheater.d.ts +3 -1
  61. package/lib/chevre/repo/place/movieTheater.js +3 -1
  62. package/lib/chevre/repo/place/{hasPOS.d.ts → pos.d.ts} +13 -20
  63. package/lib/chevre/repo/place/{hasPOS.js → pos.js} +66 -29
  64. package/lib/chevre/repo/place/screeningRoom.d.ts +24 -3
  65. package/lib/chevre/repo/place/screeningRoom.js +28 -17
  66. package/lib/chevre/repo/priceSpecification.d.ts +8 -8
  67. package/lib/chevre/repo/project.d.ts +2 -8
  68. package/lib/chevre/repo/project.js +0 -12
  69. package/lib/chevre/repo/projectMakesOffer.js +2 -2
  70. package/lib/chevre/repo/role.d.ts +1 -1
  71. package/lib/chevre/repo/role.js +1 -30
  72. package/lib/chevre/repo/seller.d.ts +11 -4
  73. package/lib/chevre/repo/seller.js +31 -58
  74. package/lib/chevre/repo/sellerPaymentAccepted.d.ts +14 -21
  75. package/lib/chevre/repo/sellerPaymentAccepted.js +65 -38
  76. package/lib/chevre/repo/task.d.ts +3 -3
  77. package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -3
  78. package/lib/chevre/repo/transaction/placeOrder.js +15 -36
  79. package/lib/chevre/repository.d.ts +30 -15
  80. package/lib/chevre/repository.js +63 -30
  81. package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -2
  82. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -2
  83. package/lib/chevre/service/aggregation.d.ts +0 -2
  84. package/lib/chevre/service/aggregation.js +1 -3
  85. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +1 -2
  86. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +2 -2
  87. package/lib/chevre/service/assetTransaction/reserve/start.js +2 -1
  88. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -1
  89. package/lib/chevre/service/event/saveScreeningEventSeries.d.ts +2 -2
  90. package/lib/chevre/service/event/saveScreeningEventSeries.js +2 -3
  91. package/lib/chevre/service/event/saveScreeningEvents.d.ts +2 -0
  92. package/lib/chevre/service/event/saveScreeningEvents.js +4 -4
  93. package/lib/chevre/service/event.d.ts +2 -0
  94. package/lib/chevre/service/event.js +0 -1
  95. package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -0
  96. package/lib/chevre/service/notification/sendEmailMessage.js +23 -6
  97. package/lib/chevre/service/offer/any.d.ts +1 -1
  98. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
  99. package/lib/chevre/service/offer/event/authorize/factory.js +1 -8
  100. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  101. package/lib/chevre/service/offer/event/issueEventOfferTicket.js +0 -11
  102. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -10
  103. package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +2 -8
  104. package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +2 -2
  105. package/lib/chevre/service/offer/event/searchOffersByIds.js +3 -9
  106. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +0 -1
  107. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
  108. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -7
  109. package/lib/chevre/service/offer/onEventChanged.js +9 -21
  110. package/lib/chevre/service/offer.js +1 -2
  111. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +4 -6
  112. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +23 -4
  113. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -1
  114. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +1 -1
  115. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  116. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  117. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  118. package/lib/chevre/service/order/sendOrder.js +2 -14
  119. package/lib/chevre/service/payment/creditCard/getGMOInfoFromSeller.js +1 -1
  120. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +3 -3
  121. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
  122. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +1 -1
  123. package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
  124. package/lib/chevre/service/project.d.ts +3 -3
  125. package/lib/chevre/service/project.js +1 -1
  126. package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
  127. package/lib/chevre/service/task/onResourceDeleted.js +8 -8
  128. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +7 -3
  129. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +51 -50
  130. package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
  131. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +1 -1
  132. package/lib/chevre/service/task/onResourceUpdated.js +10 -47
  133. package/lib/chevre/service/task/sendEmailMessage.js +3 -1
  134. package/lib/chevre/service/task/syncResourcesFromCOA.js +5 -3
  135. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +1 -2
  136. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -5
  137. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +1 -1
  138. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  139. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  140. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
  141. package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -5
  142. package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
  143. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
  144. package/package.json +2 -2
  145. package/lib/chevre/repo/accountTitle.d.ts +0 -28
  146. package/lib/chevre/repo/accountTitle.js +0 -30
  147. package/lib/chevre/service/aggregation/project.d.ts +0 -17
  148. package/lib/chevre/service/aggregation/project.js +0 -98
  149. package/lib/chevre/service/delivery/factory.d.ts +0 -16
  150. package/lib/chevre/service/delivery/factory.js +0 -124
@@ -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' }
@@ -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>;
@@ -4,7 +4,6 @@ exports.modelName = exports.indexes = void 0;
4
4
  exports.createSchema = createSchema;
5
5
  const mongoose_1 = require("mongoose");
6
6
  const writeConcern_1 = require("../writeConcern");
7
- const factory_1 = require("../../../factory");
8
7
  const settings_1 = require("../../../settings");
9
8
  const modelName = 'Transaction';
10
9
  exports.modelName = modelName;
@@ -12,18 +11,18 @@ const schemaDefinition = {
12
11
  project: { type: mongoose_1.SchemaTypes.Mixed, required: true },
13
12
  status: { type: String, required: true },
14
13
  typeOf: { type: String, required: true },
15
- agent: mongoose_1.SchemaTypes.Mixed,
14
+ agent: { type: mongoose_1.SchemaTypes.Mixed, required: true },
16
15
  expires: { type: Date, required: true },
17
16
  startDate: { type: Date, required: true },
18
- // recipient: SchemaTypes.Mixed, // discontinue(2026-09-09~)
19
17
  seller: mongoose_1.SchemaTypes.Mixed,
20
- error: mongoose_1.SchemaTypes.Mixed,
21
18
  result: mongoose_1.SchemaTypes.Mixed,
22
19
  object: mongoose_1.SchemaTypes.Mixed,
23
20
  endDate: Date,
24
21
  tasksExportAction: mongoose_1.SchemaTypes.Mixed,
25
- potentialActions: mongoose_1.SchemaTypes.Mixed,
26
- instrument: mongoose_1.SchemaTypes.Mixed
22
+ instrument: mongoose_1.SchemaTypes.Mixed,
23
+ // recipient: SchemaTypes.Mixed, // discontinue(2026-09-09~)
24
+ // error: SchemaTypes.Mixed, // discontinue(2026-09-14~)
25
+ // potentialActions: SchemaTypes.Mixed, // discontinue(2026-09-14~)
27
26
  };
28
27
  const schemaOptions = {
29
28
  autoIndex: settings_1.MONGO_AUTO_INDEX,
@@ -54,10 +53,6 @@ const indexes = [
54
53
  { 'project.id': 1, startDate: -1 },
55
54
  { name: 'searchByProjectId-v20220721' }
56
55
  ],
57
- [
58
- { typeOf: 1, startDate: -1 },
59
- { name: 'searchByTypeOfAndStartDate' }
60
- ],
61
56
  [
62
57
  { status: 1, startDate: -1 },
63
58
  { name: 'searchByStatusAndStartDate' }
@@ -96,39 +91,21 @@ const indexes = [
96
91
  }
97
92
  }
98
93
  ],
99
- [
100
- // 注文取引のobject.orderNumberも発行されている場合ユニークなはず(2026-02-21~)
101
- {
102
- typeOf: 1,
103
- 'object.orderNumber': 1
104
- },
105
- {
106
- name: 'uniquePlacingOrderNumber',
107
- unique: true,
108
- partialFilterExpression: {
109
- typeOf: factory_1.factory.transactionType.PlaceOrder,
110
- 'object.orderNumber': { $exists: true }
111
- }
112
- }
113
- ],
114
- [
115
- { 'agent.typeOf': 1, startDate: -1 },
116
- {
117
- name: 'searchByAgentTypeOfAndStartDate',
118
- partialFilterExpression: {
119
- 'agent.typeOf': { $exists: true }
120
- }
121
- }
122
- ],
123
- [
124
- { 'agent.id': 1, startDate: -1 },
125
- {
126
- name: 'searchByAgentIdAndStartDate',
127
- partialFilterExpression: {
128
- 'agent.id': { $exists: true }
129
- }
130
- }
131
- ],
94
+ // [
95
+ // // 注文取引のobject.orderNumberも発行されている場合ユニークなはず(2026-02-21~)
96
+ // {
97
+ // typeOf: 1,
98
+ // 'object.orderNumber': 1
99
+ // },
100
+ // {
101
+ // name: 'uniquePlacingOrderNumber',
102
+ // unique: true,
103
+ // partialFilterExpression: {
104
+ // typeOf: factory.transactionType.PlaceOrder,
105
+ // 'object.orderNumber': { $exists: true }
106
+ // }
107
+ // }
108
+ // ],
132
109
  [
133
110
  { 'agent.identifier': 1, startDate: -1 },
134
111
  {
@@ -170,15 +147,6 @@ const indexes = [
170
147
  }
171
148
  }
172
149
  ],
173
- [
174
- { 'tasksExportAction.actionStatus': 1, startDate: -1 },
175
- {
176
- name: 'searchByTasksExportActionActionStatus',
177
- partialFilterExpression: {
178
- 'tasksExportAction.actionStatus': { $exists: true }
179
- }
180
- }
181
- ],
182
150
  // typeOf: ReturnOrder廃止につき以下廃止(2026-09-08~)
183
151
  // [
184
152
  // { 'object.order.orderNumber': 1, startDate: -1 },
@@ -224,6 +192,37 @@ const indexes = [
224
192
  // }
225
193
  // }
226
194
  // ],
195
+ // [
196
+ // { 'tasksExportAction.actionStatus': 1, startDate: -1 },
197
+ // {
198
+ // name: 'searchByTasksExportActionActionStatus',
199
+ // partialFilterExpression: {
200
+ // 'tasksExportAction.actionStatus': { $exists: true }
201
+ // }
202
+ // }
203
+ // ],
204
+ // [
205
+ // { typeOf: 1, startDate: -1 },
206
+ // { name: 'searchByTypeOfAndStartDate' }
207
+ // ],
208
+ // [
209
+ // { 'agent.typeOf': 1, startDate: -1 },
210
+ // {
211
+ // name: 'searchByAgentTypeOfAndStartDate',
212
+ // partialFilterExpression: {
213
+ // 'agent.typeOf': { $exists: true }
214
+ // }
215
+ // }
216
+ // ],
217
+ // [
218
+ // { 'agent.id': 1, startDate: -1 },
219
+ // {
220
+ // name: 'searchByAgentIdAndStartDate',
221
+ // partialFilterExpression: {
222
+ // 'agent.id': { $exists: true }
223
+ // }
224
+ // }
225
+ // ],
227
226
  ];
228
227
  exports.indexes = indexes;
229
228
  /**
@@ -170,7 +170,6 @@ export declare class OfferCatalogRepo {
170
170
  }): Promise<void>;
171
171
  getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.offerCatalog.IOfferCatalog, "id"> & {
172
172
  _id: string;
173
- alternateName?: any;
174
173
  dateSynced?: Date;
175
174
  } & Required<{
176
175
  _id: string;
@@ -178,7 +177,6 @@ export declare class OfferCatalogRepo {
178
177
  __v: number;
179
178
  }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<factory.offerCatalog.IOfferCatalog, "id"> & {
180
179
  _id: string;
181
- alternateName?: any;
182
180
  dateSynced?: Date;
183
181
  } & Required<{
184
182
  _id: string;
@@ -1,6 +1,8 @@
1
1
  import { Connection, FilterQuery, mongo } from 'mongoose';
2
2
  import { factory } from '../factory';
3
- export type IAggregatedOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'additionalProperty' | 'relatedOffer'> & {
3
+ import { IDocType } from './mongoose/schemas/offerCatalogItem';
4
+ type IOfferCatalogItem = Pick<factory.offerCatalog.IOfferCatalog, 'description' | 'identifier' | 'itemListElement' | 'itemOffered' | 'name' | 'project' | 'relatedOffer' | 'typeOf' | 'id'>;
5
+ export type IAggregatedOfferCatalog = Pick<factory.offerCatalog.IOfferCatalog, 'id' | 'name' | 'description' | 'project' | 'typeOf' | 'identifier' | 'itemOffered' | 'relatedOffer'> & {
4
6
  numberOfItems?: number;
5
7
  itemListElementTypeOf: factory.offerType.Offer;
6
8
  };
@@ -11,25 +13,25 @@ type IKeyOfProjection = 'name' | 'description' | 'project' | 'typeOf' | 'id' | '
11
13
  export declare class OfferCatalogItemRepo {
12
14
  private readonly offerCatalogItemModel;
13
15
  constructor(connection: Connection);
14
- static CREATE_MONGO_CONDITIONS(params: factory.offerCatalog.ISearchConditions): any[];
15
- save(params: factory.offerCatalog.IOfferCatalog & {
16
- $unset?: any;
16
+ static CREATE_MONGO_CONDITIONS(params: factory.offerCatalog.ISearchConditions): FilterQuery<IDocType>[];
17
+ save(params: IOfferCatalogItem & {
18
+ $unset?: Partial<Record<keyof IDocType, 1>>;
17
19
  }): Promise<{
18
20
  id: string;
19
21
  }>;
20
22
  /**
21
23
  * プロジェクトとコードから冪等保管
22
24
  */
23
- saveByIdentifier(params: factory.offerCatalog.IOfferCatalog): Promise<{
25
+ saveByIdentifier(params: IOfferCatalogItem): Promise<{
24
26
  id: string;
25
27
  }>;
26
28
  /**
27
29
  * コードをキーにして冪等置換(2023-12-14~)
28
30
  */
29
31
  upsertManyByIdentifier(params: {
30
- $set: factory.offerCatalog.IOfferCatalog;
32
+ $set: IOfferCatalogItem;
31
33
  $unset?: {
32
- [key in keyof factory.offerCatalog.IOfferCatalog]?: 1;
34
+ [key in keyof IDocType]?: 1;
33
35
  };
34
36
  }[], options: {
35
37
  /**
@@ -73,8 +75,8 @@ export declare class OfferCatalogItemRepo {
73
75
  };
74
76
  };
75
77
  }): Promise<void>;
76
- count(params: Omit<factory.offerCatalog.ISearchConditions, 'limit' | 'page' | 'sort'>): Promise<number>;
77
- projectFields(params: factory.offerCatalog.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<IAggregatedOfferCatalog[]>;
78
+ countOfferCatalogItems(params: Omit<factory.offerCatalog.ISearchConditions, 'limit' | 'page' | 'sort'>): Promise<number>;
79
+ findOfferCatalogItems(params: factory.offerCatalog.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<IAggregatedOfferCatalog[]>;
78
80
  findItemListElementById(params: {
79
81
  id: string;
80
82
  project: {
@@ -118,17 +120,8 @@ export declare class OfferCatalogItemRepo {
118
120
  };
119
121
  }): Promise<import("mongoose").UpdateWriteOpResult | undefined>;
120
122
  unsetUnnecessaryFields(params: {
121
- filter: FilterQuery<factory.offerCatalog.IOfferCatalog>;
122
- $unset: any;
123
+ filter: FilterQuery<IDocType>;
124
+ $unset: Partial<Record<keyof IDocType, 1>>;
123
125
  }): Promise<import("mongoose").UpdateWriteOpResult>;
124
- aggregateItemList(params: {
125
- itemListElement: {
126
- typeOf: {
127
- $eq: factory.offerType.Offer | 'OfferCatalog';
128
- };
129
- };
130
- }): Promise<{
131
- aggregation: any;
132
- }>;
133
126
  }
134
127
  export {};