@twin.org/auditable-item-graph-models 0.0.1-next.5 → 0.0.1-next.7

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 (44) hide show
  1. package/dist/cjs/index.cjs +489 -165
  2. package/dist/esm/index.mjs +489 -165
  3. package/dist/types/index.d.ts +1 -0
  4. package/dist/types/models/IAuditableItemGraphAlias.d.ts +16 -3
  5. package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +6 -6
  6. package/dist/types/models/IAuditableItemGraphChangeset.d.ts +11 -2
  7. package/dist/types/models/IAuditableItemGraphComponent.d.ts +22 -40
  8. package/dist/types/models/IAuditableItemGraphCredential.d.ts +11 -2
  9. package/dist/types/models/IAuditableItemGraphEdge.d.ts +16 -3
  10. package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +26 -2
  11. package/dist/types/models/IAuditableItemGraphResource.d.ts +15 -2
  12. package/dist/types/models/IAuditableItemGraphVerification.d.ts +17 -3
  13. package/dist/types/models/IAuditableItemGraphVertex.d.ts +24 -2
  14. package/dist/types/models/IAuditableItemGraphVertexList.d.ts +23 -0
  15. package/dist/types/models/api/IAuditableItemGraphCreateRequest.d.ts +7 -7
  16. package/dist/types/models/api/IAuditableItemGraphGetRequest.d.ts +2 -2
  17. package/dist/types/models/api/IAuditableItemGraphGetResponse.d.ts +2 -13
  18. package/dist/types/models/api/IAuditableItemGraphListRequest.d.ts +6 -5
  19. package/dist/types/models/api/IAuditableItemGraphListResponse.d.ts +2 -12
  20. package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +7 -7
  21. package/dist/types/models/auditableItemGraphTypes.d.ts +13 -9
  22. package/docs/changelog.md +1 -1
  23. package/docs/reference/index.md +1 -1
  24. package/docs/reference/interfaces/IAuditableItemGraphAlias.md +37 -25
  25. package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +9 -9
  26. package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +19 -3
  27. package/docs/reference/interfaces/IAuditableItemGraphComponent.md +13 -29
  28. package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +3 -3
  29. package/docs/reference/interfaces/IAuditableItemGraphCredential.md +19 -3
  30. package/docs/reference/interfaces/IAuditableItemGraphEdge.md +33 -21
  31. package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +2 -2
  32. package/docs/reference/interfaces/IAuditableItemGraphGetResponse.md +4 -4
  33. package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +5 -5
  34. package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +3 -3
  35. package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +46 -2
  36. package/docs/reference/interfaces/IAuditableItemGraphResource.md +30 -18
  37. package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +3 -3
  38. package/docs/reference/interfaces/IAuditableItemGraphVerification.md +30 -6
  39. package/docs/reference/interfaces/IAuditableItemGraphVertex.md +53 -13
  40. package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +35 -0
  41. package/docs/reference/variables/AuditableItemGraphTypes.md +15 -9
  42. package/package.json +1 -1
  43. package/dist/types/models/IAuditableItemGraphMetadataElement.d.ts +0 -10
  44. package/docs/reference/type-aliases/JsonReturnType.md +0 -13
@@ -4,7 +4,7 @@ Interface describing an auditable item graph vertex resource.
4
4
 
5
5
  ## Extends
6
6
 
7
- - [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).`IAuditableItemGraphMetadataElement`
7
+ - [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md)
8
8
 
9
9
  ## Properties
10
10
 
@@ -20,48 +20,60 @@ The id of the element.
20
20
 
21
21
  ***
22
22
 
23
- ### created
23
+ ### dateCreated
24
24
 
25
- > **created**: `number`
25
+ > **dateCreated**: `string`
26
26
 
27
- The timestamp of when the element was created.
27
+ The date/time of when the element was created.
28
28
 
29
29
  #### Inherited from
30
30
 
