@twin.org/api-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.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/cjs/index.cjs +355 -0
- package/dist/esm/index.mjs +347 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/informationRoutes.d.ts +36 -0
- package/dist/types/informationService.d.ts +50 -0
- package/dist/types/restEntryPoints.d.ts +2 -0
- package/docs/changelog.md +5 -0
- package/docs/examples.md +1 -0
- package/docs/reference/classes/InformationService.md +169 -0
- package/docs/reference/functions/generateRestRoutesInformation.md +21 -0
- package/docs/reference/functions/serverHealth.md +25 -0
- package/docs/reference/functions/serverInfo.md +25 -0
- package/docs/reference/functions/serverSpec.md +25 -0
- package/docs/reference/index.md +17 -0
- package/docs/reference/variables/restEntryPoints.md +3 -0
- package/docs/reference/variables/tagsInformation.md +5 -0
- package/locales/en.json +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Function: serverSpec()
|
|
2
|
+
|
|
3
|
+
> **serverSpec**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IServerSpecResponse`\>
|
|
4
|
+
|
|
5
|
+
Get the spec for the server.
|
|
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**: `INoContentRequest`
|
|
18
|
+
|
|
19
|
+
The request.
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`Promise`\<`IServerSpecResponse`\>
|
|
24
|
+
|
|
25
|
+
The response object with additional http response properties.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @twin.org/api-service
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [InformationService](classes/InformationService.md)
|
|
6
|
+
|
|
7
|
+
## Variables
|
|
8
|
+
|
|
9
|
+
- [tagsInformation](variables/tagsInformation.md)
|
|
10
|
+
- [restEntryPoints](variables/restEntryPoints.md)
|
|
11
|
+
|
|
12
|
+
## Functions
|
|
13
|
+
|
|
14
|
+
- [generateRestRoutesInformation](functions/generateRestRoutesInformation.md)
|
|
15
|
+
- [serverInfo](functions/serverInfo.md)
|
|
16
|
+
- [serverHealth](functions/serverHealth.md)
|
|
17
|
+
- [serverSpec](functions/serverSpec.md)
|
package/locales/en.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@twin.org/api-service",
|
|
3
|
+
"version": "0.0.1-next.10",
|
|
4
|
+
"description": "Information contract implementation and REST endpoint definitions",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/twinfoundation/api.git",
|
|
8
|
+
"directory": "packages/api-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": "0.0.1-next.10",
|
|
18
|
+
"@twin.org/core": "next",
|
|
19
|
+
"@twin.org/nameof": "next",
|
|
20
|
+
"@twin.org/web": "next"
|
|
21
|
+
},
|
|
22
|
+
"main": "./dist/cjs/index.cjs",
|
|
23
|
+
"module": "./dist/esm/index.mjs",
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"require": "./dist/cjs/index.cjs",
|
|
28
|
+
"import": "./dist/esm/index.mjs",
|
|
29
|
+
"types": "./dist/types/index.d.ts"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist/cjs",
|
|
34
|
+
"dist/esm",
|
|
35
|
+
"dist/types",
|
|
36
|
+
"locales",
|
|
37
|
+
"docs"
|
|
38
|
+
]
|
|
39
|
+
}
|