@chevre/domain 24.0.0-alpha.86 → 24.0.0-alpha.88

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 (55) hide show
  1. package/lib/chevre/factory/transaction/placeOrder.d.ts +40 -0
  2. package/lib/chevre/factory/transaction/placeOrder.js +2 -0
  3. package/lib/chevre/factory/transaction.d.ts +1 -44
  4. package/lib/chevre/factory/transaction.js +35 -0
  5. package/lib/chevre/repo/accountingReport.js +2 -2
  6. package/lib/chevre/repo/action/actionProcess.d.ts +3 -2
  7. package/lib/chevre/repo/action/actionProcess.js +3 -2
  8. package/lib/chevre/repo/action.d.ts +1 -1
  9. package/lib/chevre/repo/assetTransaction.js +1 -1
  10. package/lib/chevre/repo/concurrentLock.js +1 -1
  11. package/lib/chevre/repo/emailMessage.js +1 -1
  12. package/lib/chevre/repo/event.js +3 -3
  13. package/lib/chevre/repo/eventSeries.js +1 -1
  14. package/lib/chevre/repo/factory/reservation/minimizeReservationFor.js +2 -1
  15. package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
  16. package/lib/chevre/repo/noteAboutOrder.js +1 -1
  17. package/lib/chevre/repo/offerCatalog.js +2 -2
  18. package/lib/chevre/repo/offerCatalogItem.js +2 -2
  19. package/lib/chevre/repo/offerItemCondition.js +1 -1
  20. package/lib/chevre/repo/ownershipInfo.js +1 -1
  21. package/lib/chevre/repo/place/screeningRoom.d.ts +2 -1
  22. package/lib/chevre/repo/place/screeningRoom.js +2 -1
  23. package/lib/chevre/repo/place/seat.d.ts +2 -1
  24. package/lib/chevre/repo/place/seat.js +2 -1
  25. package/lib/chevre/repo/place/section.d.ts +2 -1
  26. package/lib/chevre/repo/place/section.js +2 -1
  27. package/lib/chevre/repo/priceSpecification.js +1 -1
  28. package/lib/chevre/service/aggregation/event/importFromCOA.js +1 -1
  29. package/lib/chevre/service/assetTransaction/cancelReservation/factory.js +1 -1
  30. package/lib/chevre/service/assetTransaction/reserve/start.js +1 -1
  31. package/lib/chevre/service/delivery/reservation/factory.js +2 -2
  32. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer/authorize.js +4 -4
  33. package/lib/chevre/service/offer/onEventChanged.js +1 -1
  34. package/lib/chevre/service/order/sendOrder.js +2 -1
  35. package/lib/chevre/service/payment/any/processVoidPayTransaction.js +1 -1
  36. package/lib/chevre/service/payment/movieTicket/voidTransaction.js +1 -1
  37. package/lib/chevre/service/reserve/cancelReservation.js +2 -2
  38. package/lib/chevre/service/reserve/confirmReservation.js +2 -2
  39. package/lib/chevre/service/task/checkResource.js +1 -1
  40. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByAggregateOffer.js +1 -1
  41. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByEventSeries.js +1 -1
  42. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByMovieTheater.js +1 -1
  43. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByOfferCatalog.js +1 -1
  44. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByProduct.js +1 -1
  45. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesByRoom.js +1 -1
  46. package/lib/chevre/service/task/onResourceDeleted/deleteResourcesBySeller.js +1 -1
  47. package/lib/chevre/service/task/onResourceUpdated.js +0 -6
  48. package/lib/chevre/service/task/syncResourcesFromCOA.js +2 -2
  49. package/lib/chevre/service/transaction/deleteTransaction.js +1 -0
  50. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +1 -1
  51. package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +1 -1
  52. package/lib/chevre/service/transaction/placeOrder/confirm.js +1 -1
  53. package/lib/chevre/service/transaction/placeOrder/start.d.ts +1 -1
  54. package/lib/chevre/service.js +1 -0
  55. package/package.json +3 -4
