@chevre/factory 10.3.0-alpha.4 → 10.3.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,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'> {
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>;
@@ -23,11 +23,13 @@ export interface ITargetCollectionAsResource {
23
23
  typeOf: ProductType | OfferType.Offer | 'ProductModel' | CreativeWorkType.Movie | EventType;
24
24
  }
25
25
  export type ITargetCollection = ITargetCollectionAsNote | ITargetCollectionAsResource;
26
- export interface IAttributes extends Pick<IBaseAttributes<ActionType.AddAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
27
- potentialActions?: never;
28
- purpose?: never;
26
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.AddAction, IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'project' | 'object' | 'error'> {
27
+ agent: IAgent;
29
28
  instrument: IInstrument;
30
29
  targetCollection: ITargetCollection;
30
+ potentialActions?: never;
31
+ purpose?: never;
32
+ replacer?: never;
31
33
  }
32
34
  /**
33
35
  * 追加アクション
@@ -1,30 +1,18 @@
1
- import { IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
1
+ import { IParticipantAsProject, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
- import { IAbout as INoteAbout } from '../../creativeWork/noteDigitalDocument';
4
- import { CreativeWorkType } from '../../creativeWorkType';
5
- import { IPerson } from '../../person';
6
- import { IInstrumentAsApplication } from './instrumentAsApplication';
7
3
  import { IEvent as IEventSeries } from '../../event/eventSeries';
8
4
  import { IAggregateOffer } from '../../offer/aggregateOffer';
9
5
  import { IOfferCatalog } from '../../offerCatalog';
10
- import { IGood, IOwnershipInfo } from '../../ownershipInfo';
11
6
  import { IPlace as IMovieTheater } from '../../place/movieTheater';
12
7
  import { IPlace as IRoom } from '../../place/screeningRoom';
13
8
  import { IProduct } from '../../product';
14
9
  import { ISeller } from '../../seller';
15
10
  import { IObject as IPlaceOrderObject, ITransaction as IPlaceOrder } from '../../transaction/placeOrder';
16
11
  import { IObject as IReturnOrderObject, ITransaction as IReturnOrder } from '../../transaction/returnOrder';
17
- export type IAgent = IParticipant;
18
- export type IRecipient = IParticipant;
19
- export type IObjectAsPerson = Pick<IPerson, 'id' | 'typeOf'> & {
20
- /**
21
- * ユーザープールから物理削除するかどうか
22
- */
23
- physically?: boolean;
24
- };
25
- export type IObjectAsOwnershipInfo = Pick<IOwnershipInfo<IGood>, 'id' | 'identifier' | 'typeOf'> & {
26
- id: string;
27
- };
12
+ /**
13
+ * 削除者は現時点でプロジェクトのみ
14
+ */
15
+ export type IAgent = IParticipantAsProject;
28
16
  export type IObjectAsProduct = Pick<IProduct, 'id' | 'typeOf'>;
29
17
  export type IObjectAsOfferCatalog = Pick<IOfferCatalog, 'id' | 'typeOf'>;
30
18
  export type IObjectAsAggregateOffer = Pick<IAggregateOffer, 'id' | 'typeOf'>;
@@ -56,22 +44,18 @@ export type IObjectAsReturnOrder = Pick<IReturnOrder, 'id' | 'typeOf'> & {
56
44
  endDate?: never;
57
45
  project?: never;
58
46
  };
59
- export type IObject = IObjectAsProduct | IObjectAsOfferCatalog | IObjectAsAggregateOffer | IObjectAsSeller | IObjectAsMovieTheater | IObjectAsRoom | IObjectAsEventSeries | IObjectAsPerson | IObjectAsOwnershipInfo | IObjectAsPlaceOrder | IObjectAsReturnOrder;
60
- export interface IResultAsPerson {
61
- existingPeople?: any;
62
- }
63
- export type IResult = IResultAsPerson | any;
64
- export type IInstrument = IInstrumentAsApplication;
65
- export interface ITargetCollectionAsNote {
66
- typeOf: CreativeWorkType.NoteDigitalDocument;
67
- about: Pick<INoteAbout, 'typeOf'>;
68
- }
69
- export type ITargetCollection = ITargetCollectionAsNote;
70
- export interface IAttributes extends Pick<IBaseAttributes<ActionType.DeleteAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'replacer' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
47
+ export type IObject = IObjectAsProduct | IObjectAsOfferCatalog | IObjectAsAggregateOffer | IObjectAsSeller | IObjectAsMovieTheater | IObjectAsRoom | IObjectAsEventSeries | IObjectAsPlaceOrder | IObjectAsReturnOrder;
48
+ /**
49
+ * deleteクエリのレスポンスなど削除結果を定義するべきであるが、ひとまず汎用的に
50
+ */
51
+ export type IResult = any;
52
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.DeleteAction, IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'project' | 'object' | 'error'> {
53
+ agent: IAgent;
71
54
  potentialActions?: never;
72
55
  purpose?: never;
73
- instrument?: IInstrument;
74
- targetCollection?: ITargetCollection;
56
+ instrument?: never;
57
+ targetCollection?: never;
58
+ replacer?: never;
75
59
  }
