@chevre/factory 4.376.0 → 4.377.0-alpha.1

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
  /**
@@ -10,6 +10,7 @@ import * as ReservationFactory from '../reservation';
10
10
  import { IIssuedThrough as IBusReservationIssuedThrough, IReservation as IBusReservation, IReservationFor as IBusReservationReservationFor } from '../reservation/busReservation';
11
11
  import { IIssuedThrough as IEventReservationIssuedThrough, IReservation as IEventReservation, IReservationFor as IEventReservationReservationFor, ISubReservation as ISubReservation4eventReservation } from '../reservation/event';
12
12
  import { IReservation as IReservationPackage } from '../reservation/reservationPackage';
13
+ import { ReservationStatusType } from '../reservationStatusType';
13
14
  import { ReservationType } from '../reservationType';
14
15
  import { IUnitPriceOffer } from '../unitPriceOffer';
15
16
  export import IAgent = AssetTransactionFactory.IAgent;
@@ -245,6 +246,7 @@ export interface IObject extends Pick<IReservationPackage, 'broker' | 'provider'
245
246
  * 予約番号
246
247
  */
247
248
  reservationNumber: string;
249
+ reservationStatus: ReservationStatusType.ReservationPending;
248
250
  subReservation?: IObjectSubReservation[];
249
251
  /**
250
252
  * trueで固定(2023-07-19~)
@@ -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>;
@@ -1,15 +1,19 @@
1
- /**
2
- * 予約タスクファクトリー
3
- */
4
- import { IAttributes as IReserveActionAttributes } from '../action/reserve';
1
+ import { IObject } from '../action/reserve';
5
2
  import { IExtendId } from '../autoGenerated';
6
3
  import * as TaskFactory from '../task';
7
4
  import { TaskName } from '../taskName';
8
- export interface IData {
9
- actionAttributes: IReserveActionAttributes[];
5
+ export interface IPotentialReserveAction {
6
+ /**
7
+ * 予約番号だけあれば、自動的に予約取引を参照する
8
+ */
9
+ object: Pick<IObject, 'reservationNumber'>;
10
10
  }
11
+ export type IData = IPotentialReserveAction;
11
12
  export interface IAttributes extends TaskFactory.IAttributes {
12
13
  name: TaskName.Reserve;
13
14
  data: IData;
14
15
  }
16
+ /**
17
+ * 予約タスク
18
+ */
15
19
  export type ITask = IExtendId<IAttributes>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.376.0",
3
+ "version": "4.377.0-alpha.1",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",