@chevre/domain 28.2.0-alpha.2 → 28.2.0-alpha.4

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 (88) hide show
  1. package/lib/chevre/repo/action/inform.d.ts +2 -1
  2. package/lib/chevre/repo/action/update.d.ts +2 -1
  3. package/lib/chevre/repo/action/use.d.ts +2 -1
  4. package/lib/chevre/repo/additionalProperty.d.ts +4 -2
  5. package/lib/chevre/repo/additionalProperty.js +6 -7
  6. package/lib/chevre/repo/adminAction.d.ts +3 -2
  7. package/lib/chevre/repo/adminAssetTransaction.d.ts +3 -2
  8. package/lib/chevre/repo/adminAsyncAction.d.ts +3 -2
  9. package/lib/chevre/repo/adminCheckMovieTicketAction.d.ts +2 -1
  10. package/lib/chevre/repo/adminEvent.d.ts +13 -11
  11. package/lib/chevre/repo/adminEvent.js +1 -2
  12. package/lib/chevre/repo/adminEventSeries.d.ts +5 -3
  13. package/lib/chevre/repo/adminEventSeries.js +1 -1
  14. package/lib/chevre/repo/adminPaymentServiceChannel.d.ts +2 -1
  15. package/lib/chevre/repo/adminPendingReservation.d.ts +4 -3
  16. package/lib/chevre/repo/adminScheduledTask.d.ts +3 -2
  17. package/lib/chevre/repo/adminTask.d.ts +5 -4
  18. package/lib/chevre/repo/aggregateOffer.d.ts +8 -7
  19. package/lib/chevre/repo/aggregateOffer.js +6 -8
  20. package/lib/chevre/repo/assetTransaction.d.ts +10 -8
  21. package/lib/chevre/repo/assetTransaction.js +3 -1
  22. package/lib/chevre/repo/authorization.d.ts +5 -3
  23. package/lib/chevre/repo/categoryCode.d.ts +5 -4
  24. package/lib/chevre/repo/categoryCode.js +0 -1
  25. package/lib/chevre/repo/creativeWork.d.ts +7 -6
  26. package/lib/chevre/repo/creativeWork.js +8 -9
  27. package/lib/chevre/repo/customer.d.ts +3 -2
  28. package/lib/chevre/repo/customerType.d.ts +5 -4
  29. package/lib/chevre/repo/emailMessage.d.ts +5 -2
  30. package/lib/chevre/repo/emailMessage.js +10 -8
  31. package/lib/chevre/repo/event.d.ts +4 -2
  32. package/lib/chevre/repo/eventOffer.d.ts +6 -5
  33. package/lib/chevre/repo/eventSellerMakesOffer.d.ts +3 -2
  34. package/lib/chevre/repo/eventSeries.d.ts +4 -2
  35. package/lib/chevre/repo/factory/action/createMongoConditions.d.ts +1 -1
  36. package/lib/chevre/repo/factory/reservation/createMongoConditions.d.ts +3 -2
  37. package/lib/chevre/repo/identity.d.ts +3 -2
  38. package/lib/chevre/repo/identityProvider.d.ts +3 -2
  39. package/lib/chevre/repo/issuer.d.ts +3 -2
  40. package/lib/chevre/repo/issuer.js +6 -7
  41. package/lib/chevre/repo/member.d.ts +6 -5
  42. package/lib/chevre/repo/merchantReturnPolicy.d.ts +6 -4
  43. package/lib/chevre/repo/merchantReturnPolicy.js +12 -10
  44. package/lib/chevre/repo/message.d.ts +4 -3
  45. package/lib/chevre/repo/message.js +1 -2
  46. package/lib/chevre/repo/mongoose/schemas/order.d.ts +5 -1
  47. package/lib/chevre/repo/mongoose/types.d.ts +2 -0
  48. package/lib/chevre/repo/mongoose/types.js +2 -0
  49. package/lib/chevre/repo/movieTicketType.d.ts +2 -1
  50. package/lib/chevre/repo/movieTicketType.js +0 -4
  51. package/lib/chevre/repo/note.d.ts +6 -4
  52. package/lib/chevre/repo/note.js +4 -1
  53. package/lib/chevre/repo/noteAboutOrder.d.ts +6 -4
  54. package/lib/chevre/repo/noteAboutOrder.js +1 -1
  55. package/lib/chevre/repo/offerCatalog.d.ts +5 -4
  56. package/lib/chevre/repo/offerCatalog.js +8 -6
  57. package/lib/chevre/repo/offerCatalogItem.d.ts +4 -3
  58. package/lib/chevre/repo/offerCatalogItem.js +9 -7
  59. package/lib/chevre/repo/offerItemCondition.d.ts +1 -1
  60. package/lib/chevre/repo/offerItemCondition.js +7 -8
  61. package/lib/chevre/repo/order.d.ts +27 -6
  62. package/lib/chevre/repo/paymentService.d.ts +4 -3
  63. package/lib/chevre/repo/paymentServiceProvider.d.ts +4 -2
  64. package/lib/chevre/repo/paymentServiceProvider.js +3 -3
  65. package/lib/chevre/repo/place/entranceGate.d.ts +5 -4
  66. package/lib/chevre/repo/place/movieTheater.d.ts +7 -6
  67. package/lib/chevre/repo/place/movieTheater.js +6 -7
  68. package/lib/chevre/repo/place/screeningRoom.d.ts +7 -6
  69. package/lib/chevre/repo/place/seat.d.ts +5 -4
  70. package/lib/chevre/repo/place/section.d.ts +4 -3
  71. package/lib/chevre/repo/place/section.js +1 -1
  72. package/lib/chevre/repo/potentialAction.d.ts +3 -2
  73. package/lib/chevre/repo/priceSpecification.d.ts +2 -2
  74. package/lib/chevre/repo/priceSpecification.js +1 -1
  75. package/lib/chevre/repo/product.d.ts +7 -6
  76. package/lib/chevre/repo/project.d.ts +4 -3
  77. package/lib/chevre/repo/reservation.d.ts +3 -3
  78. package/lib/chevre/repo/role.d.ts +3 -2
  79. package/lib/chevre/repo/seller.d.ts +4 -3
  80. package/lib/chevre/repo/sellerMakesOffer.d.ts +4 -3
  81. package/lib/chevre/repo/sellerReturnPolicy.d.ts +4 -2
  82. package/lib/chevre/repo/setting.d.ts +4 -3
  83. package/lib/chevre/repo/ticket.d.ts +4 -3
  84. package/lib/chevre/repo/transaction/placeOrder.d.ts +16 -2
  85. package/lib/chevre/repo/transactionNumberCounter.js +1 -1
  86. package/lib/chevre/repo/webSite.d.ts +5 -3
  87. package/lib/chevre/repo/webSite.js +1 -1
  88. package/package.json +2 -2
