plato-sandbox-sdk 1.1.3 → 1.1.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/package.json +1 -1
- package/src/flow/README.md +384 -0
- package/dist/apis/EnvApi.d.ts +0 -308
- package/dist/apis/EnvApi.js +0 -693
- package/dist/apis/GiteaApi.d.ts +0 -109
- package/dist/apis/GiteaApi.js +0 -225
- package/dist/apis/PublicBuildApi.d.ts +0 -125
- package/dist/apis/PublicBuildApi.js +0 -331
- package/dist/apis/SimulatorApi.d.ts +0 -62
- package/dist/apis/SimulatorApi.js +0 -162
- package/dist/apis/TestcasesApi.d.ts +0 -42
- package/dist/apis/TestcasesApi.js +0 -111
- package/dist/apis/UserApi.d.ts +0 -30
- package/dist/apis/UserApi.js +0 -71
- package/dist/apis/index.d.ts +0 -6
- package/dist/apis/index.js +0 -24
- package/dist/client.d.ts +0 -92
- package/dist/client.js +0 -256
- package/dist/esm/apis/EnvApi.d.ts +0 -308
- package/dist/esm/apis/EnvApi.js +0 -689
- package/dist/esm/apis/GiteaApi.d.ts +0 -109
- package/dist/esm/apis/GiteaApi.js +0 -221
- package/dist/esm/apis/PublicBuildApi.d.ts +0 -125
- package/dist/esm/apis/PublicBuildApi.js +0 -327
- package/dist/esm/apis/SimulatorApi.d.ts +0 -62
- package/dist/esm/apis/SimulatorApi.js +0 -158
- package/dist/esm/apis/TestcasesApi.d.ts +0 -42
- package/dist/esm/apis/TestcasesApi.js +0 -107
- package/dist/esm/apis/UserApi.d.ts +0 -30
- package/dist/esm/apis/UserApi.js +0 -67
- package/dist/esm/apis/index.d.ts +0 -6
- package/dist/esm/apis/index.js +0 -8
- package/dist/esm/client.d.ts +0 -92
- package/dist/esm/client.js +0 -250
- package/dist/esm/flow/executor.d.ts +0 -108
- package/dist/esm/flow/executor.js +0 -617
- package/dist/esm/flow/index.d.ts +0 -6
- package/dist/esm/flow/index.js +0 -6
- package/dist/esm/flow/types.d.ts +0 -138
- package/dist/esm/flow/types.js +0 -21
- package/dist/esm/index.d.ts +0 -4
- package/dist/esm/index.js +0 -6
- package/dist/esm/models/Authentication.d.ts +0 -38
- package/dist/esm/models/Authentication.js +0 -47
- package/dist/esm/models/BaseScoringConfig.d.ts +0 -53
- package/dist/esm/models/BaseScoringConfig.js +0 -63
- package/dist/esm/models/BaseStructuredRunLog.d.ts +0 -67
- package/dist/esm/models/BaseStructuredRunLog.js +0 -66
- package/dist/esm/models/BatchLogRequest.d.ts +0 -63
- package/dist/esm/models/BatchLogRequest.js +0 -64
- package/dist/esm/models/ChromeCookie.d.ts +0 -68
- package/dist/esm/models/ChromeCookie.js +0 -67
- package/dist/esm/models/CreateSimulatorRequest.d.ts +0 -93
- package/dist/esm/models/CreateSimulatorRequest.js +0 -68
- package/dist/esm/models/CreateSnapshotRequest.d.ts +0 -74
- package/dist/esm/models/CreateSnapshotRequest.js +0 -55
- package/dist/esm/models/CreateSnapshotResponse.d.ts +0 -56
- package/dist/esm/models/CreateSnapshotResponse.js +0 -59
- package/dist/esm/models/CreateVMRequest.d.ts +0 -69
- package/dist/esm/models/CreateVMRequest.js +0 -58
- package/dist/esm/models/CreateVMResponse.d.ts +0 -62
- package/dist/esm/models/CreateVMResponse.js +0 -61
- package/dist/esm/models/DbConfigResponse.d.ts +0 -56
- package/dist/esm/models/DbConfigResponse.js +0 -59
- package/dist/esm/models/EvaluateRequest.d.ts +0 -34
- package/dist/esm/models/EvaluateRequest.js +0 -41
- package/dist/esm/models/GetOperationEvents200Response.d.ts +0 -60
- package/dist/esm/models/GetOperationEvents200Response.js +0 -58
- package/dist/esm/models/GetOperationEventsApiPublicBuildEventsCorrelationIdGet200Response.d.ts +0 -60
- package/dist/esm/models/GetOperationEventsApiPublicBuildEventsCorrelationIdGet200Response.js +0 -58
- package/dist/esm/models/HTTPValidationError.d.ts +0 -33
- package/dist/esm/models/HTTPValidationError.js +0 -42
- package/dist/esm/models/JobStatusResponse.d.ts +0 -50
- package/dist/esm/models/JobStatusResponse.js +0 -55
- package/dist/esm/models/LocationInner.d.ts +0 -26
- package/dist/esm/models/LocationInner.js +0 -31
- package/dist/esm/models/Log.d.ts +0 -63
- package/dist/esm/models/Log.js +0 -64
- package/dist/esm/models/MakeEnvRequest2.d.ts +0 -145
- package/dist/esm/models/MakeEnvRequest2.js +0 -91
- package/dist/esm/models/MakeEnvResponse.d.ts +0 -38
- package/dist/esm/models/MakeEnvResponse.js +0 -45
- package/dist/esm/models/ResetEnvRequest.d.ts +0 -87
- package/dist/esm/models/ResetEnvRequest.js +0 -60
- package/dist/esm/models/ResetEnvTask.d.ts +0 -57
- package/dist/esm/models/ResetEnvTask.js +0 -54
- package/dist/esm/models/ScoreRequest.d.ts +0 -52
- package/dist/esm/models/ScoreRequest.js +0 -49
- package/dist/esm/models/SetupRootPasswordRequest.d.ts +0 -38
- package/dist/esm/models/SetupRootPasswordRequest.js +0 -45
- package/dist/esm/models/SetupSandboxRequest.d.ts +0 -63
- package/dist/esm/models/SetupSandboxRequest.js +0 -56
- package/dist/esm/models/SetupSandboxResponse.d.ts +0 -50
- package/dist/esm/models/SetupSandboxResponse.js +0 -53
- package/dist/esm/models/SimConfigCompute.d.ts +0 -56
- package/dist/esm/models/SimConfigCompute.js +0 -49
- package/dist/esm/models/SimConfigDataset.d.ts +0 -58
- package/dist/esm/models/SimConfigDataset.js +0 -60
- package/dist/esm/models/SimConfigListener.d.ts +0 -41
- package/dist/esm/models/SimConfigListener.js +0 -51
- package/dist/esm/models/SimConfigMetadata.d.ts +0 -76
- package/dist/esm/models/SimConfigMetadata.js +0 -55
- package/dist/esm/models/SimConfigService.d.ts +0 -40
- package/dist/esm/models/SimConfigService.js +0 -50
- package/dist/esm/models/SimStatusHistory.d.ts +0 -50
- package/dist/esm/models/SimStatusHistory.js +0 -53
- package/dist/esm/models/SimulatorConfig.d.ts +0 -130
- package/dist/esm/models/SimulatorConfig.js +0 -95
- package/dist/esm/models/SimulatorVersionDetails.d.ts +0 -68
- package/dist/esm/models/SimulatorVersionDetails.js +0 -67
- package/dist/esm/models/SimulatorVersionsResponse.d.ts +0 -45
- package/dist/esm/models/SimulatorVersionsResponse.js +0 -52
- package/dist/esm/models/VMManagementRequest.d.ts +0 -51
- package/dist/esm/models/VMManagementRequest.js +0 -52
- package/dist/esm/models/VMManagementResponse.d.ts +0 -44
- package/dist/esm/models/VMManagementResponse.js +0 -49
- package/dist/esm/models/ValidationError.d.ts +0 -45
- package/dist/esm/models/ValidationError.js +0 -52
- package/dist/esm/models/WorkerReadyResponse.d.ts +0 -76
- package/dist/esm/models/WorkerReadyResponse.js +0 -57
- package/dist/esm/models/index.d.ts +0 -37
- package/dist/esm/models/index.js +0 -39
- package/dist/esm/runtime.d.ts +0 -184
- package/dist/esm/runtime.js +0 -334
- package/dist/examples/flow-executor-example.d.ts +0 -11
- package/dist/examples/flow-executor-example.js +0 -193
- package/dist/flow/executor.d.ts +0 -108
- package/dist/flow/executor.js +0 -621
- package/dist/flow/index.d.ts +0 -6
- package/dist/flow/index.js +0 -22
- package/dist/flow/types.d.ts +0 -138
- package/dist/flow/types.js +0 -25
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -22
- package/dist/models/Authentication.d.ts +0 -38
- package/dist/models/Authentication.js +0 -54
- package/dist/models/BaseScoringConfig.d.ts +0 -53
- package/dist/models/BaseScoringConfig.js +0 -71
- package/dist/models/BaseStructuredRunLog.d.ts +0 -67
- package/dist/models/BaseStructuredRunLog.js +0 -74
- package/dist/models/BatchLogRequest.d.ts +0 -63
- package/dist/models/BatchLogRequest.js +0 -71
- package/dist/models/ChromeCookie.d.ts +0 -68
- package/dist/models/ChromeCookie.js +0 -74
- package/dist/models/CreateSimulatorRequest.d.ts +0 -93
- package/dist/models/CreateSimulatorRequest.js +0 -75
- package/dist/models/CreateSnapshotRequest.d.ts +0 -74
- package/dist/models/CreateSnapshotRequest.js +0 -62
- package/dist/models/CreateSnapshotResponse.d.ts +0 -56
- package/dist/models/CreateSnapshotResponse.js +0 -66
- package/dist/models/CreateVMRequest.d.ts +0 -69
- package/dist/models/CreateVMRequest.js +0 -65
- package/dist/models/CreateVMResponse.d.ts +0 -62
- package/dist/models/CreateVMResponse.js +0 -68
- package/dist/models/DbConfigResponse.d.ts +0 -56
- package/dist/models/DbConfigResponse.js +0 -66
- package/dist/models/EvaluateRequest.d.ts +0 -34
- package/dist/models/EvaluateRequest.js +0 -48
- package/dist/models/GetOperationEvents200Response.d.ts +0 -60
- package/dist/models/GetOperationEvents200Response.js +0 -66
- package/dist/models/GetOperationEventsApiPublicBuildEventsCorrelationIdGet200Response.d.ts +0 -60
- package/dist/models/GetOperationEventsApiPublicBuildEventsCorrelationIdGet200Response.js +0 -66
- package/dist/models/HTTPValidationError.d.ts +0 -33
- package/dist/models/HTTPValidationError.js +0 -49
- package/dist/models/JobStatusResponse.d.ts +0 -50
- package/dist/models/JobStatusResponse.js +0 -62
- package/dist/models/LocationInner.d.ts +0 -26
- package/dist/models/LocationInner.js +0 -38
- package/dist/models/Log.d.ts +0 -63
- package/dist/models/Log.js +0 -71
- package/dist/models/MakeEnvRequest2.d.ts +0 -145
- package/dist/models/MakeEnvRequest2.js +0 -99
- package/dist/models/MakeEnvResponse.d.ts +0 -38
- package/dist/models/MakeEnvResponse.js +0 -52
- package/dist/models/ResetEnvRequest.d.ts +0 -87
- package/dist/models/ResetEnvRequest.js +0 -67
- package/dist/models/ResetEnvTask.d.ts +0 -57
- package/dist/models/ResetEnvTask.js +0 -61
- package/dist/models/ScoreRequest.d.ts +0 -52
- package/dist/models/ScoreRequest.js +0 -56
- package/dist/models/SetupRootPasswordRequest.d.ts +0 -38
- package/dist/models/SetupRootPasswordRequest.js +0 -52
- package/dist/models/SetupSandboxRequest.d.ts +0 -63
- package/dist/models/SetupSandboxRequest.js +0 -63
- package/dist/models/SetupSandboxResponse.d.ts +0 -50
- package/dist/models/SetupSandboxResponse.js +0 -60
- package/dist/models/SimConfigCompute.d.ts +0 -56
- package/dist/models/SimConfigCompute.js +0 -56
- package/dist/models/SimConfigDataset.d.ts +0 -58
- package/dist/models/SimConfigDataset.js +0 -67
- package/dist/models/SimConfigListener.d.ts +0 -41
- package/dist/models/SimConfigListener.js +0 -59
- package/dist/models/SimConfigMetadata.d.ts +0 -76
- package/dist/models/SimConfigMetadata.js +0 -62
- package/dist/models/SimConfigService.d.ts +0 -40
- package/dist/models/SimConfigService.js +0 -58
- package/dist/models/SimStatusHistory.d.ts +0 -50
- package/dist/models/SimStatusHistory.js +0 -60
- package/dist/models/SimulatorConfig.d.ts +0 -130
- package/dist/models/SimulatorConfig.js +0 -103
- package/dist/models/SimulatorVersionDetails.d.ts +0 -68
- package/dist/models/SimulatorVersionDetails.js +0 -74
- package/dist/models/SimulatorVersionsResponse.d.ts +0 -45
- package/dist/models/SimulatorVersionsResponse.js +0 -59
- package/dist/models/VMManagementRequest.d.ts +0 -51
- package/dist/models/VMManagementRequest.js +0 -59
- package/dist/models/VMManagementResponse.d.ts +0 -44
- package/dist/models/VMManagementResponse.js +0 -56
- package/dist/models/ValidationError.d.ts +0 -45
- package/dist/models/ValidationError.js +0 -59
- package/dist/models/WorkerReadyResponse.d.ts +0 -76
- package/dist/models/WorkerReadyResponse.js +0 -64
- package/dist/models/index.d.ts +0 -37
- package/dist/models/index.js +0 -55
- package/dist/runtime.d.ts +0 -184
- package/dist/runtime.js +0 -350
- package/dist/src/apis/EnvApi.d.ts +0 -304
- package/dist/src/apis/EnvApi.js +0 -693
- package/dist/src/apis/GiteaApi.d.ts +0 -109
- package/dist/src/apis/GiteaApi.js +0 -225
- package/dist/src/apis/PublicBuildApi.d.ts +0 -125
- package/dist/src/apis/PublicBuildApi.js +0 -331
- package/dist/src/apis/SimulatorApi.d.ts +0 -62
- package/dist/src/apis/SimulatorApi.js +0 -162
- package/dist/src/apis/TestcasesApi.d.ts +0 -42
- package/dist/src/apis/TestcasesApi.js +0 -111
- package/dist/src/apis/UserApi.d.ts +0 -30
- package/dist/src/apis/UserApi.js +0 -71
- package/dist/src/apis/index.d.ts +0 -6
- package/dist/src/apis/index.js +0 -24
- package/dist/src/client.d.ts +0 -90
- package/dist/src/client.js +0 -256
- package/dist/src/flow/executor.d.ts +0 -108
- package/dist/src/flow/executor.js +0 -621
- package/dist/src/flow/index.d.ts +0 -6
- package/dist/src/flow/index.js +0 -22
- package/dist/src/flow/types.d.ts +0 -138
- package/dist/src/flow/types.js +0 -25
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -22
- package/dist/src/models/Authentication.d.ts +0 -38
- package/dist/src/models/Authentication.js +0 -54
- package/dist/src/models/BaseScoringConfig.d.ts +0 -53
- package/dist/src/models/BaseScoringConfig.js +0 -71
- package/dist/src/models/BaseStructuredRunLog.d.ts +0 -67
- package/dist/src/models/BaseStructuredRunLog.js +0 -74
- package/dist/src/models/BatchLogRequest.d.ts +0 -63
- package/dist/src/models/BatchLogRequest.js +0 -71
- package/dist/src/models/ChromeCookie.d.ts +0 -68
- package/dist/src/models/ChromeCookie.js +0 -74
- package/dist/src/models/CreateSimulatorRequest.d.ts +0 -93
- package/dist/src/models/CreateSimulatorRequest.js +0 -75
- package/dist/src/models/CreateSnapshotRequest.d.ts +0 -74
- package/dist/src/models/CreateSnapshotRequest.js +0 -62
- package/dist/src/models/CreateSnapshotResponse.d.ts +0 -56
- package/dist/src/models/CreateSnapshotResponse.js +0 -66
- package/dist/src/models/CreateVMRequest.d.ts +0 -69
- package/dist/src/models/CreateVMRequest.js +0 -65
- package/dist/src/models/CreateVMResponse.d.ts +0 -62
- package/dist/src/models/CreateVMResponse.js +0 -68
- package/dist/src/models/DbConfigResponse.d.ts +0 -56
- package/dist/src/models/DbConfigResponse.js +0 -66
- package/dist/src/models/EvaluateRequest.d.ts +0 -34
- package/dist/src/models/EvaluateRequest.js +0 -48
- package/dist/src/models/GetOperationEventsApiPublicBuildEventsCorrelationIdGet200Response.d.ts +0 -60
- package/dist/src/models/GetOperationEventsApiPublicBuildEventsCorrelationIdGet200Response.js +0 -66
- package/dist/src/models/HTTPValidationError.d.ts +0 -33
- package/dist/src/models/HTTPValidationError.js +0 -49
- package/dist/src/models/JobStatusResponse.d.ts +0 -50
- package/dist/src/models/JobStatusResponse.js +0 -62
- package/dist/src/models/LocationInner.d.ts +0 -26
- package/dist/src/models/LocationInner.js +0 -38
- package/dist/src/models/Log.d.ts +0 -63
- package/dist/src/models/Log.js +0 -71
- package/dist/src/models/MakeEnvRequest2.d.ts +0 -145
- package/dist/src/models/MakeEnvRequest2.js +0 -99
- package/dist/src/models/MakeEnvResponse.d.ts +0 -38
- package/dist/src/models/MakeEnvResponse.js +0 -52
- package/dist/src/models/ResetEnvRequest.d.ts +0 -87
- package/dist/src/models/ResetEnvRequest.js +0 -67
- package/dist/src/models/ResetEnvTask.d.ts +0 -57
- package/dist/src/models/ResetEnvTask.js +0 -61
- package/dist/src/models/ScoreRequest.d.ts +0 -52
- package/dist/src/models/ScoreRequest.js +0 -56
- package/dist/src/models/SetupRootPasswordRequest.d.ts +0 -38
- package/dist/src/models/SetupRootPasswordRequest.js +0 -52
- package/dist/src/models/SetupSandboxRequest.d.ts +0 -63
- package/dist/src/models/SetupSandboxRequest.js +0 -63
- package/dist/src/models/SetupSandboxResponse.d.ts +0 -50
- package/dist/src/models/SetupSandboxResponse.js +0 -60
- package/dist/src/models/SimConfigCompute.d.ts +0 -56
- package/dist/src/models/SimConfigCompute.js +0 -56
- package/dist/src/models/SimConfigDataset.d.ts +0 -58
- package/dist/src/models/SimConfigDataset.js +0 -67
- package/dist/src/models/SimConfigListener.d.ts +0 -41
- package/dist/src/models/SimConfigListener.js +0 -59
- package/dist/src/models/SimConfigMetadata.d.ts +0 -76
- package/dist/src/models/SimConfigMetadata.js +0 -62
- package/dist/src/models/SimConfigService.d.ts +0 -40
- package/dist/src/models/SimConfigService.js +0 -58
- package/dist/src/models/SimStatusHistory.d.ts +0 -50
- package/dist/src/models/SimStatusHistory.js +0 -60
- package/dist/src/models/SimulatorConfig.d.ts +0 -130
- package/dist/src/models/SimulatorConfig.js +0 -103
- package/dist/src/models/SimulatorVersionDetails.d.ts +0 -68
- package/dist/src/models/SimulatorVersionDetails.js +0 -74
- package/dist/src/models/SimulatorVersionsResponse.d.ts +0 -45
- package/dist/src/models/SimulatorVersionsResponse.js +0 -59
- package/dist/src/models/VMManagementRequest.d.ts +0 -51
- package/dist/src/models/VMManagementRequest.js +0 -59
- package/dist/src/models/VMManagementResponse.d.ts +0 -44
- package/dist/src/models/VMManagementResponse.js +0 -56
- package/dist/src/models/ValidationError.d.ts +0 -45
- package/dist/src/models/ValidationError.js +0 -59
- package/dist/src/models/WorkerReadyResponse.d.ts +0 -76
- package/dist/src/models/WorkerReadyResponse.js +0 -64
- package/dist/src/models/index.d.ts +0 -38
- package/dist/src/models/index.js +0 -56
- package/dist/src/runtime.d.ts +0 -184
- package/dist/src/runtime.js +0 -350
package/package.json
CHANGED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Flow Executor
|
|
2
|
+
|
|
3
|
+
The Flow Executor provides a powerful way to define and execute browser automation flows using Playwright. This is particularly useful for testing simulator interactions in the Plato platform.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
First, install Playwright as a peer dependency:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install playwright
|
|
11
|
+
# or
|
|
12
|
+
yarn add playwright
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Basic Usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { chromium } from 'playwright';
|
|
19
|
+
import { FlowExecutor, Flow } from '@plato-ai/sdk';
|
|
20
|
+
|
|
21
|
+
async function runFlow() {
|
|
22
|
+
const browser = await chromium.launch();
|
|
23
|
+
const page = await browser.newPage();
|
|
24
|
+
|
|
25
|
+
const flow: Flow = {
|
|
26
|
+
name: 'login',
|
|
27
|
+
description: 'Login to the application',
|
|
28
|
+
steps: [
|
|
29
|
+
{
|
|
30
|
+
type: 'navigate',
|
|
31
|
+
url: 'https://example.com/login',
|
|
32
|
+
description: 'Navigate to login page'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'fill',
|
|
36
|
+
selector: '#username',
|
|
37
|
+
value: 'testuser',
|
|
38
|
+
description: 'Fill username'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'fill',
|
|
42
|
+
selector: '#password',
|
|
43
|
+
value: 'password123',
|
|
44
|
+
description: 'Fill password'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'click',
|
|
48
|
+
selector: 'button[type="submit"]',
|
|
49
|
+
description: 'Click login button'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: 'wait_for_url',
|
|
53
|
+
urlContains: '/dashboard',
|
|
54
|
+
description: 'Wait for redirect to dashboard'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'verify',
|
|
58
|
+
verifyType: 'page_title',
|
|
59
|
+
title: 'Dashboard',
|
|
60
|
+
contains: true,
|
|
61
|
+
description: 'Verify we are on the dashboard'
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const executor = new FlowExecutor({
|
|
67
|
+
page,
|
|
68
|
+
flow,
|
|
69
|
+
screenshotsDir: './screenshots'
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const success = await executor.executeFlow();
|
|
73
|
+
console.log(`Flow ${success ? 'succeeded' : 'failed'}`);
|
|
74
|
+
|
|
75
|
+
await browser.close();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
runFlow();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Flow Step Types
|
|
82
|
+
|
|
83
|
+
### Navigation Steps
|
|
84
|
+
|
|
85
|
+
#### `navigate`
|
|
86
|
+
Navigate to a URL.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
{
|
|
90
|
+
type: 'navigate',
|
|
91
|
+
url: 'https://example.com',
|
|
92
|
+
description: 'Navigate to homepage'
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
#### `wait_for_url`
|
|
97
|
+
Wait for URL to contain specific text.
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
{
|
|
101
|
+
type: 'wait_for_url',
|
|
102
|
+
urlContains: '/dashboard',
|
|
103
|
+
timeout: 5000
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Interaction Steps
|
|
108
|
+
|
|
109
|
+
#### `click`
|
|
110
|
+
Click on an element.
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
{
|
|
114
|
+
type: 'click',
|
|
115
|
+
selector: 'button.submit',
|
|
116
|
+
description: 'Click submit button'
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### `fill`
|
|
121
|
+
Fill an input field.
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
{
|
|
125
|
+
type: 'fill',
|
|
126
|
+
selector: '#email',
|
|
127
|
+
value: 'user@example.com',
|
|
128
|
+
description: 'Fill email field'
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Wait Steps
|
|
133
|
+
|
|
134
|
+
#### `wait`
|
|
135
|
+
Wait for a specified duration.
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
{
|
|
139
|
+
type: 'wait',
|
|
140
|
+
duration: 2000, // milliseconds
|
|
141
|
+
description: 'Wait for animation'
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### `wait_for_selector`
|
|
146
|
+
Wait for a selector to be present.
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
{
|
|
150
|
+
type: 'wait_for_selector',
|
|
151
|
+
selector: '.loading-spinner',
|
|
152
|
+
timeout: 10000
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Verification Steps
|
|
157
|
+
|
|
158
|
+
#### `verify`
|
|
159
|
+
Generic verification with multiple subtypes:
|
|
160
|
+
|
|
161
|
+
**Element Exists**
|
|
162
|
+
```typescript
|
|
163
|
+
{
|
|
164
|
+
type: 'verify',
|
|
165
|
+
verifyType: 'element_exists',
|
|
166
|
+
selector: '.success-message'
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Element Visible**
|
|
171
|
+
```typescript
|
|
172
|
+
{
|
|
173
|
+
type: 'verify',
|
|
174
|
+
verifyType: 'element_visible',
|
|
175
|
+
selector: '.modal'
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Element Text**
|
|
180
|
+
```typescript
|
|
181
|
+
{
|
|
182
|
+
type: 'verify',
|
|
183
|
+
verifyType: 'element_text',
|
|
184
|
+
selector: '.welcome-message',
|
|
185
|
+
text: 'Welcome back',
|
|
186
|
+
contains: true
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Element Count**
|
|
191
|
+
```typescript
|
|
192
|
+
{
|
|
193
|
+
type: 'verify',
|
|
194
|
+
verifyType: 'element_count',
|
|
195
|
+
selector: '.list-item',
|
|
196
|
+
count: 5
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Page Title**
|
|
201
|
+
```typescript
|
|
202
|
+
{
|
|
203
|
+
type: 'verify',
|
|
204
|
+
verifyType: 'page_title',
|
|
205
|
+
title: 'Dashboard',
|
|
206
|
+
contains: true
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
#### `verify_text`
|
|
211
|
+
Verify text appears anywhere on the page.
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
{
|
|
215
|
+
type: 'verify_text',
|
|
216
|
+
text: 'Success!',
|
|
217
|
+
shouldExist: true
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
#### `verify_url`
|
|
222
|
+
Verify the current URL.
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
{
|
|
226
|
+
type: 'verify_url',
|
|
227
|
+
url: '/dashboard',
|
|
228
|
+
contains: true
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### `verify_no_errors`
|
|
233
|
+
Verify no error indicators are present.
|
|
234
|
+
|
|
235
|
+
```typescript
|
|
236
|
+
{
|
|
237
|
+
type: 'verify_no_errors',
|
|
238
|
+
errorSelectors: ['.error', '.alert-danger', '[role="alert"]']
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
#### `check_element`
|
|
243
|
+
Check if an element exists (non-blocking).
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
{
|
|
247
|
+
type: 'check_element',
|
|
248
|
+
selector: '.optional-banner',
|
|
249
|
+
shouldExist: false
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Utility Steps
|
|
254
|
+
|
|
255
|
+
#### `screenshot`
|
|
256
|
+
Take a screenshot for visual verification.
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
{
|
|
260
|
+
type: 'screenshot',
|
|
261
|
+
filename: 'dashboard.png',
|
|
262
|
+
fullPage: true,
|
|
263
|
+
description: 'Capture dashboard state'
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Custom Logger
|
|
268
|
+
|
|
269
|
+
You can provide a custom logger implementation:
|
|
270
|
+
|
|
271
|
+
```typescript
|
|
272
|
+
import { FlowLogger } from '@plato-ai/sdk';
|
|
273
|
+
|
|
274
|
+
class CustomLogger implements FlowLogger {
|
|
275
|
+
info(message: string): void {
|
|
276
|
+
// Custom info logging
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
error(message: string): void {
|
|
280
|
+
// Custom error logging
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
warn(message: string): void {
|
|
284
|
+
// Custom warning logging
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
debug(message: string): void {
|
|
288
|
+
// Custom debug logging
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const executor = new FlowExecutor({
|
|
293
|
+
page,
|
|
294
|
+
flow,
|
|
295
|
+
logger: new CustomLogger()
|
|
296
|
+
});
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Complete Example with Error Handling
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
import { chromium } from 'playwright';
|
|
303
|
+
import { FlowExecutor, Flow } from '@plato-ai/sdk';
|
|
304
|
+
|
|
305
|
+
async function runCompleteFlow() {
|
|
306
|
+
let browser;
|
|
307
|
+
try {
|
|
308
|
+
browser = await chromium.launch({ headless: false });
|
|
309
|
+
const page = await browser.newPage();
|
|
310
|
+
|
|
311
|
+
const flow: Flow = {
|
|
312
|
+
name: 'e2e-test',
|
|
313
|
+
description: 'End-to-end test flow',
|
|
314
|
+
steps: [
|
|
315
|
+
{
|
|
316
|
+
type: 'navigate',
|
|
317
|
+
url: 'https://example.com',
|
|
318
|
+
description: 'Navigate to homepage'
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
type: 'screenshot',
|
|
322
|
+
filename: 'homepage.png',
|
|
323
|
+
fullPage: true,
|
|
324
|
+
description: 'Capture homepage'
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
type: 'verify',
|
|
328
|
+
verifyType: 'page_title',
|
|
329
|
+
title: 'Example Domain',
|
|
330
|
+
contains: false,
|
|
331
|
+
description: 'Verify page title'
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
type: 'verify_no_errors',
|
|
335
|
+
description: 'Ensure no errors on page'
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
const executor = new FlowExecutor({
|
|
341
|
+
page,
|
|
342
|
+
flow,
|
|
343
|
+
screenshotsDir: './test-screenshots'
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
const success = await executor.executeFlow();
|
|
347
|
+
|
|
348
|
+
if (success) {
|
|
349
|
+
console.log('✅ Flow completed successfully');
|
|
350
|
+
} else {
|
|
351
|
+
console.error('❌ Flow failed');
|
|
352
|
+
process.exit(1);
|
|
353
|
+
}
|
|
354
|
+
} catch (error) {
|
|
355
|
+
console.error('Fatal error:', error);
|
|
356
|
+
process.exit(1);
|
|
357
|
+
} finally {
|
|
358
|
+
if (browser) {
|
|
359
|
+
await browser.close();
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
runCompleteFlow();
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Features
|
|
368
|
+
|
|
369
|
+
- ✅ Type-safe flow definitions with TypeScript
|
|
370
|
+
- ✅ Comprehensive step types for common browser interactions
|
|
371
|
+
- ✅ Built-in verification and validation steps
|
|
372
|
+
- ✅ Automatic screenshot capture with timestamps
|
|
373
|
+
- ✅ Customizable logging
|
|
374
|
+
- ✅ Relative URL resolution
|
|
375
|
+
- ✅ Password masking in logs
|
|
376
|
+
- ✅ Detailed error messages
|
|
377
|
+
|
|
378
|
+
## Notes
|
|
379
|
+
|
|
380
|
+
- All timeouts are in milliseconds (default: 10000ms)
|
|
381
|
+
- Screenshots are automatically timestamped for chronological sorting
|
|
382
|
+
- Passwords in selectors containing "password" are automatically masked in logs
|
|
383
|
+
- The flow executor is protected from OpenAPI generator overwrites
|
|
384
|
+
|
package/dist/apis/EnvApi.d.ts
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plato API
|
|
3
|
-
* API for Plato platform - SDK routes only
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateSimulatorRequest, EvaluateRequest, JobStatusResponse, Log, MakeEnvRequest2, ResetEnvRequest, ScoreRequest, WorkerReadyResponse } from '../models/index';
|
|
14
|
-
export interface BackupEnvironmentRequest {
|
|
15
|
-
jobGroupId: string;
|
|
16
|
-
authorization?: string;
|
|
17
|
-
xInternalService?: string;
|
|
18
|
-
}
|
|
19
|
-
export interface CloseEnvironmentRequest {
|
|
20
|
-
jobGroupId: string;
|
|
21
|
-
authorization?: string;
|
|
22
|
-
xInternalService?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface CreateSimulatorOperationRequest {
|
|
25
|
-
createSimulatorRequest: CreateSimulatorRequest;
|
|
26
|
-
authorization?: string;
|
|
27
|
-
xInternalService?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface EvaluateSessionRequest {
|
|
30
|
-
sessionId: string;
|
|
31
|
-
authorization?: string;
|
|
32
|
-
xInternalService?: string;
|
|
33
|
-
evaluateRequest?: EvaluateRequest;
|
|
34
|
-
}
|
|
35
|
-
export interface GetActiveSessionRequest {
|
|
36
|
-
jobGroupId: string;
|
|
37
|
-
authorization?: string;
|
|
38
|
-
xInternalService?: string;
|
|
39
|
-
}
|
|
40
|
-
export interface GetCdpUrlRequest {
|
|
41
|
-
jobGroupId: string;
|
|
42
|
-
authorization?: string;
|
|
43
|
-
xInternalService?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface GetEnvironmentStateRequest {
|
|
46
|
-
jobGroupId: string;
|
|
47
|
-
authorization?: string;
|
|
48
|
-
xInternalService?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface GetJobStatusRequest {
|
|
51
|
-
jobGroupId: string;
|
|
52
|
-
authorization?: string;
|
|
53
|
-
xInternalService?: string;
|
|
54
|
-
}
|
|
55
|
-
export interface GetProxyUrlRequest {
|
|
56
|
-
jobGroupId: string;
|
|
57
|
-
authorization?: string;
|
|
58
|
-
xInternalService?: string;
|
|
59
|
-
}
|
|
60
|
-
export interface GetSimulatorsRequest {
|
|
61
|
-
authorization?: string;
|
|
62
|
-
xInternalService?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface GetWorkerReadyApiEnvJobIdWorkerReadyGetRequest {
|
|
65
|
-
jobId: string;
|
|
66
|
-
timeout?: number;
|
|
67
|
-
authorization?: string;
|
|
68
|
-
xInternalService?: string;
|
|
69
|
-
}
|
|
70
|
-
export interface LogStateMutationApiEnvSessionIdLogPostRequest {
|
|
71
|
-
sessionId: string;
|
|
72
|
-
log: Log;
|
|
73
|
-
}
|
|
74
|
-
export interface MakeEnvironmentRequest {
|
|
75
|
-
makeEnvRequest2: MakeEnvRequest2;
|
|
76
|
-
authorization?: string;
|
|
77
|
-
xInternalService?: string;
|
|
78
|
-
}
|
|
79
|
-
export interface ResetEnvironmentRequest {
|
|
80
|
-
jobGroupId: string;
|
|
81
|
-
resetEnvRequest: ResetEnvRequest;
|
|
82
|
-
authorization?: string;
|
|
83
|
-
xInternalService?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface ScoreEnvApiEnvSessionSessionIdScorePostRequest {
|
|
86
|
-
sessionId: string;
|
|
87
|
-
scoreRequest: ScoreRequest;
|
|
88
|
-
authorization?: string;
|
|
89
|
-
xInternalService?: string;
|
|
90
|
-
}
|
|
91
|
-
export interface SendHeartbeatRequest {
|
|
92
|
-
jobId: string;
|
|
93
|
-
authorization?: string;
|
|
94
|
-
xInternalService?: string;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
*/
|
|
99
|
-
export declare class EnvApi extends runtime.BaseAPI {
|
|
100
|
-
/**
|
|
101
|
-
* Create a backup of the environment.
|
|
102
|
-
* Backup Env
|
|
103
|
-
*/
|
|
104
|
-
backupEnvironmentRaw(requestParameters: BackupEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
}>>;
|
|
107
|
-
/**
|
|
108
|
-
* Create a backup of the environment.
|
|
109
|
-
* Backup Env
|
|
110
|
-
*/
|
|
111
|
-
backupEnvironment(requestParameters: BackupEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
112
|
-
[key: string]: any;
|
|
113
|
-
}>;
|
|
114
|
-
/**
|
|
115
|
-
* Close Env
|
|
116
|
-
*/
|
|
117
|
-
closeEnvironmentRaw(requestParameters: CloseEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
118
|
-
[key: string]: any;
|
|
119
|
-
}>>;
|
|
120
|
-
/**
|
|
121
|
-
* Close Env
|
|
122
|
-
*/
|
|
123
|
-
closeEnvironment(requestParameters: CloseEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
124
|
-
[key: string]: any;
|
|
125
|
-
}>;
|
|
126
|
-
/**
|
|
127
|
-
* Create a new simulator.
|
|
128
|
-
* Create Simulator
|
|
129
|
-
*/
|
|
130
|
-
createSimulatorRaw(requestParameters: CreateSimulatorOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
131
|
-
[key: string]: any;
|
|
132
|
-
}>>;
|
|
133
|
-
/**
|
|
134
|
-
* Create a new simulator.
|
|
135
|
-
* Create Simulator
|
|
136
|
-
*/
|
|
137
|
-
createSimulator(requestParameters: CreateSimulatorOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
138
|
-
[key: string]: any;
|
|
139
|
-
}>;
|
|
140
|
-
/**
|
|
141
|
-
* Evaluate the session.
|
|
142
|
-
* Evaluate Session
|
|
143
|
-
*/
|
|
144
|
-
evaluateSessionRaw(requestParameters: EvaluateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
145
|
-
[key: string]: any;
|
|
146
|
-
}>>;
|
|
147
|
-
/**
|
|
148
|
-
* Evaluate the session.
|
|
149
|
-
* Evaluate Session
|
|
150
|
-
*/
|
|
151
|
-
evaluateSession(requestParameters: EvaluateSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
152
|
-
[key: string]: any;
|
|
153
|
-
}>;
|
|
154
|
-
/**
|
|
155
|
-
* Get the active session for a job group.
|
|
156
|
-
* Get Active Session
|
|
157
|
-
*/
|
|
158
|
-
getActiveSessionRaw(requestParameters: GetActiveSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
159
|
-
[key: string]: any;
|
|
160
|
-
}>>;
|
|
161
|
-
/**
|
|
162
|
-
* Get the active session for a job group.
|
|
163
|
-
* Get Active Session
|
|
164
|
-
*/
|
|
165
|
-
getActiveSession(requestParameters: GetActiveSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
166
|
-
[key: string]: any;
|
|
167
|
-
}>;
|
|
168
|
-
/**
|
|
169
|
-
* Get the CDP URL for the environment.
|
|
170
|
-
* Get Cdp Url
|
|
171
|
-
*/
|
|
172
|
-
getCdpUrlRaw(requestParameters: GetCdpUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
173
|
-
[key: string]: any;
|
|
174
|
-
}>>;
|
|
175
|
-
/**
|
|
176
|
-
* Get the CDP URL for the environment.
|
|
177
|
-
* Get Cdp Url
|
|
178
|
-
*/
|
|
179
|
-
getCdpUrl(requestParameters: GetCdpUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
180
|
-
[key: string]: any;
|
|
181
|
-
}>;
|
|
182
|
-
/**
|
|
183
|
-
* Get Env State
|
|
184
|
-
*/
|
|
185
|
-
getEnvironmentStateRaw(requestParameters: GetEnvironmentStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
186
|
-
[key: string]: any;
|
|
187
|
-
}>>;
|
|
188
|
-
/**
|
|
189
|
-
* Get Env State
|
|
190
|
-
*/
|
|
191
|
-
getEnvironmentState(requestParameters: GetEnvironmentStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
192
|
-
[key: string]: any;
|
|
193
|
-
}>;
|
|
194
|
-
/**
|
|
195
|
-
* Get Job Status
|
|
196
|
-
*/
|
|
197
|
-
getJobStatusRaw(requestParameters: GetJobStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobStatusResponse>>;
|
|
198
|
-
/**
|
|
199
|
-
* Get Job Status
|
|
200
|
-
*/
|
|
201
|
-
getJobStatus(requestParameters: GetJobStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobStatusResponse>;
|
|
202
|
-
/**
|
|
203
|
-
* Get the public URL for the environment.
|
|
204
|
-
* Get Proxy Url
|
|
205
|
-
*/
|
|
206
|
-
getProxyUrlRaw(requestParameters: GetProxyUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
207
|
-
[key: string]: any;
|
|
208
|
-
}>>;
|
|
209
|
-
/**
|
|
210
|
-
* Get the public URL for the environment.
|
|
211
|
-
* Get Proxy Url
|
|
212
|
-
*/
|
|
213
|
-
getProxyUrl(requestParameters: GetProxyUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
214
|
-
[key: string]: any;
|
|
215
|
-
}>;
|
|
216
|
-
/**
|
|
217
|
-
* Get all simulators with optimized queries.
|
|
218
|
-
* Get Simulators
|
|
219
|
-
*/
|
|
220
|
-
getSimulatorsRaw(requestParameters: GetSimulatorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
|
|
221
|
-
[key: string]: any;
|
|
222
|
-
}>>>;
|
|
223
|
-
/**
|
|
224
|
-
* Get all simulators with optimized queries.
|
|
225
|
-
* Get Simulators
|
|
226
|
-
*/
|
|
227
|
-
getSimulators(requestParameters?: GetSimulatorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
228
|
-
[key: string]: any;
|
|
229
|
-
}>>;
|
|
230
|
-
/**
|
|
231
|
-
* Check if the workers for this job group are ready and healthy. Uses the persistent job ready notification service to wait for job readiness. Falls back to checking Redis if notification not received (in case we missed it). Raises 500 if job not ready after all checks.
|
|
232
|
-
* Get Worker Ready
|
|
233
|
-
*/
|
|
234
|
-
getWorkerReadyApiEnvJobIdWorkerReadyGetRaw(requestParameters: GetWorkerReadyApiEnvJobIdWorkerReadyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkerReadyResponse>>;
|
|
235
|
-
/**
|
|
236
|
-
* Check if the workers for this job group are ready and healthy. Uses the persistent job ready notification service to wait for job readiness. Falls back to checking Redis if notification not received (in case we missed it). Raises 500 if job not ready after all checks.
|
|
237
|
-
* Get Worker Ready
|
|
238
|
-
*/
|
|
239
|
-
getWorkerReadyApiEnvJobIdWorkerReadyGet(requestParameters: GetWorkerReadyApiEnvJobIdWorkerReadyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkerReadyResponse>;
|
|
240
|
-
/**
|
|
241
|
-
* Log a state mutation or batch of mutations.
|
|
242
|
-
* Log State Mutation
|
|
243
|
-
*/
|
|
244
|
-
logStateMutationApiEnvSessionIdLogPostRaw(requestParameters: LogStateMutationApiEnvSessionIdLogPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
245
|
-
[key: string]: any;
|
|
246
|
-
}>>;
|
|
247
|
-
/**
|
|
248
|
-
* Log a state mutation or batch of mutations.
|
|
249
|
-
* Log State Mutation
|
|
250
|
-
*/
|
|
251
|
-
logStateMutationApiEnvSessionIdLogPost(requestParameters: LogStateMutationApiEnvSessionIdLogPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
252
|
-
[key: string]: any;
|
|
253
|
-
}>;
|
|
254
|
-
/**
|
|
255
|
-
* Make Env
|
|
256
|
-
*/
|
|
257
|
-
makeEnvironmentRaw(requestParameters: MakeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
258
|
-
[key: string]: any;
|
|
259
|
-
}>>;
|
|
260
|
-
/**
|
|
261
|
-
* Make Env
|
|
262
|
-
*/
|
|
263
|
-
makeEnvironment(requestParameters: MakeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
264
|
-
[key: string]: any;
|
|
265
|
-
}>;
|
|
266
|
-
/**
|
|
267
|
-
* Reset the environment with an optional task.
|
|
268
|
-
* Reset Env
|
|
269
|
-
*/
|
|
270
|
-
resetEnvironmentRaw(requestParameters: ResetEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
271
|
-
[key: string]: any;
|
|
272
|
-
}>>;
|
|
273
|
-
/**
|
|
274
|
-
* Reset the environment with an optional task.
|
|
275
|
-
* Reset Env
|
|
276
|
-
*/
|
|
277
|
-
resetEnvironment(requestParameters: ResetEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
278
|
-
[key: string]: any;
|
|
279
|
-
}>;
|
|
280
|
-
/**
|
|
281
|
-
* Score the environment.
|
|
282
|
-
* Score Env
|
|
283
|
-
*/
|
|
284
|
-
scoreEnvApiEnvSessionSessionIdScorePostRaw(requestParameters: ScoreEnvApiEnvSessionSessionIdScorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
285
|
-
[key: string]: any;
|
|
286
|
-
}>>;
|
|
287
|
-
/**
|
|
288
|
-
* Score the environment.
|
|
289
|
-
* Score Env
|
|
290
|
-
*/
|
|
291
|
-
scoreEnvApiEnvSessionSessionIdScorePost(requestParameters: ScoreEnvApiEnvSessionSessionIdScorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
292
|
-
[key: string]: any;
|
|
293
|
-
}>;
|
|
294
|
-
/**
|
|
295
|
-
* Send a heartbeat to keep the environment session alive.
|
|
296
|
-
* Send Heartbeat
|
|
297
|
-
*/
|
|
298
|
-
sendHeartbeatRaw(requestParameters: SendHeartbeatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
299
|
-
[key: string]: any;
|
|
300
|
-
}>>;
|
|
301
|
-
/**
|
|
302
|
-
* Send a heartbeat to keep the environment session alive.
|
|
303
|
-
* Send Heartbeat
|
|
304
|
-
*/
|
|
305
|
-
sendHeartbeat(requestParameters: SendHeartbeatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
306
|
-
[key: string]: any;
|
|
307
|
-
}>;
|
|
308
|
-
}
|