@emeryld/rrroutes-contract 2.1.9 → 2.1.11
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/dist/core/routesV3.core.d.ts +34 -0
- package/dist/docs/docs.d.ts +1 -1
- package/dist/docs/serializer.d.ts +14 -0
- package/dist/index.cjs +739 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +738 -83
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -29,6 +29,40 @@ export type MethodCfg = {
|
|
|
29
29
|
feed?: boolean;
|
|
30
30
|
/** Optional human-readable description for docs/debugging. */
|
|
31
31
|
description?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Short one-line summary for docs list views.
|
|
34
|
+
* Shown in navigation / tables instead of the full description.
|
|
35
|
+
*/
|
|
36
|
+
summary?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Group name used for navigation sections in docs UIs.
|
|
39
|
+
* e.g. "Users", "Billing", "Auth".
|
|
40
|
+
*/
|
|
41
|
+
docsGroup?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Tags that can be used to filter / facet in interactive docs.
|
|
44
|
+
* e.g. ["users", "admin", "internal"].
|
|
45
|
+
*/
|
|
46
|
+
tags?: string[];
|
|
47
|
+
/**
|
|
48
|
+
* Mark the route as deprecated in docs.
|
|
49
|
+
* Renderers can badge this and/or hide by default.
|
|
50
|
+
*/
|
|
51
|
+
deprecated?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Optional stability information for the route.
|
|
54
|
+
* Renderers can surface this prominently.
|
|
55
|
+
*/
|
|
56
|
+
stability?: 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
57
|
+
/**
|
|
58
|
+
* Hide this route from public docs while keeping it usable in code.
|
|
59
|
+
*/
|
|
60
|
+
docsHidden?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Arbitrary extra metadata for docs renderers.
|
|
63
|
+
* Can be used for auth requirements, rate limits, feature flags, etc.
|
|
64
|
+
*/
|
|
65
|
+
docsMeta?: Record<string, unknown>;
|
|
32
66
|
};
|
|
33
67
|
/** Immutable representation of a single HTTP route in the tree. */
|
|
34
68
|
export type Leaf<M extends HttpMethod, P extends string, C extends MethodCfg> = {
|
package/dist/docs/docs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AnyLeaf } from "../core/routesV3.core";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function renderLeafDocsHTML(leaves: AnyLeaf[]): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyLeaf, MethodCfg } from "../core/routesV3.core";
|
|
2
|
+
type SerializableMethodCfg = Pick<MethodCfg, 'description' | 'summary' | 'docsGroup' | 'tags' | 'deprecated' | 'stability' | 'feed' | 'docsMeta'> & {
|
|
3
|
+
hasBody: boolean;
|
|
4
|
+
hasQuery: boolean;
|
|
5
|
+
hasParams: boolean;
|
|
6
|
+
hasOutput: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type SerializableLeaf = {
|
|
9
|
+
method: string;
|
|
10
|
+
path: string;
|
|
11
|
+
cfg: SerializableMethodCfg;
|
|
12
|
+
};
|
|
13
|
+
export declare function serializeLeaf(leaf: AnyLeaf): SerializableLeaf;
|
|
14
|
+
export {};
|