@@ -0,0 +1,40 @@
1
+ import { factory } from '../../factory';
2
+ export type IStartParams = factory.transaction.placeOrder.IStartParamsWithoutDetail & {
3
+ broker?: factory.order.IBroker;
4
+ };
5
+ export type IOrderURLGenerator = (order: factory.transaction.placeOrder.IOrderAsResult) => string;
6
+ export type IResultOrderParams = factory.transaction.placeOrder.IResultOrderParams & {
7
+ /**
8
+ * 注文日時
9
+ */
10
+ orderDate: Date;
11
+ /**
12
+ * 注文確認URLのカスタム指定
13
+ */
14
+ url?: string | IOrderURLGenerator;
15
+ /**
16
+ * オファー制約
17
+ */
18
+ numItems: {
19
+ maxValue: number;
20
+ minValue: number;
21
+ /**
22
+ * 最大COA予約数
23
+ */
24
+ maxNumCOAReservationNumbers: number;
25
+ };
26
+ /**
27
+ * 注文アイテム制約
28
+ */
29
+ orderedItem: {
30
+ maxValue: number;
31
+ };
32
+ };
33
+ export type IConfirmParams = factory.transaction.placeOrder.IConfirmParams & {
34
+ project: {
35
+ id: string;
36
+ };
37
+ result: {
38
+ order: IResultOrderParams;
39
+ };
40
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,48 +1,5 @@
1
1
  import { factory } from '../factory';
2
+ export * as PlaceOrderFactory from './transaction/placeOrder';
2
3
  export type IPassportValidator = (params: {
3
4
  passport: factory.waiter.passport.IPassport;
4
5
  }) => boolean;
5
- export declare namespace placeOrder {
6
- type IStartParams = factory.transaction.placeOrder.IStartParamsWithoutDetail & {
7
- broker?: factory.order.IBroker;
8
- };
9
- type IOrderURLGenerator = (order: factory.transaction.placeOrder.IOrderAsResult) => string;
10
- type IResultOrderParams = factory.transaction.placeOrder.IResultOrderParams & {
11
- /**
12
- * 注文日時
13
- */
14
- orderDate: Date;
15
- /**
16
- * 確認番号のカスタム指定
17
- */
18
- /**
19
- * 注文確認URLのカスタム指定
20
- */
21
- url?: string | IOrderURLGenerator;
22
- /**
23
- * オファー制約
24
- */
25
- numItems: {
26
- maxValue: number;
27
- minValue: number;
28
- /**
29
- * 最大COA予約数
30
- */
31
- maxNumCOAReservationNumbers: number;
32
- };
33
- /**
34
- * 注文アイテム制約
35
- */
36
- orderedItem: {
37
- maxValue: number;
38
- };
39
- };
40
- type IConfirmParams = factory.transaction.placeOrder.IConfirmParams & {
41
- project: {
42
- id: string;
43
- };
44
- result: {
45
- order: IResultOrderParams;
46
- };
47
- };
48
- }
@@ -1,2 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PlaceOrderFactory = void 0;
37
+ exports.PlaceOrderFactory = __importStar(require("./transaction/placeOrder"));
@@ -80,7 +80,7 @@ class AccountingReportRepo {
80
80
  hasPart: [],
81
81
  mainEntity: {
82
82
  orderNumber: params.mainEntity.orderNumber // orderNumberのみが最低限必要なのでなければ作成
83
- }
83
+ } // eslint-disable-line @typescript-eslint/no-explicit-any
84
84
  };
85
85
  try {
86
86
  // なければ作成
@@ -121,7 +121,7 @@ class AccountingReportRepo {
121
121
  // hasPart: [],
122
122
  mainEntity: {
123
123
  orderNumber: params.mainEntity.orderNumber // orderNumberのみが最低限必要なのでなければ作成
124
- }
124
+ } // eslint-disable-line @typescript-eslint/no-explicit-any
125
125
  };
