@toa.io/extensions.exposition 0.2.1-dev.3
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/package.json +36 -0
- package/src/.manifest/index.js +7 -0
- package/src/.manifest/normalize.js +58 -0
- package/src/.manifest/schema.yaml +69 -0
- package/src/.manifest/validate.js +17 -0
- package/src/constants.js +3 -0
- package/src/deployment.js +23 -0
- package/src/exposition.js +68 -0
- package/src/factory.js +76 -0
- package/src/index.js +9 -0
- package/src/manifest.js +12 -0
- package/src/query/criteria.js +55 -0
- package/src/query/enum.js +35 -0
- package/src/query/index.js +17 -0
- package/src/query/query.js +60 -0
- package/src/query/range.js +28 -0
- package/src/query/sort.js +19 -0
- package/src/remote.js +88 -0
- package/src/server.js +83 -0
- package/src/tenant.js +28 -0
- package/src/translate/etag.js +14 -0
- package/src/translate/index.js +7 -0
- package/src/translate/request.js +68 -0
- package/src/translate/response.js +62 -0
- package/src/tree.js +107 -0
- package/test/manifest.normalize.fixtures.js +37 -0
- package/test/manifest.normalize.test.js +37 -0
- package/test/manifest.validate.test.js +25 -0
- package/test/query.range.test.js +18 -0
- package/test/tree.fixtures.js +21 -0
- package/test/tree.test.js +44 -0
- package/types/annotations.d.ts +10 -0
- package/types/declarations.d.ts +31 -0
- package/types/exposition.d.ts +13 -0
- package/types/http.d.ts +13 -0
- package/types/query.d.ts +16 -0
- package/types/remote.d.ts +19 -0
- package/types/server.d.ts +13 -0
- package/types/tree.d.ts +33 -0
package/types/tree.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// noinspection ES6UnusedImports
|
|
2
|
+
|
|
3
|
+
import type * as declarations from './declarations'
|
|
4
|
+
import type { Method } from './http'
|
|
5
|
+
import type { Query } from './query'
|
|
6
|
+
import type { Match as PathMatch } from 'path-to-regexp'
|
|
7
|
+
|
|
8
|
+
declare namespace toa.extensions.exposition {
|
|
9
|
+
|
|
10
|
+
namespace tree {
|
|
11
|
+
|
|
12
|
+
interface Node {
|
|
13
|
+
route: string
|
|
14
|
+
match: (route: string) => PathMatch<object>
|
|
15
|
+
operations: Record<Method, declarations.Operation>
|
|
16
|
+
query: Query
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Match {
|
|
20
|
+
node: Node
|
|
21
|
+
params: Record<string, string>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Tree {
|
|
27
|
+
match(path: string): tree.Match
|
|
28
|
+
|
|
29
|
+
update(tree: declarations.Node): void
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|