windmill-client 0.3.14 → 1.145.2

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 (585) hide show
  1. package/package.json +1 -1
  2. package/dist/client.d.ts +0 -77
  3. package/dist/client.js +0 -301
  4. package/dist/core/ApiError.d.ts +0 -10
  5. package/dist/core/ApiError.js +0 -11
  6. package/dist/core/ApiRequestOptions.d.ts +0 -13
  7. package/dist/core/ApiRequestOptions.js +0 -1
  8. package/dist/core/ApiResult.d.ts +0 -7
  9. package/dist/core/ApiResult.js +0 -1
  10. package/dist/core/CancelablePromise.d.ts +0 -20
  11. package/dist/core/CancelablePromise.js +0 -108
  12. package/dist/core/OpenAPI.d.ts +0 -16
  13. package/dist/core/OpenAPI.js +0 -11
  14. package/dist/core/request.d.ts +0 -26
  15. package/dist/core/request.js +0 -274
  16. package/dist/index.d.ts +0 -143
  17. package/dist/index.js +0 -46
  18. package/dist/models/AccountId.d.ts +0 -1
  19. package/dist/models/AccountId.js +0 -5
  20. package/dist/models/ActionKind.d.ts +0 -9
  21. package/dist/models/ActionKind.js +0 -14
  22. package/dist/models/After.d.ts +0 -4
  23. package/dist/models/After.js +0 -5
  24. package/dist/models/AppWithLastVersion.d.ts +0 -21
  25. package/dist/models/AppWithLastVersion.js +0 -13
  26. package/dist/models/AppWithLastVersionWDraft.d.ts +0 -5
  27. package/dist/models/AppWithLastVersionWDraft.js +0 -5
  28. package/dist/models/ArgsFilter.d.ts +0 -4
  29. package/dist/models/ArgsFilter.js +0 -5
  30. package/dist/models/AuditLog.d.ts +0 -32
  31. package/dist/models/AuditLog.js +0 -30
  32. package/dist/models/Before.d.ts +0 -4
  33. package/dist/models/Before.js +0 -5
  34. package/dist/models/BranchAll.d.ts +0 -10
  35. package/dist/models/BranchAll.js +0 -5
  36. package/dist/models/BranchOne.d.ts +0 -10
  37. package/dist/models/BranchOne.js +0 -5
  38. package/dist/models/ClientName.d.ts +0 -1
  39. package/dist/models/ClientName.js +0 -5
  40. package/dist/models/CompletedJob.d.ts +0 -61
  41. package/dist/models/CompletedJob.js +0 -28
  42. package/dist/models/ContextualVariable.d.ts +0 -5
  43. package/dist/models/ContextualVariable.js +0 -5
  44. package/dist/models/CreateInput.d.ts +0 -4
  45. package/dist/models/CreateInput.js +0 -5
  46. package/dist/models/CreateResource.d.ts +0 -6
  47. package/dist/models/CreateResource.js +0 -5
  48. package/dist/models/CreateVariable.d.ts +0 -8
  49. package/dist/models/CreateVariable.js +0 -5
  50. package/dist/models/CreateWorkspace.d.ts +0 -5
  51. package/dist/models/CreateWorkspace.js +0 -5
  52. package/dist/models/CreatedBy.d.ts +0 -4
  53. package/dist/models/CreatedBy.js +0 -5
  54. package/dist/models/EditResource.d.ts +0 -5
  55. package/dist/models/EditResource.js +0 -5
  56. package/dist/models/EditResourceType.d.ts +0 -4
  57. package/dist/models/EditResourceType.js +0 -5
  58. package/dist/models/EditSchedule.d.ts +0 -7
  59. package/dist/models/EditSchedule.js +0 -5
  60. package/dist/models/EditVariable.d.ts +0 -6
  61. package/dist/models/EditVariable.js +0 -5
  62. package/dist/models/EditWorkspaceUser.d.ts +0 -5
  63. package/dist/models/EditWorkspaceUser.js +0 -5
  64. package/dist/models/Flow.d.ts +0 -3
  65. package/dist/models/Flow.js +0 -5
  66. package/dist/models/FlowMetadata.d.ts +0 -11
  67. package/dist/models/FlowMetadata.js +0 -5
  68. package/dist/models/FlowModule.d.ts +0 -26
  69. package/dist/models/FlowModule.js +0 -5
  70. package/dist/models/FlowModuleValue.d.ts +0 -10
  71. package/dist/models/FlowModuleValue.js +0 -5
  72. package/dist/models/FlowPreview.d.ts +0 -7
  73. package/dist/models/FlowPreview.js +0 -5
  74. package/dist/models/FlowStatus.d.ts +0 -12
  75. package/dist/models/FlowStatus.js +0 -5
  76. package/dist/models/FlowStatusModule.d.ts +0 -34
  77. package/dist/models/FlowStatusModule.js +0 -16
  78. package/dist/models/FlowValue.d.ts +0 -6
  79. package/dist/models/FlowValue.js +0 -5
  80. package/dist/models/Folder.d.ts +0 -5
  81. package/dist/models/Folder.js +0 -5
  82. package/dist/models/ForloopFlow.d.ts +0 -9
  83. package/dist/models/ForloopFlow.js +0 -5
  84. package/dist/models/GlobalUserInfo.d.ts +0 -14
  85. package/dist/models/GlobalUserInfo.js +0 -12
  86. package/dist/models/Graphql.d.ts +0 -3
  87. package/dist/models/Graphql.js +0 -5
  88. package/dist/models/Group.d.ts +0 -6
  89. package/dist/models/Group.js +0 -5
  90. package/dist/models/Http.d.ts +0 -3
  91. package/dist/models/Http.js +0 -5
  92. package/dist/models/Identity.d.ts +0 -4
  93. package/dist/models/Identity.js +0 -5
  94. package/dist/models/IncludeHeader.d.ts +0 -6
  95. package/dist/models/IncludeHeader.js +0 -5
  96. package/dist/models/Input.d.ts +0 -8
  97. package/dist/models/Input.js +0 -5
  98. package/dist/models/InputId.d.ts +0 -1
  99. package/dist/models/InputId.js +0 -5
  100. package/dist/models/InputTransform.d.ts +0 -3
  101. package/dist/models/InputTransform.js +0 -5
  102. package/dist/models/JavascriptTransform.d.ts +0 -4
  103. package/dist/models/JavascriptTransform.js +0 -5
  104. package/dist/models/Job.d.ts +0 -11
  105. package/dist/models/Job.js +0 -12
  106. package/dist/models/JobId.d.ts +0 -1
  107. package/dist/models/JobId.js +0 -5
  108. package/dist/models/JobKinds.d.ts +0 -4
  109. package/dist/models/JobKinds.js +0 -5
  110. package/dist/models/ListableApp.d.ts +0 -18
  111. package/dist/models/ListableApp.js +0 -13
  112. package/dist/models/ListableRawApp.d.ts +0 -9
  113. package/dist/models/ListableRawApp.js +0 -5
  114. package/dist/models/ListableResource.d.ts +0 -14
  115. package/dist/models/ListableResource.js +0 -5
  116. package/dist/models/ListableVariable.d.ts +0 -14
  117. package/dist/models/ListableVariable.js +0 -5
  118. package/dist/models/Login.d.ts +0 -4
  119. package/dist/models/Login.js +0 -5
  120. package/dist/models/MainArgSignature.d.ts +0 -33
  121. package/dist/models/MainArgSignature.js +0 -12
  122. package/dist/models/Name.d.ts +0 -1
  123. package/dist/models/Name.js +0 -5
  124. package/dist/models/NewJobId.d.ts +0 -4
  125. package/dist/models/NewJobId.js +0 -5
  126. package/dist/models/NewSchedule.d.ts +0 -11
  127. package/dist/models/NewSchedule.js +0 -5
  128. package/dist/models/NewScript.d.ts +0 -33
  129. package/dist/models/NewScript.js +0 -25
  130. package/dist/models/NewScriptWithDraft.d.ts +0 -5
  131. package/dist/models/NewScriptWithDraft.js +0 -5
  132. package/dist/models/NewToken.d.ts +0 -5
  133. package/dist/models/NewToken.js +0 -5
  134. package/dist/models/NewTokenImpersonate.d.ts +0 -5
  135. package/dist/models/NewTokenImpersonate.js +0 -5
  136. package/dist/models/NewUser.d.ts +0 -5
  137. package/dist/models/NewUser.js +0 -5
  138. package/dist/models/OpenFlow.d.ts +0 -7
  139. package/dist/models/OpenFlow.js +0 -5
  140. package/dist/models/OpenFlowWPath.d.ts +0 -4
  141. package/dist/models/OpenFlowWPath.js +0 -5
  142. package/dist/models/Operation.d.ts +0 -4
  143. package/dist/models/Operation.js +0 -5
  144. package/dist/models/OrderDesc.d.ts +0 -4
  145. package/dist/models/OrderDesc.js +0 -5
  146. package/dist/models/Page.d.ts +0 -4
  147. package/dist/models/Page.js +0 -5
  148. package/dist/models/ParentJob.d.ts +0 -4
  149. package/dist/models/ParentJob.js +0 -5
  150. package/dist/models/Path.d.ts +0 -1
  151. package/dist/models/Path.js +0 -5
  152. package/dist/models/PathFlow.d.ts +0 -6
  153. package/dist/models/PathFlow.js +0 -5
  154. package/dist/models/PathId.d.ts +0 -1
  155. package/dist/models/PathId.js +0 -5
  156. package/dist/models/PathScript.d.ts +0 -7
  157. package/dist/models/PathScript.js +0 -5
  158. package/dist/models/Payload.d.ts +0 -6
  159. package/dist/models/Payload.js +0 -5
  160. package/dist/models/PerPage.d.ts +0 -4
  161. package/dist/models/PerPage.js +0 -5
  162. package/dist/models/Policy.d.ts +0 -13
  163. package/dist/models/Policy.js +0 -13
  164. package/dist/models/Preview.d.ts +0 -25
  165. package/dist/models/Preview.js +0 -23
  166. package/dist/models/QueueLimit.d.ts +0 -5
  167. package/dist/models/QueueLimit.js +0 -5
  168. package/dist/models/QueuedJob.d.ts +0 -59
  169. package/dist/models/QueuedJob.js +0 -28
  170. package/dist/models/RawScript.d.ts +0 -20
  171. package/dist/models/RawScript.js +0 -16
  172. package/dist/models/Resource.d.ts +0 -9
  173. package/dist/models/Resource.js +0 -5
  174. package/dist/models/ResourceName.d.ts +0 -4
  175. package/dist/models/ResourceName.js +0 -5
  176. package/dist/models/ResourceType.d.ts +0 -6
  177. package/dist/models/ResourceType.js +0 -5
  178. package/dist/models/ResultFilter.d.ts +0 -4
  179. package/dist/models/ResultFilter.js +0 -5
  180. package/dist/models/Retry.d.ts +0 -11
  181. package/dist/models/Retry.js +0 -5
  182. package/dist/models/RunnableId.d.ts +0 -1
  183. package/dist/models/RunnableId.js +0 -5
  184. package/dist/models/RunnableType.d.ts +0 -5
  185. package/dist/models/RunnableType.js +0 -10
  186. package/dist/models/RunnableTypeQuery.d.ts +0 -2
  187. package/dist/models/RunnableTypeQuery.js +0 -5
  188. package/dist/models/Running.d.ts +0 -4
  189. package/dist/models/Running.js +0 -5
  190. package/dist/models/Schedule.d.ts +0 -16
  191. package/dist/models/Schedule.js +0 -5
  192. package/dist/models/SchedulePath.d.ts +0 -4
  193. package/dist/models/SchedulePath.js +0 -5
  194. package/dist/models/ScheduleWJobs.d.ts +0 -8
  195. package/dist/models/ScheduleWJobs.js +0 -5
  196. package/dist/models/Script.d.ts +0 -47
  197. package/dist/models/Script.js +0 -25
  198. package/dist/models/ScriptArgs.d.ts +0 -1
  199. package/dist/models/ScriptArgs.js +0 -5
  200. package/dist/models/ScriptExactHash.d.ts +0 -4
  201. package/dist/models/ScriptExactHash.js +0 -5
  202. package/dist/models/ScriptExactPath.d.ts +0 -4
  203. package/dist/models/ScriptExactPath.js +0 -5
  204. package/dist/models/ScriptHash.d.ts +0 -1
  205. package/dist/models/ScriptHash.js +0 -5
  206. package/dist/models/ScriptPath.d.ts +0 -1
  207. package/dist/models/ScriptPath.js +0 -5
  208. package/dist/models/ScriptStartPath.d.ts +0 -4
  209. package/dist/models/ScriptStartPath.js +0 -5
  210. package/dist/models/SlackToken.d.ts +0 -8
  211. package/dist/models/SlackToken.js +0 -5
  212. package/dist/models/StartedAfter.d.ts +0 -4
  213. package/dist/models/StartedAfter.js +0 -5
  214. package/dist/models/StartedBefore.d.ts +0 -4
  215. package/dist/models/StartedBefore.js +0 -5
  216. package/dist/models/StaticTransform.d.ts +0 -4
  217. package/dist/models/StaticTransform.js +0 -5
  218. package/dist/models/Success.d.ts +0 -4
  219. package/dist/models/Success.js +0 -5
  220. package/dist/models/Suspended.d.ts +0 -4
  221. package/dist/models/Suspended.js +0 -5
  222. package/dist/models/Tag.d.ts +0 -4
  223. package/dist/models/Tag.js +0 -5
  224. package/dist/models/Token.d.ts +0 -1
  225. package/dist/models/Token.js +0 -5
  226. package/dist/models/TokenResponse.d.ts +0 -6
  227. package/dist/models/TokenResponse.js +0 -5
  228. package/dist/models/TruncatedToken.d.ts +0 -8
  229. package/dist/models/TruncatedToken.js +0 -5
  230. package/dist/models/UpdateInput.d.ts +0 -5
  231. package/dist/models/UpdateInput.js +0 -5
  232. package/dist/models/Usage.d.ts +0 -3
  233. package/dist/models/Usage.js +0 -5
  234. package/dist/models/User.d.ts +0 -14
  235. package/dist/models/User.js +0 -5
  236. package/dist/models/UserWorkspaceList.d.ts +0 -8
  237. package/dist/models/UserWorkspaceList.js +0 -5
  238. package/dist/models/Username.d.ts +0 -4
  239. package/dist/models/Username.js +0 -5
  240. package/dist/models/VersionId.d.ts +0 -1
  241. package/dist/models/VersionId.js +0 -5
  242. package/dist/models/WorkerPing.d.ts +0 -8
  243. package/dist/models/WorkerPing.js +0 -5
  244. package/dist/models/Workspace.d.ts +0 -6
  245. package/dist/models/Workspace.js +0 -5
  246. package/dist/models/WorkspaceId.d.ts +0 -1
  247. package/dist/models/WorkspaceId.js +0 -5
  248. package/dist/models/WorkspaceInvite.d.ts +0 -6
  249. package/dist/models/WorkspaceInvite.js +0 -5
  250. package/dist/services/AdminService.d.ts +0 -39
  251. package/dist/services/AdminService.js +0 -52
  252. package/dist/services/AppService.d.ts +0 -195
  253. package/dist/services/AppService.js +0 -207
  254. package/dist/services/AuditService.d.ts +0 -53
  255. package/dist/services/AuditService.js +0 -43
  256. package/dist/services/CaptureService.d.ts +0 -30
  257. package/dist/services/CaptureService.js +0 -52
  258. package/dist/services/DraftService.d.ts +0 -26
  259. package/dist/services/DraftService.js +0 -36
  260. package/dist/services/FavoriteService.d.ts +0 -27
  261. package/dist/services/FavoriteService.js +0 -36
  262. package/dist/services/FlowService.d.ts +0 -186
  263. package/dist/services/FlowService.js +0 -196
  264. package/dist/services/FolderService.d.ts +0 -128
  265. package/dist/services/FolderService.js +0 -151
  266. package/dist/services/GranularAclService.d.ts +0 -46
  267. package/dist/services/GranularAclService.js +0 -56
  268. package/dist/services/GroupService.d.ts +0 -110
  269. package/dist/services/GroupService.js +0 -136
  270. package/dist/services/InputService.d.ts +0 -78
  271. package/dist/services/InputService.js +0 -95
  272. package/dist/services/JobService.d.ts +0 -761
  273. package/dist/services/JobService.js +0 -646
  274. package/dist/services/OauthService.d.ts +0 -95
  275. package/dist/services/OauthService.js +0 -120
  276. package/dist/services/RawAppService.d.ts +0 -103
  277. package/dist/services/RawAppService.js +0 -106
  278. package/dist/services/ResourceService.d.ts +0 -178
  279. package/dist/services/ResourceService.js +0 -243
  280. package/dist/services/ScheduleService.d.ts +0 -120
  281. package/dist/services/ScheduleService.js +0 -148
  282. package/dist/services/ScriptService.d.ts +0 -258
  283. package/dist/services/ScriptService.js +0 -283
  284. package/dist/services/SettingsService.d.ts +0 -27
  285. package/dist/services/SettingsService.js +0 -48
  286. package/dist/services/UserService.d.ts +0 -306
  287. package/dist/services/UserService.js +0 -397
  288. package/dist/services/VariableService.d.ts +0 -95
  289. package/dist/services/VariableService.js +0 -135
  290. package/dist/services/WorkerService.d.ts +0 -25
  291. package/dist/services/WorkerService.js +0 -30
  292. package/dist/services/WorkspaceService.d.ts +0 -249
  293. package/dist/services/WorkspaceService.js +0 -301
  294. package/dist/src/client.d.ts +0 -77
  295. package/dist/src/client.js +0 -301
  296. package/dist/src/core/ApiError.d.ts +0 -10
  297. package/dist/src/core/ApiError.js +0 -11
  298. package/dist/src/core/ApiRequestOptions.d.ts +0 -13
  299. package/dist/src/core/ApiRequestOptions.js +0 -1
  300. package/dist/src/core/ApiResult.d.ts +0 -7
  301. package/dist/src/core/ApiResult.js +0 -1
  302. package/dist/src/core/CancelablePromise.d.ts +0 -20
  303. package/dist/src/core/CancelablePromise.js +0 -108
  304. package/dist/src/core/OpenAPI.d.ts +0 -16
  305. package/dist/src/core/OpenAPI.js +0 -11
  306. package/dist/src/core/request.d.ts +0 -30
  307. package/dist/src/core/request.js +0 -274
  308. package/dist/src/index.d.ts +0 -143
  309. package/dist/src/index.js +0 -46
  310. package/dist/src/models/AccountId.d.ts +0 -1
  311. package/dist/src/models/AccountId.js +0 -5
  312. package/dist/src/models/ActionKind.d.ts +0 -9
  313. package/dist/src/models/ActionKind.js +0 -14
  314. package/dist/src/models/After.d.ts +0 -4
  315. package/dist/src/models/After.js +0 -5
  316. package/dist/src/models/AppWithLastVersion.d.ts +0 -21
  317. package/dist/src/models/AppWithLastVersion.js +0 -13
  318. package/dist/src/models/AppWithLastVersionWDraft.d.ts +0 -5
  319. package/dist/src/models/AppWithLastVersionWDraft.js +0 -5
  320. package/dist/src/models/ArgsFilter.d.ts +0 -4
  321. package/dist/src/models/ArgsFilter.js +0 -5
  322. package/dist/src/models/AuditLog.d.ts +0 -32
  323. package/dist/src/models/AuditLog.js +0 -30
  324. package/dist/src/models/Before.d.ts +0 -4
  325. package/dist/src/models/Before.js +0 -5
  326. package/dist/src/models/BranchAll.d.ts +0 -10
  327. package/dist/src/models/BranchAll.js +0 -5
  328. package/dist/src/models/BranchOne.d.ts +0 -10
  329. package/dist/src/models/BranchOne.js +0 -5
  330. package/dist/src/models/ClientName.d.ts +0 -1
  331. package/dist/src/models/ClientName.js +0 -5
  332. package/dist/src/models/CompletedJob.d.ts +0 -61
  333. package/dist/src/models/CompletedJob.js +0 -28
  334. package/dist/src/models/ContextualVariable.d.ts +0 -5
  335. package/dist/src/models/ContextualVariable.js +0 -5
  336. package/dist/src/models/CreateInput.d.ts +0 -4
  337. package/dist/src/models/CreateInput.js +0 -5
  338. package/dist/src/models/CreateResource.d.ts +0 -6
  339. package/dist/src/models/CreateResource.js +0 -5
  340. package/dist/src/models/CreateVariable.d.ts +0 -8
  341. package/dist/src/models/CreateVariable.js +0 -5
  342. package/dist/src/models/CreateWorkspace.d.ts +0 -5
  343. package/dist/src/models/CreateWorkspace.js +0 -5
  344. package/dist/src/models/CreatedBy.d.ts +0 -4
  345. package/dist/src/models/CreatedBy.js +0 -5
  346. package/dist/src/models/EditResource.d.ts +0 -5
  347. package/dist/src/models/EditResource.js +0 -5
  348. package/dist/src/models/EditResourceType.d.ts +0 -4
  349. package/dist/src/models/EditResourceType.js +0 -5
  350. package/dist/src/models/EditSchedule.d.ts +0 -7
  351. package/dist/src/models/EditSchedule.js +0 -5
  352. package/dist/src/models/EditVariable.d.ts +0 -6
  353. package/dist/src/models/EditVariable.js +0 -5
  354. package/dist/src/models/EditWorkspaceUser.d.ts +0 -5
  355. package/dist/src/models/EditWorkspaceUser.js +0 -5
  356. package/dist/src/models/Flow.d.ts +0 -3
  357. package/dist/src/models/Flow.js +0 -5
  358. package/dist/src/models/FlowMetadata.d.ts +0 -11
  359. package/dist/src/models/FlowMetadata.js +0 -5
  360. package/dist/src/models/FlowModule.d.ts +0 -26
  361. package/dist/src/models/FlowModule.js +0 -5
  362. package/dist/src/models/FlowModuleValue.d.ts +0 -10
  363. package/dist/src/models/FlowModuleValue.js +0 -5
  364. package/dist/src/models/FlowPreview.d.ts +0 -7
  365. package/dist/src/models/FlowPreview.js +0 -5
  366. package/dist/src/models/FlowStatus.d.ts +0 -12
  367. package/dist/src/models/FlowStatus.js +0 -5
  368. package/dist/src/models/FlowStatusModule.d.ts +0 -34
  369. package/dist/src/models/FlowStatusModule.js +0 -16
  370. package/dist/src/models/FlowValue.d.ts +0 -6
  371. package/dist/src/models/FlowValue.js +0 -5
  372. package/dist/src/models/Folder.d.ts +0 -5
  373. package/dist/src/models/Folder.js +0 -5
  374. package/dist/src/models/ForloopFlow.d.ts +0 -9
  375. package/dist/src/models/ForloopFlow.js +0 -5
  376. package/dist/src/models/GlobalUserInfo.d.ts +0 -14
  377. package/dist/src/models/GlobalUserInfo.js +0 -12
  378. package/dist/src/models/Graphql.d.ts +0 -3
  379. package/dist/src/models/Graphql.js +0 -5
  380. package/dist/src/models/Group.d.ts +0 -6
  381. package/dist/src/models/Group.js +0 -5
  382. package/dist/src/models/Http.d.ts +0 -3
  383. package/dist/src/models/Http.js +0 -5
  384. package/dist/src/models/Identity.d.ts +0 -4
  385. package/dist/src/models/Identity.js +0 -5
  386. package/dist/src/models/IncludeHeader.d.ts +0 -6
  387. package/dist/src/models/IncludeHeader.js +0 -5
  388. package/dist/src/models/Input.d.ts +0 -8
  389. package/dist/src/models/Input.js +0 -5
  390. package/dist/src/models/InputId.d.ts +0 -1
  391. package/dist/src/models/InputId.js +0 -5
  392. package/dist/src/models/InputTransform.d.ts +0 -3
  393. package/dist/src/models/InputTransform.js +0 -5
  394. package/dist/src/models/JavascriptTransform.d.ts +0 -4
  395. package/dist/src/models/JavascriptTransform.js +0 -5
  396. package/dist/src/models/Job.d.ts +0 -11
  397. package/dist/src/models/Job.js +0 -12
  398. package/dist/src/models/JobId.d.ts +0 -1
  399. package/dist/src/models/JobId.js +0 -5
  400. package/dist/src/models/JobKinds.d.ts +0 -4
  401. package/dist/src/models/JobKinds.js +0 -5
  402. package/dist/src/models/ListableApp.d.ts +0 -18
  403. package/dist/src/models/ListableApp.js +0 -13
  404. package/dist/src/models/ListableRawApp.d.ts +0 -9
  405. package/dist/src/models/ListableRawApp.js +0 -5
  406. package/dist/src/models/ListableResource.d.ts +0 -14
  407. package/dist/src/models/ListableResource.js +0 -5
  408. package/dist/src/models/ListableVariable.d.ts +0 -14
  409. package/dist/src/models/ListableVariable.js +0 -5
  410. package/dist/src/models/Login.d.ts +0 -4
  411. package/dist/src/models/Login.js +0 -5
  412. package/dist/src/models/MainArgSignature.d.ts +0 -33
  413. package/dist/src/models/MainArgSignature.js +0 -12
  414. package/dist/src/models/Name.d.ts +0 -1
  415. package/dist/src/models/Name.js +0 -5
  416. package/dist/src/models/NewJobId.d.ts +0 -4
  417. package/dist/src/models/NewJobId.js +0 -5
  418. package/dist/src/models/NewSchedule.d.ts +0 -11
  419. package/dist/src/models/NewSchedule.js +0 -5
  420. package/dist/src/models/NewScript.d.ts +0 -33
  421. package/dist/src/models/NewScript.js +0 -25
  422. package/dist/src/models/NewScriptWithDraft.d.ts +0 -5
  423. package/dist/src/models/NewScriptWithDraft.js +0 -5
  424. package/dist/src/models/NewToken.d.ts +0 -5
  425. package/dist/src/models/NewToken.js +0 -5
  426. package/dist/src/models/NewTokenImpersonate.d.ts +0 -5
  427. package/dist/src/models/NewTokenImpersonate.js +0 -5
  428. package/dist/src/models/NewUser.d.ts +0 -5
  429. package/dist/src/models/NewUser.js +0 -5
  430. package/dist/src/models/OpenFlow.d.ts +0 -7
  431. package/dist/src/models/OpenFlow.js +0 -5
  432. package/dist/src/models/OpenFlowWPath.d.ts +0 -4
  433. package/dist/src/models/OpenFlowWPath.js +0 -5
  434. package/dist/src/models/Operation.d.ts +0 -4
  435. package/dist/src/models/Operation.js +0 -5
  436. package/dist/src/models/OrderDesc.d.ts +0 -4
  437. package/dist/src/models/OrderDesc.js +0 -5
  438. package/dist/src/models/Page.d.ts +0 -4
  439. package/dist/src/models/Page.js +0 -5
  440. package/dist/src/models/ParentJob.d.ts +0 -4
  441. package/dist/src/models/ParentJob.js +0 -5
  442. package/dist/src/models/Path.d.ts +0 -1
  443. package/dist/src/models/Path.js +0 -5
  444. package/dist/src/models/PathFlow.d.ts +0 -6
  445. package/dist/src/models/PathFlow.js +0 -5
  446. package/dist/src/models/PathId.d.ts +0 -1
  447. package/dist/src/models/PathId.js +0 -5
  448. package/dist/src/models/PathScript.d.ts +0 -7
  449. package/dist/src/models/PathScript.js +0 -5
  450. package/dist/src/models/Payload.d.ts +0 -6
  451. package/dist/src/models/Payload.js +0 -5
  452. package/dist/src/models/PerPage.d.ts +0 -4
  453. package/dist/src/models/PerPage.js +0 -5
  454. package/dist/src/models/Policy.d.ts +0 -13
  455. package/dist/src/models/Policy.js +0 -13
  456. package/dist/src/models/Preview.d.ts +0 -25
  457. package/dist/src/models/Preview.js +0 -23
  458. package/dist/src/models/QueueLimit.d.ts +0 -5
  459. package/dist/src/models/QueueLimit.js +0 -5
  460. package/dist/src/models/QueuedJob.d.ts +0 -59
  461. package/dist/src/models/QueuedJob.js +0 -28
  462. package/dist/src/models/RawScript.d.ts +0 -20
  463. package/dist/src/models/RawScript.js +0 -16
  464. package/dist/src/models/Resource.d.ts +0 -9
  465. package/dist/src/models/Resource.js +0 -5
  466. package/dist/src/models/ResourceName.d.ts +0 -4
  467. package/dist/src/models/ResourceName.js +0 -5
  468. package/dist/src/models/ResourceType.d.ts +0 -6
  469. package/dist/src/models/ResourceType.js +0 -5
  470. package/dist/src/models/ResultFilter.d.ts +0 -4
  471. package/dist/src/models/ResultFilter.js +0 -5
  472. package/dist/src/models/Retry.d.ts +0 -11
  473. package/dist/src/models/Retry.js +0 -5
  474. package/dist/src/models/RunnableId.d.ts +0 -1
  475. package/dist/src/models/RunnableId.js +0 -5
  476. package/dist/src/models/RunnableType.d.ts +0 -5
  477. package/dist/src/models/RunnableType.js +0 -10
  478. package/dist/src/models/RunnableTypeQuery.d.ts +0 -2
  479. package/dist/src/models/RunnableTypeQuery.js +0 -5
  480. package/dist/src/models/Running.d.ts +0 -4
  481. package/dist/src/models/Running.js +0 -5
  482. package/dist/src/models/Schedule.d.ts +0 -16
  483. package/dist/src/models/Schedule.js +0 -5
  484. package/dist/src/models/SchedulePath.d.ts +0 -4
  485. package/dist/src/models/SchedulePath.js +0 -5
  486. package/dist/src/models/ScheduleWJobs.d.ts +0 -8
  487. package/dist/src/models/ScheduleWJobs.js +0 -5
  488. package/dist/src/models/Script.d.ts +0 -47
  489. package/dist/src/models/Script.js +0 -25
  490. package/dist/src/models/ScriptArgs.d.ts +0 -1
  491. package/dist/src/models/ScriptArgs.js +0 -5
  492. package/dist/src/models/ScriptExactHash.d.ts +0 -4
  493. package/dist/src/models/ScriptExactHash.js +0 -5
  494. package/dist/src/models/ScriptExactPath.d.ts +0 -4
  495. package/dist/src/models/ScriptExactPath.js +0 -5
  496. package/dist/src/models/ScriptHash.d.ts +0 -1
  497. package/dist/src/models/ScriptHash.js +0 -5
  498. package/dist/src/models/ScriptPath.d.ts +0 -1
  499. package/dist/src/models/ScriptPath.js +0 -5
  500. package/dist/src/models/ScriptStartPath.d.ts +0 -4
  501. package/dist/src/models/ScriptStartPath.js +0 -5
  502. package/dist/src/models/SlackToken.d.ts +0 -8
  503. package/dist/src/models/SlackToken.js +0 -5
  504. package/dist/src/models/StartedAfter.d.ts +0 -4
  505. package/dist/src/models/StartedAfter.js +0 -5
  506. package/dist/src/models/StartedBefore.d.ts +0 -4
  507. package/dist/src/models/StartedBefore.js +0 -5
  508. package/dist/src/models/StaticTransform.d.ts +0 -4
  509. package/dist/src/models/StaticTransform.js +0 -5
  510. package/dist/src/models/Success.d.ts +0 -4
  511. package/dist/src/models/Success.js +0 -5
  512. package/dist/src/models/Suspended.d.ts +0 -4
  513. package/dist/src/models/Suspended.js +0 -5
  514. package/dist/src/models/Tag.d.ts +0 -4
  515. package/dist/src/models/Tag.js +0 -5
  516. package/dist/src/models/Token.d.ts +0 -1
  517. package/dist/src/models/Token.js +0 -5
  518. package/dist/src/models/TokenResponse.d.ts +0 -6
  519. package/dist/src/models/TokenResponse.js +0 -5
  520. package/dist/src/models/TruncatedToken.d.ts +0 -8
  521. package/dist/src/models/TruncatedToken.js +0 -5
  522. package/dist/src/models/UpdateInput.d.ts +0 -5
  523. package/dist/src/models/UpdateInput.js +0 -5
  524. package/dist/src/models/Usage.d.ts +0 -3
  525. package/dist/src/models/Usage.js +0 -5
  526. package/dist/src/models/User.d.ts +0 -14
  527. package/dist/src/models/User.js +0 -5
  528. package/dist/src/models/UserWorkspaceList.d.ts +0 -8
  529. package/dist/src/models/UserWorkspaceList.js +0 -5
  530. package/dist/src/models/Username.d.ts +0 -4
  531. package/dist/src/models/Username.js +0 -5
  532. package/dist/src/models/VersionId.d.ts +0 -1
  533. package/dist/src/models/VersionId.js +0 -5
  534. package/dist/src/models/WorkerPing.d.ts +0 -8
  535. package/dist/src/models/WorkerPing.js +0 -5
  536. package/dist/src/models/Workspace.d.ts +0 -6
  537. package/dist/src/models/Workspace.js +0 -5
  538. package/dist/src/models/WorkspaceId.d.ts +0 -1
  539. package/dist/src/models/WorkspaceId.js +0 -5
  540. package/dist/src/models/WorkspaceInvite.d.ts +0 -6
  541. package/dist/src/models/WorkspaceInvite.js +0 -5
  542. package/dist/src/services/AdminService.d.ts +0 -39
  543. package/dist/src/services/AdminService.js +0 -52
  544. package/dist/src/services/AppService.d.ts +0 -195
  545. package/dist/src/services/AppService.js +0 -207
  546. package/dist/src/services/AuditService.d.ts +0 -53
  547. package/dist/src/services/AuditService.js +0 -43
  548. package/dist/src/services/CaptureService.d.ts +0 -30
  549. package/dist/src/services/CaptureService.js +0 -52
  550. package/dist/src/services/DraftService.d.ts +0 -26
  551. package/dist/src/services/DraftService.js +0 -36
  552. package/dist/src/services/FavoriteService.d.ts +0 -27
  553. package/dist/src/services/FavoriteService.js +0 -36
  554. package/dist/src/services/FlowService.d.ts +0 -186
  555. package/dist/src/services/FlowService.js +0 -196
  556. package/dist/src/services/FolderService.d.ts +0 -128
  557. package/dist/src/services/FolderService.js +0 -151
  558. package/dist/src/services/GranularAclService.d.ts +0 -46
  559. package/dist/src/services/GranularAclService.js +0 -56
  560. package/dist/src/services/GroupService.d.ts +0 -110
  561. package/dist/src/services/GroupService.js +0 -136
  562. package/dist/src/services/InputService.d.ts +0 -78
  563. package/dist/src/services/InputService.js +0 -95
  564. package/dist/src/services/JobService.d.ts +0 -761
  565. package/dist/src/services/JobService.js +0 -646
  566. package/dist/src/services/OauthService.d.ts +0 -95
  567. package/dist/src/services/OauthService.js +0 -120
  568. package/dist/src/services/RawAppService.d.ts +0 -103
  569. package/dist/src/services/RawAppService.js +0 -106
  570. package/dist/src/services/ResourceService.d.ts +0 -178
  571. package/dist/src/services/ResourceService.js +0 -243
  572. package/dist/src/services/ScheduleService.d.ts +0 -120
  573. package/dist/src/services/ScheduleService.js +0 -148
  574. package/dist/src/services/ScriptService.d.ts +0 -258
  575. package/dist/src/services/ScriptService.js +0 -283
  576. package/dist/src/services/SettingsService.d.ts +0 -27
  577. package/dist/src/services/SettingsService.js +0 -48
  578. package/dist/src/services/UserService.d.ts +0 -306
  579. package/dist/src/services/UserService.js +0 -397
  580. package/dist/src/services/VariableService.d.ts +0 -95
  581. package/dist/src/services/VariableService.js +0 -135
  582. package/dist/src/services/WorkerService.d.ts +0 -25
  583. package/dist/src/services/WorkerService.js +0 -30
  584. package/dist/src/services/WorkspaceService.d.ts +0 -249
  585. package/dist/src/services/WorkspaceService.js +0 -301
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "windmill-client",
3
3
  "description": "Windmill SDK client for browsers and Node.js",
