@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.40

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 (150) hide show
  1. package/lib/chevre/emailMessageBuilder.js +1 -1
  2. package/lib/chevre/factory/event.d.ts +1 -1
  3. package/lib/chevre/factory/event.js +1 -5
  4. package/lib/chevre/repo/acceptedOffer.d.ts +6 -5
  5. package/lib/chevre/repo/acceptedOffer.js +14 -9
  6. package/lib/chevre/repo/acceptedOfferInReserve.d.ts +6 -8
  7. package/lib/chevre/repo/acceptedOfferInReserve.js +13 -7
  8. package/lib/chevre/repo/adminAcceptedOffer.d.ts +25 -12
  9. package/lib/chevre/repo/adminAcceptedOffer.js +20 -10
  10. package/lib/chevre/repo/adminAccountTitle.d.ts +49 -0
  11. package/lib/chevre/repo/adminAccountTitle.js +212 -0
  12. package/lib/chevre/repo/adminAccountTitleCategory.d.ts +37 -0
  13. package/lib/chevre/repo/adminAccountTitleCategory.js +127 -0
  14. package/lib/chevre/repo/adminAccountTitleSet.d.ts +42 -0
  15. package/lib/chevre/repo/adminAccountTitleSet.js +149 -0
  16. package/lib/chevre/repo/adminEvent.d.ts +1 -7
  17. package/lib/chevre/repo/adminEvent.js +3 -9
  18. package/lib/chevre/repo/adminEventSeries.d.ts +67 -0
  19. package/lib/chevre/repo/adminEventSeries.js +178 -0
  20. package/lib/chevre/repo/{paymentServiceChannel.d.ts → adminPaymentServiceChannel.d.ts} +13 -11
  21. package/lib/chevre/repo/{paymentServiceChannel.js → adminPaymentServiceChannel.js} +20 -19
  22. package/lib/chevre/repo/adminTask.d.ts +2 -2
  23. package/lib/chevre/repo/adminTransaction.d.ts +20 -30
  24. package/lib/chevre/repo/aggregateEvent.js +0 -1
  25. package/lib/chevre/repo/categoryCode.js +0 -21
  26. package/lib/chevre/repo/event.d.ts +2 -2
  27. package/lib/chevre/repo/event.js +71 -110
  28. package/lib/chevre/repo/eventSeries.d.ts +5 -84
  29. package/lib/chevre/repo/eventSeries.js +21 -212
  30. package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +1 -1
  31. package/lib/chevre/repo/issuer.d.ts +2 -6
  32. package/lib/chevre/repo/memberProgram.d.ts +1 -38
  33. package/lib/chevre/repo/memberProgram.js +1 -62
  34. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +1 -1
  35. package/lib/chevre/repo/mongoose/schemas/accountTitle.js +21 -25
  36. package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +1 -0
  37. package/lib/chevre/repo/mongoose/schemas/event.js +0 -13
  38. package/lib/chevre/repo/mongoose/schemas/eventSeries.js +1 -18
  39. package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -3
  40. package/lib/chevre/repo/mongoose/schemas/issuer.js +0 -10
  41. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +0 -1
  42. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +3 -12
  43. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -2
  44. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +6 -15
  45. package/lib/chevre/repo/mongoose/schemas/order.d.ts +22 -1
  46. package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
  47. package/lib/chevre/repo/mongoose/schemas/place.js +0 -9
  48. package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -2
  49. package/lib/chevre/repo/mongoose/schemas/project.js +1 -1
  50. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +3 -1
  51. package/lib/chevre/repo/mongoose/schemas/seller.js +0 -2
  52. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +1 -1
  53. package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -52
  54. package/lib/chevre/repo/offerCatalog.d.ts +0 -2
  55. package/lib/chevre/repo/offerCatalogItem.d.ts +13 -20
  56. package/lib/chevre/repo/offerCatalogItem.js +8 -86
  57. package/lib/chevre/repo/order.d.ts +2 -2
  58. package/lib/chevre/repo/order.js +0 -31
  59. package/lib/chevre/repo/orderInTransaction.d.ts +5 -25
  60. package/lib/chevre/repo/place/movieTheater.d.ts +3 -1
  61. package/lib/chevre/repo/place/movieTheater.js +3 -1
  62. package/lib/chevre/repo/place/{hasPOS.d.ts → pos.d.ts} +13 -20
  63. package/lib/chevre/repo/place/{hasPOS.js → pos.js} +66 -29
  64. package/lib/chevre/repo/place/screeningRoom.d.ts +24 -3
  65. package/lib/chevre/repo/place/screeningRoom.js +28 -17
  66. package/lib/chevre/repo/priceSpecification.d.ts +8 -8
  67. package/lib/chevre/repo/project.d.ts +2 -8
  68. package/lib/chevre/repo/project.js +0 -12
  69. package/lib/chevre/repo/projectMakesOffer.js +2 -2
  70. package/lib/chevre/repo/role.d.ts +1 -1
  71. package/lib/chevre/repo/role.js +1 -30
  72. package/lib/chevre/repo/seller.d.ts +11 -4
  73. package/lib/chevre/repo/seller.js +31 -58
  74. package/lib/chevre/repo/sellerPaymentAccepted.d.ts +14 -21
  75. package/lib/chevre/repo/sellerPaymentAccepted.js +65 -38
  76. package/lib/chevre/repo/task.d.ts +3 -3
  77. package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -3
  78. package/lib/chevre/repo/transaction/placeOrder.js +15 -36
  79. package/lib/chevre/repository.d.ts +30 -15
  80. package/lib/chevre/repository.js +63 -30
  81. package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -2
  82. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -2
  83. package/lib/chevre/service/aggregation.d.ts +0 -2
  84. package/lib/chevre/service/aggregation.js +1 -3
  85. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +1 -2
  86. package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +2 -2
  87. package/lib/chevre/service/assetTransaction/reserve/start.js +2 -1
  88. package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -1
  89. package/lib/chevre/service/event/saveScreeningEventSeries.d.ts +2 -2
  90. package/lib/chevre/service/event/saveScreeningEventSeries.js +2 -3
  91. package/lib/chevre/service/event/saveScreeningEvents.d.ts +2 -0
  92. package/lib/chevre/service/event/saveScreeningEvents.js +4 -4
  93. package/lib/chevre/service/event.d.ts +2 -0
  94. package/lib/chevre/service/event.js +0 -1
  95. package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -0
  96. package/lib/chevre/service/notification/sendEmailMessage.js +23 -6
  97. package/lib/chevre/service/offer/any.d.ts +1 -1
  98. package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
  99. package/lib/chevre/service/offer/event/authorize/factory.js +1 -8
  100. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  101. package/lib/chevre/service/offer/event/issueEventOfferTicket.js +0 -11
  102. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -10
  103. package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +2 -8
  104. package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +2 -2
  105. package/lib/chevre/service/offer/event/searchOffersByIds.js +3 -9
  106. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +0 -1
  107. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
  108. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -7
  109. package/lib/chevre/service/offer/onEventChanged.js +9 -21
  110. package/lib/chevre/service/offer.js +1 -2
  111. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +4 -6
  112. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +23 -4
  113. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -1
  114. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +1 -1
  115. package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
  116. package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
  117. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  118. package/lib/chevre/service/order/sendOrder.js +2 -14
  119. package/lib/chevre/service/payment/creditCard/getGMOInfoFromSeller.js +1 -1
  120. package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +3 -3
  121. package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
  122. package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +1 -1
  123. package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
  124. package/lib/chevre/service/project.d.ts +3 -3
  125. package/lib/chevre/service/project.js +1 -1
  126. package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
  127. package/lib/chevre/service/task/onResourceDeleted.js +8 -8
  128. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +7 -3
  129. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +51 -50
  130. package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
  131. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +1 -1
  132. package/lib/chevre/service/task/onResourceUpdated.js +10 -47
  133. package/lib/chevre/service/task/sendEmailMessage.js +3 -1
  134. package/lib/chevre/service/task/syncResourcesFromCOA.js +5 -3
  135. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +1 -2
  136. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -5
  137. package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +1 -1
  138. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
  139. package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
  140. package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
  141. package/lib/chevre/service/transaction/placeOrder/confirm.js +0 -5
  142. package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
  143. package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
  144. package/package.json +2 -2
  145. package/lib/chevre/repo/accountTitle.d.ts +0 -28
  146. package/lib/chevre/repo/accountTitle.js +0 -30
  147. package/lib/chevre/service/aggregation/project.d.ts +0 -17
  148. package/lib/chevre/service/aggregation/project.js +0 -98
  149. package/lib/chevre/service/delivery/factory.d.ts +0 -16
  150. package/lib/chevre/service/delivery/factory.js +0 -124
