@chevre/factory 8.1.0-alpha.5 → 8.1.0-alpha.6

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.
@@ -1,37 +1,37 @@
1
1
  import { IParticipantAsProject, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { AssetTransactionType } from '../../assetTransactionType';
4
- import { EventType } from '../../eventType';
5
4
  import { IOrder } from '../../order';
6
- import { IAvailableReservationStatusType } from '../../reservation';
5
+ import { ReservationStatusType } from '../../reservationStatusType';
7
6
  import { ReservationType } from '../../reservationType';
8
7
  import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
9
8
  import { IAction as IReturnReserveTransactionAction } from '../transfer/return/reserveTransaction';
10
9
  export type IAgent = IParticipantAsProject;
10
+ /**
11
+ * 予約取引中止、あるいは、予約番号による予約取消取引確定時のオブジェクト
12
+ */
11
13
  export interface IReservationPackageAsObject {
12
- reservationFor: {
13
- typeOf: EventType.ScreeningEvent;
14
- id: string;
15
- };
14
+ id?: never;
15
+ reservationFor?: never;
16
16
  reservationNumber: string;
17
17
  /**
18
18
  * previousReservationStatusを変更時に指定するために必要
19
19
  */
20
- reservationStatus: IAvailableReservationStatusType;
20
+ reservationStatus: ReservationStatusType.ReservationConfirmed | ReservationStatusType.ReservationPending;
21
21
  typeOf: ReservationType.ReservationPackage;
22
22
  }
23
+ /**
24
+ * 予約IDによる予約取消取引確定時のオブジェクト
25
+ */
23
26
  export interface IEventReservationAsObject {
24
27
  id: string;
25
28
  issuedThrough?: never;
26
- reservationFor: {
27
- typeOf: EventType.ScreeningEvent;
28
- id: string;
29
- };
29
+ reservationFor?: never;
30
30
  reservationNumber: string;
31
31
  /**
32
32
  * previousReservationStatusを変更時に指定するために必要
33
33
  */
34
- reservationStatus: IAvailableReservationStatusType;
34
+ reservationStatus: ReservationStatusType.ReservationConfirmed;
35
35
  typeOf: ReservationType.EventReservation;
36
36
  }
37
37
  export type IObject = IEventReservationAsObject | IReservationPackageAsObject;
@@ -40,10 +40,11 @@ export interface IResult {
40
40
  export interface IPurpose {
41
41
  /**
42
42
  * 取引タイプ
43
+ * 予約取引中止、あるいは、予約取消取引確定時にアクションが発生する
43
44
  */
44
45
  typeOf: AssetTransactionType.Reserve | AssetTransactionType.CancelReservation;
45
46
  /**
46
- * 取引ID
47
+ * 取引(Reserve or CancelReservation)ID
47
48
  */
48
49
  id: string;
49
50
  }
@@ -1,7 +1,8 @@
1
- import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../action';
1
+ import { IParticipantAsProject, IAction as IBaseAction, IAttributes as IBaseAttributes, ISameAs } from '../action';
2
2
  import { ActionType } from '../actionType';
3
3
  import { ISimpleOrder } from '../order';
4
4
  import { IOrderAsMainEntity, IReportDocument } from '../report/accountingReport';
5
+ export type IAgent = IParticipantAsProject;
5
6
  export type IObjectAsAccountingReport = Pick<IReportDocument, 'typeOf'> & {
6
7
  mainEntity: Pick<IOrderAsMainEntity, 'orderNumber'>;
7
8
  };
@@ -11,9 +12,14 @@ export interface IResult {
11
12
  export type IPurposeAsOrder = ISimpleOrder;
12
13
  export type IPurpose = IPurposeAsOrder;
13
14
  export interface IAttributes extends Pick<IBaseAttributes<ActionType.CreateAction, IObject, IResult>, 'agent' | 'error' | 'object' | 'project' | 'purpose' | 'sameAs' | 'typeOf'> {
14
- purpose?: IPurpose;
15
+ agent: IAgent;
16
+ purpose: IPurpose;
17
+ /**
18
+ * 必ずCreateAccountingReportタスクからアクションが発生する
19
+ */
20
+ sameAs: ISameAs;
15
21
  }
16
22
  /**
17
- * 作成アクション
23
+ * 経理レポート作成アクション
18
24
  */
19
25
  export type IAction = IBaseAction<IAttributes>;
@@ -11,16 +11,13 @@ export declare enum ActionType {
11
11
  CreateAction = "CreateAction",
12
12
  DeleteAction = "DeleteAction",
13
13
  InformAction = "InformAction",
14
- MoneyTransfer = "MoneyTransfer",
15
14
  OrderAction = "OrderAction",
16
15
  PayAction = "PayAction",
17
16
  RefundAction = "RefundAction",
18
- RegisterAction = "RegisterAction",
19
17
  ReplaceAction = "ReplaceAction",
20
18
  ReserveAction = "ReserveAction",
21
19
  ReturnAction = "ReturnAction",
22
20
  SendAction = "SendAction",
23
- UnRegisterAction = "UnRegisterAction",
24
21
  UpdateAction = "UpdateAction",
25
22
  UseAction = "UseAction"
26
23
  }
@@ -15,16 +15,16 @@ var ActionType;
15
15
  ActionType["CreateAction"] = "CreateAction";
16
16
  ActionType["DeleteAction"] = "DeleteAction";
17
17
  ActionType["InformAction"] = "InformAction";
18
- ActionType["MoneyTransfer"] = "MoneyTransfer";
18
+ // MoneyTransfer = 'MoneyTransfer', // discontinue(2026-05-09~)
19
19
  ActionType["OrderAction"] = "OrderAction";
20
20
  ActionType["PayAction"] = "PayAction";
21
21
  ActionType["RefundAction"] = "RefundAction";
22
- ActionType["RegisterAction"] = "RegisterAction";
22
+ // RegisterAction = 'RegisterAction', // discontinue(2026-05-09~)
23
23
  ActionType["ReplaceAction"] = "ReplaceAction";
24
24
  ActionType["ReserveAction"] = "ReserveAction";
25
25
  ActionType["ReturnAction"] = "ReturnAction";
26
26
  ActionType["SendAction"] = "SendAction";
27
- ActionType["UnRegisterAction"] = "UnRegisterAction";
27
+ // UnRegisterAction = 'UnRegisterAction', // discontinue(2026-05-09~)
28
28
  ActionType["UpdateAction"] = "UpdateAction";
29
29
  ActionType["UseAction"] = "UseAction";
30
30
  })(ActionType || (exports.ActionType = ActionType = {}));
@@ -17,8 +17,6 @@ import * as CreateActionFactory from './action/create';
17
17
  import * as ConfirmPayActionFactory from './action/interact/confirm/pay';
18
18
  import * as ConfirmReservationActionFactory from './action/interact/confirm/reservation';
19
19
  import * as InformActionFactory from './action/interact/inform';
20
- import * as RegisterActionFactory from './action/interact/register';
21
- import * as RegisterServiceActionFactory from './action/interact/register/service';
22
20
  import * as ReserveActionFactory from './action/reserve';
23
21
  import * as OrderActionFactory from './action/trade/order';
24
22
  import * as PayActionFactory from './action/trade/pay';
@@ -249,11 +247,6 @@ export declare namespace action {
249
247
  export import reservation = ConfirmReservationActionFactory;
250
248
  }
251
249
  export import inform = InformActionFactory;
252
- namespace register {
253
- export import IAction = RegisterActionFactory.IAction;
254
- export import IAttributes = RegisterActionFactory.IAttributes;
255
- export import service = RegisterServiceActionFactory;
256
- }
257
250
  }
