@twin.org/document-management-models 0.0.1-next.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.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/cjs/index.cjs +28 -0
- package/dist/esm/index.mjs +26 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/models/IDocument.d.ts +88 -0
- package/dist/types/models/IDocumentList.d.ts +28 -0
- package/dist/types/models/IDocumentManagementComponent.d.ts +78 -0
- package/dist/types/models/api/IDocumentManagementGetRequest.d.ts +59 -0
- package/dist/types/models/api/IDocumentManagementGetResponse.d.ts +17 -0
- package/dist/types/models/api/IDocumentManagementQueryRequest.d.ts +44 -0
- package/dist/types/models/api/IDocumentManagementQueryResponse.d.ts +17 -0
- package/dist/types/models/api/IDocumentManagementRemoveRequest.d.ts +28 -0
- package/dist/types/models/api/IDocumentManagementSetRequest.d.ts +45 -0
- package/dist/types/models/documentDataTypes.d.ts +25 -0
- package/docs/changelog.md +5 -0
- package/docs/examples.md +1 -0
- package/docs/reference/index.md +21 -0
- package/docs/reference/interfaces/IDocument.md +147 -0
- package/docs/reference/interfaces/IDocumentList.md +35 -0
- package/docs/reference/interfaces/IDocumentManagementComponent.md +272 -0
- package/docs/reference/interfaces/IDocumentManagementGetRequest.md +109 -0
- package/docs/reference/interfaces/IDocumentManagementGetResponse.md +23 -0
- package/docs/reference/interfaces/IDocumentManagementQueryRequest.md +73 -0
- package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +23 -0
- package/docs/reference/interfaces/IDocumentManagementRemoveRequest.md +43 -0
- package/docs/reference/interfaces/IDocumentManagementSetRequest.md +61 -0
- package/docs/reference/type-aliases/DocumentTypes.md +5 -0
- package/docs/reference/variables/DocumentTypes.md +31 -0
- package/locales/en.json +3 -0
- package/package.json +43 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Interface: IDocumentManagementQueryRequest
|
|
2
|
+
|
|
3
|
+
Request to get a list of document from an auditable item graph vertex.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### headers?
|
|
8
|
+
|
|
9
|
+
> `optional` **headers**: `object`
|
|
10
|
+
|
|
11
|
+
The headers which can be used to determine the response data type.
|
|
12
|
+
|
|
13
|
+
#### accept
|
|
14
|
+
|
|
15
|
+
> **accept**: `"application/json"` \| `"application/ld+json"`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### pathParams
|
|
20
|
+
|
|
21
|
+
> **pathParams**: `object`
|
|
22
|
+
|
|
23
|
+
The path parameters.
|
|
24
|
+
|
|
25
|
+
#### auditableItemGraphId
|
|
26
|
+
|
|
27
|
+
> **auditableItemGraphId**: `string`
|
|
28
|
+
|
|
29
|
+
The id of the auditable item graph vertex which contains the documents.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### query?
|
|
34
|
+
|
|
35
|
+
> `optional` **query**: `object`
|
|
36
|
+
|
|
37
|
+
The query parameters.
|
|
38
|
+
|
|
39
|
+
#### documentCodes?
|
|
40
|
+
|
|
41
|
+
> `optional` **documentCodes**: `string`
|
|
42
|
+
|
|
43
|
+
List of comma separated document codes to filter the query.
|
|
44
|
+
|
|
45
|
+
#### includeRemoved?
|
|
46
|
+
|
|
47
|
+
> `optional` **includeRemoved**: `boolean`
|
|
48
|
+
|
|
49
|
+
Include deleted documents in the response.
|
|
50
|
+
|
|
51
|
+
##### Default
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
false
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### includeMostRecentRevisions?
|
|
58
|
+
|
|
59
|
+
> `optional` **includeMostRecentRevisions**: `boolean`
|
|
60
|
+
|
|
61
|
+
Include the most recent 5 revisions, use the individual get to retrieve more.
|
|
62
|
+
|
|
63
|
+
##### Default
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
false
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### cursor?
|
|
70
|
+
|
|
71
|
+
> `optional` **cursor**: `string`
|
|
72
|
+
|
|
73
|
+
The cursor to get the next chunk of documents.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: IDocumentManagementQueryResponse
|
|
2
|
+
|
|
3
|
+
Response to query the documents from an auditable item graph vertex.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### headers?
|
|
8
|
+
|
|
9
|
+
> `optional` **headers**: `object`
|
|
10
|
+
|
|
11
|
+
The headers which can be used to determine the response data type.
|
|
12
|
+
|
|
13
|
+
#### content-type
|
|
14
|
+
|
|
15
|
+
> **content-type**: `"application/json"` \| `"application/ld+json"`
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### body
|
|
20
|
+
|
|
21
|
+
> **body**: [`IDocumentList`](IDocumentList.md)
|
|
22
|
+
|
|
23
|
+
The body parameters.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Interface: IDocumentManagementRemoveRequest
|
|
2
|
+
|
|
3
|
+
Request to remove a document from an auditable item graph.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters.
|
|
12
|
+
|
|
13
|
+
#### auditableItemGraphId
|
|
14
|
+
|
|
15
|
+
> **auditableItemGraphId**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the auditable item graph vertex to remove the document from.
|
|
18
|
+
|
|
19
|
+
#### documentId
|
|
20
|
+
|
|
21
|
+
> **documentId**: `string`
|
|
22
|
+
|
|
23
|
+
The full id of the document to remove.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### query?
|
|
28
|
+
|
|
29
|
+
> `optional` **query**: `object`
|
|
30
|
+
|
|
31
|
+
The query parameters.
|
|
32
|
+
|
|
33
|
+
#### removeAllRevisions?
|
|
34
|
+
|
|
35
|
+
> `optional` **removeAllRevisions**: `boolean`
|
|
36
|
+
|
|
37
|
+
Flag to remove all revisions of the document.
|
|
38
|
+
|
|
39
|
+
##### Default
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
false
|
|
43
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Interface: IDocumentManagementSetRequest
|
|
2
|
+
|
|
3
|
+
Request to set a document in an auditable item graph vertex.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters.
|
|
12
|
+
|
|
13
|
+
#### auditableItemGraphId
|
|
14
|
+
|
|
15
|
+
> **auditableItemGraphId**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the auditable item graph vertex to store the document on.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### body
|
|
22
|
+
|
|
23
|
+
> **body**: `object`
|
|
24
|
+
|
|
25
|
+
The body parameters.
|
|
26
|
+
|
|
27
|
+
#### documentId
|
|
28
|
+
|
|
29
|
+
> **documentId**: `string`
|
|
30
|
+
|
|
31
|
+
The document id to create.
|
|
32
|
+
|
|
33
|
+
#### documentIdFormat
|
|
34
|
+
|
|
35
|
+
> **documentIdFormat**: `undefined` \| `string`
|
|
36
|
+
|
|
37
|
+
The format of the document identifier.
|
|
38
|
+
|
|
39
|
+
#### documentCode
|
|
40
|
+
|
|
41
|
+
> **documentCode**: `string`
|
|
42
|
+
|
|
43
|
+
The code for the document type.
|
|
44
|
+
|
|
45
|
+
#### blob
|
|
46
|
+
|
|
47
|
+
> **blob**: `string`
|
|
48
|
+
|
|
49
|
+
The data to create the document with, in base64.
|
|
50
|
+
|
|
51
|
+
#### annotationObject?
|
|
52
|
+
|
|
53
|
+
> `optional` **annotationObject**: `IJsonLdNodeObject`
|
|
54
|
+
|
|
55
|
+
Additional information to associate with the document.
|
|
56
|
+
|
|
57
|
+
#### createAttestation?
|
|
58
|
+
|
|
59
|
+
> `optional` **createAttestation**: `boolean`
|
|
60
|
+
|
|
61
|
+
Flag to create an attestation for the document, defaults to false
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Variable: DocumentTypes
|
|
2
|
+
|
|
3
|
+
> `const` **DocumentTypes**: `object`
|
|
4
|
+
|
|
5
|
+
The types of document management objects.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### ContextRoot
|
|
10
|
+
|
|
11
|
+
> `readonly` **ContextRoot**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
|
|
12
|
+
|
|
13
|
+
The context root for the document types.
|
|
14
|
+
|
|
15
|
+
### ContextRootCommon
|
|
16
|
+
|
|
17
|
+
> `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
18
|
+
|
|
19
|
+
The context root for the common types.
|
|
20
|
+
|
|
21
|
+
### Document
|
|
22
|
+
|
|
23
|
+
> `readonly` **Document**: `"Document"` = `"Document"`
|
|
24
|
+
|
|
25
|
+
Represents a document.
|
|
26
|
+
|
|
27
|
+
### DocumentList
|
|
28
|
+
|
|
29
|
+
> `readonly` **DocumentList**: `"DocumentList"` = `"DocumentList"`
|
|
30
|
+
|
|
31
|
+
Represents a document list.
|
package/locales/en.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@twin.org/document-management-models",
|
|
3
|
+
"version": "0.0.1-next.1",
|
|
4
|
+
"description": "Models which define the structure of the document management connectors and services",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/twinfoundation/document-management.git",
|
|
8
|
+
"directory": "packages/document-management-models"
|
|
9
|
+
},
|
|
10
|
+
"author": "martyn.janes@iota.org",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=20.0.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@twin.org/attestation-models": "next",
|
|
18
|
+
"@twin.org/blob-storage-models": "next",
|
|
19
|
+
"@twin.org/core": "next",
|
|
20
|
+
"@twin.org/data-json-ld": "next",
|
|
21
|
+
"@twin.org/nameof": "next",
|
|
22
|
+
"@twin.org/standards-schema-org": "next",
|
|
23
|
+
"@twin.org/standards-unece": "next"
|
|
24
|
+
},
|
|
25
|
+
"main": "./dist/cjs/index.cjs",
|
|
26
|
+
"module": "./dist/esm/index.mjs",
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/types/index.d.ts",
|
|
31
|
+
"require": "./dist/cjs/index.cjs",
|
|
32
|
+
"import": "./dist/esm/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./locales/*.json": "./locales/*.json"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist/cjs",
|
|
38
|
+
"dist/esm",
|
|
39
|
+
"dist/types",
|
|
40
|
+
"locales",
|
|
41
|
+
"docs"
|
|
42
|
+
]
|
|
43
|
+
}
|