@api-client/core 0.3.3 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/build/browser.d.ts +3 -0
  2. package/build/browser.js +9 -0
  3. package/build/browser.js.map +1 -1
  4. package/build/index.d.ts +11 -2
  5. package/build/index.js +20 -2
  6. package/build/index.js.map +1 -1
  7. package/build/src/lib/fs/Fs.d.ts +52 -0
  8. package/build/src/lib/fs/Fs.js +245 -0
  9. package/build/src/lib/fs/Fs.js.map +1 -0
  10. package/build/src/lib/timers/Timers.d.ts +5 -0
  11. package/build/src/lib/timers/Timers.js +10 -0
  12. package/build/src/lib/timers/Timers.js.map +1 -0
  13. package/build/src/mocking/ProjectMock.d.ts +13 -0
  14. package/build/src/mocking/ProjectMock.js +16 -0
  15. package/build/src/mocking/ProjectMock.js.map +1 -0
  16. package/build/src/mocking/lib/Request.d.ts +32 -0
  17. package/build/src/mocking/lib/Request.js +63 -0
  18. package/build/src/mocking/lib/Request.js.map +1 -0
  19. package/build/src/mocking/lib/Response.d.ts +33 -0
  20. package/build/src/mocking/lib/Response.js +79 -0
  21. package/build/src/mocking/lib/Response.js.map +1 -0
  22. package/build/src/models/ErrorResponse.d.ts +5 -4
  23. package/build/src/models/ErrorResponse.js +18 -5
  24. package/build/src/models/ErrorResponse.js.map +1 -1
  25. package/build/src/models/SerializableError.d.ts +30 -0
  26. package/build/src/models/SerializableError.js +63 -0
  27. package/build/src/models/SerializableError.js.map +1 -0
  28. package/build/src/runtime/http-engine/ArcEngine.js +8 -4
  29. package/build/src/runtime/http-engine/ArcEngine.js.map +1 -1
  30. package/build/src/runtime/http-engine/HttpEngine.d.ts +3 -3
  31. package/build/src/runtime/http-engine/HttpEngine.js +3 -3
  32. package/build/src/runtime/http-engine/HttpEngine.js.map +1 -1
  33. package/build/src/runtime/http-engine/NodeEngine.js +9 -4
  34. package/build/src/runtime/http-engine/NodeEngine.js.map +1 -1
  35. package/build/src/runtime/http-engine/NodeEngineDirect.js +8 -2
  36. package/build/src/runtime/http-engine/NodeEngineDirect.js.map +1 -1
  37. package/build/src/runtime/node/BaseRunner.d.ts +21 -0
  38. package/build/src/runtime/node/BaseRunner.js +27 -0
  39. package/build/src/runtime/node/BaseRunner.js.map +1 -0
  40. package/build/src/runtime/node/ProjectParallelRunner.d.ts +81 -0
  41. package/build/src/runtime/node/ProjectParallelRunner.js +173 -0
  42. package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -0
  43. package/build/src/runtime/node/ProjectRequestRunner.d.ts +125 -0
  44. package/build/src/runtime/node/ProjectRequestRunner.js +185 -0
  45. package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -0
  46. package/build/src/runtime/node/ProjectRunner.d.ts +166 -64
  47. package/build/src/runtime/node/ProjectRunner.js +191 -139
  48. package/build/src/runtime/node/ProjectRunner.js.map +1 -1
  49. package/build/src/runtime/node/ProjectRunnerWorker.d.ts +1 -0
  50. package/build/src/runtime/node/ProjectRunnerWorker.js +58 -0
  51. package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -0
  52. package/build/src/runtime/node/ProjectSerialRunner.d.ts +11 -0
  53. package/build/src/runtime/node/ProjectSerialRunner.js +34 -0
  54. package/build/src/runtime/node/ProjectSerialRunner.js.map +1 -0
  55. package/build/src/runtime/reporters/ProjectRunCliReporter.d.ts +7 -0
  56. package/build/src/runtime/reporters/ProjectRunCliReporter.js +73 -0
  57. package/build/src/runtime/reporters/ProjectRunCliReporter.js.map +1 -0
  58. package/build/src/runtime/reporters/Reporter.d.ts +62 -0
  59. package/build/src/runtime/reporters/Reporter.js +98 -0
  60. package/build/src/runtime/reporters/Reporter.js.map +1 -0
  61. package/build/src/testing/TestCliHelper.d.ts +23 -0
  62. package/build/src/testing/TestCliHelper.js +71 -0
  63. package/build/src/testing/TestCliHelper.js.map +1 -0
  64. package/build/src/testing/getPort.d.ts +52 -0
  65. package/build/src/testing/getPort.js +169 -0
  66. package/build/src/testing/getPort.js.map +1 -0
  67. package/package.json +2 -1
  68. package/src/data/DataReader.ts +11 -0
  69. package/src/data/DataUtils.ts +108 -0
  70. package/src/data/JmesparthReader.ts +26 -0
  71. package/src/data/Json2Xml.ts +190 -0
  72. package/src/data/JsonReader.ts +41 -0
  73. package/src/data/PayloadPointer.ts +48 -0
  74. package/src/data/RequestDataExtractor.ts +133 -0
  75. package/src/data/UrlEncodedReader.ts +20 -0
  76. package/src/data/XmlReader.ts +103 -0
  77. package/src/events/BaseEvents.ts +259 -0
  78. package/src/events/CustomEvent.ts +27 -0
  79. package/src/events/EventTypes.ts +19 -0
  80. package/src/events/Events.ts +19 -0
  81. package/src/events/authorization/AuthorizationEventTypes.ts +22 -0
  82. package/src/events/authorization/AuthorizationEvents.ts +61 -0
  83. package/src/events/cookies/CookieEventTypes.ts +13 -0
  84. package/src/events/cookies/CookieEvents.ts +157 -0
  85. package/src/events/encryption/EncryptionEventTypes.ts +4 -0
  86. package/src/events/encryption/EncryptionEvents.ts +51 -0
  87. package/src/events/environment/EnvironmentEventTypes.ts +3 -0
  88. package/src/events/environment/EnvironmentEvents.ts +24 -0
  89. package/src/events/models/ClientCertificateEvents.ts +87 -0
  90. package/src/events/models/ModelEventTypes.ts +47 -0
  91. package/src/events/models/ModelEvents.ts +7 -0
  92. package/src/events/models/ProjectEvents.ts +331 -0
  93. package/src/events/process/ProcessEventTypes.ts +5 -0
  94. package/src/events/process/ProcessEvents.ts +76 -0
  95. package/src/events/readme.md +22 -0
  96. package/src/events/reporting/ReportingEventTypes.ts +3 -0
  97. package/src/events/reporting/ReportingEvents.ts +28 -0
  98. package/src/events/telemetry/TelemetryEventTypes.ts +10 -0
  99. package/src/events/telemetry/TelemetryEvents.ts +156 -0
  100. package/src/lib/cookies/Cookie.ts +312 -0
  101. package/src/lib/cookies/Cookies.ts +326 -0
  102. package/src/lib/cookies/Utils.ts +168 -0
  103. package/src/lib/fs/Fs.ts +258 -0
  104. package/src/lib/headers/Headers.ts +219 -0
  105. package/src/lib/logging/DefaultLogger.ts +19 -0
  106. package/src/lib/logging/DummyLogger.ts +21 -0
  107. package/src/lib/logging/Logger.ts +16 -0
  108. package/src/lib/timers/Timers.ts +9 -0
  109. package/src/lib/transformers/PayloadSerializer.ts +332 -0
  110. package/src/lib/transformers/Utils.ts +18 -0
  111. package/src/lib/uuid.ts +40 -0
  112. package/src/mocking/LegacyInterfaces.ts +52 -0
  113. package/src/mocking/LegacyMock.ts +37 -0
  114. package/src/mocking/ProjectMock.ts +20 -0
  115. package/src/mocking/legacy/Authorization.ts +39 -0
  116. package/src/mocking/legacy/Certificates.ts +145 -0
  117. package/src/mocking/legacy/Cookies.ts +51 -0
  118. package/src/mocking/legacy/HostRules.ts +43 -0
  119. package/src/mocking/legacy/Http.ts +236 -0
  120. package/src/mocking/legacy/HttpResponse.ts +106 -0
  121. package/src/mocking/legacy/RestApi.ts +68 -0
  122. package/src/mocking/legacy/Urls.ts +44 -0
  123. package/src/mocking/legacy/Variables.ts +53 -0
  124. package/src/mocking/lib/Request.ts +85 -0
  125. package/src/mocking/lib/Response.ts +101 -0
  126. package/src/models/ArcResponse.ts +166 -0
  127. package/src/models/Authorization.ts +481 -0
  128. package/src/models/AuthorizationData.ts +60 -0
  129. package/src/models/Backend.ts +107 -0
  130. package/src/models/ClientCertificate.ts +68 -0
  131. package/src/models/Environment.ts +279 -0
  132. package/src/models/ErrorResponse.ts +113 -0
  133. package/src/models/HistoryIndex.ts +76 -0
  134. package/src/models/HistoryRequest.ts +28 -0
  135. package/src/models/HostRule.ts +163 -0
  136. package/src/models/HttpCookie.ts +285 -0
  137. package/src/models/HttpProject.ts +1294 -0
  138. package/src/models/HttpProjectListItem.ts +23 -0
  139. package/src/models/HttpRequest.ts +124 -0
  140. package/src/models/HttpResponse.ts +143 -0
  141. package/src/models/License.ts +113 -0
  142. package/src/models/ProjectDefinitionProperty.ts +40 -0
  143. package/src/models/ProjectFolder.ts +439 -0
  144. package/src/models/ProjectItem.ts +135 -0
  145. package/src/models/ProjectParent.ts +113 -0
  146. package/src/models/ProjectRequest.ts +277 -0
  147. package/src/models/ProjectSchema.ts +202 -0
  148. package/src/models/Property.ts +423 -0
  149. package/src/models/Provider.ts +98 -0
  150. package/src/models/README.md +20 -0
  151. package/src/models/Request.ts +452 -0
  152. package/src/models/RequestActions.ts +163 -0
  153. package/src/models/RequestAuthorization.ts +115 -0
  154. package/src/models/RequestConfig.ts +317 -0
  155. package/src/models/RequestLog.ts +159 -0
  156. package/src/models/RequestTime.ts +108 -0
  157. package/src/models/RequestUiMeta.ts +258 -0
  158. package/src/models/RequestsSize.ts +65 -0
  159. package/src/models/ResponseAuthorization.ts +104 -0
  160. package/src/models/ResponseRedirect.ts +158 -0
  161. package/src/models/RevisionInfo.ts +37 -0
  162. package/src/models/SentRequest.ts +125 -0
  163. package/src/models/SerializableError.ts +80 -0
  164. package/src/models/SerializablePayload.ts +68 -0
  165. package/src/models/Server.ts +153 -0
  166. package/src/models/Thing.ts +110 -0
  167. package/src/models/Url.ts +90 -0
  168. package/src/models/User.ts +120 -0
  169. package/src/models/WebApi.ts +234 -0
  170. package/src/models/WebApiIndex.ts +122 -0
  171. package/src/models/Workspace.ts +182 -0
  172. package/src/models/actions/Action.ts +213 -0
  173. package/src/models/actions/ActionView.ts +40 -0
  174. package/src/models/actions/Condition.ts +207 -0
  175. package/src/models/actions/ConditionView.ts +42 -0
  176. package/src/models/actions/Enums.ts +29 -0
  177. package/src/models/actions/RunnableAction.ts +144 -0
  178. package/src/models/actions/runnable/DeleteCookieAction.ts +113 -0
  179. package/src/models/actions/runnable/Runnable.ts +9 -0
  180. package/src/models/actions/runnable/SetCookieAction.ts +216 -0
  181. package/src/models/actions/runnable/SetVariableAction.ts +81 -0
  182. package/src/models/legacy/DataExport.ts +172 -0
  183. package/src/models/legacy/Normalizer.ts +110 -0
  184. package/src/models/legacy/actions/Actions.ts +269 -0
  185. package/src/models/legacy/authorization/Authorization.ts +572 -0
  186. package/src/models/legacy/models/ApiTypes.ts +202 -0
  187. package/src/models/legacy/models/ArcLegacyProject.ts +39 -0
  188. package/src/models/legacy/models/AuthData.ts +17 -0
  189. package/src/models/legacy/models/ClientCertificate.ts +95 -0
  190. package/src/models/legacy/models/Cookies.ts +52 -0
  191. package/src/models/legacy/models/HostRule.ts +35 -0
  192. package/src/models/legacy/models/RestApi.ts +49 -0
  193. package/src/models/legacy/models/UrlHistory.ts +37 -0
  194. package/src/models/legacy/models/Variable.ts +43 -0
  195. package/src/models/legacy/models/base.d.ts +95 -0
  196. package/src/models/legacy/request/ArcRequest.ts +405 -0
  197. package/src/models/legacy/request/ArcResponse.ts +177 -0
  198. package/src/models/legacy/request/HistoryData.ts +47 -0
  199. package/src/models/legacy/request/Legacy.ts +45 -0
  200. package/src/models/legacy/request/RequestBody.ts +87 -0
  201. package/src/models/transformers/ArcDexieTransformer.ts +323 -0
  202. package/src/models/transformers/ArcLegacyNormalizer.ts +85 -0
  203. package/src/models/transformers/ArcLegacyTransformer.ts +200 -0
  204. package/src/models/transformers/ArcPouchTransformer.ts +184 -0
  205. package/src/models/transformers/BaseTransformer.ts +116 -0
  206. package/src/models/transformers/ImportUtils.ts +141 -0
  207. package/src/models/transformers/LegacyDataExportToApiProject.ts +76 -0
  208. package/src/models/transformers/LegacyExportProcessor.ts +252 -0
  209. package/src/models/transformers/PostmanBackupTransformer.ts +306 -0
  210. package/src/models/transformers/PostmanDataTransformer.ts +50 -0
  211. package/src/models/transformers/PostmanTransformer.ts +106 -0
  212. package/src/models/transformers/PostmanV21Transformer.ts +311 -0
  213. package/src/models/transformers/PostmanV2Transformer.ts +308 -0
  214. package/src/models/transformers/har.ts +865 -0
  215. package/src/runtime/actions/ActionRunner.ts +83 -0
  216. package/src/runtime/actions/ConditionRunner.ts +194 -0
  217. package/src/runtime/actions/RunnableCondition.ts +57 -0
  218. package/src/runtime/actions/runnable/ActionRunnable.ts +19 -0
  219. package/src/runtime/actions/runnable/DeleteCookieRunnable.ts +39 -0
  220. package/src/runtime/actions/runnable/SetCookieRunnable.ts +92 -0
  221. package/src/runtime/actions/runnable/SetVariableRunnable.ts +53 -0
  222. package/src/runtime/http-engine/ArcEngine.ts +1068 -0
  223. package/src/runtime/http-engine/FormData.ts +85 -0
  224. package/src/runtime/http-engine/HttpEngine.ts +874 -0
  225. package/src/runtime/http-engine/HttpErrorCodes.ts +270 -0
  226. package/src/runtime/http-engine/NodeEngine.ts +792 -0
  227. package/src/runtime/http-engine/NodeEngineDirect.ts +482 -0
  228. package/src/runtime/http-engine/PayloadSupport.ts +84 -0
  229. package/src/runtime/http-engine/RequestUtils.ts +164 -0
  230. package/src/runtime/http-engine/ntlm/Des.ts +345 -0
  231. package/src/runtime/http-engine/ntlm/MD4.ts +135 -0
  232. package/src/runtime/http-engine/ntlm/NtlmAuth.ts +186 -0
  233. package/src/runtime/http-engine/ntlm/NtlmMessage.ts +57 -0
  234. package/src/runtime/modules/BasicAuthCache.ts +133 -0
  235. package/src/runtime/modules/ExecutionResponse.ts +4 -0
  236. package/src/runtime/modules/ModulesRegistry.ts +136 -0
  237. package/src/runtime/modules/RequestAuthorization.ts +110 -0
  238. package/src/runtime/modules/RequestCookies.ts +145 -0
  239. package/src/runtime/node/BaseRunner.ts +29 -0
  240. package/src/runtime/node/ProjectParallelRunner.ts +234 -0
  241. package/src/runtime/node/ProjectRequestRunner.ts +281 -0
  242. package/src/runtime/node/ProjectRunner.ts +374 -0
  243. package/src/runtime/node/ProjectRunnerWorker.ts +62 -0
  244. package/src/runtime/node/ProjectSerialRunner.ts +36 -0
  245. package/src/runtime/node/RequestFactory.ts +422 -0
  246. package/src/runtime/node/VariablesStore.ts +25 -0
  247. package/src/runtime/reporters/ProjectRunCliReporter.ts +79 -0
  248. package/src/runtime/reporters/Reporter.ts +142 -0
  249. package/src/runtime/store/StoreSdk.ts +838 -0
  250. package/src/runtime/variables/Cache.ts +53 -0
  251. package/src/runtime/variables/EvalFunctions.ts +132 -0
  252. package/src/runtime/variables/ProjectVariables.ts +6 -0
  253. package/src/runtime/variables/VariablesProcessor.ts +543 -0
  254. package/src/runtime/variables/VariablesTokenizer.ts +55 -0
  255. package/src/testing/TestCliHelper.ts +76 -0
  256. package/src/testing/getPort.ts +212 -0
  257. package/build/src/runtime/http-engine/Errors.d.ts +0 -10
  258. package/build/src/runtime/http-engine/Errors.js +0 -14
  259. package/build/src/runtime/http-engine/Errors.js.map +0 -1
