@temporal-contract/client 0.0.2 → 0.0.4
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/index.cjs +259 -102
- package/dist/index.d.cts +115 -99
- package/dist/index.d.mts +115 -99
- package/dist/index.mjs +236 -103
- package/package.json +26 -20
- package/.turbo/turbo-build.log +0 -17
- package/CHANGELOG.md +0 -9
- package/src/client.spec.ts +0 -564
- package/src/client.ts +0 -366
- package/src/errors.ts +0 -91
- package/src/index.ts +0 -9
- package/tsconfig.json +0 -9
- package/vitest.config.ts +0 -12
package/dist/index.cjs
CHANGED
|
@@ -1,87 +1,78 @@
|
|
|
1
1
|
let __temporalio_client = require("@temporalio/client");
|
|
2
|
+
let __swan_io_boxed = require("@swan-io/boxed");
|
|
2
3
|
|
|
3
4
|
//#region src/errors.ts
|
|
4
5
|
/**
|
|
5
|
-
* Base
|
|
6
|
+
* Base class for all typed client errors with boxed pattern
|
|
6
7
|
*/
|
|
7
8
|
var TypedClientError = class extends Error {
|
|
8
9
|
constructor(message) {
|
|
9
10
|
super(message);
|
|
10
|
-
this.name =
|
|
11
|
+
this.name = this.constructor.name;
|
|
11
12
|
if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
|
|
12
13
|
}
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Thrown when a workflow is not found in the contract
|
|
16
17
|
*/
|
|
17
18
|
var WorkflowNotFoundError = class extends TypedClientError {
|
|
18
|
-
constructor(workflowName, availableWorkflows
|
|
19
|
-
|
|
20
|
-
super(message);
|
|
19
|
+
constructor(workflowName, availableWorkflows) {
|
|
20
|
+
super(`Workflow "${workflowName}" not found in contract. Available workflows: ${availableWorkflows.join(", ")}`);
|
|
21
21
|
this.workflowName = workflowName;
|
|
22
22
|
this.availableWorkflows = availableWorkflows;
|
|
23
|
-
this.name = "WorkflowNotFoundError";
|
|
24
23
|
}
|
|
25
24
|
};
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* Thrown when workflow input or output validation fails
|
|
28
27
|
*/
|
|
29
28
|
var WorkflowValidationError = class extends TypedClientError {
|
|
30
|
-
constructor(workflowName,
|
|
31
|
-
|
|
32
|
-
super(`Validation failed for workflow "${workflowName}" ${phase}: ${message}`);
|
|
29
|
+
constructor(workflowName, direction, issues) {
|
|
30
|
+
super(`Validation failed for workflow "${workflowName}" ${direction}: ${JSON.stringify(issues)}`);
|
|
33
31
|
this.workflowName = workflowName;
|
|
34
|
-
this.
|
|
32
|
+
this.direction = direction;
|
|
35
33
|
this.issues = issues;
|
|
36
|
-
this.name = "WorkflowValidationError";
|
|
37
34
|
}
|
|
38
35
|
};
|
|
39
36
|
/**
|
|
40
|
-
*
|
|
37
|
+
* Thrown when query input or output validation fails
|
|
41
38
|
*/
|
|
42
39
|
var QueryValidationError = class extends TypedClientError {
|
|
43
|
-
constructor(queryName,
|
|
44
|
-
|
|
45
|
-
super(`Validation failed for query "${queryName}" ${phase}: ${message}`);
|
|
40
|
+
constructor(queryName, direction, issues) {
|
|
41
|
+
super(`Validation failed for query "${queryName}" ${direction}: ${JSON.stringify(issues)}`);
|
|
46
42
|
this.queryName = queryName;
|
|
47
|
-
this.
|
|
43
|
+
this.direction = direction;
|
|
48
44
|
this.issues = issues;
|
|
49
|
-
this.name = "QueryValidationError";
|
|
50
45
|
}
|
|
51
46
|
};
|
|
52
47
|
/**
|
|
53
|
-
*
|
|
48
|
+
* Thrown when signal input validation fails
|
|
54
49
|
*/
|
|
55
50
|
var SignalValidationError = class extends TypedClientError {
|
|
56
51
|
constructor(signalName, issues) {
|
|
57
|
-
|
|
58
|
-
super(`Validation failed for signal "${signalName}" input: ${message}`);
|
|
52
|
+
super(`Validation failed for signal "${signalName}": ${JSON.stringify(issues)}`);
|
|
59
53
|
this.signalName = signalName;
|
|
60
54
|
this.issues = issues;
|
|
61
|
-
this.name = "SignalValidationError";
|
|
62
55
|
}
|
|
63
56
|
};
|
|
64
57
|
/**
|
|
65
|
-
*
|
|
58
|
+
* Thrown when update input or output validation fails
|
|
66
59
|
*/
|
|
67
60
|
var UpdateValidationError = class extends TypedClientError {
|
|
68
|
-
constructor(updateName,
|
|
69
|
-
|
|
70
|
-
super(`Validation failed for update "${updateName}" ${phase}: ${message}`);
|
|
61
|
+
constructor(updateName, direction, issues) {
|
|
62
|
+
super(`Validation failed for update "${updateName}" ${direction}: ${JSON.stringify(issues)}`);
|
|
71
63
|
this.updateName = updateName;
|
|
72
|
-
this.
|
|
64
|
+
this.direction = direction;
|
|
73
65
|
this.issues = issues;
|
|
74
|
-
this.name = "UpdateValidationError";
|
|
75
66
|
}
|
|
76
67
|
};
|
|
77
68
|
|
|
78
69
|
//#endregion
|
|
79
70
|
//#region src/client.ts
|
|
80
71
|
/**
|
|
81
|
-
* Typed Temporal client based on a contract
|
|
72
|
+
* Typed Temporal client with Result/Future pattern based on a contract
|
|
82
73
|
*
|
|
83
74
|
* Provides type-safe methods to start and execute workflows
|
|
84
|
-
* defined in the contract.
|
|
75
|
+
* defined in the contract, with explicit error handling using Result pattern.
|
|
85
76
|
*/
|
|
86
77
|
var TypedClient = class TypedClient {
|
|
87
78
|
constructor(contract, client) {
|
|
@@ -89,7 +80,7 @@ var TypedClient = class TypedClient {
|
|
|
89
80
|
this.client = client;
|
|
90
81
|
}
|
|
91
82
|
/**
|
|
92
|
-
* Create a typed Temporal client from a contract
|
|
83
|
+
* Create a typed Temporal client with boxed pattern from a contract
|
|
93
84
|
*
|
|
94
85
|
* @example
|
|
95
86
|
* ```ts
|
|
@@ -101,7 +92,12 @@ var TypedClient = class TypedClient {
|
|
|
101
92
|
*
|
|
102
93
|
* const result = await client.executeWorkflow('processOrder', {
|
|
103
94
|
* workflowId: 'order-123',
|
|
104
|
-
* args:
|
|
95
|
+
* args: { ... },
|
|
96
|
+
* }).toPromise();
|
|
97
|
+
*
|
|
98
|
+
* result.match({
|
|
99
|
+
* Ok: (output) => console.log('Success:', output),
|
|
100
|
+
* Error: (error) => console.error('Failed:', error),
|
|
105
101
|
* });
|
|
106
102
|
* ```
|
|
107
103
|
*/
|
|
@@ -109,128 +105,289 @@ var TypedClient = class TypedClient {
|
|
|
109
105
|
return new TypedClient(contract, new __temporalio_client.Client(options));
|
|
110
106
|
}
|
|
111
107
|
/**
|
|
112
|
-
* Start a workflow and return a typed handle
|
|
108
|
+
* Start a workflow and return a typed handle with Future pattern
|
|
113
109
|
*
|
|
114
110
|
* @example
|
|
115
111
|
* ```ts
|
|
116
|
-
* const
|
|
112
|
+
* const handleResult = await client.startWorkflow('processOrder', {
|
|
117
113
|
* workflowId: 'order-123',
|
|
118
|
-
* args:
|
|
114
|
+
* args: { orderId: 'ORD-123' },
|
|
119
115
|
* workflowExecutionTimeout: '1 day',
|
|
120
116
|
* retry: { maximumAttempts: 3 },
|
|
121
|
-
* });
|
|
117
|
+
* }).toPromise();
|
|
122
118
|
*
|
|
123
|
-
*
|
|
119
|
+
* handleResult.match({
|
|
120
|
+
* Ok: async (handle) => {
|
|
121
|
+
* const result = await handle.result().toPromise();
|
|
122
|
+
* // ... handle result
|
|
123
|
+
* },
|
|
124
|
+
* Error: (error) => console.error('Failed to start:', error),
|
|
125
|
+
* });
|
|
124
126
|
* ```
|
|
125
127
|
*/
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
128
|
+
startWorkflow(workflowName, { args, ...temporalOptions }) {
|
|
129
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
130
|
+
const definition = this.contract.workflows[workflowName];
|
|
131
|
+
if (!definition) {
|
|
132
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowNotFoundError(String(workflowName), Object.keys(this.contract.workflows))));
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
(async () => {
|
|
136
|
+
const inputResult = await definition.input["~standard"].validate(args);
|
|
137
|
+
if (inputResult.issues) {
|
|
138
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowValidationError(String(workflowName), "input", inputResult.issues)));
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const validatedInput = inputResult.value;
|
|
142
|
+
try {
|
|
143
|
+
const handle = await this.client.workflow.start(workflowName, {
|
|
144
|
+
...temporalOptions,
|
|
145
|
+
taskQueue: this.contract.taskQueue,
|
|
146
|
+
args: [validatedInput]
|
|
147
|
+
});
|
|
148
|
+
const typedHandle = this.createTypedHandle(handle, definition);
|
|
149
|
+
resolve(__swan_io_boxed.Result.Ok(typedHandle));
|
|
150
|
+
} catch (error) {
|
|
151
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Failed to start workflow: ${error instanceof Error ? error.message : String(error)}`)));
|
|
152
|
+
}
|
|
153
|
+
})();
|
|
136
154
|
});
|
|
137
|
-
return this.createTypedHandle(handle, definition);
|
|
138
155
|
}
|
|
139
156
|
/**
|
|
140
|
-
* Execute a workflow (start and wait for result)
|
|
157
|
+
* Execute a workflow (start and wait for result) with Future/Result pattern
|
|
141
158
|
*
|
|
142
159
|
* @example
|
|
143
160
|
* ```ts
|
|
144
161
|
* const result = await client.executeWorkflow('processOrder', {
|
|
145
162
|
* workflowId: 'order-123',
|
|
146
|
-
* args:
|
|
163
|
+
* args: { orderId: 'ORD-123' },
|
|
147
164
|
* workflowExecutionTimeout: '1 day',
|
|
148
165
|
* retry: { maximumAttempts: 3 },
|
|
149
|
-
* });
|
|
166
|
+
* }).toPromise();
|
|
150
167
|
*
|
|
151
|
-
*
|
|
168
|
+
* result.match({
|
|
169
|
+
* Ok: (output) => console.log('Order processed:', output.status),
|
|
170
|
+
* Error: (error) => console.error('Processing failed:', error),
|
|
171
|
+
* });
|
|
152
172
|
* ```
|
|
153
173
|
*/
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
174
|
+
executeWorkflow(workflowName, { args, ...temporalOptions }) {
|
|
175
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
176
|
+
const definition = this.contract.workflows[workflowName];
|
|
177
|
+
if (!definition) {
|
|
178
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowNotFoundError(String(workflowName), Object.keys(this.contract.workflows))));
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
(async () => {
|
|
182
|
+
const inputResult = await definition.input["~standard"].validate(args);
|
|
183
|
+
if (inputResult.issues) {
|
|
184
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowValidationError(String(workflowName), "input", inputResult.issues)));
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const validatedInput = inputResult.value;
|
|
188
|
+
try {
|
|
189
|
+
const result = await this.client.workflow.execute(workflowName, {
|
|
190
|
+
...temporalOptions,
|
|
191
|
+
taskQueue: this.contract.taskQueue,
|
|
192
|
+
args: [validatedInput]
|
|
193
|
+
});
|
|
194
|
+
const outputResult = await definition.output["~standard"].validate(result);
|
|
195
|
+
if (outputResult.issues) {
|
|
196
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowValidationError(String(workflowName), "output", outputResult.issues)));
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
resolve(__swan_io_boxed.Result.Ok(outputResult.value));
|
|
200
|
+
} catch (error) {
|
|
201
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Failed to execute workflow: ${error instanceof Error ? error.message : String(error)}`)));
|
|
202
|
+
}
|
|
203
|
+
})();
|
|
164
204
|
});
|
|
165
|
-
const outputResult = await definition.output["~standard"].validate(result);
|
|
166
|
-
if (outputResult.issues) throw new WorkflowValidationError(String(workflowName), "output", outputResult.issues);
|
|
167
|
-
return outputResult.value;
|
|
168
205
|
}
|
|
169
206
|
/**
|
|
170
|
-
* Get a handle to an existing workflow
|
|
207
|
+
* Get a handle to an existing workflow with Future/Result pattern
|
|
171
208
|
*
|
|
172
209
|
* @example
|
|
173
210
|
* ```ts
|
|
174
|
-
* const
|
|
175
|
-
*
|
|
211
|
+
* const handleResult = await client.getHandle('processOrder', 'order-123').toPromise();
|
|
212
|
+
* handleResult.match({
|
|
213
|
+
* Ok: async (handle) => {
|
|
214
|
+
* const result = await handle.result().toPromise();
|
|
215
|
+
* // ... handle result
|
|
216
|
+
* },
|
|
217
|
+
* Error: (error) => console.error('Failed to get handle:', error),
|
|
218
|
+
* });
|
|
176
219
|
* ```
|
|
177
220
|
*/
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
221
|
+
getHandle(workflowName, workflowId) {
|
|
222
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
223
|
+
const definition = this.contract.workflows[workflowName];
|
|
224
|
+
if (!definition) {
|
|
225
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowNotFoundError(String(workflowName), Object.keys(this.contract.workflows))));
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
const handle = this.client.workflow.getHandle(workflowId);
|
|
230
|
+
const typedHandle = this.createTypedHandle(handle, definition);
|
|
231
|
+
resolve(__swan_io_boxed.Result.Ok(typedHandle));
|
|
232
|
+
} catch (error) {
|
|
233
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Failed to get workflow handle: ${error instanceof Error ? error.message : String(error)}`)));
|
|
234
|
+
}
|
|
235
|
+
});
|
|
183
236
|
}
|
|
184
237
|
createTypedHandle(handle, definition) {
|
|
185
238
|
const queries = {};
|
|
186
|
-
for (const [queryName, queryDef] of Object.entries(definition.queries ?? {})) queries[queryName] =
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
239
|
+
for (const [queryName, queryDef] of Object.entries(definition.queries ?? {})) queries[queryName] = (args) => {
|
|
240
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
241
|
+
(async () => {
|
|
242
|
+
const inputResult = await queryDef.input["~standard"].validate(args);
|
|
243
|
+
if (inputResult.issues) {
|
|
244
|
+
resolve(__swan_io_boxed.Result.Error(new QueryValidationError(queryName, "input", inputResult.issues)));
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
const result = await handle.query(queryName, inputResult.value);
|
|
249
|
+
const outputResult = await queryDef.output["~standard"].validate(result);
|
|
250
|
+
if (outputResult.issues) {
|
|
251
|
+
resolve(__swan_io_boxed.Result.Error(new QueryValidationError(queryName, "output", outputResult.issues)));
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
resolve(__swan_io_boxed.Result.Ok(outputResult.value));
|
|
255
|
+
} catch (error) {
|
|
256
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Query failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
257
|
+
}
|
|
258
|
+
})();
|
|
259
|
+
});
|
|
193
260
|
};
|
|
194
261
|
const signals = {};
|
|
195
|
-
for (const [signalName, signalDef] of Object.entries(definition.signals ?? {})) signals[signalName] =
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
262
|
+
for (const [signalName, signalDef] of Object.entries(definition.signals ?? {})) signals[signalName] = (args) => {
|
|
263
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
264
|
+
(async () => {
|
|
265
|
+
const inputResult = await signalDef.input["~standard"].validate(args);
|
|
266
|
+
if (inputResult.issues) {
|
|
267
|
+
resolve(__swan_io_boxed.Result.Error(new SignalValidationError(signalName, inputResult.issues)));
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
try {
|
|
271
|
+
await handle.signal(signalName, inputResult.value);
|
|
272
|
+
resolve(__swan_io_boxed.Result.Ok(void 0));
|
|
273
|
+
} catch (error) {
|
|
274
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Signal failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
275
|
+
}
|
|
276
|
+
})();
|
|
277
|
+
});
|
|
199
278
|
};
|
|
200
279
|
const updates = {};
|
|
201
|
-
for (const [updateName, updateDef] of Object.entries(definition.updates ?? {})) updates[updateName] =
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
280
|
+
for (const [updateName, updateDef] of Object.entries(definition.updates ?? {})) updates[updateName] = (args) => {
|
|
281
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
282
|
+
(async () => {
|
|
283
|
+
const inputResult = await updateDef.input["~standard"].validate(args);
|
|
284
|
+
if (inputResult.issues) {
|
|
285
|
+
resolve(__swan_io_boxed.Result.Error(new UpdateValidationError(updateName, "input", inputResult.issues)));
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
try {
|
|
289
|
+
const result = await handle.executeUpdate(updateName, { args: [inputResult.value] });
|
|
290
|
+
const outputResult = await updateDef.output["~standard"].validate(result);
|
|
291
|
+
if (outputResult.issues) {
|
|
292
|
+
resolve(__swan_io_boxed.Result.Error(new UpdateValidationError(updateName, "output", outputResult.issues)));
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
resolve(__swan_io_boxed.Result.Ok(outputResult.value));
|
|
296
|
+
} catch (error) {
|
|
297
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Update failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
298
|
+
}
|
|
299
|
+
})();
|
|
300
|
+
});
|
|
208
301
|
};
|
|
209
302
|
return {
|
|
210
303
|
workflowId: handle.workflowId,
|
|
211
304
|
queries,
|
|
212
305
|
signals,
|
|
213
306
|
updates,
|
|
214
|
-
result:
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
307
|
+
result: () => {
|
|
308
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
309
|
+
(async () => {
|
|
310
|
+
try {
|
|
311
|
+
const result = await handle.result();
|
|
312
|
+
const outputResult = await definition.output["~standard"].validate(result);
|
|
313
|
+
if (outputResult.issues) {
|
|
314
|
+
resolve(__swan_io_boxed.Result.Error(new WorkflowValidationError(handle.workflowId, "output", outputResult.issues)));
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
resolve(__swan_io_boxed.Result.Ok(outputResult.value));
|
|
318
|
+
} catch (error) {
|
|
319
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Workflow execution failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
320
|
+
}
|
|
321
|
+
})();
|
|
322
|
+
});
|
|
323
|
+
},
|
|
324
|
+
terminate: (reason) => {
|
|
325
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
326
|
+
(async () => {
|
|
327
|
+
try {
|
|
328
|
+
await handle.terminate(reason);
|
|
329
|
+
resolve(__swan_io_boxed.Result.Ok(void 0));
|
|
330
|
+
} catch (error) {
|
|
331
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Terminate failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
332
|
+
}
|
|
333
|
+
})();
|
|
334
|
+
});
|
|
219
335
|
},
|
|
220
|
-
|
|
221
|
-
|
|
336
|
+
cancel: () => {
|
|
337
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
338
|
+
(async () => {
|
|
339
|
+
try {
|
|
340
|
+
await handle.cancel();
|
|
341
|
+
resolve(__swan_io_boxed.Result.Ok(void 0));
|
|
342
|
+
} catch (error) {
|
|
343
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Cancel failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
344
|
+
}
|
|
345
|
+
})();
|
|
346
|
+
});
|
|
222
347
|
},
|
|
223
|
-
|
|
224
|
-
|
|
348
|
+
describe: () => {
|
|
349
|
+
return __swan_io_boxed.Future.make((resolve) => {
|
|
350
|
+
(async () => {
|
|
351
|
+
try {
|
|
352
|
+
const description = await handle.describe();
|
|
353
|
+
resolve(__swan_io_boxed.Result.Ok(description));
|
|
354
|
+
} catch (error) {
|
|
355
|
+
resolve(__swan_io_boxed.Result.Error(new TypedClientError(`Describe failed: ${error instanceof Error ? error.message : String(error)}`)));
|
|
356
|
+
}
|
|
357
|
+
})();
|
|
358
|
+
});
|
|
225
359
|
},
|
|
226
|
-
describe: () => handle.describe(),
|
|
227
360
|
fetchHistory: () => handle.fetchHistory()
|
|
228
361
|
};
|
|
229
362
|
}
|
|
230
363
|
};
|
|
231
364
|
|
|
232
365
|
//#endregion
|
|
366
|
+
Object.defineProperty(exports, 'AsyncData', {
|
|
367
|
+
enumerable: true,
|
|
368
|
+
get: function () {
|
|
369
|
+
return __swan_io_boxed.AsyncData;
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
Object.defineProperty(exports, 'Future', {
|
|
373
|
+
enumerable: true,
|
|
374
|
+
get: function () {
|
|
375
|
+
return __swan_io_boxed.Future;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
Object.defineProperty(exports, 'Option', {
|
|
379
|
+
enumerable: true,
|
|
380
|
+
get: function () {
|
|
381
|
+
return __swan_io_boxed.Option;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
233
384
|
exports.QueryValidationError = QueryValidationError;
|
|
385
|
+
Object.defineProperty(exports, 'Result', {
|
|
386
|
+
enumerable: true,
|
|
387
|
+
get: function () {
|
|
388
|
+
return __swan_io_boxed.Result;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
234
391
|
exports.SignalValidationError = SignalValidationError;
|
|
235
392
|
exports.TypedClient = TypedClient;
|
|
236
393
|
exports.TypedClientError = TypedClientError;
|