@chevre/domain 22.2.0-alpha.21 → 22.2.0-alpha.23

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 (169) hide show
  1. package/example/src/chevre/createProject.ts +19 -0
  2. package/example/src/chevre/migrateDeleteTransactionTasks.ts +1 -1
  3. package/example/src/chevre/projectFields.ts +6 -7
  4. package/example/src/chevre/{projectEventFieldsById.ts → projectFieldsById.ts} +6 -11
  5. package/example/src/chevre/searchTransactions.ts +1 -1
  6. package/example/src/chevre/unsetUnnecessaryFields.ts +2 -15
  7. package/lib/chevre/repo/accountTitle.d.ts +9 -3
  8. package/lib/chevre/repo/accountingReport.d.ts +2 -15
  9. package/lib/chevre/repo/action.d.ts +55 -3
  10. package/lib/chevre/repo/aggregateReservation.d.ts +1 -14
  11. package/lib/chevre/repo/assetTransaction.d.ts +134 -7
  12. package/lib/chevre/repo/assetTransaction.js +2 -2
  13. package/lib/chevre/repo/categoryCode.d.ts +4 -0
  14. package/lib/chevre/repo/categoryCode.js +6 -0
  15. package/lib/chevre/repo/comment.d.ts +5 -1
  16. package/lib/chevre/repo/creativeWork.d.ts +14 -2
  17. package/lib/chevre/repo/customer.d.ts +5 -1
  18. package/lib/chevre/repo/customerType.d.ts +1 -1
  19. package/lib/chevre/repo/event.d.ts +49 -2
  20. package/lib/chevre/repo/member.d.ts +5 -1
  21. package/lib/chevre/repo/merchantReturnPolicy.d.ts +22 -2
  22. package/lib/chevre/repo/message.d.ts +1 -15
  23. package/lib/chevre/repo/mongoose/schemas/account.d.ts +8 -3
  24. package/lib/chevre/repo/mongoose/schemas/account.js +1 -1
  25. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +8 -3
  26. package/lib/chevre/repo/mongoose/schemas/accountTitle.js +2 -2
  27. package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +8 -3
  28. package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +1 -1
  29. package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +22 -3
  30. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +1 -1
  31. package/lib/chevre/repo/mongoose/schemas/action.d.ts +12 -3
  32. package/lib/chevre/repo/mongoose/schemas/action.js +1 -1
  33. package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +14 -3
  34. package/lib/chevre/repo/mongoose/schemas/actionRecipe.js +2 -5
  35. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +8 -3
  36. package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +12 -12
  37. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +11 -3
  38. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +1 -1
  39. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +22 -3
  40. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +1 -1
  41. package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +7 -3
  42. package/lib/chevre/repo/mongoose/schemas/aggregation.js +2 -1
  43. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +10 -3
  44. package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +1 -1
  45. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +8 -3
  46. package/lib/chevre/repo/mongoose/schemas/authorization.js +1 -1
  47. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +8 -3
  48. package/lib/chevre/repo/mongoose/schemas/categoryCode.js +1 -1
  49. package/lib/chevre/repo/mongoose/schemas/comments.d.ts +8 -3
  50. package/lib/chevre/repo/mongoose/schemas/comments.js +1 -1
  51. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +10 -3
  52. package/lib/chevre/repo/mongoose/schemas/creativeWork.js +2 -2
  53. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +8 -3
  54. package/lib/chevre/repo/mongoose/schemas/customer.js +1 -1
  55. package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +9 -3
  56. package/lib/chevre/repo/mongoose/schemas/customerType.js +1 -1
  57. package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +8 -3
  58. package/lib/chevre/repo/mongoose/schemas/emailMessages.js +1 -1
  59. package/lib/chevre/repo/mongoose/schemas/event.d.ts +19 -3
  60. package/lib/chevre/repo/mongoose/schemas/event.js +1 -1
  61. package/lib/chevre/repo/mongoose/schemas/member.d.ts +8 -3
  62. package/lib/chevre/repo/mongoose/schemas/member.js +1 -1
  63. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +8 -3
  64. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +1 -1
  65. package/lib/chevre/repo/mongoose/schemas/message.d.ts +23 -3
  66. package/lib/chevre/repo/mongoose/schemas/message.js +1 -1
  67. package/lib/chevre/repo/mongoose/schemas/note.d.ts +8 -3
  68. package/lib/chevre/repo/mongoose/schemas/note.js +1 -1
  69. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +12 -3
  70. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +1 -1
  71. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +12 -3
  72. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +1 -1
  73. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +8 -3
  74. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +1 -1
  75. package/lib/chevre/repo/mongoose/schemas/order.d.ts +10 -3
  76. package/lib/chevre/repo/mongoose/schemas/order.js +1 -1
  77. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +10 -3
  78. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +1 -1
  79. package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +10 -3
  80. package/lib/chevre/repo/mongoose/schemas/paymentService.js +1 -1
  81. package/lib/chevre/repo/mongoose/schemas/place.d.ts +16 -3
  82. package/lib/chevre/repo/mongoose/schemas/place.js +1 -1
  83. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +11 -3
  84. package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +1 -1
  85. package/lib/chevre/repo/mongoose/schemas/product.d.ts +12 -3
  86. package/lib/chevre/repo/mongoose/schemas/product.js +1 -1
  87. package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +30 -3
  88. package/lib/chevre/repo/mongoose/schemas/productModel.js +1 -1
  89. package/lib/chevre/repo/mongoose/schemas/project.d.ts +12 -3
  90. package/lib/chevre/repo/mongoose/schemas/project.js +3 -3
  91. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +12 -3
  92. package/lib/chevre/repo/mongoose/schemas/reservation.js +5 -5
  93. package/lib/chevre/repo/mongoose/schemas/role.d.ts +9 -3
  94. package/lib/chevre/repo/mongoose/schemas/role.js +1 -1
  95. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +8 -3
  96. package/lib/chevre/repo/mongoose/schemas/seller.js +1 -1
  97. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +8 -3
  98. package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +1 -1
  99. package/lib/chevre/repo/mongoose/schemas/task.d.ts +8 -3
  100. package/lib/chevre/repo/mongoose/schemas/task.js +1 -1
  101. package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +7 -3
  102. package/lib/chevre/repo/mongoose/schemas/telemetry.js +2 -1
  103. package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +26 -3
  104. package/lib/chevre/repo/mongoose/schemas/ticket.js +1 -1
  105. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +8 -3
  106. package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -2
  107. package/lib/chevre/repo/mongoose/schemas/trip.d.ts +8 -3
  108. package/lib/chevre/repo/mongoose/schemas/trip.js +3 -3
  109. package/lib/chevre/repo/offer.d.ts +13 -4
  110. package/lib/chevre/repo/offerCatalog.d.ts +15 -2
  111. package/lib/chevre/repo/order.d.ts +13 -1
  112. package/lib/chevre/repo/ownershipInfo.d.ts +13 -1
  113. package/lib/chevre/repo/place/movieTheater.d.ts +54 -2
  114. package/lib/chevre/repo/priceSpecification.d.ts +42 -1
  115. package/lib/chevre/repo/product.d.ts +6 -1
  116. package/lib/chevre/repo/productModel.d.ts +1 -22
  117. package/lib/chevre/repo/project.d.ts +21 -1
  118. package/lib/chevre/repo/project.js +2 -2
  119. package/lib/chevre/repo/reservation.d.ts +35 -3
  120. package/lib/chevre/repo/reservation.js +1 -1
  121. package/lib/chevre/repo/role.d.ts +2 -9
  122. package/lib/chevre/repo/role.js +20 -10
  123. package/lib/chevre/repo/seller.d.ts +54 -2
  124. package/lib/chevre/repo/task.d.ts +64 -3
  125. package/lib/chevre/repo/telemetry.d.ts +3 -2
  126. package/lib/chevre/repo/ticket.d.ts +2 -19
  127. package/lib/chevre/repo/transaction.d.ts +30 -14
  128. package/lib/chevre/repo/transaction.js +106 -77
  129. package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +1 -1
  130. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
  131. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +3 -2
  132. package/lib/chevre/service/offer/event/authorize.d.ts +1 -1
  133. package/lib/chevre/service/offer/event/authorize.js +1 -1
  134. package/lib/chevre/service/offer/event/voidTransaction.js +2 -2
  135. package/lib/chevre/service/offer/event/voidTransactionByActionId.js +1 -1
  136. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.d.ts +2 -2
  137. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/factory.d.ts +3 -3
  138. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +2 -2
  139. package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +4 -2
  140. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +1 -1
  141. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
  142. package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +8 -5
  143. package/lib/chevre/service/offer/eventServiceByCOA/validateAcceptedOffers.d.ts +1 -1
  144. package/lib/chevre/service/offer/moneyTransfer/authorize.js +1 -1
  145. package/lib/chevre/service/offer/moneyTransfer/voidTransaction.js +1 -1
  146. package/lib/chevre/service/offer/product.js +2 -2
  147. package/lib/chevre/service/order/findPlaceOrderTransaction.js +1 -1
  148. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
  149. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
  150. package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +1 -1
  151. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
  152. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +1 -1
  153. package/lib/chevre/service/order/returnOrder.js +1 -1
  154. package/lib/chevre/service/payment/any.js +5 -5
  155. package/lib/chevre/service/payment.d.ts +1 -1
  156. package/lib/chevre/service/report/telemetry.js +2 -2
  157. package/lib/chevre/service/task/onResourceUpdated.js +14 -2
  158. package/lib/chevre/service/task/returnPayTransaction.js +1 -1
  159. package/lib/chevre/service/transaction/deleteTransaction.js +2 -2
  160. package/lib/chevre/service/transaction/moneyTransfer.js +3 -3
  161. package/lib/chevre/service/transaction/placeOrder/confirm.js +1 -1
  162. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -1
  163. package/lib/chevre/service/transaction/placeOrder/start.js +1 -1
  164. package/lib/chevre/service/transaction/returnOrder.js +2 -2
  165. package/lib/chevre/service/transaction.js +1 -1
  166. package/package.json +3 -3
  167. package/example/src/chevre/findTransactionById.ts +0 -23
  168. package/example/src/chevre/findTransactionInProgressById.ts +0 -23
  169. package/example/src/chevre/migrateTransactionObjectPaymentMethods.ts +0 -154
