Documentation
    Preparing search index...

    Module @restatedev/restate-sdk-clients

    Documentation Examples Discord Twitter

    Restate Typescript SDK Clients

    Restate is a system for easily building resilient applications using distributed durable async/await.

    This package contains the clients to interact with your Restate services, using fetch.

    import * as restate from "@restatedev/restate-sdk-clients";

    // Import the type of the service to call
    import type { Greeter } from "./greeter-service";
    const Greeter: Greeter = { name: "greeter" };

    // Instantiate the Restate client
    const rs = restate.connect({ url: "http://localhost:8080" });

    // Get a typed client for Greeter
    const greeter = rs.serviceClient(Greeter);

    // Send a request to greet
    const greeting = await greeter.greet(name);

    To build Restate services using Typescript, checkout the SDK main package https://www.npmjs.com/package/@restatedev/restate-sdk.

    To use this client, add the dependency to your project:

    npm install @restatedev/restate-sdk-clients
    

    This library follows Semantic Versioning.

    Namespaces

    rpc
    serde

    Classes

    HttpCallError
    Opts
    SendOpts

    Interfaces

    Ingress
    IngressCallOptions
    IngressSendOptions
    Output
    Serde

    Type Aliases

    ConnectionOpts
    Duration
    InferArgType
    IngressClient
    IngressSendClient
    IngressWorkflowClient
    Send
    Service
    ServiceDefinition
    ServiceDefinitionFrom
    VirtualObject
    VirtualObjectDefinition
    VirtualObjectDefinitionFrom
    Workflow
    WorkflowDefinition
    WorkflowDefinitionFrom
    WorkflowSubmission

    Functions

    connect