@restatedev/restate-sdk-cloudflare-workers 0.0.0-SNAPSHOT-20241001101403
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/esm/src/common_api.d.ts +12 -0
- package/dist/esm/src/common_api.d.ts.map +1 -0
- package/dist/esm/src/common_api.js +16 -0
- package/dist/esm/src/common_api.js.map +1 -0
- package/dist/esm/src/context.d.ts +587 -0
- package/dist/esm/src/context.d.ts.map +1 -0
- package/dist/esm/src/context.js +75 -0
- package/dist/esm/src/context.js.map +1 -0
- package/dist/esm/src/context_impl.d.ts +96 -0
- package/dist/esm/src/context_impl.d.ts.map +1 -0
- package/dist/esm/src/context_impl.js +696 -0
- package/dist/esm/src/context_impl.js.map +1 -0
- package/dist/esm/src/endpoint/endpoint_builder.d.ts +28 -0
- package/dist/esm/src/endpoint/endpoint_builder.d.ts.map +1 -0
- package/dist/esm/src/endpoint/endpoint_builder.js +139 -0
- package/dist/esm/src/endpoint/endpoint_builder.js.map +1 -0
- package/dist/esm/src/endpoint/fetch_endpoint.d.ts +54 -0
- package/dist/esm/src/endpoint/fetch_endpoint.d.ts.map +1 -0
- package/dist/esm/src/endpoint/fetch_endpoint.js +57 -0
- package/dist/esm/src/endpoint/fetch_endpoint.js.map +1 -0
- package/dist/esm/src/endpoint/handlers/fetch.d.ts +6 -0
- package/dist/esm/src/endpoint/handlers/fetch.d.ts.map +1 -0
- package/dist/esm/src/endpoint/handlers/fetch.js +30 -0
- package/dist/esm/src/endpoint/handlers/fetch.js.map +1 -0
- package/dist/esm/src/endpoint/handlers/generic.d.ts +62 -0
- package/dist/esm/src/endpoint/handlers/generic.d.ts.map +1 -0
- package/dist/esm/src/endpoint/handlers/generic.js +289 -0
- package/dist/esm/src/endpoint/handlers/generic.js.map +1 -0
- package/dist/esm/src/endpoint/handlers/lambda.d.ts +8 -0
- package/dist/esm/src/endpoint/handlers/lambda.d.ts.map +1 -0
- package/dist/esm/src/endpoint/handlers/lambda.js +80 -0
- package/dist/esm/src/endpoint/handlers/lambda.js.map +1 -0
- package/dist/esm/src/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.d.ts +270 -0
- package/dist/esm/src/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.js +20 -0
- package/dist/esm/src/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.js +1392 -0
- package/dist/esm/src/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm +0 -0
- package/dist/esm/src/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm.d.ts +61 -0
- package/dist/esm/src/endpoint/lambda_endpoint.d.ts +34 -0
- package/dist/esm/src/endpoint/lambda_endpoint.d.ts.map +1 -0
- package/dist/esm/src/endpoint/lambda_endpoint.js +49 -0
- package/dist/esm/src/endpoint/lambda_endpoint.js.map +1 -0
- package/dist/esm/src/endpoint/node_endpoint.d.ts +21 -0
- package/dist/esm/src/endpoint/node_endpoint.d.ts.map +1 -0
- package/dist/esm/src/endpoint/node_endpoint.js +101 -0
- package/dist/esm/src/endpoint/node_endpoint.js.map +1 -0
- package/dist/esm/src/endpoint/request_signing/basex.d.ts +10 -0
- package/dist/esm/src/endpoint/request_signing/basex.d.ts.map +1 -0
- package/dist/esm/src/endpoint/request_signing/basex.js +136 -0
- package/dist/esm/src/endpoint/request_signing/basex.js.map +1 -0
- package/dist/esm/src/endpoint/request_signing/ed25519.d.ts +17 -0
- package/dist/esm/src/endpoint/request_signing/ed25519.d.ts.map +1 -0
- package/dist/esm/src/endpoint/request_signing/ed25519.js +52 -0
- package/dist/esm/src/endpoint/request_signing/ed25519.js.map +1 -0
- package/dist/esm/src/endpoint/request_signing/v1.d.ts +10 -0
- package/dist/esm/src/endpoint/request_signing/v1.d.ts.map +1 -0
- package/dist/esm/src/endpoint/request_signing/v1.js +143 -0
- package/dist/esm/src/endpoint/request_signing/v1.js.map +1 -0
- package/dist/esm/src/endpoint/request_signing/validate.d.ts +19 -0
- package/dist/esm/src/endpoint/request_signing/validate.d.ts.map +1 -0
- package/dist/esm/src/endpoint/request_signing/validate.js +40 -0
- package/dist/esm/src/endpoint/request_signing/validate.js.map +1 -0
- package/dist/esm/src/endpoint.d.ts +132 -0
- package/dist/esm/src/endpoint.d.ts.map +1 -0
- package/dist/esm/src/endpoint.js +12 -0
- package/dist/esm/src/endpoint.js.map +1 -0
- package/dist/esm/src/fetch.d.ts +8 -0
- package/dist/esm/src/fetch.d.ts.map +1 -0
- package/dist/esm/src/fetch.js +23 -0
- package/dist/esm/src/fetch.js.map +1 -0
- package/dist/esm/src/generated/version.d.ts +2 -0
- package/dist/esm/src/generated/version.d.ts.map +1 -0
- package/dist/esm/src/generated/version.js +2 -0
- package/dist/esm/src/generated/version.js.map +1 -0
- package/dist/esm/src/lambda.d.ts +7 -0
- package/dist/esm/src/lambda.d.ts.map +1 -0
- package/dist/esm/src/lambda.js +19 -0
- package/dist/esm/src/lambda.js.map +1 -0
- package/dist/esm/src/logger.d.ts +35 -0
- package/dist/esm/src/logger.d.ts.map +1 -0
- package/dist/esm/src/logger.js +144 -0
- package/dist/esm/src/logger.js.map +1 -0
- package/dist/esm/src/public_api.d.ts +7 -0
- package/dist/esm/src/public_api.d.ts.map +1 -0
- package/dist/esm/src/public_api.js +19 -0
- package/dist/esm/src/public_api.js.map +1 -0
- package/dist/esm/src/types/components.d.ts +85 -0
- package/dist/esm/src/types/components.d.ts.map +1 -0
- package/dist/esm/src/types/components.js +228 -0
- package/dist/esm/src/types/components.js.map +1 -0
- package/dist/esm/src/types/discovery.d.ts +43 -0
- package/dist/esm/src/types/discovery.d.ts.map +1 -0
- package/dist/esm/src/types/discovery.js +28 -0
- package/dist/esm/src/types/discovery.js.map +1 -0
- package/dist/esm/src/types/errors.d.ts +21 -0
- package/dist/esm/src/types/errors.d.ts.map +1 -0
- package/dist/esm/src/types/errors.js +47 -0
- package/dist/esm/src/types/errors.js.map +1 -0
- package/dist/esm/src/types/rpc.d.ts +417 -0
- package/dist/esm/src/types/rpc.d.ts.map +1 -0
- package/dist/esm/src/types/rpc.js +607 -0
- package/dist/esm/src/types/rpc.js.map +1 -0
- package/dist/esm/src/user_agent.d.ts +2 -0
- package/dist/esm/src/user_agent.d.ts.map +1 -0
- package/dist/esm/src/user_agent.js +13 -0
- package/dist/esm/src/user_agent.js.map +1 -0
- package/dist/esm/src/utils/buffer.d.ts +5 -0
- package/dist/esm/src/utils/buffer.d.ts.map +1 -0
- package/dist/esm/src/utils/buffer.js +53 -0
- package/dist/esm/src/utils/buffer.js.map +1 -0
- package/dist/esm/src/utils/completable_promise.d.ts +9 -0
- package/dist/esm/src/utils/completable_promise.d.ts.map +1 -0
- package/dist/esm/src/utils/completable_promise.js +30 -0
- package/dist/esm/src/utils/completable_promise.js.map +1 -0
- package/dist/esm/src/utils/rand.d.ts +13 -0
- package/dist/esm/src/utils/rand.d.ts.map +1 -0
- package/dist/esm/src/utils/rand.js +106 -0
- package/dist/esm/src/utils/rand.js.map +1 -0
- package/dist/esm/src/utils/streams.d.ts +4 -0
- package/dist/esm/src/utils/streams.d.ts.map +1 -0
- package/dist/esm/src/utils/streams.js +20 -0
- package/dist/esm/src/utils/streams.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import type { CombineablePromise, Context, GenericCall, GenericSend, ObjectContext, ObjectSharedContext, WorkflowContext, WorkflowSharedContext } from "../context.js";
|
|
2
|
+
import { type ServiceHandler, type ServiceDefinition, type ObjectHandler, type ObjectSharedHandler, type VirtualObjectDefinition, type WorkflowHandler, type WorkflowDefinition, type WorkflowSharedHandler, type Serde } from "@restatedev/restate-sdk-core";
|
|
3
|
+
export type ClientCallOptions<I, O> = {
|
|
4
|
+
input?: Serde<I>;
|
|
5
|
+
output?: Serde<O>;
|
|
6
|
+
};
|
|
7
|
+
export declare class Opts<I, O> {
|
|
8
|
+
private readonly opts;
|
|
9
|
+
/**
|
|
10
|
+
* Create a call configuration from the provided options.
|
|
11
|
+
*
|
|
12
|
+
* @param opts the call configuration
|
|
13
|
+
*/
|
|
14
|
+
static from<I, O>(opts: ClientCallOptions<I, O>): Opts<I, O>;
|
|
15
|
+
private constructor();
|
|
16
|
+
getOpts(): ClientCallOptions<I, O>;
|
|
17
|
+
}
|
|
18
|
+
export type ClientSendOptions<I> = {
|
|
19
|
+
input?: Serde<I>;
|
|
20
|
+
delay?: number;
|
|
21
|
+
};
|
|
22
|
+
export declare class SendOpts<I> {
|
|
23
|
+
private readonly opts;
|
|
24
|
+
static from<I>(opts: ClientSendOptions<I>): SendOpts<I>;
|
|
25
|
+
getOpts(): ClientSendOptions<I>;
|
|
26
|
+
private constructor();
|
|
27
|
+
}
|
|
28
|
+
export declare namespace rpc {
|
|
29
|
+
const opts: <I, O>(opts: ClientCallOptions<I, O>) => Opts<I, O>;
|
|
30
|
+
const sendOpts: <I>(opts: ClientSendOptions<I>) => SendOpts<I>;
|
|
31
|
+
}
|
|
32
|
+
export declare const defaultSerde: <T>() => Serde<T>;
|
|
33
|
+
export declare const makeRpcCallProxy: <T>(genericCall: (call: GenericCall<unknown, unknown>) => Promise<unknown>, service: string, key?: string) => T;
|
|
34
|
+
export declare const makeRpcSendProxy: <T>(genericSend: (send: GenericSend<unknown>) => void, service: string, key?: string, legacyDelay?: number) => T;
|
|
35
|
+
export type InferArg<P> = P extends [infer A, ...any[]] ? A : unknown;
|
|
36
|
+
export type Client<M> = {
|
|
37
|
+
[K in keyof M as M[K] extends never ? never : K]: M[K] extends (arg: any, ...args: infer P) => PromiseLike<infer O> ? (...args: [...P, ...[opts?: Opts<InferArg<P>, O>]]) => CombineablePromise<O> : never;
|
|
38
|
+
};
|
|
39
|
+
export type SendClient<M> = {
|
|
40
|
+
[K in keyof M as M[K] extends never ? never : K]: M[K] extends (arg: any, ...args: infer P) => any ? (...args: [...P, ...[opts?: SendOpts<InferArg<P>>]]) => void : never;
|
|
41
|
+
};
|
|
42
|
+
export declare enum HandlerKind {
|
|
43
|
+
SERVICE = 0,
|
|
44
|
+
EXCLUSIVE = 1,
|
|
45
|
+
SHARED = 2,
|
|
46
|
+
WORKFLOW = 3
|
|
47
|
+
}
|
|
48
|
+
export type ServiceHandlerOpts = {
|
|
49
|
+
/**
|
|
50
|
+
* Define the acceptable content-type. Wildcards can be used, e.g. `application/*` or `* / *`.
|
|
51
|
+
* If not provided, the `input.contentType` will be used instead.
|
|
52
|
+
*
|
|
53
|
+
* Setting this value has no effect on the input serde.
|
|
54
|
+
* If you want to customize how to deserialize the input, you still need to provide an `input` serde.
|
|
55
|
+
*/
|
|
56
|
+
accept?: string;
|
|
57
|
+
/** @deprecated Use input instead */
|
|
58
|
+
inputDeserializer?: <T>(input: Uint8Array) => T | undefined;
|
|
59
|
+
/** @deprecated Use output instead */
|
|
60
|
+
contentType?: string;
|
|
61
|
+
/** @deprecated Use output instead */
|
|
62
|
+
outputSerializer?: <T>(output: T | undefined) => Uint8Array;
|
|
63
|
+
/**
|
|
64
|
+
* The Serde to use for deserializing the input parameter.
|
|
65
|
+
* defaults to: restate.serde.json
|
|
66
|
+
*
|
|
67
|
+
* Provide a custom Serde if the input is not JSON, or use:
|
|
68
|
+
* restate.serde.binary the skip serialization/deserialization altogether.
|
|
69
|
+
* in that case, the input parameter is a Uint8Array.
|
|
70
|
+
*/
|
|
71
|
+
input?: Serde<unknown>;
|
|
72
|
+
/**
|
|
73
|
+
* The Serde to use for serializing the output.
|
|
74
|
+
* defaults to: restate.serde.json
|
|
75
|
+
*
|
|
76
|
+
* Provide a custom Serde if the output is not JSON, or use:
|
|
77
|
+
* restate.serde.binary the skip serialization/deserialization altogether.
|
|
78
|
+
* in that case, the output parameter is a Uint8Array.
|
|
79
|
+
*/
|
|
80
|
+
output?: Serde<unknown>;
|
|
81
|
+
};
|
|
82
|
+
export type ObjectHandlerOpts = {
|
|
83
|
+
/**
|
|
84
|
+
* Define the acceptable content-type. Wildcards can be used, e.g. `application/*` or `* / *`.
|
|
85
|
+
* If not provided, the `input.contentType` will be used instead.
|
|
86
|
+
*
|
|
87
|
+
* Setting this value has no effect on the input serde.
|
|
88
|
+
* If you want to customize how to deserialize the input, you still need to provide an `input` serde.
|
|
89
|
+
*/
|
|
90
|
+
accept?: string;
|
|
91
|
+
/** @deprecated Use input instead */
|
|
92
|
+
inputDeserializer?: <T>(input: Uint8Array) => T | undefined;
|
|
93
|
+
/** @deprecated Use output instead */
|
|
94
|
+
contentType?: string;
|
|
95
|
+
/** @deprecated Use output instead */
|
|
96
|
+
outputSerializer?: <T>(output: T | undefined) => Uint8Array;
|
|
97
|
+
/**
|
|
98
|
+
* The Serde to use for deserializing the input parameter.
|
|
99
|
+
* defaults to: restate.serde.json
|
|
100
|
+
*
|
|
101
|
+
* Provide a custom Serde if the input is not JSON, or use:
|
|
102
|
+
* restate.serde.binary the skip serialization/deserialization altogether.
|
|
103
|
+
* in that case, the input parameter is a Uint8Array.
|
|
104
|
+
*/
|
|
105
|
+
input?: Serde<unknown>;
|
|
106
|
+
/**
|
|
107
|
+
* The Serde to use for serializing the output.
|
|
108
|
+
* defaults to: restate.serde.json
|
|
109
|
+
*
|
|
110
|
+
* Provide a custom Serde if the output is not JSON, or use:
|
|
111
|
+
* restate.serde.binary the skip serialization/deserialization altogether.
|
|
112
|
+
* in that case, the output parameter is a Uint8Array.
|
|
113
|
+
*/
|
|
114
|
+
output?: Serde<unknown>;
|
|
115
|
+
};
|
|
116
|
+
export type WorkflowHandlerOpts = {
|
|
117
|
+
/**
|
|
118
|
+
* Define the acceptable content-type. Wildcards can be used, e.g. `application/*` or `* / *`.
|
|
119
|
+
* If not provided, the `input.contentType` will be used instead.
|
|
120
|
+
*
|
|
121
|
+
* Setting this value has no effect on the input serde.
|
|
122
|
+
* If you want to customize how to deserialize the input, you still need to provide an `input` serde.
|
|
123
|
+
*/
|
|
124
|
+
accept?: string;
|
|
125
|
+
/** @deprecated Use input instead */
|
|
126
|
+
inputDeserializer?: <T>(input: Uint8Array) => T | undefined;
|
|
127
|
+
/** @deprecated Use output instead */
|
|
128
|
+
contentType?: string;
|
|
129
|
+
/** @deprecated Use output instead */
|
|
130
|
+
outputSerializer?: <T>(output: T | undefined) => Uint8Array;
|
|
131
|
+
/**
|
|
132
|
+
* The Serde to use for deserializing the input parameter.
|
|
133
|
+
* defaults to: restate.serde.json
|
|
134
|
+
*
|
|
135
|
+
* Provide a custom Serde if the input is not JSON, or use:
|
|
136
|
+
* restate.serde.binary the skip serialization/deserialization altogether.
|
|
137
|
+
* in that case, the input parameter is a Uint8Array.
|
|
138
|
+
*/
|
|
139
|
+
input?: Serde<unknown>;
|
|
140
|
+
/**
|
|
141
|
+
* The Serde to use for serializing the output.
|
|
142
|
+
* defaults to: restate.serde.json
|
|
143
|
+
*
|
|
144
|
+
* Provide a custom Serde if the output is not JSON, or use:
|
|
145
|
+
* restate.serde.binary the skip serialization/deserialization altogether.
|
|
146
|
+
* in that case, the output parameter is a Uint8Array.
|
|
147
|
+
*/
|
|
148
|
+
output?: Serde<unknown>;
|
|
149
|
+
};
|
|
150
|
+
export declare class HandlerWrapper {
|
|
151
|
+
readonly kind: HandlerKind;
|
|
152
|
+
private handler;
|
|
153
|
+
readonly inputSerde: Serde<unknown>;
|
|
154
|
+
readonly outputSerde: Serde<unknown>;
|
|
155
|
+
static from(kind: HandlerKind, handler: Function, opts?: ServiceHandlerOpts | ObjectHandlerOpts | WorkflowHandlerOpts): HandlerWrapper;
|
|
156
|
+
static fromHandler(handler: any): HandlerWrapper | undefined;
|
|
157
|
+
readonly accept: string;
|
|
158
|
+
readonly contentType: string;
|
|
159
|
+
private constructor();
|
|
160
|
+
bindInstance(t: unknown): void;
|
|
161
|
+
invoke(context: unknown, input: Uint8Array): Promise<Uint8Array>;
|
|
162
|
+
/**
|
|
163
|
+
* Instead of a HandlerWrapper with a handler property,
|
|
164
|
+
* return the original handler with a HandlerWrapper property.
|
|
165
|
+
* This is needed to keep the appearance of regular functions
|
|
166
|
+
* bound to an object, so that for example, `this.foo(ctx, arg)` would
|
|
167
|
+
* work.
|
|
168
|
+
*/
|
|
169
|
+
transpose<F>(): F;
|
|
170
|
+
}
|
|
171
|
+
export declare namespace handlers {
|
|
172
|
+
/**
|
|
173
|
+
* Create a service handler.
|
|
174
|
+
*
|
|
175
|
+
* @param opts additional configuration
|
|
176
|
+
* @param fn the actual handler code to execute
|
|
177
|
+
*/
|
|
178
|
+
function handler<F>(opts: ServiceHandlerOpts, fn: ServiceHandler<F, Context>): F;
|
|
179
|
+
namespace workflow {
|
|
180
|
+
function workflow<F>(opts: WorkflowHandlerOpts, fn: WorkflowHandler<F, WorkflowContext<any>>): F;
|
|
181
|
+
function workflow<F>(fn: WorkflowHandler<F, WorkflowContext<any>>): F;
|
|
182
|
+
/**
|
|
183
|
+
* Creates a shared handler for a workflow.
|
|
184
|
+
*
|
|
185
|
+
* A shared handler allows a read-only concurrent execution
|
|
186
|
+
* for a given key.
|
|
187
|
+
*
|
|
188
|
+
* @param opts additional configurations
|
|
189
|
+
* @param fn the handler to execute
|
|
190
|
+
*/
|
|
191
|
+
function shared<F>(opts: WorkflowHandlerOpts, fn: WorkflowSharedHandler<F, WorkflowSharedContext<any>>): F;
|
|
192
|
+
/**
|
|
193
|
+
* Creates a shared handler for a workflow.
|
|
194
|
+
*
|
|
195
|
+
* A shared handler allows a read-only concurrent execution
|
|
196
|
+
* for a given key.
|
|
197
|
+
*
|
|
198
|
+
* @param opts additional configurations
|
|
199
|
+
* @param fn the handler to execute
|
|
200
|
+
*/
|
|
201
|
+
function shared<F>(fn: WorkflowSharedHandler<F, WorkflowSharedContext<any>>): F;
|
|
202
|
+
}
|
|
203
|
+
namespace object {
|
|
204
|
+
/**
|
|
205
|
+
* Creates an exclusive handler for a virtual Object.
|
|
206
|
+
*
|
|
207
|
+
* note : This applies only to a virtual object.
|
|
208
|
+
*
|
|
209
|
+
* @param opts additional configurations
|
|
210
|
+
* @param fn the handler to execute
|
|
211
|
+
*/
|
|
212
|
+
function exclusive<F>(opts: ObjectHandlerOpts, fn: ObjectHandler<F, ObjectContext<any>>): F;
|
|
213
|
+
/**
|
|
214
|
+
* Creates an exclusive handler for a virtual Object.
|
|
215
|
+
*
|
|
216
|
+
*
|
|
217
|
+
* note 1: This applies only to a virtual object.
|
|
218
|
+
* note 2: This is the default for virtual objects, so if no
|
|
219
|
+
* additional reconfiguration is needed, you can simply
|
|
220
|
+
* use the handler directly (no need to use exclusive).
|
|
221
|
+
* This variant here is only for symmetry/convenance.
|
|
222
|
+
*
|
|
223
|
+
* @param fn the handler to execute
|
|
224
|
+
*/
|
|
225
|
+
function exclusive<F>(fn: ObjectHandler<F, ObjectContext<any>>): F;
|
|
226
|
+
/**
|
|
227
|
+
* Creates a shared handler for a virtual Object.
|
|
228
|
+
*
|
|
229
|
+
* A shared handler allows a read-only concurrent execution
|
|
230
|
+
* for a given key.
|
|
231
|
+
*
|
|
232
|
+
* note: This applies only to a virtual object.
|
|
233
|
+
*
|
|
234
|
+
* @param opts additional configurations
|
|
235
|
+
* @param fn the handler to execute
|
|
236
|
+
*/
|
|
237
|
+
function shared<F>(opts: ObjectHandlerOpts, fn: ObjectSharedHandler<F, ObjectSharedContext<any>>): F;
|
|
238
|
+
/**
|
|
239
|
+
* Creates a shared handler for a virtual Object.
|
|
240
|
+
*
|
|
241
|
+
* A shared handler allows a read-only concurrent execution
|
|
242
|
+
* for a given key.
|
|
243
|
+
*
|
|
244
|
+
* note: This applies only to a virtual object.
|
|
245
|
+
*
|
|
246
|
+
* @param opts additional configurations
|
|
247
|
+
* @param fn the handler to execute
|
|
248
|
+
*/
|
|
249
|
+
function shared<F>(fn: ObjectSharedHandler<F, ObjectSharedContext<any>>): F;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export type ServiceOpts<U> = {
|
|
253
|
+
[K in keyof U]: U[K] extends ServiceHandler<any, Context> ? U[K] : never;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Define a Restate service.
|
|
257
|
+
*
|
|
258
|
+
* @example Here is an example of how to define a service:
|
|
259
|
+
*
|
|
260
|
+
* ```ts
|
|
261
|
+
* const greeter = service({
|
|
262
|
+
* name: "greeter",
|
|
263
|
+
* handlers: {
|
|
264
|
+
* greet: async (ctx: Context, name: string) => {
|
|
265
|
+
* return `Hello ${name}`;
|
|
266
|
+
* }
|
|
267
|
+
* }
|
|
268
|
+
* });
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* To use the service, you can bind it to an endpoint:
|
|
272
|
+
* ```
|
|
273
|
+
* ...
|
|
274
|
+
* endpoint.bind(greeter)
|
|
275
|
+
* ```
|
|
276
|
+
* @example To use a service, you can export its type to be used in a client:
|
|
277
|
+
* ```
|
|
278
|
+
* export type Greeter = typeof greeter;
|
|
279
|
+
* ...
|
|
280
|
+
* ...
|
|
281
|
+
* import type { Greeter } from "./greeter";
|
|
282
|
+
* const client = ctx.serviceClient<Greeter>({ name : "greeter"});
|
|
283
|
+
* client.greet("World").then(console.log);
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* @example Alternatively to avoid repeating the service name, you can:
|
|
287
|
+
* ```
|
|
288
|
+
* import type {Greeter} from "./greeter";
|
|
289
|
+
* const Greeter: Greeter = { name : "greeter"};
|
|
290
|
+
*
|
|
291
|
+
* // now you can reference the service like this:
|
|
292
|
+
* const client = ctx.serviceClient(Greeter);
|
|
293
|
+
* ```
|
|
294
|
+
*
|
|
295
|
+
* @param name the service name
|
|
296
|
+
* @param handlers the handlers for the service
|
|
297
|
+
* @type P the name of the service
|
|
298
|
+
* @type M the handlers for the service
|
|
299
|
+
*/
|
|
300
|
+
export declare const service: <P extends string, M>(service: {
|
|
301
|
+
name: P;
|
|
302
|
+
handlers: ServiceOpts<M>;
|
|
303
|
+
}) => ServiceDefinition<P, M>;
|
|
304
|
+
export type ObjectOpts<U> = {
|
|
305
|
+
[K in keyof U]: U[K] extends ObjectHandler<U[K], ObjectContext<any>> ? U[K] : U[K] extends ObjectHandler<U[K], ObjectSharedContext<any>> ? U[K] : never;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Define a Restate virtual object.
|
|
309
|
+
*
|
|
310
|
+
* @example Here is an example of how to define a virtual object:
|
|
311
|
+
* ```ts
|
|
312
|
+
* const counter = object({
|
|
313
|
+
* name: "counter",
|
|
314
|
+
* handlers: {
|
|
315
|
+
* add: async (ctx: ObjectContext, amount: number) => {},
|
|
316
|
+
* get: async (ctx: ObjectContext) => {}
|
|
317
|
+
* }
|
|
318
|
+
* })
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* @example To use the object, you can bind it to an endpoint:
|
|
322
|
+
* ```ts
|
|
323
|
+
* ...
|
|
324
|
+
* endpoint.bind(counter)
|
|
325
|
+
* ```
|
|
326
|
+
*
|
|
327
|
+
* @see to interact with the object, you can use the object client:
|
|
328
|
+
* ```ts
|
|
329
|
+
* ...
|
|
330
|
+
* const client = ctx.objectClient<typeof counter>({ name: "counter"});
|
|
331
|
+
* const res = await client.add(1)
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* ### Shared handlers
|
|
335
|
+
*
|
|
336
|
+
* Shared handlers are used to allow concurrent read-only access to the object.
|
|
337
|
+
* This is useful when you want to allow multiple clients to read the object's state at the same time.
|
|
338
|
+
* To define a shared handler, you can use the `shared` decorator as shown below:
|
|
339
|
+
*
|
|
340
|
+
* ```ts
|
|
341
|
+
* const counter = object({
|
|
342
|
+
* name: "counter",
|
|
343
|
+
* handlers: {
|
|
344
|
+
*
|
|
345
|
+
* add: async (ctx: ObjectContext, amount: number) => { .. },
|
|
346
|
+
*
|
|
347
|
+
* get: handlers.object.shared(async (ctx: ObjectSharedContext) => {
|
|
348
|
+
* return ctx.get<number>("count");
|
|
349
|
+
* })
|
|
350
|
+
* }
|
|
351
|
+
* });
|
|
352
|
+
* ```
|
|
353
|
+
*
|
|
354
|
+
* @param name the name of the object
|
|
355
|
+
* @param handlers the handlers for the object
|
|
356
|
+
*/
|
|
357
|
+
export declare const object: <P extends string, M>(object: {
|
|
358
|
+
name: P;
|
|
359
|
+
handlers: ObjectOpts<M>;
|
|
360
|
+
}) => VirtualObjectDefinition<P, M>;
|
|
361
|
+
/**
|
|
362
|
+
* A workflow handlers is a type that describes the handlers for a workflow.
|
|
363
|
+
* The handlers must contain exactly one handler named 'run', and this handler must accept as a first argument a WorkflowContext.
|
|
364
|
+
* It can contain any number of additional handlers, which must accept as a first argument a WorkflowSharedContext.
|
|
365
|
+
* The handlers can not be named 'workflowSubmit', 'workflowAttach', 'workflowOutput' - as these are reserved.
|
|
366
|
+
* @see {@link workflow} for an example.
|
|
367
|
+
*/
|
|
368
|
+
export type WorkflowOpts<U> = {
|
|
369
|
+
run: (ctx: WorkflowContext<any>, argument: any) => Promise<any>;
|
|
370
|
+
} & {
|
|
371
|
+
[K in keyof U]: K extends "workflowSubmit" | "workflowAttach" | "workflowOutput" ? `${K} is a reserved keyword` : K extends "run" ? U[K] extends WorkflowHandler<U[K], WorkflowContext<any>> ? U[K] : "An handler named 'run' must take as a first argument a WorkflowContext, and must return a Promise" : U[K] extends WorkflowSharedHandler<U[K], WorkflowSharedContext<any>> ? U[K] : "An handler other then 'run' must accept as a first argument a WorkflowSharedContext";
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Define a Restate workflow.
|
|
375
|
+
*
|
|
376
|
+
*
|
|
377
|
+
* @example Here is an example of how to define a workflow:
|
|
378
|
+
* ```ts
|
|
379
|
+
* const mywf = workflow({
|
|
380
|
+
* name: "mywf",
|
|
381
|
+
* handlers: {
|
|
382
|
+
* run: async (ctx: WorkflowContext, argument: any) => {
|
|
383
|
+
* return "Hello World";
|
|
384
|
+
* }
|
|
385
|
+
* }
|
|
386
|
+
* });
|
|
387
|
+
* ```
|
|
388
|
+
*
|
|
389
|
+
* ### Note:
|
|
390
|
+
* * That a workflow must contain exactly one handler named 'run', and this handler must accept as a first argument a WorkflowContext.
|
|
391
|
+
* * The workflow handlers other than 'run' must accept as a first argument a WorkflowSharedContext.
|
|
392
|
+
* * The workflow handlers can not be named 'workflowSubmit', 'workflowAttach', 'workflowOutput' - as these are reserved keywords.
|
|
393
|
+
*
|
|
394
|
+
* @example To use the workflow, you can bind it to an endpoint:
|
|
395
|
+
* ```ts
|
|
396
|
+
* endpoint.bind(mywf)
|
|
397
|
+
* ```
|
|
398
|
+
*
|
|
399
|
+
* @example To interact with the workflow, you can use the workflow client:
|
|
400
|
+
* ```ts
|
|
401
|
+
* const client = ctx.workflowClient<typeof mywf>({ name: "mywf"});
|
|
402
|
+
* const res = await client.run("Hello");
|
|
403
|
+
* ```
|
|
404
|
+
*
|
|
405
|
+
* To use the workflow client from any other environment (like a browser), please refer to the documentation.
|
|
406
|
+
* https://docs.restate.dev
|
|
407
|
+
*
|
|
408
|
+
*
|
|
409
|
+
*
|
|
410
|
+
* @param name the workflow name
|
|
411
|
+
* @param handlers the handlers for the workflow.
|
|
412
|
+
*/
|
|
413
|
+
export declare const workflow: <P extends string, M>(workflow: {
|
|
414
|
+
name: P;
|
|
415
|
+
handlers: WorkflowOpts<M>;
|
|
416
|
+
}) => WorkflowDefinition<P, M>;
|
|
417
|
+
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../../src/types/rpc.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,kBAAkB,EAClB,OAAO,EACP,WAAW,EACX,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EAEX,MAAM,8BAA8B,CAAC;AAKtC,MAAM,M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