@twin.org/document-management-models 0.0.1-next.1 → 0.0.1-next.3
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.
- package/dist/cjs/index.cjs +4 -0
- package/dist/esm/index.mjs +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IDocument.d.ts +8 -0
- package/dist/types/models/IDocumentAttestation.d.ts +40 -0
- package/dist/types/models/documentDataTypes.d.ts +4 -0
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IDocument.md +16 -0
- package/docs/reference/interfaces/IDocumentAttestation.md +59 -0
- package/docs/reference/variables/DocumentTypes.md +6 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
package/dist/esm/index.mjs
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export * from "./models/api/IDocumentManagementRemoveRequest";
|
|
|
6
6
|
export * from "./models/api/IDocumentManagementSetRequest";
|
|
7
7
|
export * from "./models/documentDataTypes";
|
|
8
8
|
export * from "./models/IDocument";
|
|
9
|
+
export * from "./models/IDocumentAttestation";
|
|
9
10
|
export * from "./models/IDocumentList";
|
|
10
11
|
export * from "./models/IDocumentManagementComponent";
|
|
@@ -77,6 +77,14 @@ export interface IDocument {
|
|
|
77
77
|
* The date/time of when the document was deleted, as we never actually remove items.
|
|
78
78
|
*/
|
|
79
79
|
dateDeleted?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The node which added the document to the graph.
|
|
82
|
+
*/
|
|
83
|
+
nodeIdentity: string;
|
|
84
|
+
/**
|
|
85
|
+
* The user who added the document to the graph.
|
|
86
|
+
*/
|
|
87
|
+
userIdentity: string;
|
|
80
88
|
/**
|
|
81
89
|
* The previous revisions of the document.
|
|
82
90
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SchemaOrgTypes } from "@twin.org/standards-schema-org";
|
|
2
|
+
import type { UneceDocumentCodes } from "@twin.org/standards-unece";
|
|
3
|
+
import type { DocumentTypes } from "./documentDataTypes";
|
|
4
|
+
/**
|
|
5
|
+
* Interface describing a document attestation.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDocumentAttestation {
|
|
8
|
+
/**
|
|
9
|
+
* JSON-LD Context.
|
|
10
|
+
*/
|
|
11
|
+
"@context": [
|
|
12
|
+
typeof DocumentTypes.ContextRoot,
|
|
13
|
+
typeof DocumentTypes.ContextRootCommon,
|
|
14
|
+
typeof SchemaOrgTypes.ContextRoot
|
|
15
|
+
];
|
|
16
|
+
/**
|
|
17
|
+
* JSON-LD Type.
|
|
18
|
+
*/
|
|
19
|
+
type: typeof DocumentTypes.DocumentAttestation;
|
|
20
|
+
/**
|
|
21
|
+
* The id of the document.
|
|
22
|
+
*/
|
|
23
|
+
documentId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The code for the document type.
|
|
26
|
+
*/
|
|
27
|
+
documentCode: UneceDocumentCodes;
|
|
28
|
+
/**
|
|
29
|
+
* The revision of the document as a 0 based index.
|
|
30
|
+
*/
|
|
31
|
+
documentRevision: number;
|
|
32
|
+
/**
|
|
33
|
+
* The date/time of when the document was created.
|
|
34
|
+
*/
|
|
35
|
+
dateCreated: string;
|
|
36
|
+
/**
|
|
37
|
+
* The hash of the document being attested.
|
|
38
|
+
*/
|
|
39
|
+
blobHash: string;
|
|
40
|
+
}
|
|
@@ -14,6 +14,10 @@ export declare const DocumentTypes: {
|
|
|
14
14
|
* Represents a document.
|
|
15
15
|
*/
|
|
16
16
|
readonly Document: "Document";
|
|
17
|
+
/**
|
|
18
|
+
* Represents a document attestation.
|
|
19
|
+
*/
|
|
20
|
+
readonly DocumentAttestation: "DocumentAttestation";
|
|
17
21
|
/**
|
|
18
22
|
* Represents a document list.
|
|
19
23
|
*/
|
package/docs/changelog.md
CHANGED
package/docs/reference/index.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## Interfaces
|
|
4
4
|
|
|
5
5
|
- [IDocument](interfaces/IDocument.md)
|
|
6
|
+
- [IDocumentAttestation](interfaces/IDocumentAttestation.md)
|
|
6
7
|
- [IDocumentList](interfaces/IDocumentList.md)
|
|
7
8
|
- [IDocumentManagementComponent](interfaces/IDocumentManagementComponent.md)
|
|
8
9
|
- [IDocumentManagementGetRequest](interfaces/IDocumentManagementGetRequest.md)
|
|
@@ -132,6 +132,22 @@ The date/time of when the document was deleted, as we never actually remove item
|
|
|
132
132
|
|
|
133
133
|
***
|
|
134
134
|
|
|
135
|
+
### nodeIdentity
|
|
136
|
+
|
|
137
|
+
> **nodeIdentity**: `string`
|
|
138
|
+
|
|
139
|
+
The node which added the document to the graph.
|
|
140
|
+
|
|
141
|
+
***
|
|
142
|
+
|
|
143
|
+
### userIdentity
|
|
144
|
+
|
|
145
|
+
> **userIdentity**: `string`
|
|
146
|
+
|
|
147
|
+
The user who added the document to the graph.
|
|
148
|
+
|
|
149
|
+
***
|
|
150
|
+
|
|
135
151
|
### revisions?
|
|
136
152
|
|
|
137
153
|
> `optional` **revisions**: [`IDocument`](IDocument.md)[]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Interface: IDocumentAttestation
|
|
2
|
+
|
|
3
|
+
Interface describing a document attestation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### @context
|
|
8
|
+
|
|
9
|
+
> **@context**: \[`"https://schema.twindev.org/documents/"`, `"https://schema.twindev.org/common/"`, `"https://schema.org"`\]
|
|
10
|
+
|
|
11
|
+
JSON-LD Context.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### type
|
|
16
|
+
|
|
17
|
+
> **type**: `"DocumentAttestation"`
|
|
18
|
+
|
|
19
|
+
JSON-LD Type.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### documentId
|
|
24
|
+
|
|
25
|
+
> **documentId**: `string`
|
|
26
|
+
|
|
27
|
+
The id of the document.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### documentCode
|
|
32
|
+
|
|
33
|
+
> **documentCode**: `string`
|
|
34
|
+
|
|
35
|
+
The code for the document type.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### documentRevision
|
|
40
|
+
|
|
41
|
+
> **documentRevision**: `number`
|
|
42
|
+
|
|
43
|
+
The revision of the document as a 0 based index.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### dateCreated
|
|
48
|
+
|
|
49
|
+
> **dateCreated**: `string`
|
|
50
|
+
|
|
51
|
+
The date/time of when the document was created.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### blobHash
|
|
56
|
+
|
|
57
|
+
> **blobHash**: `string`
|
|
58
|
+
|
|
59
|
+
The hash of the document being attested.
|
|
@@ -24,6 +24,12 @@ The context root for the common types.
|
|
|
24
24
|
|
|
25
25
|
Represents a document.
|
|
26
26
|
|
|
27
|
+
### DocumentAttestation
|
|
28
|
+
|
|
29
|
+
> `readonly` **DocumentAttestation**: `"DocumentAttestation"` = `"DocumentAttestation"`
|
|
30
|
+
|
|
31
|
+
Represents a document attestation.
|
|
32
|
+
|
|
27
33
|
### DocumentList
|
|
28
34
|
|
|
29
35
|
> `readonly` **DocumentList**: `"DocumentList"` = `"DocumentList"`
|
package/package.json
CHANGED