@twin.org/document-management-models 0.0.2-next.2 → 0.0.2-next.4

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.
@@ -27,7 +27,7 @@ export interface IDocumentManagementComponent extends IComponent {
27
27
  * @returns The auditable item graph vertex created for the document including its revision.
28
28
  */
29
29
  create(documentId: string, documentIdFormat: string | undefined, documentCode: UneceDocumentCodes, blob: Uint8Array, annotationObject?: IJsonLdNodeObject, auditableItemGraphEdges?: {
30
- id: string;
30
+ targetId: string;
31
31
  addAlias?: boolean;
32
32
  aliasAnnotationObject?: IJsonLdNodeObject;
33
33
  }[], options?: {
@@ -48,7 +48,7 @@ export interface IDocumentManagementComponent extends IComponent {
48
48
  * @returns Nothing.
49
49
  */
50
50
  update(auditableItemGraphDocumentId: string, blob?: Uint8Array, annotationObject?: IJsonLdNodeObject, auditableItemGraphEdges?: {
51
- id: string;
51
+ targetId: string;
52
52
  addAlias?: boolean;
53
53
  aliasAnnotationObject?: IJsonLdNodeObject;
54
54
  }[], userIdentity?: string, nodeIdentity?: string): Promise<void>;
@@ -63,7 +63,7 @@ export interface IDocumentManagementComponent extends IComponent {
63
63
  * @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
64
64
  * @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
65
65
  * @param cursor The cursor to get the next chunk of revisions.
66
- * @param pageSize Page size of items to return, defaults to 1 so only most recent is returned.
66
+ * @param limit Limit the number of items to return, defaults to 1 so only most recent is returned.
67
67
  * @param userIdentity The identity to perform the auditable item graph operation with.
68
68
  * @param nodeIdentity The node identity to use for vault operations.
69
69
  * @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
@@ -75,7 +75,7 @@ export interface IDocumentManagementComponent extends IComponent {
75
75
  includeRemoved?: boolean;
76
76
  extractRuleGroupId?: string;
77
77
  extractMimeType?: string;
78
- }, cursor?: string, pageSize?: number, userIdentity?: string, nodeIdentity?: string): Promise<IDocumentList>;
78
+ }, cursor?: string, limit?: number, userIdentity?: string, nodeIdentity?: string): Promise<IDocumentList>;
79
79
  /**
80
80
  * Get a document revision using it's auditable item graph vertex id.
81
81
  * @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
@@ -111,10 +111,10 @@ export interface IDocumentManagementComponent extends IComponent {
111
111
  * Find all the document with a specific id.
112
112
  * @param documentId The document id to find in the graph.
113
113
  * @param cursor The cursor to get the next chunk of documents.
114
- * @param pageSize The page size to get the next chunk of documents.
114
+ * @param limit The limit to get the next chunk of documents.
115
115
  * @param userIdentity The identity to perform the auditable item graph operation with.
116
116
  * @param nodeIdentity The node identity to use for vault operations.
117
117
  * @returns The graph vertices that contain documents referencing the specified document id.
118
118
  */
119
- query(documentId: string, cursor?: string, pageSize?: number, userIdentity?: string, nodeIdentity?: string): Promise<IAuditableItemGraphVertexList>;
119
+ query(documentId: string, cursor?: string, limit?: number, userIdentity?: string, nodeIdentity?: string): Promise<IAuditableItemGraphVertexList>;
120
120
  }
@@ -32,7 +32,7 @@ export interface IDocumentManagementCreateRequest {
32
32
  * The auditable item graph vertices to connect the document to.
33
33
  */
34
34
  auditableItemGraphEdges?: {
35
- id: string;
35
+ targetId: string;
36
36
  addAlias?: boolean;
37
37
  aliasAnnotationObject?: IJsonLdNodeObject;
38
38
  }[];
@@ -51,10 +51,10 @@ export interface IDocumentManagementGetRequest {
51
51
  */
52
52
  extractMimeType?: string;
53
53
  /**
54
- * Page size of items to return, defaults to 1 so only most recent is returned.
54
+ * PLimit the number of items to return, defaults to 1 so only most recent is returned.
55
55
  * @default 1
56
56
  */
57
- pageSize?: number | string;
57
+ limit?: string;
58
58
  /**
59
59
  * The cursor to get the next chunk of revisions.
60
60
  */
@@ -24,6 +24,6 @@ export interface IDocumentManagementQueryRequest {
24
24
  /**
25
25
  * The number of documents to return.
26
26
  */
27
- pageSize?: number | string;
27
+ limit?: string;
28
28
  };
29
29
  }
@@ -28,7 +28,7 @@ export interface IDocumentManagementUpdateRequest {
28
28
  * The auditable item graph vertices to connect the document to.
29
29
  */
30
30
  auditableItemGraphEdges?: {
31
- id: string;
31
+ targetId: string;
32
32
  addAlias?: boolean;
33
33
  aliasAnnotationObject?: IJsonLdNodeObject;
34
34
  }[];
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @twin.org/document-management-models - Changelog
2
2
 
3
+ ## [0.0.2-next.4](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.2-next.3...document-management-models-v0.0.2-next.4) (2025-10-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * add validate-locales ([b6b6f9e](https://github.com/twinfoundation/document-management/commit/b6b6f9e9d66c17af3d030247ca168ac0b5844bdc))
9
+
10
+ ## [0.0.2-next.3](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.2-next.2...document-management-models-v0.0.2-next.3) (2025-09-29)
11
+
12
+
13
+ ### Features
14
+
15
+ * use targetId in AIG for edges ([82dec81](https://github.com/twinfoundation/document-management/commit/82dec8190d8b523b350ef133bdcf648cab1023b0))
16
+
3
17
  ## [0.0.2-next.2](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.2-next.1...document-management-models-v0.0.2-next.2) (2025-08-29)
4
18
 
5
19
 
@@ -6,6 +6,14 @@ Interface describing an document management contract.
6
6
 
7
7
  - `IComponent`
8
8
 
9
+ ## Indexable
10
+
11
+ \[`key`: `string`\]: `any`
12
+
13
+ All methods are optional, so we introduce an index signature to allow
14
+ any additional properties or methods, which removes the TypeScript error where
15
+ the class has no properties in common with the type.
16
+
9
17
  ## Methods
10
18
 
11
19
  ### create()
@@ -152,7 +160,7 @@ Nothing.
152
160
 
153
161
  ### get()
154
162
 
155
- > **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `pageSize?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<[`IDocumentList`](IDocumentList.md)\>
163
+ > **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<[`IDocumentList`](IDocumentList.md)\>
156
164
 
157
165
  Get a document using it's auditable item graph vertex id and optional revision.
158
166
 
@@ -210,11 +218,11 @@ By default extraction will auto detect the mime type of the document, this can b
210
218
 
211
219
  The cursor to get the next chunk of revisions.
212
220
 
213
- ##### pageSize?
221
+ ##### limit?
214
222
 
215
223
  `number`
216
224
 
217
- Page size of items to return, defaults to 1 so only most recent is returned.
225
+ Limit the number of items to return, defaults to 1 so only most recent is returned.
218
226
 
219
227
  ##### userIdentity?
220
228
 
@@ -353,7 +361,7 @@ Nothing.
353
361
 
354
362
  ### query()
355
363
 
356
- > **query**(`documentId`, `cursor?`, `pageSize?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`IAuditableItemGraphVertexList`\>
364
+ > **query**(`documentId`, `cursor?`, `limit?`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`IAuditableItemGraphVertexList`\>
357
365
 
358
366
  Find all the document with a specific id.
359
367
 
@@ -371,11 +379,11 @@ The document id to find in the graph.
371
379
 
372
380
  The cursor to get the next chunk of documents.
373
381
 
374
- ##### pageSize?
382
+ ##### limit?
375
383
 
376
384
  `number`
377
385
 
378
- The page size to get the next chunk of documents.
386
+ The limit to get the next chunk of documents.
379
387
 
380
388
  ##### userIdentity?
381
389
 
@@ -96,11 +96,11 @@ If provided will extract data from the document using the specified rule group i
96
96
 
97
97
  By default extraction will auto detect the mime type of the document, this can be used to override the detection.
98
98
 
99
- #### pageSize?
99
+ #### limit?
100
100
 
101
- > `optional` **pageSize**: `string` \| `number`
101
+ > `optional` **limit**: `string`
102
102
 
103
- Page size of items to return, defaults to 1 so only most recent is returned.
103
+ PLimit the number of items to return, defaults to 1 so only most recent is returned.
104
104
 
105
105
  ##### Default
106
106
 
@@ -34,8 +34,8 @@ The id of the document id we are trying to find.
34
34
 
35
35
  The cursor to get the next chunk of documents.
36
36
 
37
- #### pageSize?
37
+ #### limit?
38
38
 
39
- > `optional` **pageSize**: `string` \| `number`
39
+ > `optional` **limit**: `string`
40
40
 
41
41
  The number of documents to return.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/document-management-models",
3
- "version": "0.0.2-next.2",
3
+ "version": "0.0.2-next.4",
4
4
  "description": "Models which define the structure of the document management connectors and services",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,5 +41,24 @@
41
41
  "dist/types",
42
42
  "locales",
43
43
  "docs"
44
- ]
44
+ ],
45
+ "keywords": [
46
+ "twin",
47
+ "trade",
48
+ "iota",
49
+ "framework",
50
+ "blockchain",
51
+ "document-management",
52
+ "documents",
53
+ "management",
54
+ "storage",
55
+ "rest-api",
56
+ "models",
57
+ "types",
58
+ "schemas"
59
+ ],
60
+ "bugs": {
61
+ "url": "git+https://github.com/twinfoundation/document-management/issues"
62
+ },
63
+ "homepage": "https://twindev.org"
45
64
  }