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