@@ -1,4 +1,5 @@
1
- import { Connection, FilterQuery } from 'mongoose';
1
+ import { Connection } from 'mongoose';
2
+ import type { FilterQuery } from '../mongoose/types';
2
3
  import { factory } from '../../factory';
3
4
  import { IDocType } from '../mongoose/schemas/action/inform';
4
5
  import { DedicatedActionProcessRepo } from './dedicatedAction/dedicatedActionProcess';
@@ -1,4 +1,5 @@
1
- import { Connection, FilterQuery } from 'mongoose';
1
+ import { Connection } from 'mongoose';
2
+ import type { FilterQuery } from '../mongoose/types';
2
3
  import { factory } from '../../factory';
3
4
  import { IDocType } from '../mongoose/schemas/action/update';
4
5
  import { DedicatedActionProcessRepo } from './dedicatedAction/dedicatedActionProcess';
@@ -1,4 +1,5 @@
1
- import { Connection, FilterQuery } from 'mongoose';
1
+ import { Connection } from 'mongoose';
2
+ import type { FilterQuery } from '../mongoose/types';
2
3
  import { factory } from '../../factory';
3
4
  import { IDocType } from '../mongoose/schemas/action/use';
4
5
  import { DedicatedActionProcessRepo } from './dedicatedAction/dedicatedActionProcess';
@@ -1,5 +1,7 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
4
+ import { IDocType } from './mongoose/schemas/additionalProperty';
3
5
  type IKeyOfProjection = keyof factory.additionalProperty.IAdditionalProperty;
4
6
  /**
5
7
  * 追加特性リポジトリ
@@ -7,7 +9,7 @@ type IKeyOfProjection = keyof factory.additionalProperty.IAdditionalProperty;
7
9
  export declare class AdditionalPropertyRepo {
8
10
  private readonly additionalPropertyModel;
9
11
  constructor(connection: Connection);
10
- static CREATE_MONGO_CONDITIONS(params: factory.additionalProperty.ISearchConditions): FilterQuery<factory.additionalProperty.IAdditionalProperty>[];
12
+ static CREATE_MONGO_CONDITIONS(params: factory.additionalProperty.ISearchConditions): FilterQuery<IDocType>[];
11
13
  /**
12
14
  * 検索
13
15
  */
@@ -89,21 +89,20 @@ class AdditionalPropertyRepo {
89
89
  }
