@api-client/core 0.9.3 → 0.9.5
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/build/browser.d.ts +12 -2
- package/build/browser.js +15 -2
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +13 -3
- package/build/index.js +16 -3
- package/build/index.js.map +1 -1
- package/build/src/data/{JmesparthReader.d.ts → JmespathReader.d.ts} +1 -1
- package/build/src/data/{JmesparthReader.js → JmespathReader.js} +2 -2
- package/build/src/data/JmespathReader.js.map +1 -0
- package/build/src/data/RequestDataExtractor.d.ts +5 -5
- package/build/src/data/RequestDataExtractor.js.map +1 -1
- package/build/src/data/XmlReader.js +14 -1
- package/build/src/data/XmlReader.js.map +1 -1
- package/build/src/models/ClientCertificate.d.ts +9 -0
- package/build/src/models/ClientCertificate.js.map +1 -1
- package/build/src/models/Environment.d.ts +3 -2
- package/build/src/models/Environment.js +11 -6
- package/build/src/models/Environment.js.map +1 -1
- package/build/src/models/ErrorResponse.js.map +1 -1
- package/build/src/models/HttpRequest.d.ts +2 -7
- package/build/src/models/HttpRequest.js +1 -6
- package/build/src/models/HttpRequest.js.map +1 -1
- package/build/src/models/HttpResponse.d.ts +2 -7
- package/build/src/models/HttpResponse.js +1 -3
- package/build/src/models/HttpResponse.js.map +1 -1
- package/build/src/models/ProjectRequest.d.ts +19 -0
- package/build/src/models/ProjectRequest.js +50 -0
- package/build/src/models/ProjectRequest.js.map +1 -1
- package/build/src/models/Request.d.ts +12 -3
- package/build/src/models/Request.js +14 -1
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/RequestAuthorization.js.map +1 -1
- package/build/src/models/RequestLog.d.ts +11 -0
- package/build/src/models/RequestLog.js +15 -1
- package/build/src/models/RequestLog.js.map +1 -1
- package/build/src/models/SerializablePayload.d.ts +6 -1
- package/build/src/models/SerializablePayload.js +10 -6
- package/build/src/models/SerializablePayload.js.map +1 -1
- package/build/src/models/http-actions/AssertionError.d.ts +36 -0
- package/build/src/models/http-actions/AssertionError.js +35 -0
- package/build/src/models/http-actions/AssertionError.js.map +1 -0
- package/build/src/models/http-actions/HttpAssertion.d.ts +84 -0
- package/build/src/models/http-actions/HttpAssertion.js +52 -0
- package/build/src/models/http-actions/HttpAssertion.js.map +1 -0
- package/build/src/models/http-actions/HttpFlows.d.ts +109 -0
- package/build/src/models/http-actions/HttpFlows.js +31 -0
- package/build/src/models/http-actions/HttpFlows.js.map +1 -0
- package/build/src/models/http-actions/HttpStep.d.ts +29 -0
- package/build/src/models/http-actions/HttpStep.js +30 -0
- package/build/src/models/http-actions/HttpStep.js.map +1 -0
- package/build/src/models/http-actions/LegacyTranslator.d.ts +8 -7
- package/build/src/models/http-actions/LegacyTranslator.js +18 -13
- package/build/src/models/http-actions/LegacyTranslator.js.map +1 -1
- package/build/src/models/http-actions/steps/assertion/EqualAssertion.d.ts +76 -0
- package/build/src/models/http-actions/steps/assertion/EqualAssertion.js +79 -0
- package/build/src/models/http-actions/steps/assertion/EqualAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/GreaterThanAssertion.d.ts +36 -0
- package/build/src/models/http-actions/steps/assertion/GreaterThanAssertion.js +59 -0
- package/build/src/models/http-actions/steps/assertion/GreaterThanAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/IncludesAssertion.d.ts +28 -0
- package/build/src/models/http-actions/steps/assertion/IncludesAssertion.js +45 -0
- package/build/src/models/http-actions/steps/assertion/IncludesAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/IsEmptyAssertion.d.ts +18 -0
- package/build/src/models/http-actions/steps/assertion/IsEmptyAssertion.js +29 -0
- package/build/src/models/http-actions/steps/assertion/IsEmptyAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/IsNotEmptyAssertion.d.ts +18 -0
- package/build/src/models/http-actions/steps/assertion/IsNotEmptyAssertion.js +29 -0
- package/build/src/models/http-actions/steps/assertion/IsNotEmptyAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/LengthOfAssertion.d.ts +28 -0
- package/build/src/models/http-actions/steps/assertion/LengthOfAssertion.js +45 -0
- package/build/src/models/http-actions/steps/assertion/LengthOfAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/LessThanAssertion.d.ts +36 -0
- package/build/src/models/http-actions/steps/assertion/LessThanAssertion.js +59 -0
- package/build/src/models/http-actions/steps/assertion/LessThanAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/MatchesAssertion.d.ts +28 -0
- package/build/src/models/http-actions/steps/assertion/MatchesAssertion.js +45 -0
- package/build/src/models/http-actions/steps/assertion/MatchesAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/MatchesSchemaAssertion.d.ts +36 -0
- package/build/src/models/http-actions/steps/assertion/MatchesSchemaAssertion.js +59 -0
- package/build/src/models/http-actions/steps/assertion/MatchesSchemaAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/NotEqualAssertion.d.ts +76 -0
- package/build/src/models/http-actions/steps/assertion/NotEqualAssertion.js +79 -0
- package/build/src/models/http-actions/steps/assertion/NotEqualAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/NotIncludesAssertion.d.ts +28 -0
- package/build/src/models/http-actions/steps/assertion/NotIncludesAssertion.js +45 -0
- package/build/src/models/http-actions/steps/assertion/NotIncludesAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/NotOkAssertion.d.ts +18 -0
- package/build/src/models/http-actions/steps/assertion/NotOkAssertion.js +29 -0
- package/build/src/models/http-actions/steps/assertion/NotOkAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/NotToBeAssertion.d.ts +29 -0
- package/build/src/models/http-actions/steps/assertion/NotToBeAssertion.js +45 -0
- package/build/src/models/http-actions/steps/assertion/NotToBeAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/OkAssertion.d.ts +18 -0
- package/build/src/models/http-actions/steps/assertion/OkAssertion.js +29 -0
- package/build/src/models/http-actions/steps/assertion/OkAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/ToBeAssertion.d.ts +35 -0
- package/build/src/models/http-actions/steps/assertion/ToBeAssertion.js +53 -0
- package/build/src/models/http-actions/steps/assertion/ToBeAssertion.js.map +1 -0
- package/build/src/models/http-actions/steps/assertion/index.d.ts +15 -0
- package/build/src/models/http-actions/steps/assertion/index.js +16 -0
- package/build/src/models/http-actions/steps/assertion/index.js.map +1 -0
- package/build/src/models/http-actions/steps/data/DeleteCookieStep.d.ts +44 -0
- package/build/src/models/http-actions/steps/data/DeleteCookieStep.js +67 -0
- package/build/src/models/http-actions/steps/data/DeleteCookieStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/ReadDataSourceStep.d.ts +53 -0
- package/build/src/models/http-actions/steps/data/ReadDataSourceStep.js +60 -0
- package/build/src/models/http-actions/steps/data/ReadDataSourceStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/ReadDataStep.d.ts +67 -0
- package/build/src/models/http-actions/steps/data/ReadDataStep.js +77 -0
- package/build/src/models/http-actions/steps/data/ReadDataStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/ReadValueStep.d.ts +45 -0
- package/build/src/models/http-actions/steps/data/ReadValueStep.js +52 -0
- package/build/src/models/http-actions/steps/data/ReadValueStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/SetCookieStep.d.ts +100 -0
- package/build/src/models/http-actions/steps/data/SetCookieStep.js +138 -0
- package/build/src/models/http-actions/steps/data/SetCookieStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/SetDataStep.d.ts +77 -0
- package/build/src/models/http-actions/steps/data/SetDataStep.js +69 -0
- package/build/src/models/http-actions/steps/data/SetDataStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/SetVariableStep.d.ts +40 -0
- package/build/src/models/http-actions/steps/data/SetVariableStep.js +44 -0
- package/build/src/models/http-actions/steps/data/SetVariableStep.js.map +1 -0
- package/build/src/models/http-actions/steps/data/index.d.ts +7 -0
- package/build/src/models/http-actions/steps/data/index.js +8 -0
- package/build/src/models/http-actions/steps/data/index.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/AsLowerCaseStep.d.ts +18 -0
- package/build/src/models/http-actions/steps/transformation/AsLowerCaseStep.js +29 -0
- package/build/src/models/http-actions/steps/transformation/AsLowerCaseStep.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/AsNumberStep.d.ts +18 -0
- package/build/src/models/http-actions/steps/transformation/AsNumberStep.js +29 -0
- package/build/src/models/http-actions/steps/transformation/AsNumberStep.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/AsUpperCaseStep.d.ts +18 -0
- package/build/src/models/http-actions/steps/transformation/AsUpperCaseStep.js +29 -0
- package/build/src/models/http-actions/steps/transformation/AsUpperCaseStep.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/RoundStep.d.ts +43 -0
- package/build/src/models/http-actions/steps/transformation/RoundStep.js +52 -0
- package/build/src/models/http-actions/steps/transformation/RoundStep.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/SubstringStep.d.ts +38 -0
- package/build/src/models/http-actions/steps/transformation/SubstringStep.js +65 -0
- package/build/src/models/http-actions/steps/transformation/SubstringStep.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/TrimStep.d.ts +20 -0
- package/build/src/models/http-actions/steps/transformation/TrimStep.js +30 -0
- package/build/src/models/http-actions/steps/transformation/TrimStep.js.map +1 -0
- package/build/src/models/http-actions/steps/transformation/index.d.ts +6 -0
- package/build/src/models/http-actions/steps/transformation/index.js +7 -0
- package/build/src/models/http-actions/steps/transformation/index.js.map +1 -0
- package/build/src/proxy/RequestProxy.d.ts +7 -2
- package/build/src/proxy/RequestProxy.js +4 -1
- package/build/src/proxy/RequestProxy.js.map +1 -1
- package/build/src/runtime/http-runner/ConditionCheck.d.ts +10 -10
- package/build/src/runtime/http-runner/ConditionCheck.js.map +1 -1
- package/build/src/runtime/http-runner/HttpAssertionRunner.d.ts +75 -0
- package/build/src/runtime/http-runner/HttpAssertionRunner.js +538 -0
- package/build/src/runtime/http-runner/HttpAssertionRunner.js.map +1 -0
- package/build/src/runtime/http-runner/HttpFlowRunner.d.ts +11 -6
- package/build/src/runtime/http-runner/HttpFlowRunner.js +24 -15
- package/build/src/runtime/http-runner/HttpFlowRunner.js.map +1 -1
- package/build/src/runtime/http-runner/HttpRequestRunner.d.ts +14 -3
- package/build/src/runtime/http-runner/HttpRequestRunner.js +44 -0
- package/build/src/runtime/http-runner/HttpRequestRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectParallelRunner.d.ts +1 -1
- package/build/src/runtime/node/ProjectParallelRunner.js +2 -2
- package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRequestRunner.js +6 -2
- package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
- package/build/src/runtime/store/FilesSdk.js +1 -1
- package/build/src/runtime/store/FilesSdk.js.map +1 -1
- package/data/models/example-generator-api.json +8 -8
- package/package.json +3 -2
- package/src/data/{JmesparthReader.ts → JmespathReader.ts} +2 -2
- package/src/data/RequestDataExtractor.ts +5 -5
- package/src/data/XmlReader.ts +16 -2
- package/src/models/ClientCertificate.ts +9 -0
- package/src/models/Environment.ts +11 -7
- package/src/models/ErrorResponse.ts +1 -1
- package/src/models/HttpRequest.ts +4 -14
- package/src/models/HttpResponse.ts +5 -11
- package/src/models/ProjectRequest.ts +54 -0
- package/src/models/Request.ts +23 -4
- package/src/models/RequestAuthorization.ts +1 -1
- package/src/models/RequestLog.ts +21 -1
- package/src/models/SerializablePayload.ts +18 -1
- package/src/models/http-actions/AssertionError.ts +57 -0
- package/src/models/http-actions/HttpAssertion.ts +89 -0
- package/src/models/http-actions/HttpFlows.ts +115 -0
- package/src/models/http-actions/HttpStep.ts +50 -0
- package/src/models/http-actions/LegacyTranslator.ts +42 -30
- package/src/models/http-actions/steps/assertion/EqualAssertion.ts +130 -0
- package/src/models/http-actions/steps/assertion/GreaterThanAssertion.ts +87 -0
- package/src/models/http-actions/steps/assertion/IncludesAssertion.ts +68 -0
- package/src/models/http-actions/steps/assertion/IsEmptyAssertion.ts +41 -0
- package/src/models/http-actions/steps/assertion/IsNotEmptyAssertion.ts +41 -0
- package/src/models/http-actions/steps/assertion/LengthOfAssertion.ts +68 -0
- package/src/models/http-actions/steps/assertion/LessThanAssertion.ts +87 -0
- package/src/models/http-actions/steps/assertion/MatchesAssertion.ts +68 -0
- package/src/models/http-actions/steps/assertion/MatchesSchemaAssertion.ts +85 -0
- package/src/models/http-actions/steps/assertion/NotEqualAssertion.ts +130 -0
- package/src/models/http-actions/steps/assertion/NotIncludesAssertion.ts +68 -0
- package/src/models/http-actions/steps/assertion/NotOkAssertion.ts +41 -0
- package/src/models/http-actions/steps/assertion/NotToBeAssertion.ts +69 -0
- package/src/models/http-actions/steps/assertion/OkAssertion.ts +41 -0
- package/src/models/http-actions/steps/assertion/ToBeAssertion.ts +76 -0
- package/src/models/http-actions/steps/data/DeleteCookieStep.ts +102 -0
- package/src/models/http-actions/steps/data/ReadDataSourceStep.ts +103 -0
- package/src/models/http-actions/steps/data/ReadDataStep.ts +128 -0
- package/src/models/http-actions/steps/data/ReadValueStep.ts +88 -0
- package/src/models/http-actions/steps/data/SetCookieStep.ts +206 -0
- package/src/models/http-actions/steps/data/SetDataStep.ts +124 -0
- package/src/models/http-actions/steps/data/SetVariableStep.ts +82 -0
- package/src/models/http-actions/steps/transformation/AsLowerCaseStep.ts +41 -0
- package/src/models/http-actions/steps/transformation/AsNumberStep.ts +41 -0
- package/src/models/http-actions/steps/transformation/AsUpperCaseStep.ts +41 -0
- package/src/models/http-actions/steps/transformation/RoundStep.ts +86 -0
- package/src/models/http-actions/steps/transformation/SubstringStep.ts +93 -0
- package/src/models/http-actions/steps/transformation/TrimStep.ts +43 -0
- package/src/proxy/RequestProxy.ts +11 -3
- package/src/runtime/http-runner/ConditionCheck.ts +13 -14
- package/src/runtime/http-runner/HttpAssertionRunner.ts +540 -0
- package/src/runtime/http-runner/HttpFlowRunner.ts +33 -19
- package/src/runtime/http-runner/HttpRequestRunner.ts +53 -5
- package/src/runtime/node/ProjectParallelRunner.ts +4 -4
- package/src/runtime/node/ProjectRequestRunner.ts +6 -2
- package/src/runtime/store/FilesSdk.ts +1 -1
- package/build/src/data/JmesparthReader.js.map +0 -1
- package/build/src/models/http-actions/HttpActions.d.ts +0 -256
- package/build/src/models/http-actions/HttpActions.js +0 -46
- package/build/src/models/http-actions/HttpActions.js.map +0 -1
- package/src/models/http-actions/HttpActions.ts +0 -270
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { SameSiteValue } from '../../cookies/CookieParser.js';
|
|
2
|
-
|
|
3
|
-
export const ReadDataStepKind = 'HttpAction#ReadData';
|
|
4
|
-
export const SetDataStepKind = 'HttpAction#SetData';
|
|
5
|
-
export const SetVariableStepKind = 'HttpAction#SetVariable';
|
|
6
|
-
export const SetCookieStepKind = 'HttpAction#SetCookie';
|
|
7
|
-
export const DeleteCookieStepKind = 'HttpAction#DeleteCookie';
|
|
8
|
-
|
|
9
|
-
export enum ActionSourceEnum {
|
|
10
|
-
/**
|
|
11
|
-
* The request object.
|
|
12
|
-
*/
|
|
13
|
-
request = 'request',
|
|
14
|
-
/**
|
|
15
|
-
* The response object.
|
|
16
|
-
*/
|
|
17
|
-
response = 'response',
|
|
18
|
-
/**
|
|
19
|
-
* A variable from the current environment.
|
|
20
|
-
*/
|
|
21
|
-
variable = 'variable',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export enum ActionOperatorEnum {
|
|
25
|
-
equal = "equal",
|
|
26
|
-
notEqual = "not-equal",
|
|
27
|
-
greaterThan = "greater-than",
|
|
28
|
-
greaterThanEqual = "greater-than-equal",
|
|
29
|
-
lessThan = "less-than",
|
|
30
|
-
lessThanEqual = "less-than-equal",
|
|
31
|
-
contains = "contains",
|
|
32
|
-
regex = "regex",
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export enum ActionRequestDataEnum {
|
|
36
|
-
url = "url",
|
|
37
|
-
method = "method",
|
|
38
|
-
headers = "headers",
|
|
39
|
-
body = "body"
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export enum ActionResponseDataEnum {
|
|
43
|
-
url = "url",
|
|
44
|
-
status = "status",
|
|
45
|
-
headers = "headers",
|
|
46
|
-
body = "body"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* A flow represents a series of actions to be performed one-by-one after the HTTP request is sent or when the response
|
|
51
|
-
* is ready.
|
|
52
|
-
*/
|
|
53
|
-
export interface IHttpActionFlow {
|
|
54
|
-
/**
|
|
55
|
-
* The description of the flow
|
|
56
|
-
*/
|
|
57
|
-
description?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Describes when the flow is executed.
|
|
60
|
-
* The `request` means the flow is executed before the request is sent to the HTTP engine.
|
|
61
|
-
* The `response` means the flow is executed after the response has been received in full, but before reporting
|
|
62
|
-
* the response to the UI.
|
|
63
|
-
*/
|
|
64
|
-
trigger: 'request' | 'response';
|
|
65
|
-
/**
|
|
66
|
-
* The ordered list of actions to execute.
|
|
67
|
-
*/
|
|
68
|
-
actions: IHttpAction[];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Describes a single action in a flow.
|
|
73
|
-
* An action can have a condition that is checked against the current context.
|
|
74
|
-
* Action is not executed when the condition is not meet.
|
|
75
|
-
*
|
|
76
|
-
* Each action has one or more steps (when 0 items then the action is ignored). Each step performs a task.
|
|
77
|
-
* The result of a task is passed to the next step as an input. The result of a task may be `void`, `null`, or `undefined` which is treated as `void`.
|
|
78
|
-
*/
|
|
79
|
-
export interface IHttpAction {
|
|
80
|
-
/**
|
|
81
|
-
* The description of the action
|
|
82
|
-
*/
|
|
83
|
-
description?: string;
|
|
84
|
-
/**
|
|
85
|
-
* A condition to check before performing the action.
|
|
86
|
-
*/
|
|
87
|
-
condition?: IHttpCondition;
|
|
88
|
-
/**
|
|
89
|
-
* The list of steps to perform. This is an ordered list of action tasks.
|
|
90
|
-
* Each step is described by the `kind` property which tells the runner what action to perform.
|
|
91
|
-
*/
|
|
92
|
-
steps: IActionStep[];
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* A condition to execute for an action.
|
|
97
|
-
*/
|
|
98
|
-
export interface IHttpCondition {
|
|
99
|
-
/**
|
|
100
|
-
* The main data source.
|
|
101
|
-
* In the legacy actions this was `type`.
|
|
102
|
-
*/
|
|
103
|
-
source?: ActionSourceEnum;
|
|
104
|
-
/**
|
|
105
|
-
* Source of the data.
|
|
106
|
-
* In the legacy actions this was `source`.
|
|
107
|
-
* This is not required when the source is not `request` or `response`.
|
|
108
|
-
*/
|
|
109
|
-
data?: ActionRequestDataEnum | ActionResponseDataEnum;
|
|
110
|
-
/**
|
|
111
|
-
* The path to the data.
|
|
112
|
-
* For JSON value use https://jmespath.org/ syntax.
|
|
113
|
-
* For XML use xpath.
|
|
114
|
-
* For any other use a simple path to the data separated by dot (e.g. headers.content-type)
|
|
115
|
-
*/
|
|
116
|
-
path?: string;
|
|
117
|
-
/**
|
|
118
|
-
* The comparison operator.
|
|
119
|
-
*/
|
|
120
|
-
operator?: ActionOperatorEnum;
|
|
121
|
-
/**
|
|
122
|
-
* The value to compare the read result.
|
|
123
|
-
* In runtime, the type is casted to the same type as read value.
|
|
124
|
-
*
|
|
125
|
-
* When this is not set it compares to an empty string value or `0`.
|
|
126
|
-
*
|
|
127
|
-
* In ARC actions this was the `predictedValue`.
|
|
128
|
-
*/
|
|
129
|
-
value?: string;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface IActionStep {
|
|
133
|
-
/**
|
|
134
|
-
* The kind of the action to perform.
|
|
135
|
-
*/
|
|
136
|
-
kind: string;
|
|
137
|
-
/**
|
|
138
|
-
* Whether the step is disabled in the flow.
|
|
139
|
-
*/
|
|
140
|
-
enabled?: boolean;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Reads the data from various sources.
|
|
145
|
-
*/
|
|
146
|
-
export interface IReadDataStep extends IActionStep {
|
|
147
|
-
kind: typeof ReadDataStepKind;
|
|
148
|
-
/**
|
|
149
|
-
* The main data source.
|
|
150
|
-
* In the legacy actions this was `type`.
|
|
151
|
-
*/
|
|
152
|
-
source?: ActionSourceEnum;
|
|
153
|
-
/**
|
|
154
|
-
* Source of the data.
|
|
155
|
-
* In the legacy actions this was `source`.
|
|
156
|
-
* This is not required when the source is not `request` or `response`.
|
|
157
|
-
*/
|
|
158
|
-
data?: ActionRequestDataEnum | ActionResponseDataEnum;
|
|
159
|
-
/**
|
|
160
|
-
* The path to the data.
|
|
161
|
-
* For JSON value use https://jmespath.org/ syntax.
|
|
162
|
-
* For XML use xpath.
|
|
163
|
-
* For any other use a simple path to the data separated by dot (e.g. headers.content-type)
|
|
164
|
-
*/
|
|
165
|
-
path?: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Sets a manually defined value that can be passed to the next step.
|
|
170
|
-
*/
|
|
171
|
-
export interface ISetDataStep extends IActionStep {
|
|
172
|
-
kind: typeof SetDataStepKind;
|
|
173
|
-
/**
|
|
174
|
-
* The value to return to the next step.
|
|
175
|
-
* This is always a string. Use the `dataType` to determine the correct data type.
|
|
176
|
-
*/
|
|
177
|
-
value: string;
|
|
178
|
-
/**
|
|
179
|
-
* The data type of the value. This is a value prefixed with
|
|
180
|
-
* `http://www.w3.org/2001/XMLSchema#` or `http://a.ml/vocabularies/shapes#`.
|
|
181
|
-
*
|
|
182
|
-
* Examples:
|
|
183
|
-
*
|
|
184
|
-
* - `http://www.w3.org/2001/XMLSchema#boolean`
|
|
185
|
-
* - `http://www.w3.org/2001/XMLSchema#string`
|
|
186
|
-
* - `http://www.w3.org/2001/XMLSchema#number`
|
|
187
|
-
* - `http://www.w3.org/2001/XMLSchema#integer`
|
|
188
|
-
* - `http://www.w3.org/2001/XMLSchema#long`
|
|
189
|
-
* - `http://a.ml/vocabularies/shapes#number`
|
|
190
|
-
* - `http://a.ml/vocabularies/shapes#integer`
|
|
191
|
-
* - `http://a.ml/vocabularies/shapes#double`
|
|
192
|
-
* - ...
|
|
193
|
-
*
|
|
194
|
-
* @default `http://www.w3.org/2001/XMLSchema#string`
|
|
195
|
-
*/
|
|
196
|
-
dataType?: string;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* A step that accepts an input from the previous step and sets a variable in the current environment
|
|
201
|
-
* with this value. If the value is `void`, `null`, or `undefined` then the variable is removed from the
|
|
202
|
-
* environment.
|
|
203
|
-
*
|
|
204
|
-
* All variables are strings.
|
|
205
|
-
*/
|
|
206
|
-
export interface ISetVariableStep extends IActionStep {
|
|
207
|
-
kind: typeof SetVariableStepKind;
|
|
208
|
-
/**
|
|
209
|
-
* The name of the variable to set
|
|
210
|
-
*/
|
|
211
|
-
name: string;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* A step that allows to set a cookie with the value returned by a previous step.
|
|
216
|
-
*/
|
|
217
|
-
export interface ISetCookieStep extends IActionStep {
|
|
218
|
-
kind: typeof SetCookieStepKind;
|
|
219
|
-
/**
|
|
220
|
-
* Name of the cookie
|
|
221
|
-
*/
|
|
222
|
-
name: string;
|
|
223
|
-
/**
|
|
224
|
-
* The URL associated with the cookie. When not set it uses the request URL or the request URL of the last redirect.
|
|
225
|
-
*/
|
|
226
|
-
url?: string;
|
|
227
|
-
/**
|
|
228
|
-
* The cookie expiration time. It can be a valid cookie date or a string representing a relative time to "now"
|
|
229
|
-
* like `4d`, `600s`, etc.
|
|
230
|
-
*/
|
|
231
|
-
expires?: string;
|
|
232
|
-
/**
|
|
233
|
-
* Whether the cookie is host only
|
|
234
|
-
*/
|
|
235
|
-
hostOnly?: boolean;
|
|
236
|
-
/**
|
|
237
|
-
* Whether the cookie is HTTP only
|
|
238
|
-
*/
|
|
239
|
-
httpOnly?: boolean;
|
|
240
|
-
/**
|
|
241
|
-
* Whether the cookie is HTTPS only
|
|
242
|
-
*/
|
|
243
|
-
secure?: boolean;
|
|
244
|
-
/**
|
|
245
|
-
* Whether the cookie is a session cookie
|
|
246
|
-
*/
|
|
247
|
-
session?: boolean;
|
|
248
|
-
/**
|
|
249
|
-
* The SameSite parameter of the cookie.
|
|
250
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#creating_cookies
|
|
251
|
-
*/
|
|
252
|
-
sameSite?: SameSiteValue;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* A step allowing to delete a cookie for the given configuration.
|
|
257
|
-
* This step does not require an input.
|
|
258
|
-
*/
|
|
259
|
-
export interface IDeleteCookieStep extends IActionStep {
|
|
260
|
-
kind: typeof DeleteCookieStepKind;
|
|
261
|
-
/**
|
|
262
|
-
* The URL associated with the cookie. When not set it uses the request URL or the request URL of the last redirect.
|
|
263
|
-
*/
|
|
264
|
-
url?: string;
|
|
265
|
-
/**
|
|
266
|
-
* Name of the cookie to remove.
|
|
267
|
-
* When not set it removes all cookies for the URL.
|
|
268
|
-
*/
|
|
269
|
-
name?: string;
|
|
270
|
-
}
|