@chevre/factory 4.377.0-alpha.0 → 4.377.0-alpha.2

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.
@@ -35,9 +35,6 @@ export interface IBusReservationAsObject {
35
35
  reservationStatus: IAvailableReservationStatusType;
36
36
  typeOf: ReservationType.BusReservation;
37
37
  }
38
- /**
39
- * 予約取消対象
40
- */
41
38
  export interface IEventReservationAsObject {
42
39
  id: string;
43
40
  issuedThrough?: {
@@ -55,27 +52,19 @@ export interface IEventReservationAsObject {
55
52
  typeOf: ReservationType.EventReservation;
56
53
  }
57
54
  export type IObject = IBusReservationAsObject | IEventReservationAsObject | IReservationPackageAsObject;
58
- /**
59
- * 予約取消結果
60
- */
61
- export type IResult = any;
62
- /**
63
- * 予約取消目的
64
- */
55
+ export interface IResult {
56
+ }
65
57
  export interface IPurpose {
66
58
  /**
67
59
  * 取引タイプ
68
60
  */
69
- typeOf: AssetTransactionType;
61
+ typeOf: AssetTransactionType.Reserve | AssetTransactionType.CancelReservation;
70
62
  /**
71
63
  * 取引ID
72
64
  */
73
65
  id: string;
74
66
  }
75
- /**
76
- * アクション属性
77
- */
78
- export interface IAttributes extends ActionFactory.IAttributes<ActionType.CancelAction, IObject, IResult> {
67
+ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.CancelAction, IObject, IResult>, 'typeOf' | 'result' | 'purpose' | 'project' | 'object' | 'agent'> {
79
68
  agent: IAgent;
80
69
  purpose: IPurpose;
81
70
  }
@@ -58,8 +58,14 @@ export interface IObject extends Pick<IReservationPackage, 'reservationNumber' |
58
58
  export interface IConfirmParams {
59
59
  id: string;
60
60
  }
61
+ export interface IPotentialCancelAction extends ICancelReservationActionAttributes {
62
+ purpose: {
63
+ id: string;
64
+ typeOf: AssetTransactionType.CancelReservation;
65
+ };
66
+ }
61
67
  export interface IPotentialActions {
62
- cancelReservation: ICancelReservationActionAttributes[];
68
+ cancelReservation: IPotentialCancelAction[];
63
69
  }
64
70
  export type ITransaction = IExtendId<IAttributes>;
65
71
  /**
@@ -1,4 +1,3 @@
1
- import * as ReserveActionFactory from '../action/reserve';
2
1
  import { IPointAward } from '../action/transfer/moneyTransfer';
3
2
  import { ActionType } from '../actionType';
4
3
  import * as AssetTransactionFactory from '../assetTransaction';
@@ -10,6 +9,7 @@ import * as ReservationFactory from '../reservation';
10
9
  import { IIssuedThrough as IBusReservationIssuedThrough, IReservation as IBusReservation, IReservationFor as IBusReservationReservationFor } from '../reservation/busReservation';
11
10
  import { IIssuedThrough as IEventReservationIssuedThrough, IReservation as IEventReservation, IReservationFor as IEventReservationReservationFor, ISubReservation as ISubReservation4eventReservation } from '../reservation/event';
12
11
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
12
+ import { ReservationStatusType } from '../reservationStatusType';
13
13
  import { ReservationType } from '../reservationType';
14
14
  import { IUnitPriceOffer } from '../unitPriceOffer';
15
15
  export import IAgent = AssetTransactionFactory.IAgent;
@@ -245,6 +245,7 @@ export interface IObject extends Pick<IReservationPackage, 'broker' | 'provider'
245
245
  * 予約番号
246
246
  */
247
247
  reservationNumber: string;
248
+ reservationStatus: ReservationStatusType.ReservationPending;
248
249
  subReservation?: IObjectSubReservation[];
249
250
  /**
250
251
  * trueで固定(2023-07-19~)
@@ -253,7 +254,6 @@ export interface IObject extends Pick<IReservationPackage, 'broker' | 'provider'
253
254
  useHoldStockByTransactionNumber?: boolean;
254
255
  }
255
256
  export interface IPotentialActions {
256
- reserve: ReserveActionFactory.IAttributes[];
257
257
  }
258
258
  export interface IAttributes extends AssetTransactionFactory.IAttributes<IStartParams, IResult, IError, IPotentialActions> {
259
259
  }
@@ -1,15 +1,19 @@
1
- /**
2
- * 仮予約キャンセルタスクファクトリー
3
- */
4
- import { IAttributes as ICancelReservationActionAttributes } from '../action/cancel/reservation';
1
+ import { IPurpose } from '../action/cancel/reservation';
2
+ import { AssetTransactionType } from '../assetTransactionType';
5
3
  import { IExtendId } from '../autoGenerated';
6
4
  import * as TaskFactory from '../task';
7
5
  import { TaskName } from '../taskName';
6
+ export interface ICancelPurpose extends IPurpose {
7
+ typeOf: AssetTransactionType.Reserve;
8
+ }
8
9
  export interface IData {
9
- actionAttributes: ICancelReservationActionAttributes[];
10
+ purpose: ICancelPurpose;
10
11
  }
11
12
  export interface IAttributes extends TaskFactory.IAttributes {
12
13
  name: TaskName.CancelPendingReservation;
13
14
  data: IData;
14
15
  }
16
+ /**
17
+ * 保留予約取消タスク
18
+ */
15
19
  export type ITask = IExtendId<IAttributes>;
@@ -1,15 +1,22 @@
1
- /**
2
- * 予約キャンセルタスクファクトリー
3
- */
4
1
  import { IAttributes as ICancelReservationActionAttributes } from '../action/cancel/reservation';
2
+ import { AssetTransactionType } from '../assetTransactionType';
5
3
  import { IExtendId } from '../autoGenerated';
6
4
  import * as TaskFactory from '../task';
7
5
  import { TaskName } from '../taskName';
6
+ export interface IPotentialCancelAction extends ICancelReservationActionAttributes {
7
+ purpose: {
8
+ id: string;
9
+ typeOf: AssetTransactionType.CancelReservation;
10
+ };
11
+ }
8
12
  export interface IData {
9
- actionAttributes: ICancelReservationActionAttributes[];
13
+ actionAttributes: IPotentialCancelAction[];
10
14
  }
11
15
  export interface IAttributes extends TaskFactory.IAttributes {
12
16
  name: TaskName.CancelReservation;
13
17
  data: IData;
14
18
  }
19
+ /**
20
+ * 予約取消タスク
21
+ */
15
22
  export type ITask = IExtendId<IAttributes>;
@@ -8,9 +8,7 @@ export interface IPotentialReserveAction {
8
8
  */
9
9
  object: Pick<IObject, 'reservationNumber'>;
10
10
  }
11
- export interface IData {
12
- actionAttributes: IPotentialReserveAction[];
13
- }
11
+ export type IData = IPotentialReserveAction;
14
12
  export interface IAttributes extends TaskFactory.IAttributes {
15
13
  name: TaskName.Reserve;
16
14
  data: IData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.377.0-alpha.0",
3
+ "version": "4.377.0-alpha.2",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",