@twin.org/auditable-item-graph-models 0.0.1-next.9 → 0.0.2-next.1

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.
Files changed (47) hide show
  1. package/dist/cjs/index.cjs +234 -148
  2. package/dist/esm/index.mjs +233 -149
  3. package/dist/types/index.d.ts +4 -0
  4. package/dist/types/models/IAuditableItemGraphAlias.d.ts +9 -4
  5. package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +2 -2
  6. package/dist/types/models/IAuditableItemGraphChangeset.d.ts +8 -2
  7. package/dist/types/models/IAuditableItemGraphComponent.d.ts +52 -36
  8. package/dist/types/models/IAuditableItemGraphEdge.d.ts +11 -6
  9. package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +3 -1
  10. package/dist/types/models/IAuditableItemGraphResource.d.ts +3 -2
  11. package/dist/types/models/IAuditableItemGraphVertex.d.ts +13 -4
  12. package/dist/types/models/IAuditableItemGraphVertexList.d.ts +11 -4
  13. package/dist/types/models/api/IAuditableItemGraphCreateRequest.d.ts +6 -6
  14. package/dist/types/models/api/IAuditableItemGraphGetRequest.d.ts +2 -2
  15. package/dist/types/models/api/IAuditableItemGraphListRequest.d.ts +10 -2
  16. package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +6 -6
  17. package/dist/types/models/auditableItemGraphContexts.d.ts +17 -0
  18. package/dist/types/models/auditableItemGraphTopics.d.ts +17 -0
  19. package/dist/types/models/auditableItemGraphTypes.d.ts +4 -8
  20. package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexCreated.d.ts +9 -0
  21. package/dist/types/models/eventBus/IAuditableItemGraphEventBusVertexUpdated.d.ts +14 -0
  22. package/docs/changelog.md +109 -1
  23. package/docs/reference/classes/AuditableItemGraphDataTypes.md +3 -3
  24. package/docs/reference/index.md +6 -0
  25. package/docs/reference/interfaces/IAuditableItemGraphAlias.md +18 -18
  26. package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +4 -4
  27. package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +2 -2
  28. package/docs/reference/interfaces/IAuditableItemGraphComponent.md +109 -37
  29. package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +4 -4
  30. package/docs/reference/interfaces/IAuditableItemGraphEdge.md +21 -21
  31. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +11 -0
  32. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +19 -0
  33. package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +2 -2
  34. package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +15 -3
  35. package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +2 -2
  36. package/docs/reference/interfaces/IAuditableItemGraphResource.md +5 -5
  37. package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +4 -4
  38. package/docs/reference/interfaces/IAuditableItemGraphVertex.md +18 -18
  39. package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +6 -6
  40. package/docs/reference/type-aliases/AuditableItemGraphContexts.md +5 -0
  41. package/docs/reference/type-aliases/AuditableItemGraphTopics.md +5 -0
  42. package/docs/reference/type-aliases/AuditableItemGraphTypes.md +1 -1
  43. package/docs/reference/type-aliases/VerifyDepth.md +1 -1
  44. package/docs/reference/variables/AuditableItemGraphContexts.md +19 -0
  45. package/docs/reference/variables/AuditableItemGraphTopics.md +19 -0
  46. package/docs/reference/variables/AuditableItemGraphTypes.md +6 -12
  47. package/package.json +5 -4
@@ -30,10 +30,22 @@ The id or alias to try and find.
30
30
 
31
31
  #### idMode?
32
32
 
33
- > `optional` **idMode**: `"both"` \| `"id"` \| `"alias"`
33
+ > `optional` **idMode**: `"id"` \| `"alias"` \| `"both"`
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
+
43
+ #### conditions?
44
+
45
+ > `optional` **conditions**: `string`
46
+
47
+ The conditions to filter the streams, JSON stringified IComparator[].
48
+
37
49
  #### orderBy?
38
50
 
39
51
  > `optional` **orderBy**: `"dateCreated"` \| `"dateModified"`
@@ -50,7 +62,7 @@ The direction for the order, defaults to desc.
50
62
 
51
63
  > `optional` **properties**: `string`
52
64
 
53
- The properties to return as a comma separated list, defaults to "id,dateCreated,aliases,vertexObject".
65
+ The properties to return as a comma separated list, defaults to "id,dateCreated,aliases,annotationObject".
54
66
 
55
67
  #### cursor?
56
68
 
@@ -60,6 +72,6 @@ The optional cursor to get next chunk.
60
72
 
61
73
  #### pageSize?
62
74
 
63
- > `optional` **pageSize**: `number`
75
+ > `optional` **pageSize**: `string` \| `number`
64
76
 
65
77
  The maximum number of entities in a page.
