@api-client/core 0.3.11 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +10 -8
- package/build/browser.js +11 -7
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +12 -11
- package/build/index.js +9 -9
- package/build/index.js.map +1 -1
- package/build/src/data/JmesparthReader.d.ts +1 -1
- package/build/src/data/JmesparthReader.js +1 -1
- package/build/src/events/models/ProjectEvents.d.ts +1 -1
- package/build/src/events/models/ProjectEvents.js +1 -2
- package/build/src/events/models/ProjectEvents.js.map +1 -1
- package/build/src/lib/transformers/PayloadSerializer.d.ts +2 -2
- package/build/src/lib/transformers/PayloadSerializer.js +3 -3
- package/build/src/lib/transformers/PayloadSerializer.js.map +1 -1
- package/build/src/mocking/ProjectMock.d.ts +7 -1
- package/build/src/mocking/ProjectMock.js +6 -0
- package/build/src/mocking/ProjectMock.js.map +1 -1
- package/build/src/mocking/lib/History.d.ts +70 -0
- package/build/src/mocking/lib/History.js +120 -0
- package/build/src/mocking/lib/History.js.map +1 -0
- package/build/src/mocking/lib/Request.d.ts +2 -2
- package/build/src/mocking/lib/Request.js +3 -2
- package/build/src/mocking/lib/Request.js.map +1 -1
- package/build/src/mocking/lib/Response.d.ts +6 -6
- package/build/src/mocking/lib/Response.js +6 -6
- package/build/src/mocking/lib/Response.js.map +1 -1
- package/build/src/mocking/lib/User.d.ts +20 -0
- package/build/src/mocking/lib/User.js +54 -0
- package/build/src/mocking/lib/User.js.map +1 -0
- package/build/src/models/AuthorizationData.d.ts +2 -2
- package/build/src/models/AuthorizationData.js +2 -2
- package/build/src/models/Backend.d.ts +85 -0
- package/build/src/models/ClientCertificate.d.ts +1 -1
- package/build/src/models/Environment.d.ts +3 -3
- package/build/src/models/Environment.js +3 -3
- package/build/src/models/Environment.js.map +1 -1
- package/build/src/models/ErrorResponse.d.ts +1 -1
- package/build/src/models/ErrorResponse.js +1 -1
- package/build/src/models/HostRule.d.ts +4 -4
- package/build/src/models/HostRule.js +4 -4
- package/build/src/models/HostRule.js.map +1 -1
- package/build/src/models/HttpHistory.d.ts +64 -18
- package/build/src/models/HttpHistory.js +43 -19
- package/build/src/models/HttpHistory.js.map +1 -1
- package/build/src/models/HttpProject.d.ts +4 -5
- package/build/src/models/HttpProject.js +3 -3
- package/build/src/models/HttpProject.js.map +1 -1
- package/build/src/models/HttpProjectListItem.d.ts +1 -1
- package/build/src/models/HttpProjectListItem.js +1 -1
- package/build/src/models/HttpProjectListItem.js.map +1 -1
- package/build/src/models/HttpRequest.d.ts +2 -2
- package/build/src/models/HttpRequest.js +2 -2
- package/build/src/models/HttpRequest.js.map +1 -1
- package/build/src/models/HttpResponse.d.ts +2 -2
- package/build/src/models/HttpResponse.js +3 -3
- package/build/src/models/HttpResponse.js.map +1 -1
- package/build/src/models/License.d.ts +3 -3
- package/build/src/models/License.js +3 -3
- package/build/src/models/License.js.map +1 -1
- package/build/src/models/ProjectFolder.d.ts +2 -2
- package/build/src/models/ProjectFolder.js +3 -3
- package/build/src/models/ProjectFolder.js.map +1 -1
- package/build/src/models/ProjectItem.d.ts +1 -1
- package/build/src/models/ProjectItem.js +2 -2
- package/build/src/models/ProjectItem.js.map +1 -1
- package/build/src/models/ProjectRequest.d.ts +2 -2
- package/build/src/models/ProjectRequest.js +1 -1
- package/build/src/models/ProjectRequest.js.map +1 -1
- package/build/src/models/ProjectSchema.d.ts +2 -2
- package/build/src/models/ProjectSchema.js +1 -1
- package/build/src/models/ProjectSchema.js.map +1 -1
- package/build/src/models/Property.d.ts +4 -4
- package/build/src/models/Property.js +4 -4
- package/build/src/models/Property.js.map +1 -1
- package/build/src/models/Provider.d.ts +3 -3
- package/build/src/models/Provider.js +3 -3
- package/build/src/models/Provider.js.map +1 -1
- package/build/src/models/Request.d.ts +2 -2
- package/build/src/models/Request.js +3 -3
- package/build/src/models/Request.js.map +1 -1
- package/build/src/models/RequestActions.d.ts +2 -4
- package/build/src/models/RequestActions.js +2 -4
- package/build/src/models/RequestActions.js.map +1 -1
- package/build/src/models/RequestAuthorization.d.ts +3 -5
- package/build/src/models/RequestAuthorization.js +2 -4
- package/build/src/models/RequestAuthorization.js.map +1 -1
- package/build/src/models/RequestConfig.d.ts +3 -5
- package/build/src/models/RequestConfig.js +1 -3
- package/build/src/models/RequestConfig.js.map +1 -1
- package/build/src/models/RequestLog.d.ts +14 -8
- package/build/src/models/RequestLog.js +18 -7
- package/build/src/models/RequestLog.js.map +1 -1
- package/build/src/models/RequestTime.d.ts +4 -6
- package/build/src/models/RequestTime.js +2 -4
- package/build/src/models/RequestTime.js.map +1 -1
- package/build/src/models/RequestUiMeta.d.ts +5 -5
- package/build/src/models/RequestUiMeta.js +2 -2
- package/build/src/models/RequestUiMeta.js.map +1 -1
- package/build/src/models/RequestsSize.d.ts +1 -3
- package/build/src/models/RequestsSize.js +1 -3
- package/build/src/models/RequestsSize.js.map +1 -1
- package/build/src/models/{ArcResponse.d.ts → Response.d.ts} +7 -9
- package/build/src/models/{ArcResponse.js → Response.js} +4 -6
- package/build/src/models/Response.js.map +1 -0
- package/build/src/models/ResponseAuthorization.d.ts +3 -3
- package/build/src/models/ResponseAuthorization.js +3 -3
- package/build/src/models/ResponseAuthorization.js.map +1 -1
- package/build/src/models/ResponseRedirect.d.ts +3 -5
- package/build/src/models/ResponseRedirect.js +1 -3
- package/build/src/models/ResponseRedirect.js.map +1 -1
- package/build/src/models/RevisionInfo.d.ts +1 -1
- package/build/src/models/RevisionInfo.js +1 -1
- package/build/src/models/RevisionInfo.js.map +1 -1
- package/build/src/models/SentRequest.d.ts +2 -4
- package/build/src/models/SentRequest.js +1 -3
- package/build/src/models/SentRequest.js.map +1 -1
- package/build/src/models/Server.d.ts +3 -3
- package/build/src/models/Server.js +3 -3
- package/build/src/models/Server.js.map +1 -1
- package/build/src/models/Thing.d.ts +3 -3
- package/build/src/models/Thing.js +3 -3
- package/build/src/models/Thing.js.map +1 -1
- package/build/src/models/Url.d.ts +2 -4
- package/build/src/models/Url.js +2 -4
- package/build/src/models/Url.js.map +1 -1
- package/build/src/models/User.d.ts +2 -1
- package/build/src/models/User.js +1 -1
- package/build/src/models/User.js.map +1 -1
- package/build/src/models/WebApi.d.ts +1 -1
- package/build/src/models/WebApi.js +1 -1
- package/build/src/models/WebApi.js.map +1 -1
- package/build/src/models/WebApiIndex.d.ts +1 -1
- package/build/src/models/WebApiIndex.js +1 -1
- package/build/src/models/WebApiIndex.js.map +1 -1
- package/build/src/models/Workspace.d.ts +4 -4
- package/build/src/models/Workspace.js +4 -4
- package/build/src/models/Workspace.js.map +1 -1
- package/build/src/models/actions/Action.d.ts +2 -2
- package/build/src/models/actions/Action.js +1 -1
- package/build/src/models/actions/Action.js.map +1 -1
- package/build/src/models/actions/Condition.d.ts +2 -2
- package/build/src/models/actions/Condition.js +1 -1
- package/build/src/models/actions/Condition.js.map +1 -1
- package/build/src/models/actions/RunnableAction.d.ts +1 -1
- package/build/src/models/actions/RunnableAction.js +1 -1
- package/build/src/models/actions/RunnableAction.js.map +1 -1
- package/build/src/models/actions/runnable/DeleteCookieAction.d.ts +2 -2
- package/build/src/models/actions/runnable/DeleteCookieAction.js +1 -1
- package/build/src/models/actions/runnable/DeleteCookieAction.js.map +1 -1
- package/build/src/models/actions/runnable/SetCookieAction.d.ts +2 -2
- package/build/src/models/actions/runnable/SetCookieAction.js +1 -1
- package/build/src/models/actions/runnable/SetCookieAction.js.map +1 -1
- package/build/src/models/actions/runnable/SetVariableAction.d.ts +2 -2
- package/build/src/models/actions/runnable/SetVariableAction.js +1 -1
- package/build/src/models/actions/runnable/SetVariableAction.js.map +1 -1
- package/build/src/models/transformers/ImportUtils.d.ts +1 -1
- package/build/src/models/transformers/ImportUtils.js +1 -1
- package/build/src/models/transformers/PostmanBackupTransformer.js +2 -1
- package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
- package/build/src/models/transformers/PostmanV21Transformer.js +2 -1
- package/build/src/models/transformers/PostmanV21Transformer.js.map +1 -1
- package/build/src/models/transformers/PostmanV2Transformer.js +2 -1
- package/build/src/models/transformers/PostmanV2Transformer.js.map +1 -1
- package/build/src/runtime/actions/RunnableCondition.d.ts +6 -7
- package/build/src/runtime/actions/RunnableCondition.js +4 -5
- package/build/src/runtime/actions/RunnableCondition.js.map +1 -1
- package/build/src/runtime/http-engine/{ArcEngine.d.ts → CoreEngine.d.ts} +3 -3
- package/build/src/runtime/http-engine/{ArcEngine.js → CoreEngine.js} +8 -8
- package/build/src/runtime/http-engine/CoreEngine.js.map +1 -0
- package/build/src/runtime/http-engine/HttpEngine.d.ts +3 -3
- package/build/src/runtime/http-engine/HttpEngine.js +3 -20
- package/build/src/runtime/http-engine/HttpEngine.js.map +1 -1
- package/build/src/runtime/modules/BasicAuthCache.js +2 -5
- package/build/src/runtime/modules/BasicAuthCache.js.map +1 -1
- package/build/src/runtime/modules/RequestCookies.d.ts +1 -1
- package/build/src/runtime/modules/RequestCookies.js +3 -2
- package/build/src/runtime/modules/RequestCookies.js.map +1 -1
- package/build/src/runtime/node/InteropInterfaces.d.ts +115 -0
- package/build/src/runtime/node/InteropInterfaces.js +2 -0
- package/build/src/runtime/node/InteropInterfaces.js.map +1 -0
- package/build/src/runtime/node/ProjectParallelRunner.d.ts +2 -7
- package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRequestRunner.d.ts +17 -49
- package/build/src/runtime/node/ProjectRequestRunner.js +39 -10
- package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunner.d.ts +1 -59
- package/build/src/runtime/node/ProjectRunner.js.map +1 -1
- package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -1
- package/build/src/runtime/node/RequestFactory.d.ts +1 -1
- package/build/src/runtime/node/RequestFactory.js +3 -3
- package/build/src/runtime/node/RequestFactory.js.map +1 -1
- package/build/src/runtime/reporters/ProjectRunCliReporter.js.map +1 -1
- package/build/src/runtime/reporters/Reporter.js.map +1 -1
- package/build/src/runtime/store/AuthSdk.d.ts +28 -0
- package/build/src/runtime/store/AuthSdk.js +123 -0
- package/build/src/runtime/store/AuthSdk.js.map +1 -0
- package/build/src/runtime/store/BackendSdk.d.ts +8 -0
- package/build/src/runtime/store/BackendSdk.js +25 -0
- package/build/src/runtime/store/BackendSdk.js.map +1 -0
- package/build/src/runtime/store/HistorySdk.d.ts +48 -0
- package/build/src/runtime/store/HistorySdk.js +142 -0
- package/build/src/runtime/store/HistorySdk.js.map +1 -0
- package/build/src/runtime/store/Http.d.ts +14 -0
- package/build/src/runtime/store/Http.js +4 -0
- package/build/src/runtime/store/Http.js.map +1 -0
- package/build/src/runtime/store/HttpNode.d.ts +16 -0
- package/build/src/runtime/store/HttpNode.js +95 -0
- package/build/src/runtime/store/HttpNode.js.map +1 -0
- package/build/src/runtime/store/HttpWeb.d.ts +15 -0
- package/build/src/runtime/store/HttpWeb.js +83 -0
- package/build/src/runtime/store/HttpWeb.js.map +1 -0
- package/build/src/runtime/store/ProjectsSdk.d.ts +43 -0
- package/build/src/runtime/store/ProjectsSdk.js +144 -0
- package/build/src/runtime/store/ProjectsSdk.js.map +1 -0
- package/build/src/runtime/store/RouteBuilder.d.ts +42 -0
- package/build/src/runtime/store/RouteBuilder.js +75 -0
- package/build/src/runtime/store/RouteBuilder.js.map +1 -0
- package/build/src/runtime/store/Sdk.d.ts +79 -0
- package/build/src/runtime/store/Sdk.js +117 -0
- package/build/src/runtime/store/Sdk.js.map +1 -0
- package/build/src/runtime/store/SdkBase.d.ts +45 -0
- package/build/src/runtime/store/SdkBase.js +40 -0
- package/build/src/runtime/store/SdkBase.js.map +1 -0
- package/build/src/runtime/store/SpacesSdk.d.ts +50 -0
- package/build/src/runtime/store/SpacesSdk.js +185 -0
- package/build/src/runtime/store/SpacesSdk.js.map +1 -0
- package/build/src/runtime/store/StoreSdkNode.d.ts +10 -0
- package/build/src/runtime/store/StoreSdkNode.js +11 -0
- package/build/src/runtime/store/StoreSdkNode.js.map +1 -0
- package/build/src/runtime/store/StoreSdkWeb.d.ts +10 -0
- package/build/src/runtime/store/StoreSdkWeb.js +11 -0
- package/build/src/runtime/store/StoreSdkWeb.js.map +1 -0
- package/build/src/runtime/store/UsersSdk.d.ts +18 -0
- package/build/src/runtime/store/UsersSdk.js +88 -0
- package/build/src/runtime/store/UsersSdk.js.map +1 -0
- package/build/src/runtime/store/WsClient.d.ts +24 -0
- package/build/src/runtime/store/WsClient.js +4 -0
- package/build/src/runtime/store/WsClient.js.map +1 -0
- package/build/src/runtime/store/WsClientNode.d.ts +24 -0
- package/build/src/runtime/store/WsClientNode.js +66 -0
- package/build/src/runtime/store/WsClientNode.js.map +1 -0
- package/build/src/runtime/store/WsClientWeb.d.ts +23 -0
- package/build/src/runtime/store/WsClientWeb.js +73 -0
- package/build/src/runtime/store/WsClientWeb.js.map +1 -0
- package/package.json +6 -8
- package/readme.md +5 -5
- package/src/data/JmesparthReader.ts +1 -1
- package/src/events/models/ProjectEvents.ts +2 -2
- package/src/events/readme.md +1 -1
- package/src/lib/transformers/PayloadSerializer.ts +3 -3
- package/src/mocking/ProjectMock.ts +9 -1
- package/src/mocking/lib/History.ts +179 -0
- package/src/mocking/lib/Request.ts +5 -5
- package/src/mocking/lib/Response.ts +10 -10
- package/src/mocking/lib/User.ts +68 -0
- package/src/models/AuthorizationData.ts +2 -2
- package/src/models/Backend.ts +93 -0
- package/src/models/ClientCertificate.ts +1 -1
- package/src/models/Environment.ts +4 -4
- package/src/models/ErrorResponse.ts +1 -1
- package/src/models/HostRule.ts +5 -5
- package/src/models/HttpHistory.ts +89 -27
- package/src/models/HttpProject.ts +5 -6
- package/src/models/HttpProjectListItem.ts +1 -1
- package/src/models/HttpRequest.ts +2 -2
- package/src/models/HttpResponse.ts +3 -3
- package/src/models/License.ts +4 -4
- package/src/models/ProjectFolder.ts +3 -3
- package/src/models/ProjectItem.ts +2 -2
- package/src/models/ProjectRequest.ts +2 -2
- package/src/models/ProjectSchema.ts +2 -2
- package/src/models/Property.ts +5 -5
- package/src/models/Provider.ts +4 -4
- package/src/models/README.md +2 -2
- package/src/models/Request.ts +4 -4
- package/src/models/RequestActions.ts +2 -4
- package/src/models/RequestAuthorization.ts +3 -5
- package/src/models/RequestConfig.ts +3 -5
- package/src/models/RequestLog.ts +25 -11
- package/src/models/RequestTime.ts +4 -6
- package/src/models/RequestUiMeta.ts +5 -5
- package/src/models/RequestsSize.ts +1 -3
- package/src/models/{ArcResponse.ts → Response.ts} +12 -14
- package/src/models/ResponseAuthorization.ts +4 -4
- package/src/models/ResponseRedirect.ts +3 -5
- package/src/models/RevisionInfo.ts +1 -1
- package/src/models/SentRequest.ts +2 -4
- package/src/models/Server.ts +4 -4
- package/src/models/Thing.ts +4 -4
- package/src/models/Url.ts +2 -4
- package/src/models/User.ts +2 -1
- package/src/models/WebApi.ts +1 -1
- package/src/models/WebApiIndex.ts +1 -1
- package/src/models/Workspace.ts +5 -5
- package/src/models/actions/Action.ts +2 -2
- package/src/models/actions/Condition.ts +2 -2
- package/src/models/actions/RunnableAction.ts +1 -1
- package/src/models/actions/runnable/DeleteCookieAction.ts +2 -2
- package/src/models/actions/runnable/SetCookieAction.ts +2 -2
- package/src/models/actions/runnable/SetVariableAction.ts +2 -2
- package/src/models/transformers/ImportUtils.ts +1 -1
- package/src/models/transformers/PostmanBackupTransformer.ts +2 -1
- package/src/models/transformers/PostmanV21Transformer.ts +2 -1
- package/src/models/transformers/PostmanV2Transformer.ts +2 -1
- package/src/runtime/actions/RunnableCondition.ts +6 -7
- package/src/runtime/http-engine/{ArcEngine.ts → CoreEngine.ts} +7 -7
- package/src/runtime/http-engine/HttpEngine.ts +5 -24
- package/src/runtime/modules/BasicAuthCache.ts +2 -6
- package/src/runtime/modules/RequestCookies.ts +6 -5
- package/src/runtime/node/InteropInterfaces.ts +121 -0
- package/src/runtime/node/ProjectParallelRunner.ts +2 -9
- package/src/runtime/node/ProjectRequestRunner.ts +42 -61
- package/src/runtime/node/ProjectRunner.ts +1 -60
- package/src/runtime/node/ProjectRunnerWorker.ts +2 -1
- package/src/runtime/node/RequestFactory.ts +3 -3
- package/src/runtime/reporters/ProjectRunCliReporter.ts +2 -2
- package/src/runtime/reporters/Reporter.ts +4 -4
- package/src/runtime/store/AuthSdk.ts +126 -0
- package/src/runtime/store/BackendSdk.ts +25 -0
- package/src/runtime/store/HistorySdk.ts +157 -0
- package/src/runtime/store/Http.ts +18 -0
- package/src/runtime/store/HttpNode.ts +100 -0
- package/src/runtime/store/HttpWeb.ts +89 -0
- package/src/runtime/store/ProjectsSdk.ts +147 -0
- package/src/runtime/store/RouteBuilder.ts +89 -0
- package/src/runtime/store/Sdk.ts +131 -0
- package/src/runtime/store/SdkBase.ts +72 -0
- package/src/runtime/store/SpacesSdk.ts +190 -0
- package/src/runtime/store/StoreSdkNode.ts +13 -0
- package/src/runtime/store/StoreSdkWeb.ts +13 -0
- package/src/runtime/store/UsersSdk.ts +89 -0
- package/src/runtime/store/WsClient.ts +28 -0
- package/src/runtime/store/WsClientNode.ts +68 -0
- package/src/runtime/store/WsClientWeb.ts +75 -0
- package/build/src/models/ArcResponse.js.map +0 -1
- package/build/src/models/HistoryIndex.d.ts +0 -43
- package/build/src/models/HistoryIndex.js +0 -53
- package/build/src/models/HistoryIndex.js.map +0 -1
- package/build/src/models/HistoryRequest.d.ts +0 -13
- package/build/src/models/HistoryRequest.js +0 -25
- package/build/src/models/HistoryRequest.js.map +0 -1
- package/build/src/runtime/http-engine/ArcEngine.js.map +0 -1
- package/build/src/runtime/http-engine/NodeEngine.d.ts +0 -154
- package/build/src/runtime/http-engine/NodeEngine.js +0 -766
- package/build/src/runtime/http-engine/NodeEngine.js.map +0 -1
- package/build/src/runtime/http-engine/NodeEngineDirect.d.ts +0 -113
- package/build/src/runtime/http-engine/NodeEngineDirect.js +0 -449
- package/build/src/runtime/http-engine/NodeEngineDirect.js.map +0 -1
- package/build/src/runtime/store/StoreSdk.d.ts +0 -279
- package/build/src/runtime/store/StoreSdk.js +0 -840
- package/build/src/runtime/store/StoreSdk.js.map +0 -1
- package/src/models/HistoryIndex.ts +0 -76
- package/src/models/HistoryRequest.ts +0 -28
- package/src/runtime/http-engine/NodeEngine.ts +0 -792
- package/src/runtime/http-engine/NodeEngineDirect.ts +0 -482
- package/src/runtime/store/StoreSdk.ts +0 -895
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
import { IRequestLog, RequestLog, Kind as RequestLogKind } from './RequestLog.js';
|
|
2
2
|
|
|
3
|
-
export const Kind = '
|
|
3
|
+
export const Kind = 'Core#HttpHistory';
|
|
4
4
|
export const createdSymbol = Symbol('created');
|
|
5
5
|
export const midnightSymbol = Symbol('midnight');
|
|
6
6
|
|
|
7
7
|
export interface IHttpHistory {
|
|
8
8
|
kind: typeof Kind;
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
10
|
+
* The data store key. Only present when the object was already inserted into the data store.
|
|
11
|
+
* In majority of cases this value is set. It is not set when generating the history object before sending it to the store.
|
|
12
|
+
*
|
|
13
|
+
* Note for data store implementations. This must be a URL-safe value so the id should be encoded if needed.
|
|
12
14
|
*/
|
|
13
|
-
|
|
15
|
+
key?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional user space id. Must be set when the originating request belongs to a user space.
|
|
18
|
+
*/
|
|
19
|
+
space?: string;
|
|
14
20
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
|
|
21
|
+
* Optional project id. Must be set when the originating request belongs to a user space.
|
|
17
22
|
*/
|
|
18
23
|
project?: string;
|
|
19
24
|
/**
|
|
20
|
-
*
|
|
25
|
+
* Optional application id. Must be set when the application that created this record does not use the concept of a user space.
|
|
26
|
+
*/
|
|
27
|
+
app?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The user id that made that request.
|
|
30
|
+
* Note, the default API Client's store automatically adds the user information to the record overriding any pre-set user id.
|
|
21
31
|
*/
|
|
22
|
-
user
|
|
32
|
+
user: string;
|
|
23
33
|
/**
|
|
24
34
|
* The optional request id in the project that generated this log.
|
|
25
35
|
*/
|
|
@@ -38,12 +48,39 @@ export interface IHttpHistory {
|
|
|
38
48
|
midnight?: number;
|
|
39
49
|
}
|
|
40
50
|
|
|
51
|
+
/**
|
|
52
|
+
* An interface used when adding a history in bulk.
|
|
53
|
+
* The store creates a history object propagating meta values defined here
|
|
54
|
+
* onto the history objects.
|
|
55
|
+
* Because of that, bulk operation can only be performed when the requests are made in similar
|
|
56
|
+
* context (app, space, project).
|
|
57
|
+
*/
|
|
58
|
+
export interface IHttpHistoryBulkAdd {
|
|
59
|
+
/**
|
|
60
|
+
* Optional user space id. Must be set when the originating request belongs to a user space.
|
|
61
|
+
*/
|
|
62
|
+
space?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Optional project id. Must be set when the originating request belongs to a user space.
|
|
65
|
+
*/
|
|
66
|
+
project?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Optional application id. Must be set when the application that created this record does not use the concept of a user space.
|
|
69
|
+
*/
|
|
70
|
+
app?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The optional request id in the project that generated this log.
|
|
73
|
+
*/
|
|
74
|
+
request?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The list of request logs.
|
|
77
|
+
*/
|
|
78
|
+
log: IRequestLog[];
|
|
79
|
+
}
|
|
80
|
+
|
|
41
81
|
/**
|
|
42
82
|
* An HTTP history is an object containing an information of a request and response
|
|
43
83
|
* made with the application.
|
|
44
|
-
* It consist of the RequestLog and optional information about the application that made that request and the HTTP project
|
|
45
|
-
* the request belongs to as well as the id of the request.
|
|
46
|
-
* However, this object may not contain these information for general purpose of the history store.
|
|
47
84
|
*
|
|
48
85
|
* Note, history object are not mutable. Can only be created or deleted.
|
|
49
86
|
*/
|
|
@@ -52,19 +89,29 @@ export class HttpHistory {
|
|
|
52
89
|
[midnightSymbol]: number;
|
|
53
90
|
kind = Kind;
|
|
54
91
|
/**
|
|
55
|
-
* The
|
|
56
|
-
*
|
|
92
|
+
* The data store key. Only present when the object was already inserted into the data store.
|
|
93
|
+
* In majority of cases this value is set. It is not set when generating the history object before sending it to the store.
|
|
94
|
+
*
|
|
95
|
+
* Note for data store implementations. This must be a URL-safe value so the id should be encoded if needed.
|
|
57
96
|
*/
|
|
58
|
-
|
|
97
|
+
key?: string;
|
|
59
98
|
/**
|
|
60
|
-
*
|
|
61
|
-
|
|
99
|
+
* Optional user space id. Must be set when the originating request belongs to a user space.
|
|
100
|
+
*/
|
|
101
|
+
space?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Optional project id. Must be set when the originating request belongs to a user space.
|
|
62
104
|
*/
|
|
63
105
|
project?: string;
|
|
64
106
|
/**
|
|
65
|
-
*
|
|
107
|
+
* Optional application id. Must be set when the application that created this record does not use the concept of a user space.
|
|
66
108
|
*/
|
|
67
|
-
|
|
109
|
+
app?: string;
|
|
110
|
+
/**
|
|
111
|
+
* The user id that made that request.
|
|
112
|
+
* Note, the default API Client's store automatically adds the user information to the record overriding any pre-set user id.
|
|
113
|
+
*/
|
|
114
|
+
user = '';
|
|
68
115
|
/**
|
|
69
116
|
* The optional request id in the project that generated this log.
|
|
70
117
|
*/
|
|
@@ -84,7 +131,7 @@ export class HttpHistory {
|
|
|
84
131
|
this[createdSymbol] = value;
|
|
85
132
|
}
|
|
86
133
|
const d = new Date(this[createdSymbol]);
|
|
87
|
-
d.setHours(0, 0, 0, 0)
|
|
134
|
+
d.setHours(0, 0, 0, 0);
|
|
88
135
|
this[midnightSymbol] = d.getTime();
|
|
89
136
|
}
|
|
90
137
|
|
|
@@ -127,6 +174,7 @@ export class HttpHistory {
|
|
|
127
174
|
init = {
|
|
128
175
|
kind: Kind,
|
|
129
176
|
created: now,
|
|
177
|
+
user: '',
|
|
130
178
|
log: {
|
|
131
179
|
kind: RequestLogKind,
|
|
132
180
|
},
|
|
@@ -136,17 +184,27 @@ export class HttpHistory {
|
|
|
136
184
|
}
|
|
137
185
|
|
|
138
186
|
new(init: IHttpHistory): void {
|
|
139
|
-
const { log, created = Date.now(), midnight,
|
|
187
|
+
const { log, created = Date.now(), midnight, space, project, request, user, key, app } = init;
|
|
140
188
|
this.log = new RequestLog(log);
|
|
141
189
|
this.created = created;
|
|
142
|
-
if (
|
|
143
|
-
this.
|
|
190
|
+
if (key) {
|
|
191
|
+
this.key = key;
|
|
192
|
+
} else {
|
|
193
|
+
this.key = undefined;
|
|
144
194
|
}
|
|
145
195
|
if (app) {
|
|
146
196
|
this.app = app;
|
|
147
197
|
} else {
|
|
148
198
|
this.app = undefined;
|
|
149
199
|
}
|
|
200
|
+
if (midnight) {
|
|
201
|
+
this.midnight = midnight;
|
|
202
|
+
}
|
|
203
|
+
if (space) {
|
|
204
|
+
this.space = space;
|
|
205
|
+
} else {
|
|
206
|
+
this.space = undefined;
|
|
207
|
+
}
|
|
150
208
|
if (project) {
|
|
151
209
|
this.project = project;
|
|
152
210
|
} else {
|
|
@@ -160,7 +218,7 @@ export class HttpHistory {
|
|
|
160
218
|
if (user) {
|
|
161
219
|
this.user = user;
|
|
162
220
|
} else {
|
|
163
|
-
this.user =
|
|
221
|
+
this.user = '';
|
|
164
222
|
}
|
|
165
223
|
}
|
|
166
224
|
|
|
@@ -170,9 +228,13 @@ export class HttpHistory {
|
|
|
170
228
|
created: this.created,
|
|
171
229
|
midnight: this.midnight,
|
|
172
230
|
log: this.log.toJSON(),
|
|
231
|
+
user: this.user,
|
|
173
232
|
};
|
|
174
|
-
if (this.
|
|
175
|
-
result.
|
|
233
|
+
if (this.key) {
|
|
234
|
+
result.key = this.key;
|
|
235
|
+
}
|
|
236
|
+
if (this.space) {
|
|
237
|
+
result.space = this.space;
|
|
176
238
|
}
|
|
177
239
|
if (this.project) {
|
|
178
240
|
result.project = this.project;
|
|
@@ -180,8 +242,8 @@ export class HttpHistory {
|
|
|
180
242
|
if (this.request) {
|
|
181
243
|
result.request = this.request;
|
|
182
244
|
}
|
|
183
|
-
if (this.
|
|
184
|
-
result.
|
|
245
|
+
if (this.app) {
|
|
246
|
+
result.app = this.app;
|
|
185
247
|
}
|
|
186
248
|
return result;
|
|
187
249
|
}
|
|
@@ -14,8 +14,7 @@ import { ARCSavedRequest, ARCHistoryRequest } from './legacy/request/ArcRequest.
|
|
|
14
14
|
import { ArcLegacyProject, ARCProject } from './legacy/models/ArcLegacyProject.js';
|
|
15
15
|
import { PostmanDataTransformer } from './transformers/PostmanDataTransformer.js';
|
|
16
16
|
|
|
17
|
-
export
|
|
18
|
-
export const Kind = 'ARC#HttpProject';
|
|
17
|
+
export const Kind = 'Core#HttpProject';
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* A list of options to initialize a project in various situations.
|
|
@@ -167,12 +166,12 @@ export interface IProjectRequestIterator {
|
|
|
167
166
|
}
|
|
168
167
|
|
|
169
168
|
/**
|
|
170
|
-
* The new definition of a project in
|
|
169
|
+
* The new definition of a project in API Client.
|
|
171
170
|
* Note, this is not the same as future `ApiProject` which is reserved for building APIs
|
|
172
171
|
* using RAML or OAS.
|
|
173
172
|
*/
|
|
174
173
|
export interface IHttpProject extends IProjectDefinitionProperty {
|
|
175
|
-
kind:
|
|
174
|
+
kind: typeof Kind;
|
|
176
175
|
/**
|
|
177
176
|
* The license information for this HTTP project.
|
|
178
177
|
*/
|
|
@@ -340,11 +339,11 @@ export class HttpProject extends ProjectParent {
|
|
|
340
339
|
/**
|
|
341
340
|
* Creates a new project definition clearing anything that is so far defined.
|
|
342
341
|
*
|
|
343
|
-
* Note, this throws an error when the project is not an
|
|
342
|
+
* Note, this throws an error when the project is not an API Client project.
|
|
344
343
|
*/
|
|
345
344
|
new(init: IHttpProject): void {
|
|
346
345
|
if (!init || !init.definitions || !init.items) {
|
|
347
|
-
throw new Error(`Not
|
|
346
|
+
throw new Error(`Not a project.`);
|
|
348
347
|
}
|
|
349
348
|
const { key = v4(), definitions = {}, items, info, license, provider, environments } = init;
|
|
350
349
|
this.key = key;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SerializablePayload } from './SerializablePayload.js';
|
|
2
2
|
import { Payload } from '../lib/transformers/PayloadSerializer.js';
|
|
3
3
|
|
|
4
|
-
export const Kind = '
|
|
4
|
+
export const Kind = 'Core#HttpRequest';
|
|
5
5
|
|
|
6
6
|
export interface IBaseHttpRequest {
|
|
7
7
|
/**
|
|
@@ -85,7 +85,7 @@ export class HttpRequest extends SerializablePayload {
|
|
|
85
85
|
/**
|
|
86
86
|
* Creates a new request clearing anything that is so far defined.
|
|
87
87
|
*
|
|
88
|
-
* Note, this throws an error when the object is not
|
|
88
|
+
* Note, this throws an error when the object is not a request.
|
|
89
89
|
*/
|
|
90
90
|
new(init: IHttpRequest): void {
|
|
91
91
|
const { url, method='GET', headers, payload, kind = Kind } = init;
|
|
@@ -3,7 +3,7 @@ import { Payload, PayloadSerializer } from '../lib/transformers/PayloadSerialize
|
|
|
3
3
|
import { HTTPResponse as LegacyHttpResponse } from './legacy/request/ArcResponse.js';
|
|
4
4
|
import { Normalizer } from './legacy/Normalizer.js';
|
|
5
5
|
|
|
6
|
-
export const Kind = '
|
|
6
|
+
export const Kind = 'Core#HttpResponse';
|
|
7
7
|
|
|
8
8
|
export interface IHttpResponse {
|
|
9
9
|
kind?: string;
|
|
@@ -91,11 +91,11 @@ export class HttpResponse extends SerializablePayload {
|
|
|
91
91
|
/**
|
|
92
92
|
* Creates a new response clearing anything that is so far defined.
|
|
93
93
|
*
|
|
94
|
-
* Note, this throws an error when the object is not
|
|
94
|
+
* Note, this throws an error when the object is not a response.
|
|
95
95
|
*/
|
|
96
96
|
new(init: IHttpResponse): void {
|
|
97
97
|
if (!HttpResponse.isHttpResponse(init)) {
|
|
98
|
-
throw new Error(`Not
|
|
98
|
+
throw new Error(`Not a response.`);
|
|
99
99
|
}
|
|
100
100
|
const { status, statusText, headers, payload, kind=Kind } = init;
|
|
101
101
|
this.kind = kind;
|
package/src/models/License.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const Kind = '
|
|
1
|
+
export const Kind = 'Core#License';
|
|
2
2
|
|
|
3
3
|
export interface ILicense {
|
|
4
|
-
kind:
|
|
4
|
+
kind: typeof Kind;
|
|
5
5
|
/**
|
|
6
6
|
* The URL to the license text.
|
|
7
7
|
* Only `url` or `content` can be used at a time.
|
|
@@ -71,11 +71,11 @@ export class License {
|
|
|
71
71
|
/**
|
|
72
72
|
* Creates a new license clearing anything that is so far defined.
|
|
73
73
|
*
|
|
74
|
-
* Note, this throws an error when the license is not
|
|
74
|
+
* Note, this throws an error when the license is not a license object.
|
|
75
75
|
*/
|
|
76
76
|
new(init: ILicense): void {
|
|
77
77
|
if (!License.isLicense(init)) {
|
|
78
|
-
throw new Error(`Not
|
|
78
|
+
throw new Error(`Not a license.`);
|
|
79
79
|
}
|
|
80
80
|
const { url, content, name } = init;
|
|
81
81
|
this.kind = Kind;
|
|
@@ -6,7 +6,7 @@ import { HttpProject } from './HttpProject.js';
|
|
|
6
6
|
import { IThing, Thing, Kind as ThingKind } from './Thing.js';
|
|
7
7
|
import v4 from '../lib/uuid.js';
|
|
8
8
|
|
|
9
|
-
export const Kind = '
|
|
9
|
+
export const Kind = 'Core#ProjectFolder';
|
|
10
10
|
export const DefaultFolderName = 'New folder';
|
|
11
11
|
|
|
12
12
|
export interface IFolderAddOptions {
|
|
@@ -126,11 +126,11 @@ export class ProjectFolder extends ProjectParent {
|
|
|
126
126
|
/**
|
|
127
127
|
* Creates a new project folder clearing anything that is so far defined.
|
|
128
128
|
*
|
|
129
|
-
* Note, this throws an error when the project folder is not
|
|
129
|
+
* Note, this throws an error when the project folder is not a project folder.
|
|
130
130
|
*/
|
|
131
131
|
new(init: IProjectFolder): void {
|
|
132
132
|
if (!ProjectFolder.isProjectFolder(init)) {
|
|
133
|
-
throw new Error(`Not
|
|
133
|
+
throw new Error(`Not a project folder.`);
|
|
134
134
|
}
|
|
135
135
|
const { key = v4(), created = Date.now(), updated = Date.now(), items, environments, info } = init;
|
|
136
136
|
this.kind = Kind;
|
|
@@ -92,11 +92,11 @@ export class ProjectItem {
|
|
|
92
92
|
/**
|
|
93
93
|
* Creates a new project item clearing anything that is so far defined.
|
|
94
94
|
*
|
|
95
|
-
* Note, this throws an error when the project item is not
|
|
95
|
+
* Note, this throws an error when the project item is not a project item.
|
|
96
96
|
*/
|
|
97
97
|
new(init: IProjectItem): void {
|
|
98
98
|
if (!ProjectItem.isProjectItem(init)) {
|
|
99
|
-
throw new Error(`Not
|
|
99
|
+
throw new Error(`Not a project item.`);
|
|
100
100
|
}
|
|
101
101
|
const { kind, key } = init;
|
|
102
102
|
this.kind = kind;
|
|
@@ -6,10 +6,10 @@ import { HttpProject } from './HttpProject.js';
|
|
|
6
6
|
import v4 from '../lib/uuid.js';
|
|
7
7
|
import { IRequest, Request } from './Request.js';
|
|
8
8
|
|
|
9
|
-
export const Kind = '
|
|
9
|
+
export const Kind = 'Core#ProjectRequest';
|
|
10
10
|
|
|
11
11
|
export interface IProjectRequest extends IProjectDefinitionProperty, IRequest {
|
|
12
|
-
kind:
|
|
12
|
+
kind: typeof Kind;
|
|
13
13
|
/**
|
|
14
14
|
* The identifier of the request.
|
|
15
15
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import v4 from '../lib/uuid.js';
|
|
2
2
|
import { Property, IProperty, PropertyType, Kind as PropertyKind } from './Property.js';
|
|
3
|
-
export const Kind = '
|
|
3
|
+
export const Kind = 'Core#ProjectSchema';
|
|
4
4
|
|
|
5
5
|
export interface IProjectSchema {
|
|
6
|
-
kind?:
|
|
6
|
+
kind?: typeof Kind;
|
|
7
7
|
/**
|
|
8
8
|
* The identifier of the environment.
|
|
9
9
|
*/
|
package/src/models/Property.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ApiType } from './legacy/models/ApiTypes.js';
|
|
|
3
3
|
export type PropertyType = 'string' | 'integer' | 'float' | 'nil' | 'boolean' | 'date' | 'datetime' | 'time' | 'int32' | 'int64' | 'uint32' | 'uint64' | 'sint32' | 'sint64' | 'fixed32' | 'fixed64' | 'sfixed32' | 'sfixed64' | 'double' | 'bytes';
|
|
4
4
|
|
|
5
5
|
export interface IProperty {
|
|
6
|
-
kind:
|
|
6
|
+
kind: typeof Kind;
|
|
7
7
|
/**
|
|
8
8
|
* Property name
|
|
9
9
|
*/
|
|
@@ -42,7 +42,7 @@ export interface IProperty {
|
|
|
42
42
|
repeated?: boolean;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export const Kind = '
|
|
45
|
+
export const Kind = 'Core#Property';
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* A property of an HTTP request.
|
|
@@ -358,13 +358,13 @@ export class Property {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
|
-
* Creates a new
|
|
361
|
+
* Creates a new property.
|
|
362
362
|
*
|
|
363
|
-
* Note, this throws an error when the property is not
|
|
363
|
+
* Note, this throws an error when the property is not a property.
|
|
364
364
|
*/
|
|
365
365
|
new(init: IProperty): void {
|
|
366
366
|
if (!Property.isProperty(init)) {
|
|
367
|
-
throw new Error(`Not
|
|
367
|
+
throw new Error(`Not a property.`);
|
|
368
368
|
}
|
|
369
369
|
const { name, value, default: defaultValue, description, enabled, enum: enumValue, required, type, repeated } = init;
|
|
370
370
|
this.kind = Kind;
|
package/src/models/Provider.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare interface IProvider {
|
|
|
5
5
|
/**
|
|
6
6
|
* The data kind. The application ignores the input with an unknown `kind`, unless it can be determined from the context.
|
|
7
7
|
*/
|
|
8
|
-
kind:
|
|
8
|
+
kind: typeof Kind;
|
|
9
9
|
/**
|
|
10
10
|
* The URL to the provider
|
|
11
11
|
*/
|
|
@@ -20,7 +20,7 @@ export declare interface IProvider {
|
|
|
20
20
|
email?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export const Kind = '
|
|
23
|
+
export const Kind = 'Core#Provider';
|
|
24
24
|
|
|
25
25
|
export class Provider {
|
|
26
26
|
kind = Kind;
|
|
@@ -56,11 +56,11 @@ export class Provider {
|
|
|
56
56
|
/**
|
|
57
57
|
* Creates a new provider clearing anything that is so far defined.
|
|
58
58
|
*
|
|
59
|
-
* Note, this throws an error when the provider is not
|
|
59
|
+
* Note, this throws an error when the provider is not a provider object.
|
|
60
60
|
*/
|
|
61
61
|
new(init: IProvider): void {
|
|
62
62
|
if (!Provider.isProvider(init)) {
|
|
63
|
-
throw new Error(`Not
|
|
63
|
+
throw new Error(`Not a provider.`);
|
|
64
64
|
}
|
|
65
65
|
const { url, email, name } = init;
|
|
66
66
|
this.kind = Kind;
|
package/src/models/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# API Client
|
|
1
|
+
# API Client models
|
|
2
2
|
|
|
3
3
|
## Principles for designing a data model
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ We aim to be interoperable with AMF so when designing a data model first design
|
|
|
13
13
|
|
|
14
14
|
### The "kind" as the object type identifier
|
|
15
15
|
|
|
16
|
-
Each data object that can exist by itself or in multiple contexts' should contain the `kind` property that uniquely identifies the type. For example, the `HttpProject` class has the `
|
|
16
|
+
Each data object that can exist by itself or in multiple contexts' should contain the `kind` property that uniquely identifies the type. For example, the `HttpProject` class has the `Core#HttpProject`. These kinds are used by other libraries to identify which data types they are given as the input.
|
|
17
17
|
|
|
18
18
|
### Validation
|
|
19
19
|
|
package/src/models/Request.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { IRequestAuthorization, RequestAuthorization } from './RequestAuthorizat
|
|
|
6
6
|
import { IRequestLog, RequestLog, Kind as LogKind } from './RequestLog.js';
|
|
7
7
|
import { SentRequest } from './SentRequest.js';
|
|
8
8
|
import { ErrorResponse } from './ErrorResponse.js';
|
|
9
|
-
import {
|
|
9
|
+
import { Response } from './Response.js';
|
|
10
10
|
import { RequestsSize } from './RequestsSize.js';
|
|
11
11
|
import { IHttpRequest, HttpRequest, Kind as HttpRequestKind } from './HttpRequest.js';
|
|
12
12
|
import { ARCSavedRequest, ARCHistoryRequest } from './legacy/request/ArcRequest.js';
|
|
@@ -14,13 +14,13 @@ import { ErrorResponse as LegacyErrorResponse, Response as LegacyResponse } from
|
|
|
14
14
|
import { PayloadSerializer } from '../lib/transformers/PayloadSerializer.js';
|
|
15
15
|
import { Normalizer } from './legacy/Normalizer.js';
|
|
16
16
|
|
|
17
|
-
export const Kind = '
|
|
17
|
+
export const Kind = 'Core#Request';
|
|
18
18
|
export const createdSymbol = Symbol('created');
|
|
19
19
|
export const updatedSymbol = Symbol('updated');
|
|
20
20
|
export const midnightSymbol = Symbol('midnight');
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* The definition of a request object that functions inside
|
|
23
|
+
* The definition of a request object that functions inside API Client
|
|
24
24
|
* with the full configuration.
|
|
25
25
|
*/
|
|
26
26
|
export interface IRequest {
|
|
@@ -228,7 +228,7 @@ export class Request {
|
|
|
228
228
|
log.response = await ErrorResponse.fromLegacy(typedError);
|
|
229
229
|
} else {
|
|
230
230
|
const typedResponse = normalized.response as LegacyResponse;
|
|
231
|
-
log.response = await
|
|
231
|
+
log.response = await Response.fromLegacy(typedResponse);
|
|
232
232
|
if (Array.isArray(typedResponse.redirects) && typedResponse.redirects.length) {
|
|
233
233
|
const promises = typedResponse.redirects.map((redirect) => log.addLegacyRedirect(redirect));
|
|
234
234
|
await Promise.allSettled(promises);
|
|
@@ -55,7 +55,7 @@ export class RequestActions {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* @param input The
|
|
58
|
+
* @param input The request actions definition used to restore the state.
|
|
59
59
|
*/
|
|
60
60
|
constructor(input?: string | IRequestActions) {
|
|
61
61
|
let init: IRequestActions;
|
|
@@ -70,9 +70,7 @@ export class RequestActions {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
* Creates a new
|
|
74
|
-
*
|
|
75
|
-
* Note, this throws an error when the provider is not an ARC provider object.
|
|
73
|
+
* Creates a new request actions clearing anything that is so far defined.
|
|
76
74
|
*/
|
|
77
75
|
new(init: IRequestActions): void {
|
|
78
76
|
const { request, response } = init;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IAuthorizationSettingsUnion, AuthorizationType } from './Authorization.js';
|
|
2
2
|
import { RequestAuthorization as LegacyAuthorization } from './legacy/request/ArcRequest.js';
|
|
3
3
|
|
|
4
|
-
export const Kind = '
|
|
4
|
+
export const Kind = 'Core#RequestAuthorization';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Authorization configuration for the request.
|
|
8
8
|
*/
|
|
9
9
|
export interface IRequestAuthorization {
|
|
10
|
-
kind:
|
|
10
|
+
kind: typeof Kind;
|
|
11
11
|
/**
|
|
12
12
|
* Authorization configuration
|
|
13
13
|
*/
|
|
@@ -89,9 +89,7 @@ export class RequestAuthorization {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* Creates a new
|
|
93
|
-
*
|
|
94
|
-
* Note, this throws an error when the provider is not an ARC provider object.
|
|
92
|
+
* Creates a new request authorization clearing anything that is so far defined.
|
|
95
93
|
*/
|
|
96
94
|
new(init: IRequestAuthorization): void {
|
|
97
95
|
const { config, type, enabled, valid } = init;
|
|
@@ -2,7 +2,7 @@ import { IHostRule, HostRule } from './HostRule.js';
|
|
|
2
2
|
import { IProperty, Property } from './Property.js';
|
|
3
3
|
import { RequestConfig as LegacyConfig } from './legacy/request/ArcRequest.js';
|
|
4
4
|
|
|
5
|
-
export const Kind = '
|
|
5
|
+
export const Kind = 'Core#RequestConfig';
|
|
6
6
|
|
|
7
7
|
export interface IRequestBaseConfig {
|
|
8
8
|
/**
|
|
@@ -62,10 +62,10 @@ export interface IRequestBaseConfig {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* API Client request `config` object.
|
|
66
66
|
*/
|
|
67
67
|
export interface IRequestConfig extends IRequestBaseConfig {
|
|
68
|
-
kind:
|
|
68
|
+
kind: typeof Kind;
|
|
69
69
|
/**
|
|
70
70
|
* Whether the processor should use this configuration.
|
|
71
71
|
*/
|
|
@@ -205,8 +205,6 @@ export class RequestConfig {
|
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* Creates a new request configuration clearing anything that is so far defined.
|
|
208
|
-
*
|
|
209
|
-
* Note, this throws an error when the object is not an ARC request configuration.
|
|
210
208
|
*/
|
|
211
209
|
new(init: IRequestConfig): void {
|
|
212
210
|
const {
|