@chevre/factory 10.3.0-alpha.5 → 10.3.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.
@@ -4,6 +4,8 @@ import { PlaceType } from '../../../placeType';
4
4
  import { TicketType } from '../../../reservation';
5
5
  import { IReservation, IReservationForMinimized } from '../../../reservation/event';
6
6
  import { IAction as IBaseAction, IAttributes as IBaseAttributes } from '../use';
7
+ import { ActionStatusType } from './../../../actionStatusType';
8
+ import { SortType } from '../../../sortType';
7
9
  export type IAgent = IParticipantAsPerson | IParticipantAsWebApplication;
8
10
  /**
9
11
  * 予約使用アクションオブジェクト
@@ -22,8 +24,10 @@ export interface IReservationAsObject extends Pick<IReservation, 'id' | 'reserva
22
24
  reservedTicket?: never;
23
25
  }
24
26
  export type IObject = IReservationAsObject[];
25
- export interface IResult {
26
- }
27
+ /**
28
+ * 現時点でresultは存在しない(2026-08-14)
29
+ */
30
+ export type IResult = never;
27
31
  export interface ILocation {
28
32
  typeOf: PlaceType.Place;
29
33
  /**
@@ -38,19 +42,36 @@ export interface ITicketAsInstrument {
38
42
  */
39
43
  ticketToken?: string;
40
44
  typeOf: TicketType;
41
- /**
42
- * JWT
43
- * discontinue(2024-10-03~)
44
- */
45
- token?: never;
46
45
  }
47
46
  export type IInstrument = IOrderAsInstrument | ITicketAsInstrument;
