workflow-common 1.0.3 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/package.json +1 -1
  2. package/{index.d.ts → src/index.ts} +2 -2
  3. package/src/tasks/AddPropertyToJsonTask.ts +31 -0
  4. package/src/tasks/ApplySessionSorageTask.ts +31 -0
  5. package/src/tasks/CheckElementExistsTask.ts +30 -0
  6. package/src/tasks/ClearInputTask.ts +26 -0
  7. package/src/tasks/ClickElementTask.ts +26 -0
  8. package/src/tasks/CloseBrowserTask.ts +16 -0
  9. package/src/tasks/DeliverViaWebhookTask.ts +21 -0
  10. package/src/tasks/DoubleClickElementTask.ts +26 -0
  11. package/src/tasks/ExtractElementByTextTask.ts +46 -0
  12. package/src/tasks/ExtractTextAndValidateTask.ts +36 -0
  13. package/src/tasks/FillCredentialsTask.ts +31 -0
  14. package/src/tasks/FillInputTask.ts +32 -0
  15. package/src/tasks/GoForwardTask.ts +21 -0
  16. package/src/tasks/GobackTask.ts +21 -0
  17. package/src/tasks/HoverElementTask.ts +26 -0
  18. package/src/tasks/HttpRequestTask.ts +57 -0
  19. package/src/tasks/LaunchBrowserTask.ts +25 -0
  20. package/src/tasks/LogMessageTask.ts +36 -0
  21. package/src/tasks/LoginViaBasicAuthTask.ts +31 -0
  22. package/src/tasks/NavigateUrlTask.ts +29 -0
  23. package/src/tasks/PageToHtmlTask.ts +25 -0
  24. package/src/tasks/PressKeyTask.ts +33 -0
  25. package/src/tasks/ReadPropertyFromJsonTask.ts +26 -0
  26. package/src/tasks/ReloadPageTask.ts +21 -0
  27. package/src/tasks/RightClickElementTask.ts +26 -0
  28. package/src/tasks/ScrollToBottomTask.ts +26 -0
  29. package/src/tasks/ScrollToElementTask.ts +26 -0
  30. package/src/tasks/ScrollToTopTask.ts +26 -0
  31. package/src/tasks/SelectDropdownTask.ts +31 -0
  32. package/src/tasks/SetCookieTask.ts +47 -0
  33. package/src/tasks/StoreAuthTokenTask.ts +45 -0
  34. package/src/tasks/TaskRegisteryTask.ts +171 -0
  35. package/src/tasks/ToggleCheckboxTask.ts +32 -0
  36. package/src/tasks/UploadFileTask.ts +31 -0
  37. package/src/tasks/ValidateCheckboxTask.ts +42 -0
  38. package/src/tasks/WaitForElementTask.ts +42 -0
  39. package/src/tasks/WaitForNavigationTask.ts +21 -0
  40. package/src/tasks/WaitForTimeTask.ts +27 -0
  41. package/{tasks/index.d.ts → src/tasks/index.ts} +38 -37
  42. package/src/types/appNode.ts +25 -0
  43. package/src/types/common.ts +5 -0
  44. package/src/types/execution.ts +40 -0
  45. package/src/types/executor.ts +33 -0
  46. package/{types/index.d.ts → src/types/index.ts} +10 -10
  47. package/src/types/log.ts +16 -0
  48. package/src/types/schedule.ts +119 -0
  49. package/src/types/suites.ts +13 -0
  50. package/src/types/task.ts +81 -0
  51. package/src/types/workflow.ts +49 -0
  52. package/src/types/workflowTasks.ts +9 -0
  53. package/tsconfig.json +13 -0
  54. package/index.js +0 -18
  55. package/tasks/AddPropertyToJsonTask.d.ts +0 -2
  56. package/tasks/AddPropertyToJsonTask.js +0 -32
  57. package/tasks/ApplySessionSorageTask.d.ts +0 -2
  58. package/tasks/ApplySessionSorageTask.js +0 -32
  59. package/tasks/CheckElementExistsTask.d.ts +0 -2
  60. package/tasks/CheckElementExistsTask.js +0 -31
  61. package/tasks/ClearInputTask.d.ts +0 -2
  62. package/tasks/ClearInputTask.js +0 -27
  63. package/tasks/ClickElementTask.d.ts +0 -2
  64. package/tasks/ClickElementTask.js +0 -27
  65. package/tasks/CloseBrowserTask.d.ts +0 -2
  66. package/tasks/CloseBrowserTask.js +0 -17
  67. package/tasks/DeliverViaWebhookTask.d.ts +0 -2
  68. package/tasks/DeliverViaWebhookTask.js +0 -22
  69. package/tasks/DoubleClickElementTask.d.ts +0 -2
  70. package/tasks/DoubleClickElementTask.js +0 -27
  71. package/tasks/ExtractElementByTextTask.d.ts +0 -2
  72. package/tasks/ExtractElementByTextTask.js +0 -47
  73. package/tasks/ExtractTextAndValidateTask.d.ts +0 -2
  74. package/tasks/ExtractTextAndValidateTask.js +0 -37
  75. package/tasks/FillCredentialsTask.d.ts +0 -2
  76. package/tasks/FillCredentialsTask.js +0 -32
  77. package/tasks/FillInputTask.d.ts +0 -2
  78. package/tasks/FillInputTask.js +0 -32
  79. package/tasks/GoForwardTask.d.ts +0 -2
  80. package/tasks/GoForwardTask.js +0 -22
  81. package/tasks/GobackTask.d.ts +0 -2
  82. package/tasks/GobackTask.js +0 -22
  83. package/tasks/HoverElementTask.d.ts +0 -2
  84. package/tasks/HoverElementTask.js +0 -27
  85. package/tasks/HttpRequestTask.d.ts +0 -2
  86. package/tasks/HttpRequestTask.js +0 -58
  87. package/tasks/LaunchBrowserTask.d.ts +0 -2
  88. package/tasks/LaunchBrowserTask.js +0 -21
  89. package/tasks/LogMessageTask.d.ts +0 -2
  90. package/tasks/LogMessageTask.js +0 -37
  91. package/tasks/LoginViaBasicAuthTask.d.ts +0 -2
  92. package/tasks/LoginViaBasicAuthTask.js +0 -32
  93. package/tasks/NavigateUrlTask.d.ts +0 -2
  94. package/tasks/NavigateUrlTask.js +0 -27
  95. package/tasks/PageToHtmlTask.d.ts +0 -2
  96. package/tasks/PageToHtmlTask.js +0 -26
  97. package/tasks/PressKeyTask.d.ts +0 -2
  98. package/tasks/PressKeyTask.js +0 -34
  99. package/tasks/ReadPropertyFromJsonTask.d.ts +0 -2
  100. package/tasks/ReadPropertyFromJsonTask.js +0 -27
  101. package/tasks/ReloadPageTask.d.ts +0 -2
  102. package/tasks/ReloadPageTask.js +0 -22
  103. package/tasks/RightClickElementTask.d.ts +0 -2
  104. package/tasks/RightClickElementTask.js +0 -27
  105. package/tasks/ScrollToBottomTask.d.ts +0 -2
  106. package/tasks/ScrollToBottomTask.js +0 -27
  107. package/tasks/ScrollToElementTask.d.ts +0 -2
  108. package/tasks/ScrollToElementTask.js +0 -27
  109. package/tasks/ScrollToTopTask.d.ts +0 -2
  110. package/tasks/ScrollToTopTask.js +0 -27
  111. package/tasks/SelectDropdownTask.d.ts +0 -2
  112. package/tasks/SelectDropdownTask.js +0 -32
  113. package/tasks/SetCookieTask.d.ts +0 -2
  114. package/tasks/SetCookieTask.js +0 -48
  115. package/tasks/StoreAuthTokenTask.d.ts +0 -2
  116. package/tasks/StoreAuthTokenTask.js +0 -46
  117. package/tasks/TaskRegisteryTask.d.ts +0 -41
  118. package/tasks/TaskRegisteryTask.js +0 -157
  119. package/tasks/ToogleCheckboxTask.d.ts +0 -0
  120. package/tasks/ToogleCheckboxTask.js +0 -32
  121. package/tasks/UploadFileTask.d.ts +0 -2
  122. package/tasks/UploadFileTask.js +0 -32
  123. package/tasks/ValidateCheckboxTask.d.ts +0 -2
  124. package/tasks/ValidateCheckboxTask.js +0 -43
  125. package/tasks/WaitForElementTask.d.ts +0 -2
  126. package/tasks/WaitForElementTask.js +0 -43
  127. package/tasks/WaitForNavigationTask.d.ts +0 -2
  128. package/tasks/WaitForNavigationTask.js +0 -22
  129. package/tasks/WaitForTimeTask.d.ts +0 -2
  130. package/tasks/WaitForTimeTask.js +0 -28
  131. package/tasks/index.js +0 -54
  132. package/types/appNode.d.ts +0 -21
  133. package/types/appNode.js +0 -2
  134. package/types/common.d.ts +0 -4
  135. package/types/common.js +0 -8
  136. package/types/execution.d.ts +0 -37
  137. package/types/execution.js +0 -2
  138. package/types/executor.d.ts +0 -30
  139. package/types/executor.js +0 -2
  140. package/types/index.js +0 -26
  141. package/types/log.d.ts +0 -15
  142. package/types/log.js +0 -2
  143. package/types/schedule.d.ts +0 -52
  144. package/types/schedule.js +0 -75
  145. package/types/suites.d.ts +0 -12
  146. package/types/suites.js +0 -2
  147. package/types/task.d.ts +0 -61
  148. package/types/task.js +0 -63
  149. package/types/workflow.d.ts +0 -41
  150. package/types/workflow.js +0 -35
  151. package/types/workflowTasks.d.ts +0 -8
  152. package/types/workflowTasks.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow-common",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "this is shared library project for bolt ui and backend",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,2 +1,2 @@