90
90
  async save(params) {
91
91
  let savedId;
92
- let doc;
93
92
  if (typeof params.id !== 'string') {
94
93
  const { id, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
95
- doc = await this.additionalPropertyModel.create(createParams);
96
- savedId = doc.id;
94
+ const createdDoc = await this.additionalPropertyModel.create(createParams);
95
+ savedId = createdDoc.id;
97
96
  }
98
97
  else {
99
98
  const { id, codeValue, inCodeSet, project, typeOf, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
100
- doc = await this.additionalPropertyModel.findOneAndUpdate({ _id: { $eq: params.id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
99
+ const doc = await this.additionalPropertyModel.findOneAndUpdate({ _id: { $eq: params.id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
101
100
  .exec();
101
+ if (doc === null) {
102
+ throw new factory_1.factory.errors.NotFound(this.additionalPropertyModel.modelName);
103
+ }
102
104
  savedId = params.id;
103
105
  }
104
- if (doc === null) {
105
- throw new factory_1.factory.errors.NotFound(this.additionalPropertyModel.modelName);
106
- }
107
106
  return { id: savedId };
108
107
  }
109
108
  /**
@@ -1,4 +1,5 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
4
  import type { IDocType } from './mongoose/schemas/action';
4
5
  import { IKeyOfProjection, IAction, IActionRecipe, ActionProcessRepo } from './action/anyAction/actionProcess';
@@ -87,7 +88,7 @@ export declare class AdminActionRepo extends ActionProcessRepo<IAction<Startable
87
88
  __v: number;
88
89
  }) | null>;
89
90
  unsetUnnecessaryFields(params: {
90
- filter: FilterQuery<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>>;
91
+ filter: FilterQuery<IDocType>;
91
92
  $unset: any;
92
93
  }): Promise<import("mongoose").UpdateWriteOpResult>;
93
94
  }
@@ -1,4 +1,5 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { IDocType } from './mongoose/schemas/assetTransaction';
3
4
  import { factory } from '../factory';
4
5
  type AvailableAssetTransactionType = factory.assetTransactionType.CancelReservation | factory.assetTransactionType.Pay | factory.assetTransactionType.Refund | factory.assetTransactionType.Reserve;
@@ -8,7 +9,7 @@ type AvailableAssetTransactionType = factory.assetTransactionType.CancelReservat
8
9
  export declare class AdminAssetTransactionRepo {
9
10
  private readonly transactionModel;
10
11
  constructor(connection: Connection);
11
- static CREATE_MONGO_CONDITIONS(params: factory.assetTransaction.ISearchConditions<factory.assetTransactionType>): FilterQuery<import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction>[];
12
+ static CREATE_MONGO_CONDITIONS(params: factory.assetTransaction.ISearchConditions<factory.assetTransactionType>): FilterQuery<IDocType>[];
12
13
  countPotentiallyExportTasks(params: {
13
14
  endDate: {
14
15
  $lt: Date;
@@ -1,4 +1,5 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
4
  import { IDocType } from './mongoose/schemas/asyncAction';
4
5
  import type { IExecutableTask } from '../taskSettings';
@@ -11,7 +12,7 @@ type IFindParams = Pick<factory.task.ISearchConditions, 'id' | 'name' | 'project
11
12
  export declare class AdminAsyncActionRepo {
12
13
  private readonly asyncActionModel;
13
14
  constructor(connection: Connection);
14
- static CREATE_MONGO_CONDITIONS(params: Pick<IFindParams, 'id' | 'name' | 'project' | 'runsFrom' | 'runsThrough' | 'status'>): FilterQuery<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask>[];
15
+ static CREATE_MONGO_CONDITIONS(params: Pick<IFindParams, 'id' | 'name' | 'project' | 'runsFrom' | 'runsThrough' | 'status'>): FilterQuery<IDocType>[];
15
16
  findAsyncActions(params: IFindParams, inclusion: IKeyOfProjection[]): Promise<(IDocType & {
16
17
  id: string;
17
18
  })[]>;
@@ -1,4 +1,5 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
4
  import { IDocType } from './mongoose/schemas/action/checkMovieTicket';
4
5
  type IAction = IDocType & {
@@ -1,5 +1,7 @@
1
- import { Connection, FilterQuery, mongo } from 'mongoose';
1
+ import { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
4
+ import { IDocType, IModel } from './mongoose/schemas/event';
3
5
  export interface IAttributes4patchUpdate {
4
6
  typeOf: factory.eventType.ScreeningEvent;
5
7
  eventStatus?: factory.eventStatusType;
@@ -47,7 +49,7 @@ export declare class AdminEventRepo {
47
49
  */
48
50
  update: boolean;
49
51
  }): Promise<{
50
- bulkWriteResult?: mongo.BulkWriteResult;
52
+ bulkWriteResult?: Awaited<ReturnType<IModel['bulkWrite']>>;
51
53
  modifiedEvents: {
52
54
  id: string;
53
55
  }[];
@@ -118,7 +120,7 @@ export declare class AdminEventRepo {
118
120
  organizer: {
119
121
  id: string;
120
122
  };
121
- }): Promise<mongo.DeleteResult>;
123
+ }): Promise<import("mongodb").DeleteResult>;
122
124
  deleteManyEventsByScreeningRoom(params: {
123
125
  project: {
124
126
  id: string;
@@ -135,7 +137,7 @@ export declare class AdminEventRepo {
135
137
  id: string;
136
138
  };
137
139
  };
138
- }): Promise<mongo.DeleteResult>;
140
+ }): Promise<import("mongodb").DeleteResult>;
139
141
  deleteManyBySuperEventId(params: {
140
142
  project: {
141
143
  id: string;
@@ -143,7 +145,7 @@ export declare class AdminEventRepo {
143
145
  superEvent: {
144
146
  id: string;
145
147
  };
146
- }): Promise<mongo.DeleteResult>;
148
+ }): Promise<import("mongodb").DeleteResult>;
147
149
  deleteManyBySuperEventLocationId(params: {
148
150
  project: {
149
151
  id: string;
@@ -153,7 +155,7 @@ export declare class AdminEventRepo {
153
155
  id: string;
154
156
  };
155
157
  };
156
- }): Promise<mongo.DeleteResult>;
158
+ }): Promise<import("mongodb").DeleteResult>;
157
159
  /**
158
160
  * 興行(プロダクト)から削除する
159
161
  */