@@ -0,0 +1,405 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-interface */
2
+ import { AuthorizationSettingsUnion } from '../authorization/Authorization.js';
3
+ import { HostRule } from '../models/HostRule.js';
4
+ import { Entity } from '../models/base.js';
5
+ import { ErrorResponse, Response } from './ArcResponse.js';
6
+ import { LegacyResponse, LegacyResponseMeta } from './Legacy.js';
7
+ import { ApiType } from '../models/ApiTypes.js';
8
+ import { BodyMeta, MultipartBody } from './RequestBody.js';
9
+ import { RunnableAction } from '../actions/Actions.js';
10
+ import { Variable } from '../models/Variable.js';
11
+ import { RequestCertificate } from '../models/ClientCertificate.js';
12
+
13
+ /**
14
+ * This interface was used in a few components, this is left for compatibility
15
+ * @deprecated Use RequestBody.MultipartBody instead
16
+ */
17
+ export interface MultipartTransformer extends MultipartBody {}
18
+
19
+ /**
20
+ * The definition of the ARC base HTTP request object
21
+ * @deprecated
22
+ */
23
+ export interface HTTPRequest {
24
+ /**
25
+ * The request URL
26
+ */
27
+ url: string;
28
+ /**
29
+ * HTTP method name
30
+ */
31
+ method: string;
32
+ /**
33
+ * HTTP headers string
34
+ */
35
+ headers?: string;
36
+ /**
37
+ * The request payload
38
+ */
39
+ payload?: string|File|Blob|Buffer|ArrayBuffer|FormData;
40
+ }
41
+
42
+ /**
43
+ * An interface describing a request made by the HTTP transport.
44
+ * Each transport used by ARC must return this structure in the response event.
45
+ * This is not a replacement for the editor request that also has to be returned.
46
+ *
47
+ * Another difference is that this headers contains a final list of headers sent to the
48
+ * server, including default headers, content-length, authorization, and so on.
49
+ * @deprecated
50
+ */
51
+ export interface TransportRequest extends HTTPRequest {
52
+ /**
53
+ * The HTTP message sent to the server (full message).
54
+ * Some HTTP clients may not give this information.
55
+ */
56
+ httpMessage: string;
57
+ /**
58
+ * The timestamp when the request was started (before the connection is made)
59
+ */
60
+ startTime: number;
61
+ /**
62
+ * The timestamp of when the response ended.
63
+ */
64
+ endTime: number;
65
+ }
66
+
67
+ /**
68
+ * ARC request `config` object.
69
+ * @deprecated
70
+ */
71
+ export interface RequestConfig {
72
+ /**
73
+ * Whether the processor should use this configuration.
74
+ */
75
+ enabled: boolean;
76
+ /**
77
+ * The request timeout.
78
+ * Default no timeout.
79
+ */
80
+ timeout?: number;
81
+ /**
82
+ * Whether or not the request should follow redirects.
83
+ */
84
+ followRedirects?: boolean;
85
+ /**
86
+ * Does not set session (saved) cookies to this request
87
+ */
88
+ ignoreSessionCookies?: boolean;
89
+ /**
90
+ * Hosts table configuration.
91
+ */
92
+ hosts?: HostRule[];
93
+ /**
94
+ * Whether the processor should validate certificates.
95
+ */
96
+ validateCertificates?: boolean;
97
+ /**
98
+ * Whether the native (Node's) transport should be used.
99
+ */
100
+ nativeTransport?: boolean;
101
+ /**
102
+ * Whether to put a "default" headers (accept and user agent)
103
+ */
104
+ defaultHeaders?: boolean;
105
+ /**
106
+ * A list of variables to use with the request.
107
+ * Note, request variables override application and workspace variables.
108
+ */
109
+ variables?: Variable[];
110
+ }
111
+
112
+ /**
113
+ * Authorization configuration for the request.
114
+ * @deprecated
115
+ */
116
+ export interface RequestAuthorization {
117
+ /**
118
+ * Authorization configuration
119
+ */
120
+ config: AuthorizationSettingsUnion;
121
+ /**
122
+ * The name of the authorization
123
+ */
124
+ type: string;
125
+ /**
126
+ * Whether the authorization is enabled.
127
+ */
128
+ enabled: boolean;
129
+ /**
130
+ * Whether the authorization is reported to be valid.
131
+ * The application should take action when the authorization is invalid but possibly allow the request.
132
+ */
133
+ valid: boolean;
134
+ }
135
+
136
+ /**
137
+ * URL editor meta data.
138
+ * @deprecated
139
+ */
140
+ export interface UrlMeta {
141
+ /**
142
+ * The model generated for the URL parameters.
143
+ */
144
+ model?: ApiType[];
145
+ /**
146
+ * The query params delimiter. By default it is `&`.
147
+ */
148
+ delimiter?: string;
149
+ }
150
+
151
+ /**
152
+ * Headers editor meta data.
153
+ * @deprecated
154
+ */
155
+ export interface HeadersMeta {
156
+ /**
157
+ * The model generated for the headers editor.
158
+ */
159
+ model?: ApiType[];
160
+ /**
161
+ * Whether the source editor is opened.
162
+ */
163
+ source?: boolean;
164
+ }
165
+
166
+ /**
167
+ * @deprecated
168
+ */
169
+ export interface AuthMeta {
170
+ /**
171
+ * The index of the selected authorization method.
172
+ */
173
+ selected?: number;
174
+ }
175
+
176
+ /**
177
+ * @deprecated
178
+ */
179
+ export declare interface ActionsMeta {
180
+ /**
181
+ * The index of the selected arc actions view.
182
+ */
183
+ selected?: number;
184
+ }
185
+
186
+ /**
187
+ * UI configuration for the request.
188
+ * @deprecated
189
+ */
190
+ export declare interface RequestUiMeta {
191
+ /**
192
+ * Body editor metadata.
193
+ */
194
+ body?: BodyMeta;
195
+ /**
196
+ * URL editor metadata.
197
+ */
198
+ url?: UrlMeta;
199
+ /**
200
+ * Headers editor metadata.
201
+ */
202
+ headers?: HeadersMeta;
203
+ /**
204
+ * Authorization editor meta.
205
+ */
206
+ authorization?: AuthMeta;
207
+ /**
208
+ * ARC request actions editor UI config.
209
+ */
210
+ actions?: ActionsMeta;
211
+
212
+ /**
213
+ * The currently selected editor in the request editor UI.
214
+ */
215
+ selectedEditor?: number;
216
+ /**
217
+ * Optional configuration of the response view
218
+ */
219
+ response?: ResponseUiMeta;
220
+ }
221
+
222
+ /**
223
+ * @deprecated
224
+ */
225
+ export declare interface ResponseUiMeta {
226
+ /**
227
+ * The list of activated panels in the response view.
228
+ */
229
+ activePanels?: string[];
230
+ /**
231
+ * The name of the selected response panel.
232
+ */
233
+ selectedPanel?: string;
234
+ }
235
+
236
+ /**
237
+ * @deprecated
238
+ */
239
+ export declare interface RequestActions {
240
+ /**
241
+ * Actions to be executed before the request is sent to the transport library.
242
+ */
243
+ request?: RunnableAction[];
244
+ /**
245
+ * Actions to be executed after the response is fully received but before it is reported back to the UI.
246
+ */
247
+ response?: RunnableAction[];
248
+ }
249
+
250
+ /**
251
+ * The definition of the ARC request that is shared in different contexts.
252
+ * @deprecated This is a legacy ARC request definition.
253
+ */
254
+ export interface ArcBaseRequest extends HTTPRequest {
255
+ /**
256
+ * The kind of the object. In ARC by default a request object is an HTTP request object.
257
+ */
258
+ kind?: string;
259
+ /**
260
+ * Request processing configuration.
261
+ */
262
+ config?: RequestConfig;
263
+ /**
264
+ * The old authorization system that allowed only single request to be used.
265
+ * @deprecated
266
+ */
267
+ auth?: AuthorizationSettingsUnion;
268
+ /**
269
+ * Request authorization configuration
270
+ */
271
+ authorization?: RequestAuthorization[];
272
+ /**
273
+ * The last response made with this request. This is always set with the history object.
274
+ * May not be set with others.
275
+ */
276
+ response?: Response | ErrorResponse;
277
+ /**
278
+ * Set together with `response` property. Describes a request sent by the transport.
279
+ */
280
+ transportRequest?: TransportRequest,
281
+ /**
282
+ * Old ARC's response declaration. This is kept for internal data model processing.
283
+ * @deprecated Do not use.
284
+ */
285
+ _response?: LegacyResponse;
286
+ /**
287
+ * Old ARC's response meta declaration. This is kept for internal data model processing.
288
+ * @deprecated Do not use.
289
+ */
290
+ _responseMeta?: LegacyResponseMeta;
291
+ /**
292
+ * @deprecated Do not use.
293
+ */
294
+ _isErrorResponse?: boolean;
295
+ /**
296
+ * The UI configuration for the request.
297
+ * Each part of the UI has its own default state so this is optional and
298
+ * always updated when the UI change.
299
+ */
300
+ ui?: RequestUiMeta;
301
+ /**
302
+ * Actions to be performed when the request is executed.
303
+ */
304
+ actions?: RequestActions;
305
+
306
+ clientCertificate?: RequestCertificate;
307
+ }
308
+
309
+ /**
310
+ * A model of an ARC request that has been stored in the data store
311
+ * @deprecated This is a legacy ARC request definition.
312
+ */
313
+ export interface ArcStoredRequest extends ArcBaseRequest {
314
+ /**
315
+ * The type of the request stored in the data store.
316
+ * Can be either `saved` or `history` which corresponds
317
+ * to `SavedRequest` and `HistoryRequest` definitions respectively.
318
+ */
319
+ type?: string;
320
+ /**
321
+ * Timestamp when the request was last updated.
322
+ */
323
+ updated?: number;
324
+ /**
325
+ * Timestamp when the request was created.
326
+ */
327
+ created?: number;
328
+ /**
329
+ * An ID of Google Drive object where this request is stored.
330
+ */
331
+ driveId?: string;
332
+ /**
333
+ * A timestamp of the midnight when the request object was updated
334
+ */
335
+ midnight?: number;
336
+ /**
337
+ * ARCs internal transformation of a native FormData into a structure that
338
+ * can be stored in the data store. This is used internally by their model
339
+ * and when requesting ARC request object this is restored to the original
340
+ * format.
341
+ */
342
+ multipart?: MultipartBody[];
343
+ /**
344
+ * When a file is the request payload then in the data store it is transformed into a
345
+ * string and the payload is emptied. This is used internally by the data store
346
+ * to restore the original format
347
+ */
348
+ blob?: string;
349
+ }
350
+
351
+ /**
352
+ * The definition of the ARC request history data entity.
353
+ * @deprecated This is a legacy ARC request definition.
354
+ */
355
+ export interface ARCHistoryRequest extends ArcStoredRequest, Entity {}
356
+
357
+ /**
358
+ * @deprecated This is a legacy ARC request definition.
359
+ */
360
+ export interface ARCSavedRequest extends ArcStoredRequest, Entity {
361
+ /**
362
+ * The name of the request
363
+ */
364
+ name: string;
365
+ /**
366
+ * The description of the request
367
+ */
368
+ description?: string;
369
+ /**
370
+ * A list of projects this request is assigned to.
371
+ */
372
+ projects?: string[];
373
+ }
374
+
375
+ /**
376
+ * The definition of the ARC request in the request editor.
377
+ * @deprecated
378
+ */
379
+ export interface ArcEditorRequest {
380
+ /**
381
+ * The auto generated ID of the request in the editor.
382
+ */
383
+ id: string;
384
+ /**
385
+ * The ARC request object
386
+ */
387
+ request: ArcBaseRequest | ARCSavedRequest | ARCHistoryRequest;
388
+ }
389
+
390
+ /**
391
+ * @deprecated
392
+ */
393
+ export interface ARCRequestRestoreOptions {
394
+ /**
395
+ * When set the payload is ignored from the request and the model returns `undefined.
396
+ * This is used to optimize queries to the data store.
397
+ */
398
+ ignorePayload?: boolean;
399
+ /**
400
+ * When performing a bulk read operation it preserves order
401
+ * or requested items by key by adding `undefined` to the indexes that
402
+ * failed to read
403
+ */
404
+ preserveOrder?: boolean;
405
+ }
@@ -0,0 +1,177 @@
1
+ import { MultipartBody } from "./RequestBody.js";
2
+
3
+ /**
4
+ * Schema definition for ARC request timings. This is mostly consistent with HAR timings.
5
+ * @deprecated
6
+ */
7
+ export interface RequestTime {
8
+ connect: number;
9
+ receive: number;
10
+ send: number;
11
+ wait: number;
12
+ blocked: number;
13
+ dns: number;
14
+ ssl?: number;
15
+ }
16
+
17
+ /**
18
+ * ARC transforms response body from ArrayBuffer or Buffer
19
+ * to this structure to store it in the data store.
20
+ * @deprecated
21
+ */
22
+ export interface TransformedPayload {
23
+ /**
24
+ * The type of the original data typ
25
+ */
26
+ type: string;
27
+ /**
28
+ * Array of integers to be restored to its original form defined in the `type`.
29
+ */
30
+ data: number[];
31
+ }
32
+
33
+ /**
34
+ * @deprecated
35
+ */
36
+ export interface HTTPResponse {
37
+ /**
38
+ * The response status code
39
+ */
40
+ status: number;
41
+ /**
42
+ * The reason part of the status message
43
+ */
44
+ statusText?: string;
45
+ /**
46
+ * The response headers
47
+ */
48
+ headers?: string;
49
+ /**
50
+ * The response message
51
+ */
52
+ payload?: string|Buffer|ArrayBuffer|TransformedPayload;
53
+ }
54
+
55
+ /**
56
+ * An information about a redirect
57
+ * @deprecated
58
+ */
59
+ export interface ResponseRedirect {
60
+ /**
61
+ * Redirection response
62
+ */
63
+ response: HTTPResponse;
64
+ /**
65
+ * Redirection timings, if available.
66
+ */
67
+ timings?: RequestTime;
68
+ /**
69
+ * The timestamp when the request was started (before the connection is made)
70
+ */
71
+ startTime: number;
72
+ /**
73
+ * The timestamp of when the response ended.
74
+ */
75
+ endTime: number;
76
+ /**
77
+ * The URL the request was redirected to
78
+ */
79
+ url: string;
80
+ }
81
+
82
+ /**
83
+ * @deprecated
84
+ */
85
+ export interface RequestsSize {
86
+ /**
87
+ * The size of the request in bytes
88
+ */
89
+ request: number;
90
+ /**
91
+ * The size of the response in bytes
92
+ */
93
+ response: number;
94
+ }
95
+
96
+ /**
97
+ * @deprecated
98
+ */
99
+ export interface BaseResponse extends HTTPResponse {
100
+ /**
101
+ * The ID of the request object used to trigger the response.
102
+ */
103
+ id?: string;
104
+ }
105
+
106
+ /**
107
+ * ARC response object.
108
+ * @deprecated
109
+ */
110
+ export interface Response extends BaseResponse {
111
+ /**
112
+ * The request timings.
113
+ * Some HTTP clients may not give this information.
114
+ */
115
+ timings?: RequestTime;
116
+ /**
117
+ * The total loading time (from sending the request to receive last byte)
118
+ */
119
+ loadingTime: number;
120
+ /**
121
+ * The list of redirects, if any.
122
+ */
123
+ redirects?: ResponseRedirect[];
124
+ /**
125
+ * Request and response size. Some HTTP clients may not give this information.
126
+ */
127
+ size?: RequestsSize;
128
+
129
+ /**
130
+ * ARCs internal transformation of a native FormData into a structure that
131
+ * can be stored in the data store. This is used internally by their model
132
+ * and when requesting ARC request object this is restored to the original
133
+ * format.
134
+ */
135
+ multipart?: MultipartBody[];
136
+
137
+ /**
138
+ * When a file is the request payload then in the data store it is transformed into a
139
+ * string and the payload is emptied. This is used internally by the data store
140
+ * to restore the original format
141
+ */
142
+ blob?: string;
143
+
144
+ /**
145
+ * The authentication request from the server.
146
+ */
147
+ auth?: ResponseAuth;
148
+ }
149
+
150
+ /**
151
+ * @deprecated
152
+ */
153
+ export interface ErrorResponse extends BaseResponse {
154
+ /**
155
+ * An error associated with the response
156
+ */
157
+ error: Error;
158
+ }
159
+
160
+ /**
161
+ * @deprecated
162
+ */
163
+ export interface ResponseAuth {
164
+ /**
165
+ * The requested by the authorization server authentication method
166
+ */
167
+ method: string;
168
+ /**
169
+ * The current state if the authorization process. This is used by NTLM authorization helper.
170
+ */
171
+ state?: number;
172
+ /**
173
+ * The headers association with the response.
174
+ */
175
+ headers?: string;
176
+ challengeHeader?: string;
177
+ }
@@ -0,0 +1,47 @@
1
+ import { Entity } from '../models/base.js';
2
+ import { MultipartTransformer } from "./ArcRequest.js";
3
+ import { RequestTime, TransformedPayload } from "./ArcResponse.js";
4
+
5
+ export interface HistoryData extends Entity {
6
+ timings: RequestTime;
7
+ totalTime: number;
8
+ created: number;
9
+ request: HistoryDataRequest;
10
+ response: HistoryDataResponse;
11
+ stats: HistoryDataStats;
12
+ }
13
+ export interface HistoryDataRequest {
14
+ headers?: string;
15
+ payload?: string | Buffer | ArrayBuffer | Blob | File | FormData;
16
+ url: string;
17
+ method: string;
18
+ /**
19
+ * ARCs internal transformation of a native FormData into a structure that
20
+ * can be stored in the data store. This is used internally by their model
21
+ * and when requesting ARC request object this is restored to the original
22
+ * format.
23
+ */
24
+ multipart?: MultipartTransformer[];
25
+ /**
26
+ * When a file is the request payload then in the data store it is transformed into a
27
+ * string and the payload is emptied. This is used internally by the data store
28
+ * to restore the original format
29
+ */
30
+ blob?: string;
31
+ }
32
+ export interface HistoryDataResponse {
33
+ statusCode: number,
34
+ statusText?: string;
35
+ headers?: string;
36
+ payload: string | TransformedPayload;
37
+ }
38
+
39
+ export interface HistoryDataStat {
40
+ headersSize: number;
41
+ payloadSize: number;
42
+ }
43
+
44
+ export interface HistoryDataStats {
45
+ request: HistoryDataStat;
46
+ response: HistoryDataStat;
47
+ }
@@ -0,0 +1,45 @@
1
+ import { RequestTime } from "./ArcResponse.js";
2
+
3
+ /**
4
+ * @deprecated This is no longer used in ARC except for internal processing of the data model
5
+ */
6
+ export interface LegacyResponseMeta {
7
+ /**
8
+ * Request loading time
9
+ */
10
+ loadingTime: number;
11
+ /**
12
+ * Whether the request was made using web APIs.
13
+ */
14
+ responseIsXhr: boolean;
15
+ redirects: LegacyRedirect[];
16
+ redirectsTiming: RequestTime[];
17
+ /**
18
+ * Request timings.
19
+ */
20
+ timing: RequestTime;
21
+ /**
22
+ * sent message by the transport
23
+ */
24
+ sourceMessage: string;
25
+ }
26
+
27
+ /**
28
+ * @deprecated This is no longer used in ARC except for internal processing of the data model
29
+ */
30
+ export interface LegacyRedirect {
31
+ status: number;
32
+ statusText: string;
33
+ headers: string;
34
+ url: string;
35
+ payload: string|Buffer|ArrayBuffer;
36
+ sentHttpMessage: string;
37
+ }
38
+
39
+ /**
40
+ * @deprecated This is no longer used in ARC except for internal processing of the data model
41
+ */
42
+ export interface LegacyResponse extends LegacyRedirect {
43
+ stats: RequestTime;
44
+ redirects: LegacyRedirect[];
45
+ }