@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.
@@ -3,10 +3,10 @@
3
3
  // Copyright 2024 IOTA Stiftung.
4
4
  // SPDX-License-Identifier: Apache-2.0.
5
5
  /**
6
- * The types of document management objects.
6
+ * The contexts of document management objects.
7
7
  */
8
8
  // eslint-disable-next-line @typescript-eslint/naming-convention
9
- const DocumentTypes = {
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;
@@ -1,10 +1,10 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
3
  /**
4
- * The types of document management objects.
4
+ * The contexts of document management objects.
5
5
  */
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
- const DocumentTypes = {
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 };
@@ -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/documentDataTypes";
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 { SchemaOrgTypes } from "@twin.org/standards-schema-org";
4
+ import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
5
5
  import type { UneceDocumentCodes } from "@twin.org/standards-unece";
6
- import type { DocumentTypes } from "./documentDataTypes";
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 DocumentTypes.ContextRoot,
16
- typeof DocumentTypes.ContextRootCommon,
17
- typeof SchemaOrgTypes.ContextRoot,
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 { SchemaOrgTypes } from "@twin.org/standards-schema-org";
1
+ import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
2
2
  import type { UneceDocumentCodes } from "@twin.org/standards-unece";
3
- import type { DocumentTypes } from "./documentDataTypes";
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 DocumentTypes.ContextRoot,
13
- typeof DocumentTypes.ContextRootCommon,
14
- typeof SchemaOrgTypes.ContextRoot
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 { DocumentTypes } from "./documentDataTypes";
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 DocumentTypes.ContextRoot,
13
- typeof DocumentTypes.ContextRootCommon,
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
@@ -1,5 +1,5 @@
1
1
  # @twin.org/document-management-models - Changelog
2
2
 
3
- ## v0.0.1-next.4
3
+ ## v0.0.1-next.6
4
4
 
5
5
  - Initial Release
@@ -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,5 @@
1
+ # Type Alias: DocumentContexts
2
+
3
+ > **DocumentContexts**: *typeof* [`DocumentContexts`](../variables/DocumentContexts.md)\[keyof *typeof* [`DocumentContexts`](../variables/DocumentContexts.md)\]
4
+
5
+ The contexts of document management objects.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/document-management-models",
3
- "version": "0.0.1-next.4",
3
+ "version": "0.0.1-next.6",
4
4
  "description": "Models which define the structure of the document management connectors and services",
5
5
  "repository": {
6
6
  "type": "git",