@@ -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/"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
11
11
  JSON-LD Context.
12
12
 
@@ -22,7 +22,7 @@ JSON-LD Type.
22
22
 
23
23
  ### patchOperation
24
24
 
25
- > **patchOperation**: `"replace"` \| `"add"` \| `"remove"` \| `"copy"` \| `"move"` \| `"test"`
25
+ > **patchOperation**: `"add"` \| `"remove"` \| `"replace"` \| `"move"` \| `"copy"` \| `"test"`
26
26
 
27
27
  The operation that was performed on the item.
28
28
 
@@ -8,9 +8,9 @@ Interface describing an auditable item graph vertex resource.
8
8
 
9
9
  ## Properties
10
10
 
11
- ### id
11
+ ### id?
12
12
 
13
- > **id**: `string`
13
+ > `optional` **id**: `string`
14
14
 
15
15
  The id of the element.
16
16
 
@@ -20,9 +20,9 @@ The id of the element.
20
20
 
21
21
  ***
22
22
 
23
- ### dateCreated
23
+ ### dateCreated?
24
24
 
25
- > **dateCreated**: `string`
25
+ > `optional` **dateCreated**: `string`
26
26
 
27
27
  The date/time of when the element was created.
28
28
 
@@ -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/"`, `...IJsonLdContextDefinitionElement[]`\]
62
62
 
63
63
  JSON-LD Context.
64
64
 
@@ -18,15 +18,15 @@ The id of the vertex to update.
18
18
 
19
19
  ***
20
20
 
21
- ### body?
21
+ ### body
22
22
 
23
- > `optional` **body**: `object`
23
+ > **body**: `object`
24
24
 
25
25
  The data to be used in the vertex.
26
26
 
27
- #### vertexObject?
27
+ #### annotationObject?
28
28
 
29
- > `optional` **vertexObject**: `IJsonLdNodeObject`
29
+ > `optional` **annotationObject**: `IJsonLdNodeObject`
30
30
 
31
31
  The object to be used in the vertex as JSON-LD.
32
32
 
@@ -8,21 +8,9 @@ Interface describing an auditable item graph vertex.
8
8
 
9
9
  ## Properties
10
10
 
11
- ### id
12
-
13
- > **id**: `string`
14
-
15
- The id of the element.
16
-
17
- #### Inherited from
18
-
19
- `Omit.id`
20
-
21
- ***
22
-
23
- ### dateCreated
11
+ ### dateCreated?
24
12
 
25
- > **dateCreated**: `string`
13
+ > `optional` **dateCreated**: `string`
26
14
 
27
15
  The date/time of when the element was created.
28
16
 
@@ -58,12 +46,24 @@ The date/time of when the element was deleted, as we never actually remove items
58
46
 
59
47
  ### @context
60
48
 
