@api-client/core 0.9.4 → 0.9.6
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 +14 -3
- package/build/browser.js +16 -2
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +15 -4
- package/build/index.js +17 -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/events/BaseEvents.d.ts +25 -0
- package/build/src/events/Events.d.ts +1 -1
- package/build/src/events/transport/TransportEvents.d.ts +1 -1
- package/build/src/events/transport/TransportEvents.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/ProjectExecution.d.ts +115 -0
- package/build/src/models/ProjectExecution.js +148 -0
- package/build/src/models/ProjectExecution.js.map +1 -0
- 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/HttpProjectProxy.d.ts +1 -1
- package/build/src/proxy/Proxy.d.ts +1 -1
- package/build/src/proxy/ProxyService.d.ts +1 -1
- 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/BaseRunner.d.ts +1 -1
- package/build/src/runtime/node/ProjectParallelRunner.d.ts +2 -2
- 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/node/ProjectRunner.d.ts +1 -1
- package/build/src/runtime/node/ProjectSerialRunner.d.ts +1 -1
- package/build/src/runtime/reporters/Reporter.d.ts +1 -33
- package/build/src/runtime/reporters/Reporter.js.map +1 -1
- package/build/src/runtime/store/interfaces/ApiClientStore.d.ts +2 -0
- package/build/src/runtime/store/interfaces/ProjectRuns.d.ts +56 -0
- package/build/src/runtime/store/interfaces/ProjectRuns.js +2 -0
- package/build/src/runtime/store/interfaces/ProjectRuns.js.map +1 -0
- 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/events/BaseEvents.ts +30 -0
- package/src/events/transport/TransportEvents.ts +1 -1
- 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/ProjectExecution.ts +227 -0
- 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/HttpProjectProxy.ts +1 -1
- package/src/proxy/Proxy.ts +1 -1
- package/src/proxy/ProxyService.ts +1 -1
- 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/BaseRunner.ts +1 -1
- package/src/runtime/node/ProjectParallelRunner.ts +5 -5
- package/src/runtime/node/ProjectRequestRunner.ts +6 -2
- package/src/runtime/node/ProjectRunner.ts +1 -1
- package/src/runtime/node/ProjectRunnerWorker.ts +1 -1
- package/src/runtime/node/ProjectSerialRunner.ts +1 -1
- package/src/runtime/reporters/Reporter.ts +1 -35
- package/src/runtime/store/interfaces/ApiClientStore.ts +3 -0
- package/src/runtime/store/interfaces/ProjectRuns.ts +64 -0
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LengthOfAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/LengthOfAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAcpE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,QAAQ;IACpC,IAAI,GAAG,qBAAqB,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAU;IAQf,YAAY,WAAyC;QACnD,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,KAAK,GAAG,WAAiC,CAAC;YAChD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC;gBACP,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,WAAW;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,GAAG,CAAC,IAAwB;QACnC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,aAAa;QACX,OAAO,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC;IACxC,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAAuB;YACjC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,qBAAqB;SAC5B,CAAC;QACF,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;YAClC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
export declare const LessThanAssertionKind = "HttpAction#LessThanAssertion";
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input value is less [or equal] to the set value.
|
|
5
|
+
*/
|
|
6
|
+
export interface ILessThanAssertion extends IHttpStep {
|
|
7
|
+
kind: typeof LessThanAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The value to compare to.
|
|
10
|
+
*/
|
|
11
|
+
value?: number;
|
|
12
|
+
/**
|
|
13
|
+
* When set it treats the assertion as "greater than or equal"
|
|
14
|
+
*/
|
|
15
|
+
equal?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* An assertion that makes sure the input value is less [or equal] to the set value.
|
|
19
|
+
*/
|
|
20
|
+
export declare class LessThanAssertion extends HttpStep {
|
|
21
|
+
kind: string;
|
|
22
|
+
/**
|
|
23
|
+
* The value to compare to.
|
|
24
|
+
*/
|
|
25
|
+
value?: number;
|
|
26
|
+
/**
|
|
27
|
+
* When set it treats the assertion as "greater than or equal"
|
|
28
|
+
*/
|
|
29
|
+
equal?: boolean;
|
|
30
|
+
constructor(value: number, equal?: boolean);
|
|
31
|
+
constructor(init: ILessThanAssertion);
|
|
32
|
+
constructor();
|
|
33
|
+
new(init: ILessThanAssertion): void;
|
|
34
|
+
checkValidity(): boolean;
|
|
35
|
+
toJSON(): ILessThanAssertion;
|
|
36
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const LessThanAssertionKind = 'HttpAction#LessThanAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input value is less [or equal] to the set value.
|
|
5
|
+
*/
|
|
6
|
+
export class LessThanAssertion extends HttpStep {
|
|
7
|
+
kind = LessThanAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The value to compare to.
|
|
10
|
+
*/
|
|
11
|
+
value;
|
|
12
|
+
/**
|
|
13
|
+
* When set it treats the assertion as "greater than or equal"
|
|
14
|
+
*/
|
|
15
|
+
equal;
|
|
16
|
+
constructor(valueOrInit, equal) {
|
|
17
|
+
super();
|
|
18
|
+
if (typeof valueOrInit === 'object') {
|
|
19
|
+
const typed = valueOrInit;
|
|
20
|
+
this.new(typed);
|
|
21
|
+
}
|
|
22
|
+
else if (typeof valueOrInit === 'number') {
|
|
23
|
+
this.new({
|
|
24
|
+
kind: LessThanAssertionKind,
|
|
25
|
+
value: valueOrInit,
|
|
26
|
+
equal,
|
|
27
|
+
enabled: true,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
new(init) {
|
|
32
|
+
super.new(init);
|
|
33
|
+
this.kind = LessThanAssertionKind;
|
|
34
|
+
this.value = init.value;
|
|
35
|
+
if (typeof init.equal === 'boolean') {
|
|
36
|
+
this.equal = init.equal;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.equal = undefined;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
checkValidity() {
|
|
43
|
+
return typeof this.value === 'number';
|
|
44
|
+
}
|
|
45
|
+
toJSON() {
|
|
46
|
+
const result = {
|
|
47
|
+
...super.toJSON(),
|
|
48
|
+
kind: LessThanAssertionKind,
|
|
49
|
+
};
|
|
50
|
+
if (this.value) {
|
|
51
|
+
result.value = this.value;
|
|
52
|
+
}
|
|
53
|
+
if (typeof this.equal === 'boolean') {
|
|
54
|
+
result.equal = this.equal;
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=LessThanAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LessThanAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/LessThanAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAmBpE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,QAAQ;IACpC,IAAI,GAAG,qBAAqB,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAU;IAEf;;OAEG;IACH,KAAK,CAAW;IAQhB,YAAY,WAAyC,EAAE,KAAe;QACpE,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,KAAK,GAAG,WAAiC,CAAC;YAChD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC;gBACP,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,WAAW;gBAClB,KAAK;gBACL,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,GAAG,CAAC,IAAwB;QACnC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YACnC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SACzB;aAAM;YACL,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;SACxB;IACH,CAAC;IAED,aAAa;QACX,OAAO,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC;IACxC,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAAuB;YACjC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,qBAAqB;SAC5B,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YACnC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
export declare const MatchesAssertionKind = "HttpAction#MatchesAssertion";
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input value matches a regexp.
|
|
5
|
+
*/
|
|
6
|
+
export interface IMatchesAssertion extends IHttpStep {
|
|
7
|
+
kind: typeof MatchesAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The regexp to match the value against.
|
|
10
|
+
*/
|
|
11
|
+
value?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* An assertion that makes sure the input value matches a regexp.
|
|
15
|
+
*/
|
|
16
|
+
export declare class MatchesAssertion extends HttpStep {
|
|
17
|
+
kind: string;
|
|
18
|
+
/**
|
|
19
|
+
* The regexp to match the value against.
|
|
20
|
+
*/
|
|
21
|
+
value?: string;
|
|
22
|
+
constructor(value: string);
|
|
23
|
+
constructor(init: IMatchesAssertion);
|
|
24
|
+
constructor();
|
|
25
|
+
new(init: IMatchesAssertion): void;
|
|
26
|
+
checkValidity(): boolean;
|
|
27
|
+
toJSON(): IMatchesAssertion;
|
|
28
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const MatchesAssertionKind = 'HttpAction#MatchesAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input value matches a regexp.
|
|
5
|
+
*/
|
|
6
|
+
export class MatchesAssertion extends HttpStep {
|
|
7
|
+
kind = MatchesAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The regexp to match the value against.
|
|
10
|
+
*/
|
|
11
|
+
value;
|
|
12
|
+
constructor(valueOrInit) {
|
|
13
|
+
super();
|
|
14
|
+
if (typeof valueOrInit === 'object') {
|
|
15
|
+
const typed = valueOrInit;
|
|
16
|
+
this.new(typed);
|
|
17
|
+
}
|
|
18
|
+
else if (typeof valueOrInit === 'string') {
|
|
19
|
+
this.new({
|
|
20
|
+
kind: MatchesAssertionKind,
|
|
21
|
+
value: valueOrInit,
|
|
22
|
+
enabled: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
new(init) {
|
|
27
|
+
super.new(init);
|
|
28
|
+
this.kind = MatchesAssertionKind;
|
|
29
|
+
this.value = init.value;
|
|
30
|
+
}
|
|
31
|
+
checkValidity() {
|
|
32
|
+
return !!this.value;
|
|
33
|
+
}
|
|
34
|
+
toJSON() {
|
|
35
|
+
const result = {
|
|
36
|
+
...super.toJSON(),
|
|
37
|
+
kind: MatchesAssertionKind,
|
|
38
|
+
};
|
|
39
|
+
if (this.value) {
|
|
40
|
+
result.value = this.value;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=MatchesAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MatchesAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/MatchesAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAclE;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IACnC,IAAI,GAAG,oBAAoB,CAAC;IAErC;;OAEG;IACH,KAAK,CAAU;IAQf,YAAY,WAAwC;QAClD,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,KAAK,GAAG,WAAgC,CAAC;YAC/C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC;gBACP,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,WAAW;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,GAAG,CAAC,IAAuB;QAClC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAAsB;YAChC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,oBAAoB;SAC3B,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
export declare const MatchesSchemaAssertionKind = "HttpAction#MatchesSchemaAssertion";
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input matches a JSON schema. The input has to be a valid JSON string, object, or an array.
|
|
5
|
+
*/
|
|
6
|
+
export interface IMatchesSchemaAssertion extends IHttpStep {
|
|
7
|
+
kind: typeof MatchesSchemaAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The application internal reference to the schema stored in a store.
|
|
10
|
+
*/
|
|
11
|
+
ref?: string;
|
|
12
|
+
/**
|
|
13
|
+
* When set it ignores the `ref` and uses this JSON schema to validate the input against.
|
|
14
|
+
*/
|
|
15
|
+
schema?: unknown;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* An assertion that makes sure the input matches a JSON schema. The input has to be a valid JSON string, object, or an array.
|
|
19
|
+
*/
|
|
20
|
+
export declare class MatchesSchemaAssertion extends HttpStep {
|
|
21
|
+
kind: string;
|
|
22
|
+
/**
|
|
23
|
+
* The application internal reference to the schema stored in a store.
|
|
24
|
+
*/
|
|
25
|
+
ref?: string;
|
|
26
|
+
/**
|
|
27
|
+
* When set it ignores the `ref` and uses this JSON schema to validate the input against.
|
|
28
|
+
*/
|
|
29
|
+
schema?: unknown;
|
|
30
|
+
static fromRef(ref: string): MatchesSchemaAssertion;
|
|
31
|
+
static fromSchema(schema: unknown): MatchesSchemaAssertion;
|
|
32
|
+
constructor(init?: IMatchesSchemaAssertion);
|
|
33
|
+
new(init: IMatchesSchemaAssertion): void;
|
|
34
|
+
checkValidity(): boolean;
|
|
35
|
+
toJSON(): IMatchesSchemaAssertion;
|
|
36
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const MatchesSchemaAssertionKind = 'HttpAction#MatchesSchemaAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input matches a JSON schema. The input has to be a valid JSON string, object, or an array.
|
|
5
|
+
*/
|
|
6
|
+
export class MatchesSchemaAssertion extends HttpStep {
|
|
7
|
+
kind = MatchesSchemaAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The application internal reference to the schema stored in a store.
|
|
10
|
+
*/
|
|
11
|
+
ref;
|
|
12
|
+
/**
|
|
13
|
+
* When set it ignores the `ref` and uses this JSON schema to validate the input against.
|
|
14
|
+
*/
|
|
15
|
+
schema;
|
|
16
|
+
static fromRef(ref) {
|
|
17
|
+
return new MatchesSchemaAssertion({
|
|
18
|
+
kind: MatchesSchemaAssertionKind,
|
|
19
|
+
enabled: true,
|
|
20
|
+
ref,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static fromSchema(schema) {
|
|
24
|
+
return new MatchesSchemaAssertion({
|
|
25
|
+
kind: MatchesSchemaAssertionKind,
|
|
26
|
+
enabled: true,
|
|
27
|
+
schema,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
constructor(init) {
|
|
31
|
+
super();
|
|
32
|
+
if (typeof init === 'object') {
|
|
33
|
+
this.new(init);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
new(init) {
|
|
37
|
+
super.new(init);
|
|
38
|
+
this.kind = MatchesSchemaAssertionKind;
|
|
39
|
+
this.ref = init.ref;
|
|
40
|
+
this.schema = init.schema;
|
|
41
|
+
}
|
|
42
|
+
checkValidity() {
|
|
43
|
+
return !!this.schema || !!this.ref;
|
|
44
|
+
}
|
|
45
|
+
toJSON() {
|
|
46
|
+
const result = {
|
|
47
|
+
...super.toJSON(),
|
|
48
|
+
kind: MatchesSchemaAssertionKind,
|
|
49
|
+
};
|
|
50
|
+
if (this.ref) {
|
|
51
|
+
result.ref = this.ref;
|
|
52
|
+
}
|
|
53
|
+
if (this.schema) {
|
|
54
|
+
result.schema = this.schema;
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=MatchesSchemaAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MatchesSchemaAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/MatchesSchemaAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC;AAmB9E;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,QAAQ;IACzC,IAAI,GAAG,0BAA0B,CAAC;IAE3C;;OAEG;IACH,GAAG,CAAU;IAEb;;OAEG;IACH,MAAM,CAAW;IAEjB,MAAM,CAAC,OAAO,CAAC,GAAW;QACxB,OAAO,IAAI,sBAAsB,CAAC;YAChC,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,IAAI;YACb,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,MAAe;QAC/B,OAAO,IAAI,sBAAsB,CAAC;YAChC,IAAI,EAAE,0BAA0B;YAChC,OAAO,EAAE,IAAI;YACb,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED,YAAY,IAA8B;QACxC,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAChB;IACH,CAAC;IAEQ,GAAG,CAAC,IAA6B;QACxC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;IACrC,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAA4B;YACtC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,0BAA0B;SACjC,CAAC;QACF,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;SAC7B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
export declare const NotEqualAssertionKind = "HttpAction#NotEqualAssertion";
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input value is not [strict] equal to the set value.
|
|
5
|
+
*/
|
|
6
|
+
export interface INotEqualAssertion extends IHttpStep {
|
|
7
|
+
kind: typeof NotEqualAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The value to compare to.
|
|
10
|
+
* This is always a string. Use the `dataType` to determine the correct data type.
|
|
11
|
+
*/
|
|
12
|
+
value?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The data type of the value. This is a value prefixed with
|
|
15
|
+
* `http://www.w3.org/2001/XMLSchema#` or `http://a.ml/vocabularies/shapes#`.
|
|
16
|
+
*
|
|
17
|
+
* Examples:
|
|
18
|
+
*
|
|
19
|
+
* - `http://www.w3.org/2001/XMLSchema#boolean`
|
|
20
|
+
* - `http://www.w3.org/2001/XMLSchema#string`
|
|
21
|
+
* - `http://www.w3.org/2001/XMLSchema#number`
|
|
22
|
+
* - `http://www.w3.org/2001/XMLSchema#integer`
|
|
23
|
+
* - `http://www.w3.org/2001/XMLSchema#long`
|
|
24
|
+
* - `http://a.ml/vocabularies/shapes#number`
|
|
25
|
+
* - `http://a.ml/vocabularies/shapes#integer`
|
|
26
|
+
* - `http://a.ml/vocabularies/shapes#double`
|
|
27
|
+
* - ...
|
|
28
|
+
*
|
|
29
|
+
* @default `http://www.w3.org/2001/XMLSchema#string`
|
|
30
|
+
*/
|
|
31
|
+
dataType?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether it should check for a value and the data type.
|
|
34
|
+
*/
|
|
35
|
+
strict?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An assertion that makes sure the input value is not [strict] equal to the set value.
|
|
39
|
+
*/
|
|
40
|
+
export declare class NotEqualAssertion extends HttpStep {
|
|
41
|
+
kind: string;
|
|
42
|
+
/**
|
|
43
|
+
* The value to compare to.
|
|
44
|
+
* This is always a string. Use the `dataType` to determine the correct data type.
|
|
45
|
+
*/
|
|
46
|
+
value?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The data type of the value. This is a value prefixed with
|
|
49
|
+
* `http://www.w3.org/2001/XMLSchema#` or `http://a.ml/vocabularies/shapes#`.
|
|
50
|
+
*
|
|
51
|
+
* Examples:
|
|
52
|
+
*
|
|
53
|
+
* - `http://www.w3.org/2001/XMLSchema#boolean`
|
|
54
|
+
* - `http://www.w3.org/2001/XMLSchema#string`
|
|
55
|
+
* - `http://www.w3.org/2001/XMLSchema#number`
|
|
56
|
+
* - `http://www.w3.org/2001/XMLSchema#integer`
|
|
57
|
+
* - `http://www.w3.org/2001/XMLSchema#long`
|
|
58
|
+
* - `http://a.ml/vocabularies/shapes#number`
|
|
59
|
+
* - `http://a.ml/vocabularies/shapes#integer`
|
|
60
|
+
* - `http://a.ml/vocabularies/shapes#double`
|
|
61
|
+
* - ...
|
|
62
|
+
*
|
|
63
|
+
* @default `http://www.w3.org/2001/XMLSchema#string`
|
|
64
|
+
*/
|
|
65
|
+
dataType?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Whether it should check for a value and the data type.
|
|
68
|
+
*/
|
|
69
|
+
strict?: boolean;
|
|
70
|
+
constructor(value: string, strict?: boolean, dataType?: string);
|
|
71
|
+
constructor(init: INotEqualAssertion);
|
|
72
|
+
constructor();
|
|
73
|
+
new(init: INotEqualAssertion): void;
|
|
74
|
+
checkValidity(): boolean;
|
|
75
|
+
toJSON(): INotEqualAssertion;
|
|
76
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const NotEqualAssertionKind = 'HttpAction#NotEqualAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input value is not [strict] equal to the set value.
|
|
5
|
+
*/
|
|
6
|
+
export class NotEqualAssertion extends HttpStep {
|
|
7
|
+
kind = NotEqualAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The value to compare to.
|
|
10
|
+
* This is always a string. Use the `dataType` to determine the correct data type.
|
|
11
|
+
*/
|
|
12
|
+
value;
|
|
13
|
+
/**
|
|
14
|
+
* The data type of the value. This is a value prefixed with
|
|
15
|
+
* `http://www.w3.org/2001/XMLSchema#` or `http://a.ml/vocabularies/shapes#`.
|
|
16
|
+
*
|
|
17
|
+
* Examples:
|
|
18
|
+
*
|
|
19
|
+
* - `http://www.w3.org/2001/XMLSchema#boolean`
|
|
20
|
+
* - `http://www.w3.org/2001/XMLSchema#string`
|
|
21
|
+
* - `http://www.w3.org/2001/XMLSchema#number`
|
|
22
|
+
* - `http://www.w3.org/2001/XMLSchema#integer`
|
|
23
|
+
* - `http://www.w3.org/2001/XMLSchema#long`
|
|
24
|
+
* - `http://a.ml/vocabularies/shapes#number`
|
|
25
|
+
* - `http://a.ml/vocabularies/shapes#integer`
|
|
26
|
+
* - `http://a.ml/vocabularies/shapes#double`
|
|
27
|
+
* - ...
|
|
28
|
+
*
|
|
29
|
+
* @default `http://www.w3.org/2001/XMLSchema#string`
|
|
30
|
+
*/
|
|
31
|
+
dataType;
|
|
32
|
+
/**
|
|
33
|
+
* Whether it should check for a value and the data type.
|
|
34
|
+
*/
|
|
35
|
+
strict;
|
|
36
|
+
constructor(valueOrInit, strict, dataType) {
|
|
37
|
+
super();
|
|
38
|
+
if (typeof valueOrInit === 'object') {
|
|
39
|
+
const typed = valueOrInit;
|
|
40
|
+
this.new(typed);
|
|
41
|
+
}
|
|
42
|
+
else if (typeof valueOrInit === 'string') {
|
|
43
|
+
this.new({
|
|
44
|
+
kind: NotEqualAssertionKind,
|
|
45
|
+
value: valueOrInit,
|
|
46
|
+
dataType,
|
|
47
|
+
strict,
|
|
48
|
+
enabled: true,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
new(init) {
|
|
53
|
+
super.new(init);
|
|
54
|
+
this.kind = NotEqualAssertionKind;
|
|
55
|
+
this.value = init.value;
|
|
56
|
+
this.dataType = init.dataType;
|
|
57
|
+
this.strict = init.strict;
|
|
58
|
+
}
|
|
59
|
+
checkValidity() {
|
|
60
|
+
return !!this.value;
|
|
61
|
+
}
|
|
62
|
+
toJSON() {
|
|
63
|
+
const result = {
|
|
64
|
+
...super.toJSON(),
|
|
65
|
+
kind: NotEqualAssertionKind,
|
|
66
|
+
};
|
|
67
|
+
if (this.value) {
|
|
68
|
+
result.value = this.value;
|
|
69
|
+
}
|
|
70
|
+
if (this.dataType) {
|
|
71
|
+
result.dataType = this.dataType;
|
|
72
|
+
}
|
|
73
|
+
if (typeof this.strict === 'boolean') {
|
|
74
|
+
result.strict = this.strict;
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=NotEqualAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotEqualAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/NotEqualAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAwCpE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,QAAQ;IACpC,IAAI,GAAG,qBAAqB,CAAC;IAEtC;;;OAGG;IACH,KAAK,CAAU;IAEf;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAU;IAElB;;OAEG;IACH,MAAM,CAAW;IAQjB,YAAY,WAAyC,EAAE,MAAgB,EAAE,QAAiB;QACxF,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,KAAK,GAAG,WAAiC,CAAC;YAChD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC;gBACP,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,WAAW;gBAClB,QAAQ;gBACR,MAAM;gBACN,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,GAAG,CAAC,IAAwB;QACnC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAAuB;YACjC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,qBAAqB;SAC5B,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;SACjC;QACD,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE;YACpC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;SAC7B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
export declare const NotIncludesAssertionKind = "HttpAction#NotIncludesAssertion";
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input does not include the set value.
|
|
5
|
+
*/
|
|
6
|
+
export interface INotIncludesAssertion extends IHttpStep {
|
|
7
|
+
kind: typeof NotIncludesAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The value to search for.
|
|
10
|
+
*/
|
|
11
|
+
value?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* An assertion that makes sure the input does not include the set value.
|
|
15
|
+
*/
|
|
16
|
+
export declare class NotIncludesAssertion extends HttpStep {
|
|
17
|
+
kind: string;
|
|
18
|
+
/**
|
|
19
|
+
* The value to search for.
|
|
20
|
+
*/
|
|
21
|
+
value?: string;
|
|
22
|
+
constructor(value: string);
|
|
23
|
+
constructor(init: INotIncludesAssertion);
|
|
24
|
+
constructor();
|
|
25
|
+
new(init: INotIncludesAssertion): void;
|
|
26
|
+
checkValidity(): boolean;
|
|
27
|
+
toJSON(): INotIncludesAssertion;
|
|
28
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const NotIncludesAssertionKind = 'HttpAction#NotIncludesAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input does not include the set value.
|
|
5
|
+
*/
|
|
6
|
+
export class NotIncludesAssertion extends HttpStep {
|
|
7
|
+
kind = NotIncludesAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The value to search for.
|
|
10
|
+
*/
|
|
11
|
+
value;
|
|
12
|
+
constructor(valueOrInit) {
|
|
13
|
+
super();
|
|
14
|
+
if (typeof valueOrInit === 'object') {
|
|
15
|
+
const typed = valueOrInit;
|
|
16
|
+
this.new(typed);
|
|
17
|
+
}
|
|
18
|
+
else if (typeof valueOrInit === 'string') {
|
|
19
|
+
this.new({
|
|
20
|
+
kind: NotIncludesAssertionKind,
|
|
21
|
+
value: valueOrInit,
|
|
22
|
+
enabled: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
new(init) {
|
|
27
|
+
super.new(init);
|
|
28
|
+
this.kind = NotIncludesAssertionKind;
|
|
29
|
+
this.value = init.value;
|
|
30
|
+
}
|
|
31
|
+
checkValidity() {
|
|
32
|
+
return !!this.value;
|
|
33
|
+
}
|
|
34
|
+
toJSON() {
|
|
35
|
+
const result = {
|
|
36
|
+
...super.toJSON(),
|
|
37
|
+
kind: NotIncludesAssertionKind,
|
|
38
|
+
};
|
|
39
|
+
if (this.value) {
|
|
40
|
+
result.value = this.value;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=NotIncludesAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotIncludesAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/NotIncludesAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,wBAAwB,GAAG,iCAAiC,CAAC;AAc1E;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,QAAQ;IACvC,IAAI,GAAG,wBAAwB,CAAC;IAEzC;;OAEG;IACH,KAAK,CAAU;IAQf,YAAY,WAA4C;QACtD,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,KAAK,GAAG,WAAoC,CAAC;YACnD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC;gBACP,IAAI,EAAE,wBAAwB;gBAC9B,KAAK,EAAE,WAAW;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,GAAG,CAAC,IAA2B;QACtC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAA0B;YACpC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,wBAAwB;SAC/B,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
export declare const NotOkAssertionKind = "HttpAction#NotOkAssertion";
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input has a truly value.
|
|
5
|
+
*/
|
|
6
|
+
export interface INotOkAssertion extends IHttpStep {
|
|
7
|
+
kind: typeof NotOkAssertionKind;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* An assertion that makes sure the input has a truly value.
|
|
11
|
+
*/
|
|
12
|
+
export declare class NotOkAssertion extends HttpStep {
|
|
13
|
+
kind: string;
|
|
14
|
+
constructor(init?: INotOkAssertion);
|
|
15
|
+
new(init: INotOkAssertion): void;
|
|
16
|
+
checkValidity(): boolean;
|
|
17
|
+
toJSON(): INotOkAssertion;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const NotOkAssertionKind = 'HttpAction#NotOkAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input has a truly value.
|
|
5
|
+
*/
|
|
6
|
+
export class NotOkAssertion extends HttpStep {
|
|
7
|
+
kind = NotOkAssertionKind;
|
|
8
|
+
constructor(init) {
|
|
9
|
+
super();
|
|
10
|
+
if (typeof init === 'object') {
|
|
11
|
+
this.new(init);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
new(init) {
|
|
15
|
+
super.new(init);
|
|
16
|
+
this.kind = NotOkAssertionKind;
|
|
17
|
+
}
|
|
18
|
+
checkValidity() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
toJSON() {
|
|
22
|
+
const result = {
|
|
23
|
+
...super.toJSON(),
|
|
24
|
+
kind: NotOkAssertionKind,
|
|
25
|
+
};
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=NotOkAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotOkAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/NotOkAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAS9D;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,QAAQ;IACjC,IAAI,GAAG,kBAAkB,CAAC;IAEnC,YAAY,IAAsB;QAChC,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAChB;IACH,CAAC;IAEQ,GAAG,CAAC,IAAqB;QAChC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAAoB;YAC9B,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,kBAAkB;SACzB,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HttpStep, IHttpStep } from "../../HttpStep.js";
|
|
2
|
+
import { ToBeTypes } from "./ToBeAssertion.js";
|
|
3
|
+
export declare const NotToBeAssertionKind = "HttpAction#NotToBeAssertion";
|
|
4
|
+
/**
|
|
5
|
+
* An assertion that makes sure the input is not of a specific type (string, number, boolean, object, array).
|
|
6
|
+
*/
|
|
7
|
+
export interface INotToBeAssertion extends IHttpStep {
|
|
8
|
+
kind: typeof NotToBeAssertionKind;
|
|
9
|
+
/**
|
|
10
|
+
* The type to expect.
|
|
11
|
+
*/
|
|
12
|
+
value?: ToBeTypes;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* An assertion that makes sure the input is not of a specific type (string, number, boolean, object, array).
|
|
16
|
+
*/
|
|
17
|
+
export declare class NotToBeAssertion extends HttpStep {
|
|
18
|
+
kind: string;
|
|
19
|
+
/**
|
|
20
|
+
* The type to expect.
|
|
21
|
+
*/
|
|
22
|
+
value?: ToBeTypes;
|
|
23
|
+
constructor(value: ToBeTypes);
|
|
24
|
+
constructor(init: INotToBeAssertion);
|
|
25
|
+
constructor();
|
|
26
|
+
new(init: INotToBeAssertion): void;
|
|
27
|
+
checkValidity(): boolean;
|
|
28
|
+
toJSON(): INotToBeAssertion;
|
|
29
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HttpStep } from "../../HttpStep.js";
|
|
2
|
+
export const NotToBeAssertionKind = 'HttpAction#NotToBeAssertion';
|
|
3
|
+
/**
|
|
4
|
+
* An assertion that makes sure the input is not of a specific type (string, number, boolean, object, array).
|
|
5
|
+
*/
|
|
6
|
+
export class NotToBeAssertion extends HttpStep {
|
|
7
|
+
kind = NotToBeAssertionKind;
|
|
8
|
+
/**
|
|
9
|
+
* The type to expect.
|
|
10
|
+
*/
|
|
11
|
+
value;
|
|
12
|
+
constructor(valueOrInit) {
|
|
13
|
+
super();
|
|
14
|
+
if (typeof valueOrInit === 'object') {
|
|
15
|
+
const typed = valueOrInit;
|
|
16
|
+
this.new(typed);
|
|
17
|
+
}
|
|
18
|
+
else if (typeof valueOrInit === 'string') {
|
|
19
|
+
this.new({
|
|
20
|
+
kind: NotToBeAssertionKind,
|
|
21
|
+
value: valueOrInit,
|
|
22
|
+
enabled: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
new(init) {
|
|
27
|
+
super.new(init);
|
|
28
|
+
this.kind = NotToBeAssertionKind;
|
|
29
|
+
this.value = init.value;
|
|
30
|
+
}
|
|
31
|
+
checkValidity() {
|
|
32
|
+
return !!this.value;
|
|
33
|
+
}
|
|
34
|
+
toJSON() {
|
|
35
|
+
const result = {
|
|
36
|
+
...super.toJSON(),
|
|
37
|
+
kind: NotToBeAssertionKind,
|
|
38
|
+
};
|
|
39
|
+
if (this.value) {
|
|
40
|
+
result.value = this.value;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=NotToBeAssertion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotToBeAssertion.js","sourceRoot":"","sources":["../../../../../../src/models/http-actions/steps/assertion/NotToBeAssertion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,mBAAmB,CAAC;AAGxD,MAAM,CAAC,MAAM,oBAAoB,GAAG,6BAA6B,CAAC;AAclE;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IACnC,IAAI,GAAG,oBAAoB,CAAC;IAErC;;OAEG;IACH,KAAK,CAAa;IAQlB,YAAY,WAA2C;QACrD,KAAK,EAAE,CAAC;QACR,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,KAAK,GAAG,WAAgC,CAAC;YAC/C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;SACjB;aAAM,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC;gBACP,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,WAAW;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAEQ,GAAG,CAAC,IAAuB;QAClC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,aAAa;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAEQ,MAAM;QACb,MAAM,MAAM,GAAsB;YAChC,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,oBAAoB;SAC3B,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;SAC3B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|