1
- export * from './tasks';
2
- export * from './types';
1
+ export * from './tasks';
2
+ export * from './types';
@@ -0,0 +1,31 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const AddPropertyToJsonTask: WorkflowTask = {
5
+ type: TaskType.ADD_PROPERTY_TO_JSON,
6
+ label: 'Add Property to JSON',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'JSON',
11
+ type: TaskParamType.STRING,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Property name',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Property value',
21
+ type: TaskParamType.STRING,
22
+ required: true,
23
+ },
24
+ ] as const,
25
+ outputs: [
26
+ {
27
+ name: 'Updated JSON',
28
+ type: TaskParamType.STRING,
29
+ },
30
+ ] as const,
31
+ };
@@ -0,0 +1,31 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const ApplySessionStorageTask: WorkflowTask = {
5
+ type: TaskType.APPLY_SESSION_STORAGE,
6
+ label: 'Apply Session Storage',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Key',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Value',
21
+ type: TaskParamType.STRING,
22
+ required: true,
23
+ },
24
+ ] as const,
25
+ outputs: [
26
+ {
27
+ name: 'Web page',
28
+ type: TaskParamType.BROWSER_INSTANCE,
29
+ },
30
+ ] as const,
31
+ };
@@ -0,0 +1,30 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const CheckElementExistsTask: WorkflowTask = {
5
+ type: TaskType.CHECK_ELEMENT_EXISTS,
6
+ label: 'Check Element Exists',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ ] as const,
20
+ outputs: [
21
+ {
22
+ name: 'Exists',
23
+ type: TaskParamType.BOOLEAN,
24
+ },
25
+ {
26
+ name: 'Web page',
27
+ type: TaskParamType.BROWSER_INSTANCE,
28
+ },
29
+ ] as const,
30
+ };
@@ -0,0 +1,26 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const ClearInputTask: WorkflowTask = {
5
+ type: TaskType.CLEAR_INPUT,
6
+ label: 'Clear Input Field',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ ] as const,
20
+ outputs: [
21
+ {
22
+ name: 'Web page',
23
+ type: TaskParamType.BROWSER_INSTANCE,
24
+ },
25
+ ] as const,
26
+ };
@@ -0,0 +1,26 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const ClickElementTask: WorkflowTask = {
5
+ type: TaskType.CLICK_ELEMENT,
6
+ label: 'Click element',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ ] as const,
20
+ outputs: [
21
+ {
22
+ name: 'Web page',
23
+ type: TaskParamType.BROWSER_INSTANCE,
24
+ },
25
+ ] as const,
26
+ };
@@ -0,0 +1,16 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const CloseBrowserTask: WorkflowTask = {
5
+ type: TaskType.CLOSE_BROWSER,
6
+ label: 'Close Browser',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ ] as const,
15
+ outputs: [] as const, // No output because browser is closed
16
+ };
@@ -0,0 +1,21 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const DeliverViaWebhookTask: WorkflowTask = {
5
+ type: TaskType.DELIVER_VIA_WEBHOOK,
6
+ label: 'Deliver via webhook',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Target URL',
11
+ type: TaskParamType.STRING,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Body',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ ] as const,
20
+ outputs: [] as const,
21
+ };
@@ -0,0 +1,26 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const DoubleClickElementTask: WorkflowTask = {
5
+ type: TaskType.DOUBLE_CLICK_ELEMENT,
6
+ label: 'Double Click Element',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ ] as const,
20
+ outputs: [
21
+ {
22
+ name: 'Web page',
23
+ type: TaskParamType.BROWSER_INSTANCE,
24
+ },
25
+ ] as const,
26
+ };
@@ -0,0 +1,46 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const ExtractElementByTextTask: WorkflowTask = {
5
+ type: TaskType.EXTRACT_ELEMENT_BY_TEXT,
6
+ label: 'Extract Element by text',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'text',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'element',
21
+ type: TaskParamType.SELECT,
22
+ hideHandle: true,
23
+ required: true,
24
+ options: [
25
+ {
26
+ label: 'div',
27
+ value: 'div',
28
+ },
29
+ {
30
+ label: 'button',
31
+ value: 'button',
32
+ },
33
+ ],
34
+ },
35
+ ] as const,
36
+ outputs: [
37
+ {
38
+ name: 'Web page',
39
+ type: TaskParamType.BROWSER_INSTANCE,
40
+ },
41
+ {
42
+ name: 'Element Selector',
43
+ type: TaskParamType.STRING,
44
+ },
45
+ ] as const,
46
+ };
@@ -0,0 +1,36 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const ExtractTextAndValidateTask: WorkflowTask = {
5
+ type: TaskType.EXTRACT_TEXT_AND_VALIDATE,
6
+ label: 'Extract text and validate',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ variant: 'textarea',
14
+ },
15
+ {
16
+ name: 'Selector',
17
+ type: TaskParamType.STRING,
18
+ required: true,
19
+ },
20
+ {
21
+ name: 'Exptected text',
22
+ type: TaskParamType.STRING,
23
+ required: true,
24
+ },
25
+ ] as const,
26
+ outputs: [
27
+ {
28
+ name: 'Extracted text',
29
+ type: TaskParamType.STRING,
30
+ },
31
+ {
32
+ name: 'Web page',
33
+ type: TaskParamType.BROWSER_INSTANCE,
34
+ },
35
+ ] as const,
36
+ };
@@ -0,0 +1,31 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const FillCredentialTask: WorkflowTask = {
5
+ type: TaskType.FILL_CREDENTIAL,
6
+ label: 'Fill Credential',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Credential',
21
+ type: TaskParamType.CREDENTIAL,
22
+ required: true,
23
+ },
24
+ ] as const,
25
+ outputs: [
26
+ {
27
+ name: 'Web page',
28
+ type: TaskParamType.BROWSER_INSTANCE,
29
+ },
30
+ ] as const,
31
+ };
@@ -0,0 +1,32 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const FillInputTask: WorkflowTask = {
5
+ type: TaskType.FILL_INPUT,
6
+ label: 'Fill Input',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Value',
21
+ type: TaskParamType.STRING,
22
+ required: true,
23
+ variableSource: true,
24
+ },
25
+ ] as const,
26
+ outputs: [
27
+ {
28
+ name: 'Web page',
29
+ type: TaskParamType.BROWSER_INSTANCE,
30
+ },
31
+ ] as const,
32
+ };
@@ -0,0 +1,21 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const GoForwardTask: WorkflowTask = {
5
+ type: TaskType.GO_FORWARD,
6
+ label: 'Go Forward',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ ] as const,
15
+ outputs: [
16
+ {
17
+ name: 'Web page',
18
+ type: TaskParamType.BROWSER_INSTANCE,
19
+ },
20
+ ] as const,
21
+ };
@@ -0,0 +1,21 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const GoBackTask: WorkflowTask = {
5
+ type: TaskType.GO_BACK,
6
+ label: 'Go Back',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ ] as const,
15
+ outputs: [
16
+ {
17
+ name: 'Web page',
18
+ type: TaskParamType.BROWSER_INSTANCE,
19
+ },
20
+ ] as const,
21
+ };
@@ -0,0 +1,26 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const HoverElementTask: WorkflowTask = {
5
+ type: TaskType.HOVER_ELEMENT,
6
+ label: 'Hover Over Element',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Selector',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ ] as const,
20
+ outputs: [
21
+ {
22
+ name: 'Web page',
23
+ type: TaskParamType.BROWSER_INSTANCE,
24
+ },
25
+ ] as const,
26
+ };
@@ -0,0 +1,57 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const HttpRequestTask: WorkflowTask = {
5
+ type: TaskType.HTTP_REQUEST,
6
+ label: 'HTTP Request',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web Page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'URL',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Method',
21
+ type: TaskParamType.SELECT,
22
+ required: true,
23
+ options: [
24
+ { label: 'GET', value: 'GET' },
25
+ { label: 'POST', value: 'POST' },
26
+ { label: 'PUT', value: 'PUT' },
27
+ { label: 'DELETE', value: 'DELETE' },
28
+ { label: 'PATCH', value: 'PATCH' },
29
+ ],
30
+ },
31
+ {
32
+ name: 'Headers (JSON)',
33
+ type: TaskParamType.JSON,
34
+ required: false,
35
+ },
36
+ {
37
+ name: 'Body (JSON)',
38
+ type: TaskParamType.JSON,
39
+ required: false,
40
+ },
41
+ ] as const,
42
+ outputs: [
43
+ {
44
+ name: 'Response Status',
45
+ type: TaskParamType.NUMBER,
46
+ },
47
+ {
48
+ name: 'Response Body',
49
+ type: TaskParamType.JSON,
50
+ },
51
+ {
52
+ name: 'Web Page',
53
+ type: TaskParamType.BROWSER_INSTANCE,
54
+ required: true,
55
+ },
56
+ ] as const,
57
+ };
@@ -0,0 +1,25 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const LaunchBrowserTask: WorkflowTask = {
5
+ type: TaskType.LAUNCH_BROWSER,
6
+ label: 'Launch Browser',
7
+ isEntryPoint: true,
8
+ inputs: [
9
+ {
10
+ name: 'Website URL',
11
+ type: TaskParamType.STRING,
12
+ required: true,
13
+ hideHandle: true,
14
+ variableSource: true,
15
+ info: 'Enter the URL to launch the browser and start your test. You can use variables by selecting them from the dropdown—e.g., {{url}}/login will use the value of the "url" variable and append "/login".',
16
+ hint: 'eg: https://www.example.com',
17
+ },
18
+ ] as const,
19
+ outputs: [
20
+ {
21
+ name: 'Web page',
22
+ type: TaskParamType.BROWSER_INSTANCE,
23
+ },
24
+ ] as const,
25
+ };
@@ -0,0 +1,36 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const LogMessageTask: WorkflowTask = {
5
+ type: TaskType.LOG_MESSAGE,
6
+ label: 'Log Message',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web Page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Message',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Message Type',
21
+ type: TaskParamType.SELECT,
22
+ required: true,
23
+ options: [
24
+ { label: 'Info', value: 'info' },
25
+ { label: 'Error', value: 'error' },
26
+ ],
27
+ },
28
+ ] as const,
29
+ outputs: [
30
+ {
31
+ name: 'Web Page',
32
+ type: TaskParamType.BROWSER_INSTANCE,
33
+ required: true,
34
+ },
35
+ ] as const,
36
+ };
@@ -0,0 +1,31 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const LoginViaBasicAuthTask: WorkflowTask = {
5
+ type: TaskType.LOGIN_VIA_BASIC_AUTH,
6
+ label: 'Login via Basic Auth',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Username',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ },
19
+ {
20
+ name: 'Password',
21
+ type: TaskParamType.STRING,
22
+ required: true,
23
+ },
24
+ ] as const,
25
+ outputs: [
26
+ {
27
+ name: 'Web page',
28
+ type: TaskParamType.BROWSER_INSTANCE,
29
+ },
30
+ ] as const,
31
+ };
@@ -0,0 +1,29 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const NavigateUrlTask: WorkflowTask = {
5
+ type: TaskType.NAVIGATE_URL,
6
+ label: 'Navigate Url',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ {
15
+ name: 'Url',
16
+ type: TaskParamType.STRING,
17
+ required: true,
18
+ variableSource: true,
19
+ info: 'The URL to navigate to. You can use variables by selecting them from the dropdown, e.g., {{url}}/login will use the value of the "url" variable and append "/login".',
20
+ hint: 'eg: https://www.example.com',
21
+ },
22
+ ] as const,
23
+ outputs: [
24
+ {
25
+ name: 'Web page',
26
+ type: TaskParamType.BROWSER_INSTANCE,
27
+ },
28
+ ] as const,
29
+ };
@@ -0,0 +1,25 @@
1
+ import { WorkflowTask } from '../types/workflowTasks';
2
+ import { TaskParamType, TaskType } from '../types/task';
3
+
4
+ export const PageToHtmlTask: WorkflowTask = {
5
+ type: TaskType.PAGE_TO_HTML,
6
+ label: 'Get Web page HTML',
7
+ isEntryPoint: false,
8
+ inputs: [
9
+ {
10
+ name: 'Web Page',
11
+ type: TaskParamType.BROWSER_INSTANCE,
12
+ required: true,
13
+ },
14
+ ] as const,
15
+ outputs: [
16
+ {
17
+ name: 'Html',
18
+ type: TaskParamType.STRING,
19
+ },
20
+ {
21
+ name: 'Web Page',
22
+ type: TaskParamType.BROWSER_INSTANCE,
23
+ },
24
+ ] as const,
25
+ };