@automate.ax/client 0.102.0 → 0.103.1

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/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { codecEnvelopeSerializer } from "@automate.ax/codec/rpc";
1
2
  import { createORPCClient } from "@orpc/client";
2
3
  import { RPCLink } from "@orpc/client/fetch";
3
4
  const RPC_URL = "https://automate.ax/api/rpc";
@@ -11,6 +12,7 @@ const RPC_URL = "https://automate.ax/api/rpc";
11
12
  */
12
13
  export function createAutomateClient(options) {
13
14
  return createORPCClient(new RPCLink({
15
+ customJsonSerializers: [codecEnvelopeSerializer],
14
16
  fetch: async (request, init) => await (options.fetch ?? globalThis.fetch)(request, {
15
17
  ...init,
16
18
  credentials: "omit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/client",
3
- "version": "0.102.0",
3
+ "version": "0.103.1",
4
4
  "description": "Type-safe client for the Automate.ax API.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@automate.ax/api-contract": "0.102.0",
29
+ "@automate.ax/api-contract": "0.103.1",
30
30
  "@orpc/client": "1.15.0",
31
31
  "@orpc/contract": "1.15.0"
32
32
  },
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { publicContract } from "@automate.ax/api-contract"
2
+ import { codecEnvelopeSerializer } from "@automate.ax/codec/rpc"
2
3
  import { createORPCClient } from "@orpc/client"
3
4
  import { RPCLink } from "@orpc/client/fetch"
4
5
  import type { ContractRouterClient } from "@orpc/contract"
@@ -62,6 +63,7 @@ export function createAutomateClient(
62
63
  ): AutomateClient {
63
64
  return createORPCClient(
64
65
  new RPCLink({
66
+ customJsonSerializers: [codecEnvelopeSerializer],
65
67
  fetch: async (request, init) =>
66
68
  await (options.fetch ?? globalThis.fetch)(request, {
67
69
  ...init,