@@ -168,7 +170,7 @@ export declare class AdminEventRepo {
168
170
  };
169
171
  };
170
172
  };
171
- }): Promise<mongo.DeleteResult>;
173
+ }): Promise<import("mongodb").DeleteResult>;
172
174
  deleteManyEventsEndedByProject(params: {
173
175
  project: {
174
176
  id: string;
@@ -176,12 +178,12 @@ export declare class AdminEventRepo {
176
178
  endDate: {
177
179
  $lte: Date;
178
180
  };
179
- }): Promise<mongo.DeleteResult>;
181
+ }): Promise<import("mongodb").DeleteResult>;
180
182
  deleteManyEventsEnded(params: {
181
183
  endDate: {
182
184
  $lte: Date;
183
185
  };
184
- }): Promise<mongo.DeleteResult>;
186
+ }): Promise<import("mongodb").DeleteResult>;
185
187
  deleteByProject(params: {
186
188
  project: {
187
189
  id: string;
@@ -193,7 +195,7 @@ export declare class AdminEventRepo {
193
195
  updateAggregationById(params: {
194
196
  id: string;
195
197
  }, update: IUpdateAggregateReservationParams): Promise<void>;
196
- bulkWrite(bulkWriteOps: any[]): Promise<mongo.BulkWriteResult & {
198
+ bulkWrite(bulkWriteOps: any[]): Promise<import("mongodb").BulkWriteResult & {
197
199
  mongoose?: {
198
200
  validationErrors: import("mongoose").Error[];
199
201
  } | undefined;
@@ -223,7 +225,7 @@ export declare class AdminEventRepo {
223
225
  __v: number;
224
226
  }) | null>;
225
227
  unsetUnnecessaryFields(params: {
226
- filter: FilterQuery<factory.event.screeningEvent.IEvent>;
228
+ filter: FilterQuery<IDocType>;
227
229
  $unset: IUnset;
228
230
  }): Promise<import("mongoose").UpdateWriteOpResult>;
229
231
  }
@@ -124,7 +124,7 @@ class AdminEventRepo {
124
124
  const bulkWriteResult = await this.eventModel.bulkWrite(bulkWriteOps, { ordered: false });
125
125
  // update:falseの場合、upsertedIdsのみmodifiedEventsとして返せばよい(2026-01-16~)
126
126
  if (!update) {
127
- // BulkWriteResult -> upsertedIds: { '0': '7iri6p4m54k0r3g' }
127
+ // bulkWriteResult -> upsertedIds: { '0': '7iri6p4m54k0r3g' }
128
128
  return {
129
129
  bulkWriteResult,
130
130
  modifiedEvents: Object.values(bulkWriteResult.upsertedIds)
@@ -148,7 +148,6 @@ class AdminEventRepo {
148
148
  * イベント部分更新
149
149
  */
150
150
  async updatePartiallyById(params) {
151
- // let doc: Document | null;
152
151
  const { typeOf, ...updateFields } = params.attributes;
153
152
  if (typeof typeOf !== 'string' || typeOf.length === 0) {
154
153
  throw new factory_1.factory.errors.ArgumentNull('attributes.typeOf');
@@ -1,5 +1,7 @@
1
- import type { Connection, FilterQuery, mongo } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
4
+ import { IDocType, IModel } from './mongoose/schemas/eventSeries';
3
5
  type IUnset = {
4
6
  [key in keyof factory.eventSeries.IEvent]?: 1;
5
7
  };
@@ -22,7 +24,7 @@ export declare class AdminEventSeriesRepo {
22
24
  */
23
25
  upsert: boolean;
24
26
  }): Promise<{
25
- bulkWriteResult?: mongo.BulkWriteResult;
27
+ bulkWriteResult?: Awaited<ReturnType<IModel['bulkWrite']>>;
26
28
  modifiedEvents: {
27
29
  id: string;
28
30
  }[];
@@ -60,7 +62,7 @@ export declare class AdminEventSeriesRepo {
60
62
  __v: number;
61
63
  }) | null>;
62
64
  unsetUnnecessaryFields(params: {
63
- filter: FilterQuery<factory.eventSeries.IEvent>;
65
+ filter: FilterQuery<IDocType>;
64
66
  $unset: IUnset;
65
67
  }): Promise<import("mongoose").UpdateWriteOpResult>;
66
68
  }
@@ -75,7 +75,7 @@ class AdminEventSeriesRepo {
75
75
  const bulkWriteResult = await this.eventSeriesModel.bulkWrite(bulkWriteOps, { ordered: false });
76
76
  // upsert:falseの場合、upsertedIdsのみmodifiedEventsとして返せばよい(2026-01-27~)
77
77
  if (!upsert) {
78
- // BulkWriteResult -> upsertedIds: { '0': '7iri6p4m54k0r3g' }
78
+ // bulkWriteResult -> upsertedIds: { '0': '7iri6p4m54k0r3g' }
79
79
  return {
80
80
  bulkWriteResult,
81
81
  modifiedEvents: Object.values(bulkWriteResult.upsertedIds)
@@ -1,4 +1,5 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
4
  import { IDocType } from './mongoose/schemas/paymentServiceChannel';
4
5
  export type ISavingChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'project' | 'providesService' | 'serviceUrl' | 'typeOf'> & {
@@ -1,5 +1,6 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
2
- import { IReservationPackage, ISubReservation } from './mongoose/schemas/pendingReservation';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
3
+ import { IDocType, IReservationPackage, ISubReservation } from './mongoose/schemas/pendingReservation';
3
4
  interface ISearchConditions {
4
5
  limit?: number;
5
6
  page?: number;
@@ -37,7 +38,7 @@ type IProjectSubReservationResult = Pick<ISubReservation, 'identifier'> & {
37
38
  export declare class AdminPendingReservationRepo {
38
39
  private readonly pendingReservationModel;
39
40
  constructor(connection: Connection);
40
- static CREATE_FILTER_QUERY(params: ISearchConditions): FilterQuery<IReservationPackage>[];
41
+ static CREATE_FILTER_QUERY(params: ISearchConditions): FilterQuery<IDocType>[];
41
42
  findPendingReservations(params: ISearchConditions): Promise<IProjectFieldResult[]>;
42
43
  projectSubReservationByReservationNumber(params: {
43
44
  project: {
@@ -1,4 +1,5 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
4
  import { IDocType } from './mongoose/schemas/scheduledTasks';
4
5
  type IKeyOfProjection = keyof IDocType;
@@ -9,7 +10,7 @@ type IFindParams = Pick<factory.task.ISearchConditions, 'id' | 'name' | 'project
9
10
  export declare class AdminScheduledTaskRepo {
10
11
  private readonly scheduledTaskModel;
11
12
  constructor(connection: Connection);
12
- static CREATE_MONGO_CONDITIONS(params: Pick<IFindParams, 'id' | 'name' | 'project' | 'runsFrom' | 'runsThrough' | 'status'>): FilterQuery<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask>[];
13
+ static CREATE_MONGO_CONDITIONS(params: Pick<IFindParams, 'id' | 'name' | 'project' | 'runsFrom' | 'runsThrough' | 'status'>): FilterQuery<IDocType>[];
13
14
  /**
14
15
  * 検索する
15
16
  */
@@ -1,4 +1,5 @@
1
- import type { AnyKeys, Connection, FilterQuery, ProjectionType } from 'mongoose';
1
+ import type { AnyKeys, Connection, ProjectionType } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
4
  import { IDocType } from './mongoose/schemas/task';
4
5
  type IKeyOfProjection = keyof factory.task.ITask<factory.taskName>;
@@ -13,7 +14,7 @@ type IFindParams = factory.task.ISearchConditions & {
13
14
  export declare class AdminTaskRepo {
14
15
  private readonly taskModel;
15
16
  constructor(connection: Connection);
16
- static CREATE_MONGO_CONDITIONS(params: IFindParams): FilterQuery<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask>[];
17
+ static CREATE_MONGO_CONDITIONS(params: IFindParams): FilterQuery<IDocType>[];
17
18
  countTasks(params: IFindParams): Promise<{
18
19
  count: number;
19
20
  }>;
@@ -33,7 +34,7 @@ export declare class AdminTaskRepo {
33
34
  }): Promise<{
34
35
  count: number;
35
36
  }>;
36
- getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "identifier" | "name" | "description" | "project" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
37
+ getCursor(conditions: FilterQuery<IDocType>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "identifier" | "name" | "description" | "project" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
37
38
  expires?: never;
38
39
  } & {
39
40
  _id: import("mongoose").Types.ObjectId;
@@ -47,7 +48,7 @@ export declare class AdminTaskRepo {
47
48
  __v: number;
48
49
  }) | null>;
49
50
  unsetUnnecessaryFields(params: {
50
- filter: FilterQuery<factory.task.ITask<factory.taskName>>;
51
+ filter: FilterQuery<IDocType>;
51
52
  $unset: AnyKeys<factory.task.ITask<factory.taskName>>;
52
53
  }): Promise<import("mongoose").UpdateWriteOpResult>;
53
54
  }
@@ -1,6 +1,7 @@
1
- import { AnyExpression, Connection, Document, FilterQuery, PipelineStage, mongo } from 'mongoose';
1
+ import { AnyExpression, Connection, PipelineStage } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
3
- import { IDocType as IAggregateOfferDocType } from './mongoose/schemas/aggregateOffer';
4
+ import { IDocType, IModel } from './mongoose/schemas/aggregateOffer';
4
5
  type IMatchStage = PipelineStage.Match;
5
6
  type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer;
6
7
  type IProjection = Partial<Record<KeyOfUnitPriceOffer, 0 | 1>>;
@@ -54,20 +55,20 @@ export declare class AggregateOfferRepo {
54
55
  };
55
56
  id: string;
56
57
  }): Promise<void>;
57
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, Record<string, never>, IAggregateOfferDocType, import("./mongoose/virtuals").IVirtuals, {}> & IAggregateOfferDocType & Required<{
58
+ getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & Required<{
58
59
  _id: string;
59
60
  }> & {
60
61
  __v: number;
61
- }, import("mongoose").QueryOptions<IAggregateOfferDocType>, (Document<unknown, Record<string, never>, IAggregateOfferDocType, import("./mongoose/virtuals").IVirtuals, {}> & IAggregateOfferDocType & Required<{
62
+ }, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & Required<{
62
63
  _id: string;
63
64
  }> & {
64
65
  __v: number;
65
66
  }) | null>;
66
67
  unsetUnnecessaryFields(params: {
67
- filter: FilterQuery<factory.aggregateOffer.IAggregateOffer>;
68
+ filter: FilterQuery<IDocType>;
68
69
  $unset: any;
69
70
  }): Promise<import("mongoose").UpdateWriteOpResult>;
70
- save(params: factory.unitPriceOffer.IUnitPriceOffer & {}): Promise<{
71
+ saveAggregateOffer(params: factory.unitPriceOffer.IUnitPriceOffer): Promise<{
71
72
  id: string;
72
73
  }>;
73
74
  /**
@@ -79,7 +80,7 @@ export declare class AggregateOfferRepo {
79
80
  */
80
81
  productType: factory.product.ProductType;
81
82
  }): Promise<{
82
- bulkWriteResult?: mongo.BulkWriteResult;
83
+ bulkWriteResult?: Awaited<ReturnType<IModel['bulkWrite']>>;
83
84
  modifiedOffers?: {
84
85
  id: string;
85
86
  }[];
@@ -510,8 +510,7 @@ class AggregateOfferRepo {
510
510
  return this.aggregateOfferModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
511
511
  .exec();
512
512
  }
513
- async save(params) {
514
- let doc;
513
+ async saveAggregateOffer(params) {
515
514
  let aggregateOfferId;
516
515
  const { ...paramsWithoutUnset } = params;
517
516
  if (typeof params.id !== 'string' || params.id.length === 0) {
@@ -525,7 +524,7 @@ class AggregateOfferRepo {
525
524
  project: params.project,
526
525
  offers: [savedUnitPriceOffer]
527
526
  };
528
- doc = await this.aggregateOfferModel.create({
527
+ await this.aggregateOfferModel.create({
529
528
  ...aggregateOffer,
530
529
  _id: newId
531
530
  });
@@ -551,7 +550,7 @@ class AggregateOfferRepo {
551
550
  identifier: originalUnitPriceOffer.identifier,
552
551
  typeOf: originalUnitPriceOffer.typeOf
553
552
  };
554
- doc = await this.aggregateOfferModel.findOneAndUpdate({ _id: params.id }, // _idに変更(2023-12-22~)
553
+ const doc = await this.aggregateOfferModel.findOneAndUpdate({ _id: params.id }, // _idに変更(2023-12-22~)
555
554
  {
556
555
  $set: {
557
556
  'offers.0': subOffer // _idに変更(2023-12-22~)
@@ -561,9 +560,9 @@ class AggregateOfferRepo {
561
560
  new: true
562
561
  })
563
562
  .exec();
564
- }
565
- if (doc === null) {
566
- throw new factory_1.factory.errors.NotFound(this.aggregateOfferModel.modelName);
563
+ if (doc === null) {
564
+ throw new factory_1.factory.errors.NotFound(this.aggregateOfferModel.modelName);
565
+ }
567
566
  }
568
567
  return { id: aggregateOfferId };
569
568
  }
@@ -574,7 +573,6 @@ class AggregateOfferRepo {
574
573
  const { productType } = options;
575
574
  const { default: uniqid } = await import('uniqid');
576
575
  const insertBulkWriteOps = [];
577
- // const updateBulkWriteOps: AnyBulkWriteOperation<factory.aggregateOffer.IAggregateOffer>[] = [];
578
576
  const queryFilters = [];
579
577
  if (Array.isArray(params)) {
580
578
  params.forEach((p) => {
@@ -1,4 +1,6 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
3
+ import { IDocType } from './mongoose/schemas/assetTransaction';
2
4
  import { factory } from '../factory';
3
5
  type IKeyOfProjection<T extends factory.assetTransactionType> = keyof Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'agent' | 'endDate' | 'expires' | 'project' | 'startDate' | 'status' | 'typeOf' | 'transactionNumber'> | Exclude<keyof factory.assetTransaction.ITransaction<T>, 'id'>;
4
6
  type AvailableAssetTransactionType = factory.assetTransactionType.CancelReservation | factory.assetTransactionType.Pay | factory.assetTransactionType.Refund | factory.assetTransactionType.Reserve;
@@ -9,17 +11,17 @@ type IFindParams<T extends factory.assetTransactionType> = T extends factory.ass
9
11
  export declare class AssetTransactionRepo {
10
12
  private readonly transactionModel;
11
13
  constructor(connection: Connection);
12
- static CREATE_MONGO_CONDITIONS(params: IFindParams<factory.assetTransactionType>): FilterQuery<import("@chevre/factory/lib/chevre/assetTransaction/cancelReservation").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/pay").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/refund").ITransaction | import("@chevre/factory/lib/chevre/assetTransaction/reserve").ITransaction>[];
14
+ static CREATE_MONGO_CONDITIONS(params: IFindParams<factory.assetTransactionType>): FilterQuery<IDocType>[];
13
15
  /**
14
16
  * 取引を開始する
15
17
  */
16
- start<T extends factory.assetTransactionType>(params: factory.assetTransaction.IStartParams<T>): Promise<factory.assetTransaction.ITransaction<T>>;
18
+ start<T extends AvailableAssetTransactionType>(params: factory.assetTransaction.IStartParams<T>): Promise<factory.assetTransaction.ITransaction<T>>;
17
19
  startWithMinimalResponse<T extends factory.assetTransactionType>(params: factory.assetTransaction.IStartParams<T>): Promise<Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType>, 'id' | 'startDate'>>;
18
- findById<T extends factory.assetTransactionType>(params: {
20
+ findById<T extends AvailableAssetTransactionType>(params: {
19
21
  typeOf: T;
20
22
  id: string;
21
23
  }, inclusion?: IKeyOfProjection<T>[]): Promise<factory.assetTransaction.ITransaction<T>>;
22
- findByTransactionNumber<T extends factory.assetTransactionType>(params: {
24
+ findByTransactionNumber<T extends AvailableAssetTransactionType>(params: {
23
25
  typeOf: T;
24
26
  transactionNumber: string;
25
27
  }, inclusion?: IKeyOfProjection<T>[]): Promise<factory.assetTransaction.ITransaction<T>>;
@@ -31,7 +33,7 @@ export declare class AssetTransactionRepo {
31
33
  /**
32
34
  * 取引を確定する
33
35
  */
34
- confirm<T extends factory.assetTransactionType>(params: {
36
+ confirm<T extends AvailableAssetTransactionType>(params: {
35
37
  typeOf: T;
36
38
  id: string;
37
39
  object?: Pick<factory.assetTransaction.reserve.IObject, 'underName'> & {
@@ -85,7 +87,7 @@ export declare class AssetTransactionRepo {
85
87
  /**
86
88
  * 取引を中止する
87
89
  */
88
- cancel<T extends factory.assetTransactionType>(params: {
90
+ cancel<T extends AvailableAssetTransactionType>(params: {
89
91
  typeOf: T;
90
92
  id?: string;
91
93
  transactionNumber?: string;
@@ -111,7 +113,7 @@ export declare class AssetTransactionRepo {
111
113
  id: string;
112
114
  };
113
115
  transactionNumbers: string[];
114
- typeOf: factory.assetTransactionType;
116
+ typeOf: AvailableAssetTransactionType;
115
117
  }): Promise<{
116
118
  n?: number;
117
119
  ok?: number;
@@ -489,7 +489,9 @@ class AssetTransactionRepo {
489
489
  result = { id: transaction.id };
490
490
  }
491
491
  else {
492
- result = { id: doc.toObject().id };
492
+ result = {
493
+ id: doc.toObject().id
494
+ };
493
495
  }
494
496
  assetTransaction_2.assetTransactionEventEmitter.emitAssetTransactionStatusChanged({
495
497
  id: result.id,
@@ -1,5 +1,7 @@
1
- import type { Connection, FilterQuery } from 'mongoose';
1
+ import type { Connection } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { factory } from '../factory';
4
+ import { IDocType } from './mongoose/schemas/authorization';
3
5
  type IFindValidOneResult = Pick<factory.authorization.IAuthorization, 'object' | 'typeOf' | 'audience' | 'issuedBy'> & {
4
6
  id: string;
5
7
  };
@@ -14,7 +16,7 @@ type IKeyOfProjection = keyof factory.authorization.IAuthorization;
14
16
  export declare class AuthorizationRepo {
15
17
  private readonly authorizationModel;
16
18
  constructor(connection: Connection);
17
- static CREATE_MONGO_CONDITIONS(params: factory.authorization.ISearchConditions): FilterQuery<factory.authorization.IAuthorization>[];
19
+ static CREATE_MONGO_CONDITIONS(params: factory.authorization.ISearchConditions): FilterQuery<IDocType>[];
18
20
  /**
19
21
  * 承認を発行する
20
22
  * コードが自動生成されます
@@ -42,7 +44,7 @@ export declare class AuthorizationRepo {
42
44
  id: string;
43
45
  })[]>;
44
46
  unsetUnnecessaryFields(params: {
45
- filter: FilterQuery<factory.authorization.IAuthorization>;
47
+ filter: FilterQuery<IDocType>;
46
48
  $unset: any;
47
49
  }): Promise<import("mongoose").UpdateWriteOpResult>;
48
50
  /**
@@ -1,4 +1,5 @@
1
- import { AnyExpression, Connection, FilterQuery, Types } from 'mongoose';
1
+ import { AnyExpression, Connection, Types } from 'mongoose';
2
+ import type { FilterQuery } from './mongoose/types';
2
3
  import { IDocType } from './mongoose/schemas/categoryCode';
3
4
  import { factory } from '../factory';
4
5
  type IUnset = {
@@ -14,7 +15,7 @@ type IKeyOfProjectionExceptMovieTicketType = keyof ICategoryCodeExceptMovieTicke
14
15
  export declare class CategoryCodeRepo {
15
16
  private readonly categoryCodeModel;
16
17
  constructor(connection: Connection);
17
- static CREATE_MONGO_CONDITIONS(params: factory.categoryCode.ISearchConditions): FilterQuery<factory.categoryCode.ICategoryCode>[];
18
+ static CREATE_MONGO_CONDITIONS(params: factory.categoryCode.ISearchConditions): FilterQuery<IDocType>[];
18
19
  static CREATE_AGGREGATE_PROJECTION(inclusion: IKeyOfProjection[]): Record<string, AnyExpression>;
19
20
  /**
20
21
  * 区分集計検索(publicな属性検索が目的)
@@ -65,7 +66,7 @@ export declare class CategoryCodeRepo {
65
66
  id: string;
66
67
  };
67
68
  }): Promise<void>;
68
- getCursor(conditions: FilterQuery<factory.categoryCode.ICategoryCode>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
69
+ getCursor(conditions: FilterQuery<IDocType>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
69
70
  _id: Types.ObjectId;
70
71
  } & {
71
72
  __v: number;
@@ -75,7 +76,7 @@ export declare class CategoryCodeRepo {
75
76
  __v: number;
76
77
  }) | null>;
77
78
  unsetUnnecessaryFields(params: {
78
- filter: FilterQuery<factory.categoryCode.ICategoryCode>;
79
+ filter: FilterQuery<IDocType>;
79
80
  $unset: any;
80
81
  }): Promise<import("mongoose").UpdateWriteOpResult>;
81
82
  }
@@ -203,7 +203,6 @@ class CategoryCodeRepo {
203
203
  }
204
204
  async saveCategoryCode(params) {
205
205
  let savedId;
206
- // let doc: HydratedDocument<{ _id: Types.ObjectId }> | null;
207
206
  if (typeof params.id !== 'string') {
208
207
  const { id, $unset, ...creatingDoc } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
209
208
  const createResult = await this.categoryCodeModel.create(creatingDoc);