@twin.org/api-service 0.0.1-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.
- 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 +66 -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,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@twin.org/api-service",
|
|
3
|
+
"version": "0.0.1-next.2",
|
|
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
|
+
"scripts": {
|
|
17
|
+
"clean": "rimraf dist coverage",
|
|
18
|
+
"build": "tspc",
|
|
19
|
+
"test": "vitest --run --config ./vitest.config.ts --no-cache",
|
|
20
|
+
"coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
|
|
21
|
+
"bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
|
|
22
|
+
"bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
|
|
23
|
+
"bundle": "npm run bundle:esm && npm run bundle:cjs",
|
|
24
|
+
"docs:clean": "rimraf docs/reference",
|
|
25
|
+
"docs:generate": "typedoc",
|
|
26
|
+
"docs": "npm run docs:clean && npm run docs:generate",
|
|
27
|
+
"dist": "npm run clean && npm run build && npm run test && npm run bundle && npm run docs"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@twin.org/api-models": "0.0.1-next.2",
|
|
31
|
+
"@twin.org/core": "next",
|
|
32
|
+
"@twin.org/nameof": "next",
|
|
33
|
+
"@twin.org/web": "next"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@twin.org/nameof-transformer": "next",
|
|
37
|
+
"@vitest/coverage-v8": "2.1.1",
|
|
38
|
+
"@types/node": "22.5.5",
|
|
39
|
+
"copyfiles": "2.4.1",
|
|
40
|
+
"rimraf": "6.0.1",
|
|
41
|
+
"rollup": "4.21.3",
|
|
42
|
+
"rollup-plugin-typescript2": "0.36.0",
|
|
43
|
+
"ts-patch": "3.2.1",
|
|
44
|
+
"typedoc": "0.26.7",
|
|
45
|
+
"typedoc-plugin-markdown": "4.2.7",
|
|
46
|
+
"typescript": "5.6.2",
|
|
47
|
+
"vitest": "2.1.1"
|
|
48
|
+
},
|
|
49
|
+
"main": "./dist/cjs/index.cjs",
|
|
50
|
+
"module": "./dist/esm/index.mjs",
|
|
51
|
+
"types": "./dist/types/index.d.ts",
|
|
52
|
+
"exports": {
|
|
53
|
+
".": {
|
|
54
|
+
"require": "./dist/cjs/index.cjs",
|
|
55
|
+
"import": "./dist/esm/index.mjs",
|
|
56
|
+
"types": "./dist/types/index.d.ts"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"dist/cjs",
|
|
61
|
+
"dist/esm",
|
|
62
|
+
"dist/types",
|
|
63
|
+
"locales",
|
|
64
|
+
"docs"
|
|
65
|
+
]
|
|
66
|
+
}
|