@chevre/factory 4.399.0-alpha.3 → 4.399.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.
@@ -12,7 +12,7 @@ export interface IObjectAsProduct {
12
12
  productID: string;
13
13
  typeOf: ProductType;
14
14
  }
15
- export type IObject = IObjectAsNote | IObjectAsProduct;
15
+ export type IObject = IObjectAsNote[] | IObjectAsProduct[];
16
16
  export interface IAddedObject {
17
17
  id: string;
18
18
  typeOf: CreativeWorkType.NoteDigitalDocument | ProductType;
@@ -24,12 +24,12 @@ export interface IInstrument {
24
24
  }
25
25
  export interface ITargetCollectionAsNote {
26
26
  typeOf: CreativeWorkType.NoteDigitalDocument;
27
- about: Pick<INoteAbout, 'id' | 'typeOf'>;
27
+ about: Pick<INoteAbout, 'typeOf'>;
28
28
  }
29
29
  export interface ITargetCollectionAsProduct {
30
30
  typeOf: ProductType;
31
31
  }
32
- export type ITargetCollection = ITargetCollectionAsNote;
32
+ export type ITargetCollection = ITargetCollectionAsNote | ITargetCollectionAsProduct;
33
33
  export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.AddAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
34
34
  potentialActions?: never;
35
35
  instrument: IInstrument;
@@ -1,14 +1,22 @@
1
1
  import * as ActionFactory from '../../action';
2
2
  import { ActionType } from '../../actionType';
3
+ import { CreativeWorkType } from '../../creativeWorkType';
3
4
  export type IAgent = ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsSoftwareApplication;
4
5
  export type IObject = any;
5
6
  export type IResult = any;
6
7
  export type IReplacer = any;
7
- export interface IAttributes<TObject, TResult> extends Pick<ActionFactory.IAttributes<ActionType.ReplaceAction, TObject, TResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'replacer' | 'project' | 'potentialActions' | 'purpose' | 'object' | 'location' | 'instrument' | 'error' | 'description' | 'agent'> {
8
+ export interface IInstrument {
9
+ typeOf: CreativeWorkType.WebApplication | CreativeWorkType.SoftwareApplication;
10
+ id: string;
11
+ }
12
+ export type ITargetCollection = any;
13
+ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.ReplaceAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'replacer' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
8
14
  potentialActions?: never;
9
15
  replacer?: IReplacer;
16
+ instrument?: IInstrument;
17
+ targetCollection: ITargetCollection;
10
18
  }
11
19
  /**
12
20
  * 置換アクション
13
21
  */
14
- export type IAction<TAttributes extends IAttributes<IObject, IResult>> = ActionFactory.IAction<TAttributes>;
22
+ export type IAction = ActionFactory.IAction<IAttributes>;
@@ -0,0 +1,33 @@
1
+ import * as ActionFactory from '../../action';
2
+ import { ActionType } from '../../actionType';
3
+ import { IAbout as INoteAbout } from '../../creativeWork/noteDigitalDocument';
4
+ import { CreativeWorkType } from '../../creativeWorkType';
5
+ export type IAgent = ActionFactory.IParticipantAsPerson | ActionFactory.IParticipantAsWebApplication | ActionFactory.IParticipantAsSoftwareApplication;
6
+ export interface IObjectAsNote {
7
+ identifier: string;
8
+ typeOf: CreativeWorkType.NoteDigitalDocument;
9
+ }
10
+ export type IObject = IObjectAsNote[];
11
+ export interface IUpdatedObject {
12
+ id: string;
13
+ typeOf: CreativeWorkType.NoteDigitalDocument;
14
+ }
15
+ export type IResult = IUpdatedObject[];
16
+ export interface IInstrument {
17
+ typeOf: CreativeWorkType.WebApplication | CreativeWorkType.SoftwareApplication;
18
+ id: string;
19
+ }
20
+ export interface ITargetCollectionAsNote {
21
+ typeOf: CreativeWorkType.NoteDigitalDocument;
22
+ about: Pick<INoteAbout, 'typeOf'>;
23
+ }
24
+ export type ITargetCollection = ITargetCollectionAsNote;
25
+ export interface IAttributes extends Pick<ActionFactory.IAttributes<ActionType.UpdateAction, IObject, IResult>, 'typeOf' | 'targetCollection' | 'sameAs' | 'result' | 'project' | 'object' | 'instrument' | 'error' | 'agent'> {
26
+ potentialActions?: never;
27
+ instrument: IInstrument;
28
+ targetCollection: ITargetCollection;
29
+ }
30
+ /**
31
+ * 編集アクション
32
+ */
33
+ export type IAction = ActionFactory.IAction<IAttributes>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/lib/index.d.ts CHANGED
@@ -46,6 +46,7 @@ import * as AddActionFactory from './action/update/add';
46
46
  import * as DeleteActionFactory from './action/update/delete';
47
47
  import * as DeleteMemberActionFactory from './action/update/delete/member';
48
48
  import * as ReplaceActionFactory from './action/update/replace';
49
+ import * as UpdateActionFactory from './action/update/update';
49
50
  import { ActionStatusType } from './actionStatusType';
50
51
  import { ActionType } from './actionType';
51
52
  import * as AccountTitleFactory from './accountTitle';
@@ -333,6 +334,7 @@ export declare namespace action {
333
334
  export import member = DeleteMemberActionFactory;
334
335
  }
335
336
  export import replace = ReplaceActionFactory;
337
+ export import update = UpdateActionFactory;
336
338
  }
337
339
  namespace consume {
338
340
  namespace use {
package/lib/index.js CHANGED
@@ -45,6 +45,7 @@ var SendOrderActionFactory = require("./action/transfer/send/order");
45
45
  var AddActionFactory = require("./action/update/add");
46
46
  var DeleteMemberActionFactory = require("./action/update/delete/member");
47
47
  var ReplaceActionFactory = require("./action/update/replace");
48
+ var UpdateActionFactory = require("./action/update/update");
48
49
  var actionStatusType_1 = require("./actionStatusType");
49
50
  var actionType_1 = require("./actionType");
50
51
  var AccountTitleFactory = require("./accountTitle");
@@ -315,6 +316,8 @@ var action;
315
316
  deleteAction.member = DeleteMemberActionFactory;
316
317
  })(deleteAction = update.deleteAction || (update.deleteAction = {}));
317
318
  update.replace = ReplaceActionFactory;
319
+ // tslint:disable-next-line:no-shadowed-variable
320
+ update.update = UpdateActionFactory;
318
321
  })(update = action.update || (action.update = {}));
319
322
  var consume;
320
323
  (function (consume) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.399.0-alpha.3",
3
+ "version": "4.399.0-alpha.5",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",