@chevre/factory 4.398.0 → 4.399.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.
@@ -3,25 +3,46 @@ import { CreativeWorkType } from '../creativeWorkType';
3
3
  import { IOrder } from '../order';
4
4
  import { OrganizationType } from '../organizationType';
5
5
  import { IPerson } from '../person';
6
+ import { IProduct } from '../product';
6
7
  import { IProject } from '../project';
7
8
  import { SortType } from '../sortType';
8
9
  export type IAboutAsOrder = Pick<IOrder, 'orderNumber' | 'typeOf'> & {
9
10
  id: string;
10
11
  };
11
- export type IAbout = IAboutAsOrder;
12
+ export type IAboutAsProduct = Pick<IProduct, 'typeOf'> & {
13
+ id: string;
14
+ };
15
+ export type IAbout = IAboutAsOrder | IAboutAsProduct;
12
16
  export type ICreator = Pick<IPerson, 'id' | 'typeOf'>;
13
17
  export type IEditor = Pick<IPerson, 'id' | 'typeOf'>;
14
- export interface IProvider {
18
+ export interface IProviderAsSeller {
15
19
  /**
16
20
  * 販売者ID
17
21
  */
18
22
  id: string;
19
23
  typeOf: OrganizationType.Corporation;
20
24
  }
21
- /**
22
- * メモ
23
- */
24
- export interface INoteDigitalDocument extends Pick<CreativeWorkFactory.ICreativeWork, 'id' | 'typeOf'> {
25
+ export interface IProviderAsProject {
26
+ /**
27
+ * プロジェクトID
28
+ */
29
+ id: string;
30
+ typeOf: OrganizationType.Project;
31
+ }
32
+ export declare enum DigitalDocumentPermissionType {
33
+ ReadPermission = "ReadPermission",
34
+ WritePermission = "WritePermission"
35
+ }
36
+ export interface IPermissionGrantee {
37
+ typeOf: 'Audience';
38
+ audienceType: 'public';
39
+ }
40
+ export interface IDigitalDocumentPermission {
41
+ typeOf: 'DigitalDocumentPermission';
42
+ permissionType: DigitalDocumentPermissionType;
43
+ grantee: IPermissionGrantee;
44
+ }
45
+ export interface INoteCommonAttributes extends Pick<CreativeWorkFactory.ICreativeWork, 'id' | 'typeOf'> {
25
46
  /**
26
47
  * メモ識別子
27
48
  */
@@ -31,7 +52,6 @@ export interface INoteDigitalDocument extends Pick<CreativeWorkFactory.ICreative
31
52
  */
32
53
  text: string;
33
54
  project: Pick<IProject, 'id' | 'typeOf'>;
34
- about: IAbout;
35
55
  dateCreated: Date;
36
56
  dateModified?: Date;
37
57
  /**
@@ -42,13 +62,25 @@ export interface INoteDigitalDocument extends Pick<CreativeWorkFactory.ICreative
42
62
  * 変更者
43
63
  */
44
64
  editor?: IEditor;
45
- provider: IProvider;
46
65
  /**
47
66
  * バージョン
48
67
  */
49
68
  version: string;
50
69
  typeOf: CreativeWorkType.NoteDigitalDocument;
70
+ hasDigitalDocumentPermission?: IDigitalDocumentPermission[];
71
+ }
72
+ export interface INoteAboutOrder extends INoteCommonAttributes {
73
+ about: IAboutAsOrder;
74
+ provider: IProviderAsSeller;
51
75
  }
76
+ export interface INoteAboutProduct extends INoteCommonAttributes {
77
+ about: IAboutAsProduct;
78
+ provider: IProviderAsProject;
79
+ }
80
+ /**
81
+ * メモ
82
+ */
83
+ export type INoteDigitalDocument = INoteAboutOrder | INoteAboutProduct;
52
84
  /**
53
85
  * ソート条件
54
86
  */
@@ -1,2 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DigitalDocumentPermissionType = void 0;
4
+ var DigitalDocumentPermissionType;
5
+ (function (DigitalDocumentPermissionType) {
6
+ DigitalDocumentPermissionType["ReadPermission"] = "ReadPermission";
7
+ DigitalDocumentPermissionType["WritePermission"] = "WritePermission";
8
+ })(DigitalDocumentPermissionType = exports.DigitalDocumentPermissionType || (exports.DigitalDocumentPermissionType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.398.0",
3
+ "version": "4.399.0-alpha.1",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",