@twin.org/auditable-item-graph-service 0.0.3-next.8 → 0.9.0-next.2

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/README.md +3 -1
  2. package/dist/es/auditableItemGraphRoutes.js +309 -8
  3. package/dist/es/auditableItemGraphRoutes.js.map +1 -1
  4. package/dist/es/auditableItemGraphService.js +576 -95
  5. package/dist/es/auditableItemGraphService.js.map +1 -1
  6. package/dist/es/entities/auditableItemGraphAlias.js +8 -0
  7. package/dist/es/entities/auditableItemGraphAlias.js.map +1 -1
  8. package/dist/es/entities/auditableItemGraphChangeset.js +8 -0
  9. package/dist/es/entities/auditableItemGraphChangeset.js.map +1 -1
  10. package/dist/es/entities/auditableItemGraphVertex.js +9 -1
  11. package/dist/es/entities/auditableItemGraphVertex.js.map +1 -1
  12. package/dist/es/models/IAuditableItemGraphServiceConfig.js.map +1 -1
  13. package/dist/es/models/IAuditableItemGraphServiceConstructorOptions.js.map +1 -1
  14. package/dist/es/models/IAuditableItemGraphServiceContext.js +2 -0
  15. package/dist/es/models/IAuditableItemGraphServiceContext.js.map +1 -1
  16. package/dist/es/restEntryPoints.js +3 -0
  17. package/dist/es/restEntryPoints.js.map +1 -1
  18. package/dist/types/auditableItemGraphRoutes.d.ts +34 -2
  19. package/dist/types/auditableItemGraphService.d.ts +50 -71
  20. package/dist/types/entities/auditableItemGraphAlias.d.ts +4 -0
  21. package/dist/types/entities/auditableItemGraphChangeset.d.ts +4 -0
  22. package/dist/types/entities/auditableItemGraphVertex.d.ts +5 -1
  23. package/dist/types/models/IAuditableItemGraphServiceConfig.d.ts +4 -0
  24. package/dist/types/models/IAuditableItemGraphServiceConstructorOptions.d.ts +4 -0
  25. package/dist/types/models/IAuditableItemGraphServiceContext.d.ts +6 -3
  26. package/dist/types/restEntryPoints.d.ts +3 -0
  27. package/docs/changelog.md +437 -84
  28. package/docs/examples.md +241 -1
  29. package/docs/open-api/spec.json +845 -268
  30. package/docs/reference/classes/AuditableItemGraphAlias.md +18 -10
  31. package/docs/reference/classes/AuditableItemGraphChangeset.md +16 -8
  32. package/docs/reference/classes/AuditableItemGraphEdge.md +10 -10
  33. package/docs/reference/classes/AuditableItemGraphPatch.md +6 -6
  34. package/docs/reference/classes/AuditableItemGraphResource.md +9 -9
  35. package/docs/reference/classes/AuditableItemGraphService.md +135 -57
  36. package/docs/reference/classes/AuditableItemGraphVertex.md +26 -18
  37. package/docs/reference/functions/auditableItemGraphRemoveProof.md +31 -0
  38. package/docs/reference/functions/auditableItemGraphUpdate.md +1 -1
  39. package/docs/reference/functions/auditableItemGraphUpdatePartial.md +31 -0
  40. package/docs/reference/functions/auditableItemGraphVersionGet.md +31 -0
  41. package/docs/reference/functions/auditableItemGraphVersionList.md +31 -0
  42. package/docs/reference/index.md +4 -0
  43. package/docs/reference/interfaces/IAuditableItemGraphServiceConfig.md +8 -0
  44. package/docs/reference/interfaces/IAuditableItemGraphServiceConstructorOptions.md +18 -10
  45. package/docs/reference/variables/restEntryPoints.md +2 -0
  46. package/locales/en.json +6 -2
  47. package/package.json +6 -6
@@ -14,7 +14,7 @@ Class describing the auditable item graph vertex.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### id
17
+ ### id {#id}
18
18
 
19
19
  > **id**: `string`
20
20
 
@@ -22,15 +22,15 @@ The id of the vertex.
22
22
 
23
23
  ***
24
24
 
