simplex-ts 1.1.11 → 2.0.0
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/README.md +163 -56
- package/dist/SimplexClient.d.ts +13 -0
- package/dist/SimplexClient.d.ts.map +1 -0
- package/dist/SimplexClient.js +31 -0
- package/dist/SimplexClient.js.map +1 -0
- package/dist/client/HttpClient.d.ts +33 -0
- package/dist/client/HttpClient.d.ts.map +1 -0
- package/dist/client/HttpClient.js +149 -0
- package/dist/client/HttpClient.js.map +1 -0
- package/dist/errors/index.d.ts +22 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +55 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +4 -41
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -378
- package/dist/index.js.map +1 -1
- package/dist/resources/Agent.d.ts +13 -0
- package/dist/resources/Agent.d.ts.map +1 -0
- package/dist/resources/Agent.js +53 -0
- package/dist/resources/Agent.js.map +1 -0
- package/dist/resources/Workflow.d.ts +38 -0
- package/dist/resources/Workflow.d.ts.map +1 -0
- package/dist/resources/Workflow.js +124 -0
- package/dist/resources/Workflow.js.map +1 -0
- package/dist/types/index.d.ts +80 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +22 -26
- package/dist/index.d.mts +0 -41
- package/dist/index.mjs +0 -345
- package/dist/index.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,381 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
Simplex: () => Simplex,
|
|
34
|
-
greet: () => greet
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(index_exports);
|
|
37
|
-
var import_axios = __toESM(require("axios"));
|
|
38
|
-
function greet(name) {
|
|
39
|
-
return `Hello, ${name}!`;
|
|
40
|
-
}
|
|
41
|
-
var BASE_URL = "https://api.simplex.sh";
|
|
42
|
-
var Simplex = class {
|
|
43
|
-
constructor(apiKey) {
|
|
44
|
-
this.sessionId = null;
|
|
45
|
-
this.connectUrl = null;
|
|
46
|
-
this.apiKey = apiKey;
|
|
47
|
-
}
|
|
48
|
-
async makeRequest(method, endpoint, data, params) {
|
|
49
|
-
try {
|
|
50
|
-
console.log(`Making ${method.toUpperCase()} request to ${endpoint}`);
|
|
51
|
-
const formData = new FormData();
|
|
52
|
-
if (data) {
|
|
53
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
54
|
-
if (value !== void 0 && value !== null) {
|
|
55
|
-
formData.append(key, value.toString());
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
const response = await (0, import_axios.default)({
|
|
60
|
-
method,
|
|
61
|
-
url: `${BASE_URL}${endpoint}`,
|
|
62
|
-
data: method === "post" ? formData : void 0,
|
|
63
|
-
params: method === "get" ? params : void 0,
|
|
64
|
-
headers: {
|
|
65
|
-
"x-api-key": this.apiKey,
|
|
66
|
-
...method === "post" ? { "Content-Type": "multipart/form-data" } : {}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
const responseData = response.data;
|
|
70
|
-
if (endpoint === "/get_dialog_message") {
|
|
71
|
-
if (!("message" in responseData)) {
|
|
72
|
-
throw new Error(responseData.error || "Request failed");
|
|
73
|
-
}
|
|
74
|
-
return responseData;
|
|
75
|
-
}
|
|
76
|
-
if (endpoint === "/goto" || endpoint === "/hover") {
|
|
77
|
-
if (!("succeeded" in responseData)) {
|
|
78
|
-
throw new Error('Response data is missing the "succeeded" field');
|
|
79
|
-
}
|
|
80
|
-
return responseData;
|
|
81
|
-
}
|
|
82
|
-
if (endpoint === "/get_network_response") {
|
|
83
|
-
if (!("status" in responseData)) {
|
|
84
|
-
throw new Error("It looks like the get_network_response action failed to return a response. Did you set your api_key when creating the Simplex class?");
|
|
85
|
-
} else if (responseData.status == "success") {
|
|
86
|
-
return responseData;
|
|
87
|
-
} else {
|
|
88
|
-
throw new Error(`Failed to get network response: ${responseData.error}`);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (!responseData.succeeded && !(endpoint === "/create_session" && responseData.session_id)) {
|
|
92
|
-
const errorMessage = responseData.error || "Request failed";
|
|
93
|
-
console.error("API request failed:", errorMessage);
|
|
94
|
-
throw new Error(errorMessage);
|
|
95
|
-
}
|
|
96
|
-
return responseData;
|
|
97
|
-
} catch (error) {
|
|
98
|
-
const axiosError = error;
|
|
99
|
-
if (axiosError.response) {
|
|
100
|
-
const errorMessage = axiosError.response.data?.error || String(error);
|
|
101
|
-
console.error("Axios error:", {
|
|
102
|
-
status: axiosError.response.status,
|
|
103
|
-
statusText: axiosError.response.statusText,
|
|
104
|
-
data: axiosError.response.data,
|
|
105
|
-
message: errorMessage
|
|
106
|
-
});
|
|
107
|
-
throw new Error(`Request failed: ${errorMessage}`);
|
|
108
|
-
}
|
|
109
|
-
console.error("Unexpected error:", error);
|
|
110
|
-
throw error;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async createSession(showInConsole = true, proxies = true, workflowName, sessionData) {
|
|
114
|
-
const data = {
|
|
115
|
-
proxies,
|
|
116
|
-
workflow_name: workflowName
|
|
117
|
-
};
|
|
118
|
-
if (this.sessionId) {
|
|
119
|
-
throw new Error("A session is already active. Please close the current session before creating a new one.");
|
|
120
|
-
}
|
|
121
|
-
if (sessionData) {
|
|
122
|
-
if (typeof sessionData === "string") {
|
|
123
|
-
try {
|
|
124
|
-
data.session_data = JSON.stringify(JSON.parse(sessionData));
|
|
125
|
-
} catch {
|
|
126
|
-
throw new Error("File system operations are not supported in this environment");
|
|
127
|
-
}
|
|
128
|
-
} else {
|
|
129
|
-
data.session_data = JSON.stringify(sessionData);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
const response = await this.makeRequest("post", "/create_session", data);
|
|
133
|
-
if (!response.session_id) {
|
|
134
|
-
throw new Error("Session creation failed: No session ID returned");
|
|
135
|
-
}
|
|
136
|
-
this.sessionId = response.session_id;
|
|
137
|
-
this.connectUrl = response.connect_url || null;
|
|
138
|
-
if (showInConsole && response.livestream_url) {
|
|
139
|
-
console.log(`Livestream URL: ${response.livestream_url}`);
|
|
140
|
-
}
|
|
141
|
-
return [response.session_id, response.livestream_url || ""];
|
|
142
|
-
}
|
|
143
|
-
async goto(url, cdpUrl) {
|
|
144
|
-
if (!cdpUrl && !this.sessionId) {
|
|
145
|
-
throw new Error(`Must call createSession before calling goto with url='${url}'`);
|
|
146
|
-
}
|
|
147
|
-
if (!url.startsWith("http://") && !url.startsWith("https://")) {
|
|
148
|
-
url = "https://" + url;
|
|
149
|
-
}
|
|
150
|
-
const data = {
|
|
151
|
-
url,
|
|
152
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
153
|
-
};
|
|
154
|
-
await this.makeRequest("post", "/goto", data);
|
|
155
|
-
}
|
|
156
|
-
async click(elementDescription, cdpUrl) {
|
|
157
|
-
if (!cdpUrl && !this.sessionId) {
|
|
158
|
-
throw new Error(`Must call createSession before calling click with elementDescription='${elementDescription}'`);
|
|
159
|
-
}
|
|
160
|
-
const data = {
|
|
161
|
-
element_description: elementDescription,
|
|
162
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
163
|
-
};
|
|
164
|
-
const response = await this.makeRequest("post", "/click", data);
|
|
165
|
-
return response.element_clicked || "";
|
|
166
|
-
}
|
|
167
|
-
async hover(elementDescription, cdpUrl) {
|
|
168
|
-
if (!cdpUrl && !this.sessionId) {
|
|
169
|
-
throw new Error(`Must call createSession before calling click with elementDescription='${elementDescription}'`);
|
|
170
|
-
}
|
|
171
|
-
const data = {
|
|
172
|
-
element_description: elementDescription,
|
|
173
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
174
|
-
};
|
|
175
|
-
await this.makeRequest("post", "/hover", data);
|
|
176
|
-
}
|
|
177
|
-
async scrollToElement(elementDescription, cdpUrl) {
|
|
178
|
-
if (!cdpUrl && !this.sessionId) {
|
|
179
|
-
throw new Error(`Must call createSession before calling click with elementDescription='${elementDescription}'`);
|
|
180
|
-
}
|
|
181
|
-
const data = {
|
|
182
|
-
element_description: elementDescription,
|
|
183
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
184
|
-
};
|
|
185
|
-
await this.makeRequest("post", "/scroll_to_element", data);
|
|
186
|
-
}
|
|
187
|
-
async getNetworkResponse(url, cdpUrl) {
|
|
188
|
-
if (!cdpUrl && !this.sessionId) {
|
|
189
|
-
throw new Error(`Must call createSession before calling getNetworkResponse with url='${url}'`);
|
|
190
|
-
}
|
|
191
|
-
const data = {
|
|
192
|
-
url,
|
|
193
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
194
|
-
};
|
|
195
|
-
const response = await this.makeRequest("post", "/get_network_response", data);
|
|
196
|
-
return response.response || "";
|
|
197
|
-
}
|
|
198
|
-
async type(text, cdpUrl) {
|
|
199
|
-
if (!cdpUrl && !this.sessionId) {
|
|
200
|
-
throw new Error(`Must call createSession before calling type with text='${text}'`);
|
|
201
|
-
}
|
|
202
|
-
const data = {
|
|
203
|
-
text,
|
|
204
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
205
|
-
};
|
|
206
|
-
await this.makeRequest("post", "/type", data);
|
|
207
|
-
}
|
|
208
|
-
async pressEnter(cdpUrl) {
|
|
209
|
-
if (!cdpUrl && !this.sessionId) {
|
|
210
|
-
throw new Error("Must call createSession before calling pressEnter");
|
|
211
|
-
}
|
|
212
|
-
const data = cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId };
|
|
213
|
-
await this.makeRequest("post", "/press_enter", data);
|
|
214
|
-
}
|
|
215
|
-
async pressTab(cdpUrl) {
|
|
216
|
-
if (!cdpUrl && !this.sessionId) {
|
|
217
|
-
throw new Error("Must call createSession before calling pressTab");
|
|
218
|
-
}
|
|
219
|
-
const data = cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId };
|
|
220
|
-
await this.makeRequest("post", "/press_tab", data);
|
|
221
|
-
}
|
|
222
|
-
async deleteText(cdpUrl) {
|
|
223
|
-
if (!cdpUrl && !this.sessionId) {
|
|
224
|
-
throw new Error("Must call createSession before calling deleteText");
|
|
225
|
-
}
|
|
226
|
-
const data = cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId };
|
|
227
|
-
await this.makeRequest("post", "/delete_text", data);
|
|
228
|
-
}
|
|
229
|
-
async extractBbox(elementDescription, cdpUrl) {
|
|
230
|
-
if (!cdpUrl && !this.sessionId) {
|
|
231
|
-
throw new Error(`Must call createSession before calling extractBbox with elementDescription='${elementDescription}'`);
|
|
232
|
-
}
|
|
233
|
-
const params = {
|
|
234
|
-
element_description: elementDescription,
|
|
235
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
236
|
-
};
|
|
237
|
-
const response = await this.makeRequest("get", "/extract-bbox", void 0, params);
|
|
238
|
-
return response.bbox;
|
|
239
|
-
}
|
|
240
|
-
async extractText(elementDescription, cdpUrl) {
|
|
241
|
-
if (!cdpUrl && !this.sessionId) {
|
|
242
|
-
throw new Error(`Must call createSession before calling extractText with elementDescription='${elementDescription}'`);
|
|
243
|
-
}
|
|
244
|
-
const data = {
|
|
245
|
-
element_description: elementDescription,
|
|
246
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
247
|
-
};
|
|
248
|
-
const response = await this.makeRequest("post", "/extract-text", data);
|
|
249
|
-
return response.text || "";
|
|
250
|
-
}
|
|
251
|
-
async scroll(pixels, cdpUrl) {
|
|
252
|
-
if (!cdpUrl && !this.sessionId) {
|
|
253
|
-
throw new Error(`Must call createSession before calling scroll with pixels=${pixels}`);
|
|
254
|
-
}
|
|
255
|
-
const data = {
|
|
256
|
-
pixels,
|
|
257
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
258
|
-
};
|
|
259
|
-
await this.makeRequest("post", "/scroll", data);
|
|
260
|
-
}
|
|
261
|
-
async wait(milliseconds, cdpUrl) {
|
|
262
|
-
if (!cdpUrl && !this.sessionId) {
|
|
263
|
-
throw new Error(`Must call createSession before calling wait with milliseconds=${milliseconds}`);
|
|
264
|
-
}
|
|
265
|
-
const data = {
|
|
266
|
-
milliseconds,
|
|
267
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
268
|
-
};
|
|
269
|
-
await this.makeRequest("post", "/wait", data);
|
|
270
|
-
}
|
|
271
|
-
async clickAndUpload(elementDescription, filePathOrCallable) {
|
|
272
|
-
if (!this.sessionId) {
|
|
273
|
-
throw new Error(`Must call createSession before calling clickAndUpload with elementDescription='${elementDescription}'`);
|
|
274
|
-
}
|
|
275
|
-
if (typeof filePathOrCallable !== "string" && typeof filePathOrCallable !== "function") {
|
|
276
|
-
throw new TypeError(`filePathOrCallable must be either a string or a callable, not a ${typeof filePathOrCallable}`);
|
|
277
|
-
}
|
|
278
|
-
const formData = new FormData();
|
|
279
|
-
formData.append("element_description", elementDescription);
|
|
280
|
-
formData.append("session_id", this.sessionId);
|
|
281
|
-
if (typeof filePathOrCallable === "string") {
|
|
282
|
-
throw new Error("File system operations are not supported in this environment");
|
|
283
|
-
} else {
|
|
284
|
-
const blob = filePathOrCallable();
|
|
285
|
-
formData.append("file", blob, "file");
|
|
286
|
-
}
|
|
287
|
-
await this.makeRequest("post", "/click_and_upload", formData, void 0);
|
|
288
|
-
}
|
|
289
|
-
async clickAndDownload(elementDescription) {
|
|
290
|
-
if (!this.sessionId) {
|
|
291
|
-
throw new Error(`Must call createSession before calling clickAndDownload with elementDescription='${elementDescription}'`);
|
|
292
|
-
}
|
|
293
|
-
const data = {
|
|
294
|
-
element_description: elementDescription,
|
|
295
|
-
session_id: this.sessionId
|
|
296
|
-
};
|
|
297
|
-
const response = await this.makeRequest("post", "/click_and_download", data);
|
|
298
|
-
return [response.b64 || "", response.filename || ""];
|
|
299
|
-
}
|
|
300
|
-
async exists(elementDescription, cdpUrl) {
|
|
301
|
-
if (!cdpUrl && !this.sessionId) {
|
|
302
|
-
throw new Error(`Must call createSession before calling exists with elementDescription='${elementDescription}'`);
|
|
303
|
-
}
|
|
304
|
-
const data = {
|
|
305
|
-
element_description: elementDescription,
|
|
306
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
307
|
-
};
|
|
308
|
-
const response = await this.makeRequest("post", "/exists", data);
|
|
309
|
-
return [response.exists || false, response.reasoning || ""];
|
|
310
|
-
}
|
|
311
|
-
async getPageURL(cdpUrl) {
|
|
312
|
-
if (!cdpUrl && !this.sessionId) {
|
|
313
|
-
throw new Error(`Must call createSession before calling getPageURL`);
|
|
314
|
-
}
|
|
315
|
-
const data = {
|
|
316
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
317
|
-
};
|
|
318
|
-
const response = await this.makeRequest("post", "/get_page_url", data);
|
|
319
|
-
return response.url || "";
|
|
320
|
-
}
|
|
321
|
-
async captureLoginSession(cdpUrl) {
|
|
322
|
-
if (!cdpUrl && !this.sessionId) {
|
|
323
|
-
throw new Error(`Must call createSession before calling captureLoginSession`);
|
|
324
|
-
}
|
|
325
|
-
const data = {
|
|
326
|
-
...cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId }
|
|
327
|
-
};
|
|
328
|
-
const response = await this.makeRequest("post", "/capture_login_session", data);
|
|
329
|
-
return response.storage_state || "";
|
|
330
|
-
}
|
|
331
|
-
async closeSession() {
|
|
332
|
-
if (!this.sessionId) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
await this.makeRequest("post", "/close_session", { session_id: this.sessionId });
|
|
336
|
-
this.sessionId = null;
|
|
337
|
-
this.connectUrl = null;
|
|
338
|
-
}
|
|
339
|
-
async setDialogSettings(accept) {
|
|
340
|
-
if (!this.sessionId) {
|
|
341
|
-
throw new Error("Must call createSession before calling setDialogSettings");
|
|
342
|
-
}
|
|
343
|
-
const data = {
|
|
344
|
-
accept,
|
|
345
|
-
session_id: this.sessionId
|
|
346
|
-
};
|
|
347
|
-
const response = await this.makeRequest("post", "/set_dialog_settings", data);
|
|
348
|
-
if (!response.succeeded) {
|
|
349
|
-
throw new Error(`Failed to set dialog settings: ${response.error}`);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
async getDialogMessage() {
|
|
353
|
-
if (!this.sessionId) {
|
|
354
|
-
throw new Error("Must call createSession before calling getDialogMessage");
|
|
355
|
-
}
|
|
356
|
-
const data = {
|
|
357
|
-
session_id: this.sessionId
|
|
358
|
-
};
|
|
359
|
-
const response = await this.makeRequest("post", "/get_dialog_message", data);
|
|
360
|
-
return response.message || "";
|
|
361
|
-
}
|
|
362
|
-
async enqueueActions(actions) {
|
|
363
|
-
if (!this.sessionId) {
|
|
364
|
-
throw new Error("Must call createSession before calling enqueueActions");
|
|
365
|
-
}
|
|
366
|
-
const data = {
|
|
367
|
-
actions: JSON.stringify(actions),
|
|
368
|
-
session_id: this.sessionId
|
|
369
|
-
};
|
|
370
|
-
const response = await this.makeRequest("post", "/enqueue_actions", data);
|
|
371
|
-
if (!response.succeeded) {
|
|
372
|
-
throw new Error(`Failed to enqueue actions: ${response.error}`);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
377
|
-
0 && (module.exports = {
|
|
378
|
-
Simplex,
|
|
379
|
-
greet
|
|
380
|
-
});
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.WorkflowError = exports.RateLimitError = exports.AuthenticationError = exports.ValidationError = exports.NetworkError = exports.SimplexError = exports.SimplexClient = void 0;
|
|
18
|
+
var SimplexClient_1 = require("./SimplexClient");
|
|
19
|
+
Object.defineProperty(exports, "SimplexClient", { enumerable: true, get: function () { return SimplexClient_1.SimplexClient; } });
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
var errors_1 = require("./errors");
|
|
22
|
+
Object.defineProperty(exports, "SimplexError", { enumerable: true, get: function () { return errors_1.SimplexError; } });
|
|
23
|
+
Object.defineProperty(exports, "NetworkError", { enumerable: true, get: function () { return errors_1.NetworkError; } });
|
|
24
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return errors_1.ValidationError; } });
|
|
25
|
+
Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return errors_1.AuthenticationError; } });
|
|
26
|
+
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return errors_1.RateLimitError; } });
|
|
27
|
+
Object.defineProperty(exports, "WorkflowError", { enumerable: true, get: function () { return errors_1.WorkflowError; } });
|
|
381
28
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Example function to demonstrate package usage\n * @param name - The name to greet\n * @returns A greeting message\n */\nexport function greet(name: string): string {\n return `Hello, ${name}!`;\n}\n\n// Export other functions and types here \n\nimport axios from 'axios';\n\nconst BASE_URL = \"https://api.simplex.sh\";\n// const BASE_URL = \"https://simplex-dev-shreya--api-server-and-container-service-fas-bba69e.modal.run\"\n\ninterface SessionData {\n [key: string]: any;\n}\n\ninterface PlaywrightClickOptions {\n locator: string;\n locatorType: string;\n exact?: boolean;\n elementIndex?: 'first' | 'last' | 'nth';\n nthIndex?: number;\n locatorOptions?: Record<string, any>;\n}\n\ninterface SimplexResponse {\n succeeded?: boolean;\n error?: string;\n session_id?: string;\n livestream_url?: string;\n connect_url?: string;\n element_clicked?: string;\n text?: string;\n image?: string;\n bbox?: any;\n b64?: string;\n filename?: string;\n exists?: boolean;\n reasoning?: string;\n response?: string;\n url?: string;\n storage_state?: string;\n actions?: any[];\n message?: string;\n}\n\nexport class Simplex {\n private apiKey: string;\n private sessionId: string | null = null;\n private connectUrl: string | null = null;\n\n constructor(apiKey: string) {\n this.apiKey = apiKey;\n }\n\n private async makeRequest<T>(\n method: 'get' | 'post',\n endpoint: string,\n data?: any,\n params?: any\n ): Promise<T> {\n try {\n console.log(`Making ${method.toUpperCase()} request to ${endpoint}`);\n \n // Convert data to FormData\n const formData = new FormData();\n if (data) {\n Object.entries(data).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.append(key, value.toString());\n }\n });\n }\n \n const response = await axios({\n method,\n url: `${BASE_URL}${endpoint}`,\n data: method === 'post' ? formData : undefined,\n params: method === 'get' ? params : undefined,\n headers: {\n 'x-api-key': this.apiKey,\n ...(method === 'post' ? { 'Content-Type': 'multipart/form-data' } : {})\n }\n });\n\n const responseData = response.data as SimplexResponse;\n \n // Consider response successful if:\n // 1. It has succeeded: true, or\n // 2. It's a create_session response with a session_id\n // 3. It's a goto or hover response with a succeeded field\n // 4. It's a get_network_response with success status\n\n if (endpoint === \"/get_dialog_message\") {\n if (!('message' in responseData)) {\n throw new Error(responseData.error || 'Request failed');\n }\n return responseData as T;\n }\n\n if (endpoint === \"/goto\" || endpoint === \"/hover\") {\n if (!('succeeded' in responseData)) {\n throw new Error('Response data is missing the \"succeeded\" field');\n }\n return responseData as T;\n }\n\n if (endpoint === \"/get_network_response\") {\n if (!('status' in responseData)) {\n throw new Error('It looks like the get_network_response action failed to return a response. Did you set your api_key when creating the Simplex class?');\n } else if (responseData.status == \"success\") {\n return responseData as T;\n } else {\n throw new Error(`Failed to get network response: ${responseData.error}`);\n }\n }\n\n\n if (!responseData.succeeded && !(endpoint === '/create_session' && responseData.session_id)) {\n const errorMessage = responseData.error || 'Request failed';\n console.error('API request failed:', errorMessage);\n throw new Error(errorMessage);\n }\n return responseData as T;\n } catch (error: unknown) {\n const axiosError = error as { response?: { data?: { error?: string }, status?: number, statusText?: string } };\n if (axiosError.response) {\n const errorMessage = axiosError.response.data?.error || String(error);\n console.error('Axios error:', {\n status: axiosError.response.status,\n statusText: axiosError.response.statusText,\n data: axiosError.response.data,\n message: errorMessage\n });\n throw new Error(`Request failed: ${errorMessage}`);\n }\n console.error('Unexpected error:', error);\n throw error;\n }\n }\n\n async createSession(\n showInConsole: boolean = true,\n proxies: boolean = true,\n workflowName?: string,\n sessionData?: SessionData | string\n ): Promise<[string, string]> {\n const data: any = {\n proxies,\n workflow_name: workflowName\n };\n\n if (this.sessionId) {\n throw new Error(\"A session is already active. Please close the current session before creating a new one.\");\n }\n if (sessionData) {\n if (typeof sessionData === 'string') {\n try {\n data.session_data = JSON.stringify(JSON.parse(sessionData));\n } catch {\n // If parsing fails, treat as file path\n // Note: File system operations are not available in browser environment\n throw new Error('File system operations are not supported in this environment');\n }\n } else {\n data.session_data = JSON.stringify(sessionData);\n }\n }\n\n const response = await this.makeRequest<SimplexResponse>('post', '/create_session', data);\n \n if (!response.session_id) {\n throw new Error('Session creation failed: No session ID returned');\n }\n\n this.sessionId = response.session_id;\n this.connectUrl = response.connect_url || null;\n\n if (showInConsole && response.livestream_url) {\n console.log(`Livestream URL: ${response.livestream_url}`);\n }\n\n return [response.session_id, response.livestream_url || ''];\n }\n\n async goto(url: string, cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling goto with url='${url}'`);\n }\n\n if (!url.startsWith('http://') && !url.startsWith('https://')) {\n url = 'https://' + url;\n }\n\n const data = {\n url,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n await this.makeRequest('post', '/goto', data);\n }\n\n async click(elementDescription: string, cdpUrl?: string): Promise<string> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling click with elementDescription='${elementDescription}'`);\n }\n\n const data = {\n element_description: elementDescription,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/click', data);\n return response.element_clicked || '';\n }\n\n async hover(elementDescription: string, cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling click with elementDescription='${elementDescription}'`);\n }\n\n const data = {\n element_description: elementDescription,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n await this.makeRequest<SimplexResponse>('post', '/hover', data);\n }\n\n async scrollToElement(elementDescription: string, cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling click with elementDescription='${elementDescription}'`);\n }\n\n const data = {\n element_description: elementDescription,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n await this.makeRequest<SimplexResponse>('post', '/scroll_to_element', data);\n }\n\n\n async getNetworkResponse(url: string, cdpUrl?: string): Promise<string> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling getNetworkResponse with url='${url}'`);\n }\n \n const data = {\n url,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/get_network_response', data);\n return response.response || '';\n }\n\n async type(text: string, cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling type with text='${text}'`);\n }\n\n const data = {\n text,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n await this.makeRequest('post', '/type', data);\n }\n\n async pressEnter(cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error('Must call createSession before calling pressEnter');\n }\n\n const data = cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId };\n await this.makeRequest('post', '/press_enter', data);\n }\n\n async pressTab(cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error('Must call createSession before calling pressTab');\n }\n\n const data = cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId };\n await this.makeRequest('post', '/press_tab', data);\n }\n\n async deleteText(cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error('Must call createSession before calling deleteText');\n }\n\n const data = cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId };\n await this.makeRequest('post', '/delete_text', data);\n }\n\n async extractBbox(elementDescription: string, cdpUrl?: string): Promise<any> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling extractBbox with elementDescription='${elementDescription}'`);\n }\n\n const params = {\n element_description: elementDescription,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('get', '/extract-bbox', undefined, params);\n return response.bbox;\n }\n\n async extractText(elementDescription: string, cdpUrl?: string): Promise<string> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling extractText with elementDescription='${elementDescription}'`);\n }\n\n const data = {\n element_description: elementDescription,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/extract-text', data);\n return response.text || '';\n }\n\n async scroll(pixels: number, cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling scroll with pixels=${pixels}`);\n }\n\n const data = {\n pixels,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n await this.makeRequest('post', '/scroll', data);\n }\n\n async wait(milliseconds: number, cdpUrl?: string): Promise<void> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling wait with milliseconds=${milliseconds}`);\n }\n\n const data = {\n milliseconds,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n await this.makeRequest('post', '/wait', data);\n }\n\n async clickAndUpload(\n elementDescription: string,\n filePathOrCallable: string | (() => Blob)\n ): Promise<void> {\n if (!this.sessionId) {\n throw new Error(`Must call createSession before calling clickAndUpload with elementDescription='${elementDescription}'`);\n }\n\n if (typeof filePathOrCallable !== 'string' && typeof filePathOrCallable !== 'function') {\n throw new TypeError(`filePathOrCallable must be either a string or a callable, not a ${typeof filePathOrCallable}`);\n }\n\n const formData = new FormData();\n formData.append('element_description', elementDescription);\n formData.append('session_id', this.sessionId);\n\n if (typeof filePathOrCallable === 'string') {\n // Note: File system operations are not available in browser environment\n throw new Error('File system operations are not supported in this environment');\n } else {\n const blob = filePathOrCallable();\n formData.append('file', blob, 'file'); // Add filename for the blob\n }\n\n await this.makeRequest('post', '/click_and_upload', formData, undefined);\n }\n\n async clickAndDownload(elementDescription: string): Promise<[string, string]> {\n if (!this.sessionId) {\n throw new Error(`Must call createSession before calling clickAndDownload with elementDescription='${elementDescription}'`);\n }\n\n const data = {\n element_description: elementDescription,\n session_id: this.sessionId\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/click_and_download', data);\n return [response.b64 || '', response.filename || ''];\n }\n\n async exists(elementDescription: string, cdpUrl?: string): Promise<[boolean, string]> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling exists with elementDescription='${elementDescription}'`);\n }\n\n const data = {\n element_description: elementDescription,\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/exists', data);\n return [response.exists || false, response.reasoning || ''];\n }\n\n async getPageURL(cdpUrl?: string): Promise<string> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling getPageURL`);\n }\n\n const data = {\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/get_page_url', data);\n return response.url || '';\n }\n\n async captureLoginSession(cdpUrl?: string): Promise<string> {\n if (!cdpUrl && !this.sessionId) {\n throw new Error(`Must call createSession before calling captureLoginSession`);\n }\n \n const data = {\n ...(cdpUrl ? { cdp_url: cdpUrl } : { session_id: this.sessionId })\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/capture_login_session', data);\n return response.storage_state || '';\n }\n\n async closeSession(): Promise<void> {\n if (!this.sessionId) {\n return;\n }\n\n await this.makeRequest('post', '/close_session', { session_id: this.sessionId });\n this.sessionId = null;\n this.connectUrl = null;\n }\n\n async setDialogSettings(accept: boolean): Promise<void> {\n if (!this.sessionId) {\n throw new Error('Must call createSession before calling setDialogSettings');\n }\n\n const data = {\n accept,\n session_id: this.sessionId\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/set_dialog_settings', data);\n \n if (!response.succeeded) {\n throw new Error(`Failed to set dialog settings: ${response.error}`);\n }\n }\n\n async getDialogMessage(): Promise<string> {\n if (!this.sessionId) {\n throw new Error('Must call createSession before calling getDialogMessage');\n }\n\n const data = {\n session_id: this.sessionId\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/get_dialog_message', data);\n return response.message || '';\n }\n \n\n async enqueueActions(actions: any[]): Promise<void> {\n if (!this.sessionId) {\n throw new Error('Must call createSession before calling enqueueActions');\n }\n\n const data = {\n actions: JSON.stringify(actions),\n session_id: this.sessionId\n };\n\n const response = await this.makeRequest<SimplexResponse>('post', '/enqueue_actions', data);\n \n if (!response.succeeded) {\n throw new Error(`Failed to enqueue actions: ${response.error}`);\n }\n }\n} "],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,mBAAkB;AANX,SAAS,MAAM,MAAsB;AAC1C,SAAO,UAAU,IAAI;AACvB;AAMA,IAAM,WAAW;AAqCV,IAAM,UAAN,MAAc;AAAA,EAKnB,YAAY,QAAgB;AAH5B,SAAQ,YAA2B;AACnC,SAAQ,aAA4B;AAGlC,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,MAAc,YACZ,QACA,UACA,MACA,QACY;AACZ,QAAI;AACF,cAAQ,IAAI,UAAU,OAAO,YAAY,CAAC,eAAe,QAAQ,EAAE;AAGnE,YAAM,WAAW,IAAI,SAAS;AAC9B,UAAI,MAAM;AACR,eAAO,QAAQ,IAAI,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC7C,cAAI,UAAU,UAAa,UAAU,MAAM;AACzC,qBAAS,OAAO,KAAK,MAAM,SAAS,CAAC;AAAA,UACvC;AAAA,QACF,CAAC;AAAA,MACH;AAEA,YAA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,KAAK;AAAA,IACnB;AAEA,UAAM,WAAW,MAAM,KAAK,YAA6B,QAAQ,wBAAwB,IAAI;AAE7F,QAAI,CAAC,SAAS,WAAW;AACvB,YAAM,IAAI,MAAM,kCAAkC,SAAS,KAAK,EAAE;AAAA,IACpE;AAAA,EACF;AAAA,EAEA,MAAM,mBAAoC;AACxC,QAAI,CAAC,KAAK,WAAW;AACnB,YAAM,IAAI,MAAM,yDAAyD;AAAA,IAC3E;AAEA,UAAM,OAAO;AAAA,MACX,YAAY,KAAK;AAAA,IACnB;AAEA,UAAM,WAAW,MAAM,KAAK,YAA6B,QAAQ,uBAAuB,IAAI;AAC5F,WAAO,SAAS,WAAW;AAAA,EAC7B;AAAA,EAGA,MAAM,eAAe,SAA+B;AAClD,QAAI,CAAC,KAAK,WAAW;AACnB,YAAM,IAAI,MAAM,uDAAuD;AAAA,IACzE;AAEA,UAAM,OAAO;AAAA,MACX,SAAS,KAAK,UAAU,OAAO;AAAA,MAC/B,YAAY,KAAK;AAAA,IACnB;AAEA,UAAM,WAAW,MAAM,KAAK,YAA6B,QAAQ,oBAAoB,IAAI;AAEzF,QAAI,CAAC,SAAS,WAAW;AACvB,YAAM,IAAI,MAAM,8BAA8B,SAAS,KAAK,EAAE;AAAA,IAChE;AAAA,EACF;AACF;","names":["axios"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,0CAAwB;AAExB,mCAOkB;AANhB,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,yGAAA,eAAe,OAAA;AACf,6GAAA,mBAAmB,OAAA;AACnB,wGAAA,cAAc,OAAA;AACd,uGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HttpClient } from '../client/HttpClient';
|
|
2
|
+
import { AgenticResponse, RunAgentResponse } from '../types';
|
|
3
|
+
export declare class Agent {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
agentic(task: string, sessionId: string, options?: {
|
|
7
|
+
maxSteps?: number;
|
|
8
|
+
actionsToExclude?: string[];
|
|
9
|
+
variables?: Record<string, any>;
|
|
10
|
+
}): Promise<AgenticResponse>;
|
|
11
|
+
run(agentName: string, sessionId: string, variables?: Record<string, any>): Promise<RunAgentResponse>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../src/resources/Agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAEL,eAAe,EAEf,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAGlB,qBAAa,KAAK;IACJ,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAEpC,OAAO,CACX,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACjC,GACA,OAAO,CAAC,eAAe,CAAC;IAoCrB,GAAG,CACP,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC9B,OAAO,CAAC,gBAAgB,CAAC;CAiC7B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Agent = void 0;
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
|
+
class Agent {
|
|
6
|
+
constructor(httpClient) {
|
|
7
|
+
this.httpClient = httpClient;
|
|
8
|
+
}
|
|
9
|
+
async agentic(task, sessionId, options) {
|
|
10
|
+
const request = {
|
|
11
|
+
task,
|
|
12
|
+
session_id: sessionId,
|
|
13
|
+
max_steps: options?.maxSteps,
|
|
14
|
+
actions_to_exclude: options?.actionsToExclude,
|
|
15
|
+
variables: options?.variables ? JSON.stringify(options.variables) : undefined,
|
|
16
|
+
};
|
|
17
|
+
try {
|
|
18
|
+
const response = await this.httpClient.post('/agentic', request);
|
|
19
|
+
if (!response.succeeded && response.error) {
|
|
20
|
+
throw new errors_1.SimplexError(`Agent task failed: ${response.error}`, 500, { sessionId, task });
|
|
21
|
+
}
|
|
22
|
+
return response;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (error instanceof errors_1.SimplexError) {
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
throw new errors_1.SimplexError(`Failed to run agent task: ${error instanceof Error ? error.message : 'Unknown error'}`, 500, { sessionId, task });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async run(agentName, sessionId, variables) {
|
|
32
|
+
const request = {
|
|
33
|
+
agent_name: agentName,
|
|
34
|
+
session_id: sessionId,
|
|
35
|
+
variables,
|
|
36
|
+
};
|
|
37
|
+
try {
|
|
38
|
+
const response = await this.httpClient.post('/run_agent', request);
|
|
39
|
+
if (!response.succeeded) {
|
|
40
|
+
throw new errors_1.SimplexError(`Agent run failed for ${agentName}`, 500, { agentName, sessionId });
|
|
41
|
+
}
|
|
42
|
+
return response;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error instanceof errors_1.SimplexError) {
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
throw new errors_1.SimplexError(`Failed to run agent: ${error instanceof Error ? error.message : 'Unknown error'}`, 500, { agentName, sessionId });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.Agent = Ag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C;QACJ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,GAAG,CACP,SAAiB,EACjB,SAAiB,EACjB,SAA+B;QAE/B,MAAM,OAAO,GAAoB;YAC/B,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;YACrB,SAAS;SACV,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACzC,YAAY,EACZ,OAAO,CACR,CAAC;YAEF,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;gBACxB,MAAM,IAAI,qBAAY,CACpB,wBAAwB,SAAS,EAAE,EACnC,GAAG,EACH,EAAE,SAAS,EAAE,SAAS,EAAE,CACzB,CAAC;YACJ,CAAC;YAED,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,qBAAY,EAAE,CAAC;gBAClC,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,qBAAY,CACpB,wBAAwB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,EAClF,GAAG,EACH,EAAE,SAAS,EAAE,SAAS,EAAE,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AApFD,sBAoFC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { HttpClient } from '../client/HttpClient';
|
|
2
|
+
import { RunWorkflowResponse, WorkflowVariables, WorkflowStatusResponse, CreateWorkflowSessionResponse } from '../types';
|
|
3
|
+
export declare class Workflow {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(httpClient: HttpClient);
|
|
6
|
+
run(workflowId: string, options?: {
|
|
7
|
+
variables?: WorkflowVariables;
|
|
8
|
+
metadata?: string;
|
|
9
|
+
webhookUrl?: string;
|
|
10
|
+
}): Promise<RunWorkflowResponse>;
|
|
11
|
+
runWithVariables(workflowId: string, variables: WorkflowVariables): Promise<RunWorkflowResponse>;
|
|
12
|
+
getStatus(sessionId: string): Promise<WorkflowStatusResponse>;
|
|
13
|
+
createWorkflowSession(workflowName: string, url: string, options?: {
|
|
14
|
+
proxies?: boolean;
|
|
15
|
+
sessionData?: any;
|
|
16
|
+
}): Promise<CreateWorkflowSessionResponse>;
|
|
17
|
+
startSegment(workflowId: string, segmentName: string): Promise<{
|
|
18
|
+
succeeded: boolean;
|
|
19
|
+
segment_id?: string;
|
|
20
|
+
error?: string;
|
|
21
|
+
}>;
|
|
22
|
+
finishSegment(workflowId: string): Promise<{
|
|
23
|
+
succeeded: boolean;
|
|
24
|
+
segment_actions?: any[];
|
|
25
|
+
error?: string;
|
|
26
|
+
}>;
|
|
27
|
+
startCapture(sessionId: string): Promise<{
|
|
28
|
+
succeeded: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
stopCapture(sessionId: string): Promise<{
|
|
31
|
+
succeeded: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
closeWorkflowSession(sessionId: string): Promise<{
|
|
34
|
+
succeeded: boolean;
|
|
35
|
+
message?: string;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=Workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Workflow.d.ts","sourceRoot":"","sources":["../../src/resources/Workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAEL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EAEtB,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAGlB,qBAAa,QAAQ;IACP,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAEpC,GAAG,CACP,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,iBAAiB,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CA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