4
- "version": "0.3.14",
4
+ "version": "1.145.2",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {
package/dist/client.d.ts DELETED
@@ -1,77 +0,0 @@
1
- export { AdminService, AuditService, FlowService, GranularAclService, GroupService, JobService, ResourceService, VariableService, ScriptService, ScheduleService, SettingsService, UserService, WorkspaceService, } from "./index";
2
- export type Sql = string;
3
- export type Email = string;
4
- export type Base64 = string;
5
- export type Resource<S extends string> = any;
6
- export declare const SHARED_FOLDER = "/shared";
7
- export declare function setClient(token?: string, baseUrl?: string): void;
8
- /**
9
- * Create a client configuration from env variables
10
- * @returns client configuration
11
- */
12
- export declare function getWorkspace(): string;
13
- /**
14
- * Get a resource value by path
15
- * @param path path of the resource, default to internal state path
16
- * @param undefinedIfEmpty if the resource does not exist, return undefined instead of throwing an error
17
- * @returns resource value
18
- */
19
- export declare function getResource(path?: string, undefinedIfEmpty?: boolean): Promise<any>;
20
- /**
21
- * Resolve a resource value in case the default value was picked because the input payload was undefined
22
- * @param obj resource value or path of the resource under the format `$res:path`
23
- * @returns resource value
24
- */
25
- export declare function resolveDefaultResource(obj: any): Promise<any>;
26
- /**
27
- * Get the full resource value by path
28
- * @param path path of the resource, default to internal state path
29
- * @param undefinedIfEmpty if the resource does not exist, return undefined instead of throwing an error
30
- * @returns full resource
31
- */
32
- export declare function getFullResource(path?: string, undefinedIfEmpty?: boolean): Promise<any>;
33
- export declare function getStatePath(): string;
34
- /**
35
- * Set a resource value by path
36
- * @param path path of the resource to set, default to state path
37
- * @param value new value of the resource to set
38
- * @param initializeToTypeIfNotExist if the resource does not exist, initialize it with this type
39
- */
40
- export declare function setResource(value: any, path?: string, initializeToTypeIfNotExist?: string): Promise<void>;
41
- /**
42
- * Set the state
43
- * @param state state to set
44
- * @deprecated use setState instead
45
- */
46
- export declare function setInternalState(state: any): Promise<void>;
47
- /**
48
- * Set the state
49
- * @param state state to set
50
- */
51
- export declare function setState(state: any): Promise<void>;
52
- /**
53
- * Get the internal state
54
- * @deprecated use getState instead
55
- */
56
- export declare function getInternalState(): Promise<any>;
57
- /**
58
- * Get the state shared across executions
59
- */
60
- export declare function getState(): Promise<any>;
61
- /**
62
- * Get a variable by path
63
- * @param path path of the variable
64
- * @returns variable value
65
- */
66
- export declare function getVariable(path: string): Promise<string | undefined>;
67
- /**
68
- * Set a variable by path, create if not exist
69
- * @param path path of the variable
70
- * @param value value of the variable
71
- * @param isSecretIfNotExist if the variable does not exist, create it as secret or not (default: false)
72
- * @param descriptionIfNotExist if the variable does not exist, create it with this description (default: "")
73
- */
74
- export declare function setVariable(path: string, value: string, isSecretIfNotExist?: boolean, descriptionIfNotExist?: string): Promise<void>;
75
- export declare function databaseUrlFromResource(path: string): Promise<string>;
76
- export declare function base64ToUint8Array(data: string): Uint8Array;
77
- export declare function uint8ArrayToBase64(arrayBuffer: Uint8Array): string;
package/dist/client.js DELETED
@@ -1,301 +0,0 @@
1
- import { ResourceService, VariableService } from "./index.js";
2
- import { OpenAPI } from "./index.js";
3
- export { AdminService, AuditService, FlowService, GranularAclService, GroupService, JobService, ResourceService, VariableService, ScriptService, ScheduleService, SettingsService, UserService, WorkspaceService, } from "./index.js";
4
- export const SHARED_FOLDER = "/shared";
5
- export function setClient(token, baseUrl) {
6
- if (baseUrl === undefined) {
7
- baseUrl =
8
- getEnv("BASE_INTERNAL_URL") ??
9
- getEnv("BASE_URL") ??
10
- "http://localhost:8000";
11
- }
12
- if (token === undefined) {
13
- token = getEnv("WM_TOKEN") ?? "no_token";
14
- }
15
- OpenAPI.WITH_CREDENTIALS = true;
16
- OpenAPI.TOKEN = token;
17
- OpenAPI.BASE = baseUrl + "/api";
18
- }
19
- const getEnv = (key) => {
20
- if (typeof window === "undefined") {
21
- // node
22
- return process.env[key];
23
- }
24
- // browser
25
- return window.process.env[key];
26
- };
27
- /**
28
- * Create a client configuration from env variables
29
- * @returns client configuration
30
- */
31
- export function getWorkspace() {
32
- return getEnv("WM_WORKSPACE") ?? "no_workspace";
33
- }
34
- /**
35
- * Get a resource value by path
36
- * @param path path of the resource, default to internal state path
37
- * @param undefinedIfEmpty if the resource does not exist, return undefined instead of throwing an error
38
- * @returns resource value
39
- */
40
- export async function getResource(path, undefinedIfEmpty) {
41
- const workspace = getWorkspace();
42
- path = path ?? getStatePath();
43
- try {
44
- const resource = await ResourceService.getResource({ workspace, path });
45
- return await _transformLeaf(resource.value);
46
- }
47
- catch (e) {
48
- if (undefinedIfEmpty && e.status === 404) {
49
- return undefined;
50
- }
51
- else {
52
- throw Error(`Resource not found at ${path} or not visible to you`);
53
- }
54
- }
55
- }
56
- /**
57
- * Resolve a resource value in case the default value was picked because the input payload was undefined
58
- * @param obj resource value or path of the resource under the format `$res:path`
59
- * @returns resource value
60
- */
61
- export async function resolveDefaultResource(obj) {
62
- if (typeof obj === "string" && obj.startsWith("$res:")) {
63
- return await getResource(obj.substring(5), true);
64
- }
65
- else {
66
- return obj;
67
- }
68
- }
69
- /**
70
- * Get the full resource value by path
71
- * @param path path of the resource, default to internal state path
72
- * @param undefinedIfEmpty if the resource does not exist, return undefined instead of throwing an error
73
- * @returns full resource
74
- */
75
- export async function getFullResource(path, undefinedIfEmpty) {
76
- const workspace = getWorkspace();
77
- path = path ?? getStatePath();
78
- try {
79
- const resource = await ResourceService.getResource({ workspace, path });
80
- const value = await _transformLeaf(resource.value);
81
- return { ...resource, value };
82
- }
83
- catch (e) {
84
- if (undefinedIfEmpty && e.status === 404) {
85
- return undefined;
86
- }
87
- else {
88
- throw Error(`Resource not found at ${path} or not visible to you`);
89
- }
90
- }
91
- }
92
- export function getStatePath() {
93
- const state_path = getEnv("WM_STATE_PATH");
94
- if (state_path === undefined) {
95
- throw Error("State path not set");
96
- }
97
- return state_path;
98
- }
99
- /**
100
- * Set a resource value by path
101
- * @param path path of the resource to set, default to state path
102
- * @param value new value of the resource to set
103
- * @param initializeToTypeIfNotExist if the resource does not exist, initialize it with this type
104
- */
105
- export async function setResource(value, path, initializeToTypeIfNotExist) {
106
- path = path ?? getStatePath();
107
- const workspace = getWorkspace();
108
- if (await ResourceService.existsResource({ workspace, path })) {
109
- await ResourceService.updateResourceValue({
110
- workspace,
111
- path,
112
- requestBody: { value },
113
- });
114
- }
115
- else if (initializeToTypeIfNotExist) {
116
- await ResourceService.createResource({
117
- workspace,
118
- requestBody: { path, value, resource_type: initializeToTypeIfNotExist },
119
- });
120
- }
121
- else {
122
- throw Error(`Resource at path ${path} does not exist and no type was provided to initialize it`);
123
- }
124
- }
125
- /**
126
- * Set the state
127
- * @param state state to set
128
- * @deprecated use setState instead
129
- */
130
- export async function setInternalState(state) {
131
- await setResource(state, undefined, "state");
132
- }
133
- /**
134
- * Set the state
135
- * @param state state to set
136
- */
137
- export async function setState(state) {
138
- await setResource(state, undefined, "state");
139
- }
140
- // /**
141
- // * Set the shared state
142
- // * @param state state to set
143
- // */
144
- // export async function setSharedState(
145
- // state: any,
146
- // path = "state.json"
147
- // ): Promise<void> {
148
- // await Deno.writeTextFile(SHARED_FOLDER + "/" + path, JSON.stringify(state));
149
- // }
150
- // /**
151
- // * Get the shared state
152
- // * @param state state to set
153
- // */
154
- // export async function getSharedState(path = "state.json"): Promise<any> {
155
- // return JSON.parse(await Deno.readTextFile(SHARED_FOLDER + "/" + path));
156
- // }
157
- /**
158
- * Get the internal state
159
- * @deprecated use getState instead
160
- */
161
- export async function getInternalState() {
162
- return await getResource(getStatePath(), true);
163
- }
164
- /**
165
- * Get the state shared across executions
166
- */
167
- export async function getState() {
168
- return await getResource(getStatePath(), true);
169
- }
170
- /**
171
- * Get a variable by path
172
- * @param path path of the variable
173
- * @returns variable value
174
- */
175
- export async function getVariable(path) {
176
- const workspace = getWorkspace();
177
- try {
178
- const variable = await VariableService.getVariable({ workspace, path });
179
- return variable.value;
180
- }
181
- catch (e) {
182
- throw Error(`Variable not found at ${path} or not visible to you`);
183
- }
184
- }
185
- /**
186
- * Set a variable by path, create if not exist
187
- * @param path path of the variable
188
- * @param value value of the variable
189
- * @param isSecretIfNotExist if the variable does not exist, create it as secret or not (default: false)
190
- * @param descriptionIfNotExist if the variable does not exist, create it with this description (default: "")
191
- */
192
- export async function setVariable(path, value, isSecretIfNotExist, descriptionIfNotExist) {
193
- const workspace = getWorkspace();
194
- if (await VariableService.existsVariable({ workspace, path })) {
195
- await VariableService.updateVariable({
196
- workspace,
197
- path,
198
- requestBody: { value },
199
- });
200
- }
201
- else {
202
- await VariableService.createVariable({
203
- workspace,
204
- requestBody: {
205
- path,
206
- value,
207
- is_secret: isSecretIfNotExist ?? false,
208
- description: descriptionIfNotExist ?? "",
209
- },
210
- });
211
- }
212
- }
213
- async function transformLeaves(d) {
214
- for (const k in d) {
215
- d[k] = await _transformLeaf(d[k]);
216
- }
217
- return d;
218
- }
219
- const VAR_RESOURCE_PREFIX = "$var:";
220
- const RES_RESOURCE_PREFIX = "$res:";
221
- async function _transformLeaf(v) {
222
- if (typeof v === "object") {
223
- return transformLeaves(v);
224
- }
225
- else if (typeof v === "string" && v.startsWith(VAR_RESOURCE_PREFIX)) {
226
- const varName = v.substring(VAR_RESOURCE_PREFIX.length);
227
- return await getVariable(varName);
228
- }
229
- else if (typeof v === "string" && v.startsWith(RES_RESOURCE_PREFIX)) {
230
- const resName = v.substring(RES_RESOURCE_PREFIX.length);
231
- return await getResource(resName);
232
- }
233
- else {
234
- return v;
235
- }
236
- }
237
- export async function databaseUrlFromResource(path) {
238
- const resource = await getResource(path);
239
- return `postgresql://${resource.user}:${resource.password}@${resource.host}:${resource.port}/${resource.dbname}?sslmode=${resource.sslmode}`;
240
- }
241
- // /**
242
- // * Get URLs needed for resuming a flow after this step
243
- // * @param approver approver name
244
- // * @returns approval page UI URL, resume and cancel API URLs for resumeing the flow
245
- // */
246
- // export async function getResumeUrls(approver?: string): Promise<{
247
- // approvalPage: string;
248
- // resume: string;
249
- // cancel: string;
250
- // }> {
251
- // const nonce = Math.floor(Math.random() * 4294967295);
252
- // const workspace = getWorkspace();
253
- // return await JobService.getResumeUrls({
254
- // workspace,
255
- // resumeId: nonce,
256
- // approver,
257
- // id: process.env.get("WM_JOB_ID") ?? "NO_JOB_ID",
258
- // });
259
- // }
260
- export function base64ToUint8Array(data) {
261
- return Uint8Array.from(atob(data), (c) => c.charCodeAt(0));
262
- }
263
- export function uint8ArrayToBase64(arrayBuffer) {
264
- let base64 = "";
265
- const encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
266
- const bytes = new Uint8Array(arrayBuffer);
267
- const byteLength = bytes.byteLength;
268
- const byteRemainder = byteLength % 3;
269
- const mainLength = byteLength - byteRemainder;
270
- let a, b, c, d;
271
- let chunk;
272
- // Main loop deals with bytes in chunks of 3
273
- for (let i = 0; i < mainLength; i = i + 3) {
274
- // Combine the three bytes into a single integer
275
- chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
276
- // Use bitmasks to extract 6-bit segments from the triplet
277
- a = (chunk & 16515072) >> 18; // 16515072 = (2^6 - 1) << 18
278
- b = (chunk & 258048) >> 12; // 258048 = (2^6 - 1) << 12
279
- c = (chunk & 4032) >> 6; // 4032 = (2^6 - 1) << 6
280
- d = chunk & 63; // 63 = 2^6 - 1
281
- // Convert the raw binary segments to the appropriate ASCII encoding
282
- base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d];
283
- }
284
- // Deal with the remaining bytes and padding
285
- if (byteRemainder == 1) {
286
- chunk = bytes[mainLength];
287
- a = (chunk & 252) >> 2; // 252 = (2^6 - 1) << 2
288
- // Set the 4 least significant bits to zero
289
- b = (chunk & 3) << 4; // 3 = 2^2 - 1
290
- base64 += encodings[a] + encodings[b] + "==";
291
- }
292
- else if (byteRemainder == 2) {
293
- chunk = (bytes[mainLength] << 8) | bytes[mainLength + 1];
294
- a = (chunk & 64512) >> 10; // 64512 = (2^6 - 1) << 10
295
- b = (chunk & 1008) >> 4; // 1008 = (2^6 - 1) << 4
296
- // Set the 2 least significant bits to zero
297
- c = (chunk & 15) << 2; // 15 = 2^4 - 1
298
- base64 += encodings[a] + encodings[b] + encodings[c] + "=";
299
- }
300
- return base64;
301
- }
@@ -1,10 +0,0 @@
1
- import type { ApiRequestOptions } from './ApiRequestOptions';
2
- import type { ApiResult } from './ApiResult';
3
- export declare class ApiError extends Error {
4
- readonly url: string;
5
- readonly status: number;
6
- readonly statusText: string;
7
- readonly body: any;
8
- readonly request: ApiRequestOptions;
9
- constructor(request: ApiRequestOptions, response: ApiResult, message: string);
10
- }
@@ -1,11 +0,0 @@
1
- export class ApiError extends Error {
2
- constructor(request, response, message) {
3
- super(message);
4
- this.name = 'ApiError';
5
- this.url = response.url;
6
- this.status = response.status;
7
- this.statusText = response.statusText;
8
- this.body = response.body;
9
- this.request = request;
10
- }
11
- }
@@ -1,13 +0,0 @@
1
- export type ApiRequestOptions = {
2
- readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
- readonly url: string;
4
- readonly path?: Record<string, any>;
5
- readonly cookies?: Record<string, any>;
6
- readonly headers?: Record<string, any>;
7
- readonly query?: Record<string, any>;
8
- readonly formData?: Record<string, any>;
9
- readonly body?: any;
10
- readonly mediaType?: string;
11
- readonly responseHeader?: string;
12
- readonly errors?: Record<number, string>;
13
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- export type ApiResult = {
2
- readonly url: string;
3
- readonly ok: boolean;
4
- readonly status: number;
5
- readonly statusText: string;
6
- readonly body: any;
7
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- export declare class CancelError extends Error {
2
- constructor(message: string);
3
- get isCancelled(): boolean;
4
- }
5
- export interface OnCancel {
6
- readonly isResolved: boolean;
7
- readonly isRejected: boolean;
8
- readonly isCancelled: boolean;
9
- (cancelHandler: () => void): void;
10
- }
11
- export declare class CancelablePromise<T> implements Promise<T> {
12
- #private;
13
- constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
14
- get [Symbol.toStringTag](): string;
15
- then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
16
- catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
17
- finally(onFinally?: (() => void) | null): Promise<T>;
18
- cancel(): void;
19
- get isCancelled(): boolean;
20
- }
@@ -1,108 +0,0 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _CancelablePromise_isResolved, _CancelablePromise_isRejected, _CancelablePromise_isCancelled, _CancelablePromise_cancelHandlers, _CancelablePromise_promise, _CancelablePromise_resolve, _CancelablePromise_reject;
13
- /* generated using openapi-typescript-codegen -- do no edit */
14
- /* istanbul ignore file */
15
- /* tslint:disable */
16
- /* eslint-disable */
17
- export class CancelError extends Error {
18
- constructor(message) {
19
- super(message);
20
- this.name = 'CancelError';
21
- }
22
- get isCancelled() {
23
- return true;
24
- }
25
- }
26
- export class CancelablePromise {
27
- constructor(executor) {
28
- _CancelablePromise_isResolved.set(this, void 0);
29
- _CancelablePromise_isRejected.set(this, void 0);
30
- _CancelablePromise_isCancelled.set(this, void 0);
31
- _CancelablePromise_cancelHandlers.set(this, void 0);
32
- _CancelablePromise_promise.set(this, void 0);
33
- _CancelablePromise_resolve.set(this, void 0);
34
- _CancelablePromise_reject.set(this, void 0);
35
- __classPrivateFieldSet(this, _CancelablePromise_isResolved, false, "f");
36
- __classPrivateFieldSet(this, _CancelablePromise_isRejected, false, "f");
37
- __classPrivateFieldSet(this, _CancelablePromise_isCancelled, false, "f");
38
- __classPrivateFieldSet(this, _CancelablePromise_cancelHandlers, [], "f");
39
- __classPrivateFieldSet(this, _CancelablePromise_promise, new Promise((resolve, reject) => {
40
- __classPrivateFieldSet(this, _CancelablePromise_resolve, resolve, "f");
41
- __classPrivateFieldSet(this, _CancelablePromise_reject, reject, "f");
42
- const onResolve = (value) => {
43
- if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
44
- return;
45
- }
46
- __classPrivateFieldSet(this, _CancelablePromise_isResolved, true, "f");
47
- __classPrivateFieldGet(this, _CancelablePromise_resolve, "f")?.call(this, value);
48
- };
49
- const onReject = (reason) => {
50
- if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
51
- return;
52
- }
53
- __classPrivateFieldSet(this, _CancelablePromise_isRejected, true, "f");
54
- __classPrivateFieldGet(this, _CancelablePromise_reject, "f")?.call(this, reason);
55
- };
56
- const onCancel = (cancelHandler) => {
57
- if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
58
- return;
59
- }
60
- __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").push(cancelHandler);
61
- };
62
- Object.defineProperty(onCancel, 'isResolved', {
63
- get: () => __classPrivateFieldGet(this, _CancelablePromise_isResolved, "f"),
64
- });
65
- Object.defineProperty(onCancel, 'isRejected', {
66
- get: () => __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f"),
67
- });
68
- Object.defineProperty(onCancel, 'isCancelled', {
69
- get: () => __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f"),
70
- });
71
- return executor(onResolve, onReject, onCancel);
72
- }), "f");
73
- }
74
- get [(_CancelablePromise_isResolved = new WeakMap(), _CancelablePromise_isRejected = new WeakMap(), _CancelablePromise_isCancelled = new WeakMap(), _CancelablePromise_cancelHandlers = new WeakMap(), _CancelablePromise_promise = new WeakMap(), _CancelablePromise_resolve = new WeakMap(), _CancelablePromise_reject = new WeakMap(), Symbol.toStringTag)]() {
75
- return "Cancellable Promise";
76
- }
77
- then(onFulfilled, onRejected) {
78
- return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").then(onFulfilled, onRejected);
79
- }
80
- catch(onRejected) {
81
- return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").catch(onRejected);
82
- }
83
- finally(onFinally) {
84
- return __classPrivateFieldGet(this, _CancelablePromise_promise, "f").finally(onFinally);
85
- }
86
- cancel() {
87
- if (__classPrivateFieldGet(this, _CancelablePromise_isResolved, "f") || __classPrivateFieldGet(this, _CancelablePromise_isRejected, "f") || __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f")) {
88
- return;
89
- }
90
- __classPrivateFieldSet(this, _CancelablePromise_isCancelled, true, "f");
91
- if (__classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length) {
92
- try {
93
- for (const cancelHandler of __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f")) {
94
- cancelHandler();
95
- }
96
- }
97
- catch (error) {
98
- console.warn('Cancellation threw an error', error);
99
- return;
100
- }
101
- }
102
- __classPrivateFieldGet(this, _CancelablePromise_cancelHandlers, "f").length = 0;
103
- __classPrivateFieldGet(this, _CancelablePromise_reject, "f")?.call(this, new CancelError('Request aborted'));
104
- }
105
- get isCancelled() {
106
- return __classPrivateFieldGet(this, _CancelablePromise_isCancelled, "f");
107
- }
108
- }
@@ -1,16 +0,0 @@
1
- import type { ApiRequestOptions } from './ApiRequestOptions';
2
- type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
3
- type Headers = Record<string, string>;
4
- export type OpenAPIConfig = {
5
- BASE: string;
6
- VERSION: string;
7
- WITH_CREDENTIALS: boolean;
8
- CREDENTIALS: 'include' | 'omit' | 'same-origin';
9
- TOKEN?: string | Resolver<string> | undefined;
10
- USERNAME?: string | Resolver<string> | undefined;
11
- PASSWORD?: string | Resolver<string> | undefined;
12
- HEADERS?: Headers | Resolver<Headers> | undefined;
13
- ENCODE_PATH?: ((path: string) => string) | undefined;
14
- };
15
- export declare const OpenAPI: OpenAPIConfig;
16
- export {};
@@ -1,11 +0,0 @@
1
- export const OpenAPI = {
2
- BASE: '/api',
3
- VERSION: '1.125.0',
4
- WITH_CREDENTIALS: false,
5
- CREDENTIALS: 'include',
6
- TOKEN: undefined,
7
- USERNAME: undefined,
8
- PASSWORD: undefined,
9
- HEADERS: undefined,
10
- ENCODE_PATH: undefined,
11
- };
@@ -1,26 +0,0 @@
1
- import type { ApiRequestOptions } from './ApiRequestOptions';
2
- export declare const isDefined: <T>(value: T | null | undefined) => value is Exclude<T, null | undefined>;
3
- export declare const isString: (value: any) => value is string;
4
- export declare const isStringWithValue: (value: any) => value is string;
5
- export declare const isBlob: (value: any) => value is Blob;
6
- export declare const isFormData: (value: any) => value is FormData;
7
- export declare const base64: (str: string) => string;
8
- export declare const getQueryString: (params: Record<string, any>) => string;
9
- export declare const getFormData: (options: ApiRequestOptions) => FormData | undefined;
10
- type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
11
- export declare const resolve: <T>(options: ApiRequestOptions, resolver?: T | Resolver<T> | undefined) => Promise<T | undefined>;
12
- export declare const getHeaders: (config: OpenAPIConfig, options: ApiRequestOptions) => Promise<Headers>;
13
- export declare const getRequestBody: (options: ApiRequestOptions) => any;
14
- export declare const sendRequest: (config: OpenAPIConfig, options: ApiRequestOptions, url: string, body: any, formData: FormData | undefined, headers: Headers, onCancel: OnCancel) => Promise<Response>;
15
- export declare const getResponseHeader: (response: Response, responseHeader?: string) => string | undefined;
16
- export declare const getResponseBody: (response: Response) => Promise<any>;
17
- export declare const catchErrorCodes: (options: ApiRequestOptions, result: ApiResult) => void;
18
- /**
19
- * Request method
20
- * @param config The OpenAPI configuration object
21
- * @param options The request options from the service
22
- * @returns CancelablePromise<T>
23
- * @throws ApiError
24
- */
25
- export declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
26
- export {};