@chevre/domain 22.14.0-alpha.4 → 22.14.0-alpha.7

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.
@@ -2,7 +2,7 @@ import { factory as surfrockFactory } from '@surfrock/sdk';
2
2
  import { Connection, FilterQuery, UpdateQuery } from 'mongoose';
3
3
  import * as factory from '../factory';
4
4
  export type IAction4transaction<T extends factory.actionType.AcceptAction | factory.actionType.AuthorizeAction> = T extends factory.actionType.AcceptAction ? factory.action.accept.coaOffer.IAction | factory.action.accept.pay.IAction : T extends factory.actionType.AuthorizeAction ? (factory.action.authorize.offer.eventService.IAction | factory.action.authorize.offer.moneyTransfer.IAction | factory.action.authorize.offer.product.IAction | factory.action.authorize.paymentMethod.any.IAction) : never;
5
- export type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AcceptAction ? IAction4transaction<factory.actionType.AcceptAction> : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : T extends factory.actionType.CheckAction ? (factory.action.check.paymentMethod.movieTicket.IAction | factory.action.check.token.IAction) : T extends factory.actionType.MoneyTransfer ? factory.action.transfer.moneyTransfer.IAction : T extends factory.actionType.ReplaceAction ? factory.action.update.replace.IAction<factory.action.update.replace.IAttributes<any, any>> : T extends factory.actionType.InformAction ? factory.action.interact.inform.IAction<factory.action.interact.inform.IAttributes<factory.action.interact.inform.IObject>> & {
5
+ export type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AcceptAction ? IAction4transaction<factory.actionType.AcceptAction> : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : T extends factory.actionType.CheckAction ? (factory.action.check.paymentMethod.movieTicket.IAction | factory.action.check.token.IAction) : T extends factory.actionType.MoneyTransfer ? factory.action.transfer.moneyTransfer.IAction : T extends factory.actionType.AddAction ? factory.action.update.add.IAction : T extends factory.actionType.ReplaceAction ? factory.action.update.replace.IAction : T extends factory.actionType.UpdateAction ? factory.action.update.update.IAction : T extends factory.actionType.InformAction ? factory.action.interact.inform.IAction<factory.action.interact.inform.IAttributes<factory.action.interact.inform.IObject>> & {
6
6
  error?: any;
7
7
  purpose?: never;
8
8
  } : factory.action.IAction<factory.action.IAttributes<T, any, any>>;
@@ -63,7 +63,8 @@ function importFromCOA(params) {
63
63
  object: Object.assign(Object.assign({}, params), { startDate: `${moment(targetImportFrom) // debug(2024-04-26~)
64
64
  .toISOString()}/${moment(targetImportThrough)
65
65
  .toISOString()}`, superEvent: { location: { branchCode: params.locationBranchCode } }, typeOf: factory.eventType.ScreeningEvent }),
66
- instrument
66
+ instrument,
67
+ targetCollection: { typeOf: factory.eventType.ScreeningEvent }
67
68
  };
68
69
  const action = yield repos.action.start(actionAttributes);
69
70
  let savedScreeningEventsCount = 0;
@@ -150,7 +151,8 @@ function processUpdateMovieTheater(params) {
150
151
  theaterCode: params.locationBranchCode,
151
152
  typeOf: 'WebAPI',
152
153
  identifier: factory.service.webAPI.Identifier.COA
153
- }
154
+ },
155
+ targetCollection: { typeOf: factory.placeType.MovieTheater }
154
156
  };
155
157
  const action = yield repos.action.start(actionAttributes);
156
158
  let seller;
@@ -345,6 +347,12 @@ function createScreeningEvents(params) {
345
347
  // tslint:disable-next-line:max-func-body-length
346
348
  return (repos) => __awaiter(this, void 0, void 0, function* () {
347
349
  const project = params.project;
350
+ if (typeof params.instrument.begin !== 'string') {
351
+ throw new factory.errors.ArgumentNull('instrument.begin');
352
+ }
353
+ if (typeof params.instrument.end !== 'string') {
354
+ throw new factory.errors.ArgumentNull('instrument.end');
355
+ }
348
356
  // COAからイベント取得;
349
357
  const schedulesFromCOA = yield repos.masterService.schedule({
350
358
  theaterCode: params.instrument.theaterCode,
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": "4.399.0-alpha.3",
14
+ "@chevre/factory": "4.399.0-alpha.6",
15
15
  "@cinerino/sdk": "12.2.0",
16
16
  "@motionpicture/coa-service": "9.6.0",
17
17
  "@motionpicture/gmo-service": "5.4.0-alpha.1",
@@ -115,5 +115,5 @@
115
115
  "postversion": "git push origin --tags",
116
116
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
117
117
  },
118
- "version": "22.14.0-alpha.4"
118
+ "version": "22.14.0-alpha.7"
119
119
  }