@twin.org/auditable-item-graph-models 0.0.1-next.14 → 0.0.1-next.16
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 +18 -0
- package/dist/esm/index.mjs +18 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/models/auditableItemGraphTopics.d.ts +17 -0
- package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexCreated.d.ts +9 -0
- package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexUpdated.d.ts +14 -0
- package/docs/changelog.md +1 -1
- package/docs/reference/index.md +4 -0
- package/docs/reference/interfaces/IAuditableItemGraphAlias.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphComponent.md +80 -28
- package/docs/reference/interfaces/IAuditableItemGraphEdge.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +11 -0
- package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +19 -0
- package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphResource.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphVertex.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +1 -1
- package/docs/reference/type-aliases/AuditableItemGraphTopics.md +5 -0
- package/docs/reference/variables/AuditableItemGraphTopics.md +19 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -600,6 +600,23 @@ class AuditableItemGraphDataTypes {
|
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
|
|
603
|
+
// Copyright 2024 IOTA Stiftung.
|
|
604
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
605
|
+
/**
|
|
606
|
+
* The topics for auditable item graph event bus notifications.
|
|
607
|
+
*/
|
|
608
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
609
|
+
const AuditableItemGraphTopics = {
|
|
610
|
+
/**
|
|
611
|
+
* A vertex was created.
|
|
612
|
+
*/
|
|
613
|
+
VertexCreated: "auditable-item-graph:vertex-created",
|
|
614
|
+
/**
|
|
615
|
+
* A vertex was updated.
|
|
616
|
+
*/
|
|
617
|
+
VertexUpdated: "auditable-item-graph:vertex-updated"
|
|
618
|
+
};
|
|
619
|
+
|
|
603
620
|
// Copyright 2024 IOTA Stiftung.
|
|
604
621
|
// SPDX-License-Identifier: Apache-2.0.
|
|
605
622
|
/**
|
|
@@ -622,5 +639,6 @@ const VerifyDepth = {
|
|
|
622
639
|
};
|
|
623
640
|
|
|
624
641
|
exports.AuditableItemGraphDataTypes = AuditableItemGraphDataTypes;
|
|
642
|
+
exports.AuditableItemGraphTopics = AuditableItemGraphTopics;
|
|
625
643
|
exports.AuditableItemGraphTypes = AuditableItemGraphTypes;
|
|
626
644
|
exports.VerifyDepth = VerifyDepth;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -598,6 +598,23 @@ class AuditableItemGraphDataTypes {
|
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
+
// Copyright 2024 IOTA Stiftung.
|
|
602
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
603
|
+
/**
|
|
604
|
+
* The topics for auditable item graph event bus notifications.
|
|
605
|
+
*/
|
|
606
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
607
|
+
const AuditableItemGraphTopics = {
|
|
608
|
+
/**
|
|
609
|
+
* A vertex was created.
|
|
610
|
+
*/
|
|
611
|
+
VertexCreated: "auditable-item-graph:vertex-created",
|
|
612
|
+
/**
|
|
613
|
+
* A vertex was updated.
|
|
614
|
+
*/
|
|
615
|
+
VertexUpdated: "auditable-item-graph:vertex-updated"
|
|
616
|
+
};
|
|
617
|
+
|
|
601
618
|
// Copyright 2024 IOTA Stiftung.
|
|
602
619
|
// SPDX-License-Identifier: Apache-2.0.
|
|
603
620
|
/**
|
|
@@ -619,4 +636,4 @@ const VerifyDepth = {
|
|
|
619
636
|
All: "all"
|
|
620
637
|
};
|
|
621
638
|
|
|
622
|
-
export { AuditableItemGraphDataTypes, AuditableItemGraphTypes, VerifyDepth };
|
|
639
|
+
export { AuditableItemGraphDataTypes, AuditableItemGraphTopics, AuditableItemGraphTypes, VerifyDepth };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ export * from "./models/api/IAuditableItemGraphGetResponse";
|
|
|
5
5
|
export * from "./models/api/IAuditableItemGraphListRequest";
|
|
6
6
|
export * from "./models/api/IAuditableItemGraphListResponse";
|
|
7
7
|
export * from "./models/api/IAuditableItemGraphUpdateRequest";
|
|
8
|
+
export * from "./models/auditableItemGraphTopics";
|
|
8
9
|
export * from "./models/auditableItemGraphTypes";
|
|
10
|
+
export * from "./models/eventBus/IAuditableItemGraphEventBusVertexCreated";
|
|
11
|
+
export * from "./models/eventBus/IAuditableItemGraphEventBusVertexUpdated";
|
|
9
12
|
export * from "./models/IAuditableItemGraphAlias";
|
|
10
13
|
export * from "./models/IAuditableItemGraphAuditedElement";
|
|
11
14
|
export * from "./models/IAuditableItemGraphChangeset";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The topics for auditable item graph event bus notifications.
|
|
3
|
+
*/
|
|
4
|
+
export declare const AuditableItemGraphTopics: {
|
|
5
|
+
/**
|
|
6
|
+
* A vertex was created.
|
|
7
|
+
*/
|
|
8
|
+
readonly VertexCreated: "auditable-item-graph:vertex-created";
|
|
9
|
+
/**
|
|
10
|
+
* A vertex was updated.
|
|
11
|
+
*/
|
|
12
|
+
readonly VertexUpdated: "auditable-item-graph:vertex-updated";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The topics for auditable item graph event bus notifications.
|
|
16
|
+
*/
|
|
17
|
+
export type AuditableItemGraphTopics = (typeof AuditableItemGraphTopics)[keyof typeof AuditableItemGraphTopics];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IPatchOperation } from "@twin.org/core";
|
|
2
|
+
/**
|
|
3
|
+
* Event bus payload for vertex updated.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditableItemGraphEventBusVertexUpdated {
|
|
6
|
+
/**
|
|
7
|
+
* The id of the vertex updated.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The patches in the changeset.
|
|
12
|
+
*/
|
|
13
|
+
patches: IPatchOperation[];
|
|
14
|
+
}
|
package/docs/changelog.md
CHANGED
package/docs/reference/index.md
CHANGED
|
@@ -21,13 +21,17 @@
|
|
|
21
21
|
- [IAuditableItemGraphListRequest](interfaces/IAuditableItemGraphListRequest.md)
|
|
22
22
|
- [IAuditableItemGraphListResponse](interfaces/IAuditableItemGraphListResponse.md)
|
|
23
23
|
- [IAuditableItemGraphUpdateRequest](interfaces/IAuditableItemGraphUpdateRequest.md)
|
|
24
|
+
- [IAuditableItemGraphEventBusVertexCreated](interfaces/IAuditableItemGraphEventBusVertexCreated.md)
|
|
25
|
+
- [IAuditableItemGraphEventBusVertexUpdated](interfaces/IAuditableItemGraphEventBusVertexUpdated.md)
|
|
24
26
|
|
|
25
27
|
## Type Aliases
|
|
26
28
|
|
|
29
|
+
- [AuditableItemGraphTopics](type-aliases/AuditableItemGraphTopics.md)
|
|
27
30
|
- [AuditableItemGraphTypes](type-aliases/AuditableItemGraphTypes.md)
|
|
28
31
|
- [VerifyDepth](type-aliases/VerifyDepth.md)
|
|
29
32
|
|
|
30
33
|
## Variables
|
|
31
34
|
|
|
35
|
+
- [AuditableItemGraphTopics](variables/AuditableItemGraphTopics.md)
|
|
32
36
|
- [AuditableItemGraphTypes](variables/AuditableItemGraphTypes.md)
|
|
33
37
|
- [VerifyDepth](variables/VerifyDepth.md)
|
|
@@ -10,7 +10,7 @@ Interface describing an alias for a vertex.
|
|
|
10
10
|
|
|
11
11
|
### @context
|
|
12
12
|
|
|
13
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
13
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
14
14
|
|
|
15
15
|
JSON-LD Context.
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@ Interface describing a set of updates to the vertex.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
9
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
@@ -16,27 +16,39 @@ Create a new graph vertex.
|
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### vertexObject?
|
|
20
|
+
|
|
21
|
+
`IJsonLdNodeObject`
|
|
20
22
|
|
|
21
23
|
The object for the vertex as JSON-LD.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
##### aliases?
|
|
26
|
+
|
|
27
|
+
`object`[]
|
|
24
28
|
|
|
25
29
|
Alternative aliases that can be used to identify the vertex.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
##### resources?
|
|
32
|
+
|
|
33
|
+
`object`[]
|
|
28
34
|
|
|
29
35
|
The resources attached to the vertex.
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
##### edges?
|
|
38
|
+
|
|
39
|
+
`object`[]
|
|
32
40
|
|
|
33
41
|
The edges connected to the vertex.
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
##### userIdentity?
|
|
44
|
+
|
|
45
|
+
`string`
|
|
36
46
|
|
|
37
47
|
The identity to create the auditable item graph operation with.
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
##### nodeIdentity?
|
|
50
|
+
|
|
51
|
+
`string`
|
|
40
52
|
|
|
41
53
|
The node identity to use for vault operations.
|
|
42
54
|
|
|
@@ -56,31 +68,45 @@ Update a graph vertex.
|
|
|
56
68
|
|
|
57
69
|
#### Parameters
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
##### id
|
|
72
|
+
|
|
73
|
+
`string`
|
|
60
74
|
|
|
61
75
|
The id of the vertex to update.
|
|
62
76
|
|
|
63
|
-
|
|
77
|
+
##### vertexObject?
|
|
78
|
+
|
|
79
|
+
`IJsonLdNodeObject`
|
|
64
80
|
|
|
65
81
|
The object for the vertex as JSON-LD.
|
|
66
82
|
|
|
67
|
-
|
|
83
|
+
##### aliases?
|
|
84
|
+
|
|
85
|
+
`object`[]
|
|
68
86
|
|
|
69
87
|
Alternative aliases that can be used to identify the vertex.
|
|
70
88
|
|
|
71
|
-
|
|
89
|
+
##### resources?
|
|
90
|
+
|
|
91
|
+
`object`[]
|
|
72
92
|
|
|
73
93
|
The resources attached to the vertex.
|
|
74
94
|
|
|
75
|
-
|
|
95
|
+
##### edges?
|
|
96
|
+
|
|
97
|
+
`object`[]
|
|
76
98
|
|
|
77
99
|
The edges connected to the vertex.
|
|
78
100
|
|
|
79
|
-
|
|
101
|
+
##### userIdentity?
|
|
102
|
+
|
|
103
|
+
`string`
|
|
80
104
|
|
|
81
105
|
The identity to create the auditable item graph operation with.
|
|
82
106
|
|
|
83
|
-
|
|
107
|
+
##### nodeIdentity?
|
|
108
|
+
|
|
109
|
+
`string`
|
|
84
110
|
|
|
85
111
|
The node identity to use for vault operations.
|
|
86
112
|
|
|
@@ -100,23 +126,31 @@ Get a graph vertex.
|
|
|
100
126
|
|
|
101
127
|
#### Parameters
|
|
102
128
|
|
|
103
|
-
|
|
129
|
+
##### id
|
|
130
|
+
|
|
131
|
+
`string`
|
|
104
132
|
|
|
105
133
|
The id of the vertex to get.
|
|
106
134
|
|
|
107
|
-
|
|
135
|
+
##### options?
|
|
108
136
|
|
|
109
137
|
Additional options for the get operation.
|
|
110
138
|
|
|
111
|
-
|
|
139
|
+
###### includeDeleted
|
|
140
|
+
|
|
141
|
+
`boolean`
|
|
112
142
|
|
|
113
143
|
Whether to include deleted aliases, resource, edges, defaults to false.
|
|
114
144
|
|
|
115
|
-
|
|
145
|
+
###### includeChangesets
|
|
146
|
+
|
|
147
|
+
`boolean`
|
|
116
148
|
|
|
117
149
|
Whether to include the changesets of the vertex, defaults to false.
|
|
118
150
|
|
|
119
|
-
|
|
151
|
+
###### verifySignatureDepth
|
|
152
|
+
|
|
153
|
+
[`VerifyDepth`](../type-aliases/VerifyDepth.md)
|
|
120
154
|
|
|
121
155
|
How many signatures to verify, defaults to "none".
|
|
122
156
|
|
|
@@ -140,11 +174,15 @@ Remove the immutable storage for an item.
|
|
|
140
174
|
|
|
141
175
|
#### Parameters
|
|
142
176
|
|
|
143
|
-
|
|
177
|
+
##### id
|
|
178
|
+
|
|
179
|
+
`string`
|
|
144
180
|
|
|
145
181
|
The id of the vertex to remove the storage from.
|
|
146
182
|
|
|
147
|
-
|
|
183
|
+
##### nodeIdentity?
|
|
184
|
+
|
|
185
|
+
`string`
|
|
148
186
|
|
|
149
187
|
The node identity to use for vault operations.
|
|
150
188
|
|
|
@@ -168,35 +206,49 @@ Query the graph for vertices.
|
|
|
168
206
|
|
|
169
207
|
#### Parameters
|
|
170
208
|
|
|
171
|
-
|
|
209
|
+
##### options?
|
|
172
210
|
|
|
173
211
|
The query options.
|
|
174
212
|
|
|
175
|
-
|
|
213
|
+
###### id
|
|
214
|
+
|
|
215
|
+
`string`
|
|
176
216
|
|
|
177
217
|
The optional id to look for.
|
|
178
218
|
|
|
179
|
-
|
|
219
|
+
###### idMode
|
|
220
|
+
|
|
221
|
+
`"both"` \| `"id"` \| `"alias"`
|
|
180
222
|
|
|
181
223
|
Look in id, alias or both, defaults to both.
|
|
182
224
|
|
|
183
|
-
|
|
225
|
+
##### orderBy?
|
|
184
226
|
|
|
185
227
|
The order for the results, defaults to dateCreated.
|
|
186
228
|
|
|
187
|
-
|
|
229
|
+
`"dateCreated"` | `"dateModified"`
|
|
230
|
+
|
|
231
|
+
##### orderByDirection?
|
|
232
|
+
|
|
233
|
+
`SortDirection`
|
|
188
234
|
|
|
189
235
|
The direction for the order, defaults to descending.
|
|
190
236
|
|
|
191
|
-
|
|
237
|
+
##### properties?
|
|
238
|
+
|
|
239
|
+
keyof [`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)[]
|
|
192
240
|
|
|
193
241
|
The properties to return, if not provided defaults to id, dateCreated, aliases and object.
|
|
194
242
|
|
|
195
|
-
|
|
243
|
+
##### cursor?
|
|
244
|
+
|
|
245
|
+
`string`
|
|
196
246
|
|
|
197
247
|
The cursor to request the next page of entities.
|
|
198
248
|
|
|
199
|
-
|
|
249
|
+
##### pageSize?
|
|
250
|
+
|
|
251
|
+
`number`
|
|
200
252
|
|
|
201
253
|
The maximum number of entities in a page.
|
|
202
254
|
|
|
@@ -58,7 +58,7 @@ The date/time of when the element was deleted, as we never actually remove items
|
|
|
58
58
|
|
|
59
59
|
### @context
|
|
60
60
|
|
|
61
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
61
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
62
62
|
|
|
63
63
|
JSON-LD Context.
|
|
64
64
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: IAuditableItemGraphEventBusVertexUpdated
|
|
2
|
+
|
|
3
|
+
Event bus payload for vertex updated.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### id
|
|
8
|
+
|
|
9
|
+
> **id**: `string`
|
|
10
|
+
|
|
11
|
+
The id of the vertex updated.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### patches
|
|
16
|
+
|
|
17
|
+
> **patches**: `IPatchOperation`[]
|
|
18
|
+
|
|
19
|
+
The patches in the changeset.
|
|
@@ -6,7 +6,7 @@ The patch operation for JSON diffs.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
9
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
@@ -58,7 +58,7 @@ The date/time of when the element was deleted, as we never actually remove items
|
|
|
58
58
|
|
|
59
59
|
### @context
|
|
60
60
|
|
|
61
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
61
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
62
62
|
|
|
63
63
|
JSON-LD Context.
|
|
64
64
|
|
|
@@ -58,7 +58,7 @@ The date/time of when the element was deleted, as we never actually remove items
|
|
|
58
58
|
|
|
59
59
|
### @context
|
|
60
60
|
|
|
61
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
61
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
62
62
|
|
|
63
63
|
JSON-LD Context.
|
|
64
64
|
|
|
@@ -6,7 +6,7 @@ Interface describing an auditable item graph vertex list.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]
|
|
9
|
+
> **@context**: `"https://schema.twindev.org/aig/"` \| \[`"https://schema.twindev.org/aig/"`, `...string[]`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: AuditableItemGraphTopics
|
|
2
|
+
|
|
3
|
+
> **AuditableItemGraphTopics**: *typeof* [`AuditableItemGraphTopics`](../variables/AuditableItemGraphTopics.md)\[keyof *typeof* [`AuditableItemGraphTopics`](../variables/AuditableItemGraphTopics.md)\]
|
|
4
|
+
|
|
5
|
+
The topics for auditable item graph event bus notifications.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: AuditableItemGraphTopics
|
|
2
|
+
|
|
3
|
+
> `const` **AuditableItemGraphTopics**: `object`
|
|
4
|
+
|
|
5
|
+
The topics for auditable item graph event bus notifications.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### VertexCreated
|
|
10
|
+
|
|
11
|
+
> `readonly` **VertexCreated**: `"auditable-item-graph:vertex-created"` = `"auditable-item-graph:vertex-created"`
|
|
12
|
+
|
|
13
|
+
A vertex was created.
|
|
14
|
+
|
|
15
|
+
### VertexUpdated
|
|
16
|
+
|
|
17
|
+
> `readonly` **VertexUpdated**: `"auditable-item-graph:vertex-updated"` = `"auditable-item-graph:vertex-updated"`
|
|
18
|
+
|
|
19
|
+
A vertex was updated.
|
package/package.json
CHANGED