@twin.org/auditable-item-graph-models 0.0.1-next.36 → 0.0.1-next.38
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/types/models/IAuditableItemGraphComponent.d.ts +2 -0
- package/dist/types/models/api/IAuditableItemGraphListRequest.d.ts +4 -0
- package/docs/changelog.md +19 -0
- package/docs/reference/classes/AuditableItemGraphDataTypes.md +3 -3
- package/docs/reference/interfaces/IAuditableItemGraphComponent.md +11 -5
- package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +6 -0
- package/docs/reference/type-aliases/AuditableItemGraphContexts.md +1 -1
- package/docs/reference/type-aliases/AuditableItemGraphTopics.md +1 -1
- package/docs/reference/type-aliases/AuditableItemGraphTypes.md +1 -1
- package/docs/reference/type-aliases/VerifyDepth.md +1 -1
- package/package.json +1 -1
|
@@ -94,6 +94,7 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
94
94
|
* @param options The query options.
|
|
95
95
|
* @param options.id The optional id to look for.
|
|
96
96
|
* @param options.idMode Look in id, alias or both, defaults to both.
|
|
97
|
+
* @param options.resourceTypes Include vertices with specific resource types.
|
|
97
98
|
* @param conditions Conditions to use in the query.
|
|
98
99
|
* @param orderBy The order for the results, defaults to dateCreated.
|
|
99
100
|
* @param orderByDirection The direction for the order, defaults to descending.
|
|
@@ -105,5 +106,6 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
105
106
|
query(options?: {
|
|
106
107
|
id?: string;
|
|
107
108
|
idMode?: "id" | "alias" | "both";
|
|
109
|
+
resourceTypes?: string[];
|
|
108
110
|
}, conditions?: IComparator[], orderBy?: keyof Pick<IAuditableItemGraphVertex, "dateCreated" | "dateModified">, orderByDirection?: SortDirection, properties?: (keyof IAuditableItemGraphVertex)[], cursor?: string, pageSize?: number): Promise<IAuditableItemGraphVertexList>;
|
|
109
111
|
}
|
|
@@ -23,6 +23,10 @@ export interface IAuditableItemGraphListRequest {
|
|
|
23
23
|
* Which field to look in with the id, defaults to both.
|
|
24
24
|
*/
|
|
25
25
|
idMode?: "id" | "alias" | "both";
|
|
26
|
+
/**
|
|
27
|
+
* Include vertices with specific resource types, comma separated.
|
|
28
|
+
*/
|
|
29
|
+
resourceTypes?: string;
|
|
26
30
|
/**
|
|
27
31
|
* The conditions to filter the streams, JSON stringified IComparator[].
|
|
28
32
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @twin.org/auditable-item-graph-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.38](https://github.com/twinfoundation/auditable-item-graph/compare/auditable-item-graph-models-v0.0.1-next.37...auditable-item-graph-models-v0.0.1-next.38) (2025-04-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* use shared store mechanism ([#10](https://github.com/twinfoundation/auditable-item-graph/issues/10)) ([da035e5](https://github.com/twinfoundation/auditable-item-graph/commit/da035e5eb8f157482b4eb2bdbc689c6c0647ff7d))
|
|
9
|
+
|
|
10
|
+
## [0.0.1-next.37](https://github.com/twinfoundation/auditable-item-graph/compare/auditable-item-graph-models-v0.0.1-next.36...auditable-item-graph-models-v0.0.1-next.37) (2025-04-11)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* improve comments ([97f311a](https://github.com/twinfoundation/auditable-item-graph/commit/97f311a9cc4353b5020a48a44420c97a2fa0c8d7))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* only include alias in index if not deleted ([#6](https://github.com/twinfoundation/auditable-item-graph/issues/6)) ([5da3c41](https://github.com/twinfoundation/auditable-item-graph/commit/5da3c419fafa2afefd34b1c570d103012b888a75))
|
|
21
|
+
|
|
3
22
|
## [0.0.1-next.36](https://github.com/twinfoundation/auditable-item-graph/compare/auditable-item-graph-models-v0.0.1-next.35...auditable-item-graph-models-v0.0.1-next.36) (2025-04-11)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -4,13 +4,13 @@ Handle all the data types for auditable item graph.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new AuditableItemGraphDataTypes**():
|
|
9
|
+
> **new AuditableItemGraphDataTypes**(): `AuditableItemGraphDataTypes`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`AuditableItemGraphDataTypes`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ Interface describing an auditable item graph contract.
|
|
|
10
10
|
|
|
11
11
|
### create()
|
|
12
12
|
|
|
13
|
-
> **create**(`vertex`, `userIdentity
|
|
13
|
+
> **create**(`vertex`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`string`\>
|
|
14
14
|
|
|
15
15
|
Create a new graph vertex.
|
|
16
16
|
|
|
@@ -66,7 +66,7 @@ The id of the new graph item.
|
|
|
66
66
|
|
|
67
67
|
### update()
|
|
68
68
|
|
|
69
|
-
> **update**(`vertex`, `userIdentity
|
|
69
|
+
> **update**(`vertex`, `userIdentity?`, `nodeIdentity?`): `Promise`\<`void`\>
|
|
70
70
|
|
|
71
71
|
Update a graph vertex.
|
|
72
72
|
|
|
@@ -128,7 +128,7 @@ Nothing.
|
|
|
128
128
|
|
|
129
129
|
### get()
|
|
130
130
|
|
|
131
|
-
> **get**(`id`, `options
|
|
131
|
+
> **get**(`id`, `options?`): `Promise`\<[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)\>
|
|
132
132
|
|
|
133
133
|
Get a graph vertex.
|
|
134
134
|
|
|
@@ -176,7 +176,7 @@ NotFoundError if the vertex is not found.
|
|
|
176
176
|
|
|
177
177
|
### removeVerifiable()
|
|
178
178
|
|
|
179
|
-
> **removeVerifiable**(`id`, `nodeIdentity
|
|
179
|
+
> **removeVerifiable**(`id`, `nodeIdentity?`): `Promise`\<`void`\>
|
|
180
180
|
|
|
181
181
|
Remove the verifiable storage for an item.
|
|
182
182
|
|
|
@@ -208,7 +208,7 @@ NotFoundError if the vertex is not found.
|
|
|
208
208
|
|
|
209
209
|
### query()
|
|
210
210
|
|
|
211
|
-
> **query**(`options
|
|
211
|
+
> **query**(`options?`, `conditions?`, `orderBy?`, `orderByDirection?`, `properties?`, `cursor?`, `pageSize?`): `Promise`\<[`IAuditableItemGraphVertexList`](IAuditableItemGraphVertexList.md)\>
|
|
212
212
|
|
|
213
213
|
Query the graph for vertices.
|
|
214
214
|
|
|
@@ -230,6 +230,12 @@ The optional id to look for.
|
|
|
230
230
|
|
|
231
231
|
Look in id, alias or both, defaults to both.
|
|
232
232
|
|
|
233
|
+
###### resourceTypes?
|
|
234
|
+
|
|
235
|
+
`string`[]
|
|
236
|
+
|
|
237
|
+
Include vertices with specific resource types.
|
|
238
|
+
|
|
233
239
|
##### conditions?
|
|
234
240
|
|
|
235
241
|
`IComparator`[]
|
|
@@ -34,6 +34,12 @@ The id or alias to try and find.
|
|
|
34
34
|
|
|
35
35
|
Which field to look in with the id, defaults to both.
|
|
36
36
|
|
|
37
|
+
#### resourceTypes?
|
|
38
|
+
|
|
39
|
+
> `optional` **resourceTypes**: `string`
|
|
40
|
+
|
|
41
|
+
Include vertices with specific resource types, comma separated.
|
|
42
|
+
|
|
37
43
|
#### conditions?
|
|
38
44
|
|
|
39
45
|
> `optional` **conditions**: `string`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: AuditableItemGraphContexts
|
|
2
2
|
|
|
3
|
-
> **AuditableItemGraphContexts
|
|
3
|
+
> **AuditableItemGraphContexts** = *typeof* [`AuditableItemGraphContexts`](../variables/AuditableItemGraphContexts.md)\[keyof *typeof* [`AuditableItemGraphContexts`](../variables/AuditableItemGraphContexts.md)\]
|
|
4
4
|
|
|
5
5
|
The contexts of auditable item graph data.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: AuditableItemGraphTopics
|
|
2
2
|
|
|
3
|
-
> **AuditableItemGraphTopics
|
|
3
|
+
> **AuditableItemGraphTopics** = *typeof* [`AuditableItemGraphTopics`](../variables/AuditableItemGraphTopics.md)\[keyof *typeof* [`AuditableItemGraphTopics`](../variables/AuditableItemGraphTopics.md)\]
|
|
4
4
|
|
|
5
5
|
The topics for auditable item graph event bus notifications.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: AuditableItemGraphTypes
|
|
2
2
|
|
|
3
|
-
> **AuditableItemGraphTypes
|
|
3
|
+
> **AuditableItemGraphTypes** = *typeof* [`AuditableItemGraphTypes`](../variables/AuditableItemGraphTypes.md)\[keyof *typeof* [`AuditableItemGraphTypes`](../variables/AuditableItemGraphTypes.md)\]
|
|
4
4
|
|
|
5
5
|
The types of auditable item graph data.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: VerifyDepth
|
|
2
2
|
|
|
3
|
-
> **VerifyDepth
|
|
3
|
+
> **VerifyDepth** = *typeof* [`VerifyDepth`](../variables/VerifyDepth.md)\[keyof *typeof* [`VerifyDepth`](../variables/VerifyDepth.md)\]
|
|
4
4
|
|
|
5
5
|
How deep to verify the signatures.
|
package/package.json
CHANGED