61
- > **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
49
+ > **@context**: \[`"https://schema.twindev.org/aig/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
62
50
 
63
51
  JSON-LD Context.
64
52
 
65
53
  ***
66
54
 
55
+ ### id
56
+
57
+ > **id**: `string`
58
+
59
+ The id of the element.
60
+
61
+ #### Overrides
62
+
63
+ `Omit.id`
64
+
65
+ ***
66
+
67
67
  ### type
68
68
 
69
69
  > **type**: `"AuditableItemGraphVertex"`
@@ -80,11 +80,11 @@ The identity of the node which controls the vertex.
80
80
 
81
81
  ***
82
82
 
83
- ### vertexObject?
83
+ ### annotationObject?
84
84
 
85
- > `optional` **vertexObject**: `IJsonLdNodeObject`
85
+ > `optional` **annotationObject**: `IJsonLdNodeObject`
86
86
 
87
- The JSON-LD object for the vertex.
87
+ The JSON-LD annotation object for the vertex.
88
88
 
89
89
  ***
90
90
 
@@ -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.org"`, `"https://schema.twindev.org/aig/"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
11
11
  JSON-LD Context.
12
12
 
@@ -14,22 +14,22 @@ JSON-LD Context.
14
14
 
15
15
  ### type
16
16
 
17
- > **type**: `"AuditableItemGraphVertexList"`
17
+ > **type**: \[`"ItemList"`, `"AuditableItemGraphVertexList"`\]
18
18
 
19
19
  JSON-LD Type.
20
20
 
21
21
  ***
22
22
 
23
- ### vertices
23
+ ### itemListElement
24
24
 
25
- > **vertices**: [`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)[]
25
+ > **itemListElement**: [`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)[]
26
26
 
27
27
  The list of vertices.
28
28
 
29
29
  ***
30
30
 
31
- ### cursor?
31
+ ### nextItem?
32
32
 
33
- > `optional` **cursor**: `string`
33
+ > `optional` **nextItem**: `string`
34
34
 
35
35
  The cursor to get the next chunk of vertices.
@@ -0,0 +1,5 @@
1
+ # Type Alias: AuditableItemGraphContexts
2
+
3
+ > **AuditableItemGraphContexts** = *typeof* [`AuditableItemGraphContexts`](../variables/AuditableItemGraphContexts.md)\[keyof *typeof* [`AuditableItemGraphContexts`](../variables/AuditableItemGraphContexts.md)\]
4
+
5
+ The contexts of auditable item graph data.
@@ -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.
@@ -1,5 +1,5 @@
1
1
  # Type Alias: AuditableItemGraphTypes
2
2
 
3
- > **AuditableItemGraphTypes**: *typeof* [`AuditableItemGraphTypes`](../variables/AuditableItemGraphTypes.md)\[keyof *typeof* [`AuditableItemGraphTypes`](../variables/AuditableItemGraphTypes.md)\]
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**: *typeof* [`VerifyDepth`](../variables/VerifyDepth.md)\[keyof *typeof* [`VerifyDepth`](../variables/VerifyDepth.md)\]
3
+ > **VerifyDepth** = *typeof* [`VerifyDepth`](../variables/VerifyDepth.md)\[keyof *typeof* [`VerifyDepth`](../variables/VerifyDepth.md)\]
4
4
 
5
5
  How deep to verify the signatures.
@@ -0,0 +1,19 @@
1
+ # Variable: AuditableItemGraphContexts
2
+
3
+ > `const` **AuditableItemGraphContexts**: `object`
4
+
5
+ The contexts of auditable item graph data.
6
+
7
+ ## Type declaration
8
+
9
+ ### ContextRoot
10
+
11
+ > `readonly` **ContextRoot**: `"https://schema.twindev.org/aig/"` = `"https://schema.twindev.org/aig/"`
12
+
13
+ The context root for the auditable item graph 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.
@@ -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.
@@ -6,18 +6,18 @@ The types of auditable item graph data.
6
6
 
7
7
  ## Type declaration
8
8
 
9
- ### ContextRoot
10
-
11
- > `readonly` **ContextRoot**: `"https://schema.twindev.org/aig/"` = `"https://schema.twindev.org/aig/"`
12
-
13
- The context root for the auditable item graph types.
14
-
15
9
  ### Vertex
16
10
 
17
11
  > `readonly` **Vertex**: `"AuditableItemGraphVertex"` = `"AuditableItemGraphVertex"`
18
12
 
19
13
  Represents auditable item graph vertex.
20
14
 
15
+ ### VertexList
16
+
17
+ > `readonly` **VertexList**: `"AuditableItemGraphVertexList"` = `"AuditableItemGraphVertexList"`
18
+
19
+ Represents auditable item graph vertex list.
20
+
21
21
  ### Alias
22
22
 
23
23
  > `readonly` **Alias**: `"AuditableItemGraphAlias"` = `"AuditableItemGraphAlias"`
@@ -47,9 +47,3 @@ Represents auditable item graph changeset.
47
47
  > `readonly` **PatchOperation**: `"AuditableItemGraphPatchOperation"` = `"AuditableItemGraphPatchOperation"`
48
48
 
49
49
  Represents patch operation.
50
-
51
- ### VertexList
52
-
53
- > `readonly` **VertexList**: `"AuditableItemGraphVertexList"` = `"AuditableItemGraphVertexList"`
54
-
55
- Represents auditable item stream vertex list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/auditable-item-graph-models",
3
- "version": "0.0.1-next.9",
3
+ "version": "0.0.2-next.1",
4
4
  "description": "Models which define the structure of the auditable item graph connectors and services",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,6 +20,7 @@
20
20
  "@twin.org/entity": "next",
21
21
  "@twin.org/immutable-proof-models": "next",
22
22
  "@twin.org/nameof": "next",
23
+ "@twin.org/standards-schema-org": "next",
23
24
  "@twin.org/web": "next"
24
25
  },
25
26
  "main": "./dist/cjs/index.cjs",
@@ -27,11 +28,11 @@
27
28
  "types": "./dist/types/index.d.ts",
28
29
  "exports": {
29
30
  ".": {
31
+ "types": "./dist/types/index.d.ts",
30
32
  "require": "./dist/cjs/index.cjs",
31
- "import": "./dist/esm/index.mjs",
32
- "types": "./dist/types/index.d.ts"
33
+ "import": "./dist/esm/index.mjs"
33
34
  },
34
- "./locales": "./locales"
35
+ "./locales/*.json": "./locales/*.json"
35
36
  },
36
37
  "files": [
37
38
  "dist/cjs",