---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/extension/functions/wire.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/extension](../index.md) / wire

# wire()

> **wire**<`S`>(`shape`): `ZodMiniPipe`<`ZodMiniObject`<{ -readonly \[P in string | number | symbol]: S\[P] }, `$strip`>, `ZodMiniTransform`<`Awaited`<[`CamelKeys`](../type-aliases/CamelKeys.md)<`$InferObjectOutput`<{ -readonly \[P in string | number | symbol]: S\[P] }, { }>>>, `$InferObjectOutput`<{ -readonly \[P in string | number | symbol]: S\[P] }, { }>>>

Declares an object in wire format (snake_case) and delivers the output in camelCase.
Only the declared keys are renamed; nested objects use `wire` again. Extra keys in the
response are dropped (in contract tests, with the strict-schemas flag, they become an error).
For SDK packages (via `@getenginex/sdk/extension`), not for apps.

## Type Parameters

### S

`S` *extends* `Readonly`<{\[`k`: `string`]: `$ZodType`<`unknown`, `unknown`, `$ZodTypeInternals`<`unknown`, `unknown`>>; }>

## Parameters

### shape

`S`

## Returns

`ZodMiniPipe`<`ZodMiniObject`<{ -readonly \[P in string | number | symbol]: S\[P] }, `$strip`>, `ZodMiniTransform`<`Awaited`<[`CamelKeys`](../type-aliases/CamelKeys.md)<`$InferObjectOutput`<{ -readonly \[P in string | number | symbol]: S\[P] }, { }>>>, `$InferObjectOutput`<{ -readonly \[P in string | number | symbol]: S\[P] }, { }>>>

## Example

```ts
wire({ game_id: z.string(), provider: wire({ provider_id: z.string() }) })
// output: { gameId: string; provider: { providerId: string } }
```