76
60
  /**
77
61
  * 削除アクション
@@ -1,11 +1,13 @@
1
- import { IParticipantAsPerson, IParticipantAsWebApplication, IParticipantAsSoftwareApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
1
+ import { IParticipantAsProject, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { Identifier as WebAPIIdentifier, IService as IWebAPI } from '../../service/webAPI';
4
- import { IInstrumentAsApplication } from './instrumentAsApplication';
5
4
  import { EventType } from '../../eventType';
6
5
  import { OrganizationType } from '../../organizationType';
7
6
  import { PlaceType } from '../../placeType';
8
- export type IAgent = IParticipantAsPerson | IParticipantAsWebApplication | IParticipantAsSoftwareApplication;
7
+ /**
8
+ * 現時点で置換者はプロジェクトのみ
9
+ */
10
+ export type IAgent = IParticipantAsProject;
9
11
  interface IImportFromCOAParams {
10
12
  project: {
11
13
  id: string;
@@ -42,7 +44,6 @@ export interface IObjectAsMovieTheaterByCOA extends IImportFromCOAParams {
42
44
  }
43
45
  export type IObject = IObjectAsEventByCOA | IObjectAsMovieTheaterByCOA;
44
46
  export type IResult = any;
45
- export type IReplacer = any;
46
47
  export interface IInstrumentAsCOAAPI {
47
48
  theaterCode: string;
48
49
  begin?: string;
@@ -50,17 +51,21 @@ export interface IInstrumentAsCOAAPI {
50
51
  typeOf: IWebAPI<WebAPIIdentifier>['typeOf'];
51
52
  identifier: WebAPIIdentifier.COA;
52
53
  }
53
- export type IInstrument = IInstrumentAsApplication | IInstrumentAsCOAAPI;
54
- export type ITargetCollection = any;
55
- export interface IAttributes extends Pick<IBaseAttributes<ActionType.ReplaceAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'replacer' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
54
+ export type IInstrument = IInstrumentAsCOAAPI;
55
+ export interface ITargetCollection {
56
+ typeOf: EventType.ScreeningEvent | EventType.ScreeningEventSeries | PlaceType.MovieTheater;
57
+ }
58
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.ReplaceAction, IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'project' | 'object' | 'error'> {
59
+ agent: IAgent;
60
+ instrument: IInstrument;
61
+ targetCollection: ITargetCollection;
56
62
  potentialActions?: never;
57
63
  purpose?: never;
58
- replacer?: IReplacer;
59
- instrument?: IInstrument;
60
- targetCollection: ITargetCollection;
64
+ replacer?: never;
61
65
  }
62
66
  /**
63
67
  * 置換アクション
68
+ * COAリソースインポート時にのみ発生する
64
69
  */
65
70
  export type IAction = IBaseAction<IAttributes>;
66
71
  export {};
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
@@ -1,4 +1,4 @@
1
- import { IParticipantAsPerson, IParticipantAsWebApplication, IParticipantAsSoftwareApplication, IParticipantAsProject, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
1
+ import { IParticipantAsPerson, IParticipantAsWebApplication, IParticipantAsSoftwareApplication, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
3
  import { IInstrumentAsApplication } from './instrumentAsApplication';
4
4
  import { IObject } from './update/object';
@@ -7,17 +7,15 @@ import { ITargetCollection } from './update/targetCollection';
7
7
  export * from './update/object';
8
8
  export * from './update/result';
9
9
  export * from './update/targetCollection';
10
- export type IAgent = IParticipantAsPerson | IParticipantAsWebApplication | IParticipantAsSoftwareApplication | IParticipantAsProject;
11
- export interface IInstrumentAsTask {
12
- typeOf: 'Task';
13
- }
14
- export type IInstrument = IInstrumentAsApplication | IInstrumentAsTask;
15
- export interface IAttributes extends Pick<IBaseAttributes<ActionType.UpdateAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
16
- potentialActions?: never;
17
- purpose?: never;
10
+ export type IAgent = IParticipantAsPerson | IParticipantAsWebApplication | IParticipantAsSoftwareApplication;
11
+ export type IInstrument = IInstrumentAsApplication;
12
+ export interface IAttributes extends Pick<IBaseAttributes<ActionType.UpdateAction, IObject, IResult>, 'typeOf' | 'sameAs' | 'result' | 'project' | 'object' | 'error'> {
18
13
  agent: IAgent;
19
14
  instrument: IInstrument;
20
15
  targetCollection: ITargetCollection;
16
+ potentialActions?: never;
17
+ purpose?: never;
18
+ replacer?: never;
21
19
  }
22
20
  /**
23
21
  * 編集アクション
@@ -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,11 +1,8 @@
1
- import { IParticipantAsPerson, IParticipantAsSoftwareApplication, IParticipantAsWebApplication } from '../action';
2
1
  import { IExtendId } from '../autoGenerated';
3
2
  import { EventType } from '../eventType';
4
3
  import { ITaskAttributes } from '../task';
5
4
  import { TaskName } from '../taskName';
6
- export type IAgent = IParticipantAsPerson | IParticipantAsSoftwareApplication | IParticipantAsWebApplication;
7
5
  export interface IReplaceEventSeriesAction {
8
- agent: IAgent;
9
6
  object: {
10
7
  locationBranchCode: string;
11
8
  titleCode: string;
@@ -14,7 +11,6 @@ export interface IReplaceEventSeriesAction {
14
11
  };
15
12
  }
16
13
  export interface IReplaceEventsAction {
17
- agent: IAgent;
18
14
  object: {
19
15
  locationBranchCode: string;
20
16
  roomCode: string;
@@ -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.4",
3
+ "version": "10.3.0-alpha.6",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [