@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.
Files changed (356) hide show
  1. package/build/browser.d.ts +10 -8
  2. package/build/browser.js +11 -7
  3. package/build/browser.js.map +1 -1
  4. package/build/index.d.ts +12 -11
  5. package/build/index.js +9 -9
  6. package/build/index.js.map +1 -1
  7. package/build/src/data/JmesparthReader.d.ts +1 -1
  8. package/build/src/data/JmesparthReader.js +1 -1
  9. package/build/src/events/models/ProjectEvents.d.ts +1 -1
  10. package/build/src/events/models/ProjectEvents.js +1 -2
  11. package/build/src/events/models/ProjectEvents.js.map +1 -1
  12. package/build/src/lib/transformers/PayloadSerializer.d.ts +2 -2
  13. package/build/src/lib/transformers/PayloadSerializer.js +3 -3
  14. package/build/src/lib/transformers/PayloadSerializer.js.map +1 -1
  15. package/build/src/mocking/ProjectMock.d.ts +7 -1
  16. package/build/src/mocking/ProjectMock.js +6 -0
  17. package/build/src/mocking/ProjectMock.js.map +1 -1
  18. package/build/src/mocking/lib/History.d.ts +70 -0
  19. package/build/src/mocking/lib/History.js +120 -0
  20. package/build/src/mocking/lib/History.js.map +1 -0
  21. package/build/src/mocking/lib/Request.d.ts +2 -2
  22. package/build/src/mocking/lib/Request.js +3 -2
  23. package/build/src/mocking/lib/Request.js.map +1 -1
  24. package/build/src/mocking/lib/Response.d.ts +6 -6
  25. package/build/src/mocking/lib/Response.js +6 -6
  26. package/build/src/mocking/lib/Response.js.map +1 -1
  27. package/build/src/mocking/lib/User.d.ts +20 -0
  28. package/build/src/mocking/lib/User.js +54 -0
  29. package/build/src/mocking/lib/User.js.map +1 -0
  30. package/build/src/models/AuthorizationData.d.ts +2 -2
  31. package/build/src/models/AuthorizationData.js +2 -2
  32. package/build/src/models/Backend.d.ts +85 -0
  33. package/build/src/models/ClientCertificate.d.ts +1 -1
  34. package/build/src/models/Environment.d.ts +3 -3
  35. package/build/src/models/Environment.js +3 -3
  36. package/build/src/models/Environment.js.map +1 -1
  37. package/build/src/models/ErrorResponse.d.ts +1 -1
  38. package/build/src/models/ErrorResponse.js +1 -1
  39. package/build/src/models/HostRule.d.ts +4 -4
  40. package/build/src/models/HostRule.js +4 -4
  41. package/build/src/models/HostRule.js.map +1 -1
  42. package/build/src/models/HttpHistory.d.ts +64 -18
  43. package/build/src/models/HttpHistory.js +43 -19
  44. package/build/src/models/HttpHistory.js.map +1 -1
  45. package/build/src/models/HttpProject.d.ts +4 -5
  46. package/build/src/models/HttpProject.js +3 -3
  47. package/build/src/models/HttpProject.js.map +1 -1
  48. package/build/src/models/HttpProjectListItem.d.ts +1 -1
  49. package/build/src/models/HttpProjectListItem.js +1 -1
  50. package/build/src/models/HttpProjectListItem.js.map +1 -1
  51. package/build/src/models/HttpRequest.d.ts +2 -2
  52. package/build/src/models/HttpRequest.js +2 -2
  53. package/build/src/models/HttpRequest.js.map +1 -1
  54. package/build/src/models/HttpResponse.d.ts +2 -2
  55. package/build/src/models/HttpResponse.js +3 -3
  56. package/build/src/models/HttpResponse.js.map +1 -1
  57. package/build/src/models/License.d.ts +3 -3
  58. package/build/src/models/License.js +3 -3
  59. package/build/src/models/License.js.map +1 -1
  60. package/build/src/models/ProjectFolder.d.ts +2 -2
  61. package/build/src/models/ProjectFolder.js +3 -3
  62. package/build/src/models/ProjectFolder.js.map +1 -1
  63. package/build/src/models/ProjectItem.d.ts +1 -1
  64. package/build/src/models/ProjectItem.js +2 -2
  65. package/build/src/models/ProjectItem.js.map +1 -1
  66. package/build/src/models/ProjectRequest.d.ts +2 -2
  67. package/build/src/models/ProjectRequest.js +1 -1
  68. package/build/src/models/ProjectRequest.js.map +1 -1
  69. package/build/src/models/ProjectSchema.d.ts +2 -2
  70. package/build/src/models/ProjectSchema.js +1 -1
  71. package/build/src/models/ProjectSchema.js.map +1 -1
  72. package/build/src/models/Property.d.ts +4 -4
  73. package/build/src/models/Property.js +4 -4
  74. package/build/src/models/Property.js.map +1 -1
  75. package/build/src/models/Provider.d.ts +3 -3
  76. package/build/src/models/Provider.js +3 -3
  77. package/build/src/models/Provider.js.map +1 -1
  78. package/build/src/models/Request.d.ts +2 -2
  79. package/build/src/models/Request.js +3 -3
  80. package/build/src/models/Request.js.map +1 -1
  81. package/build/src/models/RequestActions.d.ts +2 -4
  82. package/build/src/models/RequestActions.js +2 -4
  83. package/build/src/models/RequestActions.js.map +1 -1
  84. package/build/src/models/RequestAuthorization.d.ts +3 -5
  85. package/build/src/models/RequestAuthorization.js +2 -4
  86. package/build/src/models/RequestAuthorization.js.map +1 -1
  87. package/build/src/models/RequestConfig.d.ts +3 -5
  88. package/build/src/models/RequestConfig.js +1 -3
  89. package/build/src/models/RequestConfig.js.map +1 -1
  90. package/build/src/models/RequestLog.d.ts +14 -8
  91. package/build/src/models/RequestLog.js +18 -7
  92. package/build/src/models/RequestLog.js.map +1 -1
  93. package/build/src/models/RequestTime.d.ts +4 -6
  94. package/build/src/models/RequestTime.js +2 -4
  95. package/build/src/models/RequestTime.js.map +1 -1
  96. package/build/src/models/RequestUiMeta.d.ts +5 -5
  97. package/build/src/models/RequestUiMeta.js +2 -2
  98. package/build/src/models/RequestUiMeta.js.map +1 -1
  99. package/build/src/models/RequestsSize.d.ts +1 -3
  100. package/build/src/models/RequestsSize.js +1 -3
  101. package/build/src/models/RequestsSize.js.map +1 -1
  102. package/build/src/models/{ArcResponse.d.ts → Response.d.ts} +7 -9
  103. package/build/src/models/{ArcResponse.js → Response.js} +4 -6
  104. package/build/src/models/Response.js.map +1 -0
  105. package/build/src/models/ResponseAuthorization.d.ts +3 -3
  106. package/build/src/models/ResponseAuthorization.js +3 -3
  107. package/build/src/models/ResponseAuthorization.js.map +1 -1
  108. package/build/src/models/ResponseRedirect.d.ts +3 -5
  109. package/build/src/models/ResponseRedirect.js +1 -3
  110. package/build/src/models/ResponseRedirect.js.map +1 -1
  111. package/build/src/models/RevisionInfo.d.ts +1 -1
  112. package/build/src/models/RevisionInfo.js +1 -1
  113. package/build/src/models/RevisionInfo.js.map +1 -1
  114. package/build/src/models/SentRequest.d.ts +2 -4
  115. package/build/src/models/SentRequest.js +1 -3
  116. package/build/src/models/SentRequest.js.map +1 -1
  117. package/build/src/models/Server.d.ts +3 -3
  118. package/build/src/models/Server.js +3 -3
  119. package/build/src/models/Server.js.map +1 -1
  120. package/build/src/models/Thing.d.ts +3 -3
  121. package/build/src/models/Thing.js +3 -3
  122. package/build/src/models/Thing.js.map +1 -1
  123. package/build/src/models/Url.d.ts +2 -4
  124. package/build/src/models/Url.js +2 -4
  125. package/build/src/models/Url.js.map +1 -1
  126. package/build/src/models/User.d.ts +2 -1
  127. package/build/src/models/User.js +1 -1
  128. package/build/src/models/User.js.map +1 -1
  129. package/build/src/models/WebApi.d.ts +1 -1
  130. package/build/src/models/WebApi.js +1 -1
  131. package/build/src/models/WebApi.js.map +1 -1
  132. package/build/src/models/WebApiIndex.d.ts +1 -1
  133. package/build/src/models/WebApiIndex.js +1 -1
  134. package/build/src/models/WebApiIndex.js.map +1 -1
  135. package/build/src/models/Workspace.d.ts +4 -4
  136. package/build/src/models/Workspace.js +4 -4
  137. package/build/src/models/Workspace.js.map +1 -1
  138. package/build/src/models/actions/Action.d.ts +2 -2
  139. package/build/src/models/actions/Action.js +1 -1
  140. package/build/src/models/actions/Action.js.map +1 -1
  141. package/build/src/models/actions/Condition.d.ts +2 -2
  142. package/build/src/models/actions/Condition.js +1 -1
  143. package/build/src/models/actions/Condition.js.map +1 -1
  144. package/build/src/models/actions/RunnableAction.d.ts +1 -1
  145. package/build/src/models/actions/RunnableAction.js +1 -1
  146. package/build/src/models/actions/RunnableAction.js.map +1 -1
  147. package/build/src/models/actions/runnable/DeleteCookieAction.d.ts +2 -2
  148. package/build/src/models/actions/runnable/DeleteCookieAction.js +1 -1
  149. package/build/src/models/actions/runnable/DeleteCookieAction.js.map +1 -1
  150. package/build/src/models/actions/runnable/SetCookieAction.d.ts +2 -2
  151. package/build/src/models/actions/runnable/SetCookieAction.js +1 -1
  152. package/build/src/models/actions/runnable/SetCookieAction.js.map +1 -1
  153. package/build/src/models/actions/runnable/SetVariableAction.d.ts +2 -2
  154. package/build/src/models/actions/runnable/SetVariableAction.js +1 -1
  155. package/build/src/models/actions/runnable/SetVariableAction.js.map +1 -1
  156. package/build/src/models/transformers/ImportUtils.d.ts +1 -1
  157. package/build/src/models/transformers/ImportUtils.js +1 -1
  158. package/build/src/models/transformers/PostmanBackupTransformer.js +2 -1
  159. package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
  160. package/build/src/models/transformers/PostmanV21Transformer.js +2 -1
  161. package/build/src/models/transformers/PostmanV21Transformer.js.map +1 -1
  162. package/build/src/models/transformers/PostmanV2Transformer.js +2 -1
  163. package/build/src/models/transformers/PostmanV2Transformer.js.map +1 -1
  164. package/build/src/runtime/actions/RunnableCondition.d.ts +6 -7
  165. package/build/src/runtime/actions/RunnableCondition.js +4 -5
  166. package/build/src/runtime/actions/RunnableCondition.js.map +1 -1
  167. package/build/src/runtime/http-engine/{ArcEngine.d.ts → CoreEngine.d.ts} +3 -3
  168. package/build/src/runtime/http-engine/{ArcEngine.js → CoreEngine.js} +8 -8
  169. package/build/src/runtime/http-engine/CoreEngine.js.map +1 -0
  170. package/build/src/runtime/http-engine/HttpEngine.d.ts +3 -3
  171. package/build/src/runtime/http-engine/HttpEngine.js +3 -20
  172. package/build/src/runtime/http-engine/HttpEngine.js.map +1 -1
  173. package/build/src/runtime/modules/BasicAuthCache.js +2 -5
  174. package/build/src/runtime/modules/BasicAuthCache.js.map +1 -1
  175. package/build/src/runtime/modules/RequestCookies.d.ts +1 -1
  176. package/build/src/runtime/modules/RequestCookies.js +3 -2
  177. package/build/src/runtime/modules/RequestCookies.js.map +1 -1
  178. package/build/src/runtime/node/InteropInterfaces.d.ts +115 -0
  179. package/build/src/runtime/node/InteropInterfaces.js +2 -0
  180. package/build/src/runtime/node/InteropInterfaces.js.map +1 -0
  181. package/build/src/runtime/node/ProjectParallelRunner.d.ts +2 -7
  182. package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
  183. package/build/src/runtime/node/ProjectRequestRunner.d.ts +17 -49
  184. package/build/src/runtime/node/ProjectRequestRunner.js +39 -10
  185. package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
  186. package/build/src/runtime/node/ProjectRunner.d.ts +1 -59
  187. package/build/src/runtime/node/ProjectRunner.js.map +1 -1
  188. package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -1
  189. package/build/src/runtime/node/RequestFactory.d.ts +1 -1
  190. package/build/src/runtime/node/RequestFactory.js +3 -3
  191. package/build/src/runtime/node/RequestFactory.js.map +1 -1
  192. package/build/src/runtime/reporters/ProjectRunCliReporter.js.map +1 -1
  193. package/build/src/runtime/reporters/Reporter.js.map +1 -1
  194. package/build/src/runtime/store/AuthSdk.d.ts +28 -0
  195. package/build/src/runtime/store/AuthSdk.js +123 -0
  196. package/build/src/runtime/store/AuthSdk.js.map +1 -0
  197. package/build/src/runtime/store/BackendSdk.d.ts +8 -0
  198. package/build/src/runtime/store/BackendSdk.js +25 -0
  199. package/build/src/runtime/store/BackendSdk.js.map +1 -0
  200. package/build/src/runtime/store/HistorySdk.d.ts +48 -0
  201. package/build/src/runtime/store/HistorySdk.js +142 -0
  202. package/build/src/runtime/store/HistorySdk.js.map +1 -0
  203. package/build/src/runtime/store/Http.d.ts +14 -0
  204. package/build/src/runtime/store/Http.js +4 -0
  205. package/build/src/runtime/store/Http.js.map +1 -0
  206. package/build/src/runtime/store/HttpNode.d.ts +16 -0
  207. package/build/src/runtime/store/HttpNode.js +95 -0
  208. package/build/src/runtime/store/HttpNode.js.map +1 -0
  209. package/build/src/runtime/store/HttpWeb.d.ts +15 -0
  210. package/build/src/runtime/store/HttpWeb.js +83 -0
  211. package/build/src/runtime/store/HttpWeb.js.map +1 -0
  212. package/build/src/runtime/store/ProjectsSdk.d.ts +43 -0
  213. package/build/src/runtime/store/ProjectsSdk.js +144 -0
  214. package/build/src/runtime/store/ProjectsSdk.js.map +1 -0
  215. package/build/src/runtime/store/RouteBuilder.d.ts +42 -0
  216. package/build/src/runtime/store/RouteBuilder.js +75 -0
  217. package/build/src/runtime/store/RouteBuilder.js.map +1 -0
  218. package/build/src/runtime/store/Sdk.d.ts +79 -0
  219. package/build/src/runtime/store/Sdk.js +117 -0
  220. package/build/src/runtime/store/Sdk.js.map +1 -0
  221. package/build/src/runtime/store/SdkBase.d.ts +45 -0
  222. package/build/src/runtime/store/SdkBase.js +40 -0
  223. package/build/src/runtime/store/SdkBase.js.map +1 -0
  224. package/build/src/runtime/store/SpacesSdk.d.ts +50 -0
  225. package/build/src/runtime/store/SpacesSdk.js +185 -0
  226. package/build/src/runtime/store/SpacesSdk.js.map +1 -0
  227. package/build/src/runtime/store/StoreSdkNode.d.ts +10 -0
  228. package/build/src/runtime/store/StoreSdkNode.js +11 -0
  229. package/build/src/runtime/store/StoreSdkNode.js.map +1 -0
  230. package/build/src/runtime/store/StoreSdkWeb.d.ts +10 -0
  231. package/build/src/runtime/store/StoreSdkWeb.js +11 -0
  232. package/build/src/runtime/store/StoreSdkWeb.js.map +1 -0
  233. package/build/src/runtime/store/UsersSdk.d.ts +18 -0
  234. package/build/src/runtime/store/UsersSdk.js +88 -0
  235. package/build/src/runtime/store/UsersSdk.js.map +1 -0
  236. package/build/src/runtime/store/WsClient.d.ts +24 -0
  237. package/build/src/runtime/store/WsClient.js +4 -0
  238. package/build/src/runtime/store/WsClient.js.map +1 -0
  239. package/build/src/runtime/store/WsClientNode.d.ts +24 -0
  240. package/build/src/runtime/store/WsClientNode.js +66 -0
  241. package/build/src/runtime/store/WsClientNode.js.map +1 -0
  242. package/build/src/runtime/store/WsClientWeb.d.ts +23 -0
  243. package/build/src/runtime/store/WsClientWeb.js +73 -0
  244. package/build/src/runtime/store/WsClientWeb.js.map +1 -0
  245. package/package.json +6 -8
  246. package/readme.md +5 -5
  247. package/src/data/JmesparthReader.ts +1 -1
  248. package/src/events/models/ProjectEvents.ts +2 -2
  249. package/src/events/readme.md +1 -1
  250. package/src/lib/transformers/PayloadSerializer.ts +3 -3
  251. package/src/mocking/ProjectMock.ts +9 -1
  252. package/src/mocking/lib/History.ts +179 -0
  253. package/src/mocking/lib/Request.ts +5 -5
  254. package/src/mocking/lib/Response.ts +10 -10
  255. package/src/mocking/lib/User.ts +68 -0
  256. package/src/models/AuthorizationData.ts +2 -2
  257. package/src/models/Backend.ts +93 -0
  258. package/src/models/ClientCertificate.ts +1 -1
  259. package/src/models/Environment.ts +4 -4
  260. package/src/models/ErrorResponse.ts +1 -1
  261. package/src/models/HostRule.ts +5 -5
  262. package/src/models/HttpHistory.ts +89 -27
  263. package/src/models/HttpProject.ts +5 -6
  264. package/src/models/HttpProjectListItem.ts +1 -1
  265. package/src/models/HttpRequest.ts +2 -2
  266. package/src/models/HttpResponse.ts +3 -3
  267. package/src/models/License.ts +4 -4
  268. package/src/models/ProjectFolder.ts +3 -3
  269. package/src/models/ProjectItem.ts +2 -2
  270. package/src/models/ProjectRequest.ts +2 -2
  271. package/src/models/ProjectSchema.ts +2 -2
  272. package/src/models/Property.ts +5 -5
  273. package/src/models/Provider.ts +4 -4
  274. package/src/models/README.md +2 -2
  275. package/src/models/Request.ts +4 -4
  276. package/src/models/RequestActions.ts +2 -4
  277. package/src/models/RequestAuthorization.ts +3 -5
  278. package/src/models/RequestConfig.ts +3 -5
  279. package/src/models/RequestLog.ts +25 -11
  280. package/src/models/RequestTime.ts +4 -6
  281. package/src/models/RequestUiMeta.ts +5 -5
  282. package/src/models/RequestsSize.ts +1 -3
  283. package/src/models/{ArcResponse.ts → Response.ts} +12 -14
  284. package/src/models/ResponseAuthorization.ts +4 -4
  285. package/src/models/ResponseRedirect.ts +3 -5
  286. package/src/models/RevisionInfo.ts +1 -1
  287. package/src/models/SentRequest.ts +2 -4
  288. package/src/models/Server.ts +4 -4
  289. package/src/models/Thing.ts +4 -4
  290. package/src/models/Url.ts +2 -4
  291. package/src/models/User.ts +2 -1
  292. package/src/models/WebApi.ts +1 -1
  293. package/src/models/WebApiIndex.ts +1 -1
  294. package/src/models/Workspace.ts +5 -5
  295. package/src/models/actions/Action.ts +2 -2
  296. package/src/models/actions/Condition.ts +2 -2
  297. package/src/models/actions/RunnableAction.ts +1 -1
  298. package/src/models/actions/runnable/DeleteCookieAction.ts +2 -2
  299. package/src/models/actions/runnable/SetCookieAction.ts +2 -2
  300. package/src/models/actions/runnable/SetVariableAction.ts +2 -2
  301. package/src/models/transformers/ImportUtils.ts +1 -1
  302. package/src/models/transformers/PostmanBackupTransformer.ts +2 -1
  303. package/src/models/transformers/PostmanV21Transformer.ts +2 -1
  304. package/src/models/transformers/PostmanV2Transformer.ts +2 -1
  305. package/src/runtime/actions/RunnableCondition.ts +6 -7
  306. package/src/runtime/http-engine/{ArcEngine.ts → CoreEngine.ts} +7 -7
  307. package/src/runtime/http-engine/HttpEngine.ts +5 -24
  308. package/src/runtime/modules/BasicAuthCache.ts +2 -6
  309. package/src/runtime/modules/RequestCookies.ts +6 -5
  310. package/src/runtime/node/InteropInterfaces.ts +121 -0
  311. package/src/runtime/node/ProjectParallelRunner.ts +2 -9
  312. package/src/runtime/node/ProjectRequestRunner.ts +42 -61
  313. package/src/runtime/node/ProjectRunner.ts +1 -60
  314. package/src/runtime/node/ProjectRunnerWorker.ts +2 -1
  315. package/src/runtime/node/RequestFactory.ts +3 -3
  316. package/src/runtime/reporters/ProjectRunCliReporter.ts +2 -2
  317. package/src/runtime/reporters/Reporter.ts +4 -4
  318. package/src/runtime/store/AuthSdk.ts +126 -0
  319. package/src/runtime/store/BackendSdk.ts +25 -0
  320. package/src/runtime/store/HistorySdk.ts +157 -0
  321. package/src/runtime/store/Http.ts +18 -0
  322. package/src/runtime/store/HttpNode.ts +100 -0
  323. package/src/runtime/store/HttpWeb.ts +89 -0
  324. package/src/runtime/store/ProjectsSdk.ts +147 -0
  325. package/src/runtime/store/RouteBuilder.ts +89 -0
  326. package/src/runtime/store/Sdk.ts +131 -0
  327. package/src/runtime/store/SdkBase.ts +72 -0
  328. package/src/runtime/store/SpacesSdk.ts +190 -0
  329. package/src/runtime/store/StoreSdkNode.ts +13 -0
  330. package/src/runtime/store/StoreSdkWeb.ts +13 -0
  331. package/src/runtime/store/UsersSdk.ts +89 -0
  332. package/src/runtime/store/WsClient.ts +28 -0
  333. package/src/runtime/store/WsClientNode.ts +68 -0
  334. package/src/runtime/store/WsClientWeb.ts +75 -0
  335. package/build/src/models/ArcResponse.js.map +0 -1
  336. package/build/src/models/HistoryIndex.d.ts +0 -43
  337. package/build/src/models/HistoryIndex.js +0 -53
  338. package/build/src/models/HistoryIndex.js.map +0 -1
  339. package/build/src/models/HistoryRequest.d.ts +0 -13
  340. package/build/src/models/HistoryRequest.js +0 -25
  341. package/build/src/models/HistoryRequest.js.map +0 -1
  342. package/build/src/runtime/http-engine/ArcEngine.js.map +0 -1
  343. package/build/src/runtime/http-engine/NodeEngine.d.ts +0 -154
  344. package/build/src/runtime/http-engine/NodeEngine.js +0 -766
  345. package/build/src/runtime/http-engine/NodeEngine.js.map +0 -1
  346. package/build/src/runtime/http-engine/NodeEngineDirect.d.ts +0 -113
  347. package/build/src/runtime/http-engine/NodeEngineDirect.js +0 -449
  348. package/build/src/runtime/http-engine/NodeEngineDirect.js.map +0 -1
  349. package/build/src/runtime/store/StoreSdk.d.ts +0 -279
  350. package/build/src/runtime/store/StoreSdk.js +0 -840
  351. package/build/src/runtime/store/StoreSdk.js.map +0 -1
  352. package/src/models/HistoryIndex.ts +0 -76
  353. package/src/models/HistoryRequest.ts +0 -28
  354. package/src/runtime/http-engine/NodeEngine.ts +0 -792
  355. package/src/runtime/http-engine/NodeEngineDirect.ts +0 -482
  356. 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 = 'ARC#HttpHistory';
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 application code. The same as used in `Application#code`.
11
- * Optional.
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
- app?: string;
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
- * The user project the request belongs to.
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
- * The optional user id that made that request.
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?: string;
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 application code. The same as used in `Application#code`.
56
- * Optional.
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
- app?: string;
97
+ key?: string;
59
98
  /**
60
- * The user project the request belongs to.
61
- * Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
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
- * The optional user id that made that request.
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
- user?: string;
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, app, project, request, user } = init;
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 (midnight) {
143
- this.midnight = midnight;
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 = undefined;
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.app) {
175
- result.app = this.app;
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.user) {
184
- result.user = this.user;
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 type HttpProjectKind = 'ARC#HttpProject';
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 ARC.
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: HttpProjectKind;
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 ARC project.
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 an ARC project.`);
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,4 +1,4 @@
1
- export const Kind = 'ARC#HttpProjectListItem';
1
+ export const Kind = 'Core#HttpProjectListItem';
2
2
  /**
3
3
  * The HTTP Project definition to be used in lists.
4
4
  */
@@ -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 = 'ARC#HttpRequest';
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 an ARC request.
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 = 'ARC#HttpResponse';
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 an ARC response.
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 an ARC response.`);
98
+ throw new Error(`Not a response.`);
99
99
  }
100
100
  const { status, statusText, headers, payload, kind=Kind } = init;
101
101
  this.kind = kind;
@@ -1,7 +1,7 @@
1
- export const Kind = 'ARC#License';
1
+ export const Kind = 'Core#License';
2
2
 
3
3
  export interface ILicense {
4
- kind: 'ARC#License'
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 an ARC license object.
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 an ARC license.`);
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 = 'ARC#ProjectFolder';
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 an ARC project folder.
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 an ARC project folder.`);
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 an ARC project item.
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 an ARC project item.`);
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 = 'ARC#ProjectRequest';
9
+ export const Kind = 'Core#ProjectRequest';
10
10
 
11
11
  export interface IProjectRequest extends IProjectDefinitionProperty, IRequest {
12
- kind: 'ARC#ProjectRequest';
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 = 'ARC#ProjectSchema';
3
+ export const Kind = 'Core#ProjectSchema';
4
4
 
5
5
  export interface IProjectSchema {
6
- kind?: 'ARC#ProjectSchema';
6
+ kind?: typeof Kind;
7
7
  /**
8
8
  * The identifier of the environment.
9
9
  */
@@ -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: 'ARC#Property';
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 = 'ARC#Property';
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 environment clearing anything that is so far defined.
361
+ * Creates a new property.
362
362
  *
363
- * Note, this throws an error when the property is not an ARC environment.
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 an ARC property.`);
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;
@@ -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: 'ARC#Provider';
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 = 'ARC#Provider';
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 an ARC provider object.
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 an ARC provider.`);
63
+ throw new Error(`Not a provider.`);
64
64
  }
65
65
  const { url, email, name } = init;
66
66
  this.kind = Kind;
@@ -1,4 +1,4 @@
1
- # API Client/ARC models
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 `ARC#HttpProject`. These kinds are used by other libraries to identify which data types they are given as the input.
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
 
@@ -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 { ArcResponse } from './ArcResponse.js';
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 = 'ARC#Request';
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 ARC
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 ArcResponse.fromLegacy(typedResponse);
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 provider definition used to restore the state.
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 provider clearing anything that is so far defined.
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 = 'ARC#RequestAuthorization';
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: string;
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 provider clearing anything that is so far defined.
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 = 'ARC#RequestConfig';
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
- * ARC request `config` object.
65
+ * API Client request `config` object.
66
66
  */
67
67
  export interface IRequestConfig extends IRequestBaseConfig {
68
- kind: string;
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 {