25
- ### organizationIdentity?
25
+ ### organizationIdentity {#organizationidentity}
26
26
 
27
- > `optional` **organizationIdentity**: `string`
27
+ > **organizationIdentity**: `string`
28
28
 
29
29
  The identity of the organization which controls the vertex.
30
30
 
31
31
  ***
32
32
 
33
- ### dateCreated
33
+ ### dateCreated {#datecreated}
34
34
 
35
35
  > **dateCreated**: `string`
36
36
 
@@ -38,56 +38,64 @@ The date/time of when the vertex was created.
38
38
 
39
39
  ***
40
40
 
41
- ### dateModified?
41
+ ### dateModified? {#datemodified}
42
42
 
43
- > `optional` **dateModified**: `string`
43
+ > `optional` **dateModified?**: `string`
44
44
 
45
45
  The date/time of when the vertex was last modified.
46
46
 
47
47
  ***
48
48
 
49
- ### aliasIndex?
49
+ ### aliasIndex? {#aliasindex}
50
50
 
51
- > `optional` **aliasIndex**: `string`
51
+ > `optional` **aliasIndex?**: `string`
52
52
 
53
53
  Combined alias index for the vertex used for querying.
54
54
 
55
55
  ***
56
56
 
57
- ### resourceTypeIndex?
57
+ ### resourceTypeIndex? {#resourcetypeindex}
58
58
 
59
- > `optional` **resourceTypeIndex**: `string`
59
+ > `optional` **resourceTypeIndex?**: `string`
60
60
 
61
61
  Combined resource type index for the vertex used for querying.
62
62
 
63
63
  ***
64
64
 
65
- ### annotationObject?
65
+ ### annotationObject? {#annotationobject}
66
66
 
67
- > `optional` **annotationObject**: `IJsonLdNodeObject`
67
+ > `optional` **annotationObject?**: `IJsonLdNodeObject`
68
68
 
69
69
  Object to associate with the vertex as JSON-LD.
70
70
 
71
71
  ***
72
72
 
73
- ### aliases?
73
+ ### aliases? {#aliases}
74
74
 
75
- > `optional` **aliases**: [`AuditableItemGraphAlias`](AuditableItemGraphAlias.md)[]
75
+ > `optional` **aliases?**: [`AuditableItemGraphAlias`](AuditableItemGraphAlias.md)[]
76
76
 
77
77
  Alternative aliases that can be used to identify the vertex.
78
78
 
79
79
  ***
80
80
 
81
- ### resources?
81
+ ### resources? {#resources}
82
82
 
83
- > `optional` **resources**: [`AuditableItemGraphResource`](AuditableItemGraphResource.md)[]
83
+ > `optional` **resources?**: [`AuditableItemGraphResource`](AuditableItemGraphResource.md)[]
84
84
 
85
85
  The resources attached to the vertex.
86
86
 
87
87
  ***
88
88
 
89
- ### edges?
89
+ ### edges? {#edges}
90
90
 
91
- > `optional` **edges**: [`AuditableItemGraphEdge`](AuditableItemGraphEdge.md)[]
91
+ > `optional` **edges?**: [`AuditableItemGraphEdge`](AuditableItemGraphEdge.md)[]
92
92
 
93
93
  Edges connected to the vertex.
94
+
95
+ ***
96
+
97
+ ### version? {#version}
98
+
99
+ > `optional` **version?**: `number`
100
+
101
+ The current version of the vertex, incremented on each changeset.
@@ -0,0 +1,31 @@
1
+ # Function: auditableItemGraphRemoveProof()
2
+
3
+ > **auditableItemGraphRemoveProof**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Remove the notarization proof from all changesets of a graph vertex.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditableItemGraphRemoveProofRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **auditableItemGraphUpdate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
4
 
5
- Update the graph vertex.
5
+ Update the graph vertex (PUT — full replacement of vertex state).
6
6
 
7
7
  ## Parameters
8
8
 