31
- [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`created`](IAuditableItemGraphAuditedElement.md#created)
31
+ [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`dateCreated`](IAuditableItemGraphAuditedElement.md#datecreated)
32
32
 
33
33
  ***
34
34
 
35
- ### updated?
35
+ ### dateModified?
36
36
 
37
- > `optional` **updated**: `number`
37
+ > `optional` **dateModified**: `string`
38
38
 
39
- The timestamp of when the element was updated.
39
+ The date/time of when the element was modified.
40
40
 
41
41
  #### Inherited from
42
42
 
43
- [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`updated`](IAuditableItemGraphAuditedElement.md#updated)
43
+ [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`dateModified`](IAuditableItemGraphAuditedElement.md#datemodified)
44
44
 
45
45
  ***
46
46
 
47
- ### deleted?
47
+ ### dateDeleted?
48
48
 
49
- > `optional` **deleted**: `number`
49
+ > `optional` **dateDeleted**: `string`
50
50
 
51
- The timestamp of when the element was deleted, as we never actually remove items.
51
+ The date/time of when the element was deleted, as we never actually remove items.
52
52
 
53
53
  #### Inherited from
54
54
 
55
- [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`deleted`](IAuditableItemGraphAuditedElement.md#deleted)
55
+ [`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`dateDeleted`](IAuditableItemGraphAuditedElement.md#datedeleted)
56
56
 
57
57
  ***
58
58
 
59
- ### metadata?
59
+ ### @context
60
60
 
61
- > `optional` **metadata**: `IJsonLdNodeObject`
61
+ > **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
62
62
 
63
- The metadata to associate with the element as JSON-LD.
63
+ JSON-LD Context.
64
64
 
65
- #### Inherited from
65
+ ***
66
+
67
+ ### type
68
+
69
+ > **type**: `"AuditableItemGraphResource"`
70
+
71
+ JSON-LD Type.
72
+
73
+ ***
74
+
75
+ ### resourceObject?
76
+
77
+ > `optional` **resourceObject**: `IJsonLdNodeObject`
66
78
 
67
- `IAuditableItemGraphMetadataElement.metadata`
79
+ The JSON-LD object for the resource.
@@ -24,11 +24,11 @@ The id of the vertex to update.
24
24
 
25
25
  The data to be used in the vertex.
26
26
 
27
- #### metadata?
27
+ #### vertexObject?
28
28
 
29
- > `optional` **metadata**: `IJsonLdNodeObject`
29
+ > `optional` **vertexObject**: `IJsonLdNodeObject`
30
30
 
31
- The metadata to be used in the vertex as JSON-LD.
31
+ The object to be used in the vertex as JSON-LD.
32
32
 
33
33
  #### aliases?
34
34
 
@@ -2,17 +2,29 @@
2
2
 
3
3
  Interface describing an auditable item graph verification.
4
4
 
5
- ## Indexable
5
+ ## Properties
6
6
 
7
- \[`id`: `string`\]: `unknown`
7
+ ### @context
8
8
 
9
- ## Properties
9
+ > **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
10
+
11
+ JSON-LD Context.
12
+
13
+ ***
10
14
 
11
- ### epoch
15
+ ### type
12
16
 
13
- > **epoch**: `number`
17
+ > **type**: `"AuditableItemGraphVerification"`
14
18
 
15
- The epoch of the verification.
19
+ JSON-LD Type.
20
+
21
+ ***
22
+
23
+ ### dateCreated
24
+
25
+ > **dateCreated**: `string`
26
+
27
+ The date/time of the verification.
16
28
 
17
29
  ***
18
30
 
@@ -21,3 +33,15 @@ The epoch of the verification.
21
33
  > **state**: [`AuditableItemGraphVerificationState`](../type-aliases/AuditableItemGraphVerificationState.md)
22
34
 
23
35
  The state of the verification.
36
+
37
+ ***
38
+
39
+ ### stateProperties?
40
+
41
+ > `optional` **stateProperties**: `object`
42
+
43
+ The state properties.
44
+
45
+ #### Index Signature
46
+
47
+ \[`id`: `string`\]: `unknown`
@@ -4,7 +4,7 @@ Interface describing an auditable item graph vertex.
4
4
 
5
5
  ## Extends
6
6
 
7
- - `Omit`\<[`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md), `"deleted"`\>.`IAuditableItemGraphMetadataElement`
7
+ - `Omit`\<[`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md), `"deleted"`\>
8
8
 
9
9
  ## Properties
10
10
 
@@ -20,39 +20,55 @@ The id of the element.
20
20
 
21
21
  ***
22
22
 
23
- ### created
23
+ ### dateCreated
24
24
 
25
- > **created**: `number`
25
+ > **dateCreated**: `string`
26
26
 
27
- The timestamp of when the element was created.
27
+ The date/time of when the element was created.
28
28
 
29
29
  #### Inherited from
30
30
 
31
- `Omit.created`
31
+ `Omit.dateCreated`
32
32
 
33
33
  ***
34
34
 
35
- ### updated?
35
+ ### dateModified?
36
36
 
37
- > `optional` **updated**: `number`
37
+ > `optional` **dateModified**: `string`
38
38
 
39
- The timestamp of when the element was updated.
39
+ The date/time of when the element was modified.
40
40
 
41
41
  #### Inherited from
42
42
 
43
- `Omit.updated`
43
+ `Omit.dateModified`
44
44
 
45
45
  ***
46
46
 
47
- ### metadata?
47
+ ### dateDeleted?
48
48
 
49
- > `optional` **metadata**: `IJsonLdNodeObject`
49
+ > `optional` **dateDeleted**: `string`
50
50
 
51
- The metadata to associate with the element as JSON-LD.
51
+ The date/time of when the element was deleted, as we never actually remove items.
52
52
 
53
53
  #### Inherited from
54
54
 
55
- `IAuditableItemGraphMetadataElement.metadata`
55
+ `Omit.dateDeleted`
56
+
57
+ ***
58
+
59
+ ### @context
60
+
61
+ > **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
62
+
63
+ JSON-LD Context.
64
+
65
+ ***
66
+
67
+ ### type
68
+
69
+ > **type**: `"AuditableItemGraphVertex"`
70
+
71
+ JSON-LD Type.
56
72
 
57
73
  ***
58
74
 
@@ -64,6 +80,14 @@ The identity of the node which controls the vertex.
64
80
 
65
81
  ***
66
82
 
83
+ ### vertexObject?
84
+
85
+ > `optional` **vertexObject**: `IJsonLdNodeObject`
86
+
87
+ The JSON-LD object for the vertex.
88
+
89
+ ***
90
+
67
91
  ### aliases?
68
92
 
69
93
  > `optional` **aliases**: [`IAuditableItemGraphAlias`](IAuditableItemGraphAlias.md)[]
@@ -93,3 +117,19 @@ Edges connected to the vertex.
93
117
  > `optional` **changesets**: [`IAuditableItemGraphChangeset`](IAuditableItemGraphChangeset.md)[]
94
118
 
95
119
  Changesets for the vertex.
120
+
121
+ ***
122
+
123
+ ### verified?
124
+
125
+ > `optional` **verified**: `boolean`
126
+
127
+ Is the vertex verified, will only be populated when verification is requested.
128
+
129
+ ***
130
+
131
+ ### changesetsVerification?
132
+
133
+ > `optional` **changesetsVerification**: [`IAuditableItemGraphVerification`](IAuditableItemGraphVerification.md)[]
134
+
135
+ The verification state of the changesets, will only be populated when changesets are requested.
@@ -0,0 +1,35 @@
1
+ # Interface: IAuditableItemGraphVertexList
2
+
3
+ Interface describing an auditable item graph vertex list.
4
+
5
+ ## Properties
6
+
7
+ ### @context
8
+
9
+ > **@context**: `"https://schema.twindev.org/aig/"` \| [`"https://schema.twindev.org/aig/"`, `...string[]`]
10
+
11
+ JSON-LD Context.
12
+
13
+ ***
14
+
15
+ ### type
16
+
17
+ > **type**: `"AuditableItemGraphVertexList"`
18
+
19
+ JSON-LD Type.
20
+
21
+ ***
22
+
23
+ ### vertices
24
+
25
+ > **vertices**: [`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)[]
26
+
27
+ The list of vertices.
28
+
29
+ ***
30
+
31
+ ### cursor?
32
+
33
+ > `optional` **cursor**: `string`
34
+
35
+ The cursor to get the next chunk of vertices.
@@ -14,54 +14,60 @@ The context root for the auditable item graph types.
14
14
 
15
15
  ### Vertex
16
16
 
17
- > `readonly` **Vertex**: `"https://schema.twindev.org/aig/AuditableItemGraphVertex"` = `"https://schema.twindev.org/aig/AuditableItemGraphVertex"`
17
+ > `readonly` **Vertex**: `"AuditableItemGraphVertex"` = `"AuditableItemGraphVertex"`
18
18
 
19
19
  Represents auditable item graph vertex.
20
20
 
21
21
  ### Alias
22
22
 
23
- > `readonly` **Alias**: `"https://schema.twindev.org/aig/AuditableItemGraphAlias"` = `"https://schema.twindev.org/aig/AuditableItemGraphAlias"`
23
+ > `readonly` **Alias**: `"AuditableItemGraphAlias"` = `"AuditableItemGraphAlias"`
24
24
 
25
25
  Represents auditable item graph alias.
26
26
 
27
27
  ### Resource
28
28
 
29
- > `readonly` **Resource**: `"https://schema.twindev.org/aig/AuditableItemGraphResource"` = `"https://schema.twindev.org/aig/AuditableItemGraphResource"`
29
+ > `readonly` **Resource**: `"AuditableItemGraphResource"` = `"AuditableItemGraphResource"`
30
30
 
31
31
  Represents auditable item graph resource.
32
32
 
33
33
  ### Edge
34
34
 
35
- > `readonly` **Edge**: `"https://schema.twindev.org/aig/AuditableItemGraphEdge"` = `"https://schema.twindev.org/aig/AuditableItemGraphEdge"`
35
+ > `readonly` **Edge**: `"AuditableItemGraphEdge"` = `"AuditableItemGraphEdge"`
36
36
 
37
37
  Represents auditable item graph edge.
38
38
 
39
39
  ### Changeset
40
40
 
41
- > `readonly` **Changeset**: `"https://schema.twindev.org/aig/AuditableItemGraphChangeset"` = `"https://schema.twindev.org/aig/AuditableItemGraphChangeset"`
41
+ > `readonly` **Changeset**: `"AuditableItemGraphChangeset"` = `"AuditableItemGraphChangeset"`
42
42
 
43
43
  Represents auditable item graph changeset.
44
44
 
45
45
  ### PatchOperation
46
46
 
47
- > `readonly` **PatchOperation**: `"https://schema.twindev.org/aig/AuditableItemGraphPatchOperation"` = `"https://schema.twindev.org/aig/AuditableItemGraphPatchOperation"`
47
+ > `readonly` **PatchOperation**: `"AuditableItemGraphPatchOperation"` = `"AuditableItemGraphPatchOperation"`
48
48
 
49
49
  Represents patch operation.
50
50
 
51
51
  ### Credential
52
52
 
53
- > `readonly` **Credential**: `"https://schema.twindev.org/aig/AuditableItemGraphPatchCredential"` = `"https://schema.twindev.org/aig/AuditableItemGraphPatchCredential"`
53
+ > `readonly` **Credential**: `"AuditableItemGraphPatchCredential"` = `"AuditableItemGraphPatchCredential"`
54
54
 
55
55
  Represents the immutable credential payload.
56
56
 
57
57
  ### Verification
58
58
 
59
- > `readonly` **Verification**: `"https://schema.twindev.org/aig/AuditableItemGraphVerification"` = `"https://schema.twindev.org/aig/AuditableItemGraphVerification"`
59
+ > `readonly` **Verification**: `"AuditableItemGraphVerification"` = `"AuditableItemGraphVerification"`
60
60
 
61
61
  Represents auditable item stream verification.
62
62
 
63
63
  ### VerificationState
64
64
 
65
- > `readonly` **VerificationState**: `"https://schema.twindev.org/aig/AuditableItemGraphVerificationState"` = `"https://schema.twindev.org/aig/AuditableItemGraphVerificationState"`
65
+ > `readonly` **VerificationState**: `"AuditableItemGraphVerificationState"` = `"AuditableItemGraphVerificationState"`
66
66
 
67
67
  Represents auditable item stream verification state.
68
+
69
+ ### VertexList
70
+
71
+ > `readonly` **VertexList**: `"AuditableItemGraphVertexList"` = `"AuditableItemGraphVertexList"`
72
+
73
+ 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.5",
3
+ "version": "0.0.1-next.7",
4
4
  "description": "Models which define the structure of the auditable item graph connectors and services",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,10 +0,0 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
- /**
3
- * Interface describing the base properties for auditable metadata elements.
4
- */
5
- export interface IAuditableItemGraphMetadataElement {
6
- /**
7
- * The metadata to associate with the element as JSON-LD.
8
- */
9
- metadata?: IJsonLdNodeObject;
10
- }
@@ -1,13 +0,0 @@
1
- # Type Alias: JsonReturnType\<T, U, V\>
2
-
3
- > **JsonReturnType**\<`T`, `U`, `V`\>: `T` *extends* `"json"` ? `U` : `V`
4
-
5
- The return type based on the response type.
6
-
7
- ## Type Parameters
8
-
9
- • **T**
10
-
11
- • **U**
12
-
13
- • **V**