@twin.org/document-management-models 0.0.3-next.3 → 0.0.3-next.5

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.
@@ -12,14 +12,14 @@ export class DocumentManagementDataTypes {
12
12
  * Register all the data types.
13
13
  */
14
14
  static registerTypes() {
15
- DataTypeHandlerFactory.register(`${DocumentContexts.ContextRoot}${DocumentTypes.Document}`, () => ({
16
- context: DocumentContexts.ContextRoot,
15
+ DataTypeHandlerFactory.register(`${DocumentContexts.Namespace}${DocumentTypes.Document}`, () => ({
16
+ namespace: DocumentContexts.Namespace,
17
17
  type: DocumentTypes.Document,
18
18
  defaultValue: {},
19
19
  jsonSchema: async () => DocumentSchema
20
20
  }));
21
- DataTypeHandlerFactory.register(`${DocumentContexts.ContextRoot}${DocumentTypes.DocumentAttestation}`, () => ({
22
- context: DocumentContexts.ContextRoot,
21
+ DataTypeHandlerFactory.register(`${DocumentContexts.Namespace}${DocumentTypes.DocumentAttestation}`, () => ({
22
+ namespace: DocumentContexts.Namespace,
23
23
  type: DocumentTypes.DocumentAttestation,
24
24
  defaultValue: {},
25
25
  jsonSchema: async () => DocumentSchema
@@ -1 +1 @@
1
- {"version":3,"file":"documentManagementDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/documentManagementDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,cAAc,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,gBAAgB,CAAC,WAAW,GAAG,aAAa,CAAC,QAAQ,EAAE,EAC1D,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,gBAAgB,CAAC,WAAW;YACrC,IAAI,EAAE,aAAa,CAAC,QAAQ;YAC5B,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,cAA6B;SACrD,CAAC,CACF,CAAC;QAEF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,gBAAgB,CAAC,WAAW,GAAG,aAAa,CAAC,mBAAmB,EAAE,EACrE,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,gBAAgB,CAAC,WAAW;YACrC,IAAI,EAAE,aAAa,CAAC,mBAAmB;YACvC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,cAA6B;SACrD,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { DocumentContexts } from \"../models/documentContexts.js\";\nimport { DocumentTypes } from \"../models/documentTypes.js\";\nimport DocumentSchema from \"../schemas/Document.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for document management.\n */\nexport class DocumentManagementDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DocumentContexts.ContextRoot}${DocumentTypes.Document}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DocumentContexts.ContextRoot,\n\t\t\t\ttype: DocumentTypes.Document,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => DocumentSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DocumentContexts.ContextRoot}${DocumentTypes.DocumentAttestation}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DocumentContexts.ContextRoot,\n\t\t\t\ttype: DocumentTypes.DocumentAttestation,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => DocumentSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"documentManagementDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/documentManagementDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,cAAc,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,gBAAgB,CAAC,SAAS,GAAG,aAAa,CAAC,QAAQ,EAAE,EACxD,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,gBAAgB,CAAC,SAAS;YACrC,IAAI,EAAE,aAAa,CAAC,QAAQ;YAC5B,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,cAA6B;SACrD,CAAC,CACF,CAAC;QAEF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,gBAAgB,CAAC,SAAS,GAAG,aAAa,CAAC,mBAAmB,EAAE,EACnE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,gBAAgB,CAAC,SAAS;YACrC,IAAI,EAAE,aAAa,CAAC,mBAAmB;YACvC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,cAA6B;SACrD,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { DocumentContexts } from \"../models/documentContexts.js\";\nimport { DocumentTypes } from \"../models/documentTypes.js\";\nimport DocumentSchema from \"../schemas/Document.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for document management.\n */\nexport class DocumentManagementDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DocumentContexts.Namespace}${DocumentTypes.Document}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: DocumentContexts.Namespace,\n\t\t\t\ttype: DocumentTypes.Document,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => DocumentSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DocumentContexts.Namespace}${DocumentTypes.DocumentAttestation}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: DocumentContexts.Namespace,\n\t\t\t\ttype: DocumentTypes.DocumentAttestation,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => DocumentSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IDocument.js","sourceRoot":"","sources":["../../../src/models/IDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAttestationInformation } from \"@twin.org/attestation-models\";\nimport type { IBlobStorageEntry } from \"@twin.org/blob-storage-models\";\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { DocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document.\n */\nexport interface IDocument {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof DocumentContexts.ContextRoot,\n\t\ttypeof DocumentContexts.ContextRootCommon,\n\t\ttypeof SchemaOrgContexts.ContextRoot,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.Document;\n\n\t/**\n\t * The full id of the document.\n\t */\n\tid: string;\n\n\t/**\n\t * The id of the document.\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The format of the document id.\n\t */\n\tdocumentIdFormat?: string;\n\n\t/**\n\t * The code for the document type.\n\t */\n\tdocumentCode: DocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * Additional annotation information for the document.\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob storage id for the document.\n\t */\n\tblobStorageId: string;\n\n\t/**\n\t * The hash of the blob data.\n\t */\n\tblobHash: string;\n\n\t/**\n\t * The additional JSON-LD for blob storage if it was requested.\n\t */\n\tblobStorageEntry?: IBlobStorageEntry;\n\n\t/**\n\t * The data extracted from the document using data extraction services.\n\t */\n\textractedData?: unknown;\n\n\t/**\n\t * The attestation for the document if one was created.\n\t */\n\tattestationId?: string;\n\n\t/**\n\t * The additional JSON-LD for attestation storage if it was requested.\n\t */\n\tattestationInformation?: IAttestationInformation;\n\n\t/**\n\t * The date/time of when the document was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time of when the document was modified.\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The date/time of when the document was deleted, as we never actually remove items.\n\t */\n\tdateDeleted?: string;\n\n\t/**\n\t * The organization which added the document to the graph.\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The user who added the document to the graph.\n\t */\n\tuserIdentity?: string;\n}\n"]}
1
+ {"version":3,"file":"IDocument.js","sourceRoot":"","sources":["../../../src/models/IDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAttestationInformation } from \"@twin.org/attestation-models\";\nimport type { IBlobStorageEntry } from \"@twin.org/blob-storage-models\";\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document.\n */\nexport interface IDocument {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof DocumentContexts.Namespace,\n\t\ttypeof DocumentContexts.NamespaceCommon,\n\t\ttypeof SchemaOrgContexts.Namespace,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.Document;\n\n\t/**\n\t * The full id of the document.\n\t */\n\tid: string;\n\n\t/**\n\t * The id of the document.\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The format of the document id.\n\t */\n\tdocumentIdFormat?: string;\n\n\t/**\n\t * The code for the document type.\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * Additional annotation information for the document.\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob storage id for the document.\n\t */\n\tblobStorageId: string;\n\n\t/**\n\t * The hash of the blob data.\n\t */\n\tblobHash: string;\n\n\t/**\n\t * The additional JSON-LD for blob storage if it was requested.\n\t */\n\tblobStorageEntry?: IBlobStorageEntry;\n\n\t/**\n\t * The data extracted from the document using data extraction services.\n\t */\n\textractedData?: unknown;\n\n\t/**\n\t * The attestation for the document if one was created.\n\t */\n\tattestationId?: string;\n\n\t/**\n\t * The additional JSON-LD for attestation storage if it was requested.\n\t */\n\tattestationInformation?: IAttestationInformation;\n\n\t/**\n\t * The date/time of when the document was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time of when the document was modified.\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The date/time of when the document was deleted, as we never actually remove items.\n\t */\n\tdateDeleted?: string;\n\n\t/**\n\t * The organization which added the document to the graph.\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The user who added the document to the graph.\n\t */\n\tuserIdentity?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IDocumentAttestation.js","sourceRoot":"","sources":["../../../src/models/IDocumentAttestation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { DocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document attestation.\n */\nexport interface IDocumentAttestation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof DocumentContexts.ContextRoot,\n\t\ttypeof DocumentContexts.ContextRootCommon,\n\t\ttypeof SchemaOrgContexts.ContextRoot\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.DocumentAttestation;\n\n\t/**\n\t * The id of the document.\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The code for the document type.\n\t */\n\tdocumentCode: DocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * The date/time of when the document was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The hash of the document being attested.\n\t */\n\tblobHash: string;\n}\n"]}
1
+ {"version":3,"file":"IDocumentAttestation.js","sourceRoot":"","sources":["../../../src/models/IDocumentAttestation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document attestation.\n */\nexport interface IDocumentAttestation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof DocumentContexts.Namespace,\n\t\ttypeof DocumentContexts.NamespaceCommon,\n\t\ttypeof SchemaOrgContexts.Namespace\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.DocumentAttestation;\n\n\t/**\n\t * The id of the document.\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The code for the document type.\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * The date/time of when the document was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The hash of the document being attested.\n\t */\n\tblobHash: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IDocumentList.js","sourceRoot":"","sources":["../../../src/models/IDocumentList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { IDocument } from \"./IDocument.js\";\n\n/**\n * Interface describing a list of document entries.\n */\nexport interface IDocumentList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.ContextRoot,\n\t\ttypeof DocumentContexts.ContextRoot,\n\t\ttypeof DocumentContexts.ContextRootCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof SchemaOrgTypes.ItemList;\n\n\t/**\n\t * The list of documents.\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IDocument[];\n\n\t/**\n\t * The ids of the other vertices which are connected to the document.\n\t */\n\tedges?: string[];\n\n\t/**\n\t * The cursor to get the next chunk of documents.\n\t */\n\t[SchemaOrgTypes.NextItem]?: string;\n}\n"]}
1
+ {"version":3,"file":"IDocumentList.js","sourceRoot":"","sources":["../../../src/models/IDocumentList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { IDocument } from \"./IDocument.js\";\n\n/**\n * Interface describing a list of document entries.\n */\nexport interface IDocumentList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Namespace,\n\t\ttypeof DocumentContexts.Namespace,\n\t\ttypeof DocumentContexts.NamespaceCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof SchemaOrgTypes.ItemList;\n\n\t/**\n\t * The list of documents.\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IDocument[];\n\n\t/**\n\t * The ids of the other vertices which are connected to the document.\n\t */\n\tedges?: string[];\n\n\t/**\n\t * The cursor to get the next chunk of documents.\n\t */\n\t[SchemaOrgTypes.NextItem]?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IDocumentManagementComponent.js","sourceRoot":"","sources":["../../../src/models/IDocumentManagementComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphVertexList } from \"@twin.org/auditable-item-graph-models\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { DocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { IDocument } from \"./IDocument.js\";\nimport type { IDocumentList } from \"./IDocumentList.js\";\n\n/**\n * Interface describing an document management contract.\n */\nexport interface IDocumentManagementComponent extends IComponent {\n\t/**\n\t * Create a document as an auditable item graph vertex and add its content to blob storage.\n\t * If the document id already exists and the blob data is different a new revision will be created.\n\t * For any other changes the current revision will be updated.\n\t * @param documentId The document id to create.\n\t * @param documentIdFormat The format of the document identifier.\n\t * @param documentCode The code for the document type.\n\t * @param blob The data to create the document with.\n\t * @param annotationObject Additional information to associate with the document.\n\t * @param auditableItemGraphEdges The auditable item graph vertices to connect the document to.\n\t * @param options Additional options for the set operation.\n\t * @param options.createAttestation Flag to create an attestation for the document, defaults to false.\n\t * @param options.addAlias Flag to add the document id as an alias to the aig vertex, defaults to true.\n\t * @param options.aliasAnnotationObject Annotation object for the alias.\n\t * @returns The auditable item graph vertex created for the document including its revision.\n\t */\n\tcreate(\n\t\tdocumentId: string,\n\t\tdocumentIdFormat: string | undefined,\n\t\tdocumentCode: DocumentCodeList,\n\t\tblob: Uint8Array,\n\t\tannotationObject?: IJsonLdNodeObject,\n\t\tauditableItemGraphEdges?: {\n\t\t\ttargetId: string;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}[],\n\t\toptions?: {\n\t\t\tcreateAttestation?: boolean;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}\n\t): Promise<string>;\n\n\t/**\n\t * Update a document as an auditable item graph vertex and add its content to blob storage.\n\t * If the blob data is different a new revision will be created.\n\t * For any other changes the current revision will be updated.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param blob The data to update the document with.\n\t * @param annotationObject Additional information to associate with the document.\n\t * @param auditableItemGraphEdges The auditable item graph vertices to connect the document to, if undefined retains current connections.\n\t * @returns Nothing.\n\t */\n\tupdate(\n\t\tauditableItemGraphDocumentId: string,\n\t\tblob?: Uint8Array,\n\t\tannotationObject?: IJsonLdNodeObject,\n\t\tauditableItemGraphEdges?: {\n\t\t\ttargetId: string;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}[]\n\t): Promise<void>;\n\n\t/**\n\t * Get a document using it's auditable item graph vertex id and optional revision.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.\n\t * @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.\n\t * @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.\n\t * @param options.includeRemoved Flag to include deleted documents, defaults to false.\n\t * @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.\n\t * @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.\n\t * @param cursor The cursor to get the next chunk of revisions.\n\t * @param limit Limit the number of items to return, defaults to 1 so only most recent is returned.\n\t * @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.\n\t */\n\tget(\n\t\tauditableItemGraphDocumentId: string,\n\t\toptions?: {\n\t\t\tincludeBlobStorageMetadata?: boolean;\n\t\t\tincludeBlobStorageData?: boolean;\n\t\t\tincludeAttestation?: boolean;\n\t\t\tincludeRemoved?: boolean;\n\t\t\textractRuleGroupId?: string;\n\t\t\textractMimeType?: string;\n\t\t},\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<IDocumentList>;\n\n\t/**\n\t * Get a document revision using it's auditable item graph vertex id.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param revision The revision id of the document to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.\n\t * @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.\n\t * @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.\n\t * @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.\n\t * @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.\n\t * @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.\n\t */\n\tgetRevision(\n\t\tauditableItemGraphDocumentId: string,\n\t\trevision: number,\n\t\toptions?: {\n\t\t\tincludeBlobStorageMetadata?: boolean;\n\t\t\tincludeBlobStorageData?: boolean;\n\t\t\tincludeAttestation?: boolean;\n\t\t\textractRuleGroupId?: string;\n\t\t\textractMimeType?: string;\n\t\t}\n\t): Promise<IDocument>;\n\n\t/**\n\t * Remove an auditable item graph vertex using it's id.\n\t * The document dateDeleted will be set, but can still be queried with the includeRemoved flag.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param revision The revision of the document to remove.\n\t * @returns Nothing.\n\t */\n\tremoveRevision(auditableItemGraphDocumentId: string, revision: number): Promise<void>;\n\n\t/**\n\t * Find all the document with a specific id.\n\t * @param documentId The document id to find in the graph.\n\t * @param cursor The cursor to get the next chunk of documents.\n\t * @param limit The limit to get the next chunk of documents.\n\t * @returns The graph vertices that contain documents referencing the specified document id.\n\t */\n\tquery(\n\t\tdocumentId: string,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<IAuditableItemGraphVertexList>;\n}\n"]}
1
+ {"version":3,"file":"IDocumentManagementComponent.js","sourceRoot":"","sources":["../../../src/models/IDocumentManagementComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphVertexList } from \"@twin.org/auditable-item-graph-models\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { IDocument } from \"./IDocument.js\";\nimport type { IDocumentList } from \"./IDocumentList.js\";\n\n/**\n * Interface describing an document management contract.\n */\nexport interface IDocumentManagementComponent extends IComponent {\n\t/**\n\t * Create a document as an auditable item graph vertex and add its content to blob storage.\n\t * If the document id already exists and the blob data is different a new revision will be created.\n\t * For any other changes the current revision will be updated.\n\t * @param documentId The document id to create.\n\t * @param documentIdFormat The format of the document identifier.\n\t * @param documentCode The code for the document type.\n\t * @param blob The data to create the document with.\n\t * @param annotationObject Additional information to associate with the document.\n\t * @param auditableItemGraphEdges The auditable item graph vertices to connect the document to.\n\t * @param options Additional options for the set operation.\n\t * @param options.createAttestation Flag to create an attestation for the document, defaults to false.\n\t * @param options.addAlias Flag to add the document id as an alias to the aig vertex, defaults to true.\n\t * @param options.aliasAnnotationObject Annotation object for the alias.\n\t * @returns The auditable item graph vertex created for the document including its revision.\n\t */\n\tcreate(\n\t\tdocumentId: string,\n\t\tdocumentIdFormat: string | undefined,\n\t\tdocumentCode: UneceDocumentCodeList,\n\t\tblob: Uint8Array,\n\t\tannotationObject?: IJsonLdNodeObject,\n\t\tauditableItemGraphEdges?: {\n\t\t\ttargetId: string;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}[],\n\t\toptions?: {\n\t\t\tcreateAttestation?: boolean;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}\n\t): Promise<string>;\n\n\t/**\n\t * Update a document as an auditable item graph vertex and add its content to blob storage.\n\t * If the blob data is different a new revision will be created.\n\t * For any other changes the current revision will be updated.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param blob The data to update the document with.\n\t * @param annotationObject Additional information to associate with the document.\n\t * @param auditableItemGraphEdges The auditable item graph vertices to connect the document to, if undefined retains current connections.\n\t * @returns Nothing.\n\t */\n\tupdate(\n\t\tauditableItemGraphDocumentId: string,\n\t\tblob?: Uint8Array,\n\t\tannotationObject?: IJsonLdNodeObject,\n\t\tauditableItemGraphEdges?: {\n\t\t\ttargetId: string;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}[]\n\t): Promise<void>;\n\n\t/**\n\t * Get a document using it's auditable item graph vertex id and optional revision.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.\n\t * @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.\n\t * @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.\n\t * @param options.includeRemoved Flag to include deleted documents, defaults to false.\n\t * @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.\n\t * @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.\n\t * @param cursor The cursor to get the next chunk of revisions.\n\t * @param limit Limit the number of items to return, defaults to 1 so only most recent is returned.\n\t * @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.\n\t */\n\tget(\n\t\tauditableItemGraphDocumentId: string,\n\t\toptions?: {\n\t\t\tincludeBlobStorageMetadata?: boolean;\n\t\t\tincludeBlobStorageData?: boolean;\n\t\t\tincludeAttestation?: boolean;\n\t\t\tincludeRemoved?: boolean;\n\t\t\textractRuleGroupId?: string;\n\t\t\textractMimeType?: string;\n\t\t},\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<IDocumentList>;\n\n\t/**\n\t * Get a document revision using it's auditable item graph vertex id.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param revision The revision id of the document to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.\n\t * @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.\n\t * @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.\n\t * @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.\n\t * @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.\n\t * @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.\n\t */\n\tgetRevision(\n\t\tauditableItemGraphDocumentId: string,\n\t\trevision: number,\n\t\toptions?: {\n\t\t\tincludeBlobStorageMetadata?: boolean;\n\t\t\tincludeBlobStorageData?: boolean;\n\t\t\tincludeAttestation?: boolean;\n\t\t\textractRuleGroupId?: string;\n\t\t\textractMimeType?: string;\n\t\t}\n\t): Promise<IDocument>;\n\n\t/**\n\t * Remove an auditable item graph vertex using it's id.\n\t * The document dateDeleted will be set, but can still be queried with the includeRemoved flag.\n\t * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.\n\t * @param revision The revision of the document to remove.\n\t * @returns Nothing.\n\t */\n\tremoveRevision(auditableItemGraphDocumentId: string, revision: number): Promise<void>;\n\n\t/**\n\t * Find all the document with a specific id.\n\t * @param documentId The document id to find in the graph.\n\t * @param cursor The cursor to get the next chunk of documents.\n\t * @param limit The limit to get the next chunk of documents.\n\t * @returns The graph vertices that contain documents referencing the specified document id.\n\t */\n\tquery(\n\t\tdocumentId: string,\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<IAuditableItemGraphVertexList>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IDocumentManagementCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IDocumentManagementCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { DocumentCodeList } from \"@twin.org/standards-unece\";\n\n/**\n * Request to create a document as an auditable item graph vertex.\n */\nexport interface IDocumentManagementCreateRequest {\n\t/**\n\t * The body parameters.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The document id to create.\n\t\t */\n\t\tdocumentId: string;\n\n\t\t/**\n\t\t * The format of the document identifier.\n\t\t */\n\t\tdocumentIdFormat: string | undefined;\n\n\t\t/**\n\t\t * The code for the document type.\n\t\t */\n\t\tdocumentCode: DocumentCodeList;\n\n\t\t/**\n\t\t * The data to create the document with, in base64.\n\t\t */\n\t\tblob: string;\n\n\t\t/**\n\t\t * Additional information to associate with the document.\n\t\t */\n\t\tannotationObject?: IJsonLdNodeObject;\n\n\t\t/**\n\t\t * The auditable item graph vertices to connect the document to.\n\t\t */\n\t\tauditableItemGraphEdges?: {\n\t\t\ttargetId: string;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\n\t\t/**\n\t\t * Flag to create an attestation for the document, defaults to false.\n\t\t */\n\t\tcreateAttestation?: boolean;\n\n\t\t/**\n\t\t * Flag to add the document id as an alias to the aig vertex, defaults to true.\n\t\t */\n\t\taddAlias?: boolean;\n\n\t\t/**\n\t\t * Annotation object for the alias.\n\t\t */\n\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IDocumentManagementCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IDocumentManagementCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\n\n/**\n * Request to create a document as an auditable item graph vertex.\n */\nexport interface IDocumentManagementCreateRequest {\n\t/**\n\t * The body parameters.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The document id to create.\n\t\t */\n\t\tdocumentId: string;\n\n\t\t/**\n\t\t * The format of the document identifier.\n\t\t */\n\t\tdocumentIdFormat: string | undefined;\n\n\t\t/**\n\t\t * The code for the document type.\n\t\t */\n\t\tdocumentCode: UneceDocumentCodeList;\n\n\t\t/**\n\t\t * The data to create the document with, in base64.\n\t\t */\n\t\tblob: string;\n\n\t\t/**\n\t\t * Additional information to associate with the document.\n\t\t */\n\t\tannotationObject?: IJsonLdNodeObject;\n\n\t\t/**\n\t\t * The auditable item graph vertices to connect the document to.\n\t\t */\n\t\tauditableItemGraphEdges?: {\n\t\t\ttargetId: string;\n\t\t\taddAlias?: boolean;\n\t\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\n\t\t/**\n\t\t * Flag to create an attestation for the document, defaults to false.\n\t\t */\n\t\tcreateAttestation?: boolean;\n\n\t\t/**\n\t\t * Flag to add the document id as an alias to the aig vertex, defaults to true.\n\t\t */\n\t\taddAlias?: boolean;\n\n\t\t/**\n\t\t * Annotation object for the alias.\n\t\t */\n\t\taliasAnnotationObject?: IJsonLdNodeObject;\n\t};\n}\n"]}
@@ -6,12 +6,12 @@
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  export const DocumentContexts = {
8
8
  /**
9
- * The context root for the document types.
9
+ * The namespace for the document types.
10
10
  */
11
- ContextRoot: "https://schema.twindev.org/documents/",
11
+ Namespace: "https://schema.twindev.org/documents/",
12
12
  /**
13
- * The context root for the common types.
13
+ * The namespace for the common types.
14
14
  */
15
- ContextRootCommon: "https://schema.twindev.org/common/"
15
+ NamespaceCommon: "https://schema.twindev.org/common/"
16
16
  };
17
17
  //# sourceMappingURL=documentContexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"documentContexts.js","sourceRoot":"","sources":["../../../src/models/documentContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,WAAW,EAAE,uCAAuC;IAEpD;;OAEG;IACH,iBAAiB,EAAE,oCAAoC;CAC9C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of document management objects.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DocumentContexts = {\n\t/**\n\t * The context root for the document types.\n\t */\n\tContextRoot: \"https://schema.twindev.org/documents/\",\n\n\t/**\n\t * The context root for the common types.\n\t */\n\tContextRootCommon: \"https://schema.twindev.org/common/\"\n} as const;\n\n/**\n * The contexts of document management objects.\n */\nexport type DocumentContexts = (typeof DocumentContexts)[keyof typeof DocumentContexts];\n"]}
1
+ {"version":3,"file":"documentContexts.js","sourceRoot":"","sources":["../../../src/models/documentContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,uCAAuC;IAElD;;OAEG;IACH,eAAe,EAAE,oCAAoC;CAC5C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of document management objects.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DocumentContexts = {\n\t/**\n\t * The namespace for the document types.\n\t */\n\tNamespace: \"https://schema.twindev.org/documents/\",\n\n\t/**\n\t * The namespace for the common types.\n\t */\n\tNamespaceCommon: \"https://schema.twindev.org/common/\"\n} as const;\n\n/**\n * The contexts of document management objects.\n */\nexport type DocumentContexts = (typeof DocumentContexts)[keyof typeof DocumentContexts];\n"]}
@@ -44,7 +44,7 @@
44
44
  "description": "The format of the document id."
45
45
  },
46
46
  "documentCode": {
47
- "$ref": "https://schema.twindev.org/documents/DocumentCodeList",
47
+ "$ref": "https://schema.twindev.org/unece/UneceDocumentCodeList",
48
48
  "description": "The code for the document type."
49
49
  },
50
50
  "documentRevision": {
@@ -2,7 +2,7 @@ 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
4
  import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
5
- import type { DocumentCodeList } from "@twin.org/standards-unece";
5
+ import type { UneceDocumentCodeList } from "@twin.org/standards-unece";
6
6
  import type { DocumentContexts } from "./documentContexts.js";
7
7
  import type { DocumentTypes } from "./documentTypes.js";
8
8
  /**
@@ -13,9 +13,9 @@ export interface IDocument {
13
13
  * JSON-LD Context.
14
14
  */
15
15
  "@context": [
16
- typeof DocumentContexts.ContextRoot,
17
- typeof DocumentContexts.ContextRootCommon,
18
- typeof SchemaOrgContexts.ContextRoot,
16
+ typeof DocumentContexts.Namespace,
17
+ typeof DocumentContexts.NamespaceCommon,
18
+ typeof SchemaOrgContexts.Namespace,
19
19
  ...IJsonLdContextDefinitionElement[]
20
20
  ];
21
21
  /**
@@ -37,7 +37,7 @@ export interface IDocument {
37
37
  /**
38
38
  * The code for the document type.
39
39
  */
40
- documentCode: DocumentCodeList;
40
+ documentCode: UneceDocumentCodeList;
41
41
  /**
42
42
  * The revision of the document as a 0 based index.
43
43
  */
@@ -1,5 +1,5 @@
1
1
  import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
2
- import type { DocumentCodeList } from "@twin.org/standards-unece";
2
+ import type { UneceDocumentCodeList } from "@twin.org/standards-unece";
3
3
  import type { DocumentContexts } from "./documentContexts.js";
4
4
  import type { DocumentTypes } from "./documentTypes.js";
5
5
  /**
@@ -10,9 +10,9 @@ export interface IDocumentAttestation {
10
10
  * JSON-LD Context.
11
11
  */
12
12
  "@context": [
13
- typeof DocumentContexts.ContextRoot,
14
- typeof DocumentContexts.ContextRootCommon,
15
- typeof SchemaOrgContexts.ContextRoot
13
+ typeof DocumentContexts.Namespace,
14
+ typeof DocumentContexts.NamespaceCommon,
15
+ typeof SchemaOrgContexts.Namespace
16
16
  ];
17
17
  /**
18
18
  * JSON-LD Type.
@@ -25,7 +25,7 @@ export interface IDocumentAttestation {
25
25
  /**
26
26
  * The code for the document type.
27
27
  */
28
- documentCode: DocumentCodeList;
28
+ documentCode: UneceDocumentCodeList;
29
29
  /**
30
30
  * The revision of the document as a 0 based index.
31
31
  */
@@ -10,9 +10,9 @@ export interface IDocumentList {
10
10
  * JSON-LD Context.
11
11
  */
12
12
  "@context": [
13
- typeof SchemaOrgContexts.ContextRoot,
14
- typeof DocumentContexts.ContextRoot,
15
- typeof DocumentContexts.ContextRootCommon,
13
+ typeof SchemaOrgContexts.Namespace,
14
+ typeof DocumentContexts.Namespace,
15
+ typeof DocumentContexts.NamespaceCommon,
16
16
  ...IJsonLdContextDefinitionElement[]
17
17
  ];
18
18
  /**
@@ -1,7 +1,7 @@
1
1
  import type { IAuditableItemGraphVertexList } from "@twin.org/auditable-item-graph-models";
2
2
  import type { IComponent } from "@twin.org/core";
3
3
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
4
- import type { DocumentCodeList } from "@twin.org/standards-unece";
4
+ import type { UneceDocumentCodeList } from "@twin.org/standards-unece";
5
5
  import type { IDocument } from "./IDocument.js";
6
6
  import type { IDocumentList } from "./IDocumentList.js";
7
7
  /**
@@ -24,7 +24,7 @@ export interface IDocumentManagementComponent extends IComponent {
24
24
  * @param options.aliasAnnotationObject Annotation object for the alias.
25
25
  * @returns The auditable item graph vertex created for the document including its revision.
26
26
  */
27
- create(documentId: string, documentIdFormat: string | undefined, documentCode: DocumentCodeList, blob: Uint8Array, annotationObject?: IJsonLdNodeObject, auditableItemGraphEdges?: {
27
+ create(documentId: string, documentIdFormat: string | undefined, documentCode: UneceDocumentCodeList, blob: Uint8Array, annotationObject?: IJsonLdNodeObject, auditableItemGraphEdges?: {
28
28
  targetId: string;
29
29
  addAlias?: boolean;
30
30
  aliasAnnotationObject?: IJsonLdNodeObject;
@@ -1,5 +1,5 @@
1
1
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- import type { DocumentCodeList } from "@twin.org/standards-unece";
2
+ import type { UneceDocumentCodeList } from "@twin.org/standards-unece";
3
3
  /**
4
4
  * Request to create a document as an auditable item graph vertex.
5
5
  */
@@ -19,7 +19,7 @@ export interface IDocumentManagementCreateRequest {
19
19
  /**
20
20
  * The code for the document type.
21
21
  */
22
- documentCode: DocumentCodeList;
22
+ documentCode: UneceDocumentCodeList;
23
23
  /**
24
24
  * The data to create the document with, in base64.
25
25
  */
@@ -3,13 +3,13 @@
3
3
  */
4
4
  export declare const DocumentContexts: {
5
5
  /**
6
- * The context root for the document types.
6
+ * The namespace for the document types.
7
7
  */
8
- readonly ContextRoot: "https://schema.twindev.org/documents/";
8
+ readonly Namespace: "https://schema.twindev.org/documents/";
9
9
  /**
10
- * The context root for the common types.
10
+ * The namespace for the common types.
11
11
  */
12
- readonly ContextRootCommon: "https://schema.twindev.org/common/";
12
+ readonly NamespaceCommon: "https://schema.twindev.org/common/";
13
13
  };
14
14
  /**
15
15
  * The contexts of document management objects.
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @twin.org/document-management-models - Changelog
2
2
 
3
+ ## [0.0.3-next.5](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.4...document-management-models-v0.0.3-next.5) (2026-01-14)
4
+
5
+
6
+ ### Features
7
+
8
+ * update contexts and namespaces ([#29](https://github.com/twinfoundation/document-management/issues/29)) ([ef7abc0](https://github.com/twinfoundation/document-management/commit/ef7abc01d10b3f9528be8afaa21dbd00181939ae))
9
+
10
+ ## [0.0.3-next.4](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.3...document-management-models-v0.0.3-next.4) (2026-01-06)
11
+
12
+
13
+ ### Features
14
+
15
+ * update unece dependencies ([a27548c](https://github.com/twinfoundation/document-management/commit/a27548cdebbe1d9577fc8341166538c2f07348a3))
16
+
3
17
  ## [0.0.3-next.3](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.2...document-management-models-v0.0.3-next.3) (2025-12-03)
4
18
 
5
19
 
@@ -46,7 +46,7 @@ The format of the document id.
46
46
 
47
47
  ### documentCode
48
48
 
49
- > **documentCode**: `DocumentCodeList`
49
+ > **documentCode**: `UneceDocumentCodeList`
50
50
 
51
51
  The code for the document type.
52
52
 
@@ -30,7 +30,7 @@ The id of the document.
30
30
 
31
31
  ### documentCode
32
32
 
33
- > **documentCode**: `DocumentCodeList`
33
+ > **documentCode**: `UneceDocumentCodeList`
34
34
 
35
35
  The code for the document type.
36
36
 
@@ -32,7 +32,7 @@ The format of the document identifier.
32
32
 
33
33
  ##### documentCode
34
34
 
35
- `DocumentCodeList`
35
+ `UneceDocumentCodeList`
36
36
 
37
37
  The code for the document type.
38
38
 
@@ -24,7 +24,7 @@ The format of the document identifier.
24
24
 
25
25
  #### documentCode
26
26
 
27
- > **documentCode**: `DocumentCodeList`
27
+ > **documentCode**: `UneceDocumentCodeList`
28
28
 
29
29
  The code for the document type.
30
30
 
@@ -6,14 +6,14 @@ The contexts of document management objects.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### ContextRoot
9
+ ### Namespace
10
10
 
11
- > `readonly` **ContextRoot**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
11
+ > `readonly` **Namespace**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
12
12
 
13
- The context root for the document types.
13
+ The namespace for the document types.
14
14
 
15
- ### ContextRootCommon
15
+ ### NamespaceCommon
16
16
 
17
- > `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
17
+ > `readonly` **NamespaceCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
18
18
 
19
- The context root for the common types.
19
+ The namespace for the common types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/document-management-models",
3
- "version": "0.0.3-next.3",
3
+ "version": "0.0.3-next.5",
4
4
  "description": "Models which define the structure of the document management connectors and services",
5
5
  "repository": {
6
6
  "type": "git",