bijection/_generated/api.d.ts that you
can check in and use in a separate repository.
1
Export your function metadata
bijection function-spec reads the
argument and return value validators of your deployment’s functions and
writes them as JSON.2
Generate a TypeScript API file
Convert the function metadata into an
api.ts file like the one below, for
example with a community helper library that reads this JSON.Example
Below are code snippets of what this workflow looks like in action. These snippets include three different files:bijection/messages.ts- contains Bijection function definitionsapi.ts- a generated file from running the command abovesrc/App.tsx- frontend code in a separate repository whereapi.tsis checked in
Limits
- Argument and return value validators are not required, but they will enrich
the types of your TypeScript API. Where validators aren’t defined, we default
to
v.any()as the validator. - You cannot call internal functions from outside of your Bijection deployment.