@restatedev/restate-sdk-clients 1.9.1 → 1.10.1
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/LICENSE +21 -0
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/api.cjs +47 -0
- package/dist/api.d.cts +224 -0
- package/dist/api.d.cts.map +1 -0
- package/dist/api.d.ts +224 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +39 -0
- package/dist/api.js.map +1 -0
- package/dist/index.cjs +22 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/ingress.cjs +269 -0
- package/dist/ingress.d.cts +20 -0
- package/dist/ingress.d.cts.map +1 -0
- package/dist/ingress.d.ts +20 -0
- package/dist/ingress.d.ts.map +1 -0
- package/dist/ingress.js +267 -0
- package/dist/ingress.js.map +1 -0
- package/package.json +31 -39
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/src/api.d.ts +0 -225
- package/dist/cjs/src/api.d.ts.map +0 -1
- package/dist/cjs/src/api.js +0 -45
- package/dist/cjs/src/api.js.map +0 -1
- package/dist/cjs/src/ingress.d.ts +0 -15
- package/dist/cjs/src/ingress.d.ts.map +0 -1
- package/dist/cjs/src/ingress.js +0 -392
- package/dist/cjs/src/ingress.js.map +0 -1
- package/dist/cjs/src/public_api.d.ts +0 -7
- package/dist/cjs/src/public_api.d.ts.map +0 -1
- package/dist/cjs/src/public_api.js +0 -24
- package/dist/cjs/src/public_api.js.map +0 -1
- package/dist/cjs/tsconfig.tsbuildinfo +0 -1
- package/dist/esm/src/api.d.ts +0 -225
- package/dist/esm/src/api.d.ts.map +0 -1
- package/dist/esm/src/api.js +0 -40
- package/dist/esm/src/api.js.map +0 -1
- package/dist/esm/src/ingress.d.ts +0 -15
- package/dist/esm/src/ingress.d.ts.map +0 -1
- package/dist/esm/src/ingress.js +0 -387
- package/dist/esm/src/ingress.js.map +0 -1
- package/dist/esm/src/public_api.d.ts +0 -7
- package/dist/esm/src/public_api.d.ts.map +0 -1
- package/dist/esm/src/public_api.js +0 -15
- package/dist/esm/src/public_api.js.map +0 -1
- package/dist/esm/tsconfig.tsbuildinfo +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
|
|
25
|
+
exports.__toESM = __toESM;
|
package/dist/api.cjs
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __restatedev_restate_sdk_core = require("@restatedev/restate-sdk-core");
|
|
3
|
+
__restatedev_restate_sdk_core = require_rolldown_runtime.__toESM(__restatedev_restate_sdk_core);
|
|
4
|
+
|
|
5
|
+
//#region src/api.ts
|
|
6
|
+
var Opts = class Opts {
|
|
7
|
+
/**
|
|
8
|
+
* Create a call configuration from the provided options.
|
|
9
|
+
*
|
|
10
|
+
* @param opts the call configuration
|
|
11
|
+
*/
|
|
12
|
+
static from(opts) {
|
|
13
|
+
return new Opts(opts);
|
|
14
|
+
}
|
|
15
|
+
constructor(opts) {
|
|
16
|
+
this.opts = opts;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var SendOpts = class SendOpts {
|
|
20
|
+
/**
|
|
21
|
+
* @param opts Create send options
|
|
22
|
+
*/
|
|
23
|
+
static from(opts) {
|
|
24
|
+
return new SendOpts(opts);
|
|
25
|
+
}
|
|
26
|
+
delay() {
|
|
27
|
+
if (this.opts.delay !== void 0) return (0, __restatedev_restate_sdk_core.millisOrDurationToMillis)(this.opts.delay);
|
|
28
|
+
}
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
this.opts = opts;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
let rpc;
|
|
34
|
+
(function(_rpc) {
|
|
35
|
+
_rpc.opts = (opts) => Opts.from(opts);
|
|
36
|
+
_rpc.sendOpts = (opts) => SendOpts.from(opts);
|
|
37
|
+
})(rpc || (rpc = {}));
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.Opts = Opts;
|
|
41
|
+
exports.SendOpts = SendOpts;
|
|
42
|
+
Object.defineProperty(exports, 'rpc', {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return rpc;
|
|
46
|
+
}
|
|
47
|
+
});
|
package/dist/api.d.cts
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { Duration, JournalValueCodec, Serde, Service, ServiceDefinitionFrom, VirtualObject, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinitionFrom } from "@restatedev/restate-sdk-core";
|
|
2
|
+
|
|
3
|
+
//#region src/api.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A remote client for a Restate service.
|
|
7
|
+
*
|
|
8
|
+
* Use the following client to interact with services defined
|
|
9
|
+
* - `serviceClient` to create a client for a service.
|
|
10
|
+
* - `workflowClient` to create a client for a workflow.
|
|
11
|
+
* - `objectClient` to create a client for a virtual object.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
interface Ingress {
|
|
15
|
+
/**
|
|
16
|
+
* Create a client from a {@link ServiceDefinition}.
|
|
17
|
+
*/
|
|
18
|
+
serviceClient<D>(opts: ServiceDefinitionFrom<D>): IngressClient<Service<D>>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a client from a {@link WorkflowDefinition}.
|
|
21
|
+
*
|
|
22
|
+
* @param key the key of the workflow.
|
|
23
|
+
*/
|
|
24
|
+
workflowClient<D>(opts: WorkflowDefinitionFrom<D>, key: string): IngressWorkflowClient<Workflow<D>>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a client from a {@link VirtualObjectDefinition}.
|
|
27
|
+
* @param key the key of the virtual object.
|
|
28
|
+
*/
|
|
29
|
+
objectClient<D>(opts: VirtualObjectDefinitionFrom<D>, key: string): IngressClient<VirtualObject<D>>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a client from a {@link ServiceDefinition}.
|
|
32
|
+
*/
|
|
33
|
+
serviceSendClient<D>(opts: ServiceDefinitionFrom<D>): IngressSendClient<Service<D>>;
|
|
34
|
+
/**
|
|
35
|
+
* Create a client from a {@link VirtualObjectDefinition}.
|
|
36
|
+
*/
|
|
37
|
+
objectSendClient<D>(opts: VirtualObjectDefinitionFrom<D>, key: string): IngressSendClient<VirtualObject<D>>;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve an awakeable from the ingress client.
|
|
40
|
+
*/
|
|
41
|
+
resolveAwakeable<T>(id: string, payload?: T): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Reject an awakeable from the ingress client.
|
|
44
|
+
*/
|
|
45
|
+
rejectAwakeable(id: string, reason: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Obtain the result of a service that was asynchronously submitted (via a sendClient).
|
|
48
|
+
*
|
|
49
|
+
* @param send either the send response or the workflow submission as obtained by the respective clients.
|
|
50
|
+
*/
|
|
51
|
+
result<T>(send: Send<T> | WorkflowSubmission<T>): Promise<T>;
|
|
52
|
+
}
|
|
53
|
+
interface IngressCallOptions<I$1 = unknown, O$1 = unknown> {
|
|
54
|
+
/**
|
|
55
|
+
* Key to use for idempotency key.
|
|
56
|
+
*
|
|
57
|
+
* See https://docs.restate.dev/operate/invocation#invoke-a-handler-idempotently for more details.
|
|
58
|
+
*/
|
|
59
|
+
idempotencyKey?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Headers to attach to the request.
|
|
62
|
+
*/
|
|
63
|
+
headers?: Record<string, string>;
|
|
64
|
+
input?: Serde<I$1>;
|
|
65
|
+
output?: Serde<O$1>;
|
|
66
|
+
/**
|
|
67
|
+
* Timeout to be used when executing the request. In milliseconds.
|
|
68
|
+
*
|
|
69
|
+
* Same as {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal#aborting_a_fetch_with_timeout_or_explicit_abort | AbortSignal.timeout()}.
|
|
70
|
+
*
|
|
71
|
+
* This field is exclusive with `signal`, and using both of them will result in a runtime failure.
|
|
72
|
+
*/
|
|
73
|
+
timeout?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Signal to abort the underlying `fetch` operation. See {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}.
|
|
76
|
+
*
|
|
77
|
+
* This field is exclusive with `timeout`, and using both of them will result in a runtime failure.
|
|
78
|
+
*/
|
|
79
|
+
signal?: AbortSignal;
|
|
80
|
+
}
|
|
81
|
+
interface IngressSendOptions<I$1> extends IngressCallOptions<I$1, void> {
|
|
82
|
+
/**
|
|
83
|
+
* If set, the invocation will be enqueued now to be executed after the provided delay. In milliseconds.
|
|
84
|
+
*/
|
|
85
|
+
delay?: number | Duration;
|
|
86
|
+
}
|
|
87
|
+
declare class Opts<I$1, O$1> {
|
|
88
|
+
readonly opts: IngressCallOptions<I$1, O$1>;
|
|
89
|
+
/**
|
|
90
|
+
* Create a call configuration from the provided options.
|
|
91
|
+
*
|
|
92
|
+
* @param opts the call configuration
|
|
93
|
+
*/
|
|
94
|
+
static from<I$1 = unknown, O$1 = unknown>(opts: IngressCallOptions<I$1, O$1>): Opts<I$1, O$1>;
|
|
95
|
+
constructor(opts: IngressCallOptions<I$1, O$1>);
|
|
96
|
+
}
|
|
97
|
+
declare class SendOpts<I$1 = unknown> {
|
|
98
|
+
readonly opts: IngressSendOptions<I$1>;
|
|
99
|
+
/**
|
|
100
|
+
* @param opts Create send options
|
|
101
|
+
*/
|
|
102
|
+
static from<I$1 = unknown>(opts: IngressSendOptions<I$1>): SendOpts<I$1>;
|
|
103
|
+
delay(): number | undefined;
|
|
104
|
+
constructor(opts: IngressSendOptions<I$1>);
|
|
105
|
+
}
|
|
106
|
+
type InferArgType<P$1> = P$1 extends [infer A, ...any[]] ? A : unknown;
|
|
107
|
+
type IngressClient<M> = { [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<InferArgType<P>, O>]]) => PromiseLike<O> : never };
|
|
108
|
+
declare namespace rpc {
|
|
109
|
+
const opts: <I$1, O$1>(opts: IngressCallOptions<I$1, O$1>) => Opts<I$1, O$1>;
|
|
110
|
+
const sendOpts: <I$1>(opts: IngressSendOptions<I$1>) => SendOpts<I$1>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Represents the output of a workflow.
|
|
114
|
+
*/
|
|
115
|
+
interface Output<O$1> {
|
|
116
|
+
/**
|
|
117
|
+
* Whether the output is ready.
|
|
118
|
+
*/
|
|
119
|
+
ready: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The output of the workflow.
|
|
122
|
+
*/
|
|
123
|
+
result: O$1;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Represents a successful workflow submission.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
type WorkflowSubmission<T> = {
|
|
130
|
+
/**
|
|
131
|
+
* The invocation id of the workflow. You can use that id to
|
|
132
|
+
* with the introspection tools (restate cli, logging, metrics)
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
readonly invocationId: string;
|
|
136
|
+
readonly status: "Accepted" | "PreviouslyAccepted";
|
|
137
|
+
readonly attachable: true;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* A client for a workflow.
|
|
141
|
+
*
|
|
142
|
+
* This client represents the workflow definition, with the following additional methods:
|
|
143
|
+
* - `workflowSubmit` to submit the workflow.
|
|
144
|
+
* - `workflowAttach` to attach to the workflow and wait for its completion
|
|
145
|
+
* - `workflowOutput` to check if the workflow's output is ready/available.
|
|
146
|
+
*
|
|
147
|
+
* Once a workflow is submitted, it can be attached to, and the output can be retrieved.
|
|
148
|
+
*
|
|
149
|
+
* @typeParam M the type of the workflow.
|
|
150
|
+
*/
|
|
151
|
+
type IngressWorkflowClient<M> = Omit<{ [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<InferArgType<P>, O>]]) => PromiseLike<O> : never } & {
|
|
152
|
+
/**
|
|
153
|
+
* Submit this workflow.
|
|
154
|
+
*
|
|
155
|
+
* This instructs restate to execute the 'run' handler of the workflow, idempotently.
|
|
156
|
+
* The workflow will be executed asynchronously, and the promise will resolve when the workflow has been accepted.
|
|
157
|
+
* Please note that submitting a workflow does not wait for it to completion, and it is safe to retry the submission,
|
|
158
|
+
* in case of failure.
|
|
159
|
+
*
|
|
160
|
+
* @param argument the same argument type as defined by the 'run' handler.
|
|
161
|
+
*/
|
|
162
|
+
workflowSubmit: M extends Record<string, unknown> ? M["run"] extends ((arg: any, ...args: infer I) => Promise<infer O>) ? (...args: [...I, ...[opts?: SendOpts<InferArgType<I>>]]) => Promise<WorkflowSubmission<O>> : never : never;
|
|
163
|
+
/**
|
|
164
|
+
* Attach to this workflow.
|
|
165
|
+
*
|
|
166
|
+
* This instructs restate to attach to the workflow and wait for it to complete.
|
|
167
|
+
* It is only possible to 'attach' to a workflow that has been previously submitted.
|
|
168
|
+
* The promise will resolve when the workflow has completed either successfully with a result,
|
|
169
|
+
* or be rejected with an error.
|
|
170
|
+
* This operation is safe to retry many times, and it will always return the same result.
|
|
171
|
+
*
|
|
172
|
+
* @returns a promise that resolves when the workflow has completed.
|
|
173
|
+
*/
|
|
174
|
+
workflowAttach: M extends Record<string, unknown> ? M["run"] extends ((...args: any) => Promise<infer O>) ? (opts?: Opts<void, O>) => Promise<O> : never : never;
|
|
175
|
+
/**
|
|
176
|
+
* Try retrieving the output of this workflow.
|
|
177
|
+
*
|
|
178
|
+
* This instructs restate to check if the workflow's output is ready/available.
|
|
179
|
+
* The returned Output object will have a 'ready' field set to true if the output is ready.
|
|
180
|
+
* If the output is ready, the 'result' field will contain the output.
|
|
181
|
+
* note: that this operation will not wait for the workflow to complete, to do so use 'workflowAttach'.
|
|
182
|
+
*
|
|
183
|
+
* @returns a promise that resolves if the workflow's output is ready/available.
|
|
184
|
+
*/
|
|
185
|
+
workflowOutput: M extends Record<string, unknown> ? M["run"] extends ((...args: any) => Promise<infer O>) ? (opts?: Opts<void, O>) => Promise<Output<O>> : never : never;
|
|
186
|
+
}, "run">;
|
|
187
|
+
/**
|
|
188
|
+
* A send response.
|
|
189
|
+
*
|
|
190
|
+
* @typeParam T the type of the response.
|
|
191
|
+
*/
|
|
192
|
+
type Send<T = unknown> = {
|
|
193
|
+
/**
|
|
194
|
+
* The invocation id of the send.
|
|
195
|
+
*/
|
|
196
|
+
invocationId: string;
|
|
197
|
+
/**
|
|
198
|
+
* The status of the send.
|
|
199
|
+
*/
|
|
200
|
+
status: "Accepted" | "PreviouslyAccepted";
|
|
201
|
+
attachable: boolean;
|
|
202
|
+
};
|
|
203
|
+
type IngressSendClient<M> = { [K in keyof M as M[K] extends never ? never : K]: M[K] extends ((arg: any, ...args: infer P) => infer O) ? (...args: [...P, ...[opts?: SendOpts<InferArgType<P>>]]) => Promise<Send<O>> : never };
|
|
204
|
+
type ConnectionOpts = {
|
|
205
|
+
/**
|
|
206
|
+
* Restate ingress URL.
|
|
207
|
+
* For example: http://localhost:8080
|
|
208
|
+
*/
|
|
209
|
+
url: string;
|
|
210
|
+
/**
|
|
211
|
+
* Headers to attach on every request.
|
|
212
|
+
* Use this to attach authentication headers.
|
|
213
|
+
*/
|
|
214
|
+
headers?: Record<string, string>;
|
|
215
|
+
/**
|
|
216
|
+
* Codec to use for input/outputs. Check {@link JournalValueCodec} for more details
|
|
217
|
+
*
|
|
218
|
+
* @experimental
|
|
219
|
+
*/
|
|
220
|
+
journalValueCodec?: JournalValueCodec;
|
|
221
|
+
};
|
|
222
|
+
//#endregion
|
|
223
|
+
export { ConnectionOpts, InferArgType, Ingress, IngressCallOptions, IngressClient, IngressSendClient, IngressSendOptions, IngressWorkflowClient, Opts, Output, Send, SendOpts, WorkflowSubmission, rpc };
|
|
224
|
+
//# sourceMappingURL=api.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.cts","names":[],"sources":["../src/api.ts"],"sourcesContent":[],"mappings":";;;;;;AAwBA;;;;;;;AAYU,UAZO,OAAA,CAYP;EAE0B;;;EAOE,aAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAjBb,qBAiBa,CAjBS,CAiBT,CAAA,CAAA,EAjBc,aAiBd,CAjB4B,OAiB5B,CAjBoC,CAiBpC,CAAA,CAAA;EAA5B;;;;;EAQA,cAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAjBA,sBAiBA,CAjBuB,CAiBvB,CAAA,EAAA,GAAA,EAAA,MAAA,CAAA,EAfL,qBAeK,CAfiB,QAejB,CAf0B,CAe1B,CAAA,CAAA;EACqB;;;;EAMrB,YAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAfA,2BAeA,CAf4B,CAe5B,CAAA,EAAA,GAAA,EAAA,MAAA,CAAA,EAbL,aAaK,CAbS,aAaT,CAbuB,CAavB,CAAA,CAAA;EAE2B;;;EAKO,iBAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAdlC,qBAckC,CAdZ,CAcY,CAAA,CAAA,EAbvC,iBAauC,CAbrB,OAaqB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A,CAAA,EAAA,GAQ1B,WAR0B,CAQd,CARc,CAAA,GAAA,KAAA,EAAI,GAAA;EAuE/B;AAcZ;;;;;;;;;EAM4C,cAAA,EAtExB,CAsEwB,SAtEd,MAsEc,CAAA,MAAA,EAAA,OAAA,CAAA,GArEpC,CAqEoC,CAAA,KAAA,CAAA,UAAA,CAAA,GAAA,EAAA,GAAA,EAAA,GAAA,IAAA,EAAA,KAAA,EAAA,EAAA,GArEa,OAqEb,CAAA,KAAA,EAAA,CAAA,IAAA,CAAA,GAAA,IAAA,EAAA,CAAA,GAnEnB,CAmEmB,EAAA,GAAA,CAAA,IAAA,GAnEL,QAmEK,CAnEI,YAmEJ,CAnEiB,CAmEjB,CAAA,CAAA,CAAA,CAAA,EAAA,GAlE7B,OAkE6B,CAlErB,kBAkEqB,CAlEF,CAkEE,CAAA,CAAA,GAAA,KAAA,GAAA,KAAA;EAAT;;;;;AAKnC;;;;;;kBAxDoB,UAAU,0BACtB,oCAAmC,4BACzB,WAAW,OAAO,QAAQ;;;;;;;;;;;kBAcxB,UAAU,0BACtB,oCAAmC,4BACzB,WAAW,OAAO,QAAQ,OAAO;;;;;;;KAavC;;;;;;;;;;;KAcA,qCACE,KAAK,EAAE,2BAA2B,IAAI,EAAE,qEAKjC,cAAc,SAAS,aAAa,UAC9C,QAAQ,KAAK;KAIZ,cAAA;;;;;;;;;;YAUA;;;;;;sBAOU"}
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { Duration, JournalValueCodec, Serde, Service, ServiceDefinitionFrom, VirtualObject, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinitionFrom } from "@restatedev/restate-sdk-core";
|
|
2
|
+
|
|
3
|
+
//#region src/api.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A remote client for a Restate service.
|
|
7
|
+
*
|
|
8
|
+
* Use the following client to interact with services defined
|
|
9
|
+
* - `serviceClient` to create a client for a service.
|
|
10
|
+
* - `workflowClient` to create a client for a workflow.
|
|
11
|
+
* - `objectClient` to create a client for a virtual object.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
interface Ingress {
|
|
15
|
+
/**
|
|
16
|
+
* Create a client from a {@link ServiceDefinition}.
|
|
17
|
+
*/
|
|
18
|
+
serviceClient<D>(opts: ServiceDefinitionFrom<D>): IngressClient<Service<D>>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a client from a {@link WorkflowDefinition}.
|
|
21
|
+
*
|
|
22
|
+
* @param key the key of the workflow.
|
|
23
|
+
*/
|
|
24
|
+
workflowClient<D>(opts: WorkflowDefinitionFrom<D>, key: string): IngressWorkflowClient<Workflow<D>>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a client from a {@link VirtualObjectDefinition}.
|
|
27
|
+
* @param key the key of the virtual object.
|
|
28
|
+
*/
|
|
29
|
+
objectClient<D>(opts: VirtualObjectDefinitionFrom<D>, key: string): IngressClient<VirtualObject<D>>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a client from a {@link ServiceDefinition}.
|
|
32
|
+
*/
|
|
33
|
+
serviceSendClient<D>(opts: ServiceDefinitionFrom<D>): IngressSendClient<Service<D>>;
|
|
34
|
+
/**
|
|
35
|
+
* Create a client from a {@link VirtualObjectDefinition}.
|
|
36
|
+
*/
|
|
37
|
+
objectSendClient<D>(opts: VirtualObjectDefinitionFrom<D>, key: string): IngressSendClient<VirtualObject<D>>;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve an awakeable from the ingress client.
|
|
40
|
+
*/
|
|
41
|
+
resolveAwakeable<T>(id: string, payload?: T): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Reject an awakeable from the ingress client.
|
|
44
|
+
*/
|
|
45
|
+
rejectAwakeable(id: string, reason: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Obtain the result of a service that was asynchronously submitted (via a sendClient).
|
|
48
|
+
*
|
|
49
|
+
* @param send either the send response or the workflow submission as obtained by the respective clients.
|
|
50
|
+
*/
|
|
51
|
+
result<T>(send: Send<T> | WorkflowSubmission<T>): Promise<T>;
|
|
52
|
+
}
|
|
53
|
+
interface IngressCallOptions<I$1 = unknown, O$1 = unknown> {
|
|
54
|
+
/**
|
|
55
|
+
* Key to use for idempotency key.
|
|
56
|
+
*
|
|
57
|
+
* See https://docs.restate.dev/operate/invocation#invoke-a-handler-idempotently for more details.
|
|
58
|
+
*/
|
|
59
|
+
idempotencyKey?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Headers to attach to the request.
|
|
62
|
+
*/
|
|
63
|
+
headers?: Record<string, string>;
|
|
64
|
+
input?: Serde<I$1>;
|
|
65
|
+
output?: Serde<O$1>;
|
|
66
|
+
/**
|
|
67
|
+
* Timeout to be used when executing the request. In milliseconds.
|
|
68
|
+
*
|
|
69
|
+
* Same as {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal#aborting_a_fetch_with_timeout_or_explicit_abort | AbortSignal.timeout()}.
|
|
70
|
+
*
|
|
71
|
+
* This field is exclusive with `signal`, and using both of them will result in a runtime failure.
|
|
72
|
+
*/
|
|
73
|
+
timeout?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Signal to abort the underlying `fetch` operation. See {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}.
|
|
76
|
+
*
|
|
77
|
+
* This field is exclusive with `timeout`, and using both of them will result in a runtime failure.
|
|
78
|
+
*/
|
|
79
|
+
signal?: AbortSignal;
|
|
80
|
+
}
|
|
81
|
+
interface IngressSendOptions<I$1> extends IngressCallOptions<I$1, void> {
|
|
82
|
+
/**
|
|
83
|
+
* If set, the invocation will be enqueued now to be executed after the provided delay. In milliseconds.
|
|
84
|
+
*/
|
|
85
|
+
delay?: number | Duration;
|
|
86
|
+
}
|
|
87
|
+
declare class Opts<I$1, O$1> {
|
|
88
|
+
readonly opts: IngressCallOptions<I$1, O$1>;
|
|
89
|
+
/**
|
|
90
|
+
* Create a call configuration from the provided options.
|
|
91
|
+
*
|
|
92
|
+
* @param opts the call configuration
|
|
93
|
+
*/
|
|
94
|
+
static from<I$1 = unknown, O$1 = unknown>(opts: IngressCallOptions<I$1, O$1>): Opts<I$1, O$1>;
|
|
95
|
+
constructor(opts: IngressCallOptions<I$1, O$1>);
|
|
96
|
+
}
|
|
97
|
+
declare class SendOpts<I$1 = unknown> {
|
|
98
|
+
readonly opts: IngressSendOptions<I$1>;
|
|
99
|
+
/**
|
|
100
|
+
* @param opts Create send options
|
|
101
|
+
*/
|
|
102
|
+
static from<I$1 = unknown>(opts: IngressSendOptions<I$1>): SendOpts<I$1>;
|
|
103
|
+
delay(): number | undefined;
|
|
104
|
+
constructor(opts: IngressSendOptions<I$1>);
|
|
105
|
+
}
|
|
106
|
+
type InferArgType<P$1> = P$1 extends [infer A, ...any[]] ? A : unknown;
|
|
107
|
+
type IngressClient<M> = { [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<InferArgType<P>, O>]]) => PromiseLike<O> : never };
|
|
108
|
+
declare namespace rpc {
|
|
109
|
+
const opts: <I$1, O$1>(opts: IngressCallOptions<I$1, O$1>) => Opts<I$1, O$1>;
|
|
110
|
+
const sendOpts: <I$1>(opts: IngressSendOptions<I$1>) => SendOpts<I$1>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Represents the output of a workflow.
|
|
114
|
+
*/
|
|
115
|
+
interface Output<O$1> {
|
|
116
|
+
/**
|
|
117
|
+
* Whether the output is ready.
|
|
118
|
+
*/
|
|
119
|
+
ready: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The output of the workflow.
|
|
122
|
+
*/
|
|
123
|
+
result: O$1;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Represents a successful workflow submission.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
type WorkflowSubmission<T> = {
|
|
130
|
+
/**
|
|
131
|
+
* The invocation id of the workflow. You can use that id to
|
|
132
|
+
* with the introspection tools (restate cli, logging, metrics)
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
readonly invocationId: string;
|
|
136
|
+
readonly status: "Accepted" | "PreviouslyAccepted";
|
|
137
|
+
readonly attachable: true;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* A client for a workflow.
|
|
141
|
+
*
|
|
142
|
+
* This client represents the workflow definition, with the following additional methods:
|
|
143
|
+
* - `workflowSubmit` to submit the workflow.
|
|
144
|
+
* - `workflowAttach` to attach to the workflow and wait for its completion
|
|
145
|
+
* - `workflowOutput` to check if the workflow's output is ready/available.
|
|
146
|
+
*
|
|
147
|
+
* Once a workflow is submitted, it can be attached to, and the output can be retrieved.
|
|
148
|
+
*
|
|
149
|
+
* @typeParam M the type of the workflow.
|
|
150
|
+
*/
|
|
151
|
+
type IngressWorkflowClient<M> = Omit<{ [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<InferArgType<P>, O>]]) => PromiseLike<O> : never } & {
|
|
152
|
+
/**
|
|
153
|
+
* Submit this workflow.
|
|
154
|
+
*
|
|
155
|
+
* This instructs restate to execute the 'run' handler of the workflow, idempotently.
|
|
156
|
+
* The workflow will be executed asynchronously, and the promise will resolve when the workflow has been accepted.
|
|
157
|
+
* Please note that submitting a workflow does not wait for it to completion, and it is safe to retry the submission,
|
|
158
|
+
* in case of failure.
|
|
159
|
+
*
|
|
160
|
+
* @param argument the same argument type as defined by the 'run' handler.
|
|
161
|
+
*/
|
|
162
|
+
workflowSubmit: M extends Record<string, unknown> ? M["run"] extends ((arg: any, ...args: infer I) => Promise<infer O>) ? (...args: [...I, ...[opts?: SendOpts<InferArgType<I>>]]) => Promise<WorkflowSubmission<O>> : never : never;
|
|
163
|
+
/**
|
|
164
|
+
* Attach to this workflow.
|
|
165
|
+
*
|
|
166
|
+
* This instructs restate to attach to the workflow and wait for it to complete.
|
|
167
|
+
* It is only possible to 'attach' to a workflow that has been previously submitted.
|
|
168
|
+
* The promise will resolve when the workflow has completed either successfully with a result,
|
|
169
|
+
* or be rejected with an error.
|
|
170
|
+
* This operation is safe to retry many times, and it will always return the same result.
|
|
171
|
+
*
|
|
172
|
+
* @returns a promise that resolves when the workflow has completed.
|
|
173
|
+
*/
|
|
174
|
+
workflowAttach: M extends Record<string, unknown> ? M["run"] extends ((...args: any) => Promise<infer O>) ? (opts?: Opts<void, O>) => Promise<O> : never : never;
|
|
175
|
+
/**
|
|
176
|
+
* Try retrieving the output of this workflow.
|
|
177
|
+
*
|
|
178
|
+
* This instructs restate to check if the workflow's output is ready/available.
|
|
179
|
+
* The returned Output object will have a 'ready' field set to true if the output is ready.
|
|
180
|
+
* If the output is ready, the 'result' field will contain the output.
|
|
181
|
+
* note: that this operation will not wait for the workflow to complete, to do so use 'workflowAttach'.
|
|
182
|
+
*
|
|
183
|
+
* @returns a promise that resolves if the workflow's output is ready/available.
|
|
184
|
+
*/
|
|
185
|
+
workflowOutput: M extends Record<string, unknown> ? M["run"] extends ((...args: any) => Promise<infer O>) ? (opts?: Opts<void, O>) => Promise<Output<O>> : never : never;
|
|
186
|
+
}, "run">;
|
|
187
|
+
/**
|
|
188
|
+
* A send response.
|
|
189
|
+
*
|
|
190
|
+
* @typeParam T the type of the response.
|
|
191
|
+
*/
|
|
192
|
+
type Send<T = unknown> = {
|
|
193
|
+
/**
|
|
194
|
+
* The invocation id of the send.
|
|
195
|
+
*/
|
|
196
|
+
invocationId: string;
|
|
197
|
+
/**
|
|
198
|
+
* The status of the send.
|
|
199
|
+
*/
|
|
200
|
+
status: "Accepted" | "PreviouslyAccepted";
|
|
201
|
+
attachable: boolean;
|
|
202
|
+
};
|
|
203
|
+
type IngressSendClient<M> = { [K in keyof M as M[K] extends never ? never : K]: M[K] extends ((arg: any, ...args: infer P) => infer O) ? (...args: [...P, ...[opts?: SendOpts<InferArgType<P>>]]) => Promise<Send<O>> : never };
|
|
204
|
+
type ConnectionOpts = {
|
|
205
|
+
/**
|
|
206
|
+
* Restate ingress URL.
|
|
207
|
+
* For example: http://localhost:8080
|
|
208
|
+
*/
|
|
209
|
+
url: string;
|
|
210
|
+
/**
|
|
211
|
+
* Headers to attach on every request.
|
|
212
|
+
* Use this to attach authentication headers.
|
|
213
|
+
*/
|
|
214
|
+
headers?: Record<string, string>;
|
|
215
|
+
/**
|
|
216
|
+
* Codec to use for input/outputs. Check {@link JournalValueCodec} for more details
|
|
217
|
+
*
|
|
218
|
+
* @experimental
|
|
219
|
+
*/
|
|
220
|
+
journalValueCodec?: JournalValueCodec;
|
|
221
|
+
};
|
|
222
|
+
//#endregion
|
|
223
|
+
export { ConnectionOpts, InferArgType, Ingress, IngressCallOptions, IngressClient, IngressSendClient, IngressSendOptions, IngressWorkflowClient, Opts, Output, Send, SendOpts, WorkflowSubmission, rpc };
|
|
224
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","names":[],"sources":["../src/api.ts"],"sourcesContent":[],"mappings":";;;;;;AAwBA;;;;;;;AAYU,UAZO,OAAA,CAYP;EAE0B;;;EAOE,aAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAjBb,qBAiBa,CAjBS,CAiBT,CAAA,CAAA,EAjBc,aAiBd,CAjB4B,OAiB5B,CAjBoC,CAiBpC,CAAA,CAAA;EAA5B;;;;;EAQA,cAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAjBA,sBAiBA,CAjBuB,CAiBvB,CAAA,EAAA,GAAA,EAAA,MAAA,CAAA,EAfL,qBAeK,CAfiB,QAejB,CAf0B,CAe1B,CAAA,CAAA;EACqB;;;;EAMrB,YAAA,CAAA,CAAA,CAAA,CAAA,IAAA,EAfA,2BAeA,CAf4B,CAe5B,CAAA,EAAA,GAAA,EAAA,MAAA,CAAA,EAbL,aAaK,CAbS,aAaT,CAbuB,CAavB,CAAA,CAAA;EAE2B;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CAAA,GAOhB,CAPgB,EAAA,GAAA,CAAA,IAAA,GAOF,IAPE,CAOG,YAPH,CAOgB,CAPhB,CAAA,EAOoB,CAPpB,CAAA,CAAA,CAAA,EAAA,GAQ1B,WAR0B,CAQd,CARc,CAAA,GAAA,KAAA,EAAI,GAAA;EAuE/B;AAcZ;;;;;;;;;EAM4C,cAAA,EAtExB,CAsEwB,SAtEd,MAsEc,CAAA,MAAA,EAAA,OAAA,CAAA,GArEpC,CAqEoC,CAAA,KAAA,CAAA,UAAA,CAAA,GAAA,EAAA,GAAA,EAAA,GAAA,IAAA,EAAA,KAAA,EAAA,EAAA,GArEa,OAqEb,CAAA,KAAA,EAAA,CAAA,IAAA,CAAA,GAAA,IAAA,EAAA,CAAA,GAnEnB,CAmEmB,EAAA,GAAA,CAAA,IAAA,GAnEL,QAmEK,CAnEI,YAmEJ,CAnEiB,CAmEjB,CAAA,CAAA,CAAA,CAAA,EAAA,GAlE7B,OAkE6B,CAlErB,kBAkEqB,CAlEF,CAkEE,CAAA,CAAA,GAAA,KAAA,GAAA,KAAA;EAAT;;;;;AAKnC;;;;;;kBAxDoB,UAAU,0BACtB,oCAAmC,4BACzB,WAAW,OAAO,QAAQ;;;;;;;;;;;kBAcxB,UAAU,0BACtB,oCAAmC,4BACzB,WAAW,OAAO,QAAQ,OAAO;;;;;;;KAavC;;;;;;;;;;;KAcA,qCACE,KAAK,EAAE,2BAA2B,IAAI,EAAE,qEAKjC,cAAc,SAAS,aAAa,UAC9C,QAAQ,KAAK;KAIZ,cAAA;;;;;;;;;;YAUA;;;;;;sBAOU"}
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { millisOrDurationToMillis } from "@restatedev/restate-sdk-core";
|
|
2
|
+
|
|
3
|
+
//#region src/api.ts
|
|
4
|
+
var Opts = class Opts {
|
|
5
|
+
/**
|
|
6
|
+
* Create a call configuration from the provided options.
|
|
7
|
+
*
|
|
8
|
+
* @param opts the call configuration
|
|
9
|
+
*/
|
|
10
|
+
static from(opts) {
|
|
11
|
+
return new Opts(opts);
|
|
12
|
+
}
|
|
13
|
+
constructor(opts) {
|
|
14
|
+
this.opts = opts;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var SendOpts = class SendOpts {
|
|
18
|
+
/**
|
|
19
|
+
* @param opts Create send options
|
|
20
|
+
*/
|
|
21
|
+
static from(opts) {
|
|
22
|
+
return new SendOpts(opts);
|
|
23
|
+
}
|
|
24
|
+
delay() {
|
|
25
|
+
if (this.opts.delay !== void 0) return millisOrDurationToMillis(this.opts.delay);
|
|
26
|
+
}
|
|
27
|
+
constructor(opts) {
|
|
28
|
+
this.opts = opts;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
let rpc;
|
|
32
|
+
(function(_rpc) {
|
|
33
|
+
_rpc.opts = (opts) => Opts.from(opts);
|
|
34
|
+
_rpc.sendOpts = (opts) => SendOpts.from(opts);
|
|
35
|
+
})(rpc || (rpc = {}));
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Opts, SendOpts, rpc };
|
|
39
|
+
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","names":["opts: IngressCallOptions<I, O>","opts: IngressSendOptions<I>"],"sources":["../src/api.ts"],"sourcesContent":["import type {\n Service,\n VirtualObjectDefinitionFrom,\n Workflow,\n VirtualObject,\n ServiceDefinitionFrom,\n WorkflowDefinitionFrom,\n Serde,\n Duration,\n JournalValueCodec,\n} from \"@restatedev/restate-sdk-core\";\nimport { millisOrDurationToMillis } from \"@restatedev/restate-sdk-core\";\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A remote client for a Restate service.\n *\n * Use the following client to interact with services defined\n * - `serviceClient` to create a client for a service.\n * - `workflowClient` to create a client for a workflow.\n * - `objectClient` to create a client for a virtual object.\n *\n */\nexport interface Ingress {\n /**\n * Create a client from a {@link ServiceDefinition}.\n */\n serviceClient<D>(opts: ServiceDefinitionFrom<D>): IngressClient<Service<D>>;\n\n /**\n * Create a client from a {@link WorkflowDefinition}.\n *\n * @param key the key of the workflow.\n */\n workflowClient<D>(\n opts: WorkflowDefinitionFrom<D>,\n key: string\n ): IngressWorkflowClient<Workflow<D>>;\n\n /**\n * Create a client from a {@link VirtualObjectDefinition}.\n * @param key the key of the virtual object.\n */\n objectClient<D>(\n opts: VirtualObjectDefinitionFrom<D>,\n key: string\n ): IngressClient<VirtualObject<D>>;\n\n /**\n * Create a client from a {@link ServiceDefinition}.\n */\n serviceSendClient<D>(\n opts: ServiceDefinitionFrom<D>\n ): IngressSendClient<Service<D>>;\n\n /**\n * Create a client from a {@link VirtualObjectDefinition}.\n */\n objectSendClient<D>(\n opts: VirtualObjectDefinitionFrom<D>,\n key: string\n ): IngressSendClient<VirtualObject<D>>;\n\n /**\n * Resolve an awakeable from the ingress client.\n */\n resolveAwakeable<T>(id: string, payload?: T): Promise<void>;\n\n /**\n * Reject an awakeable from the ingress client.\n */\n rejectAwakeable(id: string, reason: string): Promise<void>;\n\n /**\n * Obtain the result of a service that was asynchronously submitted (via a sendClient).\n *\n * @param send either the send response or the workflow submission as obtained by the respective clients.\n */\n result<T>(send: Send<T> | WorkflowSubmission<T>): Promise<T>;\n}\n\nexport interface IngressCallOptions<I = unknown, O = unknown> {\n /**\n * Key to use for idempotency key.\n *\n * See https://docs.restate.dev/operate/invocation#invoke-a-handler-idempotently for more details.\n */\n idempotencyKey?: string;\n\n /**\n * Headers to attach to the request.\n */\n headers?: Record<string, string>;\n\n input?: Serde<I>;\n\n output?: Serde<O>;\n\n /**\n * Timeout to be used when executing the request. In milliseconds.\n *\n * Same as {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal#aborting_a_fetch_with_timeout_or_explicit_abort | AbortSignal.timeout()}.\n *\n * This field is exclusive with `signal`, and using both of them will result in a runtime failure.\n */\n timeout?: number;\n\n /**\n * Signal to abort the underlying `fetch` operation. See {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}.\n *\n * This field is exclusive with `timeout`, and using both of them will result in a runtime failure.\n */\n signal?: AbortSignal;\n}\n\nexport interface IngressSendOptions<I> extends IngressCallOptions<I, void> {\n /**\n * If set, the invocation will be enqueued now to be executed after the provided delay. In milliseconds.\n */\n delay?: number | Duration;\n}\n\nexport class Opts<I, O> {\n /**\n * Create a call configuration from the provided options.\n *\n * @param opts the call configuration\n */\n public static from<I = unknown, O = unknown>(\n opts: IngressCallOptions<I, O>\n ): Opts<I, O> {\n return new Opts(opts);\n }\n\n constructor(readonly opts: IngressCallOptions<I, O>) {}\n}\n\nexport class SendOpts<I = unknown> {\n /**\n * @param opts Create send options\n */\n public static from<I = unknown>(opts: IngressSendOptions<I>): SendOpts<I> {\n return new SendOpts(opts);\n }\n\n delay(): number | undefined {\n if (this.opts.delay !== undefined) {\n return millisOrDurationToMillis(this.opts.delay);\n }\n return undefined;\n }\n\n constructor(readonly opts: IngressSendOptions<I>) {}\n}\n\nexport type InferArgType<P> = P extends [infer A, ...any[]] ? A : unknown;\n\nexport type IngressClient<M> = {\n [K in keyof M as M[K] extends never ? never : K]: M[K] extends (\n arg: any,\n ...args: infer P\n ) => PromiseLike<infer O>\n ? (...args: [...P, ...[opts?: Opts<InferArgType<P>, O>]]) => PromiseLike<O>\n : never;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace rpc {\n export const opts = <I, O>(opts: IngressCallOptions<I, O>) => Opts.from(opts);\n\n export const sendOpts = <I>(opts: IngressSendOptions<I>) =>\n SendOpts.from(opts);\n}\n\n/**\n * Represents the output of a workflow.\n */\nexport interface Output<O> {\n /**\n * Whether the output is ready.\n */\n ready: boolean;\n\n /**\n * The output of the workflow.\n */\n result: O;\n}\n\n/**\n * Represents a successful workflow submission.\n *\n */\n/* eslint-disable-next-line @typescript-eslint/no-unused-vars */\nexport type WorkflowSubmission<T> = {\n /**\n * The invocation id of the workflow. You can use that id to\n * with the introspection tools (restate cli, logging, metrics)\n *\n */\n readonly invocationId: string;\n readonly status: \"Accepted\" | \"PreviouslyAccepted\";\n readonly attachable: true;\n};\n\n/**\n * A client for a workflow.\n *\n * This client represents the workflow definition, with the following additional methods:\n * - `workflowSubmit` to submit the workflow.\n * - `workflowAttach` to attach to the workflow and wait for its completion\n * - `workflowOutput` to check if the workflow's output is ready/available.\n *\n * Once a workflow is submitted, it can be attached to, and the output can be retrieved.\n *\n * @typeParam M the type of the workflow.\n */\nexport type IngressWorkflowClient<M> = Omit<\n {\n [K in keyof M as M[K] extends never ? never : K]: M[K] extends (\n arg: any,\n ...args: infer P\n ) => PromiseLike<infer O>\n ? (\n ...args: [...P, ...[opts?: Opts<InferArgType<P>, O>]]\n ) => PromiseLike<O>\n : never;\n } & {\n /**\n * Submit this workflow.\n *\n * This instructs restate to execute the 'run' handler of the workflow, idempotently.\n * The workflow will be executed asynchronously, and the promise will resolve when the workflow has been accepted.\n * Please note that submitting a workflow does not wait for it to completion, and it is safe to retry the submission,\n * in case of failure.\n *\n * @param argument the same argument type as defined by the 'run' handler.\n */\n workflowSubmit: M extends Record<string, unknown>\n ? M[\"run\"] extends (arg: any, ...args: infer I) => Promise<infer O>\n ? (\n ...args: [...I, ...[opts?: SendOpts<InferArgType<I>>]]\n ) => Promise<WorkflowSubmission<O>>\n : never\n : never;\n\n /**\n * Attach to this workflow.\n *\n * This instructs restate to attach to the workflow and wait for it to complete.\n * It is only possible to 'attach' to a workflow that has been previously submitted.\n * The promise will resolve when the workflow has completed either successfully with a result,\n * or be rejected with an error.\n * This operation is safe to retry many times, and it will always return the same result.\n *\n * @returns a promise that resolves when the workflow has completed.\n */\n workflowAttach: M extends Record<string, unknown>\n ? M[\"run\"] extends (...args: any) => Promise<infer O>\n ? (opts?: Opts<void, O>) => Promise<O>\n : never\n : never;\n\n /**\n * Try retrieving the output of this workflow.\n *\n * This instructs restate to check if the workflow's output is ready/available.\n * The returned Output object will have a 'ready' field set to true if the output is ready.\n * If the output is ready, the 'result' field will contain the output.\n * note: that this operation will not wait for the workflow to complete, to do so use 'workflowAttach'.\n *\n * @returns a promise that resolves if the workflow's output is ready/available.\n */\n workflowOutput: M extends Record<string, unknown>\n ? M[\"run\"] extends (...args: any) => Promise<infer O>\n ? (opts?: Opts<void, O>) => Promise<Output<O>>\n : never\n : never;\n },\n \"run\"\n>;\n\n/**\n * A send response.\n *\n * @typeParam T the type of the response.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Send<T = unknown> = {\n /**\n * The invocation id of the send.\n */\n invocationId: string;\n\n /**\n * The status of the send.\n */\n status: \"Accepted\" | \"PreviouslyAccepted\";\n\n attachable: boolean;\n};\n\nexport type IngressSendClient<M> = {\n [K in keyof M as M[K] extends never ? never : K]: M[K] extends (\n arg: any,\n ...args: infer P\n ) => infer O\n ? (\n ...args: [...P, ...[opts?: SendOpts<InferArgType<P>>]]\n ) => Promise<Send<O>>\n : never;\n};\n\nexport type ConnectionOpts = {\n /**\n * Restate ingress URL.\n * For example: http://localhost:8080\n */\n url: string;\n /**\n * Headers to attach on every request.\n * Use this to attach authentication headers.\n */\n headers?: Record<string, string>;\n\n /**\n * Codec to use for input/outputs. Check {@link JournalValueCodec} for more details\n *\n * @experimental\n */\n journalValueCodec?: JournalValueCodec;\n};\n"],"mappings":";;;AA2HA,IAAa,OAAb,MAAa,KAAW;;;;;;CAMtB,OAAc,KACZ,MACY;AACZ,SAAO,IAAI,KAAK,KAAK;;CAGvB,YAAY,AAASA,MAAgC;EAAhC;;;AAGvB,IAAa,WAAb,MAAa,SAAsB;;;;CAIjC,OAAc,KAAkB,MAA0C;AACxE,SAAO,IAAI,SAAS,KAAK;;CAG3B,QAA4B;AAC1B,MAAI,KAAK,KAAK,UAAU,OACtB,QAAO,yBAAyB,KAAK,KAAK,MAAM;;CAKpD,YAAY,AAASC,MAA6B;EAA7B;;;;;cAgBM,SAAmC,KAAK,KAAK,KAAK;kBAEjD,SAC1B,SAAS,KAAK,KAAK"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_api = require('./api.cjs');
|
|
3
|
+
const require_ingress = require('./ingress.cjs');
|
|
4
|
+
let __restatedev_restate_sdk_core = require("@restatedev/restate-sdk-core");
|
|
5
|
+
__restatedev_restate_sdk_core = require_rolldown_runtime.__toESM(__restatedev_restate_sdk_core);
|
|
6
|
+
|
|
7
|
+
exports.HttpCallError = require_ingress.HttpCallError;
|
|
8
|
+
exports.Opts = require_api.Opts;
|
|
9
|
+
exports.SendOpts = require_api.SendOpts;
|
|
10
|
+
exports.connect = require_ingress.connect;
|
|
11
|
+
Object.defineProperty(exports, 'rpc', {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return require_api.rpc;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, 'serde', {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return __restatedev_restate_sdk_core.serde;
|
|
21
|
+
}
|
|
22
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConnectionOpts, InferArgType, Ingress, IngressCallOptions, IngressClient, IngressSendClient, IngressSendOptions, IngressWorkflowClient, Opts, Output, Send, SendOpts, WorkflowSubmission, rpc } from "./api.cjs";
|
|
2
|
+
import { HttpCallError, connect } from "./ingress.cjs";
|
|
3
|
+
import { Duration, JournalValueCodec, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, serde } from "@restatedev/restate-sdk-core";
|
|
4
|
+
export { type ConnectionOpts, type Duration, HttpCallError, type InferArgType, type Ingress, type IngressCallOptions, type IngressClient, type IngressSendClient, type IngressSendOptions, type IngressWorkflowClient, type JournalValueCodec, Opts, type Output, type Send, SendOpts, type Serde, type Service, type ServiceDefinition, type ServiceDefinitionFrom, type VirtualObject, type VirtualObjectDefinition, type VirtualObjectDefinitionFrom, type Workflow, type WorkflowDefinition, type WorkflowDefinitionFrom, type WorkflowSubmission, connect, rpc, serde };
|