@chevre/domain 23.2.0-alpha.62 → 23.2.0-alpha.63

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 (178) hide show
  1. package/lib/chevre/errorHandler.js +0 -5
  2. package/lib/chevre/eventEmitter/assetTransaction.js +0 -1
  3. package/lib/chevre/eventEmitter/task.js +0 -1
  4. package/lib/chevre/eventEmitter/transaction.js +0 -1
  5. package/lib/chevre/factory/transactionNumber.js +0 -2
  6. package/lib/chevre/repo/acceptedOffer.js +0 -1
  7. package/lib/chevre/repo/acceptedPaymentMethod.js +0 -1
  8. package/lib/chevre/repo/account.js +0 -17
  9. package/lib/chevre/repo/accountTransaction.js +0 -7
  10. package/lib/chevre/repo/action.js +0 -7
  11. package/lib/chevre/repo/additionalProperty.js +0 -2
  12. package/lib/chevre/repo/advanceBookingRequirement.js +0 -1
  13. package/lib/chevre/repo/aggregateOffer.js +0 -5
  14. package/lib/chevre/repo/assetTransaction.js +0 -17
  15. package/lib/chevre/repo/authorization.js +0 -7
  16. package/lib/chevre/repo/categoryCode.js +0 -5
  17. package/lib/chevre/repo/comment.js +0 -1
  18. package/lib/chevre/repo/confirmationNumber.js +0 -4
  19. package/lib/chevre/repo/creativeWork.js +0 -6
  20. package/lib/chevre/repo/credentials.js +0 -1
  21. package/lib/chevre/repo/customer.js +0 -1
  22. package/lib/chevre/repo/customerType.js +0 -1
  23. package/lib/chevre/repo/emailMessage.js +0 -1
  24. package/lib/chevre/repo/event.js +0 -21
  25. package/lib/chevre/repo/eventSeries.js +0 -14
  26. package/lib/chevre/repo/identity.js +0 -1
  27. package/lib/chevre/repo/identityProvider.js +0 -1
  28. package/lib/chevre/repo/member.js +0 -1
  29. package/lib/chevre/repo/merchantReturnPolicy.js +0 -2
  30. package/lib/chevre/repo/mongoose/onIndexCreated.js +0 -1
  31. package/lib/chevre/repo/mongoose/schemas/task.js +0 -1
  32. package/lib/chevre/repo/movieTicketType.js +0 -6
  33. package/lib/chevre/repo/note.js +0 -1
  34. package/lib/chevre/repo/offer/unitPriceInCatalog.js +0 -2
  35. package/lib/chevre/repo/offerCatalog.js +0 -1
  36. package/lib/chevre/repo/offerCatalogItem.js +0 -1
  37. package/lib/chevre/repo/order.js +0 -39
  38. package/lib/chevre/repo/orderNumber.js +0 -4
  39. package/lib/chevre/repo/ownershipInfo.js +0 -8
  40. package/lib/chevre/repo/passport.js +0 -1
  41. package/lib/chevre/repo/paymentMethod/creditCard.js +0 -2
  42. package/lib/chevre/repo/paymentService.js +0 -2
  43. package/lib/chevre/repo/paymentServiceChannel.js +0 -1
  44. package/lib/chevre/repo/pendingReservation.js +0 -3
  45. package/lib/chevre/repo/person.js +0 -19
  46. package/lib/chevre/repo/place/busStop.js +0 -4
  47. package/lib/chevre/repo/place/movieTheater.js +0 -3
  48. package/lib/chevre/repo/place/screeningRoom.js +0 -2
  49. package/lib/chevre/repo/place/seat.js +0 -7
  50. package/lib/chevre/repo/place/section.js +0 -5
  51. package/lib/chevre/repo/potentialAction.js +0 -1
  52. package/lib/chevre/repo/priceSpecification.js +0 -6
  53. package/lib/chevre/repo/product.js +0 -2
  54. package/lib/chevre/repo/productModel.js +0 -1
  55. package/lib/chevre/repo/rateLimit/offer.js +0 -1
  56. package/lib/chevre/repo/reservation.js +0 -54
  57. package/lib/chevre/repo/role.js +0 -1
  58. package/lib/chevre/repo/seller.js +0 -3
  59. package/lib/chevre/repo/sellerReturnPolicy.js +0 -1
  60. package/lib/chevre/repo/serviceOutput.js +0 -2
  61. package/lib/chevre/repo/serviceOutputIdentifier.js +0 -1
  62. package/lib/chevre/repo/stockHolder.js +0 -2
  63. package/lib/chevre/repo/task.js +0 -7
  64. package/lib/chevre/repo/transaction.js +0 -24
  65. package/lib/chevre/repo/transactionNumberCounter.js +0 -1
  66. package/lib/chevre/repo/trip.js +0 -2
  67. package/lib/chevre/repo/webSite.js +0 -1
  68. package/lib/chevre/repository.js +0 -1
  69. package/lib/chevre/service/account.js +0 -3
  70. package/lib/chevre/service/accountTransaction/transfer.js +0 -3
  71. package/lib/chevre/service/accountTransaction.js +0 -3
  72. package/lib/chevre/service/aggregation/event/importFromCOA.js +0 -1
  73. package/lib/chevre/service/assetTransaction/cancelReservation/start.js +0 -1
  74. package/lib/chevre/service/assetTransaction/cancelReservation.js +0 -2
  75. package/lib/chevre/service/assetTransaction/moneyTransfer.js +0 -2
  76. package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +0 -1
  77. package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +0 -2
  78. package/lib/chevre/service/assetTransaction/pay/start/factory.js +0 -1
  79. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +0 -2
  80. package/lib/chevre/service/assetTransaction/refund.js +0 -2
  81. package/lib/chevre/service/assetTransaction/registerService/potentialActions.js +0 -2
  82. package/lib/chevre/service/assetTransaction/registerService.js +0 -4
  83. package/lib/chevre/service/assetTransaction/reserve/confirm/factory.js +0 -1
  84. package/lib/chevre/service/assetTransaction/reserve/exportTasksById.js +0 -1
  85. package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +0 -4
  86. package/lib/chevre/service/assetTransaction/reserve/start/factory/createReservation.js +0 -2
  87. package/lib/chevre/service/assetTransaction/reserve/start.js +0 -2
  88. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/validateMemberTierIfExists.js +0 -1
  89. package/lib/chevre/service/assetTransaction/reserve/validateStartRequest/verifyTicketTokenAsNeeded.js +0 -2
  90. package/lib/chevre/service/delivery.js +1 -3
  91. package/lib/chevre/service/event/processUpdateMovieTheater.js +0 -3
  92. package/lib/chevre/service/event/saveScreeningEventSeries.js +0 -4
  93. package/lib/chevre/service/event/saveScreeningEvents.js +0 -6
  94. package/lib/chevre/service/event.js +0 -3
  95. package/lib/chevre/service/notification/factory.js +0 -2
  96. package/lib/chevre/service/notification/notifyByEmail.js +0 -2
  97. package/lib/chevre/service/notification/triggerWebhook.js +0 -2
  98. package/lib/chevre/service/offer/event/authorize/factory.js +0 -2
  99. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre/requestedProgramMembershipUsed2permit.js +0 -1
  100. package/lib/chevre/service/offer/event/authorize.js +0 -3
  101. package/lib/chevre/service/offer/event/importFromCOA/factory.js +0 -1
  102. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +0 -3
  103. package/lib/chevre/service/offer/event/searchOfferCatalogItemAvailability.js +0 -2
  104. package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +0 -1
  105. package/lib/chevre/service/offer/event/searchOffersByIds.js +0 -3
  106. package/lib/chevre/service/offer/event/voidTransaction.js +0 -2
  107. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +0 -2
  108. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -4
  109. package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +0 -3
  110. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +0 -1
  111. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +0 -2
  112. package/lib/chevre/service/offer/factory.js +0 -1
  113. package/lib/chevre/service/offer/onEventChanged.js +0 -1
  114. package/lib/chevre/service/offer/product/factory.js +0 -3
  115. package/lib/chevre/service/offer/product/searchProductOffers.js +0 -1
  116. package/lib/chevre/service/offer/product.js +0 -2
  117. package/lib/chevre/service/offer.js +0 -1
  118. package/lib/chevre/service/order/deleteOrder.js +0 -1
  119. package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +0 -2
  120. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +0 -1
  121. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +0 -1
  122. package/lib/chevre/service/order/placeOrder.js +0 -1
  123. package/lib/chevre/service/order/returnOrder.js +0 -1
  124. package/lib/chevre/service/order/sendOrder.js +0 -1
  125. package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +0 -2
  126. package/lib/chevre/service/payment/any/factory.js +0 -1
  127. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +0 -1
  128. package/lib/chevre/service/payment/any/person2username.js +0 -1
  129. package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +0 -2
  130. package/lib/chevre/service/payment/any.js +0 -5
  131. package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +0 -1
  132. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +0 -2
  133. package/lib/chevre/service/payment/creditCard/voidTransaction.js +0 -1
  134. package/lib/chevre/service/payment/factory.js +0 -1
  135. package/lib/chevre/service/payment/movieTicket/authorize.js +0 -2
  136. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +0 -1
  137. package/lib/chevre/service/payment/movieTicket/validation.js +0 -1
  138. package/lib/chevre/service/payment/paymentCard.js +0 -1
  139. package/lib/chevre/service/product.js +0 -1
  140. package/lib/chevre/service/report/telemetry.js +0 -15
  141. package/lib/chevre/service/reserve/cancelReservation.js +0 -3
  142. package/lib/chevre/service/reserve/confirmReservation.js +0 -1
  143. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +0 -1
  144. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +0 -1
  145. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +0 -2
  146. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +0 -1
  147. package/lib/chevre/service/reserve/searchByOrder.js +0 -1
  148. package/lib/chevre/service/reserve/useReservation.js +0 -2
  149. package/lib/chevre/service/reserveCOA/cancelReservation.js +0 -1
  150. package/lib/chevre/service/task/acceptCOAOffer.js +0 -1
  151. package/lib/chevre/service/task/confirmReserveTransaction.js +0 -3
  152. package/lib/chevre/service/task/deletePerson.js +0 -2
  153. package/lib/chevre/service/task/onAuthorizationCreated.js +0 -1
  154. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.js +0 -1
  155. package/lib/chevre/service/task/onResourceDeleted.js +0 -1
  156. package/lib/chevre/service/task/onResourceUpdated.js +0 -5
  157. package/lib/chevre/service/task/returnPayTransaction.js +0 -1
  158. package/lib/chevre/service/task/syncResourcesFromCOA.js +0 -5
  159. package/lib/chevre/service/task.js +0 -4
  160. package/lib/chevre/service/taskHandler.js +0 -1
  161. package/lib/chevre/service/transaction/deleteTransaction.js +0 -4
  162. package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +0 -3
  163. package/lib/chevre/service/transaction/moneyTransfer.js +0 -2
  164. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.js +0 -2
  165. package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +0 -2
  166. package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -4
  167. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +0 -2
  168. package/lib/chevre/service/transaction/placeOrder/start/validateStartRequest.js +0 -1
  169. package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +0 -1
  170. package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +0 -2
  171. package/lib/chevre/service/transaction/returnOrder/preStart/findApplicableReturnPolicy.js +0 -2
  172. package/lib/chevre/service/transaction/returnOrder/preStart.js +0 -1
  173. package/lib/chevre/service/transaction/returnOrder.js +0 -1
  174. package/lib/chevre/service/validation/validateOrder.js +0 -2
  175. package/lib/chevre/service.js +0 -3
  176. package/lib/chevre/settings.js +0 -1
  177. package/lib/index.js +0 -1
  178. package/package.json +2 -6