@@ -39,6 +39,7 @@ const update_1 = require("../../repo/action/update");
39
39
  const categoryCode_1 = require("../../repo/categoryCode");
40
40
  const creativeWork_1 = require("../../repo/creativeWork");
41
41
  const adminEvent_1 = require("../../repo/adminEvent");
42
+ const adminEventSeries_1 = require("../../repo/adminEventSeries");
42
43
  const event_1 = require("../../repo/event");
43
44
  const eventSeries_1 = require("../../repo/eventSeries");
44
45
  const movieTheater_1 = require("../../repo/place/movieTheater");
@@ -78,6 +79,7 @@ function call(params) {
78
79
  categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
79
80
  creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
80
81
  adminEvent: new adminEvent_1.AdminEventRepo(connection),
82
+ adminEventSeries: new adminEventSeries_1.AdminEventSeriesRepo(connection),
81
83
  event: new event_1.EventRepo(connection),
82
84
  eventSeries: new eventSeries_1.EventSeriesRepo(connection),
83
85
  movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
@@ -13,7 +13,7 @@ const note_1 = require("../../repo/note");
13
13
  const offerCatalog_1 = require("../../repo/offerCatalog");
14
14
  const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
15
15
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
16
- const hasPOS_1 = require("../../repo/place/hasPOS");
16
+ const pos_1 = require("../../repo/place/pos");
17
17
  const movieTheater_1 = require("../../repo/place/movieTheater");
18
18
  const screeningRoom_1 = require("../../repo/place/screeningRoom");
19
19
  const product_1 = require("../../repo/product");
@@ -26,7 +26,6 @@ const deleteResourcesByOfferCatalog_1 = require("./onResourceDeleted/deleteResou
26
26
  const deleteResourcesByProduct_1 = require("./onResourceDeleted/deleteResourcesByProduct");
27
27
  const deleteResourcesByRoom_1 = require("./onResourceDeleted/deleteResourcesByRoom");
28
28
  const deleteResourcesBySeller_1 = require("./onResourceDeleted/deleteResourcesBySeller");
29
- const onHasPOSUpdated_1 = require("./onResourceUpdated/onHasPOSUpdated");
30
29
  const syncOfferCatalog_1 = require("./onResourceUpdated/syncOfferCatalog");
31
30
  /**
32
31
  * タスク実行関数
@@ -42,7 +41,7 @@ function call(params) {
42
41
  adminEvent: new adminEvent_1.AdminEventRepo(connection),
43
42
  eventOffer: new eventOffer_1.EventOfferRepo(connection),
44
43
  eventSeries: new eventSeries_1.EventSeriesRepo(connection),
45
- hasPOS: new hasPOS_1.HasPOSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
44
+ pos: new pos_1.POSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
46
45
  member: new member_1.MemberRepo(connection),
47
46
  movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
48
47
  note: new note_1.NoteRepo(connection),
@@ -68,11 +67,12 @@ function onResourceDeleted(params) {
68
67
  if (useInform) {
69
68
  switch (resourceType) {
70
69
  case 'POS':
71
- await (0, onHasPOSUpdated_1.createInformHasPOSTasks)({
72
- project: { id: params.project.id },
73
- ids: [params.operator.id],
74
- typeOf: factory_1.factory.placeType.MovieTheater
75
- })(repos);
70
+ // POS削除時通知は廃止(2026-09-26~)
71
+ // await createInformHasPOSTasks({
72
+ // project: { id: params.project.id },
73
+ // ids: [params.operator.id],
74
+ // typeOf: factory.placeType.MovieTheater
75
+ // })(repos);
76
76
  break;
77
77
  default:
78
78
  // no op
@@ -1,5 +1,5 @@
1
1
  import { factory } from '../../../factory';
2
- import type { HasPOSRepo } from '../../../repo/place/hasPOS';
2
+ import type { POSRepo } from '../../../repo/place/pos';
3
3
  import type { MovieTheaterRepo } from '../../../repo/place/movieTheater';
4
4
  import type { SettingRepo } from '../../../repo/setting';
5
5
  import type { TaskRepo } from '../../../repo/task';
@@ -10,10 +10,14 @@ export declare function createInformHasPOSTasks(params: {
10
10
  /**
11
11
  * 施設ID
12
12
  */
13
- ids: string[];
13
+ id: string;
14
14
  typeOf: factory.placeType.MovieTheater;
15
+ /**
16
+ * POSコード
17
+ */
18
+ branchCode: string;
15
19
  }): (repos: {
16
- hasPOS: HasPOSRepo;
20
+ pos: POSRepo;
17
21
  movieTheater: MovieTheaterRepo;
18
22
  setting: SettingRepo;
19
23
  task: TaskRepo;
@@ -3,20 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createInformHasPOSTasks = createInformHasPOSTasks;
4
4
  const factory_1 = require("../../../factory");
5
5
  function createInformHasPOSTasks(params) {
6
- return async (repos
7
- // settings: Settings
8
- ) => {
9
- if (params.ids.length !== 1) {
10
- throw new factory_1.factory.errors.Argument('id', 'id.length must be 1');
11
- }
6
+ return async (repos) => {
7
+ // if (params.ids.length !== 1) {
8
+ // throw new factory.errors.Argument('id', 'id.length must be 1');
9
+ // }
12
10
  const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['onResourceUpdated']);
13
- // const informResources = settings.onResourceUpdated.informResource;
14
11
  const informResources = setting?.onResourceUpdated?.informResource;
15
12
  const movieTheaters = await repos.movieTheater.projectFields({
16
13
  limit: 1,
17
14
  page: 1,
18
15
  project: { id: { $eq: params.project.id } },
19
- id: { $eq: params.ids[0] }
16
+ id: { $eq: params.id }
20
17
  }, ['id']
21
18
  // []
22
19
  );
@@ -25,50 +22,54 @@ function createInformHasPOSTasks(params) {
25
22
  throw new factory_1.factory.errors.NotFound(factory_1.factory.placeType.MovieTheater);
26
23
  }
27
24
  // 施設のhasPOSを全て連携する
28
- repos.hasPOS.operator.id = movieTheater.id;
29
- const hasPOS = await repos.hasPOS.search({
30
- project: { id: { $eq: params.project.id } }
31
- });
32
- const movieTheaters4inform = [{
33
- // hasPOS: (Array.isArray(movieTheater.hasPOS)) ? movieTheater.hasPOS : [],
34
- hasPOS: (Array.isArray(hasPOS)) ? hasPOS : [],
35
- id: movieTheater.id,
36
- typeOf: factory_1.factory.placeType.MovieTheater
37
- }];
38
- if (movieTheaters4inform.length > 0) {
39
- const taskRunsAt = new Date();
40
- const informTasks = [];
41
- informResources?.forEach((informResource) => {
42
- const informUrl = String(informResource.recipient?.url);
43
- movieTheaters4inform.forEach((movieTheater4inform) => {
44
- const informActionAttributes = {
45
- object: movieTheater4inform,
46
- recipient: {
47
- name: String(informResource.recipient?.name),
48
- typeOf: factory_1.factory.creativeWorkType.WebApplication
49
- // url: informUrl // discontinue(2025-02-13~)
50
- },
51
- target: {
52
- httpMethod: 'POST',
53
- encodingType: factory_1.factory.encodingFormat.Application.json,
54
- typeOf: 'EntryPoint',
55
- urlTemplate: informUrl
56
- }
57
- };
58
- informTasks.push({
59
- project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
60
- name: factory_1.factory.taskName.TriggerWebhook,
61
- status: factory_1.factory.taskStatus.Ready,
62
- runsAt: taskRunsAt,
63
- remainingNumberOfTries: 10,
64
- numberOfTried: 0,
65
- executionResults: [],
66
- data: informActionAttributes
25
+ repos.pos.operator.id = movieTheater.id;
26
+ const informingPOS = (await repos.pos.findPOS({
27
+ limit: 1,
28
+ page: 1,
29
+ projectId: params.project.id,
30
+ branchCode: { $eq: params.branchCode }
31
+ })).at(0); // pos.idを除外(2026-09-18~)
32
+ if (informingPOS !== undefined) {
33
+ const movieTheaters4inform = [{
34
+ hasPOS: [informingPOS],
35
+ id: movieTheater.id,
36
+ typeOf: factory_1.factory.placeType.MovieTheater
37
+ }];
38
+ if (movieTheaters4inform.length > 0) {
39
+ const taskRunsAt = new Date();
40
+ const informTasks = [];
41
+ informResources?.forEach((informResource) => {
42
+ const informUrl = String(informResource.recipient?.url);
43
+ movieTheaters4inform.forEach((movieTheater4inform) => {
44
+ const informActionAttributes = {
45
+ object: movieTheater4inform,
46
+ recipient: {
47
+ name: String(informResource.recipient?.name),
48
+ typeOf: factory_1.factory.creativeWorkType.WebApplication
49
+ // url: informUrl // discontinue(2025-02-13~)
50
+ },
51
+ target: {
52
+ httpMethod: 'POST',
53
+ encodingType: factory_1.factory.encodingFormat.Application.json,
54
+ typeOf: 'EntryPoint',
55
+ urlTemplate: informUrl
56
+ }
57
+ };
58
+ informTasks.push({
59
+ project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
60
+ name: factory_1.factory.taskName.TriggerWebhook,
61
+ status: factory_1.factory.taskStatus.Ready,
62
+ runsAt: taskRunsAt,
63
+ remainingNumberOfTries: 10,
64
+ numberOfTried: 0,
65
+ executionResults: [],
66
+ data: informActionAttributes
67
+ });
67
68
  });
68
69
  });
69
- });
70
- if (informTasks.length > 0) {
71
- await repos.task.saveMany(informTasks);
70
+ if (informTasks.length > 0) {
71
+ await repos.task.saveMany(informTasks);
72
+ }
72
73
  }
73
74
  }
74
75
  };
@@ -13,7 +13,7 @@ function createInformOfferCatalogTasks(params, setting) {
13
13
  }
14
14
  let offerCatalogs;
15
15
  if (params.isOfferCatalogItem) {
16
- offerCatalogs = await repos.offerCatalogItem.projectFields({ id: { $in: params.ids } }, ['identifier', 'name', 'numberOfItems', 'project', 'typeOf']);
16
+ offerCatalogs = await repos.offerCatalogItem.findOfferCatalogItems({ id: { $in: params.ids } }, ['identifier', 'name', 'numberOfItems', 'project', 'typeOf']);
17
17
  }
18
18
  else {
19
19
  offerCatalogs = await repos.offerCatalog.projectFields({ id: { $in: params.ids } }, ['identifier', 'name', 'numberOfItems', 'project', 'typeOf']);
@@ -25,7 +25,7 @@ function syncOfferCatalog(params) {
25
25
  for (const offerCatalogId of params.ids) {
26
26
  let offerCatalogs;
27
27
  if (params.isOfferCatalogItem) {
28
- offerCatalogs = await repos.offerCatalogItem.projectFields({ id: { $in: [offerCatalogId] } }, ['id', 'itemListElementTypeOf']);
28
+ offerCatalogs = await repos.offerCatalogItem.findOfferCatalogItems({ id: { $in: [offerCatalogId] } }, ['id', 'itemListElementTypeOf']);
29
29
  }
30
30
  else {
31
31
  offerCatalogs = await repos.offerCatalog.projectFields({ id: { $in: [offerCatalogId] } }, ['id', 'itemListElementTypeOf']);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.call = call;
4
4
  const factory_1 = require("../../factory");
5
- const accountTitle_1 = require("../../repo/accountTitle");
5
+ const adminAccountTitleCategory_1 = require("../../repo/adminAccountTitleCategory");
6
6
  const aggregateOffer_1 = require("../../repo/aggregateOffer");
7
7
  const categoryCode_1 = require("../../repo/categoryCode");
8
8
  const creativeWork_1 = require("../../repo/creativeWork");
@@ -15,7 +15,7 @@ const offerCatalog_1 = require("../../repo/offerCatalog");
15
15
  const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
16
16
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
17
17
  const entranceGate_1 = require("../../repo/place/entranceGate");
18
- const hasPOS_1 = require("../../repo/place/hasPOS");
18
+ const pos_1 = require("../../repo/place/pos");
19
19
  const movieTheater_1 = require("../../repo/place/movieTheater");
20
20
  const screeningRoom_1 = require("../../repo/place/screeningRoom");
21
21
  const product_1 = require("../../repo/product");
@@ -32,14 +32,14 @@ function call(params) {
32
32
  return async ({ connection }) => {
33
33
  const { data } = params;
34
34
  await onResourceUpdated(data)({
35
- accountTitle: new accountTitle_1.AccountTitleRepo(connection),
35
+ adminAccountTitleCategory: new adminAccountTitleCategory_1.AdminAccountTitleCategoryRepo(connection),
36
36
  aggregateOffer: new aggregateOffer_1.AggregateOfferRepo(connection),
37
37
  categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
38
38
  creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
39
39
  entranceGate: new entranceGate_1.EntranceGateRepo(connection, { id: '' }), // 先の処理で明示的に指定される
40
40
  event: new event_1.EventRepo(connection),
41
41
  eventSeries: new eventSeries_1.EventSeriesRepo(connection),
42
- hasPOS: new hasPOS_1.HasPOSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
42
+ pos: new pos_1.POSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
43
43
  member: new member_1.MemberRepo(connection),
44
44
  movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
45
45
  note: new note_1.NoteRepo(connection),
@@ -123,8 +123,9 @@ function onResourceUpdated(params) {
123
123
  case 'POS':
124
124
  await (0, onHasPOSUpdated_1.createInformHasPOSTasks)({
125
125
  project: { id: params.project.id },
126
- ids: [params.operator.id],
127
- typeOf: factory_1.factory.placeType.MovieTheater
126
+ id: params.operator.id,
127
+ typeOf: factory_1.factory.placeType.MovieTheater,
128
+ branchCode: params.branchCode
128
129
  })(repos);
129
130
  break;
130
131
  case factory_1.factory.offerType.AggregateOffer:
@@ -401,32 +402,11 @@ function createInformMovieTheaterTasks(params, setting) {
401
402
  ]
402
403
  // []
403
404
  );
404
- // const movieTheater = movieTheaters.shift();
405
- // if (movieTheater === undefined) {
406
- // throw new factory.errors.NotFound(factory.placeType.MovieTheater);
407
- // }
408
- // // ルームを検索
409
- // const screeningRooms = await repos.screeningRoom.findRooms(
410
- // {
411
- // containedInPlace: { id: { $eq: movieTheater.id } }
412
- // }
413
- // );
414
405
  // 入場ゲートを廃止(2026-01-17~)
415
406
  const movieTheaters4inform = movieTheaters.map((movieTheater) => {
416
407
  const { hasEntranceGate, ...movieTheaterWithoutEntranceGates } = movieTheater; // eslint-disable-line @typescript-eslint/no-unused-vars
417
408
  return {
418
409
  ...movieTheaterWithoutEntranceGates
419
- // ...movieTheater
420
- // migrate to IRoomAsNotification(2026-01-16~)
421
- // containsPlace: screeningRooms.map((room) => {
422
- // return {
423
- // branchCode: room.branchCode,
424
- // name: room.name,
425
- // typeOf: factory.placeType.ScreeningRoom,
426
- // additionalProperty: room.additionalProperty,
427
- // address: room.address
428
- // };
429
- // })
430
410
  };
431
411
  });
432
412
  if (movieTheaters4inform.length > 0) {
@@ -596,26 +576,9 @@ function createInformAccountTitleTasks(params, setting) {
596
576
  }
597
577
  // const informResources = settings.onResourceUpdated.informResource;
598
578
  const informResources = setting?.onResourceUpdated?.informResource;
599
- const accountTitle = await repos.accountTitle.accountTitleModel.findOne({
600
- _id: { $eq: params.ids[0] },
601
- 'project.id': { $eq: params.project.id }
602
- }, {
603
- _id: 0,
604
- id: { $toString: '$_id' },
605
- additionalProperty: 1,
606
- codeValue: 1,
607
- hasCategoryCode: 1,
608
- name: 1,
609
- project: 1,
610
- typeOf: 1
611
- })
612
- .lean()
613
- .exec()
614
- .then((doc) => {
615
- if (doc === null) {
616
- throw new factory_1.factory.errors.NotFound(params.typeOf);
617
- }
618
- return doc;
579
+ const accountTitle = await repos.adminAccountTitleCategory.findAccountTitleCategorAsNotification({
580
+ id: params.ids[0],
581
+ projectId: params.project.id
619
582
  });
620
583
  const accountTitles4inform = [accountTitle];
621
584
  if (accountTitles4inform.length > 0) {
@@ -5,6 +5,7 @@ const sendEmailMessage_1 = require("../../repo/action/sendEmailMessage");
5
5
  const message_1 = require("../../repo/message");
6
6
  const project_1 = require("../../repo/project");
7
7
  const integration_1 = require("../../repo/setting/integration");
8
+ const setting_1 = require("../../repo/setting");
8
9
  const notification_1 = require("../notification");
9
10
  /**
10
11
  * タスク実行関数
@@ -18,7 +19,8 @@ function call(params) {
18
19
  actions: { sendEmailMessage: new sendEmailMessage_1.SendEmailMessageActionRepo(connection) },
19
20
  message: new message_1.MessageRepo(connection),
20
21
  project: new project_1.ProjectRepo(connection),
21
- integrationSetting: new integration_1.IntegrationSettingRepo({ connection })
22
+ integrationSetting: new integration_1.IntegrationSettingRepo({ connection }),
23
+ setting: new setting_1.SettingRepo(connection)
22
24
  });
23
25
  };
24
26
  }
@@ -12,6 +12,7 @@ const categoryCode_1 = require("../../repo/categoryCode");
12
12
  const creativeWork_1 = require("../../repo/creativeWork");
13
13
  const credentials_1 = require("../../repo/credentials");
14
14
  const adminEvent_1 = require("../../repo/adminEvent");
15
+ const adminEventSeries_1 = require("../../repo/adminEventSeries");
15
16
  const eventSeries_1 = require("../../repo/eventSeries");
16
17
  const movieTheater_1 = require("../../repo/place/movieTheater");
17
18
  const screeningRoom_1 = require("../../repo/place/screeningRoom");
@@ -71,7 +72,7 @@ function call(params) {
71
72
  },
72
73
  categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
73
74
  creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
74
- eventSeries: new eventSeries_1.EventSeriesRepo(connection),
75
+ adminEventSeries: new adminEventSeries_1.AdminEventSeriesRepo(connection),
75
76
  movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
76
77
  masterService
77
78
  });
@@ -88,6 +89,7 @@ function call(params) {
88
89
  categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
89
90
  creativeWork: new creativeWork_1.CreativeWorkRepo(connection),
90
91
  adminEvent: new adminEvent_1.AdminEventRepo(connection),
92
+ adminEventSeries: new adminEventSeries_1.AdminEventSeriesRepo(connection),
91
93
  eventSeries: new eventSeries_1.EventSeriesRepo(connection),
92
94
  movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
93
95
  screeningRoom: new screeningRoom_1.ScreeningRoomRepo(connection),
@@ -239,7 +241,7 @@ function syncEvents(params) {
239
241
  titleCode,
240
242
  titleBranchNum
241
243
  });
242
- const eventSeries = (await repos.eventSeries.projectEventSeriesFields({
244
+ const eventSeries = (await repos.eventSeries.findEventSeries({
243
245
  id: { $eq: eventSeriesId },
244
246
  project: { id: { $eq: params.project.id } }
245
247
  }, [
@@ -247,7 +249,7 @@ function syncEvents(params) {
247
249
  'name', 'kanaName', 'alternativeHeadline', 'location',
248
250
  'organizer',
249
251
  // 'videoFormat', // 参照廃止(2026-02-10~)
250
- 'soundFormat', 'workPerformed',
252
+ 'workPerformed',
251
253
  'duration', 'endDate', 'startDate', 'coaInfo',
252
254
  'offers', 'additionalProperty'
253
255
  ])).shift();
@@ -19,6 +19,5 @@ export declare function createPotentialActions(params: {
19
19
  paymentMethods: factory.order.IReferencedInvoice[];
20
20
  potentialActions?: IPotentialActionsParams;
21
21
  }, setting: Pick<ISetting, 'defaultSenderEmail'>): Promise<{
22
- potentialActions?: never;
23
- emailMessages: factory.creativeWork.message.email.ICreativeWork[];
22
+ emailMessages: factory.action.transfer.send.message.email.IObjectAsEmailMessage[];
24
23
  }>;
@@ -10,10 +10,5 @@ async function createPotentialActions(params, setting) {
10
10
  const { emailMessages } = await (0, sendEmailMessage_1.createSendEmailMessageActions)(params, setting);
11
11
  return {
12
12
  emailMessages,
13
- // potentialActions: {
14
- // order: {
15
- // onOrderProcessing: { sendEmailMessage: sendEmailMessageActions } // optimize(2024-06-29~)
16
- // }
17
- // }
18
13
  };
19
14
  }
@@ -1,7 +1,7 @@
1
1
  import type { OfferRepo } from '../../../../repo/offer/unitPriceInCatalog';
2
2
  import { factory } from '../../../../factory';
3
3
  export type IAuthorizeEventServiceOffer = factory.action.authorize.offer.eventService.IAction;
4
- type IOrderAcceptedOffer = Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber' | 'priceSpecification' | 'id'>;
4
+ type IOrderAcceptedOffer = Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber' | 'priceSpecification' | 'id'>;
5
5
  interface IAcceptedOfferInResult extends Pick<factory.product.ITicketOffer, 'acceptedPaymentMethod' | 'id' | 'typeOf'> {
6
6
  typeOf: factory.offerType.Offer;
7
7
  id: string;
@@ -4,5 +4,5 @@ declare function validateInvoiceReferencesOrder(authorizePaymentActions: IAuthor
4
4
  /**
5
5
  * 受け入れられた興行オファー
6
6
  */
7
- eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered'>[]): void;
7
+ eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered'>[]): void;
8
8
  export { validateInvoiceReferencesOrder };
@@ -18,4 +18,4 @@ authorizedMovieTickets: IMovieTicket4validate[],
18
18
  /**
19
19
  * 受け入れられた興行オファー
20
20
  */
21
- eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[]): void;
21
+ eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[]): void;
@@ -8,7 +8,7 @@ export { IAcceptPayAction, IAuthorizeEventServiceOffer, IAuthorizePaymentAction,
8
8
  */
9
9
  export declare function validateTransaction(transaction: {
10
10
  id: string;
11
- }, acceptPayActions: IAcceptPayAction[], authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], eventReservationAcceptedOffers: Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[], payTransactions: IPayTransaction[], customer: factory.order.ICustomer, options: {
11
+ }, acceptPayActions: IAcceptPayAction[], authorizePaymentActions: IAuthorizePaymentAction[], authorizeEventServiceOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[], eventReservationAcceptedOffers: Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'priceSpecification'>[], payTransactions: IPayTransaction[], customer: factory.order.ICustomer, options: {
12
12
  paymentMethodIdByTransaction?: string;
13
13
  }): void;
14
14
  /**
@@ -18,7 +18,7 @@ export declare function validateAcceptedOffers(params: {
18
18
  result: {
19
19
  order: PlaceOrderFactory.IResultOrderParams;
20
20
  };
21
- acceptedOffers: (Pick<factory.order.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber'>)[];
21
+ acceptedOffers: (Pick<factory.acceptedOffer.IAcceptedOffer, 'itemOffered' | 'offeredThrough' | 'serialNumber'>)[];
22
22
  }): void;
23
23
  export declare function validateOrderedItem(params: {
24
24
  order: Pick<factory.order.IOrder, 'orderedItem'>;
@@ -297,17 +297,12 @@ function createReservationIdsResult(order, acceptedOffers) {
297
297
  function createResult(params, options) {
298
298
  const transaction = params.transaction;
299
299
  const eventReservationAcceptedOffers = [];
300
- // const productAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IPermit>[] = [];
301
- // const moneyTransferAcceptedOffers: factory.order.IAcceptedOffer<factory.order.IMoneyTransfer>[] = [];
302
300
  params.acceptedOffers.forEach((acceptedOffer) => {
303
301
  const itemOfferedTypeOf = acceptedOffer.itemOffered.typeOf;
304
302
  switch (itemOfferedTypeOf) {
305
303
  case factory_1.factory.reservationType.EventReservation:
306
304
  eventReservationAcceptedOffers.push((acceptedOffer));
307
305
  break;
308
- // case factory.permit.PermitType.Permit:
309
- // productAcceptedOffers.push((acceptedOffer as factory.order.IAcceptedOffer<factory.order.IPermit>));
310
- // break;
311
306
  default:
312
307
  throw new factory_1.factory.errors.NotImplemented(`${itemOfferedTypeOf} not implemented`);
313
308
  }
@@ -15,6 +15,6 @@ type ICustomSellerReturnPolicy = Pick<factory.sellerReturnPolicy.ISellerReturnPo
15
15
  applicablePaymentMethod?: never;
16
16
  merchantReturnDays?: never;
17
17
  };
18
- type IFixedAcceptedOffer = Pick<factory.order.IAcceptedOffer, 'id' | 'priceSpecification' | 'itemOffered'>;
18
+ type IFixedAcceptedOffer = Pick<factory.acceptedOffer.IAcceptedOffer, 'id' | 'priceSpecification' | 'itemOffered'>;
19
19
  type IFixedOrder = Pick<factory.order.IOrder, 'confirmationNumber' | 'dateReturned' | 'orderDate' | 'orderNumber' | 'orderStatus' | 'paymentMethods' | 'price' | 'project' | 'seller' | 'typeOf'>;
20
20
  export { IAvailableSellerReturnPolicy, ICustomSellerReturnPolicy, IFixedAcceptedOffer, IFixedOrder };
@@ -36,8 +36,7 @@ function preStart(params) {
36
36
  let events = [];
37
37
  if (eventIds.length > 0) {
38
38
  events = await repos.event.projectEventFields({
39
- id: { $in: eventIds },
40
- typeOf: factory_1.factory.eventType.ScreeningEvent
39
+ id: { $in: eventIds }
41
40
  }, ['startDate']);
42
41
  }
43
42
  let returnPolicies = [];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.1090.0",
13
13
  "@aws-sdk/credential-providers": "3.1090.0",
14
- "@chevre/factory": "11.0.0-alpha.1",
14
+ "@chevre/factory": "11.1.0-alpha.9",
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",
@@ -88,5 +88,5 @@
88
88
  "postversion": "git push origin --tags",
89
89
  "prepublishOnly": "npm run clean && npm run build"
90
90
  },
91
- "version": "28.0.0-alpha.4"
91
+ "version": "28.0.0-alpha.40"
92
92
  }
@@ -1,28 +0,0 @@
1
- import type { Connection } from 'mongoose';
2
- import { factory } from '../factory';
3
- import { IModel } from './mongoose/schemas/accountTitle';
4
- /**
5
- * 科目リポジトリ
6
- */
7
- export declare class AccountTitleRepo {
8
- readonly accountTitleModel: IModel;
9
- constructor(connection: Connection);
10
- deleteByProject(params: {
11
- project: {
12
- id: string;
13
- };
14
- }): Promise<void>;
15
- getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, factory.accountTitle.IAccountTitle, import("./mongoose/virtuals").IVirtuals, {}> & factory.accountTitle.IAccountTitle & {
16
- _id: import("mongoose").Types.ObjectId;
17
- } & {
18
- __v: number;
19
- }, import("mongoose").QueryOptions<factory.accountTitle.IAccountTitle>, (import("mongoose").Document<unknown, Record<string, never>, factory.accountTitle.IAccountTitle, import("./mongoose/virtuals").IVirtuals, {}> & factory.accountTitle.IAccountTitle & {
20
- _id: import("mongoose").Types.ObjectId;
21
- } & {
22
- __v: number;
23
- }) | null>;
24
- unsetUnnecessaryFields(params: {
25
- filter: any;
26
- $unset: any;
27
- }): Promise<import("mongoose").UpdateWriteOpResult>;
28
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountTitleRepo = void 0;
4
- const factory_1 = require("../factory");
5
- const accountTitle_1 = require("./mongoose/schemas/accountTitle");
6
- /**
7
- * 科目リポジトリ
8
- */
9
- class AccountTitleRepo {
10
- accountTitleModel;
11
- constructor(connection) {
12
- this.accountTitleModel = connection.model(accountTitle_1.modelName, (0, accountTitle_1.createSchema)());
13
- }
14
- async deleteByProject(params) {
15
- await this.accountTitleModel.deleteMany({
16
- 'project.id': { $exists: true, $eq: params.project.id }
17
- })
18
- .exec();
19
- }
20
- getCursor(conditions, projection) {
21
- return this.accountTitleModel.find(conditions, projection)
22
- .sort({ codeValue: factory_1.factory.sortType.Descending })
23
- .cursor();
24
- }
25
- async unsetUnnecessaryFields(params) {
26
- return this.accountTitleModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
27
- .exec();
28
- }
29
- }
30
- exports.AccountTitleRepo = AccountTitleRepo;
@@ -1,17 +0,0 @@
1
- import type { ProjectRepo } from '../../repo/project';
2
- import type { ReservationRepo } from '../../repo/reservation';
3
- import type { TaskRepo } from '../../repo/task';
4
- export type IAggregateOperation<T> = (repos: {
5
- project: ProjectRepo;
6
- reservation: ReservationRepo;
7
- task: TaskRepo;
8
- }) => Promise<T>;
9
- export declare function aggregate(params: {
10
- project: {
11
- id: string;
12
- };
13
- reservationFor: {
14
- startFrom: Date;
15
- startThrough: Date;
16
- };
17
- }): IAggregateOperation<void>;