@erebus-sh/sdk
Version:
To install dependencies:
177 lines • 6.95 kB
TypeScript
import type { AppType as ServerRoutes } from "./app";
export type AppType = ServerRoutes;
/**
* Creates an RPC client for communicating with the Erebus server
* This function can be safely imported by client-side code
*/
export declare const createRpcClient: (baseUrl: string) => {
api: {
"health-not-meaningful": import("hono/client").ClientRequest<{
$get: {
input: {};
output: {
ok: true;
reqId: string;
};
outputFormat: "json";
status: import("hono/utils/http-status").ContentfulStatusCode;
};
}>;
};
} & {
api: {
"generate-token-test": import("hono/client").ClientRequest<{
$get: {
input: {};
output: {
error: string;
reqId: string;
};
outputFormat: "json";
status: 400;
} | {
input: {};
output: {
token: string;
};
outputFormat: "json";
status: import("hono/utils/http-status").ContentfulStatusCode;
};
}>;
};
} & {
api: {
erebus: {
pubsub: {
grant: import("hono/client").ClientRequest<{
$post: {
input: {
json: {
channel: string;
};
};
output: {
error: string;
reqId: string;
};
outputFormat: "json";
status: 400;
} | {
input: {
json: {
channel: string;
};
};
output: {
error: string;
reqId: string;
message: string;
};
outputFormat: "json";
status: 500;
} | {
input: {
json: {
channel: string;
};
};
output: {
grant_jwt: string;
};
outputFormat: "json";
status: import("hono/utils/http-status").ContentfulStatusCode;
};
}>;
};
};
};
} & {
api: {
erebus: {
pubsub: {
"fire-webhook": import("hono/client").ClientRequest<{
$post: {
input: {
json: {
messageBody: {
id: string;
topic: string;
senderId: string;
seq: string;
sentAt: unknown;
payload: string;
t_ingress?: number | undefined;
t_enqueued?: number | undefined;
t_broadcast_begin?: number | undefined;
t_ws_write_end?: number | undefined;
t_broadcast_end?: number | undefined;
clientMsgId?: string | undefined;
clientPublishTs?: number | undefined;
}[];
hmac: string;
};
};
output: {
error: string;
};
outputFormat: "json";
status: 500;
} | {
input: {
json: {
messageBody: {
id: string;
topic: string;
senderId: string;
seq: string;
sentAt: unknown;
payload: string;
t_ingress?: number | undefined;
t_enqueued?: number | undefined;
t_broadcast_begin?: number | undefined;
t_ws_write_end?: number | undefined;
t_broadcast_end?: number | undefined;
clientMsgId?: string | undefined;
clientPublishTs?: number | undefined;
}[];
hmac: string;
};
};
output: {
error: string;
};
outputFormat: "json";
status: 401;
} | {
input: {
json: {
messageBody: {
id: string;
topic: string;
senderId: string;
seq: string;
sentAt: unknown;
payload: string;
t_ingress?: number | undefined;
t_enqueued?: number | undefined;
t_broadcast_begin?: number | undefined;
t_ws_write_end?: number | undefined;
t_broadcast_end?: number | undefined;
clientMsgId?: string | undefined;
clientPublishTs?: number | undefined;
}[];
hmac: string;
};
};
output: {
ok: true;
};
outputFormat: "json";
status: import("hono/utils/http-status").ContentfulStatusCode;
};
}>;
};
};
};
};
//# sourceMappingURL=rpc.d.ts.map