@@ -68,7 +68,6 @@ async function handleMongoError(error) {
68
68
  /**
69
69
  * 汎用的なCOAエラーハンドリング
70
70
  */
71
- // tslint:disable-next-line:no-any
72
71
  function handleCOAError(error) {
73
72
  let handledError = error;
74
73
  if (error.name === 'AbortError') {
@@ -89,7 +88,6 @@ function handleCOAError(error) {
89
88
  /**
90
89
  * COA仮予約エラーハンドリング
91
90
  */
92
- // tslint:disable-next-line:no-any
93
91
  function handleCOAReserveTemporarilyError(error) {
94
92
  let handledError = error;
95
93
  // if (error.message === '座席取得失敗') {
@@ -120,7 +118,6 @@ function handleCOAReserveTemporarilyError(error) {
120
118
  * Pecorinoサービスエラーをハンドリングする
121
119
  * 可能であればChevreエラーへ変換します
122
120
  */
123
- // tslint:disable-next-line:no-any
124
121
  function handlePecorinoError(error) {
125
122
  let handledError = error;
126
123
  if (error.name === 'ChevreRequestError' || error.name === 'PecorinoRequestError') {
@@ -154,7 +151,6 @@ exports.MOVIE_TICKET_RESERVE_REQUEST_ERROR_NAME = 'MovieticketReserveRequestErro
154
151
  * ムビチケ着券サービスエラーをハンドリングする
155
152
  * 可能であればChevreエラーへ変換します
156
153
  */
157
- // tslint:disable-next-line:no-any
158
154
  function handleMvtkReserveError(error) {
159
155
  let handledError = error;
160
156
  if (error.name === exports.MOVIE_TICKET_RESERVE_REQUEST_ERROR_NAME) {
@@ -195,7 +191,6 @@ function handleMvtkReserveError(error) {
195
191
  /**
196
192
  * AWSエラーハンドリング
197
193
  */
198
- // tslint:disable-next-line:no-any
199
194
  function handleAWSError(error) {
200
195
  let handledError = error;
201
196
  const message = `${error.name}:${error.message}`;
@@ -20,6 +20,5 @@ class AssetTransactionEventEmitter extends events_1.EventEmitter {
20
20
  const assetTransactionEventEmitter = new AssetTransactionEventEmitter();
21
21
  exports.assetTransactionEventEmitter = assetTransactionEventEmitter;
22
22
  assetTransactionEventEmitter.on('error', (err) => {
23
- // tslint:disable-next-line:no-console
24
23
  console.error('assetTransactionEventEmitter listened an error.', err);
25
24
  });
@@ -21,6 +21,5 @@ class TaskEventEmitter extends events_1.EventEmitter {
21
21
  const taskEventEmitter = new TaskEventEmitter();
22
22
  exports.taskEventEmitter = taskEventEmitter;
23
23
  taskEventEmitter.on('error', (err) => {
24
- // tslint:disable-next-line:no-console
25
24
  console.error('taskEventEmitter listened an error.', err);
26
25
  });
@@ -20,6 +20,5 @@ class TransactionEventEmitter extends events_1.EventEmitter {
20
20
  const transactionEventEmitter = new TransactionEventEmitter();
21
21
  exports.transactionEventEmitter = transactionEventEmitter;
22
22
  transactionEventEmitter.on('error', (err) => {
23
- // tslint:disable-next-line:no-console
24
23
  console.error('transactionEventEmitter listened an error.', err);
25
24
  });
@@ -23,7 +23,6 @@ class TransactionNumberFactory {
23
23
  * 生成: SEQが100を超えると自動で18桁に拡張
24
24
  */
25
25
  generate(timestamp, seq) {
26
- // tslint:disable-next-line:no-magic-numbers
27
26
  const saltDigit = (0, crypto_1.randomInt)(0, 10);
28
27
  const saltStr = saltDigit.toString();
29
28
  const cipher = fpe2({ secret: `${this.fpeSecret}${saltStr}` });
@@ -45,7 +44,6 @@ class TransactionNumberFactory {
45
44
  */
46
45
  decrypt(transactionNumber) {
47
46
  const saltStr = transactionNumber[1]; // 2文字目からソルト(鍵のヒント)を回収
48
- // tslint:disable-next-line:no-magic-numbers
49
47
  const encryptedBody = transactionNumber.slice(2);
50
48
  const cipher = fpe2({
51
49
  secret: `${this.fpeSecret}${saltStr}`
@@ -22,7 +22,6 @@ class AcceptedOfferRepo {
22
22
  const aggregate = this.orderModel.aggregate();
23
23
  // pipelineの順序に注意
24
24
  // @see https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
25
- // tslint:disable-next-line:no-single-line-block-comment
26
25
  /* istanbul ignore else */
27
26
  if (typeof params.sort?.orderDate === 'number') {
28
27
  aggregate.sort({ orderDate: params.sort.orderDate });
@@ -100,7 +100,6 @@ class AcceptedPaymentMethodRepo {
100
100
  /**
101
101
  * オファーコードと提供リソースIDをキーにして冪等置換
102
102
  */
103
- // tslint:disable-next-line:max-func-body-length
104
103
  async addAcceptedPaymentMethodsByIdentifier(params, options) {
105
104
  const { upsert, project, seller, itemOffered } = options;
106
105
  const bulkWriteOps = [];
@@ -12,24 +12,19 @@ class AccountRepo {
12
12
  constructor(connection) {
13
13
  this.accountModel = connection.model(account_1.modelName, (0, account_1.createSchema)());
14
14
  }
15
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
16
15
  static CREATE_MONGO_CONDITIONS(params) {
17
16
  const andConditions = [];
18
17
  const accountTypeEq = params.accountType;
19
- // tslint:disable-next-line:no-single-line-block-comment
20
18
  /* istanbul ignore else */
21
19
  if (typeof accountTypeEq === 'string') {
22
20
  andConditions.push({
23
21
  accountType: accountTypeEq
24
22
  });
25
23
  }
26
- // tslint:disable-next-line:no-single-line-block-comment
27
24
  /* istanbul ignore else */
28
25
  if (params.project !== undefined && params.project !== null) {
29
- // tslint:disable-next-line:no-single-line-block-comment
30
26
  /* istanbul ignore else */
31
27
  if (params.project.id !== undefined && params.project.id !== null) {
32
- // tslint:disable-next-line:no-single-line-block-comment
33
28
  /* istanbul ignore else */
34
29
  if (typeof params.project.id.$eq === 'string') {
35
30
  andConditions.push({
@@ -38,7 +33,6 @@ class AccountRepo {
38
33
  }
39
34
  });
40
35
  }
41
- // tslint:disable-next-line:no-single-line-block-comment
42
36
  /* istanbul ignore else */
43
37
  if (typeof params.project.id.$ne === 'string') {
44
38
  andConditions.push({
@@ -50,7 +44,6 @@ class AccountRepo {
50
44
  }
51
45
  }
52
46
  const accountNumberEq = params.accountNumber?.$eq;
53
- // tslint:disable-next-line:no-single-line-block-comment
54
47
  /* istanbul ignore else */
55
48
  if (typeof accountNumberEq === 'string') {
56
49
  andConditions.push({
@@ -58,7 +51,6 @@ class AccountRepo {
58
51
  });
59
52
  }
60
53
  const accountNumberIn = params.accountNumber?.$in;
61
- // tslint:disable-next-line:no-single-line-block-comment
62
54
  /* istanbul ignore else */
63
55
  if (Array.isArray(accountNumberIn)) {
64
56
  andConditions.push({
@@ -66,21 +58,18 @@ class AccountRepo {
66
58
  });
67
59
  }
68
60
  const accountNumberRegex = params.accountNumber?.$regex;
69
- // tslint:disable-next-line:no-single-line-block-comment
70
61
  /* istanbul ignore else */
71
62
  if (typeof accountNumberRegex === 'string' && accountNumberRegex.length > 0) {
72
63
  andConditions.push({
73
64
  accountNumber: { $regex: new RegExp(accountNumberRegex) }
74
65
  });
75
66
  }
76
- // tslint:disable-next-line:no-single-line-block-comment
77
67
  /* istanbul ignore else */
78
68
  if (Array.isArray(params.accountNumbers) && params.accountNumbers.length > 0) {
79
69
  andConditions.push({
80
70
  accountNumber: { $in: params.accountNumbers }
81
71
  });
82
72
  }
83
- // tslint:disable-next-line:no-single-line-block-comment
84
73
  /* istanbul ignore else */
85
74
  // if (Array.isArray(params.statuses) && params.statuses.length > 0) {
86
75
  // andConditions.push({
@@ -88,14 +77,12 @@ class AccountRepo {
88
77
  // });
89
78
  // }
90
79
  const nameRegex = params.name?.$regex;
91
- // tslint:disable-next-line:no-single-line-block-comment
92
80
  /* istanbul ignore else */
93
81
  if (typeof nameRegex === 'string' && nameRegex.length > 0) {
94
82
  andConditions.push({
95
83
  name: { $regex: new RegExp(nameRegex) }
96
84
  });
97
85
  }
98
- // tslint:disable-next-line:no-single-line-block-comment
99
86
  /* istanbul ignore if */
100
87
  if (typeof params.name === 'string') {
101
88
  andConditions.push({
@@ -103,7 +90,6 @@ class AccountRepo {
103
90
  });
104
91
  }
105
92
  const openDateGte = params.openDate?.$gte;
106
- // tslint:disable-next-line:no-single-line-block-comment
107
93
  /* istanbul ignore else */
108
94
  if (openDateGte instanceof Date) {
109
95
  andConditions.push({
@@ -111,7 +97,6 @@ class AccountRepo {
111
97
  });
112
98
  }
113
99
  const openDateLte = params.openDate?.$lte;
114
- // tslint:disable-next-line:no-single-line-block-comment
115
100
  /* istanbul ignore else */
116
101
  if (openDateLte instanceof Date) {
117
102
  andConditions.push({
@@ -384,14 +369,12 @@ class AccountRepo {
384
369
  updatedAt: 0,
385
370
  pendingTransactions: 0
386
371
  });
387
- // tslint:disable-next-line:no-single-line-block-comment
388
372
  /* istanbul ignore else */
389
373
  if (typeof params.limit === 'number' && params.limit > 0) {
390
374
  const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
391
375
  query.limit(params.limit)
392
376
  .skip(params.limit * (page - 1));
393
377
  }
394
- // tslint:disable-next-line:no-single-line-block-comment
395
378
  /* istanbul ignore else */
396
379
  if (params.sort?.openDate !== undefined) {
397
380
  query.sort({ openDate: params.sort.openDate });
@@ -134,7 +134,6 @@ class AccountTransactionRepo {
134
134
  }
135
135
  return doc.toObject();
136
136
  }
137
- // tslint:disable-next-line:no-single-line-block-comment
138
137
  /* istanbul ignore next */
139
138
  async findByTransactionNumber(params) {
140
139
  const doc = await this.transactionModel.findOne({
@@ -179,7 +178,6 @@ class AccountTransactionRepo {
179
178
  */
180
179
  async cancel(params) {
181
180
  if (typeof params.id !== 'string' && typeof params.transactionNumber !== 'string') {
182
- // tslint:disable-next-line:no-single-line-block-comment
183
181
  /* istanbul ignore next */
184
182
  throw new factory.errors.ArgumentNull('Transaction ID or Transaction Number');
185
183
  }
@@ -188,7 +186,6 @@ class AccountTransactionRepo {
188
186
  status: factory.transactionStatusType.InProgress,
189
187
  ...(typeof params.id === 'string') ? { _id: params.id } : /* istanbul ignore next */ undefined,
190
188
  ...(typeof params.transactionNumber === 'string')
191
- // tslint:disable-next-line:no-single-line-block-comment
192
189
  /* istanbul ignore next */
193
190
  ? { transactionNumber: { $exists: true, $eq: params.transactionNumber } }
194
191
  : undefined,
@@ -201,13 +198,11 @@ class AccountTransactionRepo {
201
198
  // NotFoundであれば取引状態確認
202
199
  if (doc === null) {
203
200
  let transaction;
204
- // tslint:disable-next-line:no-single-line-block-comment
205
201
  /* istanbul ignore else */
206
202
  if (typeof params.id === 'string') {
207
203
  transaction = await this.findById({ typeOf: params.typeOf, id: params.id });
208
204
  }
209
205
  else if (typeof params.transactionNumber === 'string') {
210
- // tslint:disable-next-line:no-single-line-block-comment
211
206
  /* istanbul ignore next */
212
207
  transaction = await this.findByTransactionNumber({
213
208
  typeOf: params.typeOf,
@@ -215,7 +210,6 @@ class AccountTransactionRepo {
215
210
  });
216
211
  }
217
212
  else {
218
- // tslint:disable-next-line:no-single-line-block-comment
219
213
  /* istanbul ignore next */
220
214
  throw new factory.errors.ArgumentNull('Transaction ID or Transaction Number');
221
215
  }
@@ -258,7 +252,6 @@ class AccountTransactionRepo {
258
252
  query.limit(params.limit)
259
253
  .skip(params.limit * (page - 1));
260
254
  }
261
- // tslint:disable-next-line:no-single-line-block-comment
262
255
  /* istanbul ignore else */
263
256
  if (params.sort?.startDate !== undefined) {
264
257
  query.sort({ startDate: params.sort.startDate });
@@ -43,7 +43,6 @@ class ActionRepo {
43
43
  this.actionModel = connection.model(action_1.modelName, (0, action_1.createSchema)());
44
44
  this.actionRecipeModel = connection.model(actionRecipe_1.modelName, (0, actionRecipe_1.createSchema)());
45
45
  }
46
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
47
46
  static CREATE_MONGO_CONDITIONS(params) {
48
47
  const andConditions = [];
49
48
  const idIn = params.id?.$in;
@@ -470,7 +469,6 @@ class ActionRepo {
470
469
  query.limit(params.limit)
471
470
  .skip(params.limit * (page - 1));
472
471
  }
473
- // tslint:disable-next-line:no-single-line-block-comment
474
472
  /* istanbul ignore else */
475
473
  if (params.sort?.startDate !== undefined) {
476
474
  query.sort({ startDate: params.sort.startDate });
@@ -671,7 +669,6 @@ class ActionRepo {
671
669
  /**
672
670
  * 取引に対するアクションを検索する
673
671
  */
674
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
675
672
  async searchByPurpose(params) {
676
673
  const andConditions = [
677
674
  { 'purpose.typeOf': { $exists: true, $eq: params.purpose.typeOf } },
@@ -772,7 +769,6 @@ class ActionRepo {
772
769
  };
773
770
  const query = this.actionModel.find(filter, projection);
774
771
  // .select({ __v: 0, createdAt: 0, updatedAt: 0 });
775
- // tslint:disable-next-line:no-single-line-block-comment
776
772
  /* istanbul ignore else */
777
773
  if (params.sort?.startDate !== undefined) {
778
774
  query.sort({ startDate: params.sort.startDate });
@@ -1312,7 +1308,6 @@ class ActionRepo {
1312
1308
  return this.actionModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
1313
1309
  .exec();
1314
1310
  }
1315
- // tslint:disable-next-line:max-func-body-length
1316
1311
  async agggregateByStatus(params) {
1317
1312
  const aggregations = await this.actionModel.aggregate([
1318
1313
  { $match: params.matchConditions },
@@ -1345,7 +1340,6 @@ class ActionRepo {
1345
1340
  }
1346
1341
  ])
1347
1342
  .exec();
1348
- // tslint:disable-next-line:no-magic-numbers
1349
1343
  const percents = [50, 95, 99];
1350
1344
  if (aggregations.length === 0) {
1351
1345
  return {
@@ -1367,7 +1361,6 @@ class ActionRepo {
1367
1361
  const ranks4percentile = percents.map((percentile) => {
1368
1362
  return {
1369
1363
  percentile,
1370
- // tslint:disable-next-line:no-magic-numbers
1371
1364
  rank: Math.floor(aggregations[0].actionCount * percentile / 100)
1372
1365
  };
1373
1366
  });
@@ -19,7 +19,6 @@ class AdditionalPropertyRepo {
19
19
  constructor(connection) {
20
20
  this.additionalPropertyModel = connection.model(additionalProperty_1.modelName, (0, additionalProperty_1.createSchema)());
21
21
  }
22
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
23
22
  static CREATE_MONGO_CONDITIONS(params) {
24
23
  const andConditions = [];
25
24
  const projectIdEq = params.project?.id?.$eq;
@@ -80,7 +79,6 @@ class AdditionalPropertyRepo {
80
79
  query.limit(params.limit)
81
80
  .skip(params.limit * (page - 1));
82
81
  }
83
- // tslint:disable-next-line:no-single-line-block-comment
84
82
  /* istanbul ignore else */
85
83
  if (params.sort !== undefined) {
86
84
  query.sort(params.sort);
@@ -12,7 +12,6 @@ class AdvanceBookingRequirementRepo {
12
12
  constructor(connection) {
13
13
  this.advanceBookingRequirementModel = connection.model(advanceBookingRequirement_1.modelName, (0, advanceBookingRequirement_1.createSchema)());
14
14
  }
15
- // tslint:disable-next-line:max-func-body-length
16
15
  static CREATE_FILTER_QUERY(params) {
17
16
  const andConditions = [];
18
17
  const projectIdEq = params.project?.id?.$eq;
@@ -13,7 +13,6 @@ class AggregateOfferRepo {
13
13
  constructor(connection) {
14
14
  this.aggregateOfferModel = connection.model(aggregateOffer_1.modelName, (0, aggregateOffer_1.createSchema)());
15
15
  }
16
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
17
16
  static CREATE_MATCH_STAGE(params) {
18
17
  const matchStages = [];
19
18
  const projectIdEq = params.project?.id?.$eq;
@@ -418,7 +417,6 @@ class AggregateOfferRepo {
418
417
  else if (negativeProjectionFields.length > 0) {
419
418
  negativeProjectionFields.forEach((field) => {
420
419
  if (typeof projectStage[field] === 'string') {
421
- // tslint:disable-next-line:no-dynamic-delete
422
420
  delete projectStage[field];
423
421
  }
424
422
  });
@@ -448,7 +446,6 @@ class AggregateOfferRepo {
448
446
  : [],
449
447
  { $project: projectStage }
450
448
  ]);
451
- // tslint:disable-next-line:no-single-line-block-comment
452
449
  /* istanbul ignore else */
453
450
  if (typeof params.limit === 'number' && params.limit > 0) {
454
451
  const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
@@ -688,7 +685,6 @@ class AggregateOfferRepo {
688
685
  /**
689
686
  * sskts専用オファー保管
690
687
  */
691
- // tslint:disable-next-line:max-func-body-length
692
688
  async saveManyByIdentifier4sskts(params) {
693
689
  const uniqid = await Promise.resolve().then(() => require('uniqid'));
694
690
  const insertBulkWriteOps = [];
@@ -832,7 +828,6 @@ class AggregateOfferRepo {
832
828
  },
833
829
  {
834
830
  $group: {
835
- // tslint:disable-next-line:no-null-keyword
836
831
  _id: null,
837
832
  maxCount: { $max: '$includedInDataCatalogCount' }
838
833
  }
@@ -15,32 +15,27 @@ class AssetTransactionRepo {
15
15
  constructor(connection) {
16
16
  this.transactionModel = connection.model(assetTransaction_1.modelName, (0, assetTransaction_1.createSchema)());
17
17
  }
18
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
19
18
  static CREATE_MONGO_CONDITIONS(params) {
20
19
  const andConditions = [
21
20
  { typeOf: { $eq: params.typeOf } }
22
21
  ];
23
22
  const projectIdEq = params.project?.id?.$eq;
24
- // tslint:disable-next-line:no-single-line-block-comment
25
23
  /* istanbul ignore else */
26
24
  if (typeof projectIdEq === 'string') {
27
25
  andConditions.push({ 'project.id': { $eq: projectIdEq } });
28
26
  }
29
- // tslint:disable-next-line:no-single-line-block-comment
30
27
  /* istanbul ignore else */
31
28
  if (params.startFrom !== undefined) {
32
29
  andConditions.push({
33
30
  startDate: { $gte: params.startFrom }
34
31
  });
35
32
  }
36
- // tslint:disable-next-line:no-single-line-block-comment
37
33
  /* istanbul ignore else */
38
34
  if (params.startThrough !== undefined) {
39
35
  andConditions.push({
40
36
  startDate: { $lte: params.startThrough }
41
37
  });
42
38
  }
43
- // tslint:disable-next-line:no-single-line-block-comment
44
39
  /* istanbul ignore else */
45
40
  if (params.endFrom !== undefined) {
46
41
  andConditions.push({
@@ -50,7 +45,6 @@ class AssetTransactionRepo {
50
45
  }
51
46
  });
52
47
  }
53
- // tslint:disable-next-line:no-single-line-block-comment
54
48
  /* istanbul ignore else */
55
49
  if (params.endThrough !== undefined) {
56
50
  andConditions.push({
@@ -60,25 +54,21 @@ class AssetTransactionRepo {
60
54
  }
61
55
  });
62
56
  }
63
- // tslint:disable-next-line:no-single-line-block-comment
64
57
  /* istanbul ignore else */
65
58
  if (Array.isArray(params.ids)) {
66
59
  andConditions.push({
67
60
  _id: { $in: params.ids }
68
61
  });
69
62
  }
70
- // tslint:disable-next-line:no-single-line-block-comment
71
63
  /* istanbul ignore else */
72
64
  if (Array.isArray(params.statuses)) {
73
65
  andConditions.push({ status: { $in: params.statuses } });
74
66
  }
75
- // tslint:disable-next-line:no-single-line-block-comment
76
67
  /* istanbul ignore else */
77
68
  const statusIn = params.status?.$in;
78
69
  if (Array.isArray(statusIn)) {
79
70
  andConditions.push({ status: { $in: statusIn } });
80
71
  }
81
- // tslint:disable-next-line:no-single-line-block-comment
82
72
  /* istanbul ignore else */
83
73
  if (params.agent !== undefined) {
84
74
  if (Array.isArray(params.agent.ids)) {
@@ -96,13 +86,11 @@ class AssetTransactionRepo {
96
86
  andConditions.push({ transactionNumber: { $in: transactionNumberIn } });
97
87
  }
98
88
  const tasksExportActionStatusIn = params.tasksExportAction?.actionStatus?.$in;
99
- // tslint:disable-next-line:no-single-line-block-comment
100
89
  /* istanbul ignore else */
101
90
  if (Array.isArray(tasksExportActionStatusIn)) {
102
91
  andConditions.push({ 'tasksExportAction.actionStatus': { $exists: true, $in: tasksExportActionStatusIn } });
103
92
  }
104
93
  const tasksExportActionStatusEq = params.tasksExportAction?.actionStatus?.$eq;
105
- // tslint:disable-next-line:no-single-line-block-comment
106
94
  /* istanbul ignore else */
107
95
  if (typeof tasksExportActionStatusEq === 'string') {
108
96
  andConditions.push({ 'tasksExportAction.actionStatus': { $exists: true, $eq: tasksExportActionStatusEq } });
@@ -542,7 +530,6 @@ class AssetTransactionRepo {
542
530
  return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
543
531
  .lean()
544
532
  .exec()
545
- // tslint:disable-next-line:no-null-keyword
546
533
  .then((doc) => (doc === null) ? null : doc);
547
534
  }
548
535
  // discontinue(2025-03-10~)
@@ -875,7 +862,6 @@ class AssetTransactionRepo {
875
862
  query.limit(params.limit)
876
863
  .skip(params.limit * (page - 1));
877
864
  }
878
- // tslint:disable-next-line:no-single-line-block-comment
879
865
  /* istanbul ignore else */
880
866
  if (params.sort?.startDate !== undefined) {
881
867
  query.sort({ startDate: params.sort.startDate });
@@ -1020,7 +1006,6 @@ class AssetTransactionRepo {
1020
1006
  }));
1021
1007
  return { statuses };
1022
1008
  }
1023
- // tslint:disable-next-line:max-func-body-length
1024
1009
  async agggregateByStatus(params) {
1025
1010
  const matchConditions = params.matchConditions;
1026
1011
  const transactionStatus = params.status;
@@ -1079,7 +1064,6 @@ class AssetTransactionRepo {
1079
1064
  }
1080
1065
  ])
1081
1066
  .exec();
1082
- // tslint:disable-next-line:no-magic-numbers
1083
1067
  const percents = [50, 95, 99];
1084
1068
  if (aggregations.length === 0) {
1085
1069
  return {
@@ -1105,7 +1089,6 @@ class AssetTransactionRepo {
1105
1089
  const ranks4percentile = percents.map((percentile) => {
1106
1090
  return {
1107
1091
  percentile,
1108
- // tslint:disable-next-line:no-magic-numbers
1109
1092
  rank: Math.floor(aggregations[0].transactionCount * percentile / 100)
1110
1093
  };
1111
1094
  });
@@ -25,7 +25,6 @@ class AuthorizationRepo {
25
25
  constructor(connection) {
26
26
  this.authorizationModel = connection.model(authorization_1.modelName, (0, authorization_1.createSchema)());
27
27
  }
28
- // tslint:disable-next-line:max-func-body-length
29
28
  static CREATE_MONGO_CONDITIONS(params) {
30
29
  const andConditions = [];
31
30
  const projectIdEq = params.project?.id?.$eq;
@@ -52,35 +51,29 @@ class AuthorizationRepo {
52
51
  if (typeof objectOrderNumberEq === 'string') {
53
52
  andConditions.push({ 'object.orderNumber': { $exists: true, $eq: objectOrderNumberEq } });
54
53
  }
55
- // tslint:disable-next-line:no-single-line-block-comment
56
54
  /* istanbul ignore else */
57
55
  const object = params.object;
58
56
  if (object !== undefined) {
59
- // tslint:disable-next-line:no-single-line-block-comment
60
57
  /* istanbul ignore else */
61
58
  if (Array.isArray(object.ids)) {
62
59
  andConditions.push({
63
60
  'object.id': { $exists: true, $in: object.ids }
64
61
  });
65
62
  }
66
- // tslint:disable-next-line:no-single-line-block-comment
67
63
  /* istanbul ignore else */
68
64
  if (Array.isArray(object.typeOfs)) {
69
65
  andConditions.push({
70
66
  'object.typeOf': { $exists: true, $in: object.typeOfs }
71
67
  });
72
68
  }
73
- // tslint:disable-next-line:no-single-line-block-comment
74
69
  /* istanbul ignore else */
75
70
  if (object.typeOfGood !== undefined) {
76
- // tslint:disable-next-line:no-single-line-block-comment
77
71
  /* istanbul ignore else */
78
72
  if (Array.isArray(object.typeOfGood.ids)) {
79
73
  andConditions.push({
80
74
  'object.typeOfGood.id': { $exists: true, $in: object.typeOfGood.ids }
81
75
  });
82
76
  }
83
- // tslint:disable-next-line:no-single-line-block-comment
84
77
  /* istanbul ignore else */
85
78
  if (Array.isArray(object.typeOfGood.typeOfs)) {
86
79
  andConditions.push({
@@ -16,7 +16,6 @@ class CategoryCodeRepo {
16
16
  constructor(connection) {
17
17
  this.categoryCodeModel = connection.model(categoryCode_1.modelName, (0, categoryCode_1.createSchema)());
18
18
  }
19
- // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
20
19
  static CREATE_MONGO_CONDITIONS(params) {
21
20
  // const excludeMovieTicketType = true;
22
21
  const andConditions = [];
@@ -40,7 +39,6 @@ class CategoryCodeRepo {
40
39
  // }
41
40
  // });
42
41
  // }
43
- // tslint:disable-next-line:no-single-line-block-comment
44
42
  /* istanbul ignore else */
45
43
  if (params.project !== undefined && params.project !== null) {
46
44
  if (params.project.id !== undefined && params.project.id !== null) {
@@ -63,7 +61,6 @@ class CategoryCodeRepo {
63
61
  // andConditions.push({ _id: { $in: idIn } });
64
62
  andConditions.push({ _id: { $in: idIn.map((id) => new mongoose_1.Types.ObjectId(id)) } });
65
63
  }
66
- // tslint:disable-next-line:no-single-line-block-comment
67
64
  /* istanbul ignore else */
68
65
  if (params.name !== undefined && params.name !== null) {
69
66
  if (typeof params.name.$regex === 'string' && params.name.$regex.length > 0) {
@@ -93,7 +90,6 @@ class CategoryCodeRepo {
93
90
  if (Array.isArray(codeValueIn)) {
94
91
  andConditions.push({ codeValue: { $in: codeValueIn } });
95
92
  }
96
- // tslint:disable-next-line:no-single-line-block-comment
97
93
  /* istanbul ignore else */
98
94
  if (params.inCodeSet !== undefined && params.inCodeSet !== null) {
99
95
  if (params.inCodeSet.identifier !== undefined && params.inCodeSet.identifier !== null) {
@@ -218,7 +214,6 @@ class CategoryCodeRepo {
218
214
  query.limit(params.limit)
219
215
  .skip(params.limit * (page - 1));
220
216
  }
221
- // tslint:disable-next-line:no-single-line-block-comment
222
217
  /* istanbul ignore else */
223
218
  if (params.sort !== undefined) {
224
219
  query.sort(params.sort);
@@ -58,7 +58,6 @@ class CommentRepo {
58
58
  query.limit(params.limit)
59
59
  .skip(params.limit * (page - 1));
60
60
  }
61
- // tslint:disable-next-line:no-single-line-block-comment
62
61
  /* istanbul ignore else */
63
62
  if (params.sort?.dateCreated !== undefined) {
64
63
  query.sort({ dateCreated: params.sort.dateCreated });
@@ -7,7 +7,6 @@ const moment = require("moment-timezone");
7
7
  const fpe2Module = require("node-fpe");
8
8
  // 型定義が新しいtypescriptに適合しないので、強制的に型変更
9
9
  const fpe2 = fpe2Module;
10
- // tslint:disable-next-line:no-require-imports no-var-requires
11
10
  // const fpe = require('node-fpe-v1');
12
11
  const transactionNumber_1 = require("./mongoose/schemas/transactionNumber");
13
12
  const transactionNumberCounter_1 = require("./transactionNumberCounter");
@@ -49,7 +48,6 @@ class ConfirmationNumberRepo {
49
48
  static count2confirmationNumber(params) {
50
49
  // 桁数調整
51
50
  const rawBody = ConfirmationNumberRepo.alignDigits(params.count);
52
- // tslint:disable-next-line:no-magic-numbers
53
51
  const saltDigit = (0, crypto_1.randomInt)(0, 10);
54
52
  const saltStr = saltDigit.toString();
55
53
  const cipher = fpe2({ secret: `${saltStr}` });
@@ -67,7 +65,6 @@ class ConfirmationNumberRepo {
67
65
  // const useMongoBySettings = await this.useMongoBySettings(params);
68
66
  // データ保管期間はとりあえず2 months
69
67
  dataFeedExpires = moment(params.orderDate)
70
- // tslint:disable-next-line:no-magic-numbers
71
68
  .add(2, 'months')
72
69
  .toDate();
73
70
  incrReply = await this.counterRepo.incrementByMongo({
@@ -77,7 +74,6 @@ class ConfirmationNumberRepo {
77
74
  });
78
75
  return ConfirmationNumberRepo.count2confirmationNumber({ count: incrReply });
79
76
  }
80
- // tslint:disable-next-line:prefer-function-over-method
81
77
  async decrypt(id) {
82
78
  const cipher = fpe2({ secret: id[0] });
83
79
  return cipher.decrypt(id.slice(1));