> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Other languages

> Generated clients for Go, Java, Kotlin, Python and Swift, and the HTTP call body under them

`bijection client <lang>` writes a typed client package for the app in Go,
Java, Kotlin, Python or Swift. Each package is built on its language's runtime
SDK and offers what the [TypeScript client](https://docs.bijection.com/clients/javascript.md) offers, with
the same meanings: `connect` pinned to the app contract, `query`, `watch`,
`mutate` with `once`, `trial`, the frames `as`, `under`, `in` and `at`,
`seen` and `version`, and one `Result`.

| Language | Command | Runtime | Guide |
| - | - | - | - |
| Go | `bijection client go --name github.com/acme/ordersclient` | `sdks/application/go/bijection` | [Go](https://docs.bijection.com/clients/go.md) |
| Java | `bijection client java --name com.acme.orders` | `com.bijection:client` | [Java](https://docs.bijection.com/clients/java.md) |
| Kotlin and Android | `bijection client kotlin --name com.acme.orders` | `com.bijection:client-kotlin` | [Kotlin](https://docs.bijection.com/clients/kotlin.md) |
| Python | `bijection client python --name acme-orders` | `bijection` | [Python](https://docs.bijection.com/clients/python.md) |
| Swift and iOS | `bijection client swift --name OrdersClient` | `Bijection` | [Swift](https://docs.bijection.com/clients/swift.md) |

Every command takes `--out <dir>` and `--package-version`, and refuses when the
committed `bijection.lock` is stale. A generated package embeds the lock's
`contract` line, so an installation whose contract differs refuses its calls
`Conflict` (`ContractStale`).

For a language without a generated client, write the interface document and
call the app over HTTP:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection client json --out interface.json
```

`bijection client json` writes `bijection.interface/v1`: for each exposed
function, its arguments and value as portable value types. A function whose
types have no portable form is listed under `unresolved`, with the reason.

## Calling a function

Every call is one `POST /api/world/function` with a JSON body:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "path": "orders.place",
  "args": { "sku": "A-1", "quantity": { "$int": "2" } },
  "once": "4b1d8c0e-8f5a-4f61-9a39-6f0c8e0b2f3a",
  "contract": "3f9c…"
}
```

| Field | Meaning |
| - | - |
| `path` | The function's dot-joined tree path. |
| `args` | Its arguments, in the Bijection value encoding. |
| `once` | A mutation's identity. Send the same `once` again to ask after a call that answered `Unknown`. |
| `contract` | The `contract` line of `bijection.lock`. An installation whose contract differs refuses `Conflict` (`ContractStale`). |
| `seen` | A version a previous mutation answered: answer from state at least that new. |
| `as`, `under`, `in`, `at` | The frame: a principal (operator credentials only), a label, a world and a valid instant (ISO 8601). |

Send the caller's token as `Authorization: Bearer <token>`. A successful call
answers its value, and a mutation its commit `version`. A refusal answers
`{ code, message, guard? }`, with the same codes as the
[TypeScript client's `Result`](https://docs.bijection.com/clients/javascript#results). `POST /api/trial`
takes the same body and answers `{ result, writes, tasks, validUntil }`,
committing nothing; `validUntil` is the instant the answer is valid until, or
`null`. Live queries use `POST /api/world/function/watch` with the query body and an SSE response.
A fresh head watch may first send a `resume` event. Send its data back as the
body's `resume` field, without `seen`, to reopen the watch exactly at its
original cut; a refusal before the first value means reopen fresh.

The generated runtimes all follow one written wire,
`sdks/application/contract/client.json`, and run one set of cases,
`sdks/application/checks/client_cases.json`. The
[HTTP application API](https://docs.bijection.com/reference/http/application) gives the routes, the
value encoding and the status codes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.