Skip to content

Commit

Permalink
Add headers to CallOpts and SendOpts
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Dec 18, 2024
1 parent 189153b commit c65f341
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/restate-sdk/src/types/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { TerminalError } from "./errors.js";
export type ClientCallOptions<I, O> = {
input?: Serde<I>;
output?: Serde<O>;
headers?: Record<string, string>;
};

export class Opts<I, O> {
Expand All @@ -64,6 +65,7 @@ export class Opts<I, O> {
export type ClientSendOptions<I> = {
input?: Serde<I>;
delay?: number;
headers?: Record<string, string>;
};

export class SendOpts<I> {
Expand Down Expand Up @@ -161,6 +163,7 @@ export const makeRpcCallProxy = <T>(
method,
parameter,
key,
headers: opts?.headers,
inputSerde: requestSerde,
outputSerde: responseSerde,
});
Expand Down Expand Up @@ -194,6 +197,7 @@ export const makeRpcSendProxy = <T>(
method,
parameter,
key,
headers: opts?.headers,
delay,
inputSerde: requestSerde,
});
Expand Down

0 comments on commit c65f341

Please sign in to comment.