@peasant-labs/schema 0.52.0 → 0.53.0
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/README.md +8 -0
- package/dist/internal/generated/routes.gen.d.ts +652 -0
- package/dist/internal/generated/routes.gen.js +808 -0
- package/dist/local-api.d.ts +2 -0
- package/dist/local-api.js +1 -0
- package/dist/route-member.d.ts +33 -0
- package/dist/route-member.js +50 -0
- package/dist/village-api.d.ts +2 -0
- package/dist/village-api.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,14 @@ and schema-owned fixture helpers. It does not contain HTTP or WebSocket clients.
|
|
|
17
17
|
Consumers that need endpoint typing can import type-only OpenAPI `paths` and
|
|
18
18
|
`operations` namespaces from `@peasant-labs/schema/local-api` and
|
|
19
19
|
`@peasant-labs/schema/village-api`; these exports do not contain a transport.
|
|
20
|
+
The same subpaths export one route member per operation, named by its
|
|
21
|
+
`operationId`: `VillageRoute.GetTranscriptSegments.method` is `"GET"`,
|
|
22
|
+
`.pattern` is the document's path template, and `.path({ id })` builds the
|
|
23
|
+
request path with every value escaped by `encodeURIComponent`. A missing or
|
|
24
|
+
extra path parameter is a compile error. A value that is empty, `.` or `..`
|
|
25
|
+
throws a `RangeError`: clients resolve such a segment, so the request would
|
|
26
|
+
reach a different endpoint. `ALL_VILLAGE_ROUTES` and
|
|
27
|
+
`ALL_LOCAL_ROUTES` are the ordered sets.
|
|
20
28
|
|
|
21
29
|
The Go contract and its generated Types OpenAPI document are authoritative.
|
|
22
30
|
Hey API's Zod plugin derives both the TypeScript definitions and runtime schemas
|