Restate Typescript SDK
    Preparing search index...

    The shape of the iface service-interface declaration API.

    interface ServiceInterface {
        shared: {
            json<I = void, O = void>(
                opts?: DescriptorOpts,
            ): HandlerDescriptor<I, O, true>;
            schemas<
                SI extends StandardSchemaV1<any, any>,
                SO extends StandardSchemaV1<any, any>,
            >(
                opts: { input?: SI; output?: SO } & DescriptorOpts,
            ): HandlerDescriptor<
                StandardSchemaV1.InferOutput<NonNullable<SI>>,
                StandardSchemaV1.InferOutput<NonNullable<SO>>,
                true,
            >;
            serdes<SI extends Serde<any>, SO extends Serde<any>>(
                opts: { input?: SI; output?: SO } & DescriptorOpts,
            ): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, true>;
        };
        json<I = void, O = void>(
            opts?: DescriptorOpts,
        ): HandlerDescriptor<I, O, false>;
        object<
            P extends string,
            H extends Record<string, HandlerDescriptor<any, any, boolean>>,
        >(
            name: P,
            handlers: H,
            opts?: DescriptorOpts,
        ): ObjectDescriptor<P, H>;
        schemas<
            SI extends StandardSchemaV1<any, any>,
            SO extends StandardSchemaV1<any, any>,
        >(
            opts: { input?: SI; output?: SO } & DescriptorOpts,
        ): HandlerDescriptor<
            StandardSchemaV1.InferOutput<NonNullable<SI>>,
            StandardSchemaV1.InferOutput<NonNullable<SO>>,
            false,
        >;
        serdes<SI extends Serde<any>, SO extends Serde<any>>(
            opts: { input?: SI; output?: SO } & DescriptorOpts,
        ): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, false>;
        service<
            P extends string,
            H extends Record<string, HandlerDescriptor<any, any, boolean>>,
        >(
            name: P,
            handlers: H,
            opts?: DescriptorOpts,
        ): ServiceDescriptor<P, H>;
        workflow<
            P extends string,
            H extends Record<string, HandlerDescriptor<any, any, boolean>>,
        >(
            name: P,
            handlers: H,
            opts?: DescriptorOpts,
        ): WorkflowDescriptor<P, H>;
    }
    Index

    Properties

    shared: {
        json<I = void, O = void>(
            opts?: DescriptorOpts,
        ): HandlerDescriptor<I, O, true>;
        schemas<
            SI extends StandardSchemaV1<any, any>,
            SO extends StandardSchemaV1<any, any>,
        >(
            opts: { input?: SI; output?: SO } & DescriptorOpts,
        ): HandlerDescriptor<
            StandardSchemaV1.InferOutput<NonNullable<SI>>,
            StandardSchemaV1.InferOutput<NonNullable<SO>>,
            true,
        >;
        serdes<SI extends Serde<any>, SO extends Serde<any>>(
            opts: { input?: SI; output?: SO } & DescriptorOpts,
        ): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, true>;
    }

    Shared (read-only) virtual-object / non-run workflow handler declarators.

    Methods