126
126
  const doc = await this.accountingReportModel.findOneAndUpdate({ 'mainEntity.orderNumber': { $eq: params.mainEntity.orderNumber } }, {
127
127
  $addToSet: { hasPart: params.hasPart },
@@ -43,7 +43,8 @@ export declare class ActionProcessRepo<TAction extends IAction<factory.actionTyp
43
43
  /**
44
44
  * アクション開始
45
45
  */
46
- start<T extends TAction['typeOf']>(attributes: factory.action.IAttributes<T, any, any>, options?: {
46
+ start<T extends TAction['typeOf']>(attributes: factory.action.IAttributes<T, any, any>, // eslint-disable-line @typescript-eslint/no-explicit-any
47
+ options?: {
47
48
  recipe?: IRecipeAsActionAttributes<TActionRecipe['recipeCategory']>;
48
49
  }): Promise<Pick<IAction<T>, 'id' | 'typeOf' | 'startDate'>>;
49
50
  completeWithVoid(params: {
@@ -80,7 +81,7 @@ export declare class ActionProcessRepo<TAction extends IAction<factory.actionTyp
80
81
  startDate: {
81
82
  $lt: Date;
82
83
  };
83
- }): Promise<any>;
84
+ }): Promise<import("mongoose").UpdateWriteOpResult>;
84
85
  findRecipeByAction<T extends TActionRecipe['recipeCategory']>(params: {
85
86
  project: {
86
87
  id: string;
@@ -55,7 +55,7 @@ class ActionProcessRepo {
55
55
  this.actionRecipeModel = connection.model(actionRecipe_1.modelName, (0, actionRecipe_1.createSchema)());
56
56
  }
57
57
  static CREATE_MONGO_CONDITIONS(params) {
58
- const andConditions = [];
58
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
59
59
  const idIn = params.id?.$in;
60
60
  if (Array.isArray(idIn)) {
61
61
  andConditions.push({ _id: { $in: idIn } });
@@ -465,7 +465,8 @@ class ActionProcessRepo {
465
465
  */
466
466
  async start(
467
467
  // public async start<T extends Exclude<TAction['typeOf'], factory.actionType.AcceptAction>>(
468
- attributes, options) {
468
+ attributes, // eslint-disable-line @typescript-eslint/no-explicit-any
469
+ options) {
469
470
  const startDate = new Date();
470
471
  const creatingAction = {
471
472
  ...attributes,
@@ -64,7 +64,7 @@ export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActio
64
64
  */
65
65
  deleteStartDatePassedCertainPeriod(params: {
66
66
  $lt: Date;
67
- }): Promise<any>;
67
+ }): Promise<import("mongodb").DeleteResult>;
68
68
  /**
69
69
  * 終了日時を一定期間過ぎたアクションを削除する
70
70
  * 作成日時を一定期間過ぎたアクションレシピも削除する
@@ -308,7 +308,7 @@ class AssetTransactionRepo {
308
308
  const { typeOf } = params;
309
309
  const startDate = new Date();
310
310
  const creatingTransaction = {
311
- ...params,
311
+ ...params, // eslint-disable-line @typescript-eslint/no-explicit-any
312
312
  typeOf,
313
313
  status: factory_1.factory.transactionStatusType.InProgress,
314
314
  startDate,
@@ -21,7 +21,7 @@ class ConcurrentLockRepo {
21
21
  .setNX(key, value)
22
22
  .expireAt(key, params.expires)
23
23
  .exec();
24
- if (Array.isArray(results) && (results[0] === 1 || results[0] === true)) {
24
+ if (Array.isArray(results) && (results[0] === 1 || results[0] === true)) { // eslint-disable-line @typescript-eslint/no-explicit-any
25
25
  return;
26
26
  }
27
27
  else {
@@ -14,7 +14,7 @@ class EmailMessageRepo {
14
14
  }
15
15
  static CREATE_MONGO_CONDITIONS(params) {
16
16
  // MongoDB検索条件
17
- const andConditions = [{ typeOf: factory_1.factory.creativeWorkType.EmailMessage }];
17
+ const andConditions = [{ typeOf: factory_1.factory.creativeWorkType.EmailMessage }]; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const projectIdEq = params.project?.id?.$eq;
19
19
  if (typeof projectIdEq === 'string') {
20
20
  andConditions.push({
@@ -258,7 +258,7 @@ class EventRepo {
258
258
  }
259
259
  break;
260
260
  }
261
- case factory_1.factory.eventType.ScreeningEventSeries:
261
+ case factory_1.factory.eventType.ScreeningEventSeries: // eslint-disable-line @typescript-eslint/no-explicit-any
262
262
  throw new factory_1.factory.errors.Internal('typeOf: ScreeningEventSeries discontinued');
263
263
  default:
264
264
  }
@@ -424,7 +424,7 @@ class EventRepo {
424
424
  * sskts専用
425
425
  */
426
426
  async saveManyEvents(params) {
427
- const bulkWriteOps = [];
427
+ const bulkWriteOps = []; // eslint-disable-line @typescript-eslint/no-explicit-any
428
428
  if (Array.isArray(params)) {
429
429
  params.forEach((p) => {
430
430
  const upsert = p.upsert === true;
@@ -556,7 +556,7 @@ class EventRepo {
556
556
  let projection;
557
557
  let positiveProjectionFields;
558
558
  if (Array.isArray(inclusion) && inclusion.length > 0) {
559
- positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PUBLIC_PROJECT_FIELDS.includes(key));
559
+ positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PUBLIC_PROJECT_FIELDS.includes(key)); // eslint-disable-line @typescript-eslint/no-explicit-any
560
560
  projection = {
561
561
  _id: 0,
562
562
  id: { $toString: '$_id' },
@@ -302,7 +302,7 @@ class EventSeriesRepo {
302
302
  const conditions = EventSeriesRepo.CREATE_MONGO_CONDITIONS(params);
303
303
  let projection;
304
304
  const positiveProjectionFields = (Array.isArray(inclusion))
305
- ? inclusion.filter((key) => key !== 'id' && key !== '_id')
305
+ ? inclusion.filter((key) => key !== 'id' && key !== '_id') // eslint-disable-line @typescript-eslint/no-explicit-any
306
306
  : [];
307
307
  if (Array.isArray(inclusion) && inclusion.length > 0) {
308
308
  projection = {
@@ -30,7 +30,8 @@ function minimizeRoom(params) {
30
30
  }
31
31
  function minimizeReservationFor(params) {
32
32
  if (USE_DEPRECATED_RESERVATION_FOR) {
33
- return { minimizedReservationFor: params }; // 互換性維持対応として
33
+ // 互換性維持対応として
34
+ return { minimizedReservationFor: params }; // eslint-disable-line @typescript-eslint/no-explicit-any
34
35
  }
35
36
  const { name: _name, doorTime: _doorTime, superEvent, location, ...reservationForNoName } = params;
36
37
  const minimizedReservationFor = {
@@ -14,7 +14,7 @@ class MerchantReturnPolicyRepo {
14
14
  }
15
15
  static CREATE_MONGO_CONDITIONS(params) {
16
16
  // MongoDB検索条件
17
- const andConditions = [];
17
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const projectIdEq = params.project?.id?.$eq;
19
19
  if (typeof projectIdEq === 'string') {
20
20
  andConditions.push({
@@ -168,7 +168,7 @@ class NoteAboutOrderRepo {
168
168
  new: true,
169
169
  projection: { _id: 1 }
170
170
  })
171
- .lean()
171
+ .lean() // eslint-disable-line @typescript-eslint/no-explicit-any
172
172
  .exec();
173
173
  if (doc === null) {
174
174
  throw new factory_1.factory.errors.NotFound(this.noteModel.modelName);
@@ -26,7 +26,7 @@ class OfferCatalogRepo {
26
26
  }
27
27
  static CREATE_MONGO_CONDITIONS(params) {
28
28
  // MongoDB検索条件
29
- const andConditions = [];
29
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
30
30
  const projectIdEq = params.project?.id?.$eq;
31
31
  if (typeof projectIdEq === 'string') {
32
32
  andConditions.push({
@@ -334,7 +334,7 @@ class OfferCatalogRepo {
334
334
  _id: 0,
335
335
  id: '$_id',
336
336
  ...Object.fromEntries(positiveProjectionFields.map((key) => {
337
- let value;
337
+ let value; // eslint-disable-line @typescript-eslint/no-explicit-any
338
338
  switch (key) {
339
339
  case 'numberOfItems':
340
340
  value = {
@@ -28,7 +28,7 @@ class OfferCatalogItemRepo {
28
28
  }
29
29
  static CREATE_MONGO_CONDITIONS(params) {
30
30
  // MongoDB検索条件
31
- const andConditions = [];
31
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
32
32
  const projectIdEq = params.project?.id?.$eq;
33
33
  if (typeof projectIdEq === 'string') {
34
34
  andConditions.push({ 'project.id': { $eq: projectIdEq } });
@@ -277,7 +277,7 @@ class OfferCatalogItemRepo {
277
277
  _id: 0,
278
278
  id: { $toString: '$_id' },
279
279
  ...Object.fromEntries(positiveProjectionFields.map((key) => {
280
- let value;
280
+ let value; // eslint-disable-line @typescript-eslint/no-explicit-any
281
281
  switch (key) {
282
282
  case 'numberOfItems':
283
283
  value = {
@@ -20,7 +20,7 @@ class OfferItemConditionRepo {
20
20
  this.offerItemConditionModel = connection.model(offerItemCondition_1.modelName, (0, offerItemCondition_1.createSchema)());
21
21
  }
22
22
  static CREATE_MONGO_CONDITIONS(params) {
23
- const andConditions = [];
23
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
24
24
  const projectIdEq = params.project?.id?.$eq;
25
25
  if (typeof projectIdEq === 'string') {
26
26
  andConditions.push({ 'project.id': { $eq: projectIdEq } });
@@ -15,7 +15,7 @@ class OwnershipInfoRepo {
15
15
  this.ownershipInfoModel = connection.model(ownershipInfo_1.modelName, (0, ownershipInfo_1.createSchema)());
16
16
  }
17
17
  static CREATE_MONGO_CONDITIONS(params) {
18
- const andConditions = [];
18
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
19
19
  /* istanbul ignore else */
20
20
  if (params.project !== undefined) {
21
21
  if (params.project.id !== undefined && params.project.id !== null) {
@@ -48,7 +48,8 @@ export declare class ScreeningRoomRepo {
48
48
  static CREATE_ROOM_MONGO_CONDITIONS(searchConditions: Omit<factory.place.screeningRoom.ISearchConditions, '$projection' | 'limit' | 'page'>): IMatchStage[];
49
49
  saveScreeningRooms4coa(params: IMovieTheaterIncludingScreeningRooms): Promise<void>;
50
50
  createRoom(screeningRoom: Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'name' | 'openSeatingAllowed'>, options: IUpdateOptions): Promise<IUpdateScreeningRoomResult>;
51
- updateRoomByBranchCode(screeningRoom: Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'name' | 'openSeatingAllowed'>, $unset: any, options: IUpdateOptions): Promise<IUpdateScreeningRoomResult>;
51
+ updateRoomByBranchCode(screeningRoom: Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'name' | 'openSeatingAllowed'>, $unset: any, // eslint-disable-line @typescript-eslint/no-explicit-any
52
+ options: IUpdateOptions): Promise<IUpdateScreeningRoomResult>;
52
53
  updateScreeningRoomsByContainedInPlaceId(screeningRoom: {
53
54
  project: {
54
55
  id: string;
@@ -230,7 +230,8 @@ class ScreeningRoomRepo {
230
230
  typeOf: factory_1.factory.placeType.ScreeningRoom
231
231
  };
232
232
  }
233
- async updateRoomByBranchCode(screeningRoom, $unset, options) {
233
+ async updateRoomByBranchCode(screeningRoom, $unset, // eslint-disable-line @typescript-eslint/no-explicit-any
234
+ options) {
234
235
  const { project, parentOrganization, movieTheaterCode } = options;
235
236
  const doc = await this.placeModel.findOneAndUpdate({
236
237
  typeOf: { $eq: factory_1.factory.placeType.ScreeningRoom },
@@ -58,7 +58,8 @@ export declare class SeatRepo {
58
58
  }[], options: IUpdateOptions): Promise<{
59
59
  bulkWriteResult?: BulkWriteResult;
60
60
  }>;
61
- updateSeatByBranchCode(seat: ICreatingSeat, $unset: any, options: IUpdateOptions): Promise<IUpdateSeatResult>;
61
+ updateSeatByBranchCode(seat: ICreatingSeat, $unset: any, // eslint-disable-line @typescript-eslint/no-explicit-any
62
+ options: IUpdateOptions): Promise<IUpdateSeatResult>;
62
63
  searchSeats(params: factory.place.seat.ISearchConditions): Promise<factory.place.seat.IPlace[]>;
63
64
  projectSeatsByScreeningRoom(params: Pick<factory.place.seat.ISearchConditions, '$projection' | 'additionalProperty' | 'branchCode' | 'seatingType' | 'name' | 'limit' | 'page'> & {
64
65
  project: {
@@ -412,7 +412,8 @@ class SeatRepo {
412
412
  }
413
413
  return {};
414
414
  }
415
- async updateSeatByBranchCode(seat, $unset, options) {
415
+ async updateSeatByBranchCode(seat, $unset, // eslint-disable-line @typescript-eslint/no-explicit-any
416
+ options) {
416
417
  const { project, parentOrganization, movieTheaterCode, roomCode, sectionCode } = options;
417
418
  const doc = await this.placeModel.findOneAndUpdate({
418
419
  typeOf: { $eq: factory_1.factory.placeType.ScreeningRoom },
@@ -49,7 +49,8 @@ export declare class SectionRepo {
49
49
  /**
50
50
  * セクションの名称と追加特性を編集する
51
51
  */
52
- updateSectionByBranchCode(screeningRoomSection: ICreatingSection, $unset: any, options: IUpdateOptions): Promise<IUpdateSectionResult>;
52
+ updateSectionByBranchCode(screeningRoomSection: ICreatingSection, $unset: any, // eslint-disable-line @typescript-eslint/no-explicit-any
53
+ options: IUpdateOptions): Promise<IUpdateSectionResult>;
53
54
  /**
54
55
  * コードをキーにして冪等追加
55
56
  */
@@ -161,7 +161,8 @@ class SectionRepo {
161
161
  /**
162
162
  * セクションの名称と追加特性を編集する
163
163
  */
164
- async updateSectionByBranchCode(screeningRoomSection, $unset, options) {
164
+ async updateSectionByBranchCode(screeningRoomSection, $unset, // eslint-disable-line @typescript-eslint/no-explicit-any
165
+ options) {
165
166
  const { project, parentOrganization, movieTheaterCode, roomCode } = options;
166
167
  const doc = await this.placeModel.findOneAndUpdate({
167
168
  typeOf: { $eq: factory_1.factory.placeType.ScreeningRoom },
@@ -13,7 +13,7 @@ class PriceSpecificationRepo {
13
13
  this.priceSpecificationModel = connection.model(priceSpecification_1.modelName, (0, priceSpecification_1.createSchema)());
14
14
  }
15
15
  static CREATE_MONGO_CONDITIONS(params) {
16
- const andConditions = [];
16
+ const andConditions = []; // eslint-disable-line @typescript-eslint/no-explicit-any
17
17
  const projectIdEq = params.project?.id?.$eq;
18
18
  if (typeof projectIdEq === 'string') {
19
19
  andConditions.push({ 'project.id': { $eq: projectIdEq } });
@@ -27,7 +27,7 @@ function importFromCOA(params) {
27
27
  .format('YYYYMMDD') // COAは日本時間で判断
28
28
  });
29
29
  debug('countFreeSeatResult:', countFreeSeatResult);
30
- const bulkWriteOps = [];
30
+ const bulkWriteOps = []; // eslint-disable-line @typescript-eslint/no-explicit-any
31
31
  if (Array.isArray(countFreeSeatResult.listDate)) {
32
32
  for (const countFreeSeatDate of countFreeSeatResult.listDate) {
33
33
  if (Array.isArray(countFreeSeatDate.listPerformance)) {
@@ -113,7 +113,7 @@ function createPotentialActions(params) {
113
113
  };
114
114
  }
115
115
  else {
116
- throw new factory_1.factory.errors.NotImplemented(`reservation.typeOf ${reservation.typeOf} not imeplemented`);
116
+ throw new factory_1.factory.errors.NotImplemented(`reservation.typeOf ${reservation.typeOf} not imeplemented`); // eslint-disable-line @typescript-eslint/no-explicit-any
117
117
  }
118
118
  return {
119
119
  project: transaction.project,
@@ -115,7 +115,7 @@ function createObjectAttributes(params, options) {
115
115
  const reservationNumber = params.transaction.transactionNumber;
116
116
  const acceptedOffers = (Array.isArray(params.object.acceptedOffer)) ? params.object.acceptedOffer : [];
117
117
  if (event.typeOf !== factory_1.factory.eventType.ScreeningEvent) {
118
- throw new factory_1.factory.errors.Argument('object.reservationFor.id', `invalid event type ${event.typeOf}`);
118
+ throw new factory_1.factory.errors.Argument('object.reservationFor.id', `invalid event type ${event.typeOf}`); // eslint-disable-line @typescript-eslint/no-explicit-any
119
119
  }
120
120
  if (event.typeOf === factory_1.factory.eventType.ScreeningEvent) {
121
121
  validateEvent({ now, event }, options);
@@ -17,7 +17,7 @@ function createReservationOwnershipInfo(params) {
17
17
  .toDate();
18
18
  }
19
19
  else {
20
- throw new factory_1.factory.errors.NotImplemented(`itemOffered.typeOf '${itemOffered.typeOf}' not implemented`);
20
+ throw new factory_1.factory.errors.NotImplemented(`itemOffered.typeOf '${itemOffered.typeOf}' not implemented`); // eslint-disable-line @typescript-eslint/no-explicit-any
21
21
  }
22
22
  // let bookingService = params.acceptedOffer.offeredThrough;
23
23
  // if (bookingService === undefined) {
@@ -46,7 +46,7 @@ function createReservationOwnershipInfo(params) {
46
46
  // };
47
47
  }
48
48
  else {
49
- throw new factory_1.factory.errors.NotImplemented(`itemOffered.typeOf '${itemOffered.typeOf}' not implemented`);
49
+ throw new factory_1.factory.errors.NotImplemented(`itemOffered.typeOf '${itemOffered.typeOf}' not implemented`); // eslint-disable-line @typescript-eslint/no-explicit-any
50
50
  }
51
51
  const ownershipInfo = {
52
52
  project: params.project,
@@ -234,11 +234,11 @@ function availableSalesTicket2offerWithDetails(params) {
234
234
  typeOf: factory_1.factory.placeType.Seat
235
235
  }
236
236
  },
237
- ...(typeof offer.itemOffered?.serviceOutput?.additionalTicketText === 'string')
238
- ? { additionalTicketText: offer.itemOffered.serviceOutput.additionalTicketText }
237
+ ...(typeof offer.itemOffered?.serviceOutput?.additionalTicketText === 'string') // eslint-disable-line @typescript-eslint/no-explicit-any
238
+ ? { additionalTicketText: offer.itemOffered.serviceOutput.additionalTicketText } // eslint-disable-line @typescript-eslint/no-explicit-any
239
239
  : undefined,
240
- ...(Array.isArray(offer.itemOffered?.serviceOutput?.additionalProperty))
241
- ? { additionalProperty: offer.itemOffered.serviceOutput.additionalProperty }
240
+ ...(Array.isArray(offer.itemOffered?.serviceOutput?.additionalProperty)) // eslint-disable-line @typescript-eslint/no-explicit-any
241
+ ? { additionalProperty: offer.itemOffered.serviceOutput.additionalProperty } // eslint-disable-line @typescript-eslint/no-explicit-any
242
242
  : undefined
243
243
  }
244
244
  },
@@ -199,7 +199,7 @@ function createInformTasks(params, setting) {
199
199
  const informUrl = String(informEvent.recipient?.url);
200
200
  events4inform.forEach((event4inform) => {
201
201
  // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
202
- delete event4inform._id;
202
+ delete event4inform._id; // eslint-disable-line @typescript-eslint/no-explicit-any
203
203
  const informActionAttributes = {
204
204
  object: event4inform,
205
205
  recipient: {
@@ -107,7 +107,8 @@ function sendOrder(params) {
107
107
  project: { id: { $eq: order.project.id } }
108
108
  });
109
109
  acceptedOffers = searchSlicedAcceptedOffersResult.acceptedOffers;
110
- debug('delivering...', order.orderNumber, acceptedOffers.map((offer) => `${offer.itemOffered.id}`), params.object.acceptedOffers, 'offerIndexBase:', offerIndexBase);
110
+ debug('delivering...', order.orderNumber, acceptedOffers.map((offer) => `${offer.itemOffered.id}`), // eslint-disable-line @typescript-eslint/no-explicit-any
111
+ params.object.acceptedOffers, 'offerIndexBase:', offerIndexBase);
111
112
  // 所有権作成
112
113
  if (createOwnerships) {
113
114
  creatingOwnershipInfos = (0, factory_1.createOwnershipInfosFromOrder)({
@@ -101,7 +101,7 @@ function processVoidPayTransaction(params) {
101
101
  // no op
102
102
  }
103
103
  }
104
- const errors = [];
104
+ const errors = []; // eslint-disable-line @typescript-eslint/no-explicit-any
105
105
  for (const action of authorizeActions) {
106
106
  // 失敗するケースがあっても、残りが少なくとも処理されるようにエラーハンドリング
107
107
  try {
@@ -53,7 +53,7 @@ function voidTransaction(params) {
53
53
  }],
54
54
  agent: {
55
55
  id: seller.id,
56
- name: (typeof seller.name === 'string') ? seller.name : String(seller.name?.ja),
56
+ name: (typeof seller.name === 'string') ? seller.name : String(seller.name),
57
57
  typeOf: seller.typeOf
58
58
  },
59
59
  recipient: transaction.recipient,
@@ -306,8 +306,8 @@ function cancelReservation(actionAttributesList) {
306
306
  }, { project: 1, typeOf: 1, modifiedTime: 1, reservationNumber: 1 } // 廃止属性の影響なし(2026-03-25~)
307
307
  );
308
308
  canceledReservations = canceledReservations.map((r) => {
309
- // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
310
- delete r._id;
309
+ // // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
310
+ // delete (r as any)._id;
311
311
  return r;
312
312
  });
313
313
  }
@@ -65,8 +65,8 @@ function confirmReservation(params) {
65
65
  };
66
66
  });
67
67
  confirmedReservations = confirmedReservations.map((r) => {
68
- // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
69
- delete r._id;
68
+ // // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
69
+ // delete (r as any)._id;
70
70
  return r;
71
71
  });
72
72
  }
@@ -68,7 +68,7 @@ function call(params) {
68
68
  }
69
69
  throw error;
70
70
  }
71
- const actionResult = {};
71
+ const actionResult = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
72
72
  await actionRepo.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: actionResult });
73
73
  };
74
74
  }
@@ -14,7 +14,7 @@ function deleteResourcesByAggregateOffer(params) {
14
14
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
15
15
  typeOf: factory_1.factory.actionType.DeleteAction
16
16
  };
17
- let deleteResult;
17
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const action = await repos.action.start(deleteActionAttributes);
19
19
  try {
20
20
  // カタログからpullItemListElement
@@ -14,7 +14,7 @@ function deleteResourcesByEventSeries(params) {
14
14
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
15
15
  typeOf: factory_1.factory.actionType.DeleteAction
16
16
  };
17
- let deleteResult;
17
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const action = await repos.action.start(deleteActionAttributes);
19
19
  try {
20
20
  // イベント削除
@@ -14,7 +14,7 @@ function deleteResourcesByMovieTheater(params) {
14
14
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
15
15
  typeOf: factory_1.factory.actionType.DeleteAction
16
16
  };
17
- let deleteResult;
17
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const action = await repos.action.start(deleteActionAttributes);
19
19
  try {
20
20
  // イベント削除
@@ -14,7 +14,7 @@ function deleteResourcesByOfferCatalog(params) {
14
14
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
15
15
  typeOf: factory_1.factory.actionType.DeleteAction
16
16
  };
17
- let deleteResult;
17
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const action = await repos.action.start(deleteActionAttributes);
19
19
  try {
20
20
  // カタログからプロダクト検索
@@ -14,7 +14,7 @@ function deleteResourcesByProduct(params) {
14
14
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
15
15
  typeOf: factory_1.factory.actionType.DeleteAction
16
16
  };
17
- let deleteResult;
17
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const action = await repos.action.start(deleteActionAttributes);
19
19
  try {
20
20
  // 興行を設定されたイベント削除
@@ -15,7 +15,7 @@ function deleteResourcesByRoom(params) {
15
15
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
16
16
  typeOf: factory_1.factory.actionType.DeleteAction
17
17
  };
18
- let deleteResult;
18
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
19
19
  const action = await repos.action.start(deleteActionAttributes);
20
20
  try {
21
21
  // イベント削除
@@ -14,7 +14,7 @@ function deleteResourcesBySeller(params) {
14
14
  project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
15
15
  typeOf: factory_1.factory.actionType.DeleteAction
16
16
  };
17
- let deleteResult;
17
+ let deleteResult; // eslint-disable-line @typescript-eslint/no-explicit-any
18
18
  const action = await repos.action.start(deleteActionAttributes);
19
19
  try {
20
20
  // メンバー削除
@@ -244,8 +244,6 @@ function createInformMovieTasks(params, setting) {
244
244
  informResources?.forEach((informResource) => {
245
245
  const informUrl = String(informResource.recipient?.url);
246
246
  movies4inform.forEach((movie4inform) => {
247
- // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
248
- delete movie4inform._id;
249
247
  const informActionAttributes = {
250
248
  object: movie4inform,
251
249
  recipient: {
@@ -297,8 +295,6 @@ function createInformProductTasks(params, setting) {
297
295
  informResources?.forEach((informResource) => {
298
296
  const informUrl = String(informResource.recipient?.url);
299
297
  products4inform.forEach((product4inform) => {
300
- // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
301
- delete product4inform._id;
302
298
  const informActionAttributes = {
303
299
  object: product4inform,
304
300
  recipient: {
@@ -348,8 +344,6 @@ function createInformCategoryCodeTasks(params, setting) {
348
344
  informResources?.forEach((informResource) => {
349
345
  const informUrl = String(informResource.recipient?.url);
350
346
  categoryCodes4inform.forEach((categoryCode4inform) => {
351
- // _idは不要であり、存在すると予期せぬ影響を及ぼす可能性がある
352
- delete categoryCode4inform._id;
353
347
  const informActionAttributes = {
354
348
  object: categoryCode4inform,
355
349
  recipient: {
@@ -126,7 +126,7 @@ function syncEventSeries(params) {
126
126
  object: {
127
127
  ...params.object,
128
128
  typeOf: factory_1.factory.eventType.ScreeningEventSeries
129
- },
129
+ }, // eslint-disable-line @typescript-eslint/no-explicit-any
130
130
  // instrument,
131
131
  targetCollection: { typeOf: factory_1.factory.eventType.ScreeningEventSeries },
132
132
  sameAs: { id: params.sameAs.id, typeOf: 'Task' }
@@ -195,7 +195,7 @@ function syncEvents(params) {
195
195
  object: {
196
196
  ...params.object,
197
197
  typeOf: factory_1.factory.eventType.ScreeningEvent
198
- },
198
+ }, // eslint-disable-line @typescript-eslint/no-explicit-any
199
199
  // instrument,
200
200
  targetCollection: { typeOf: factory_1.factory.eventType.ScreeningEvent },
201
201
  sameAs: { id: params.sameAs.id, typeOf: 'Task' }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteTransaction = deleteTransaction;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
4
5
  const factory_1 = require("../../factory");
5
6
  const deleteOrder_1 = require("../order/deleteOrder");
6
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { factory } from '../../../../factory';
2
- import { placeOrder as PlaceOrderFactory } from '../../../../factory/transaction';
2
+ import { PlaceOrderFactory } from '../../../../factory/transaction';
3
3
  import { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizePaymentAction, IPayTransaction } from './validation/factory';
4
4
  export { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizePaymentAction, IPayTransaction };
5
5
  /**
@@ -12,7 +12,7 @@ import type { ProjectRepo } from '../../../repo/project';
12
12
  import type { SettingRepo } from '../../../repo/setting';
13
13
  import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
14
14
  import { factory } from '../../../factory';
15
- import { placeOrder as PlaceOrderFactory } from '../../../factory/transaction';
15
+ import { PlaceOrderFactory } from '../../../factory/transaction';
16
16
  interface IConfirmOperationRepos {
17
17
  action?: never;
18
18
  acceptPayAction: AcceptPayActionRepo;
@@ -421,7 +421,7 @@ function searchAuthorizeActions(params) {
421
421
  },
422
422
  // Completedに絞る(2023-05-16~)
423
423
  actionStatus: { $eq: factory_1.factory.actionStatusType.CompletedActionStatus }
424
- }),
424
+ }), // eslint-disable-line @typescript-eslint/no-explicit-any
425
425
  ...await repos.authorizeOfferAction.findAuthorizeAnyOfferActionsByPurpose({
426
426
  purpose: {
427
427
  typeOf: factory_1.factory.transactionType.PlaceOrder,
@@ -5,7 +5,7 @@ import type { PassportRepo } from '../../../repo/passport';
5
5
  import type { ProjectMakesOfferRepo } from '../../../repo/projectMakesOffer';
6
6
  import type { SellerRepo } from '../../../repo/seller';
7
7
  import type { IStartedPlaceOrder, PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
8
- import { placeOrder as PlaceOrderFactory } from '../../../factory/transaction';
8
+ import { PlaceOrderFactory } from '../../../factory/transaction';
9
9
  interface IStartOperationRepos {
10
10
  issuer: IssuerRepo;
11
11
  member: MemberRepo;
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.factory = exports.transaction = exports.task = exports.reserve = exports.project = exports.payment = exports.order = exports.offer = exports.notification = exports.iam = exports.event = exports.assetTransaction = exports.aggregation = void 0;
37
+ /* eslint-disable @typescript-eslint/no-namespace */
37
38
  /**
38
39
  * service module
39
40
  */
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "8.0.0-alpha.8",
14
+ "@chevre/factory": "8.0.0",
15
15
  "@motionpicture/coa-service": "10.0.0",
16
16
  "@motionpicture/gmo-service": "6.1.0-alpha.0",
17
17
  "@sendgrid/client": "8.1.4",
@@ -81,8 +81,7 @@
81
81
  "clean": "rimraf --glob ./lib \"npm-debug.log*\" ./doc ./coverage ./.nyc_output ./example/dst",
82
82
  "depcruise": "depcruise src",
83
83
  "doc": "echo \"implementing...\" && exit 0",
84
- "eslint": "eslint \"src/**/*.ts\"",
85
- "eslint:example": "eslint \"example/**/*.ts\"",
84
+ "eslint": "eslint \"src/**/*.ts\" \"example/**/*.ts\"",
86
85
  "coverage": "vitest run --coverage",
87
86
  "test": "npm run eslint && npm run coverage",
88
87
  "preversion": "npm run check:all",
@@ -92,5 +91,5 @@
92
91
  "postversion": "git push origin --tags",
93
92
  "prepublishOnly": "npm run clean && npm run build"
94
93
  },
95
- "version": "24.0.0-alpha.86"
94
+ "version": "24.0.0-alpha.88"
96
95
  }