@api-client/core 0.6.29 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +6 -14
- package/build/browser.js +11 -16
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +8 -20
- package/build/index.js +13 -25
- package/build/index.js.map +1 -1
- package/build/src/amf/ApiSchemaValues.d.ts +2 -0
- package/build/src/amf/ApiSchemaValues.js +29 -23
- package/build/src/amf/ApiSchemaValues.js.map +1 -1
- package/build/src/authorization/lib/Utils.d.ts +1 -1
- package/build/src/cookies/CookieJar.d.ts +23 -0
- package/build/src/cookies/CookieJar.js +3 -0
- package/build/src/cookies/CookieJar.js.map +1 -0
- package/build/src/cookies/CookieParser.d.ts +67 -0
- package/build/src/cookies/CookieParser.js +316 -0
- package/build/src/cookies/CookieParser.js.map +1 -0
- package/build/src/cookies/InMemoryCookieJar.d.ts +12 -0
- package/build/src/cookies/InMemoryCookieJar.js +68 -0
- package/build/src/cookies/InMemoryCookieJar.js.map +1 -0
- package/build/src/cookies/Punycode.d.ts +12 -0
- package/build/src/cookies/Punycode.js +124 -0
- package/build/src/cookies/Punycode.js.map +1 -0
- package/build/src/data/RequestDataExtractor.d.ts +8 -7
- package/build/src/data/RequestDataExtractor.js +8 -10
- package/build/src/data/RequestDataExtractor.js.map +1 -1
- package/build/src/events/CustomEvent.js +5 -0
- package/build/src/events/CustomEvent.js.map +1 -1
- package/build/src/events/EventTypes.d.ts +43 -43
- package/build/src/events/amf/AmfEventTypes.d.ts +4 -4
- package/build/src/events/authorization/AuthorizationEventTypes.d.ts +4 -4
- package/build/src/events/cookies/CookieEventTypes.d.ts +9 -9
- package/build/src/events/encryption/EncryptionEventTypes.d.ts +2 -2
- package/build/src/events/environment/EnvironmentEventTypes.d.ts +1 -1
- package/build/src/events/models/ModelEventTypes.d.ts +7 -7
- package/build/src/events/process/ProcessEventTypes.d.ts +3 -3
- package/build/src/events/reporting/ReportingEventTypes.d.ts +1 -1
- package/build/src/events/telemetry/TelemetryEventTypes.d.ts +6 -6
- package/build/src/events/transport/TransportEventTypes.d.ts +6 -6
- package/build/src/events/transport/TransportEvents.d.ts +2 -2
- package/build/src/mocking/ProjectMock.d.ts +3 -2
- package/build/src/mocking/ProjectMock.js +3 -3
- package/build/src/mocking/ProjectMock.js.map +1 -1
- package/build/src/mocking/lib/App.d.ts +36 -0
- package/build/src/mocking/lib/App.js +70 -0
- package/build/src/mocking/lib/App.js.map +1 -0
- package/build/src/models/{arc/ArcProject.d.ts → AppProject.d.ts} +296 -134
- package/build/src/models/{arc/ArcProject.js → AppProject.js} +436 -79
- package/build/src/models/AppProject.js.map +1 -0
- package/build/src/models/AppRequest.d.ts +69 -0
- package/build/src/models/AppRequest.js +150 -0
- package/build/src/models/AppRequest.js.map +1 -0
- package/build/src/models/ClientCertificate.d.ts +2 -2
- package/build/src/models/Environment.d.ts +8 -1
- package/build/src/models/Environment.js +21 -0
- package/build/src/models/Environment.js.map +1 -1
- package/build/src/models/HostRule.d.ts +2 -2
- package/build/src/models/HttpCookie.d.ts +63 -12
- package/build/src/models/HttpCookie.js +178 -44
- package/build/src/models/HttpCookie.js.map +1 -1
- package/build/src/models/HttpHistory.d.ts +8 -3
- package/build/src/models/HttpHistory.js +3 -3
- package/build/src/models/HttpHistory.js.map +1 -1
- package/build/src/models/HttpProject.d.ts +34 -1
- package/build/src/models/HttpProject.js +104 -8
- package/build/src/models/HttpProject.js.map +1 -1
- package/build/src/models/ProjectFolder.d.ts +2 -0
- package/build/src/models/ProjectFolder.js +14 -0
- package/build/src/models/ProjectFolder.js.map +1 -1
- package/build/src/models/ProjectItem.d.ts +2 -0
- package/build/src/models/ProjectItem.js +20 -0
- package/build/src/models/ProjectItem.js.map +1 -1
- package/build/src/models/ProjectParent.js.map +1 -1
- package/build/src/models/ProjectRequest.d.ts +3 -2
- package/build/src/models/ProjectRequest.js.map +1 -1
- package/build/src/models/Property.d.ts +2 -2
- package/build/src/models/Property.js +2 -2
- package/build/src/models/Property.js.map +1 -1
- package/build/src/models/Request.d.ts +16 -8
- package/build/src/models/Request.js +20 -15
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/RequestAuthorization.js.map +1 -1
- package/build/src/models/RequestUiMeta.d.ts +0 -14
- package/build/src/models/RequestUiMeta.js +1 -10
- package/build/src/models/RequestUiMeta.js.map +1 -1
- package/build/src/models/Server.d.ts +1 -2
- package/build/src/models/Server.js.map +1 -1
- package/build/src/models/http-actions/HttpActions.d.ts +256 -0
- package/build/src/models/http-actions/HttpActions.js +46 -0
- package/build/src/models/http-actions/HttpActions.js.map +1 -0
- package/build/src/models/http-actions/LegacyTranslator.d.ts +17 -0
- package/build/src/models/http-actions/LegacyTranslator.js +222 -0
- package/build/src/models/http-actions/LegacyTranslator.js.map +1 -0
- package/build/src/models/store/Backend.d.ts +136 -1
- package/build/src/models/store/File.d.ts +1 -1
- package/build/src/models/store/File.js +2 -0
- package/build/src/models/store/File.js.map +1 -1
- package/build/src/models/store/User.d.ts +3 -3
- package/build/src/runtime/http-engine/CoreEngine.d.ts +2 -0
- package/build/src/runtime/http-engine/CoreEngine.js +1 -0
- package/build/src/runtime/http-engine/CoreEngine.js.map +1 -1
- package/build/src/runtime/http-engine/HttpEngine.d.ts +13 -0
- package/build/src/runtime/http-engine/HttpEngine.js +39 -31
- package/build/src/runtime/http-engine/HttpEngine.js.map +1 -1
- package/build/src/runtime/{actions/ConditionRunner.d.ts → http-runner/ConditionCheck.d.ts} +2 -2
- package/build/src/runtime/{actions/ConditionRunner.js → http-runner/ConditionCheck.js} +2 -2
- package/build/src/runtime/http-runner/ConditionCheck.js.map +1 -0
- package/build/src/runtime/http-runner/HttpFlowRunner.d.ts +62 -0
- package/build/src/runtime/http-runner/HttpFlowRunner.js +217 -0
- package/build/src/runtime/http-runner/HttpFlowRunner.js.map +1 -0
- package/build/src/runtime/{node/RequestFactory.d.ts → http-runner/HttpRequestRunner.d.ts} +40 -54
- package/build/src/runtime/http-runner/HttpRequestRunner.js +316 -0
- package/build/src/runtime/http-runner/HttpRequestRunner.js.map +1 -0
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.d.ts +25 -0
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.js +2 -0
- package/build/src/runtime/http-runner/HttpRuntimeEnvironment.js.map +1 -0
- package/build/src/runtime/http-runner/RequestAuthorizationProcessor.d.ts +56 -0
- package/build/src/runtime/http-runner/RequestAuthorizationProcessor.js +143 -0
- package/build/src/runtime/http-runner/RequestAuthorizationProcessor.js.map +1 -0
- package/build/src/runtime/http-runner/RequestCookiesProcessor.d.ts +24 -0
- package/build/src/runtime/http-runner/RequestCookiesProcessor.js +65 -0
- package/build/src/runtime/http-runner/RequestCookiesProcessor.js.map +1 -0
- package/build/src/runtime/node/InteropInterfaces.d.ts +21 -6
- package/build/src/runtime/node/ProjectParallelRunner.js +3 -1
- package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRequestRunner.d.ts +24 -10
- package/build/src/runtime/node/ProjectRequestRunner.js +116 -45
- package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunner.d.ts +5 -7
- package/build/src/runtime/node/ProjectRunner.js +30 -14
- package/build/src/runtime/node/ProjectRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunnerWorker.js +3 -0
- package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -1
- package/build/src/runtime/reporters/Reporter.d.ts +5 -0
- package/build/src/runtime/reporters/Reporter.js.map +1 -1
- package/build/src/runtime/store/FilesSdk.js +4 -4
- package/build/src/runtime/store/FilesSdk.js.map +1 -1
- package/build/src/runtime/store/HistorySdk.js +1 -1
- package/build/src/runtime/store/HistorySdk.js.map +1 -1
- package/build/src/runtime/store/HttpClientSdk.d.ts +167 -0
- package/build/src/runtime/store/HttpClientSdk.js +624 -0
- package/build/src/runtime/store/HttpClientSdk.js.map +1 -0
- package/build/src/runtime/store/RouteBuilder.d.ts +17 -2
- package/build/src/runtime/store/RouteBuilder.js +60 -3
- package/build/src/runtime/store/RouteBuilder.js.map +1 -1
- package/build/src/runtime/store/Sdk.d.ts +5 -0
- package/build/src/runtime/store/Sdk.js +5 -0
- package/build/src/runtime/store/Sdk.js.map +1 -1
- package/build/src/runtime/store/SharedSdk.js +1 -1
- package/build/src/runtime/store/SharedSdk.js.map +1 -1
- package/build/src/runtime/store/UsersSdk.js +1 -1
- package/build/src/runtime/store/UsersSdk.js.map +1 -1
- package/package.json +2 -2
- package/src/amf/ApiSchemaValues.ts +41 -33
- package/src/cookies/CookieJar.ts +26 -0
- package/src/cookies/CookieParser.ts +327 -0
- package/src/cookies/InMemoryCookieJar.ts +70 -0
- package/src/cookies/Punycode.ts +133 -0
- package/src/data/RequestDataExtractor.ts +14 -15
- package/src/events/CustomEvent.ts +4 -0
- package/src/mocking/ProjectMock.ts +4 -3
- package/src/mocking/lib/App.ts +101 -0
- package/src/models/{arc/ArcProject.ts → AppProject.ts} +671 -225
- package/src/models/AppRequest.ts +176 -0
- package/src/models/ClientCertificate.ts +2 -2
- package/src/models/Environment.ts +24 -2
- package/src/models/HostRule.ts +2 -2
- package/src/models/HttpCookie.ts +210 -48
- package/src/models/HttpHistory.ts +12 -5
- package/src/models/HttpProject.ts +113 -10
- package/src/models/ProjectFolder.ts +16 -0
- package/src/models/ProjectItem.ts +18 -0
- package/src/models/ProjectParent.ts +4 -1
- package/src/models/ProjectRequest.ts +4 -3
- package/src/models/Property.ts +4 -4
- package/src/models/Request.ts +29 -19
- package/src/models/RequestAuthorization.ts +4 -4
- package/src/models/RequestUiMeta.ts +1 -21
- package/src/models/Server.ts +1 -2
- package/src/models/http-actions/HttpActions.ts +270 -0
- package/src/models/http-actions/LegacyTranslator.ts +223 -0
- package/src/models/store/Backend.ts +148 -2
- package/src/models/store/File.ts +3 -1
- package/src/models/store/User.ts +3 -3
- package/src/runtime/http-engine/CoreEngine.ts +3 -2
- package/src/runtime/http-engine/HttpEngine.ts +48 -30
- package/src/runtime/{actions/ConditionRunner.ts → http-runner/ConditionCheck.ts} +3 -3
- package/src/runtime/http-runner/HttpFlowRunner.ts +232 -0
- package/src/runtime/http-runner/HttpRequestRunner.ts +353 -0
- package/src/runtime/http-runner/HttpRuntimeEnvironment.ts +27 -0
- package/src/runtime/http-runner/RequestAuthorizationProcessor.ts +144 -0
- package/src/runtime/http-runner/RequestCookiesProcessor.ts +74 -0
- package/src/runtime/node/InteropInterfaces.ts +24 -6
- package/src/runtime/node/ProjectParallelRunner.ts +4 -2
- package/src/runtime/node/ProjectRequestRunner.ts +130 -60
- package/src/runtime/node/ProjectRunner.ts +37 -22
- package/src/runtime/node/ProjectRunnerWorker.ts +3 -0
- package/src/runtime/reporters/Reporter.ts +5 -0
- package/src/runtime/store/FilesSdk.ts +4 -4
- package/src/runtime/store/HistorySdk.ts +1 -1
- package/src/runtime/store/HttpClientSdk.ts +629 -0
- package/src/runtime/store/RouteBuilder.ts +75 -3
- package/src/runtime/store/Sdk.ts +6 -0
- package/src/runtime/store/SharedSdk.ts +1 -1
- package/src/runtime/store/UsersSdk.ts +1 -1
- package/build/src/lib/cookies/Cookie.d.ts +0 -123
- package/build/src/lib/cookies/Cookie.js +0 -257
- package/build/src/lib/cookies/Cookie.js.map +0 -1
- package/build/src/lib/cookies/Cookies.d.ts +0 -90
- package/build/src/lib/cookies/Cookies.js +0 -310
- package/build/src/lib/cookies/Cookies.js.map +0 -1
- package/build/src/lib/cookies/Utils.d.ts +0 -47
- package/build/src/lib/cookies/Utils.js +0 -163
- package/build/src/lib/cookies/Utils.js.map +0 -1
- package/build/src/mocking/lib/Arc.d.ts +0 -10
- package/build/src/mocking/lib/Arc.js +0 -31
- package/build/src/mocking/lib/Arc.js.map +0 -1
- package/build/src/models/RequestActions.d.ts +0 -65
- package/build/src/models/RequestActions.js +0 -114
- package/build/src/models/RequestActions.js.map +0 -1
- package/build/src/models/actions/Action.d.ts +0 -75
- package/build/src/models/actions/Action.js +0 -188
- package/build/src/models/actions/Action.js.map +0 -1
- package/build/src/models/actions/ActionView.d.ts +0 -15
- package/build/src/models/actions/ActionView.js +0 -33
- package/build/src/models/actions/ActionView.js.map +0 -1
- package/build/src/models/actions/Condition.d.ts +0 -81
- package/build/src/models/actions/Condition.js +0 -185
- package/build/src/models/actions/Condition.js.map +0 -1
- package/build/src/models/actions/ConditionView.d.ts +0 -17
- package/build/src/models/actions/ConditionView.js +0 -34
- package/build/src/models/actions/ConditionView.js.map +0 -1
- package/build/src/models/actions/Enums.d.ts +0 -26
- package/build/src/models/actions/Enums.js +0 -31
- package/build/src/models/actions/Enums.js.map +0 -1
- package/build/src/models/actions/RunnableAction.d.ts +0 -59
- package/build/src/models/actions/RunnableAction.js +0 -106
- package/build/src/models/actions/RunnableAction.js.map +0 -1
- package/build/src/models/actions/runnable/DeleteCookieAction.d.ts +0 -44
- package/build/src/models/actions/runnable/DeleteCookieAction.js +0 -92
- package/build/src/models/actions/runnable/DeleteCookieAction.js.map +0 -1
- package/build/src/models/actions/runnable/Runnable.d.ts +0 -8
- package/build/src/models/actions/runnable/Runnable.js +0 -4
- package/build/src/models/actions/runnable/Runnable.js.map +0 -1
- package/build/src/models/actions/runnable/SetCookieAction.d.ts +0 -87
- package/build/src/models/actions/runnable/SetCookieAction.js +0 -176
- package/build/src/models/actions/runnable/SetCookieAction.js.map +0 -1
- package/build/src/models/actions/runnable/SetVariableAction.d.ts +0 -31
- package/build/src/models/actions/runnable/SetVariableAction.js +0 -63
- package/build/src/models/actions/runnable/SetVariableAction.js.map +0 -1
- package/build/src/models/actions/runnable/index.d.ts +0 -7
- package/build/src/models/actions/runnable/index.js +0 -2
- package/build/src/models/actions/runnable/index.js.map +0 -1
- package/build/src/models/arc/ArcHttpRequest.d.ts +0 -39
- package/build/src/models/arc/ArcHttpRequest.js +0 -106
- package/build/src/models/arc/ArcHttpRequest.js.map +0 -1
- package/build/src/models/arc/ArcProject.js.map +0 -1
- package/build/src/runtime/actions/ActionRunner.d.ts +0 -17
- package/build/src/runtime/actions/ActionRunner.js +0 -74
- package/build/src/runtime/actions/ActionRunner.js.map +0 -1
- package/build/src/runtime/actions/ConditionRunner.js.map +0 -1
- package/build/src/runtime/actions/RunnableCondition.d.ts +0 -27
- package/build/src/runtime/actions/RunnableCondition.js +0 -50
- package/build/src/runtime/actions/RunnableCondition.js.map +0 -1
- package/build/src/runtime/actions/runnable/ActionRunnable.d.ts +0 -13
- package/build/src/runtime/actions/runnable/ActionRunnable.js +0 -13
- package/build/src/runtime/actions/runnable/ActionRunnable.js.map +0 -1
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.d.ts +0 -7
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js +0 -36
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js.map +0 -1
- package/build/src/runtime/actions/runnable/SetCookieRunnable.d.ts +0 -10
- package/build/src/runtime/actions/runnable/SetCookieRunnable.js +0 -89
- package/build/src/runtime/actions/runnable/SetCookieRunnable.js.map +0 -1
- package/build/src/runtime/actions/runnable/SetVariableRunnable.d.ts +0 -10
- package/build/src/runtime/actions/runnable/SetVariableRunnable.js +0 -49
- package/build/src/runtime/actions/runnable/SetVariableRunnable.js.map +0 -1
- package/build/src/runtime/modules/BasicAuthCache.d.ts +0 -39
- package/build/src/runtime/modules/BasicAuthCache.js +0 -122
- package/build/src/runtime/modules/BasicAuthCache.js.map +0 -1
- package/build/src/runtime/modules/ExecutionResponse.d.ts +0 -4
- package/build/src/runtime/modules/ExecutionResponse.js +0 -6
- package/build/src/runtime/modules/ExecutionResponse.js.map +0 -1
- package/build/src/runtime/modules/ModulesRegistry.d.ts +0 -93
- package/build/src/runtime/modules/ModulesRegistry.js +0 -69
- package/build/src/runtime/modules/ModulesRegistry.js.map +0 -1
- package/build/src/runtime/modules/RequestAuthorization.d.ts +0 -6
- package/build/src/runtime/modules/RequestAuthorization.js +0 -110
- package/build/src/runtime/modules/RequestAuthorization.js.map +0 -1
- package/build/src/runtime/modules/RequestCookies.d.ts +0 -17
- package/build/src/runtime/modules/RequestCookies.js +0 -134
- package/build/src/runtime/modules/RequestCookies.js.map +0 -1
- package/build/src/runtime/node/RequestFactory.js +0 -406
- package/build/src/runtime/node/RequestFactory.js.map +0 -1
- package/build/src/runtime/node/VariablesStore.d.ts +0 -9
- package/build/src/runtime/node/VariablesStore.js +0 -19
- package/build/src/runtime/node/VariablesStore.js.map +0 -1
- package/src/lib/cookies/Cookie.ts +0 -312
- package/src/lib/cookies/Cookies.ts +0 -326
- package/src/lib/cookies/Utils.ts +0 -168
- package/src/mocking/lib/Arc.ts +0 -34
- package/src/models/RequestActions.ts +0 -161
- package/src/models/actions/Action.ts +0 -213
- package/src/models/actions/ActionView.ts +0 -40
- package/src/models/actions/Condition.ts +0 -207
- package/src/models/actions/ConditionView.ts +0 -42
- package/src/models/actions/Enums.ts +0 -29
- package/src/models/actions/RunnableAction.ts +0 -144
- package/src/models/actions/runnable/DeleteCookieAction.ts +0 -113
- package/src/models/actions/runnable/Runnable.ts +0 -9
- package/src/models/actions/runnable/SetCookieAction.ts +0 -216
- package/src/models/actions/runnable/SetVariableAction.ts +0 -81
- package/src/models/arc/ArcHttpRequest.ts +0 -121
- package/src/models/arc/readme.md +0 -3
- package/src/runtime/actions/ActionRunner.ts +0 -83
- package/src/runtime/actions/RunnableCondition.ts +0 -56
- package/src/runtime/actions/runnable/ActionRunnable.ts +0 -19
- package/src/runtime/actions/runnable/DeleteCookieRunnable.ts +0 -39
- package/src/runtime/actions/runnable/SetCookieRunnable.ts +0 -92
- package/src/runtime/actions/runnable/SetVariableRunnable.ts +0 -53
- package/src/runtime/modules/BasicAuthCache.ts +0 -129
- package/src/runtime/modules/ExecutionResponse.ts +0 -4
- package/src/runtime/modules/ModulesRegistry.ts +0 -136
- package/src/runtime/modules/RequestAuthorization.ts +0 -106
- package/src/runtime/modules/RequestCookies.ts +0 -146
- package/src/runtime/node/RequestFactory.ts +0 -432
- package/src/runtime/node/VariablesStore.ts +0 -25
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { IHttpRequest } from "
|
|
2
|
-
import { IRequest, Request } from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
1
|
+
import { IHttpRequest } from "./HttpRequest.js";
|
|
2
|
+
import { IRequest, Request } from "./Request.js";
|
|
3
|
+
import { Environment, IEnvironment, Kind as EnvironmentKind } from './Environment.js';
|
|
4
|
+
import { IThing, Thing } from "./Thing.js";
|
|
5
|
+
import { ARCHistoryRequest, ARCSavedRequest } from "./legacy/request/ArcRequest.js";
|
|
6
|
+
import { ARCProject } from "./legacy/models/ArcLegacyProject.js";
|
|
7
|
+
import { Certificate, HttpCertificate } from "./ClientCertificate.js";
|
|
8
|
+
import { IProjectRequestIterator } from "./HttpProject.js";
|
|
9
|
+
export declare const AppProjectKind = "Core#AppProject";
|
|
10
|
+
export declare const AppProjectFolderKind = "Core#AppProjectFolder";
|
|
11
|
+
export declare const AppProjectRequestKind = "Core#AppProjectRequest";
|
|
12
|
+
export interface IAppProjectItemOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The parent folder to add the item to.
|
|
15
|
+
*/
|
|
16
|
+
parent?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IAppProjectItemCreateOptions extends IAppProjectItemOptions {
|
|
19
|
+
/**
|
|
20
|
+
* The position at which to add the item.
|
|
21
|
+
*/
|
|
22
|
+
index?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IAppProjectRequestCloneOptions {
|
|
10
25
|
/**
|
|
11
26
|
* By default it revalidates (re-creates) keys in the request.
|
|
12
27
|
* Set this to true to not make any changes to the keys.
|
|
@@ -19,13 +34,13 @@ export interface IArcRequestCloneOptions {
|
|
|
19
34
|
*/
|
|
20
35
|
withoutAttach?: boolean;
|
|
21
36
|
}
|
|
22
|
-
export interface
|
|
37
|
+
export interface IAppProjectFolderAddOptions {
|
|
23
38
|
/**
|
|
24
39
|
* Optionally the position at which to add the request into the list of items.
|
|
25
40
|
*/
|
|
26
41
|
index?: number;
|
|
27
42
|
}
|
|
28
|
-
export interface
|
|
43
|
+
export interface IAppProjectFolderCloneOptions {
|
|
29
44
|
/**
|
|
30
45
|
* By default it clones the folder with all requests in it.
|
|
31
46
|
* Set this to `true` to skip copying the requests along with the folder.
|
|
@@ -42,7 +57,7 @@ export interface IArcFolderCloneOptions {
|
|
|
42
57
|
* is put into the project root rather than the parent folder (as it would when cloning
|
|
43
58
|
* a folder inside the same project).
|
|
44
59
|
*/
|
|
45
|
-
targetProject?:
|
|
60
|
+
targetProject?: AppProject;
|
|
46
61
|
/**
|
|
47
62
|
* The **key** of the target folder.
|
|
48
63
|
*
|
|
@@ -51,119 +66,127 @@ export interface IArcFolderCloneOptions {
|
|
|
51
66
|
*/
|
|
52
67
|
targetFolder?: string;
|
|
53
68
|
}
|
|
54
|
-
export interface
|
|
69
|
+
export interface IAppProjectFolderCreateOptions extends IAppProjectItemOptions {
|
|
55
70
|
/**
|
|
56
71
|
* Ignores the operation when the folder with the same name already exists.
|
|
57
72
|
* This command can be used used to ensure that the folder exists.
|
|
58
73
|
*/
|
|
59
74
|
skipExisting?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* The id of the parent folder. When not set it adds the folder to the project root.
|
|
62
|
-
*/
|
|
63
|
-
parent?: string;
|
|
64
75
|
/**
|
|
65
76
|
* Optionally the position at which to add the folder into the list of items.
|
|
66
77
|
*/
|
|
67
78
|
index?: number;
|
|
68
79
|
}
|
|
69
|
-
export interface
|
|
80
|
+
export interface IAppProjectFolderSearchOptions {
|
|
70
81
|
/**
|
|
71
82
|
* When set it searches for a folder using keys only.
|
|
72
83
|
* By default it searches for a key and the name.
|
|
73
84
|
*/
|
|
74
85
|
keyOnly?: boolean;
|
|
75
86
|
}
|
|
76
|
-
export interface
|
|
87
|
+
export interface IAppProjectFolderDeleteOptions {
|
|
77
88
|
/**
|
|
78
89
|
* When set it won't throw an error when the folder is not found in the project.
|
|
79
90
|
*/
|
|
80
91
|
safe?: boolean;
|
|
81
92
|
}
|
|
82
|
-
export interface
|
|
83
|
-
/**
|
|
84
|
-
* The id of the parent folder. When not set it adds the request to the project root.
|
|
85
|
-
*/
|
|
86
|
-
parent?: string;
|
|
93
|
+
export interface IAppProjectRequestAddOptions extends IAppProjectItemOptions {
|
|
87
94
|
/**
|
|
88
95
|
* Optionally the position at which to add the request into the list of items.
|
|
89
96
|
*/
|
|
90
97
|
index?: number;
|
|
91
98
|
}
|
|
92
|
-
export interface
|
|
99
|
+
export interface IAppProjectRequestSearchOptions {
|
|
93
100
|
/**
|
|
94
101
|
* When set it searches for a request using keys only.
|
|
95
102
|
* By default it searches for a key and the name.
|
|
96
103
|
*/
|
|
97
104
|
keyOnly?: boolean;
|
|
98
105
|
}
|
|
99
|
-
export interface
|
|
106
|
+
export interface IAppProjectRequestDeleteOptions {
|
|
100
107
|
/**
|
|
101
108
|
* When set it won't throw an error when the request is not found in the project.
|
|
102
109
|
*/
|
|
103
110
|
safe?: boolean;
|
|
104
111
|
}
|
|
105
|
-
export interface
|
|
112
|
+
export interface IAppProjectProjectMoveOptions extends IAppProjectItemOptions {
|
|
106
113
|
/**
|
|
107
114
|
* The position at which to insert the object in the destination. BY default it adds the object at the end.
|
|
108
115
|
*/
|
|
109
116
|
index?: number;
|
|
110
|
-
/**
|
|
111
|
-
* The name or the key of the parent folder to move the item into.
|
|
112
|
-
* When not set it moves the item to the project's root.
|
|
113
|
-
*/
|
|
114
|
-
parent?: string;
|
|
115
117
|
}
|
|
116
|
-
export interface
|
|
118
|
+
export interface IAppProjectFolderListOptions {
|
|
117
119
|
/**
|
|
118
120
|
* Folder name or key to list folders for.
|
|
119
121
|
*/
|
|
120
122
|
folder?: string;
|
|
121
123
|
}
|
|
122
|
-
export interface
|
|
124
|
+
export interface IAppProjectProjectCloneOptions {
|
|
123
125
|
/**
|
|
124
126
|
* By default it revalidates (re-creates) keys in the request.
|
|
125
127
|
* Set this to true to not make any changes to the keys.
|
|
126
128
|
*/
|
|
127
129
|
withoutRevalidate?: boolean;
|
|
128
130
|
}
|
|
129
|
-
export interface
|
|
130
|
-
|
|
131
|
+
export interface IAppProjectEnvironmentCreateOptions extends IAppProjectItemOptions {
|
|
132
|
+
/**
|
|
133
|
+
* The position at which to add the item.
|
|
134
|
+
*/
|
|
135
|
+
index?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface IAppProjectReadEnvironmentOptions extends IAppProjectItemOptions {
|
|
138
|
+
/**
|
|
139
|
+
* The name or the key of the environment to select.
|
|
140
|
+
*
|
|
141
|
+
* When the name is not specified it selects:
|
|
142
|
+
* - the first environment from the project, if any
|
|
143
|
+
* - any parent folder's first environment to the requested folder, if any (if parent is set)
|
|
144
|
+
* - the requested folder's first environment, if any (if parent is set)
|
|
145
|
+
*/
|
|
146
|
+
nameOrKey?: string;
|
|
147
|
+
}
|
|
148
|
+
export interface IAppProjectRequest extends IRequest {
|
|
149
|
+
kind: typeof AppProjectRequestKind;
|
|
131
150
|
key: string;
|
|
132
151
|
}
|
|
133
|
-
export interface
|
|
134
|
-
kind: typeof
|
|
152
|
+
export interface IAppProjectItem {
|
|
153
|
+
kind: typeof AppProjectFolderKind | typeof AppProjectRequestKind | typeof EnvironmentKind;
|
|
135
154
|
key: string;
|
|
136
155
|
}
|
|
137
|
-
export interface
|
|
156
|
+
export interface IAppProjectDefinitions {
|
|
138
157
|
/**
|
|
139
158
|
* The list of all folders defined in the project.
|
|
140
159
|
*/
|
|
141
|
-
folders?:
|
|
160
|
+
folders?: IAppProjectParent[];
|
|
142
161
|
/**
|
|
143
162
|
* The list of all requests defined in the project.
|
|
144
163
|
*/
|
|
145
|
-
requests?:
|
|
164
|
+
requests?: IAppProjectRequest[];
|
|
165
|
+
environments?: IEnvironment[];
|
|
166
|
+
certificates?: HttpCertificate[];
|
|
146
167
|
}
|
|
147
|
-
export interface
|
|
168
|
+
export interface AppProjectDefinitions {
|
|
148
169
|
/**
|
|
149
170
|
* The list of all folders defined in the project.
|
|
150
171
|
*/
|
|
151
|
-
folders:
|
|
172
|
+
folders: AppProjectFolder[];
|
|
152
173
|
/**
|
|
153
174
|
* The list of all requests defined in the project.
|
|
154
175
|
*/
|
|
155
|
-
requests:
|
|
176
|
+
requests: AppProjectRequest[];
|
|
177
|
+
environments: Environment[];
|
|
178
|
+
certificates: Certificate[];
|
|
156
179
|
}
|
|
157
|
-
|
|
158
|
-
|
|
180
|
+
/**
|
|
181
|
+
* An app project is similar to the HttpProject but stored for a single application
|
|
182
|
+
* and has no sharing options. The AppProject can be upgraded to an HttpProject.
|
|
183
|
+
*/
|
|
184
|
+
export interface IAppProject extends IAppProjectParent {
|
|
185
|
+
definitions: IAppProjectDefinitions;
|
|
159
186
|
}
|
|
160
|
-
export interface
|
|
187
|
+
export interface IAppProjectParent {
|
|
161
188
|
key: string;
|
|
162
|
-
|
|
163
|
-
* The auto-generated key for the folder object.
|
|
164
|
-
* For the project root this is the same as the `_id`.
|
|
165
|
-
*/
|
|
166
|
-
kind: typeof ArcProjectKind | typeof ArcProjectFolderKind;
|
|
189
|
+
kind: typeof AppProjectKind | typeof AppProjectFolderKind;
|
|
167
190
|
/**
|
|
168
191
|
* Folder meta
|
|
169
192
|
*/
|
|
@@ -173,7 +196,7 @@ export interface IProjectParent {
|
|
|
173
196
|
* It is an ordered list of requests and folders.
|
|
174
197
|
* The actual definition is kept in the root's `definitions`.
|
|
175
198
|
*/
|
|
176
|
-
items:
|
|
199
|
+
items: IAppProjectItem[];
|
|
177
200
|
/**
|
|
178
201
|
* Timestamp when the project was last updated.
|
|
179
202
|
*/
|
|
@@ -183,7 +206,7 @@ export interface IProjectParent {
|
|
|
183
206
|
*/
|
|
184
207
|
created?: number;
|
|
185
208
|
}
|
|
186
|
-
export declare class
|
|
209
|
+
export declare class AppProjectRequest extends Request {
|
|
187
210
|
kind: string;
|
|
188
211
|
/**
|
|
189
212
|
* The identifier of the request.
|
|
@@ -192,7 +215,7 @@ export declare class ArcProjectRequest extends Request {
|
|
|
192
215
|
/**
|
|
193
216
|
* A reference to the top level project object.
|
|
194
217
|
*/
|
|
195
|
-
project:
|
|
218
|
+
project: AppProject;
|
|
196
219
|
/**
|
|
197
220
|
* Creates a project request from an URL.
|
|
198
221
|
* This does not manipulate the project.
|
|
@@ -200,7 +223,7 @@ export declare class ArcProjectRequest extends Request {
|
|
|
200
223
|
* @param url The Request URL. This is required.
|
|
201
224
|
* @param project The parent project.
|
|
202
225
|
*/
|
|
203
|
-
static fromUrl(url: string, project?:
|
|
226
|
+
static fromUrl(url: string, project?: AppProject): AppProjectRequest;
|
|
204
227
|
/**
|
|
205
228
|
* Creates a project request from a name.
|
|
206
229
|
* This does not manipulate the project.
|
|
@@ -208,7 +231,7 @@ export declare class ArcProjectRequest extends Request {
|
|
|
208
231
|
* @param name The Request name.
|
|
209
232
|
* @param project The parent project.This is required.
|
|
210
233
|
*/
|
|
211
|
-
static fromName(name: string, project?:
|
|
234
|
+
static fromName(name: string, project?: AppProject): AppProjectRequest;
|
|
212
235
|
/**
|
|
213
236
|
* Creates a project request from an HttpRequest definition.
|
|
214
237
|
* This does not manipulate the project.
|
|
@@ -216,22 +239,22 @@ export declare class ArcProjectRequest extends Request {
|
|
|
216
239
|
* @param project The parent project This is required.
|
|
217
240
|
* @param info The request data.
|
|
218
241
|
*/
|
|
219
|
-
static fromHttpRequest(info: IHttpRequest, project?:
|
|
242
|
+
static fromHttpRequest(info: IHttpRequest, project?: AppProject): AppProjectRequest;
|
|
220
243
|
/**
|
|
221
244
|
* Creates a project request for a schema of a Request.
|
|
222
245
|
*/
|
|
223
|
-
static fromRequest(request: IRequest, project:
|
|
224
|
-
constructor(project:
|
|
225
|
-
new(init:
|
|
226
|
-
toJSON():
|
|
246
|
+
static fromRequest(request: IRequest, project: AppProject): AppProjectRequest;
|
|
247
|
+
constructor(project: AppProject, input?: string | IAppProjectRequest);
|
|
248
|
+
new(init: IAppProjectRequest): void;
|
|
249
|
+
toJSON(): IAppProjectRequest;
|
|
227
250
|
/**
|
|
228
251
|
* @returns The instance of the ArcProject or a ArcProjectFolder that is a closes parent of this instance.
|
|
229
252
|
*/
|
|
230
|
-
getParent():
|
|
253
|
+
getParent(): AppProjectFolder | AppProject | undefined;
|
|
231
254
|
/**
|
|
232
255
|
* @returns A reference to the parent folder or the top-level HTTP project.
|
|
233
256
|
*/
|
|
234
|
-
getProject():
|
|
257
|
+
getProject(): AppProject;
|
|
235
258
|
/**
|
|
236
259
|
* Removes this request from the project.
|
|
237
260
|
*/
|
|
@@ -241,7 +264,7 @@ export declare class ArcProjectRequest extends Request {
|
|
|
241
264
|
* By default it attaches the copied request to the same parent.
|
|
242
265
|
* Use the options dictionary to control this behavior.
|
|
243
266
|
*/
|
|
244
|
-
clone(opts?:
|
|
267
|
+
clone(opts?: IAppProjectRequestCloneOptions): AppProjectRequest;
|
|
245
268
|
/**
|
|
246
269
|
* The static version of the `clone()` method.
|
|
247
270
|
*
|
|
@@ -250,13 +273,13 @@ export declare class ArcProjectRequest extends Request {
|
|
|
250
273
|
* @param opts Optional options.
|
|
251
274
|
* @returns The copied request.
|
|
252
275
|
*/
|
|
253
|
-
static clone(request:
|
|
276
|
+
static clone(request: IAppProjectRequest, project: AppProject, opts?: IAppProjectRequestCloneOptions): AppProjectRequest;
|
|
254
277
|
}
|
|
255
|
-
export declare class
|
|
278
|
+
export declare class AppProjectItem {
|
|
256
279
|
/**
|
|
257
280
|
* The kind of the item.
|
|
258
281
|
*/
|
|
259
|
-
kind: typeof
|
|
282
|
+
kind: typeof AppProjectFolderKind | typeof AppProjectRequestKind | typeof EnvironmentKind;
|
|
260
283
|
/**
|
|
261
284
|
* The identifier of the object in the `definitions` array of the project.
|
|
262
285
|
*/
|
|
@@ -264,7 +287,7 @@ export declare class ArcProjectItem {
|
|
|
264
287
|
/**
|
|
265
288
|
* A reference to the top level project object.
|
|
266
289
|
*/
|
|
267
|
-
project:
|
|
290
|
+
project: AppProject;
|
|
268
291
|
/**
|
|
269
292
|
* Checks whether the input is a definition of a project item.
|
|
270
293
|
*/
|
|
@@ -272,38 +295,42 @@ export declare class ArcProjectItem {
|
|
|
272
295
|
/**
|
|
273
296
|
* @return An instance that represents a request item
|
|
274
297
|
*/
|
|
275
|
-
static projectRequest(project:
|
|
298
|
+
static projectRequest(project: AppProject, key: string): AppProjectItem;
|
|
276
299
|
/**
|
|
277
300
|
* @return An instance that represents a folder item
|
|
278
301
|
*/
|
|
279
|
-
static projectFolder(project:
|
|
302
|
+
static projectFolder(project: AppProject, key: string): AppProjectItem;
|
|
303
|
+
/**
|
|
304
|
+
* @return An instance that represents an environment item
|
|
305
|
+
*/
|
|
306
|
+
static projectEnvironment(project: AppProject, key: string): AppProjectItem;
|
|
280
307
|
/**
|
|
281
308
|
* @param project The top-most project.
|
|
282
309
|
* @param input The project item definition used to restore the state.
|
|
283
310
|
*/
|
|
284
|
-
constructor(project:
|
|
311
|
+
constructor(project: AppProject, input: string | IAppProjectItem);
|
|
285
312
|
/**
|
|
286
313
|
* Creates a new project item clearing anything that is so far defined.
|
|
287
314
|
*
|
|
288
315
|
* Note, this throws an error when the project item is not a project item.
|
|
289
316
|
*/
|
|
290
|
-
new(init:
|
|
291
|
-
toJSON():
|
|
317
|
+
new(init: IAppProjectItem): void;
|
|
318
|
+
toJSON(): IAppProjectItem;
|
|
292
319
|
/**
|
|
293
320
|
* @returns The instance of the definition associated with this item.
|
|
294
321
|
*/
|
|
295
|
-
getItem():
|
|
322
|
+
getItem(): AppProjectFolder | AppProjectRequest | Environment | undefined;
|
|
296
323
|
/**
|
|
297
324
|
* @returns The instance of the ArcProject or a ArcProjectFolder that is a closest parent of this item.
|
|
298
325
|
*/
|
|
299
|
-
getParent():
|
|
326
|
+
getParent(): AppProjectFolder | AppProject | undefined;
|
|
300
327
|
}
|
|
301
|
-
export declare abstract class
|
|
328
|
+
export declare abstract class AppProjectParent {
|
|
302
329
|
/**
|
|
303
330
|
* The auto-generated key for the folder object.
|
|
304
331
|
* For the project root this is the same as the `_id`.
|
|
305
332
|
*/
|
|
306
|
-
kind: typeof
|
|
333
|
+
kind: typeof AppProjectKind | typeof AppProjectFolderKind;
|
|
307
334
|
/**
|
|
308
335
|
* The key of the project / folder.
|
|
309
336
|
*/
|
|
@@ -317,7 +344,7 @@ export declare abstract class ArcProjectParent {
|
|
|
317
344
|
* It is an ordered list of requests and folders.
|
|
318
345
|
* The actual definition is kept in the root's `definitions`.
|
|
319
346
|
*/
|
|
320
|
-
items:
|
|
347
|
+
items: AppProjectItem[];
|
|
321
348
|
/**
|
|
322
349
|
* Timestamp when the project was last updated.
|
|
323
350
|
*/
|
|
@@ -326,41 +353,41 @@ export declare abstract class ArcProjectParent {
|
|
|
326
353
|
* Timestamp when the project was created.
|
|
327
354
|
*/
|
|
328
355
|
created: number;
|
|
329
|
-
constructor(kind: typeof
|
|
356
|
+
constructor(kind: typeof AppProjectKind | typeof AppProjectFolderKind, input?: string | IAppProjectParent);
|
|
330
357
|
/**
|
|
331
358
|
* Creates a new project folder clearing anything that is so far defined.
|
|
332
359
|
*
|
|
333
360
|
* Note, this throws an error when the project folder is not a project folder.
|
|
334
361
|
*/
|
|
335
|
-
new(init:
|
|
336
|
-
abstract setItems(items?:
|
|
362
|
+
new(init: IAppProjectParent): void;
|
|
363
|
+
abstract setItems(items?: IAppProjectItem[]): void;
|
|
337
364
|
/**
|
|
338
365
|
* Lists items (not the actual definitions!) that are folders.
|
|
339
366
|
*/
|
|
340
|
-
listFolderItems():
|
|
367
|
+
listFolderItems(): AppProjectItem[];
|
|
341
368
|
/**
|
|
342
369
|
* Lists items (not the actual definitions!) that are requests.
|
|
343
370
|
*/
|
|
344
|
-
listRequestItems():
|
|
371
|
+
listRequestItems(): AppProjectItem[];
|
|
345
372
|
}
|
|
346
|
-
export declare class
|
|
347
|
-
project:
|
|
373
|
+
export declare class AppProjectFolder extends AppProjectParent {
|
|
374
|
+
project: AppProject;
|
|
348
375
|
/**
|
|
349
376
|
* Creates a new ArcProjectFolder object from a name.
|
|
350
377
|
* @param project The top-most project.
|
|
351
378
|
* @param name The name to set.
|
|
352
379
|
*/
|
|
353
|
-
static fromName(project:
|
|
354
|
-
constructor(project:
|
|
355
|
-
toJSON():
|
|
356
|
-
setItems(items?:
|
|
380
|
+
static fromName(project: AppProject, name?: string): AppProjectFolder;
|
|
381
|
+
constructor(project: AppProject, input?: string | IAppProjectParent);
|
|
382
|
+
toJSON(): IAppProjectParent;
|
|
383
|
+
setItems(items?: IAppProjectItem[]): void;
|
|
357
384
|
/**
|
|
358
385
|
* Appends an instance of a folder to a project.
|
|
359
386
|
*
|
|
360
387
|
* @param folder The folder to add to this project.
|
|
361
388
|
* @returns The added folder.
|
|
362
389
|
*/
|
|
363
|
-
addFolder(folder:
|
|
390
|
+
addFolder(folder: AppProjectFolder): AppProjectFolder;
|
|
364
391
|
/**
|
|
365
392
|
* Appends new folder to a project from a full folder schema.
|
|
366
393
|
* This is primarily used to insert a folder on the client side
|
|
@@ -369,14 +396,14 @@ export declare class ArcProjectFolder extends ArcProjectParent {
|
|
|
369
396
|
* @param folder The folder schema to add to this project.
|
|
370
397
|
* @returns The added folder.
|
|
371
398
|
*/
|
|
372
|
-
addFolder(folder:
|
|
399
|
+
addFolder(folder: IAppProjectParent): AppProjectFolder;
|
|
373
400
|
/**
|
|
374
401
|
* Appends a new folder to the project or a sub-folder.
|
|
375
402
|
*
|
|
376
403
|
* @param name The name to set. Optional.
|
|
377
404
|
* @returns The newly inserted folder. If the folder already existed it returns its instance.
|
|
378
405
|
*/
|
|
379
|
-
addFolder(name?: string):
|
|
406
|
+
addFolder(name?: string): AppProjectFolder;
|
|
380
407
|
/**
|
|
381
408
|
* Adds a request to the project or a sub-folder.
|
|
382
409
|
*
|
|
@@ -384,7 +411,7 @@ export declare class ArcProjectFolder extends ArcProjectParent {
|
|
|
384
411
|
* @param opts The request add options.
|
|
385
412
|
* @returns The inserted into the definitions request.
|
|
386
413
|
*/
|
|
387
|
-
addRequest(url: string, opts?:
|
|
414
|
+
addRequest(url: string, opts?: IAppProjectFolderAddOptions): AppProjectRequest;
|
|
388
415
|
/**
|
|
389
416
|
* Adds a request to the project or a sub-folder.
|
|
390
417
|
*
|
|
@@ -392,15 +419,15 @@ export declare class ArcProjectFolder extends ArcProjectParent {
|
|
|
392
419
|
* @param opts The request add options.
|
|
393
420
|
* @returns The inserted into the definitions request.
|
|
394
421
|
*/
|
|
395
|
-
addRequest(request:
|
|
422
|
+
addRequest(request: IAppProjectRequest | AppProjectRequest, opts?: IAppProjectFolderAddOptions): AppProjectRequest;
|
|
396
423
|
/**
|
|
397
424
|
* @returns The instance of the ArcProject or a ArcProjectFolder that is a closes parent of this instance.
|
|
398
425
|
*/
|
|
399
|
-
getParent():
|
|
426
|
+
getParent(): AppProjectFolder | AppProject | undefined;
|
|
400
427
|
/**
|
|
401
428
|
* @returns A reference to the parent folder or the top-level HTTP project.
|
|
402
429
|
*/
|
|
403
|
-
getProject():
|
|
430
|
+
getProject(): AppProject;
|
|
404
431
|
/**
|
|
405
432
|
* Removes this folder from the project.
|
|
406
433
|
*/
|
|
@@ -414,14 +441,14 @@ export declare class ArcProjectFolder extends ArcProjectParent {
|
|
|
414
441
|
*
|
|
415
442
|
* @param opts Cloning options
|
|
416
443
|
*/
|
|
417
|
-
clone(opts?:
|
|
444
|
+
clone(opts?: IAppProjectFolderCloneOptions): AppProjectFolder;
|
|
418
445
|
/**
|
|
419
446
|
* Clones the current requests to the target folder.
|
|
420
447
|
*
|
|
421
448
|
* @param folder The target folder into which to put the requests. The folder has to have the target project attached to it.
|
|
422
449
|
* @param project The originating project where the definitions are stored
|
|
423
450
|
*/
|
|
424
|
-
protected cloneRequests(folder:
|
|
451
|
+
protected cloneRequests(folder: AppProjectFolder, project: AppProject): void;
|
|
425
452
|
/**
|
|
426
453
|
* Clones the sub-folders to the target folder.
|
|
427
454
|
*
|
|
@@ -429,24 +456,65 @@ export declare class ArcProjectFolder extends ArcProjectParent {
|
|
|
429
456
|
* @param project The originating project where the definitions are stored
|
|
430
457
|
* @param withRequests Whether to clone requests with the folder.
|
|
431
458
|
*/
|
|
432
|
-
protected cloneSubFolders(folder:
|
|
459
|
+
protected cloneSubFolders(folder: AppProjectFolder, project: AppProject, withRequests?: boolean): void;
|
|
433
460
|
/**
|
|
434
461
|
* Lists folders in this folder.
|
|
435
462
|
*/
|
|
436
|
-
listFolders():
|
|
463
|
+
listFolders(): AppProjectFolder[];
|
|
437
464
|
/**
|
|
438
465
|
* Lists requests in this folder.
|
|
439
466
|
*/
|
|
440
|
-
listRequests():
|
|
467
|
+
listRequests(): AppProjectRequest[];
|
|
441
468
|
/**
|
|
442
469
|
* Adds a request to the project that has been created for a previous version of ARC.
|
|
443
470
|
*
|
|
444
471
|
* @param legacy The legacy request definition.
|
|
445
472
|
* @returns The created project request.
|
|
446
473
|
*/
|
|
447
|
-
addLegacyRequest(legacy: ARCSavedRequest | ARCHistoryRequest): Promise<
|
|
474
|
+
addLegacyRequest(legacy: ARCSavedRequest | ARCHistoryRequest): Promise<AppProjectRequest>;
|
|
475
|
+
/**
|
|
476
|
+
* Adds an environment to the project.
|
|
477
|
+
*
|
|
478
|
+
* @param env The definition of the environment to use to create the environment
|
|
479
|
+
* @returns The same or created environment.
|
|
480
|
+
*/
|
|
481
|
+
addEnvironment(env: IEnvironment, opts?: IAppProjectEnvironmentCreateOptions): Environment;
|
|
482
|
+
/**
|
|
483
|
+
* Adds an environment to the project.
|
|
484
|
+
*
|
|
485
|
+
* @param env The instance of the environment to add
|
|
486
|
+
* @returns The same or created environment.
|
|
487
|
+
*/
|
|
488
|
+
addEnvironment(env: Environment, opts?: IAppProjectEnvironmentCreateOptions): Environment;
|
|
489
|
+
/**
|
|
490
|
+
* Adds an environment to the project.
|
|
491
|
+
*
|
|
492
|
+
* @param env The name of the environment to create
|
|
493
|
+
* @returns The same or created environment.
|
|
494
|
+
*/
|
|
495
|
+
addEnvironment(env: string, opts?: IAppProjectEnvironmentCreateOptions): Environment;
|
|
496
|
+
/**
|
|
497
|
+
* @param key The environment key to read.
|
|
498
|
+
*/
|
|
499
|
+
getEnvironment(key: string): Environment | undefined;
|
|
500
|
+
/**
|
|
501
|
+
* Removes an environment from the folder or a sub-folder.
|
|
502
|
+
*
|
|
503
|
+
* @param key the key of the environment to remove
|
|
504
|
+
* @returns The removed environment, if any.
|
|
505
|
+
*/
|
|
506
|
+
removeEnvironment(key: string): Environment | undefined;
|
|
507
|
+
/**
|
|
508
|
+
* This is a link to the `getEnvironments()`. The difference is that on the
|
|
509
|
+
* project level it won't return environments defined with the class initialization.
|
|
510
|
+
*/
|
|
511
|
+
listEnvironments(): Environment[];
|
|
448
512
|
}
|
|
449
|
-
|
|
513
|
+
/**
|
|
514
|
+
* An app project is similar to the HttpProject but stored for a single application
|
|
515
|
+
* and has no sharing options. The AppProject can be upgraded to an HttpProject.
|
|
516
|
+
*/
|
|
517
|
+
export declare class AppProject extends AppProjectParent {
|
|
450
518
|
/**
|
|
451
519
|
* Timestamp when the project was last updated.
|
|
452
520
|
*/
|
|
@@ -455,29 +523,29 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
455
523
|
* Timestamp when the project was created.
|
|
456
524
|
*/
|
|
457
525
|
created: number;
|
|
458
|
-
definitions:
|
|
526
|
+
definitions: AppProjectDefinitions;
|
|
459
527
|
/**
|
|
460
528
|
* Creates a new ARC project from a name.
|
|
461
529
|
* @param name The name to set.
|
|
462
530
|
*/
|
|
463
|
-
static fromName(name: string):
|
|
531
|
+
static fromName(name: string): AppProject;
|
|
464
532
|
/**
|
|
465
533
|
* Creates an HTTP project instance from ARC's legacy project definition.
|
|
466
534
|
*
|
|
467
535
|
* Note, the `requests` should be processed and the payload restored to it's original value.
|
|
468
536
|
*/
|
|
469
|
-
static fromLegacyProject(project: ARCProject, requests: ARCSavedRequest[]): Promise<
|
|
470
|
-
constructor(input?: string |
|
|
471
|
-
new(init:
|
|
472
|
-
toJSON():
|
|
473
|
-
setItems(items?:
|
|
537
|
+
static fromLegacyProject(project: ARCProject, requests: ARCSavedRequest[]): Promise<AppProject>;
|
|
538
|
+
constructor(input?: string | IAppProject);
|
|
539
|
+
new(init: IAppProject): void;
|
|
540
|
+
toJSON(): IAppProject;
|
|
541
|
+
setItems(items?: IAppProjectItem[]): void;
|
|
474
542
|
/**
|
|
475
543
|
* Finds a parent of a definition.
|
|
476
544
|
*
|
|
477
545
|
* @param key The key of the definition.
|
|
478
546
|
* @returns The parent or undefine when not found.
|
|
479
547
|
*/
|
|
480
|
-
findParent(key: string):
|
|
548
|
+
findParent(key: string): AppProjectFolder | AppProject | undefined;
|
|
481
549
|
/**
|
|
482
550
|
* Appends an instance of a folder to a project.
|
|
483
551
|
*
|
|
@@ -485,7 +553,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
485
553
|
* @param opts Optional folder add options.
|
|
486
554
|
* @returns The added folder.
|
|
487
555
|
*/
|
|
488
|
-
addFolder(folder:
|
|
556
|
+
addFolder(folder: AppProjectFolder, opts?: IAppProjectFolderCreateOptions): AppProjectFolder;
|
|
489
557
|
/**
|
|
490
558
|
* Appends new folder to a project from a full folder schema.
|
|
491
559
|
* This is primarily used to insert a folder on the client side
|
|
@@ -495,7 +563,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
495
563
|
* @param opts Optional folder add options.
|
|
496
564
|
* @returns The added folder.
|
|
497
565
|
*/
|
|
498
|
-
addFolder(folder:
|
|
566
|
+
addFolder(folder: IAppProjectParent, opts?: IAppProjectFolderCreateOptions): AppProjectFolder;
|
|
499
567
|
/**
|
|
500
568
|
* Appends a new folder to the project or a sub-folder.
|
|
501
569
|
*
|
|
@@ -503,7 +571,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
503
571
|
* @param opts Folder create options.
|
|
504
572
|
* @returns The newly inserted folder. If the folder already existed it returns its instance.
|
|
505
573
|
*/
|
|
506
|
-
addFolder(name?: string, opts?:
|
|
574
|
+
addFolder(name?: string, opts?: IAppProjectFolderCreateOptions): AppProjectFolder;
|
|
507
575
|
/**
|
|
508
576
|
* Searches for a folder in the structure.
|
|
509
577
|
*
|
|
@@ -511,14 +579,14 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
511
579
|
* @param opts Optional search options.
|
|
512
580
|
* @returns Found project folder or undefined.
|
|
513
581
|
*/
|
|
514
|
-
findFolder(nameOrKey: string, opts?:
|
|
582
|
+
findFolder(nameOrKey: string, opts?: IAppProjectFolderSearchOptions): AppProjectFolder | undefined;
|
|
515
583
|
/**
|
|
516
584
|
* Removes a folder from the project.
|
|
517
585
|
* @param key The folder key. It ignores the name when searching to the folder to avoid ambiguity.
|
|
518
586
|
* @param opts Folder remove options.
|
|
519
587
|
* @returns The removed folder definition or undefined when not removed.
|
|
520
588
|
*/
|
|
521
|
-
removeFolder(key: string, opts?:
|
|
589
|
+
removeFolder(key: string, opts?: IAppProjectFolderDeleteOptions): AppProjectFolder | undefined;
|
|
522
590
|
/**
|
|
523
591
|
* Moves a folder between folders and the project or between items inside a folder or a project
|
|
524
592
|
*
|
|
@@ -527,7 +595,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
527
595
|
* @param key The key of the request to move.
|
|
528
596
|
* @param opts The moving options.
|
|
529
597
|
*/
|
|
530
|
-
moveFolder(key: string, opts?:
|
|
598
|
+
moveFolder(key: string, opts?: IAppProjectProjectMoveOptions): void;
|
|
531
599
|
/**
|
|
532
600
|
* Checks whether a folder has a child (anywhere down the structure).
|
|
533
601
|
*
|
|
@@ -543,7 +611,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
543
611
|
* @param opts The request add options.
|
|
544
612
|
* @returns The inserted into the definitions request.
|
|
545
613
|
*/
|
|
546
|
-
addRequest(url: string, opts?:
|
|
614
|
+
addRequest(url: string, opts?: IAppProjectRequestAddOptions): AppProjectRequest;
|
|
547
615
|
/**
|
|
548
616
|
* Adds a request to the project or a sub-folder.
|
|
549
617
|
*
|
|
@@ -551,14 +619,14 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
551
619
|
* @param opts The request add options.
|
|
552
620
|
* @returns The inserted into the definitions request.
|
|
553
621
|
*/
|
|
554
|
-
addRequest(request:
|
|
622
|
+
addRequest(request: IAppProjectRequest | AppProjectRequest, opts?: IAppProjectRequestAddOptions): AppProjectRequest;
|
|
555
623
|
/**
|
|
556
624
|
* Adds a request to the project that has been created for a previous version of ARC.
|
|
557
625
|
*
|
|
558
626
|
* @param legacy The legacy request definition.
|
|
559
627
|
* @returns The created project request.
|
|
560
628
|
*/
|
|
561
|
-
addLegacyRequest(legacy: ARCSavedRequest | ARCHistoryRequest): Promise<
|
|
629
|
+
addLegacyRequest(legacy: ARCSavedRequest | ARCHistoryRequest): Promise<AppProjectRequest>;
|
|
562
630
|
/**
|
|
563
631
|
* Searches for a request in the project.
|
|
564
632
|
*
|
|
@@ -566,7 +634,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
566
634
|
* @param opts Optional search options.
|
|
567
635
|
* @returns Found project request or undefined.
|
|
568
636
|
*/
|
|
569
|
-
findRequest(nameOrKey: string, opts?:
|
|
637
|
+
findRequest(nameOrKey: string, opts?: IAppProjectRequestSearchOptions): AppProjectRequest | undefined;
|
|
570
638
|
/**
|
|
571
639
|
* Removes a request from the project.
|
|
572
640
|
*
|
|
@@ -574,7 +642,7 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
574
642
|
* @param opts Request remove options.
|
|
575
643
|
* @returns The removed request definition or undefined when not removed.
|
|
576
644
|
*/
|
|
577
|
-
removeRequest(key: string, opts?:
|
|
645
|
+
removeRequest(key: string, opts?: IAppProjectRequestDeleteOptions): AppProjectRequest | undefined;
|
|
578
646
|
/**
|
|
579
647
|
* Moves a request between folders and the project or between items inside a folder or a project.
|
|
580
648
|
*
|
|
@@ -583,40 +651,40 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
583
651
|
* @param key The key of the request to move.
|
|
584
652
|
* @param opts The moving options.
|
|
585
653
|
*/
|
|
586
|
-
moveRequest(key: string, opts?:
|
|
654
|
+
moveRequest(key: string, opts?: IAppProjectProjectMoveOptions): void;
|
|
587
655
|
/**
|
|
588
656
|
* Lists items (not the actual definitions!) that are folders.
|
|
589
657
|
*/
|
|
590
|
-
listFolderItems():
|
|
658
|
+
listFolderItems(): AppProjectItem[];
|
|
591
659
|
/**
|
|
592
660
|
* Lists items (not the actual definitions!) that are requests.
|
|
593
661
|
*/
|
|
594
|
-
listRequestItems():
|
|
662
|
+
listRequestItems(): AppProjectItem[];
|
|
595
663
|
/**
|
|
596
664
|
* Lists folders from the project or a sub-folder.
|
|
597
665
|
* @param opts Folder listing options.
|
|
598
666
|
*/
|
|
599
|
-
listFolders(opts?:
|
|
667
|
+
listFolders(opts?: IAppProjectFolderListOptions): AppProjectFolder[];
|
|
600
668
|
/**
|
|
601
669
|
* Lists requests in this project or a sub-folder.
|
|
602
670
|
* @param folder The optional folder name or the key to list requests for.
|
|
603
671
|
*/
|
|
604
|
-
listRequests(folder?: string):
|
|
672
|
+
listRequests(folder?: string): AppProjectRequest[];
|
|
605
673
|
/**
|
|
606
674
|
* Lists definitions for the `items` of the project or a folder.
|
|
607
675
|
* @param folder Optionally the folder name to list the definitions for.
|
|
608
676
|
*/
|
|
609
|
-
listDefinitions(folder?: string): (
|
|
677
|
+
listDefinitions(folder?: string): (AppProjectFolder | AppProjectRequest | Environment)[];
|
|
610
678
|
/**
|
|
611
679
|
* @returns On the project level this always returns undefined.
|
|
612
680
|
*/
|
|
613
|
-
getParent():
|
|
614
|
-
getProject():
|
|
681
|
+
getParent(): AppProjectFolder | AppProject | undefined;
|
|
682
|
+
getProject(): AppProject;
|
|
615
683
|
/**
|
|
616
684
|
* Makes a copy of this project.
|
|
617
685
|
*/
|
|
618
|
-
clone(opts?:
|
|
619
|
-
static clone(project:
|
|
686
|
+
clone(opts?: IAppProjectProjectCloneOptions): AppProject;
|
|
687
|
+
static clone(project: IAppProject, opts?: IAppProjectProjectCloneOptions): AppProject;
|
|
620
688
|
/**
|
|
621
689
|
* Re-generates keys in the project, taking care of the references.
|
|
622
690
|
*
|
|
@@ -624,5 +692,99 @@ export declare class ArcProject extends ArcProjectParent {
|
|
|
624
692
|
*
|
|
625
693
|
* @param src The project instance to re-generate keys for.
|
|
626
694
|
*/
|
|
627
|
-
static regenerateKeys(src:
|
|
695
|
+
static regenerateKeys(src: AppProject): void;
|
|
696
|
+
/**
|
|
697
|
+
* Adds an environment to the project.
|
|
698
|
+
*
|
|
699
|
+
* @param env The definition of the environment to use to create the environment
|
|
700
|
+
* @returns The same or created environment.
|
|
701
|
+
*/
|
|
702
|
+
addEnvironment(env: IEnvironment, opts?: IAppProjectEnvironmentCreateOptions): Environment;
|
|
703
|
+
/**
|
|
704
|
+
* Adds an environment to the project.
|
|
705
|
+
*
|
|
706
|
+
* @param env The instance of the environment to add
|
|
707
|
+
* @returns The same or created environment.
|
|
708
|
+
*/
|
|
709
|
+
addEnvironment(env: Environment, opts?: IAppProjectEnvironmentCreateOptions): Environment;
|
|
710
|
+
/**
|
|
711
|
+
* Adds an environment to the project.
|
|
712
|
+
*
|
|
713
|
+
* @param env The name of the environment to create
|
|
714
|
+
* @returns The same or created environment.
|
|
715
|
+
*/
|
|
716
|
+
addEnvironment(env: string, opts?: IAppProjectEnvironmentCreateOptions): Environment;
|
|
717
|
+
protected _createEnv(env: IEnvironment | Environment | string): Environment;
|
|
718
|
+
/**
|
|
719
|
+
* @param key The environment key to read.
|
|
720
|
+
*/
|
|
721
|
+
getEnvironment(key: string, opts?: IAppProjectItemOptions): Environment | undefined;
|
|
722
|
+
/**
|
|
723
|
+
* Removes an environment from the folder or a sub-folder.
|
|
724
|
+
*
|
|
725
|
+
* @param key the key of the environment to remove
|
|
726
|
+
* @returns The removed environment, if any.
|
|
727
|
+
*/
|
|
728
|
+
removeEnvironment(key: string, opts?: IAppProjectItemOptions): Environment | undefined;
|
|
729
|
+
/**
|
|
730
|
+
* This is a link to the `getEnvironments()`. The difference is that on the
|
|
731
|
+
* project level it won't return environments defined with the class initialization.
|
|
732
|
+
*/
|
|
733
|
+
listEnvironments(opts?: IAppProjectItemOptions): Environment[];
|
|
734
|
+
/**
|
|
735
|
+
* Reads the list of environments from then selected folder up to the project root.
|
|
736
|
+
* It stops going up in the project structure when selected environment has the `encapsulated`
|
|
737
|
+
* property set to true.
|
|
738
|
+
* The environments are ordered from the top-most level to the selected folder.
|
|
739
|
+
*
|
|
740
|
+
* @param opts The environment read options
|
|
741
|
+
*/
|
|
742
|
+
readEnvironments(opts?: IAppProjectReadEnvironmentOptions): Environment[];
|
|
743
|
+
/**
|
|
744
|
+
* Finds a definition for an environment regardless of its parent.
|
|
745
|
+
*
|
|
746
|
+
* @param key The Key of the environment to find.
|
|
747
|
+
* @returns The environment definition or undefined if not found.
|
|
748
|
+
*/
|
|
749
|
+
findEnvironment(key: string): Environment | undefined;
|
|
750
|
+
/**
|
|
751
|
+
* Depending on the options returns a project or a folder.
|
|
752
|
+
* It throws when parent folder cannot ber found.
|
|
753
|
+
*/
|
|
754
|
+
protected _getRoot(opts: {
|
|
755
|
+
parent?: string;
|
|
756
|
+
}): AppProjectFolder | AppProject;
|
|
757
|
+
protected _insertItem(item: AppProjectItem, root: AppProjectFolder | AppProject, opts: IAppProjectItemCreateOptions): void;
|
|
758
|
+
/**
|
|
759
|
+
* Finds a definition for a certificate.
|
|
760
|
+
*
|
|
761
|
+
* @param key The key of the certificate to find.
|
|
762
|
+
* @returns The certificate definition or undefined if not found.
|
|
763
|
+
*/
|
|
764
|
+
findCertificate(key: string): Certificate | undefined;
|
|
765
|
+
/**
|
|
766
|
+
* Adds a certificate to the project.
|
|
767
|
+
*
|
|
768
|
+
* @param init Either an instance of a certificate or its definition.
|
|
769
|
+
* @returns The inserted certificate.
|
|
770
|
+
*/
|
|
771
|
+
addCertificate(init: Certificate | HttpCertificate): Certificate;
|
|
772
|
+
/**
|
|
773
|
+
* Removes a certificate from the project.
|
|
774
|
+
*
|
|
775
|
+
* @param key the key of the certificate to remove
|
|
776
|
+
* @returns The removed certificate, if any.
|
|
777
|
+
*/
|
|
778
|
+
removeCertificate(key: string): Certificate | undefined;
|
|
779
|
+
/**
|
|
780
|
+
* Finds the requests that are using the certificate identified by the key.
|
|
781
|
+
*
|
|
782
|
+
* @param key The key of the certificate to find the usage for.
|
|
783
|
+
* @returns The list of requests that use this certificate.
|
|
784
|
+
*/
|
|
785
|
+
findCertificateRequests(key: string): AppProjectRequest[];
|
|
786
|
+
/**
|
|
787
|
+
* Iterates over requests in the project.
|
|
788
|
+
*/
|
|
789
|
+
requestIterator(opts?: IProjectRequestIterator): Generator<AppProjectRequest>;
|
|
628
790
|
}
|