@@ -9,13 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.RoleRepo = exports.RoleType = void 0;
13
- const role_1 = require("./mongoose/schemas/role");
12
+ exports.RoleRepo = void 0;
14
13
  const settings_1 = require("../settings");
15
- var RoleType;
16
- (function (RoleType) {
17
- RoleType["OrganizationRole"] = "OrganizationRole";
18
- })(RoleType = exports.RoleType || (exports.RoleType = {}));
14
+ const role_1 = require("./mongoose/schemas/role");
15
+ const AVAILABLE_PROJECT_FIELDS = [
16
+ 'typeOf',
17
+ 'permissions',
18
+ 'roleName'
19
+ ];
19
20
  /**
20
21
  * IAMロールリポジトリ
21
22
  */
@@ -39,10 +40,19 @@ class RoleRepo {
39
40
  }
40
41
  return andConditions;
41
42
  }
42
- search(params) {
43
+ projectFields(params) {
43
44
  return __awaiter(this, void 0, void 0, function* () {
44
45
  const conditions = RoleRepo.CREATE_MONGO_CONDITIONS(params);
45
- const query = this.roleModel.find((conditions.length > 0) ? { $and: conditions } : {}, {});
46
+ const positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
47
+ // if (Array.isArray(inclusion) && inclusion.length > 0) {
48
+ // positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
49
+ // } else {
50
+ // if (Array.isArray(exclusion) && exclusion.length > 0) {
51
+ // positiveProjectionFields = positiveProjectionFields.filter((key) => !exclusion.includes(key));
52
+ // }
53
+ // }
54
+ const projection = Object.assign({ _id: 0 }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
55
+ const query = this.roleModel.find((conditions.length > 0) ? { $and: conditions } : {}, projection);
46
56
  if (typeof params.limit === 'number' && params.limit > 0) {
47
57
  const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
48
58
  query.limit(params.limit)
@@ -56,8 +66,8 @@ class RoleRepo {
56
66
  // const explainResult = await (<any>query).explain();
57
67
  // console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
58
68
  return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
59
- .exec()
60
- .then((docs) => docs.map((doc) => doc.toObject()));
69
+ .lean() // 2024-08-23~
70
+ .exec();
61
71
  });
62
72
  }
63
73
  aggregatePermissions(params) {
@@ -22,7 +22,7 @@
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
27
  export type ISellerWithId = Pick<factory.seller.ISeller, 'additionalProperty' | 'branchCode' | 'hasMerchantReturnPolicy' | 'id' | 'makesOffer' | 'name' | 'project' | 'telephone' | 'typeOf' | 'url'> & {
28
28
  id: string;
@@ -97,7 +97,59 @@ export declare class SellerRepo {
97
97
  id: string;
98
98
  makesOffer: factory.seller.IMakesOffer;
99
99
  }): Promise<void>;
100
- getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<any, QueryOptions<any>>;
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>>>;
101
153
  unsetUnnecessaryFields(params: {
102
154
  filter: any;
103
155
  $unset: any;
@@ -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
- export 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;
@@ -56,4 +40,3 @@ export declare class TicketRepo {
56
40
  issueByTicketToken(params: IIssueParams): Promise<Pick<ITicket, 'id'>>;
57
41
  projectFields(params: ISearchConditions, inclusion: IKeyOfProjection[]): Promise<ITicket[]>;
58
42
  }
59
- export {};
@@ -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?: {