@chevre/factory 10.3.0-alpha.4 → 10.3.0-alpha.5

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.
@@ -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
  * 編集アクション
@@ -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;
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.5",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "files": [