@3sixty/document-management-models 0.0.0-stage → 0.20.0-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 +24 -2
- package/dist/es/compiled/validators.js +600 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/documentManagementDataTypes.js +59 -0
- package/dist/es/dataTypes/documentManagementDataTypes.js.map +1 -0
- package/dist/es/index.js +25 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IDocument.js +2 -0
- package/dist/es/models/IDocument.js.map +1 -0
- package/dist/es/models/IDocumentAttestation.js +2 -0
- package/dist/es/models/IDocumentAttestation.js.map +1 -0
- package/dist/es/models/IDocumentBase.js +2 -0
- package/dist/es/models/IDocumentBase.js.map +1 -0
- package/dist/es/models/IDocumentHydrated.js +2 -0
- package/dist/es/models/IDocumentHydrated.js.map +1 -0
- package/dist/es/models/IDocumentList.js +2 -0
- package/dist/es/models/IDocumentList.js.map +1 -0
- package/dist/es/models/IDocumentManagementComponent.js +2 -0
- package/dist/es/models/IDocumentManagementComponent.js.map +1 -0
- package/dist/es/models/IDocumentManagementEdgeEntry.js +2 -0
- package/dist/es/models/IDocumentManagementEdgeEntry.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementCreateRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementCreateRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementQueryRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementQueryRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementQueryResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementQueryResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementRemoveRequest.js +4 -0
- package/dist/es/models/api/IDocumentManagementRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementUpdatePartialRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementUpdatePartialRequest.js.map +1 -0
- package/dist/es/models/documentContexts.js +33 -0
- package/dist/es/models/documentContexts.js.map +1 -0
- package/dist/es/models/documentManagementMetricIds.js +29 -0
- package/dist/es/models/documentManagementMetricIds.js.map +1 -0
- package/dist/es/models/documentManagementMetrics.js +36 -0
- package/dist/es/models/documentManagementMetrics.js.map +1 -0
- package/dist/es/models/documentTypes.js +25 -0
- package/dist/es/models/documentTypes.js.map +1 -0
- package/dist/es/schemas/Document.json +86 -0
- package/dist/es/schemas/DocumentAttestation.json +60 -0
- package/dist/es/schemas/DocumentBase.json +29 -0
- package/dist/es/schemas/DocumentHydrated.json +25 -0
- package/dist/es/schemas/DocumentList.json +51 -0
- package/dist/types/compiled/validators.d.ts +21 -0
- package/dist/types/dataTypes/documentManagementDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/models/IDocument.d.ts +72 -0
- package/dist/types/models/IDocumentAttestation.d.ts +46 -0
- package/dist/types/models/IDocumentBase.d.ts +27 -0
- package/dist/types/models/IDocumentHydrated.d.ts +23 -0
- package/dist/types/models/IDocumentList.d.ts +32 -0
- package/dist/types/models/IDocumentManagementComponent.d.ts +123 -0
- package/dist/types/models/IDocumentManagementEdgeEntry.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementCreateRequest.d.ts +42 -0
- package/dist/types/models/api/IDocumentManagementGetRequest.d.ts +68 -0
- package/dist/types/models/api/IDocumentManagementGetResponse.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementGetRevisionRequest.d.ts +53 -0
- package/dist/types/models/api/IDocumentManagementGetRevisionResponse.d.ts +17 -0
- package/dist/types/models/api/IDocumentManagementQueryRequest.d.ts +29 -0
- package/dist/types/models/api/IDocumentManagementQueryResponse.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementRemoveRequest.d.ts +18 -0
- package/dist/types/models/api/IDocumentManagementUpdatePartialRequest.d.ts +61 -0
- package/dist/types/models/documentContexts.d.ts +33 -0
- package/dist/types/models/documentManagementMetricIds.d.ts +29 -0
- package/dist/types/models/documentManagementMetrics.d.ts +5 -0
- package/dist/types/models/documentTypes.d.ts +25 -0
- package/docs/changelog.md +9 -0
- package/docs/examples.md +23 -0
- package/docs/reference/classes/DocumentManagementDataTypes.md +25 -0
- package/docs/reference/index.md +42 -0
- package/docs/reference/interfaces/IDocument.md +155 -0
- package/docs/reference/interfaces/IDocumentAttestation.md +59 -0
- package/docs/reference/interfaces/IDocumentBase.md +39 -0
- package/docs/reference/interfaces/IDocumentHydrated.md +223 -0
- package/docs/reference/interfaces/IDocumentList.md +35 -0
- package/docs/reference/interfaces/IDocumentManagementComponent.md +348 -0
- package/docs/reference/interfaces/IDocumentManagementCreateRequest.md +53 -0
- package/docs/reference/interfaces/IDocumentManagementEdgeEntry.md +27 -0
- package/docs/reference/interfaces/IDocumentManagementGetRequest.md +127 -0
- package/docs/reference/interfaces/IDocumentManagementGetResponse.md +27 -0
- package/docs/reference/interfaces/IDocumentManagementGetRevisionRequest.md +91 -0
- package/docs/reference/interfaces/IDocumentManagementGetRevisionResponse.md +23 -0
- package/docs/reference/interfaces/IDocumentManagementQueryRequest.md +41 -0
- package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +27 -0
- package/docs/reference/interfaces/IDocumentManagementRemoveRequest.md +23 -0
- package/docs/reference/interfaces/IDocumentManagementUpdatePartialRequest.md +80 -0
- package/docs/reference/type-aliases/DocumentContexts.md +5 -0
- package/docs/reference/type-aliases/DocumentManagementMetricIds.md +5 -0
- package/docs/reference/type-aliases/DocumentTypes.md +5 -0
- package/docs/reference/variables/CompiledDocument.md +5 -0
- package/docs/reference/variables/CompiledDocumentAttestation.md +5 -0
- package/docs/reference/variables/CompiledDocumentBase.md +5 -0
- package/docs/reference/variables/CompiledDocumentHydrated.md +5 -0
- package/docs/reference/variables/CompiledDocumentList.md +5 -0
- package/docs/reference/variables/DocumentContexts.md +43 -0
- package/docs/reference/variables/DocumentManagementMetricIds.md +37 -0
- package/docs/reference/variables/DocumentManagementMetrics.md +5 -0
- package/docs/reference/variables/DocumentTypes.md +31 -0
- package/locales/en.json +3 -0
- package/package.json +63 -5
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@3sixty/data-json-ld";
|
|
2
|
+
import type { IDocumentBase } from "../IDocumentBase.js";
|
|
3
|
+
import type { IDocumentManagementEdgeEntry } from "../IDocumentManagementEdgeEntry.js";
|
|
4
|
+
/**
|
|
5
|
+
* Request to create a document as an auditable item graph vertex.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDocumentManagementCreateRequest {
|
|
8
|
+
/**
|
|
9
|
+
* The body parameters.
|
|
10
|
+
*/
|
|
11
|
+
body: {
|
|
12
|
+
/**
|
|
13
|
+
* The document base properties.
|
|
14
|
+
*/
|
|
15
|
+
document: IDocumentBase;
|
|
16
|
+
/**
|
|
17
|
+
* The data to create the document with, either as base64-encoded content or an existing blob storage entry id.
|
|
18
|
+
*/
|
|
19
|
+
blob: string;
|
|
20
|
+
/**
|
|
21
|
+
* The auditable item graph vertices to connect the document to.
|
|
22
|
+
*/
|
|
23
|
+
auditableItemGraphEdges?: IDocumentManagementEdgeEntry[];
|
|
24
|
+
/**
|
|
25
|
+
* Additional options for the create operation.
|
|
26
|
+
*/
|
|
27
|
+
options?: {
|
|
28
|
+
/**
|
|
29
|
+
* Flag to create an attestation for the document, defaults to false.
|
|
30
|
+
*/
|
|
31
|
+
includeAttestation?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Flag to add the document id as an alias to the aig vertex, defaults to true.
|
|
34
|
+
*/
|
|
35
|
+
includeAlias?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Annotation object for the alias.
|
|
38
|
+
*/
|
|
39
|
+
aliasAnnotationObject?: IJsonLdNodeObject;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@3sixty/web";
|
|
2
|
+
/**
|
|
3
|
+
* Request to get a document from an auditable item graph vertex.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDocumentManagementGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
|
+
*/
|
|
9
|
+
headers?: {
|
|
10
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The path parameters.
|
|
14
|
+
*/
|
|
15
|
+
pathParams: {
|
|
16
|
+
/**
|
|
17
|
+
* The full id of the document to get.
|
|
18
|
+
*/
|
|
19
|
+
auditableItemGraphDocumentId: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The query parameters.
|
|
23
|
+
*/
|
|
24
|
+
query?: {
|
|
25
|
+
/**
|
|
26
|
+
* Include the blob storage metadata in the response.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
includeBlobStorageMetadata?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Include the blob storage data in the response.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
includeBlobStorageData?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Include the attestation information in the response.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
includeAttestation?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Include deleted documents in the response.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
includeRemoved?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Include soft-deleted edges in the response.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
includeDeletedEdges?: string;
|
|
50
|
+
/**
|
|
51
|
+
* If provided will extract data from the document using the specified rule group id.
|
|
52
|
+
*/
|
|
53
|
+
extractRuleGroupId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
56
|
+
*/
|
|
57
|
+
extractMimeType?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Limit the number of items to return, defaults to 1 so only most recent is returned.
|
|
60
|
+
* @default 1
|
|
61
|
+
*/
|
|
62
|
+
limit?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The cursor to get the next chunk of revisions.
|
|
65
|
+
*/
|
|
66
|
+
cursor?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@3sixty/web";
|
|
2
|
+
import type { IDocumentList } from "../IDocumentList.js";
|
|
3
|
+
/**
|
|
4
|
+
* Response to get a document and optionally revisions from an auditable item graph vertex.
|
|
5
|
+
*/
|
|
6
|
+
export interface IDocumentManagementGetResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
[HeaderTypes.Link]?: string | string[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The body parameters.
|
|
16
|
+
*/
|
|
17
|
+
body: IDocumentList;
|
|
18
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@3sixty/web";
|
|
2
|
+
/**
|
|
3
|
+
* Request to get a document revision from an auditable item graph vertex.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDocumentManagementGetRevisionRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
|
+
*/
|
|
9
|
+
headers?: {
|
|
10
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The path parameters.
|
|
14
|
+
*/
|
|
15
|
+
pathParams: {
|
|
16
|
+
/**
|
|
17
|
+
* The full id of the document to get.
|
|
18
|
+
*/
|
|
19
|
+
auditableItemGraphDocumentId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The revision of the document to get.
|
|
22
|
+
*/
|
|
23
|
+
revision: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The query parameters.
|
|
27
|
+
*/
|
|
28
|
+
query?: {
|
|
29
|
+
/**
|
|
30
|
+
* Include the blob storage metadata in the response.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
includeBlobStorageMetadata?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Include the blob storage data in the response.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
includeBlobStorageData?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Include the attestation information in the response.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
includeAttestation?: string;
|
|
44
|
+
/**
|
|
45
|
+
* If provided will extract data from the document using the specified rule group id.
|
|
46
|
+
*/
|
|
47
|
+
extractRuleGroupId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
50
|
+
*/
|
|
51
|
+
extractMimeType?: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@3sixty/web";
|
|
2
|
+
import type { IDocument } from "../IDocument.js";
|
|
3
|
+
/**
|
|
4
|
+
* Response to get a document revision from an auditable item graph vertex.
|
|
5
|
+
*/
|
|
6
|
+
export interface IDocumentManagementGetRevisionResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The body parameters.
|
|
15
|
+
*/
|
|
16
|
+
body: IDocument;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@3sixty/web";
|
|
2
|
+
/**
|
|
3
|
+
* Request to query a list of documents from an auditable item graph vertex.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDocumentManagementQueryRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
|
+
*/
|
|
9
|
+
headers?: {
|
|
10
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The query parameters.
|
|
14
|
+
*/
|
|
15
|
+
query: {
|
|
16
|
+
/**
|
|
17
|
+
* The id of the document id we are trying to find.
|
|
18
|
+
*/
|
|
19
|
+
documentId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The cursor to get the next chunk of documents.
|
|
22
|
+
*/
|
|
23
|
+
cursor?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The number of documents to return.
|
|
26
|
+
*/
|
|
27
|
+
limit?: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IAuditableItemGraphVertexList } from "@3sixty/auditable-item-graph-models";
|
|
2
|
+
import type { HeaderTypes, MimeTypes } from "@3sixty/web";
|
|
3
|
+
/**
|
|
4
|
+
* Response to query the documents from an auditable item graph vertex.
|
|
5
|
+
*/
|
|
6
|
+
export interface IDocumentManagementQueryResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
[HeaderTypes.Link]?: string | string[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The body parameters.
|
|
16
|
+
*/
|
|
17
|
+
body: IAuditableItemGraphVertexList;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request to remove a document revision from an auditable item graph.
|
|
3
|
+
*/
|
|
4
|
+
export interface IDocumentManagementRemoveRequest {
|
|
5
|
+
/**
|
|
6
|
+
* The path parameters.
|
|
7
|
+
*/
|
|
8
|
+
pathParams: {
|
|
9
|
+
/**
|
|
10
|
+
* The id of the auditable item graph vertex to remove the revision from.
|
|
11
|
+
*/
|
|
12
|
+
auditableItemGraphDocumentId: string;
|
|
13
|
+
/**
|
|
14
|
+
* The revision of the document to remove.
|
|
15
|
+
*/
|
|
16
|
+
revision: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@3sixty/data-json-ld";
|
|
2
|
+
import type { IDocumentBase } from "../IDocumentBase.js";
|
|
3
|
+
import type { IDocumentManagementEdgeEntry } from "../IDocumentManagementEdgeEntry.js";
|
|
4
|
+
/**
|
|
5
|
+
* Request to partially update a document as an auditable item graph vertex.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDocumentManagementUpdatePartialRequest {
|
|
8
|
+
/**
|
|
9
|
+
* The path parameters.
|
|
10
|
+
*/
|
|
11
|
+
pathParams: {
|
|
12
|
+
/**
|
|
13
|
+
* The full id of the document to update.
|
|
14
|
+
*/
|
|
15
|
+
auditableItemGraphDocumentId: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The body parameters.
|
|
19
|
+
*/
|
|
20
|
+
body: {
|
|
21
|
+
/**
|
|
22
|
+
* The document base properties to update. annotationObject, documentIdFormat and documentCode are applied in-place to the current revision.
|
|
23
|
+
*/
|
|
24
|
+
document?: Partial<Pick<IDocumentBase, "annotationObject" | "documentIdFormat" | "documentCode">>;
|
|
25
|
+
/**
|
|
26
|
+
* The data to update the document with, either as base64-encoded content or an existing blob storage entry id.
|
|
27
|
+
*/
|
|
28
|
+
blob?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Explicit edge delta to apply. Use `add` to create new connections and `remove` to
|
|
31
|
+
* disconnect existing ones by their target vertex id.
|
|
32
|
+
*/
|
|
33
|
+
auditableItemGraphEdges?: {
|
|
34
|
+
/**
|
|
35
|
+
* Connections to add; each entry creates a back-edge on the connected vertex.
|
|
36
|
+
*/
|
|
37
|
+
add?: IDocumentManagementEdgeEntry[];
|
|
38
|
+
/**
|
|
39
|
+
* Target vertex IDs to disconnect; their back-edges are removed.
|
|
40
|
+
*/
|
|
41
|
+
remove?: string[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Additional options for the update operation.
|
|
45
|
+
*/
|
|
46
|
+
options?: {
|
|
47
|
+
/**
|
|
48
|
+
* Set to true to start attesting the document (even if originally created without attestation), or false to remove the existing attestation. Omit to leave attestation state unchanged.
|
|
49
|
+
*/
|
|
50
|
+
includeAttestation?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Set to true to add the document id as an alias on the aig vertex, or false to remove it. Omit to leave alias state unchanged.
|
|
53
|
+
*/
|
|
54
|
+
includeAlias?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Annotation object for the alias when adding.
|
|
57
|
+
*/
|
|
58
|
+
aliasAnnotationObject?: IJsonLdNodeObject;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contexts of document management objects.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DocumentContexts: {
|
|
5
|
+
/**
|
|
6
|
+
* The canonical RDF namespace URI for Document Management.
|
|
7
|
+
*/
|
|
8
|
+
readonly Namespace: "https://schema.3sixty.global/documents/";
|
|
9
|
+
/**
|
|
10
|
+
* The value to use in context for Document Management.
|
|
11
|
+
*/
|
|
12
|
+
readonly Context: "https://schema.3sixty.global/documents/";
|
|
13
|
+
/**
|
|
14
|
+
* The JSON-LD Context URL for Document Management.
|
|
15
|
+
*/
|
|
16
|
+
readonly JsonLdContext: "https://schema.3sixty.global/documents/types.jsonld";
|
|
17
|
+
/**
|
|
18
|
+
* The canonical RDF namespace URI for TWIN Common.
|
|
19
|
+
*/
|
|
20
|
+
readonly NamespaceCommon: "https://schema.3sixty.global/common/";
|
|
21
|
+
/**
|
|
22
|
+
* The value to use in JSON-LD context for TWIN Common.
|
|
23
|
+
*/
|
|
24
|
+
readonly ContextCommon: "https://schema.3sixty.global/common/";
|
|
25
|
+
/**
|
|
26
|
+
* The JSON-LD Context URL for TWIN Common.
|
|
27
|
+
*/
|
|
28
|
+
readonly JsonLdContextCommon: "https://schema.3sixty.global/common/types.jsonld";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The contexts of document management objects.
|
|
32
|
+
*/
|
|
33
|
+
export type DocumentContexts = (typeof DocumentContexts)[keyof typeof DocumentContexts];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metric IDs for the document management service.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DocumentManagementMetricIds: {
|
|
5
|
+
/**
|
|
6
|
+
* Number of documents created.
|
|
7
|
+
*/
|
|
8
|
+
readonly DocumentsCreated: "dm_documents_created";
|
|
9
|
+
/**
|
|
10
|
+
* Number of documents updated.
|
|
11
|
+
*/
|
|
12
|
+
readonly DocumentsUpdated: "dm_documents_updated";
|
|
13
|
+
/**
|
|
14
|
+
* Number of document revisions created.
|
|
15
|
+
*/
|
|
16
|
+
readonly RevisionsCreated: "dm_revisions_created";
|
|
17
|
+
/**
|
|
18
|
+
* Number of document revisions removed.
|
|
19
|
+
*/
|
|
20
|
+
readonly RevisionsRemoved: "dm_revisions_removed";
|
|
21
|
+
/**
|
|
22
|
+
* Number of document attestations created.
|
|
23
|
+
*/
|
|
24
|
+
readonly AttestationsCreated: "dm_attestations_created";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Metric IDs for the document management service.
|
|
28
|
+
*/
|
|
29
|
+
export type DocumentManagementMetricIds = (typeof DocumentManagementMetricIds)[keyof typeof DocumentManagementMetricIds];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The types of document management objects.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DocumentTypes: {
|
|
5
|
+
/**
|
|
6
|
+
* Represents a document.
|
|
7
|
+
*/
|
|
8
|
+
readonly Document: "Document";
|
|
9
|
+
/**
|
|
10
|
+
* Represents a document hydrated.
|
|
11
|
+
*/
|
|
12
|
+
readonly DocumentHydrated: "DocumentHydrated";
|
|
13
|
+
/**
|
|
14
|
+
* Represents a document attestation.
|
|
15
|
+
*/
|
|
16
|
+
readonly DocumentAttestation: "DocumentAttestation";
|
|
17
|
+
/**
|
|
18
|
+
* Represents a document list.
|
|
19
|
+
*/
|
|
20
|
+
readonly DocumentList: "DocumentList";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The types of document management objects.
|
|
24
|
+
*/
|
|
25
|
+
export type DocumentTypes = (typeof DocumentTypes)[keyof typeof DocumentTypes];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.20.0-next.1](https://github.com/3sixtyglobal/document-management/compare/document-management-models-v0.20.0-next.0...document-management-models-v0.20.0-next.1) (2026-10-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* publish packages under the [@3sixty](https://github.com/3sixty) namespace ([43b64db](https://github.com/3sixtyglobal/document-management/commit/43b64db2a8397c4dfae45c435ce9c14b5c1a6618))
|
|
9
|
+
* updated ts compile ([9c2594e](https://github.com/3sixtyglobal/document-management/commit/9c2594ef363773f154286845bca15e69d380dc07))
|
package/docs/examples.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Document Management Models Examples
|
|
2
|
+
|
|
3
|
+
These snippets show typical setup steps for registering data types and creating document-shaped data that can be validated and exchanged consistently.
|
|
4
|
+
|
|
5
|
+
## DocumentManagementDataTypes
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { DataTypeHandlerFactory } from '@3sixty/data-core';
|
|
9
|
+
import {
|
|
10
|
+
DocumentContexts,
|
|
11
|
+
DocumentManagementDataTypes,
|
|
12
|
+
DocumentTypes
|
|
13
|
+
} from '@3sixty/document-management-models';
|
|
14
|
+
|
|
15
|
+
DocumentManagementDataTypes.registerTypes();
|
|
16
|
+
|
|
17
|
+
const handler = DataTypeHandlerFactory.get(
|
|
18
|
+
`${DocumentContexts.Namespace}${DocumentTypes.Document}`
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
console.log(handler.namespace); // https://schema.3sixty.global/document-management/
|
|
22
|
+
console.log(handler.type); // Document
|
|
23
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Class: DocumentManagementDataTypes
|
|
2
|
+
|
|
3
|
+
Handle all the data types for document management.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new DocumentManagementDataTypes**(): `DocumentManagementDataTypes`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`DocumentManagementDataTypes`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### registerTypes() {#registertypes}
|
|
18
|
+
|
|
19
|
+
> `static` **registerTypes**(): `void`
|
|
20
|
+
|
|
21
|
+
Register all the data types.
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
`void`
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @3sixty/document-management-models
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [DocumentManagementDataTypes](classes/DocumentManagementDataTypes.md)
|
|
6
|
+
|
|
7
|
+
## Interfaces
|
|
8
|
+
|
|
9
|
+
- [IDocument](interfaces/IDocument.md)
|
|
10
|
+
- [IDocumentAttestation](interfaces/IDocumentAttestation.md)
|
|
11
|
+
- [IDocumentBase](interfaces/IDocumentBase.md)
|
|
12
|
+
- [IDocumentHydrated](interfaces/IDocumentHydrated.md)
|
|
13
|
+
- [IDocumentList](interfaces/IDocumentList.md)
|
|
14
|
+
- [IDocumentManagementComponent](interfaces/IDocumentManagementComponent.md)
|
|
15
|
+
- [IDocumentManagementEdgeEntry](interfaces/IDocumentManagementEdgeEntry.md)
|
|
16
|
+
- [IDocumentManagementCreateRequest](interfaces/IDocumentManagementCreateRequest.md)
|
|
17
|
+
- [IDocumentManagementGetRequest](interfaces/IDocumentManagementGetRequest.md)
|
|
18
|
+
- [IDocumentManagementGetResponse](interfaces/IDocumentManagementGetResponse.md)
|
|
19
|
+
- [IDocumentManagementGetRevisionRequest](interfaces/IDocumentManagementGetRevisionRequest.md)
|
|
20
|
+
- [IDocumentManagementGetRevisionResponse](interfaces/IDocumentManagementGetRevisionResponse.md)
|
|
21
|
+
- [IDocumentManagementQueryRequest](interfaces/IDocumentManagementQueryRequest.md)
|
|
22
|
+
- [IDocumentManagementQueryResponse](interfaces/IDocumentManagementQueryResponse.md)
|
|
23
|
+
- [IDocumentManagementRemoveRequest](interfaces/IDocumentManagementRemoveRequest.md)
|
|
24
|
+
- [IDocumentManagementUpdatePartialRequest](interfaces/IDocumentManagementUpdatePartialRequest.md)
|
|
25
|
+
|
|
26
|
+
## Type Aliases
|
|
27
|
+
|
|
28
|
+
- [DocumentContexts](type-aliases/DocumentContexts.md)
|
|
29
|
+
- [DocumentManagementMetricIds](type-aliases/DocumentManagementMetricIds.md)
|
|
30
|
+
- [DocumentTypes](type-aliases/DocumentTypes.md)
|
|
31
|
+
|
|
32
|
+
## Variables
|
|
33
|
+
|
|
34
|
+
- [CompiledDocument](variables/CompiledDocument.md)
|
|
35
|
+
- [CompiledDocumentAttestation](variables/CompiledDocumentAttestation.md)
|
|
36
|
+
- [CompiledDocumentBase](variables/CompiledDocumentBase.md)
|
|
37
|
+
- [CompiledDocumentHydrated](variables/CompiledDocumentHydrated.md)
|
|
38
|
+
- [CompiledDocumentList](variables/CompiledDocumentList.md)
|
|
39
|
+
- [DocumentContexts](variables/DocumentContexts.md)
|
|
40
|
+
- [DocumentManagementMetricIds](variables/DocumentManagementMetricIds.md)
|
|
41
|
+
- [DocumentManagementMetrics](variables/DocumentManagementMetrics.md)
|
|
42
|
+
- [DocumentTypes](variables/DocumentTypes.md)
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Interface: IDocument
|
|
2
|
+
|
|
3
|
+
Interface describing a document.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- [`IDocumentBase`](IDocumentBase.md)
|
|
8
|
+
|
|
9
|
+
## Extended by
|
|
10
|
+
|
|
11
|
+
- [`IDocumentHydrated`](IDocumentHydrated.md)
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### @context {#context}
|
|
16
|
+
|
|
17
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.3sixty.global/documents/"`, `"https://schema.3sixty.global/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
18
|
+
|
|
19
|
+
JSON-LD Context.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### type {#type}
|
|
24
|
+
|
|
25
|
+
> **type**: `"Document"`
|
|
26
|
+
|
|
27
|
+
JSON-LD Type.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### id {#id}
|
|
32
|
+
|
|
33
|
+
> **id**: `string`
|
|
34
|
+
|
|
35
|
+
The full id of the document.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### documentRevision {#documentrevision}
|
|
40
|
+
|
|
41
|
+
> **documentRevision**: `number`
|
|
42
|
+
|
|
43
|
+
The revision of the document as a 0 based index.
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### blobStorageId {#blobstorageid}
|
|
48
|
+
|
|
49
|
+
> **blobStorageId**: `string`
|
|
50
|
+
|
|
51
|
+
The blob storage id for the document.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### integrity {#integrity}
|
|
56
|
+
|
|
57
|
+
> **integrity**: `string`
|
|
58
|
+
|
|
59
|
+
The integrity of the blob data.
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### attestationId? {#attestationid}
|
|
64
|
+
|
|
65
|
+
> `optional` **attestationId?**: `string`
|
|
66
|
+
|
|
67
|
+
The attestation for the document if one was created.
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### dateCreated {#datecreated}
|
|
72
|
+
|
|
73
|
+
> **dateCreated**: `string`
|
|
74
|
+
|
|
75
|
+
The date/time of when the document was created.
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### dateModified? {#datemodified}
|
|
80
|
+
|
|
81
|
+
> `optional` **dateModified?**: `string`
|
|
82
|
+
|
|
83
|
+
The date/time of when the document was modified.
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### dateDeleted? {#datedeleted}
|
|
88
|
+
|
|
89
|
+
> `optional` **dateDeleted?**: `string`
|
|
90
|
+
|
|
91
|
+
The date/time of when the document was deleted, as we never actually remove items.
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### organizationIdentity? {#organizationidentity}
|
|
96
|
+
|
|
97
|
+
> `optional` **organizationIdentity?**: `string`
|
|
98
|
+
|
|
99
|
+
The organization which added the document to the graph.
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### userIdentity? {#useridentity}
|
|
104
|
+
|
|
105
|
+
> `optional` **userIdentity?**: `string`
|
|
106
|
+
|
|
107
|
+
The user who added the document to the graph.
|
|
108
|
+
|
|
109
|
+
***
|
|
110
|
+
|
|
111
|
+
### documentId {#documentid}
|
|
112
|
+
|
|
113
|
+
> **documentId**: `string`
|
|
114
|
+
|
|
115
|
+
The id of the document.
|
|
116
|
+
|
|
117
|
+
#### Inherited from
|
|
118
|
+
|
|
119
|
+
[`IDocumentBase`](IDocumentBase.md).[`documentId`](IDocumentBase.md#documentid)
|
|
120
|
+
|
|
121
|
+
***
|
|
122
|
+
|
|
123
|
+
### documentIdFormat? {#documentidformat}
|
|
124
|
+
|
|
125
|
+
> `optional` **documentIdFormat?**: `string`
|
|
126
|
+
|
|
127
|
+
The format of the document id.
|
|
128
|
+
|
|
129
|
+
#### Inherited from
|
|
130
|
+
|
|
131
|
+
[`IDocumentBase`](IDocumentBase.md).[`documentIdFormat`](IDocumentBase.md#documentidformat)
|
|
132
|
+
|
|
133
|
+
***
|
|
134
|
+
|
|
135
|
+
### documentCode {#documentcode}
|
|
136
|
+
|
|
137
|
+
> **documentCode**: `UneceDocumentCodeList`
|
|
138
|
+
|
|
139
|
+
The code for the document type.
|
|
140
|
+
|
|
141
|
+
#### Inherited from
|
|
142
|
+
|
|
143
|
+
[`IDocumentBase`](IDocumentBase.md).[`documentCode`](IDocumentBase.md#documentcode)
|
|
144
|
+
|
|
145
|
+
***
|
|
146
|
+
|
|
147
|
+
### annotationObject? {#annotationobject}
|
|
148
|
+
|
|
149
|
+
> `optional` **annotationObject?**: `IJsonLdNodeObject`
|
|
150
|
+
|
|
151
|
+
Additional annotation information for the document.
|
|
152
|
+
|
|
153
|
+
#### Inherited from
|
|
154
|
+
|
|
155
|
+
[`IDocumentBase`](IDocumentBase.md).[`annotationObject`](IDocumentBase.md#annotationobject)
|