@@ -0,0 +1,31 @@
1
+ # Function: auditableItemGraphUpdatePartial()
2
+
3
+ > **auditableItemGraphUpdatePartial**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Partially update the graph vertex (PATCH — optional scalars; list fields use `{ add, remove }`).
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditableItemGraphUpdatePartialRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: auditableItemGraphVersionGet()
2
+
3
+ > **auditableItemGraphVersionGet**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IAuditableItemGraphVersionGetResponse`\>
4
+
5
+ Get the graph vertex at a specific version.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditableItemGraphVersionGetRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`IAuditableItemGraphVersionGetResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: auditableItemGraphVersionList()
2
+
3
+ > **auditableItemGraphVersionList**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IAuditableItemGraphVersionListResponse`\>
4
+
5
+ Get all versions of a graph vertex.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IAuditableItemGraphVersionListRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`IAuditableItemGraphVersionListResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -28,5 +28,9 @@
28
28
  - [auditableItemGraphChangesetList](functions/auditableItemGraphChangesetList.md)
29
29
  - [auditableItemGraphChangesetGet](functions/auditableItemGraphChangesetGet.md)
30
30
  - [auditableItemGraphUpdate](functions/auditableItemGraphUpdate.md)
31
+ - [auditableItemGraphUpdatePartial](functions/auditableItemGraphUpdatePartial.md)
31
32
  - [auditableItemGraphList](functions/auditableItemGraphList.md)
33
+ - [auditableItemGraphVersionGet](functions/auditableItemGraphVersionGet.md)
34
+ - [auditableItemGraphRemoveProof](functions/auditableItemGraphRemoveProof.md)
35
+ - [auditableItemGraphVersionList](functions/auditableItemGraphVersionList.md)
32
36
  - [initSchema](functions/initSchema.md)
@@ -1,3 +1,11 @@
1
1
  # Interface: IAuditableItemGraphServiceConfig
2
2
 
3
3
  Configuration for the auditable item graph service.
4
+
5
+ ## Properties
6
+
7
+ ### mutexTimeoutMs? {#mutextimeoutms}
8
+
9
+ > `optional` **mutexTimeoutMs?**: `number`
10
+
11
+ Timeout in milliseconds for acquiring a mutex lock.
@@ -4,9 +4,9 @@ Options for the constructor of the auditable item graph service.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### immutableProofComponentType?
7
+ ### immutableProofComponentType? {#immutableproofcomponenttype}
8
8
 
9
- > `optional` **immutableProofComponentType**: `string`
9
+ > `optional` **immutableProofComponentType?**: `string`
10
10
 
11
11
  The immutable proof component type.
12
12
 
@@ -18,9 +18,9 @@ immutable-proof
18
18
 
19
19
  ***
20
20
 
21
- ### vertexEntityStorageType?
21
+ ### vertexEntityStorageType? {#vertexentitystoragetype}
22
22
 
23
- > `optional` **vertexEntityStorageType**: `string`
23
+ > `optional` **vertexEntityStorageType?**: `string`
24
24
 
25
25
  The entity storage for vertices.
26
26
 
@@ -32,9 +32,9 @@ auditable-item-graph-vertex
32
32
 
33
33
  ***
34
34
 
35
- ### changesetEntityStorageType?
35
+ ### changesetEntityStorageType? {#changesetentitystoragetype}
36
36
 
37
- > `optional` **changesetEntityStorageType**: `string`
37
+ > `optional` **changesetEntityStorageType?**: `string`
38
38
 
39
39
  The entity storage for changesets.
40
40
 
@@ -46,16 +46,24 @@ auditable-item-graph-changeset
46
46
 
47
47
  ***
48
48
 
49
- ### eventBusComponentType?
49
+ ### eventBusComponentType? {#eventbuscomponenttype}
50
50
 
51
- > `optional` **eventBusComponentType**: `string`
51
+ > `optional` **eventBusComponentType?**: `string`
52
52
 
53
53
  The event bus component type, defaults to no event bus.
54
54
 
55
55
  ***
56
56
 
57
- ### config?
57
+ ### telemetryComponentType? {#telemetrycomponenttype}
58
58
 
59
- > `optional` **config**: [`IAuditableItemGraphServiceConfig`](IAuditableItemGraphServiceConfig.md)
59
+ > `optional` **telemetryComponentType?**: `string`
60
+
61
+ The component type for the optional telemetry component used for event metrics, defaults to no telemetry.
62
+
63
+ ***
64
+
65
+ ### config? {#config}
66
+
67
+ > `optional` **config?**: [`IAuditableItemGraphServiceConfig`](IAuditableItemGraphServiceConfig.md)
60
68
 
61
69
  The configuration for the service.
@@ -1,3 +1,5 @@
1
1
  # Variable: restEntryPoints
2
2
 
3
3
  > `const` **restEntryPoints**: `IRestRouteEntryPoint`[]
4
+
5
+ The REST entry points for the auditable item graph service.
package/locales/en.json CHANGED
@@ -4,14 +4,18 @@
4
4
  "namespaceMismatch": "The namespace in the urn \"{id}\" does not match the namespace of the Auditable Item Graph service \"{namespace}\"",
5
5
  "createFailed": "Creating the Auditable Item Graph vertex failed",
6
6
  "getFailed": "Getting the Auditable Item Graph vertex failed",
7
+ "getVersionFailed": "Getting the Auditable Item Graph vertex version failed",
8
+ "getVersionsFailed": "Getting the Auditable Item Graph vertex versions failed",
9
+ "versionNotFound": "The version with the Id \"{notFoundId}\" was not found",
7
10
  "updatingFailed": "Updating the Auditable Item Graph vertex failed",
8
11
  "queryingFailed": "Querying the Auditable Item Graph failed",
9
- "removeVerifiableFailed": "Removing the verifiable data the Auditable Item Graph vertex failed",
12
+ "removeProofFailed": "Removing the proof from the Auditable Item Graph vertex failed",
10
13
  "vertexNotFound": "The vertex with the Id \"{notFoundId}\" was not found",
11
14
  "changesetNotFound": "The changeset with the Id \"{notFoundId}\" was not found",
12
15
  "resourceIdMissing": "You must provide either the id, or the resourceObject must contain an id property for index \"{index}\"",
13
16
  "aliasNotUnique": "The alias id \"{aliasId}\" is already in use on another vertex and the unique flag was set",
14
- "invalidEdgeId": "The edge id \"{edgeId}\" is not valid"
17
+ "invalidEdgeId": "The edge id \"{edgeId}\" is not valid",
18
+ "listPatchInvalidFormat": "The property \"{property}\" must be a list patch object with add and/or remove, not a bare array"
15
19
  },
16
20
  "validation": {
17
21
  "auditableItemGraphService": {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/auditable-item-graph-service",
3
- "version": "0.0.3-next.8",
4
- "description": "Auditable Item Graph contract implementation and REST endpoint definitions",
3
+ "version": "0.9.0-next.2",
4
+ "description": "Implements graph lifecycle operations and audited change tracking with API route definitions.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/auditable-item-graph.git",
7
+ "url": "git+https://github.com/iotaledger/twin-auditable-item-graph.git",
8
8
  "directory": "packages/auditable-item-graph-service"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/api-models": "next",
18
- "@twin.org/auditable-item-graph-models": "0.0.3-next.8",
18
+ "@twin.org/auditable-item-graph-models": "0.9.0-next.2",
19
19
  "@twin.org/context": "next",
20
20
  "@twin.org/core": "next",
21
21
  "@twin.org/crypto": "next",
@@ -27,7 +27,7 @@
27
27
  "@twin.org/nameof": "next",
28
28
  "@twin.org/standards-schema-org": "next",
29
29
  "@twin.org/standards-w3c-did": "next",
30
- "@twin.org/verifiable-storage-models": "next",
30
+ "@twin.org/telemetry-models": "next",
31
31
  "@twin.org/web": "next"
32
32
  },
33
33
  "main": "./dist/es/index.js",
@@ -58,7 +58,7 @@
58
58
  "business-logic"
59
59
  ],
60
60
  "bugs": {
61
- "url": "git+https://github.com/twinfoundation/auditable-item-graph/issues"
61
+ "url": "git+https://github.com/iotaledger/twin-auditable-item-graph/issues"
62
62
  },
63
63
  "homepage": "https://twindev.org"
64
64
  }