258
251
  namespace trade {
259
252
  export import order = OrderActionFactory;
@@ -19,7 +19,6 @@ const CreateActionFactory = require("./action/create");
19
19
  const ConfirmPayActionFactory = require("./action/interact/confirm/pay");
20
20
  const ConfirmReservationActionFactory = require("./action/interact/confirm/reservation");
21
21
  const InformActionFactory = require("./action/interact/inform");
22
- const RegisterServiceActionFactory = require("./action/interact/register/service");
23
22
  const ReserveActionFactory = require("./action/reserve");
24
23
  const OrderActionFactory = require("./action/trade/order");
25
24
  const PayActionFactory = require("./action/trade/pay");
@@ -231,10 +230,6 @@ var action;
231
230
  confirm.reservation = ConfirmReservationActionFactory;
232
231
  })(confirm = interact.confirm || (interact.confirm = {}));
233
232
  interact.inform = InformActionFactory;
234
- let register;
235
- (function (register) {
236
- register.service = RegisterServiceActionFactory;
237
- })(register = interact.register || (interact.register = {}));
238
233
  })(interact = action.interact || (action.interact = {}));
239
234
  let trade;
240
235
  (function (trade) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "8.1.0-alpha.5",
3
+ "version": "8.1.0-alpha.6",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [
@@ -1,17 +0,0 @@
1
- import { IParticipantAsProject } from '../../../action';
2
- import { IPermit } from '../../../permit';
3
- import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../register';
4
- export type IAgent = IParticipantAsProject;
5
- export type IObject = IPermit;
6
- export type IResult = any;
7
- export interface IPotentialActions {
8
- moneyTransfer?: never;
9
- }
10
- export interface IAttributes extends IBaseAttributes<IObject, IResult> {
11
- agent: IAgent;
12
- potentialActions?: IPotentialActions;
13
- }
14
- /**
15
- * サービス登録アクション
16
- */
17
- export type IAction = IBaseAction<IAttributes>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,15 +0,0 @@
1
- import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
- import { ActionType } from '../../actionType';
3
- export type IAgent = IParticipant;
4
- export type IRecipient = IParticipant;
5
- export type IObject = any;
6
- export type IResult = any;
7
- export interface IPotentialActions {
8
- }
9
- export interface IAttributes<TObject, TResult> extends IBaseAttributes<ActionType.RegisterAction, TObject, TResult> {
10
- potentialActions?: IPotentialActions;
11
- }
12
- /**
13
- * 登録アクションインターフェース
14
- */
15
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = IBaseAction<TAttributes>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });