@chevre/domain 22.2.0-alpha.3 → 22.2.0-alpha.30

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 (260) hide show
  1. package/example/src/chevre/createProject.ts +19 -0
  2. package/example/src/chevre/findValidAuthorization.ts +1 -2
  3. package/example/src/chevre/migrateDeleteTransactionTasks.ts +1 -1
  4. package/example/src/chevre/{migrateMovieTheaterAdditionalProperties.ts → migrateRoomAdditionalProperties.ts} +17 -17
  5. package/example/src/chevre/migrateRoomSectionAdditionalProperties.ts +119 -0
  6. package/example/src/chevre/playAroundTicket.ts +3 -2
  7. package/example/src/chevre/processAction.ts +3 -1
  8. package/example/src/chevre/projectFields.ts +42 -0
  9. package/example/src/chevre/{projectEventFieldsById.ts → projectFieldsById.ts} +7 -12
  10. package/example/src/chevre/{projectReservationFieldsById.ts → projectOwnershipInfoFieldsById.ts} +4 -4
  11. package/example/src/chevre/searchActionsByPurpose.ts +38 -0
  12. package/example/src/chevre/searchProjects.ts +9 -4
  13. package/example/src/chevre/searchSellersByAggregate.ts +3 -3
  14. package/example/src/chevre/searchTransactions.ts +1 -1
  15. package/example/src/chevre/unsetUnnecessaryFields.ts +2 -41
  16. package/lib/chevre/repo/accountTitle.d.ts +9 -3
  17. package/lib/chevre/repo/accountingReport.d.ts +2 -15
  18. package/lib/chevre/repo/action.d.ts +64 -47
  19. package/lib/chevre/repo/action.js +170 -133
  20. package/lib/chevre/repo/aggregateReservation.d.ts +1 -14
  21. package/lib/chevre/repo/assetTransaction.d.ts +134 -7
  22. package/lib/chevre/repo/assetTransaction.js +2 -2
  23. package/lib/chevre/repo/authorization.d.ts +3 -1
  24. package/lib/chevre/repo/authorization.js +21 -10
  25. package/lib/chevre/repo/categoryCode.d.ts +18 -2
  26. package/lib/chevre/repo/categoryCode.js +47 -19
  27. package/lib/chevre/repo/comment.d.ts +5 -1
  28. package/lib/chevre/repo/creativeWork.d.ts +14 -2
  29. package/lib/chevre/repo/customer.d.ts +5 -1
  30. package/lib/chevre/repo/customerType.d.ts +1 -1
  31. package/lib/chevre/repo/event.d.ts +49 -2
  32. package/lib/chevre/repo/member.d.ts +5 -1
  33. package/lib/chevre/repo/merchantReturnPolicy.d.ts +22 -2
  34. package/lib/chevre/repo/message.d.ts +1 -15
  35. package/lib/chevre/repo/mongoose/schemas/account.d.ts +8 -3
  36. package/lib/chevre/repo/mongoose/schemas/account.js +1 -1
  37. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +8 -3
  38. package/lib/chevre/repo/mongoose/schemas/accountTitle.js +2 -2
  39. package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +8 -3
  40. package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +1 -1
  41. package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +22 -3
  42. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +1 -1
  43. package/lib/chevre/repo/mongoose/schemas/action.d.ts +12 -3
  44. package/lib/chevre/repo/mongoose/schemas/action.js +1 -1
  45. package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +14 -3
  46. package/lib/chevre/repo/mongoose/schemas/actionRecipe.js +2 -5
  47. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +8 -3
  48. package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +12 -12
  49. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +11 -3
  50. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +1 -1
  51. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +22 -3
  52. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +1 -1
  53. package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +7 -3
  54. package/lib/chevre/repo/mongoose/schemas/aggregation.js +2 -1
  55. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +10 -3
  56. package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +1 -1
  57. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +8 -3
  58. package/lib/chevre/repo/mongoose/schemas/authorization.js +1 -1
  59. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +8 -3
  60. package/lib/chevre/repo/mongoose/schemas/categoryCode.js +22 -24
  61. package/lib/chevre/repo/mongoose/schemas/comments.d.ts +8 -3
  62. package/lib/chevre/repo/mongoose/schemas/comments.js +1 -1
  63. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +10 -3
  64. package/lib/chevre/repo/mongoose/schemas/creativeWork.js +2 -2
  65. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +8 -3
  66. package/lib/chevre/repo/mongoose/schemas/customer.js +1 -1
  67. package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +9 -3
  68. package/lib/chevre/repo/mongoose/schemas/customerType.js +1 -1
  69. package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +8 -3
  70. package/lib/chevre/repo/mongoose/schemas/emailMessages.js +1 -1
  71. package/lib/chevre/repo/mongoose/schemas/event.d.ts +19 -3
  72. package/lib/chevre/repo/mongoose/schemas/event.js +1 -1
  73. package/lib/chevre/repo/mongoose/schemas/member.d.ts +8 -3
  74. package/lib/chevre/repo/mongoose/schemas/member.js +1 -1
  75. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +8 -3
  76. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +1 -1
  77. package/lib/chevre/repo/mongoose/schemas/message.d.ts +23 -3
  78. package/lib/chevre/repo/mongoose/schemas/message.js +1 -1
  79. package/lib/chevre/repo/mongoose/schemas/note.d.ts +8 -3
  80. package/lib/chevre/repo/mongoose/schemas/note.js +1 -1
  81. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +12 -3
  82. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +1 -1
  83. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +12 -3
  84. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +1 -1
  85. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +8 -3
  86. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +1 -1
  87. package/lib/chevre/repo/mongoose/schemas/order.d.ts +10 -3
  88. package/lib/chevre/repo/mongoose/schemas/order.js +1 -1
  89. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +10 -3
  90. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +1 -1
  91. package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +10 -3
  92. package/lib/chevre/repo/mongoose/schemas/paymentService.js +13 -4
  93. package/lib/chevre/repo/mongoose/schemas/place.d.ts +16 -3
  94. package/lib/chevre/repo/mongoose/schemas/place.js +1 -1
  95. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +11 -3
  96. package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +1 -1
  97. package/lib/chevre/repo/mongoose/schemas/product.d.ts +12 -3
  98. package/lib/chevre/repo/mongoose/schemas/product.js +6 -13
  99. package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +30 -3
  100. package/lib/chevre/repo/mongoose/schemas/productModel.js +1 -1
  101. package/lib/chevre/repo/mongoose/schemas/project.d.ts +12 -3
  102. package/lib/chevre/repo/mongoose/schemas/project.js +3 -3
  103. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +12 -3
  104. package/lib/chevre/repo/mongoose/schemas/reservation.js +5 -5
  105. package/lib/chevre/repo/mongoose/schemas/role.d.ts +9 -3
  106. package/lib/chevre/repo/mongoose/schemas/role.js +1 -1
  107. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +8 -3
  108. package/lib/chevre/repo/mongoose/schemas/seller.js +22 -24
  109. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +8 -3
  110. package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +1 -1
  111. package/lib/chevre/repo/mongoose/schemas/task.d.ts +8 -3
  112. package/lib/chevre/repo/mongoose/schemas/task.js +1 -1
  113. package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +7 -3
  114. package/lib/chevre/repo/mongoose/schemas/telemetry.js +2 -1
  115. package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +26 -3
  116. package/lib/chevre/repo/mongoose/schemas/ticket.js +1 -1
  117. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +8 -3
  118. package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -2
  119. package/lib/chevre/repo/mongoose/schemas/trip.d.ts +8 -3
  120. package/lib/chevre/repo/mongoose/schemas/trip.js +3 -3
  121. package/lib/chevre/repo/offer.d.ts +13 -4
  122. package/lib/chevre/repo/offerCatalog.d.ts +15 -2
  123. package/lib/chevre/repo/order.d.ts +13 -1
  124. package/lib/chevre/repo/ownershipInfo.d.ts +23 -7
  125. package/lib/chevre/repo/ownershipInfo.js +75 -19
  126. package/lib/chevre/repo/paymentService.d.ts +2 -2
  127. package/lib/chevre/repo/paymentService.js +108 -58
  128. package/lib/chevre/repo/paymentServiceProvider.d.ts +1 -10
  129. package/lib/chevre/repo/place/movieTheater.d.ts +54 -2
  130. package/lib/chevre/repo/priceSpecification.d.ts +42 -1
  131. package/lib/chevre/repo/product.d.ts +8 -3
  132. package/lib/chevre/repo/product.js +67 -33
  133. package/lib/chevre/repo/productModel.d.ts +1 -22
  134. package/lib/chevre/repo/project.d.ts +25 -5
  135. package/lib/chevre/repo/project.js +69 -28
  136. package/lib/chevre/repo/reservation.d.ts +35 -3
  137. package/lib/chevre/repo/reservation.js +1 -1
  138. package/lib/chevre/repo/role.d.ts +2 -9
  139. package/lib/chevre/repo/role.js +20 -10
  140. package/lib/chevre/repo/seller.d.ts +64 -14
  141. package/lib/chevre/repo/seller.js +61 -27
  142. package/lib/chevre/repo/task.d.ts +64 -3
  143. package/lib/chevre/repo/telemetry.d.ts +3 -2
  144. package/lib/chevre/repo/ticket.d.ts +4 -20
  145. package/lib/chevre/repo/ticket.js +23 -10
  146. package/lib/chevre/repo/transaction.d.ts +30 -14
  147. package/lib/chevre/repo/transaction.js +106 -77
  148. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +1 -1
  149. package/lib/chevre/service/aggregation/event/findEventOffers.js +1 -1
  150. package/lib/chevre/service/aggregation/project.js +1 -1
  151. package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +1 -1
  152. package/lib/chevre/service/assetTransaction/cancelReservation.js +2 -2
  153. package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
  154. package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -1
  155. package/lib/chevre/service/assetTransaction/pay/factory.js +1 -1
  156. package/lib/chevre/service/assetTransaction/pay.js +3 -3
  157. package/lib/chevre/service/assetTransaction/refund/factory.d.ts +1 -1
  158. package/lib/chevre/service/assetTransaction/refund/factory.js +1 -1
  159. package/lib/chevre/service/assetTransaction/refund.js +3 -3
  160. package/lib/chevre/service/assetTransaction/registerService.js +4 -6
  161. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +26 -23
  162. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +4 -1
  163. package/lib/chevre/service/assetTransaction/reserve/start.js +1 -3
  164. package/lib/chevre/service/code.d.ts +0 -4
  165. package/lib/chevre/service/code.js +22 -18
  166. package/lib/chevre/service/event.js +4 -4
  167. package/lib/chevre/service/moneyTransfer.js +3 -5
  168. package/lib/chevre/service/notification.js +2 -2
  169. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
  170. package/lib/chevre/service/offer/event/authorize/factory.js +34 -6
  171. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.d.ts +0 -2
  172. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +22 -22
  173. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +3 -4
  174. package/lib/chevre/service/offer/event/authorize.d.ts +4 -4
  175. package/lib/chevre/service/offer/event/authorize.js +3 -2
  176. package/lib/chevre/service/offer/event/importFromCOA/factory.d.ts +3 -1
  177. package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
  178. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -12
  179. package/lib/chevre/service/offer/event/voidTransaction.js +2 -2
  180. package/lib/chevre/service/offer/event/voidTransactionByActionId.js +1 -1
  181. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.d.ts +2 -2
  182. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +41 -4
  183. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/factory.d.ts +3 -3
  184. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +3 -3
  185. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +7 -3
  186. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +10 -5
  187. package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +3 -1
  188. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +3 -1
  189. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +14 -6
  190. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +8 -5
  191. package/lib/chevre/service/offer/eventServiceByCOA/validateAcceptedOffers.d.ts +1 -1
  192. package/lib/chevre/service/offer/moneyTransfer/authorize.js +1 -1
  193. package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +1 -1
  194. package/lib/chevre/service/offer/product/searchProductOffers.js +1 -3
  195. package/lib/chevre/service/offer/product.d.ts +4 -2
  196. package/lib/chevre/service/offer/product.js +12 -12
  197. package/lib/chevre/service/order/findPlaceOrderTransaction.js +1 -1
  198. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
  199. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
  200. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  201. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
  202. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +3 -3
  203. package/lib/chevre/service/order/placeOrder.js +1 -1
  204. package/lib/chevre/service/order/returnOrder.js +1 -1
  205. package/lib/chevre/service/order/sendOrder.js +9 -5
  206. package/lib/chevre/service/payment/any/factory.d.ts +1 -1
  207. package/lib/chevre/service/payment/any/onPaid.d.ts +1 -1
  208. package/lib/chevre/service/payment/any/onRefund.d.ts +1 -1
  209. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.d.ts +1 -6
  210. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +26 -34
  211. package/lib/chevre/service/payment/any.d.ts +3 -3
  212. package/lib/chevre/service/payment/any.js +21 -13
  213. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -1
  214. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.js +1 -1
  215. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -2
  216. package/lib/chevre/service/payment/creditCard/payCreditCard.js +12 -5
  217. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +13 -3
  218. package/lib/chevre/service/payment/creditCard/voidTransaction.js +1 -1
  219. package/lib/chevre/service/payment/faceToFace.d.ts +2 -2
  220. package/lib/chevre/service/payment/faceToFace.js +28 -10
  221. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +0 -1
  222. package/lib/chevre/service/payment/movieTicket/authorize.js +8 -3
  223. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -2
  224. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +12 -4
  225. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +15 -4
  226. package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
  227. package/lib/chevre/service/payment/paymentCard.d.ts +2 -2
  228. package/lib/chevre/service/payment/paymentCard.js +29 -16
  229. package/lib/chevre/service/payment.d.ts +1 -1
  230. package/lib/chevre/service/report/ownershipInfo.d.ts +3 -1
  231. package/lib/chevre/service/report/telemetry.js +2 -2
  232. package/lib/chevre/service/reserve/cancelReservation.js +1 -1
  233. package/lib/chevre/service/reserve/confirmReservation.js +1 -1
  234. package/lib/chevre/service/task/authorizePayment.js +0 -2
  235. package/lib/chevre/service/task/onAuthorizationCreated.js +20 -16
  236. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +2 -2
  237. package/lib/chevre/service/task/onResourceUpdated/syncCategoryCode.js +1 -1
  238. package/lib/chevre/service/task/onResourceUpdated.js +16 -4
  239. package/lib/chevre/service/task/publishPaymentUrl.js +4 -0
  240. package/lib/chevre/service/task/returnPayTransaction.js +1 -1
  241. package/lib/chevre/service/transaction/deleteTransaction.js +2 -2
  242. package/lib/chevre/service/transaction/moneyTransfer.js +4 -4
  243. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +1 -1
  244. package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +36 -2
  245. package/lib/chevre/service/transaction/placeOrder/confirm.js +2 -2
  246. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -1
  247. package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.d.ts +2 -2
  248. package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +1 -1
  249. package/lib/chevre/service/transaction/placeOrder/start.js +1 -1
  250. package/lib/chevre/service/transaction/returnOrder/preStart.d.ts +2 -2
  251. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
  252. package/lib/chevre/service/transaction/returnOrder.js +2 -2
  253. package/lib/chevre/service/transaction.js +1 -1
  254. package/package.json +4 -4
  255. package/example/src/chevre/findTransactionById.ts +0 -23
  256. package/example/src/chevre/findTransactionInProgressById.ts +0 -23
  257. package/example/src/chevre/migrateTransactionObjectPaymentMethods.ts +0 -154
  258. package/example/src/chevre/projectReservationFields.ts +0 -31
  259. package/example/src/chevre/searchActions.ts +0 -40
  260. package/example/src/chevre/searchProducts.ts +0 -28
@@ -22,19 +22,19 @@
22
22
  /// <reference types="mongoose/types/validation" />
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
- import { AnyExpression, Connection, FilterQuery, QueryOptions } from 'mongoose';
25
+ import { AnyExpression, Connection, FilterQuery, QueryOptions, Types } from 'mongoose';
26
26
  import * as factory from '../factory';
27
- export type ISeller = Omit<factory.seller.ISeller, 'paymentAccepted'>;
28
- export type ISavingSeller = Omit<factory.seller.ISeller, 'paymentAccepted'>;
29
- export interface IUnset {
27
+ export type ISellerWithId = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
28
+ id: string;
29
+ };
30
+ type ISavingSeller = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'>;
31
+ interface IUnset {
30
32
  $unset?: {
31
33
  [key: string]: 1;
32
34
  };
33
35
  }
34
- export type ISellerByAggregate = Pick<ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
35
- id: string;
36
- };
37
- export interface IMemberSearchConditions {
36
+ type ISellerByAggregate = Pick<ISellerWithId, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'>;
37
+ interface IMemberSearchConditions {
38
38
  /**
39
39
  * 販売者メンバーで絞る場合
40
40
  */
@@ -46,7 +46,7 @@ export interface IMemberSearchConditions {
46
46
  };
47
47
  };
48
48
  }
