@twin.org/document-management-models 0.0.1-next.4 → 0.0.1-next.6
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 +13 -3
- package/dist/esm/index.mjs +13 -4
- package/dist/types/index.d.ts +2 -1
- package/dist/types/models/IDocument.d.ts +6 -5
- package/dist/types/models/IDocumentAttestation.d.ts +6 -5
- package/dist/types/models/IDocumentList.d.ts +4 -3
- package/dist/types/models/documentContexts.d.ts +17 -0
- package/dist/types/models/{documentDataTypes.d.ts → documentTypes.d.ts} +0 -8
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +2 -0
- package/docs/reference/type-aliases/DocumentContexts.md +5 -0
- package/docs/reference/variables/DocumentContexts.md +19 -0
- package/docs/reference/variables/DocumentTypes.md +0 -12
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// Copyright 2024 IOTA Stiftung.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0.
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The contexts of document management objects.
|
|
7
7
|
*/
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
-
const
|
|
9
|
+
const DocumentContexts = {
|
|
10
10
|
/**
|
|
11
11
|
* The context root for the document types.
|
|
12
12
|
*/
|
|
@@ -14,7 +14,16 @@ const DocumentTypes = {
|
|
|
14
14
|
/**
|
|
15
15
|
* The context root for the common types.
|
|
16
16
|
*/
|
|
17
|
-
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
17
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Copyright 2024 IOTA Stiftung.
|
|
21
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
22
|
+
/**
|
|
23
|
+
* The types of document management objects.
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
26
|
+
const DocumentTypes = {
|
|
18
27
|
/**
|
|
19
28
|
* Represents a document.
|
|
20
29
|
*/
|
|
@@ -29,4 +38,5 @@ const DocumentTypes = {
|
|
|
29
38
|
DocumentList: "DocumentList"
|
|
30
39
|
};
|
|
31
40
|
|
|
41
|
+
exports.DocumentContexts = DocumentContexts;
|
|
32
42
|
exports.DocumentTypes = DocumentTypes;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The contexts of document management objects.
|
|
5
5
|
*/
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
-
const
|
|
7
|
+
const DocumentContexts = {
|
|
8
8
|
/**
|
|
9
9
|
* The context root for the document types.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,16 @@ const DocumentTypes = {
|
|
|
12
12
|
/**
|
|
13
13
|
* The context root for the common types.
|
|
14
14
|
*/
|
|
15
|
-
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
15
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Copyright 2024 IOTA Stiftung.
|
|
19
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
20
|
+
/**
|
|
21
|
+
* The types of document management objects.
|
|
22
|
+
*/
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
24
|
+
const DocumentTypes = {
|
|
16
25
|
/**
|
|
17
26
|
* Represents a document.
|
|
18
27
|
*/
|
|
@@ -27,4 +36,4 @@ const DocumentTypes = {
|
|
|
27
36
|
DocumentList: "DocumentList"
|
|
28
37
|
};
|
|
29
38
|
|
|
30
|
-
export { DocumentTypes };
|
|
39
|
+
export { DocumentContexts, DocumentTypes };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export * from "./models/api/IDocumentManagementQueryRequest";
|
|
|
4
4
|
export * from "./models/api/IDocumentManagementQueryResponse";
|
|
5
5
|
export * from "./models/api/IDocumentManagementRemoveRequest";
|
|
6
6
|
export * from "./models/api/IDocumentManagementSetRequest";
|
|
7
|
-
export * from "./models/
|
|
7
|
+
export * from "./models/documentContexts";
|
|
8
|
+
export * from "./models/documentTypes";
|
|
8
9
|
export * from "./models/IDocument";
|
|
9
10
|
export * from "./models/IDocumentAttestation";
|
|
10
11
|
export * from "./models/IDocumentList";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { IAttestationInformation } from "@twin.org/attestation-models";
|
|
2
2
|
import type { IBlobStorageEntry } from "@twin.org/blob-storage-models";
|
|
3
3
|
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
4
|
-
import type {
|
|
4
|
+
import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
|
|
5
5
|
import type { UneceDocumentCodes } from "@twin.org/standards-unece";
|
|
6
|
-
import type {
|
|
6
|
+
import type { DocumentContexts } from "./documentContexts";
|
|
7
|
+
import type { DocumentTypes } from "./documentTypes";
|
|
7
8
|
/**
|
|
8
9
|
* Interface describing a document.
|
|
9
10
|
*/
|
|
@@ -12,9 +13,9 @@ export interface IDocument {
|
|
|
12
13
|
* JSON-LD Context.
|
|
13
14
|
*/
|
|
14
15
|
"@context": [
|
|
15
|
-
typeof
|
|
16
|
-
typeof
|
|
17
|
-
typeof
|
|
16
|
+
typeof DocumentContexts.ContextRoot,
|
|
17
|
+
typeof DocumentContexts.ContextRootCommon,
|
|
18
|
+
typeof SchemaOrgContexts.ContextRoot,
|
|
18
19
|
...IJsonLdContextDefinitionElement[]
|
|
19
20
|
];
|
|
20
21
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
|
|
2
2
|
import type { UneceDocumentCodes } from "@twin.org/standards-unece";
|
|
3
|
-
import type {
|
|
3
|
+
import type { DocumentContexts } from "./documentContexts";
|
|
4
|
+
import type { DocumentTypes } from "./documentTypes";
|
|
4
5
|
/**
|
|
5
6
|
* Interface describing a document attestation.
|
|
6
7
|
*/
|
|
@@ -9,9 +10,9 @@ export interface IDocumentAttestation {
|
|
|
9
10
|
* JSON-LD Context.
|
|
10
11
|
*/
|
|
11
12
|
"@context": [
|
|
12
|
-
typeof
|
|
13
|
-
typeof
|
|
14
|
-
typeof
|
|
13
|
+
typeof DocumentContexts.ContextRoot,
|
|
14
|
+
typeof DocumentContexts.ContextRootCommon,
|
|
15
|
+
typeof SchemaOrgContexts.ContextRoot
|
|
15
16
|
];
|
|
16
17
|
/**
|
|
17
18
|
* JSON-LD Type.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DocumentContexts } from "./documentContexts";
|
|
3
|
+
import type { DocumentTypes } from "./documentTypes";
|
|
3
4
|
import type { IDocument } from "./IDocument";
|
|
4
5
|
/**
|
|
5
6
|
* Interface describing a document entry list.
|
|
@@ -9,8 +10,8 @@ export interface IDocumentList {
|
|
|
9
10
|
* JSON-LD Context.
|
|
10
11
|
*/
|
|
11
12
|
"@context": [
|
|
12
|
-
typeof
|
|
13
|
-
typeof
|
|
13
|
+
typeof DocumentContexts.ContextRoot,
|
|
14
|
+
typeof DocumentContexts.ContextRootCommon,
|
|
14
15
|
...IJsonLdContextDefinitionElement[]
|
|
15
16
|
];
|
|
16
17
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contexts of document management objects.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DocumentContexts: {
|
|
5
|
+
/**
|
|
6
|
+
* The context root for the document types.
|
|
7
|
+
*/
|
|
8
|
+
readonly ContextRoot: "https://schema.twindev.org/documents/";
|
|
9
|
+
/**
|
|
10
|
+
* The context root for the common types.
|
|
11
|
+
*/
|
|
12
|
+
readonly ContextRootCommon: "https://schema.twindev.org/common/";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The contexts of document management objects.
|
|
16
|
+
*/
|
|
17
|
+
export type DocumentContexts = (typeof DocumentContexts)[keyof typeof DocumentContexts];
|
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
* The types of document management objects.
|
|
3
3
|
*/
|
|
4
4
|
export declare const DocumentTypes: {
|
|
5
|
-
/**
|
|
6
|
-
* The context root for the document types.
|
|
7
|
-
*/
|
|
8
|
-
readonly ContextRoot: "https://schema.twindev.org/documents/";
|
|
9
|
-
/**
|
|
10
|
-
* The context root for the common types.
|
|
11
|
-
*/
|
|
12
|
-
readonly ContextRootCommon: "https://schema.twindev.org/common/";
|
|
13
5
|
/**
|
|
14
6
|
* Represents a document.
|
|
15
7
|
*/
|
package/docs/changelog.md
CHANGED
package/docs/reference/index.md
CHANGED
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
## Type Aliases
|
|
17
17
|
|
|
18
|
+
- [DocumentContexts](type-aliases/DocumentContexts.md)
|
|
18
19
|
- [DocumentTypes](type-aliases/DocumentTypes.md)
|
|
19
20
|
|
|
20
21
|
## Variables
|
|
21
22
|
|
|
23
|
+
- [DocumentContexts](variables/DocumentContexts.md)
|
|
22
24
|
- [DocumentTypes](variables/DocumentTypes.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: DocumentContexts
|
|
2
|
+
|
|
3
|
+
> `const` **DocumentContexts**: `object`
|
|
4
|
+
|
|
5
|
+
The contexts 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.
|
|
@@ -6,18 +6,6 @@ The types of document management objects.
|
|
|
6
6
|
|
|
7
7
|
## Type declaration
|
|
8
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
9
|
### Document
|
|
22
10
|
|
|
23
11
|
> `readonly` **Document**: `"Document"` = `"Document"`
|
package/package.json
CHANGED