48
- export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'agent' | 'error' | 'instrument' | 'location' | 'object' | 'project' | 'result' | 'typeOf' | 'error'> {
47
+ export interface IAttributes extends Pick<IBaseAttributes<IObject, IResult>, 'object' | 'project' | 'typeOf' | 'error'> {
49
48
  agent: IAgent;
50
49
  instrument: IInstrument[];
51
50
  location?: ILocation;
52
51
  }
53
52
  /**
54
- * use reservation action
53
+ * 予約使用アクション
55
54
  */
56
55
  export type IAction = IBaseAction<IAttributes>;
56
+ export interface IFindParams {
57
+ limit?: number;
58
+ page?: number;
59
+ sort?: {
60
+ startDate?: SortType;
61
+ };
62
+ startFrom?: Date;
63
+ startThrough?: Date;
64
+ project?: {
65
+ id?: {
66
+ $eq?: string;
67
+ };
68
+ };
69
+ actionStatus?: ActionStatusType;
70
+ id?: string;
71
+ object?: {
72
+ /**
73
+ * 予約ID
74
+ */
75
+ id?: string;
76
+ };
77
+ }
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,6 +1,7 @@
1
- import { IParticipantAsProject, IRecipientAsAnonymousWebApplication, IParticipantAsSeller, IParticipantAsWebApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
1
+ import { IParticipantAsProject, IParticipantAsWebApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { AssetTransactionType } from '../../assetTransactionType';
4
+ import { IEntryPoint } from '../../entryPoint';
4
5
  import { IOrder } from '../../order';
5
6
  import { ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
6
7
  import { IAccountTitleAsNotification } from '../../notification/accountTitle';
@@ -19,13 +20,6 @@ import { IRefundAction4inform } from '../../notification/refundAction';
19
20
  import { IReservation4inform } from '../../notification/reservation';
20
21
  import { ITask4inform } from '../../notification/task';
21
22
  export type IAgent = IParticipantAsProject;
22
- export type IRecipientAsWebApplicationDeprecated = Pick<IRecipientAsAnonymousWebApplication, 'id' | 'name' | 'typeOf'> & {
23
- url?: string;
24
- };
25
- export type IRecipientAsSellerDeprecated = Pick<IParticipantAsSeller, 'id' | 'name' | 'typeOf'> & {
26
- url?: string;
27
- };
28
- export type IRecipientDeprecated = IRecipientAsWebApplicationDeprecated | IRecipientAsSellerDeprecated;
29
23
  /**
30
24
  * redefine informAction.recipient(2025-02-15~)
31
25
  */
@@ -54,13 +48,14 @@ export interface IResult {
54
48
  statusCode?: number;
55
49
  useFetchAPI?: boolean;
56
50
  }
57
- export interface IAttributes<TObject extends IObject> extends Pick<IBaseAttributes<ActionType.InformAction, TObject, IResult>, 'agent' | 'object' | 'project' | 'purpose' | 'recipient' | 'result' | 'typeOf' | 'target'> {
51
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.InformAction, IObject, IResult>, 'object' | 'project' | 'result' | 'typeOf' | 'error'> {
58
52
  agent: IAgent;
59
- recipient: IRecipient | IRecipientDeprecated;
53
+ recipient: IRecipient;
54
+ target: IEntryPoint;
60
55
  purpose?: IPurpose;
61
56
  about?: IAbout;
62
57
  }
63
58
  /**
64
- * inform action
59
+ * 通知アクション
65
60
  */
66
- export type IAction<TAttributes extends IAttributes<IObject>> = IBaseAction<TAttributes>;
61
+ export type IAction = IBaseAction<IAttributes>;
@@ -4,6 +4,7 @@ import { IInstrumentAsApplication } from './instrumentAsApplication';
4
4
  import { IObject } from './update/object';
5
5
  import { IResult } from './update/result';
6
6
  import { ITargetCollection } from './update/targetCollection';
7
+ import { SortType } from '../../sortType';
7
8
  export * from './update/object';
8
9
  export * from './update/result';
9
10
  export * from './update/targetCollection';
@@ -21,3 +22,25 @@ export interface IAttributes extends Pick<IBaseAttributes<ActionType.UpdateActio
21
22
  * 編集アクション
22
23
  */
23
24
  export type IAction = IBaseAction<IAttributes>;
25
+ export interface IFindParams {
26
+ limit?: number;
27
+ page?: number;
28
+ sort?: {
29
+ startDate?: SortType;
30
+ };
31
+ startFrom?: Date;
32
+ startThrough?: Date;
33
+ project?: {
34
+ id?: {
35
+ $eq?: string;
36
+ };
37
+ };
38
+ id?: string;
39
+ typeOf?: ActionType.AddAction | ActionType.UpdateAction | ActionType.ReplaceAction | ActionType.DeleteAction;
40
+ object?: {
41
+ id?: string;
42
+ };
43
+ result?: {
44
+ id?: string;
45
+ };
46
+ }
@@ -2,22 +2,22 @@
2
2
  * アクションタイプ
3
3
  */
4
4
  export declare enum ActionType {
5
- AddAction = "AddAction",
6
5
  AcceptAction = "AcceptAction",
7
6
  AuthorizeAction = "AuthorizeAction",
8
7
  CancelAction = "CancelAction",
9
8
  CheckAction = "CheckAction",
10
9
  ConfirmAction = "ConfirmAction",
11
10
  CreateAction = "CreateAction",
12
- DeleteAction = "DeleteAction",
13
- InformAction = "InformAction",
14
11
  OrderAction = "OrderAction",
15
12
  PayAction = "PayAction",
16
13
  RefundAction = "RefundAction",
17
- ReplaceAction = "ReplaceAction",
18
14
  ReserveAction = "ReserveAction",
19
15
  ReturnAction = "ReturnAction",
20
16
  SendAction = "SendAction",
17
+ AddAction = "AddAction",
18
+ DeleteAction = "DeleteAction",
19
+ ReplaceAction = "ReplaceAction",
21
20
  UpdateAction = "UpdateAction",
21
+ InformAction = "InformAction",
22
22
  UseAction = "UseAction"
23
23
  }
@@ -6,25 +6,25 @@ exports.ActionType = void 0;
6
6
  */
7
7
  var ActionType;
8
8
  (function (ActionType) {
9
- ActionType["AddAction"] = "AddAction";
9
+ // 以下actionsで管理
10
10
  ActionType["AcceptAction"] = "AcceptAction";
11
11
  ActionType["AuthorizeAction"] = "AuthorizeAction";
12
12
  ActionType["CancelAction"] = "CancelAction";
13
13
  ActionType["CheckAction"] = "CheckAction";
14
14
  ActionType["ConfirmAction"] = "ConfirmAction";
15
15
  ActionType["CreateAction"] = "CreateAction";
16
- ActionType["DeleteAction"] = "DeleteAction";
17
- ActionType["InformAction"] = "InformAction";
18
- // MoneyTransfer = 'MoneyTransfer', // discontinue(2026-05-09~)
19
16
  ActionType["OrderAction"] = "OrderAction";
20
17
  ActionType["PayAction"] = "PayAction";
21
18
  ActionType["RefundAction"] = "RefundAction";
22
- // RegisterAction = 'RegisterAction', // discontinue(2026-05-09~)
23
- ActionType["ReplaceAction"] = "ReplaceAction";
24
19
  ActionType["ReserveAction"] = "ReserveAction";
25
20
  ActionType["ReturnAction"] = "ReturnAction";
26
21
  ActionType["SendAction"] = "SendAction";
27
- // UnRegisterAction = 'UnRegisterAction', // discontinue(2026-05-09~)
22
+ // 以下actions.updateで管理
23
+ ActionType["AddAction"] = "AddAction";
24
+ ActionType["DeleteAction"] = "DeleteAction";
25
+ ActionType["ReplaceAction"] = "ReplaceAction";
28
26
  ActionType["UpdateAction"] = "UpdateAction";
27
+ // 以下actions.??で管理
28
+ ActionType["InformAction"] = "InformAction";
29
29
  ActionType["UseAction"] = "UseAction";
30
30
  })(ActionType || (exports.ActionType = ActionType = {}));
@@ -1,4 +1,4 @@
1
- import { IAttributes as IInformActionAttributes, IOrderAsAbout, IPlaceOrderAsAbout, IRecipient, IRecipientDeprecated } from '../action/interact/inform';
1
+ import { IAttributes as IInformActionAttributes, IOrderAsAbout, IPlaceOrderAsAbout, IRecipient } from '../action/interact/inform';
2
2
  import { IExtendId } from '../autoGenerated';
3
3
  import { IEntryPoint } from '../entryPoint';
4
4
  import { IAccountTitleAsNotification } from '../notification/accountTitle';
@@ -18,25 +18,24 @@ import { IReservation4inform } from '../notification/reservation';
18
18
  import { ITask4inform } from '../notification/task';
19
19
  import { ITaskAttributes } from '../task';
20
20
  import { TaskName } from '../taskName';
21
- export type IDeprecatedRecipient = Pick<IRecipientDeprecated, 'id' | 'name' | 'typeOf'> & {
22
- url?: never;
23
- };
24
21
  /**
25
22
  * define strictly(2025-02-20~)
26
23
  */
27
24
  export type IAnyResourceAsObject = IOfferCatalogAsNotification | IEntranceGateAsNotification | IHasPOSAsNotification | IMovieTheaterAsNotification | IRoomAsNotification | IOfferAsNotification | IAccountTitleAsNotification | IProductAsNotification | ICategoryCodeAsNotification | IMovieAsNotification | INoteDigitalDocumentAsNotification | IPersonAsNotification | IEvent4inform2agg | IEventAsNotification | IEventSeriesAsNotification;
28
- export type IInformAnyResourceAction = Pick<IInformActionAttributes<IAnyResourceAsObject>, 'object' | 'about'> & {
25
+ export type IInformAnyResourceAction = Pick<IInformActionAttributes, 'about'> & {
26
+ object: IAnyResourceAsObject;
29
27
  /**
30
28
  * 通知識別子(2024-10-24~)
31
29
  */
32
30
  identifier?: string;
33
- recipient: IDeprecatedRecipient;
31
+ recipient: IRecipient;
34
32
  target: IEntryPoint;
35
33
  id?: never;
36
34
  typeOf?: never;
37
35
  purpose?: never;
38
36
  };
39
- export type IPotentialInformOrderAction = Pick<IInformActionAttributes<IOrder4inform>, 'object' | 'about'> & {
37
+ export type IPotentialInformOrderAction = Pick<IInformActionAttributes, 'about'> & {
38
+ object: IOrder4inform;
40
39
  /**
41
40
  * about required(2025-02-19~)
42
41
  */
@@ -45,13 +44,14 @@ export type IPotentialInformOrderAction = Pick<IInformActionAttributes<IOrder4in
45
44
  * 通知識別子(2024-10-24~)
46
45
  */
47
46
  identifier?: string;
48
- recipient: IDeprecatedRecipient;
47
+ recipient: IRecipient;
49
48
  target: IEntryPoint;
50
49
  id?: never;
51
50
  typeOf?: never;
52
51
  purpose?: never;
53
52
  };
54
- export type IPotentialInformReservationAction = Pick<IInformActionAttributes<IReservation4inform>, 'object' | 'about'> & {
53
+ export type IPotentialInformReservationAction = Pick<IInformActionAttributes, 'about'> & {
54
+ object: IReservation4inform;
55
55
  /**
56
56
  * about required(2025-02-19~)
57
57
  */
@@ -71,19 +71,21 @@ export type IPotentialInformReservationAction = Pick<IInformActionAttributes<IRe
71
71
  /**
72
72
  * support task(2025-08-03~)
73
73
  */
74
- export type IPotentialInformTaskAction = Pick<IInformActionAttributes<ITask4inform>, 'object'> & {
74
+ export interface IPotentialInformTaskAction {
75
+ object: ITask4inform;
75
76
  /**
76
77
  * 通知識別子
77
78
  */
78
79
  identifier: string;
79
- recipient: IDeprecatedRecipient;
80
+ recipient: IRecipient;
80
81
  target: IEntryPoint;
81
82
  id?: never;
82
83
  typeOf?: never;
83
84
  purpose?: never;
84
85
  about?: never;
85
- };
86
- export type IPotentialInformActionWithId = Pick<IInformActionAttributes<IPayAction4inform | IRefundAction4inform>, 'object' | 'purpose' | 'about'> & {
86
+ }
87
+ export type IPotentialInformActionWithId = Pick<IInformActionAttributes, 'purpose' | 'about'> & {
88
+ object: IPayAction4inform | IRefundAction4inform;
87
89
  identifier?: never;
88
90
  recipient?: never;
89
91
  target?: never;
@@ -91,7 +93,7 @@ export type IPotentialInformActionWithId = Pick<IInformActionAttributes<IPayActi
91
93
  * potentialAction id
92
94
  */
93
95
  id: string;
94
- typeOf: IInformActionAttributes<IPayAction4inform | IRefundAction4inform>['typeOf'];
96
+ typeOf: IInformActionAttributes['typeOf'];
95
97
  };
96
98
  export type IData = IInformAnyResourceAction | IPotentialInformOrderAction | IPotentialInformReservationAction | IPotentialInformActionWithId | IPotentialInformTaskAction;
97
99
  export interface IAttributes extends ITaskAttributes {
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "10.3.0-alpha.5",
3
+ "version": "10.3.0-alpha.7",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [