@twin.org/auditable-item-graph-service 0.0.1-next.10

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 (39) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/dist/cjs/index.cjs +1606 -0
  4. package/dist/esm/index.mjs +1596 -0
  5. package/dist/types/auditableItemGraphRoutes.d.ts +45 -0
  6. package/dist/types/auditableItemGraphService.d.ts +123 -0
  7. package/dist/types/entities/auditableItemGraphAlias.d.ts +30 -0
  8. package/dist/types/entities/auditableItemGraphChangeset.d.ts +30 -0
  9. package/dist/types/entities/auditableItemGraphEdge.d.ts +30 -0
  10. package/dist/types/entities/auditableItemGraphPatch.d.ts +21 -0
  11. package/dist/types/entities/auditableItemGraphResource.d.ts +26 -0
  12. package/dist/types/entities/auditableItemGraphVertex.d.ts +45 -0
  13. package/dist/types/index.d.ts +11 -0
  14. package/dist/types/models/IAuditableItemGraphServiceConfig.d.ts +5 -0
  15. package/dist/types/models/IAuditableItemGraphServiceContext.d.ts +17 -0
  16. package/dist/types/restEntryPoints.d.ts +2 -0
  17. package/dist/types/schema.d.ts +4 -0
  18. package/docs/changelog.md +5 -0
  19. package/docs/examples.md +1 -0
  20. package/docs/open-api/spec.json +1032 -0
  21. package/docs/reference/classes/AuditableItemGraphAlias.md +61 -0
  22. package/docs/reference/classes/AuditableItemGraphChangeset.md +61 -0
  23. package/docs/reference/classes/AuditableItemGraphEdge.md +61 -0
  24. package/docs/reference/classes/AuditableItemGraphPatch.md +45 -0
  25. package/docs/reference/classes/AuditableItemGraphResource.md +53 -0
  26. package/docs/reference/classes/AuditableItemGraphService.md +289 -0
  27. package/docs/reference/classes/AuditableItemGraphVertex.md +85 -0
  28. package/docs/reference/functions/auditableItemGraphCreate.md +25 -0
  29. package/docs/reference/functions/auditableItemGraphGet.md +25 -0
  30. package/docs/reference/functions/auditableItemGraphList.md +25 -0
  31. package/docs/reference/functions/auditableItemGraphUpdate.md +25 -0
  32. package/docs/reference/functions/generateRestRoutesAuditableItemGraph.md +21 -0
  33. package/docs/reference/functions/initSchema.md +9 -0
  34. package/docs/reference/index.md +29 -0
  35. package/docs/reference/interfaces/IAuditableItemGraphServiceConfig.md +3 -0
  36. package/docs/reference/variables/restEntryPoints.md +3 -0
  37. package/docs/reference/variables/tagsAuditableItemGraph.md +5 -0
  38. package/locales/en.json +19 -0
  39. package/package.json +51 -0
@@ -0,0 +1,25 @@
1
+ # Function: auditableItemGraphList()
2
+
3
+ > **auditableItemGraphList**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IAuditableItemGraphListResponse`\>
4
+
5
+ Query the graph vertices.
6
+
7
+ ## Parameters
8
+
9
+ • **httpRequestContext**: `IHttpRequestContext`
10
+
11
+ The request context for the API.
12
+
13
+ • **componentName**: `string`
14
+
15
+ The name of the component to use in the routes.
16
+
17
+ • **request**: `IAuditableItemGraphListRequest`
18
+
19
+ The request.
20
+
21
+ ## Returns
22
+
23
+ `Promise`\<`IAuditableItemGraphListResponse`\>
24
+
25
+ The response object with additional http response properties.
@@ -0,0 +1,25 @@
1
+ # Function: auditableItemGraphUpdate()
2
+
3
+ > **auditableItemGraphUpdate**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Update the graph vertex.
6
+
7
+ ## Parameters
8
+
9
+ • **httpRequestContext**: `IHttpRequestContext`
10
+
11
+ The request context for the API.
12
+
13
+ • **componentName**: `string`
14
+
15
+ The name of the component to use in the routes.
16
+
17
+ • **request**: `IAuditableItemGraphUpdateRequest`
18
+
19
+ The request.
20
+
21
+ ## Returns
22
+
23
+ `Promise`\<`INoContentResponse`\>
24
+
25
+ The response object with additional http response properties.
@@ -0,0 +1,21 @@
1
+ # Function: generateRestRoutesAuditableItemGraph()
2
+
3
+ > **generateRestRoutesAuditableItemGraph**(`baseRouteName`, `componentName`): `IRestRoute`[]
4
+
5
+ The REST routes for auditable item graph.
6
+
7
+ ## Parameters
8
+
9
+ • **baseRouteName**: `string`
10
+
11
+ Prefix to prepend to the paths.
12
+
13
+ • **componentName**: `string`
14
+
15
+ The name of the component to use in the routes stored in the ComponentFactory.
16
+
17
+ ## Returns
18
+
19
+ `IRestRoute`[]
20
+
21
+ The generated routes.
@@ -0,0 +1,9 @@
1
+ # Function: initSchema()
2
+
3
+ > **initSchema**(): `void`
4
+
5
+ Initialize the schema for the auditable item graph entity storage connector.
6
+
7
+ ## Returns
8
+
9
+ `void`
@@ -0,0 +1,29 @@
1
+ # @twin.org/auditable-item-graph-service
2
+
3
+ ## Classes
4
+
5
+ - [AuditableItemGraphService](classes/AuditableItemGraphService.md)
6
+ - [AuditableItemGraphAlias](classes/AuditableItemGraphAlias.md)
7
+ - [AuditableItemGraphChangeset](classes/AuditableItemGraphChangeset.md)
8
+ - [AuditableItemGraphEdge](classes/AuditableItemGraphEdge.md)
9
+ - [AuditableItemGraphPatch](classes/AuditableItemGraphPatch.md)
10
+ - [AuditableItemGraphResource](classes/AuditableItemGraphResource.md)
11
+ - [AuditableItemGraphVertex](classes/AuditableItemGraphVertex.md)
12
+
13
+ ## Interfaces
14
+
15
+ - [IAuditableItemGraphServiceConfig](interfaces/IAuditableItemGraphServiceConfig.md)
16
+
17
+ ## Variables
18
+
19
+ - [tagsAuditableItemGraph](variables/tagsAuditableItemGraph.md)
20
+ - [restEntryPoints](variables/restEntryPoints.md)
21
+
22
+ ## Functions
23
+
24
+ - [generateRestRoutesAuditableItemGraph](functions/generateRestRoutesAuditableItemGraph.md)
25
+ - [auditableItemGraphCreate](functions/auditableItemGraphCreate.md)
26
+ - [auditableItemGraphGet](functions/auditableItemGraphGet.md)
27
+ - [auditableItemGraphUpdate](functions/auditableItemGraphUpdate.md)
28
+ - [auditableItemGraphList](functions/auditableItemGraphList.md)
29
+ - [initSchema](functions/initSchema.md)
@@ -0,0 +1,3 @@
1
+ # Interface: IAuditableItemGraphServiceConfig
2
+
3
+ Configuration for the auditable item graph service.
@@ -0,0 +1,3 @@
1
+ # Variable: restEntryPoints
2
+
3
+ > `const` **restEntryPoints**: `IRestRouteEntryPoint`[]
@@ -0,0 +1,5 @@
1
+ # Variable: tagsAuditableItemGraph
2
+
3
+ > `const` **tagsAuditableItemGraph**: `ITag`[]
4
+
5
+ The tag to associate with the routes.
@@ -0,0 +1,19 @@
1
+ {
2
+ "error": {
3
+ "auditableItemGraphService": {
4
+ "namespaceMismatch": "The namespace in the urn \"{id}\" does not match the namespace of the Auditable Item Graph service \"{namespace}\"",
5
+ "createFailed": "Creating the Auditable Item Graph vertex failed",
6
+ "getFailed": "Getting the Auditable Item Graph vertex failed",
7
+ "updatingFailed": "Updating the Auditable Item Graph vertex failed",
8
+ "queryingFailed": "Querying the Auditable Item Graph failed",
9
+ "removeImmutableFailed": "Removing the immutable data the Auditable Item Graph vertex failed",
10
+ "vertexNotFound": "The vertex with the Id \"{notFoundId}\" was not found",
11
+ "changesetCredentialRevoked": "The verification credential for the changeset has been revoked",
12
+ "invalidChangesetHash": "The changeset with epoch \"{epoch}\" and hash \"{hash}\" is invalid",
13
+ "invalidChangesetSignature": "The changeset with epoch \"{epoch}\" and hash \"{hash}\" signature does not match the changeset signature",
14
+ "immutableChangesetSignature": "The changeset with epoch \"{epoch}\" and hash \"{hash}\" signature does not match the immutable changeset signature",
15
+ "invalidChangesetCanonical": "The changeset with epoch \"{epoch}\" and hash \"{hash}\" integrity check does not match the immutable changeset integrity check"
16
+ }
17
+ },
18
+ "auditableItemGraphService": {}
19
+ }
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@twin.org/auditable-item-graph-service",
3
+ "version": "0.0.1-next.10",
4
+ "description": "Auditable Item Graph contract implementation and REST endpoint definitions",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/twinfoundation/auditable-item-graph.git",
8
+ "directory": "packages/auditable-item-graph-service"
9
+ },
10
+ "author": "martyn.janes@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "dependencies": {
17
+ "@twin.org/api-models": "next",
18
+ "@twin.org/auditable-item-graph-models": "0.0.1-next.10",
19
+ "@twin.org/core": "next",
20
+ "@twin.org/crypto": "next",
21
+ "@twin.org/data-json-ld": "next",
22
+ "@twin.org/data-schema-org": "next",
23
+ "@twin.org/entity": "next",
24
+ "@twin.org/entity-storage-models": "next",
25
+ "@twin.org/immutable-proof-models": "next",
26
+ "@twin.org/immutable-storage-models": "next",
27
+ "@twin.org/nameof": "next",
28
+ "@twin.org/standards-w3c-did": "next",
29
+ "@twin.org/web": "next",
30
+ "jsonschema": "1.4.1",
31
+ "rfc6902": "5.1.1"
32
+ },
33
+ "main": "./dist/cjs/index.cjs",
34
+ "module": "./dist/esm/index.mjs",
35
+ "types": "./dist/types/index.d.ts",
36
+ "exports": {
37
+ ".": {
38
+ "require": "./dist/cjs/index.cjs",
39
+ "import": "./dist/esm/index.mjs",
40
+ "types": "./dist/types/index.d.ts"
41
+ },
42
+ "./locales": "./locales"
43
+ },
44
+ "files": [
45
+ "dist/cjs",
46
+ "dist/esm",
47
+ "dist/types",
48
+ "locales",
49
+ "docs"
50
+ ]
51
+ }