49
- type IKeyOfProjection = keyof ISeller | '_id';
49
+ type IKeyOfProjection = keyof ISellerWithId;
50
50
  /**
51
51
  * 販売者リポジトリ
52
52
  * 対応決済方法については
@@ -75,9 +75,7 @@ export declare class SellerRepo {
75
75
  /**
76
76
  * 販売者検索
77
77
  */
78
- search(conditions: factory.seller.ISearchConditions & IMemberSearchConditions, inclusion: IKeyOfProjection[], exclusion: IKeyOfProjection[]): Promise<(ISeller & {
79
- id: string;
80
- })[]>;
78
+ projectFields(conditions: factory.seller.ISearchConditions & IMemberSearchConditions, inclusion: IKeyOfProjection[], exclusion: IKeyOfProjection[]): Promise<ISellerWithId[]>;
81
79
  /**
82
80
  * 販売者を削除する
83
81
  */
@@ -98,8 +96,60 @@ export declare class SellerRepo {
98
96
  addAvailableAtOrFrom(params: {
99
97
  id: string;
100
98
  makesOffer: factory.seller.IMakesOffer;
101
- }): Promise<any>;
102
- getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<any, QueryOptions<any>>;
99
+ }): Promise<void>;
100
+ getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
101
+ url?: string | undefined;
102
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
103
+ name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
104
+ typeOf: factory.organizationType.Corporation;
105
+ additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
106
+ location?: import("@chevre/factory/lib/place").IPlace | undefined;
107
+ telephone?: string | undefined;
108
+ hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
109
+ branchCode: string;
110
+ makesOffer?: factory.seller.IMakesOffer[] | undefined;
111
+ paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
112
+ }> & Omit<{
113
+ url?: string | undefined;
114
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
115
+ name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
116
+ typeOf: factory.organizationType.Corporation;
117
+ additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
118
+ location?: import("@chevre/factory/lib/place").IPlace | undefined;
119
+ telephone?: string | undefined;
120
+ hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
121
+ branchCode: string;
122
+ makesOffer?: factory.seller.IMakesOffer[] | undefined;
123
+ paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
124
+ } & {
125
+ _id: Types.ObjectId;
126
+ }, never>, QueryOptions<import("mongoose").Document<unknown, {}, {
127
+ url?: string | undefined;
128
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
129
+ name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
130
+ typeOf: factory.organizationType.Corporation;
131
+ additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
132
+ location?: import("@chevre/factory/lib/place").IPlace | undefined;
133
+ telephone?: string | undefined;
134
+ hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
135
+ branchCode: string;
136
+ makesOffer?: factory.seller.IMakesOffer[] | undefined;
137
+ paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
138
+ }> & Omit<{
139
+ url?: string | undefined;
140
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
141
+ name: import("@chevre/factory/lib/multilingualString").IMultilingualString;
142
+ typeOf: factory.organizationType.Corporation;
143
+ additionalProperty?: import("@chevre/factory/lib/propertyValue").IPropertyValue<string>[] | undefined;
144
+ location?: import("@chevre/factory/lib/place").IPlace | undefined;
145
+ telephone?: string | undefined;
146
+ hasMerchantReturnPolicy?: factory.seller.IHasMerchantReturnPolicy | undefined;
147
+ branchCode: string;
148
+ makesOffer?: factory.seller.IMakesOffer[] | undefined;
149
+ paymentAccepted?: factory.seller.IPaymentAccepted[] | undefined;
150
+ } & {
151
+ _id: Types.ObjectId;
152
+ }, never>>>;
103
153
  unsetUnnecessaryFields(params: {
104
154
  filter: any;
105
155
  $unset: any;
@@ -25,6 +25,17 @@ const mongoose_1 = require("mongoose");
25
25
  const seller_1 = require("./mongoose/schemas/seller");
26
26
  const factory = require("../factory");
27
27
  const settings_1 = require("../settings");
28
+ const AVAILABLE_PROJECT_FIELDS = [
29
+ 'additionalProperty',
30
+ 'branchCode',
31
+ 'hasMerchantReturnPolicy',
32
+ 'makesOffer',
33
+ 'name',
34
+ 'project',
35
+ 'typeOf',
36
+ 'url',
37
+ 'telephone'
38
+ ];
28
39
  /**
29
40
  * 販売者リポジトリ
30
41
  * 対応決済方法については
@@ -191,32 +202,46 @@ class SellerRepo {
191
202
  * 販売者を保管する
192
203
  */
193
204
  save(params) {
205
+ var _a, _b;
194
206
  return __awaiter(this, void 0, void 0, function* () {
195
207
  let doc;
208
+ let savedId;
196
209
  const savingId = params.id;
197
210
  if (typeof savingId === 'string') {
198
211
  if (savingId === '') {
199
212
  throw new factory.errors.ArgumentNull('id');
200
213
  }
201
214
  // 上書き禁止属性を除外(2022-08-24~)
202
- const _a = params.attributes, { id, branchCode, project, typeOf, $unset } = _a, updateFields = __rest(_a, ["id", "branchCode", "project", "typeOf", "$unset"]);
215
+ const _c = params.attributes, { id, branchCode, project, typeOf, $unset } = _c, updateFields = __rest(_c, ["id", "branchCode", "project", "typeOf", "$unset"]);
203
216
  const filter = {
204
217
  _id: { $eq: savingId },
205
218
  'project.id': { $eq: project.id }
206
219
  };
207
220
  const update = Object.assign({ $set: updateFields }, ($unset !== undefined && $unset !== null) ? { $unset } : undefined);
208
- const options = { upsert: false, new: true, projection: { _id: 1 } };
221
+ const options = {
222
+ upsert: false,
223
+ new: true,
224
+ projection: { _id: 1, id: { $toString: '$_id' } }
225
+ };
209
226
  doc = yield this.sellerModel.findOneAndUpdate(filter, update, options)
227
+ .lean()
210
228
  .exec();
229
+ if (doc === null) {
230
+ throw new factory.errors.NotFound(this.sellerModel.modelName);
231
+ }
232
+ savedId = savingId;
211
233
  }
212
234
  else {
213
- const _b = params.attributes, { id, $unset } = _b, createParams = __rest(_b, ["id", "$unset"]);
214
- doc = yield this.sellerModel.create(createParams);
215
- }
216
- if (doc === null) {
217
- throw new factory.errors.NotFound(this.sellerModel.modelName);
235
+ const _d = params.attributes, { id, $unset } = _d, createParams = __rest(_d, ["id", "$unset"]);
236
+ // doc = await this.sellerModel.create<ISavingSeller>(createParams);
237
+ const result = yield this.sellerModel.insertMany(createParams, { rawResult: true });
238
+ const insertedId = (_b = (_a = result.insertedIds) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.toHexString();
239
+ if (typeof insertedId !== 'string') {
240
+ throw new factory.errors.Internal(`seller not saved unexpectedly. result:${JSON.stringify(result)}`);
241
+ }
242
+ savedId = insertedId;
218
243
  }
219
- return doc.toObject();
244
+ return { id: savedId };
220
245
  });
221
246
  }
222
247
  /**
@@ -249,29 +274,38 @@ class SellerRepo {
249
274
  /**
250
275
  * 販売者検索
251
276
  */
252
- search(conditions, inclusion, exclusion) {
277
+ projectFields(conditions, inclusion, exclusion) {
253
278
  var _a;
254
279
  return __awaiter(this, void 0, void 0, function* () {
255
280
  const andConditions = SellerRepo.CREATE_MONGO_CONDITIONS(conditions);
256
- let projection = {};
281
+ let positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
257
282
  if (Array.isArray(inclusion) && inclusion.length > 0) {
258
- inclusion.forEach((field) => {
259
- projection[field] = 1;
260
- });
283
+ positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
261
284
  }
262
285
  else {
263
- projection = {
264
- __v: 0,
265
- createdAt: 0,
266
- updatedAt: 0,
267
- paymentAccepted: 0 // 除外(2023-12-01~)
268
- };
269
286
  if (Array.isArray(exclusion) && exclusion.length > 0) {
270
- exclusion.forEach((field) => {
271
- projection[field] = 0;
272
- });
287
+ positiveProjectionFields = positiveProjectionFields.filter((key) => !exclusion.includes(key));
273
288
  }
274
289
  }
290
+ const projection = Object.assign({ _id: 0, id: { $toString: '$_id' } }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
291
+ // let projection: { [key: string]: number } = {};
292
+ // if (Array.isArray(inclusion) && inclusion.length > 0) {
293
+ // inclusion.forEach((field) => {
294
+ // projection[field] = 1;
295
+ // });
296
+ // } else {
297
+ // projection = {
298
+ // __v: 0,
299
+ // createdAt: 0,
300
+ // updatedAt: 0,
301
+ // paymentAccepted: 0 // 除外(2023-12-01~)
302
+ // };
303
+ // if (Array.isArray(exclusion) && exclusion.length > 0) {
304
+ // exclusion.forEach((field) => {
305
+ // projection[field] = 0;
306
+ // });
307
+ // }
308
+ // }
275
309
  const query = this.sellerModel.find((andConditions.length > 0) ? { $and: andConditions } : {}, projection);
276
310
  if (typeof conditions.limit === 'number' && conditions.limit > 0) {
277
311
  const page = (typeof conditions.page === 'number' && conditions.page > 0) ? conditions.page : 1;
@@ -284,8 +318,8 @@ class SellerRepo {
284
318
  query.sort({ branchCode: conditions.sort.branchCode });
285
319
  }
286
320
  return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
287
- .exec()
288
- .then((docs) => docs.map((doc) => doc.toObject()));
321
+ .lean() // 2024-08-22~
322
+ .exec();
289
323
  });
290
324
  }
291
325
  /**
@@ -294,9 +328,9 @@ class SellerRepo {
294
328
  deleteById(params) {
295
329
  return __awaiter(this, void 0, void 0, function* () {
296
330
  yield this.sellerModel.findOneAndRemove({
297
- _id: params.id,
331
+ _id: { $eq: params.id },
298
332
  'project.id': { $eq: params.project.id }
299
- })
333
+ }, { projection: { _id: 1 } })
300
334
  .exec();
301
335
  });
302
336
  }
@@ -313,7 +347,7 @@ class SellerRepo {
313
347
  }
314
348
  addAvailableAtOrFrom(params) {
315
349
  return __awaiter(this, void 0, void 0, function* () {
316
- return this.sellerModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $push: { makesOffer: params.makesOffer } })
350
+ yield this.sellerModel.findOneAndUpdate({ _id: { $eq: params.id } }, { $push: { makesOffer: params.makesOffer } }, { projection: { _id: 1 } })
317
351
  .exec();
318
352
  });
319
353
  }
@@ -22,8 +22,9 @@
22
22
  /// <reference types="mongoose/types/validation" />
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
- import type { Connection, Model, UpdateWriteOpResult } from 'mongoose';
25
+ import type { Connection, UpdateWriteOpResult } from 'mongoose';
26
26
  import * as factory from '../factory';
27
+ import { IModel } from './mongoose/schemas/task';
27
28
  interface IAggregationByStatus {
28
29
  taskCount: number;
29
30
  avgLatency: number;
@@ -55,7 +56,7 @@ type IProjection = {
55
56
  * タスクリポジトリ
56
57
  */
57
58
  export declare class TaskRepo {
58
- readonly taskModel: typeof Model;
59
+ readonly taskModel: IModel;
59
60
  constructor(connection: Connection);
60
61
  static CREATE_MONGO_CONDITIONS(params: factory.task.ISearchConditions): any[];
61
62
  saveOne(savingTask: factory.task.IAttributes<factory.taskName>, options: IOptionOnCreate): Promise<{
@@ -191,7 +192,67 @@ export declare class TaskRepo {
191
192
  $nin?: factory.taskName[];
192
193
  };
193
194
  }): Promise<number>;
194
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
195
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, {
196
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
197
+ identifier?: string | undefined;
198
+ name: factory.taskName;
199
+ expires?: Date | undefined;
200
+ data: any;
201
+ status: factory.taskStatus;
202
+ runsAt: Date;
203
+ remainingNumberOfTries: number;
204
+ lastTriedAt?: Date | undefined;
205
+ numberOfTried: number;
206
+ executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
207
+ executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
208
+ dateAborted?: Date | undefined;
209
+ }> & Omit<{
210
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
211
+ identifier?: string | undefined;
212
+ name: factory.taskName;
213
+ expires?: Date | undefined;
214
+ data: any;
215
+ status: factory.taskStatus;
216
+ runsAt: Date;
217
+ remainingNumberOfTries: number;
218
+ lastTriedAt?: Date | undefined;
219
+ numberOfTried: number;
220
+ executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
221
+ executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
222
+ dateAborted?: Date | undefined;
223
+ } & {
224
+ _id: import("mongoose").Types.ObjectId;
225
+ }, never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, {
226
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
227
+ identifier?: string | undefined;
228
+ name: factory.taskName;
229
+ expires?: Date | undefined;
230
+ data: any;
231
+ status: factory.taskStatus;
232
+ runsAt: Date;
233
+ remainingNumberOfTries: number;
234
+ lastTriedAt?: Date | undefined;
235
+ numberOfTried: number;
236
+ executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
237
+ executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
238
+ dateAborted?: Date | undefined;
239
+ }> & Omit<{
240
+ project: Pick<factory.project.IProject, "id" | "typeOf">;
241
+ identifier?: string | undefined;
242
+ name: factory.taskName;
243
+ expires?: Date | undefined;
244
+ data: any;
245
+ status: factory.taskStatus;
246
+ runsAt: Date;
247
+ remainingNumberOfTries: number;
248
+ lastTriedAt?: Date | undefined;
249
+ numberOfTried: number;
250
+ executionResults: import("@chevre/factory/lib/task").IExecutionResult[];
251
+ executor?: import("@chevre/factory/lib/task").IExecutor | undefined;
252
+ dateAborted?: Date | undefined;
253
+ } & {
254
+ _id: import("mongoose").Types.ObjectId;
255
+ }, never>>>;
195
256
  unsetUnnecessaryFields(params: {
196
257
  filter: any;
197
258
  $unset: any;
@@ -1,8 +1,9 @@
1
- import type { Connection, Model } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import { IModel } from './mongoose/schemas/telemetry';
2
3
  /**
3
4
  * 測定リポジトリ
4
5
  */
5
6
  export declare class TelemetryRepo {
6
- readonly telemetryModel: typeof Model;
7
+ readonly telemetryModel: IModel;
7
8
  constructor(connection: Connection);
8
9
  }
@@ -1,23 +1,7 @@
1
1
  import type { Connection, FilterQuery } from 'mongoose';
2
2
  import * as factory from '../factory';
3
- export interface ITicketIssuedBy {
4
- id: string;
5
- typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
6
- }
7
- interface ITicket {
8
- /**
9
- * チケットID(jti)
10
- */
11
- id: string;
12
- project: {
13
- id: string;
14
- typeOf: factory.organizationType.Project;
15
- };
16
- typeOf: 'Ticket';
17
- ticketToken: string;
18
- dateIssued: Date;
19
- issuedBy: ITicketIssuedBy;
20
- }
3
+ import { ITicket, ITicketIssuedBy } from './mongoose/schemas/ticket';
4
+ export { ITicket };
21
5
  type IIssueParams = Pick<ITicket, 'ticketToken'> & {
22
6
  project: {
23
7
  id: string;
@@ -42,6 +26,7 @@ interface ISearchConditions {
42
26
  $eq?: string;
43
27
  };
44
28
  }
29
+ type IKeyOfProjection = keyof ITicket;
45
30
  /**
46
31
  * チケットリポジトリ
47
32
  */
@@ -53,6 +38,5 @@ export declare class TicketRepo {
53
38
  * 承認コードからチケットを発行する
54
39
  */
55
40
  issueByTicketToken(params: IIssueParams): Promise<Pick<ITicket, 'id'>>;
56
- search(params: ISearchConditions): Promise<ITicket[]>;
41
+ projectFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<ITicket[]>;
57
42
  }
58
- export {};
@@ -13,6 +13,13 @@ exports.TicketRepo = void 0;
13
13
  const factory = require("../factory");
14
14
  const settings_1 = require("../settings");
15
15
  const ticket_1 = require("./mongoose/schemas/ticket");
16
+ const AVAILABLE_PROJECT_FIELDS = [
17
+ 'project',
18
+ 'typeOf',
19
+ 'ticketToken',
20
+ 'dateIssued',
21
+ 'issuedBy'
22
+ ];
16
23
  /**
17
24
  * チケットリポジトリ
18
25
  */
@@ -41,6 +48,7 @@ class TicketRepo {
41
48
  * 承認コードからチケットを発行する
42
49
  */
43
50
  issueByTicketToken(params) {
51
+ var _a, _b;
44
52
  return __awaiter(this, void 0, void 0, function* () {
45
53
  const { ticketToken, project, issuedBy } = params;
46
54
  const ticketIssuedBy = (typeof (issuedBy === null || issuedBy === void 0 ? void 0 : issuedBy.id) === 'string' && issuedBy.typeOf === factory.organizationType.Corporation)
@@ -53,19 +61,24 @@ class TicketRepo {
53
61
  ticketToken,
54
62
  typeOf: 'Ticket'
55
63
  };
56
- const doc = yield this.ticketModel.create(creatingTicket);
57
- return { id: doc.id };
64
+ const result = yield this.ticketModel.insertMany(creatingTicket, { rawResult: true });
65
+ const insertedId = (_b = (_a = result.insertedIds) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.toHexString();
66
+ if (typeof insertedId !== 'string') {
67
+ throw new factory.errors.Internal(`ticket not saved unexpectedly. result:${JSON.stringify(result)}`);
68
+ }
69
+ return { id: insertedId };
58
70
  });
59
71
  }
60
- search(params) {
72
+ projectFields(params, inclusion) {
61
73
  var _a;
62
74
  return __awaiter(this, void 0, void 0, function* () {
63
75
  const conditions = TicketRepo.CREATE_MONGO_CONDITIONS(params);
64
- const query = this.ticketModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
65
- // __v: 0,
66
- // createdAt: 0,
67
- // updatedAt: 0
68
- });
76
+ let positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
77
+ if (Array.isArray(inclusion) && inclusion.length > 0) {
78
+ positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
79
+ }
80
+ const projection = Object.assign({ _id: 0, id: { $toString: '$_id' } }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
81
+ const query = this.ticketModel.find((conditions.length > 0) ? { $and: conditions } : {}, projection);
69
82
  if (typeof params.limit === 'number' && params.limit > 0) {
70
83
  const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
71
84
  query.limit(params.limit)
@@ -75,8 +88,8 @@ class TicketRepo {
75
88
  query.sort({ dateIssued: params.sort.dateIssued });
76
89
  }
77
90
  return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
78
- .exec()
79
- .then((docs) => docs.map((doc) => doc.toObject()));
91
+ .lean() // 2024-08-20~
92
+ .exec();
80
93
  });
81
94
  }
82
95
  }
@@ -52,7 +52,7 @@ export type IStartedTransaction = Pick<factory.transaction.ITransaction<factory.
52
52
  export declare class TransactionRepo {
53
53
  private readonly transactionModel;
54
54
  constructor(connection: Connection);
55
- static CREATE_MONGO_CONDITIONS(params: factory.transaction.ISearchConditions<factory.transactionType>): FilterQuery<import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction | import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction>[];
55
+ static CREATE_MONGO_CONDITIONS(params: factory.transaction.ISearchConditions<factory.transactionType>): FilterQuery<import("@chevre/factory/lib/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/assetTransaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/assetTransaction/registerService").ITransaction | import("@chevre/factory/lib/assetTransaction/reserve").ITransaction>[];
56
56
  /**
57
57
  * 取引を開始する
58
58
  */
@@ -60,14 +60,14 @@ export declare class TransactionRepo {
60
60
  /**
61
61
  * 特定取引検索
62
62
  */
63
- findById<T extends factory.transactionType>(params: {
63
+ projectFieldsById<T extends factory.transactionType>(params: {
64
64
  typeOf: T;
65
65
  id: string;
66
66
  }, inclusion: IKeyOfProjection<T>[]): Promise<factory.transaction.ITransaction<T>>;
67
67
  /**
68
68
  * 進行中の取引を取得する
69
69
  */
70
- findInProgressById<T extends factory.transactionType>(params: {
70
+ projectFieldsInProgressById<T extends factory.transactionType>(params: {
71
71
  typeOf: T;
72
72
  id: string;
73
73
  }, inclusion: IKeyOfProjection<T>[]): Promise<ITransactionInProgress<T>>;
@@ -158,7 +158,7 @@ export declare class TransactionRepo {
158
158
  status: {
159
159
  $in: factory.transactionStatusType[];
160
160
  };
161
- }): Promise<Pick<import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction, "typeOf" | "id" | "status">[]>;
161
+ }): Promise<Pick<import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction, "id" | "typeOf" | "status">[]>;
162
162
  /**
163
163
  * set task status exported by transaction id
164
164
  * IDでタスクをエクスポート済に変更する
@@ -185,7 +185,7 @@ export declare class TransactionRepo {
185
185
  /**
186
186
  * 取引を検索する
187
187
  */
188
- search<T extends factory.transactionType, F extends IKeyOfProjection<T>>(params: factory.transaction.ISearchConditions<T> & {
188
+ projectFields<T extends factory.transactionType, F extends IKeyOfProjection<T>>(params: factory.transaction.ISearchConditions<T> & {
189
189
  inclusion: F[];
190
190
  }): Promise<(Pick<factory.transaction.ITransaction<T>, F> & {
191
191
  id: string;
@@ -201,14 +201,6 @@ export declare class TransactionRepo {
201
201
  };
202
202
  };
203
203
  }): Promise<void>;
204
- findByIdAndUpdate4migrate(params: {
205
- id: string;
206
- update: {
207
- $set?: {
208
- 'object.paymentMethods'?: factory.transaction.placeOrder.IPaymentMethodByPaymentUrl;
209
- };
210
- };
211
- }): Promise<void>;
212
204
  saveOrderNumberIfNotExist(params: {
213
205
  id: string;
214
206
  orderNumber: string;
@@ -237,7 +229,31 @@ export declare class TransactionRepo {
237
229
  $lt: Date;
238
230
  };
239
231
  }): Promise<import("mongodb").DeleteResult>;
240
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
232
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & Omit<(import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
233
+ id: string;
234
+ } & {
235
+ _id: import("mongoose").Types.ObjectId;
236
+ }) | (import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
237
+ id: string;
238
+ } & {
239
+ _id: import("mongoose").Types.ObjectId;
240
+ }) | (import("@chevre/factory/lib/transaction/returnOrder").IAttributes & {
241
+ id: string;
242
+ } & {
243
+ _id: import("mongoose").Types.ObjectId;
244
+ }), never>, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, import("@chevre/factory/lib/transaction/moneyTransfer").ITransaction | import("@chevre/factory/lib/transaction/placeOrder").ITransaction | import("@chevre/factory/lib/transaction/returnOrder").ITransaction> & Omit<(import("@chevre/factory/lib/transaction/moneyTransfer").IAttributes & {
245
+ id: string;
246
+ } & {
247
+ _id: import("mongoose").Types.ObjectId;
248
+ }) | (import("@chevre/factory/lib/transaction/placeOrder").IAttributes & {
249
+ id: string;
250
+ } & {
251
+ _id: import("mongoose").Types.ObjectId;
252
+ }) | (import("@chevre/factory/lib/transaction/returnOrder").IAttributes & {
253
+ id: string;
254
+ } & {
255
+ _id: import("mongoose").Types.ObjectId;
256
+ }), never>>>;
241
257
  aggregatePlaceOrder(params: {
242
258
  project?: {
243
259
  id?: {