edge-impulse-linux 1.4.8 → 1.5.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 (522) hide show
  1. package/README.md +10 -0
  2. package/build/cli/init-cli-app.js +4 -1
  3. package/build/cli/init-cli-app.js.map +1 -1
  4. package/build/cli/linux/camera-debug.js +0 -0
  5. package/build/cli/linux/linux.js +0 -0
  6. package/build/cli/linux/runner.js +194 -2
  7. package/build/cli/linux/runner.js.map +1 -1
  8. package/build/cli/linux/webserver/middleware/asyncMiddleware.d.ts +2 -0
  9. package/build/cli/linux/webserver/middleware/asyncMiddleware.js +10 -0
  10. package/build/cli/linux/webserver/middleware/asyncMiddleware.js.map +1 -0
  11. package/build/cli/linux/webserver/public/inference-server.d.ts +0 -0
  12. package/build/cli/linux/webserver/public/inference-server.js +168 -0
  13. package/build/cli/linux/webserver/public/inference-server.js.map +1 -0
  14. package/build/cli/linux/webserver/views/escape-html-template-tag/escape.d.ts +12 -0
  15. package/build/cli/linux/webserver/views/escape-html-template-tag/escape.js +59 -0
  16. package/build/cli/linux/webserver/views/escape-html-template-tag/escape.js.map +1 -0
  17. package/build/cli/linux/webserver/views/escape-html-template-tag/index.d.ts +7 -0
  18. package/build/cli/linux/webserver/views/escape-html-template-tag/index.js +24 -0
  19. package/build/cli/linux/webserver/views/escape-html-template-tag/index.js.map +1 -0
  20. package/build/cli/linux/webserver/views/inference-server-view.d.ts +19 -0
  21. package/build/cli/linux/webserver/views/inference-server-view.js +164 -0
  22. package/build/cli/linux/webserver/views/inference-server-view.js.map +1 -0
  23. package/build/cli/make-image.d.ts +2 -7
  24. package/build/cli/make-image.js +15 -0
  25. package/build/cli/make-image.js.map +1 -1
  26. package/build/library/classifier/image-classifier.d.ts +10 -2
  27. package/build/library/classifier/image-classifier.js +21 -6
  28. package/build/library/classifier/image-classifier.js.map +1 -1
  29. package/build/sdk/studio/sdk/api/adminApi.d.ts +129 -5
  30. package/build/sdk/studio/sdk/api/adminApi.js +956 -236
  31. package/build/sdk/studio/sdk/api/adminApi.js.map +1 -1
  32. package/build/sdk/studio/sdk/api/apis.d.ts +1 -21
  33. package/build/sdk/studio/sdk/api/apis.js +1 -21
  34. package/build/sdk/studio/sdk/api/apis.js.map +1 -1
  35. package/build/sdk/studio/sdk/api/jobsApi.d.ts +2 -3
  36. package/build/sdk/studio/sdk/api/jobsApi.js +2 -8
  37. package/build/sdk/studio/sdk/api/jobsApi.js.map +1 -1
  38. package/build/sdk/studio/sdk/api/optimizationApi.d.ts +36 -7
  39. package/build/sdk/studio/sdk/api/optimizationApi.js +237 -8
  40. package/build/sdk/studio/sdk/api/optimizationApi.js.map +1 -1
  41. package/build/sdk/studio/sdk/api/organizationDataApi.d.ts +2 -2
  42. package/build/sdk/studio/sdk/api/organizationDataApi.js +2 -2
  43. package/build/sdk/studio/sdk/api/organizationsApi.d.ts +177 -6
  44. package/build/sdk/studio/sdk/api/organizationsApi.js +1197 -170
  45. package/build/sdk/studio/sdk/api/organizationsApi.js.map +1 -1
  46. package/build/sdk/studio/sdk/api/projectsApi.d.ts +26 -3
  47. package/build/sdk/studio/sdk/api/projectsApi.js +158 -6
  48. package/build/sdk/studio/sdk/api/projectsApi.js.map +1 -1
  49. package/build/sdk/studio/sdk/api/rawDataApi.d.ts +37 -3
  50. package/build/sdk/studio/sdk/api/rawDataApi.js +234 -3
  51. package/build/sdk/studio/sdk/api/rawDataApi.js.map +1 -1
  52. package/build/sdk/studio/sdk/api/uploadPortalApi.d.ts +1 -1
  53. package/build/sdk/studio/sdk/api/uploadPortalApi.js +1 -1
  54. package/build/sdk/studio/sdk/model/addApiKeyRequest.d.ts +0 -7
  55. package/build/sdk/studio/sdk/model/addApiKeyRequest.js +1 -12
  56. package/build/sdk/studio/sdk/model/addApiKeyRequest.js.map +1 -1
  57. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequest.js.map +1 -1
  58. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequestAllOf.d.ts +27 -0
  59. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequestAllOf.js +33 -0
  60. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequestAllOf.js.map +1 -0
  61. package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockRequest.d.ts +4 -0
  62. package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockRequest.js +5 -0
  63. package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockRequest.js.map +1 -1
  64. package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.d.ts +4 -0
  65. package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.js +5 -0
  66. package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.js.map +1 -1
  67. package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.d.ts +39 -0
  68. package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.js +48 -0
  69. package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.js.map +1 -0
  70. package/build/sdk/studio/sdk/model/addProjectApiKeyRequestAllOf.d.ts +31 -0
  71. package/build/sdk/studio/sdk/model/addProjectApiKeyRequestAllOf.js +38 -0
  72. package/build/sdk/studio/sdk/model/addProjectApiKeyRequestAllOf.js.map +1 -0
  73. package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.d.ts +39 -0
  74. package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.js +48 -0
  75. package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.js.map +1 -0
  76. package/build/sdk/studio/sdk/model/{getUserResponseAllOfOrganizations.d.ts → adminAddProjectApiKeyRequest.d.ts} +8 -8
  77. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequest.js +42 -0
  78. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequest.js.map +1 -0
  79. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequestAllOf.d.ts +28 -0
  80. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequestAllOf.js +32 -0
  81. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequestAllOf.js.map +1 -0
  82. package/build/sdk/studio/sdk/model/adminApiOrganization.d.ts +4 -0
  83. package/build/sdk/studio/sdk/model/adminApiOrganization.js +5 -0
  84. package/build/sdk/studio/sdk/model/adminApiOrganization.js.map +1 -1
  85. package/build/sdk/studio/sdk/model/{whitelabelAdminCreateProjectRequest.d.ts → adminCreateProjectRequest.d.ts} +5 -3
  86. package/build/sdk/studio/sdk/model/{whitelabelAdminCreateProjectRequest.js → adminCreateProjectRequest.js} +14 -9
  87. package/build/sdk/studio/sdk/model/adminCreateProjectRequest.js.map +1 -0
  88. package/build/sdk/studio/sdk/model/{getAutoSegmenterResponse.d.ts → adminGetOrganizationComputeTimeUsageResponse.d.ts} +13 -7
  89. package/build/sdk/studio/sdk/model/adminGetOrganizationComputeTimeUsageResponse.js +52 -0
  90. package/build/sdk/studio/sdk/model/adminGetOrganizationComputeTimeUsageResponse.js.map +1 -0
  91. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponse.d.ts +34 -0
  92. package/build/sdk/studio/sdk/model/{saveAutoSegmenterClustersResponse.js → adminGetOrganizationUsageReportResponse.js} +12 -12
  93. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponse.js.map +1 -0
  94. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponseAllOf.d.ts +26 -0
  95. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponseAllOf.js +32 -0
  96. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponseAllOf.js.map +1 -0
  97. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponse.d.ts → adminGetOrganizationUsageReportsResponse.d.ts} +4 -3
  98. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponse.js +47 -0
  99. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponse.js.map +1 -0
  100. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponseAllOf.d.ts → adminGetOrganizationUsageReportsResponseAllOf.d.ts} +4 -3
  101. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponseAllOf.js +37 -0
  102. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponseAllOf.js.map +1 -0
  103. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponse.d.ts +8 -20
  104. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponse.js +11 -41
  105. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponse.js.map +1 -1
  106. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponseAllOf.d.ts +0 -8
  107. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponseAllOf.js +0 -10
  108. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponseAllOf.js.map +1 -1
  109. package/build/sdk/studio/sdk/model/adminUpdateUserRequest.d.ts +4 -0
  110. package/build/sdk/studio/sdk/model/adminUpdateUserRequest.js +5 -0
  111. package/build/sdk/studio/sdk/model/adminUpdateUserRequest.js.map +1 -1
  112. package/build/sdk/studio/sdk/model/anomalyResult.d.ts +5 -0
  113. package/build/sdk/studio/sdk/model/anomalyResult.js +5 -0
  114. package/build/sdk/studio/sdk/model/anomalyResult.js.map +1 -1
  115. package/build/sdk/studio/sdk/model/applicationBudget.d.ts +32 -0
  116. package/build/sdk/studio/sdk/model/applicationBudget.js +45 -0
  117. package/build/sdk/studio/sdk/model/applicationBudget.js.map +1 -0
  118. package/build/sdk/studio/sdk/model/classifySampleResponseClassification.d.ts +5 -0
  119. package/build/sdk/studio/sdk/model/classifySampleResponseClassification.js +5 -0
  120. package/build/sdk/studio/sdk/model/classifySampleResponseClassification.js.map +1 -1
  121. package/build/sdk/studio/sdk/model/cosineSimilarityData.d.ts +36 -0
  122. package/build/sdk/studio/sdk/model/cosineSimilarityData.js +40 -0
  123. package/build/sdk/studio/sdk/model/cosineSimilarityData.js.map +1 -0
  124. package/build/sdk/studio/sdk/model/cosineSimilarityIssue.d.ts +42 -0
  125. package/build/sdk/studio/sdk/model/cosineSimilarityIssue.js +50 -0
  126. package/build/sdk/studio/sdk/model/cosineSimilarityIssue.js.map +1 -0
  127. package/build/sdk/studio/sdk/model/cosineSimilarityIssueIssues.d.ts +39 -0
  128. package/build/sdk/studio/sdk/model/cosineSimilarityIssueIssues.js +47 -0
  129. package/build/sdk/studio/sdk/model/cosineSimilarityIssueIssues.js.map +1 -0
  130. package/build/sdk/studio/sdk/model/{getJWTTokenResponseAllOf.d.ts → cosineSimilarityIssueWindows.d.ts} +9 -5
  131. package/build/sdk/studio/sdk/model/cosineSimilarityIssueWindows.js +42 -0
  132. package/build/sdk/studio/sdk/model/cosineSimilarityIssueWindows.js.map +1 -0
  133. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequest.d.ts +4 -0
  134. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequest.js +5 -0
  135. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequest.js.map +1 -1
  136. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequestAllOf.d.ts +4 -0
  137. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequestAllOf.js +5 -0
  138. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequestAllOf.js.map +1 -1
  139. package/build/sdk/studio/sdk/model/{getAutoSegmenterResponseAllOfItems.d.ts → createOrganizationUsageReportBody.d.ts} +3 -2
  140. package/build/sdk/studio/sdk/model/createOrganizationUsageReportBody.js +37 -0
  141. package/build/sdk/studio/sdk/model/createOrganizationUsageReportBody.js.map +1 -0
  142. package/build/sdk/studio/sdk/model/createProjectRequest.d.ts +2 -0
  143. package/build/sdk/studio/sdk/model/createProjectRequest.js +5 -0
  144. package/build/sdk/studio/sdk/model/createProjectRequest.js.map +1 -1
  145. package/build/sdk/studio/sdk/model/createUserRequest.d.ts +4 -0
  146. package/build/sdk/studio/sdk/model/createUserRequest.js +5 -0
  147. package/build/sdk/studio/sdk/model/createUserRequest.js.map +1 -1
  148. package/build/sdk/studio/sdk/model/{organizationCreateProjectCreatedByUser.d.ts → createdUpdatedByUser.d.ts} +1 -1
  149. package/build/sdk/studio/sdk/model/{organizationCreateProjectCreatedByUser.js → createdUpdatedByUser.js} +9 -9
  150. package/build/sdk/studio/sdk/model/createdUpdatedByUser.js.map +1 -0
  151. package/build/sdk/studio/sdk/model/{addNoteRequest.d.ts → crossValidationData.d.ts} +6 -9
  152. package/build/sdk/studio/sdk/model/crossValidationData.js +35 -0
  153. package/build/sdk/studio/sdk/model/crossValidationData.js.map +1 -0
  154. package/build/sdk/studio/sdk/model/crossValidationDataScores.d.ts +50 -0
  155. package/build/sdk/studio/sdk/model/crossValidationDataScores.js +62 -0
  156. package/build/sdk/studio/sdk/model/crossValidationDataScores.js.map +1 -0
  157. package/build/sdk/studio/sdk/model/dSPGroupItem.d.ts +6 -0
  158. package/build/sdk/studio/sdk/model/dSPGroupItem.js +7 -1
  159. package/build/sdk/studio/sdk/model/dSPGroupItem.js.map +1 -1
  160. package/build/sdk/studio/sdk/model/dSPInfoFeatures.d.ts +4 -0
  161. package/build/sdk/studio/sdk/model/dSPInfoFeatures.js +5 -0
  162. package/build/sdk/studio/sdk/model/dSPInfoFeatures.js.map +1 -1
  163. package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.d.ts +1 -1
  164. package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.js +1 -1
  165. package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.js.map +1 -1
  166. package/build/sdk/studio/sdk/model/dspRunResponseWithSample.d.ts +4 -0
  167. package/build/sdk/studio/sdk/model/dspRunResponseWithSample.js +5 -0
  168. package/build/sdk/studio/sdk/model/dspRunResponseWithSample.js.map +1 -1
  169. package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.d.ts +4 -0
  170. package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.js +5 -0
  171. package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.js.map +1 -1
  172. package/build/sdk/studio/sdk/model/entitlementLimits.d.ts +16 -0
  173. package/build/sdk/studio/sdk/model/entitlementLimits.js +5 -0
  174. package/build/sdk/studio/sdk/model/entitlementLimits.js.map +1 -1
  175. package/build/sdk/studio/sdk/model/feature.d.ts +1 -1
  176. package/build/sdk/studio/sdk/model/feature.js +1 -1
  177. package/build/sdk/studio/sdk/model/feature.js.map +1 -1
  178. package/build/sdk/studio/sdk/model/getDiversityDataResponseAllOfClusterInfos.d.ts +1 -1
  179. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponse.d.ts +34 -0
  180. package/build/sdk/studio/sdk/model/{getJWTTokenResponse.js → getLabelNoiseDataResponse.js} +12 -17
  181. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponse.js.map +1 -0
  182. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOf.d.ts +26 -0
  183. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOf.js +32 -0
  184. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOf.js.map +1 -0
  185. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOfData.d.ts +30 -0
  186. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOfData.js +42 -0
  187. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOfData.js.map +1 -0
  188. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponse.d.ts +2 -0
  189. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponse.js +5 -0
  190. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponse.js.map +1 -1
  191. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponseAllOf.d.ts +2 -0
  192. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponseAllOf.js +5 -0
  193. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponseAllOf.js.map +1 -1
  194. package/build/sdk/studio/sdk/model/{createNoteResponse.d.ts → getOrganizationUsageReportResponse.d.ts} +3 -5
  195. package/build/sdk/studio/sdk/model/{listOrganizationProjectsResponse.js → getOrganizationUsageReportResponse.js} +12 -12
  196. package/build/sdk/studio/sdk/model/getOrganizationUsageReportResponse.js.map +1 -0
  197. package/build/sdk/studio/sdk/model/{listOrganizationProjectsResponse.d.ts → getTargetConstraintsResponse.d.ts} +3 -3
  198. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponse.js → getTargetConstraintsResponse.js} +12 -12
  199. package/build/sdk/studio/sdk/model/getTargetConstraintsResponse.js.map +1 -0
  200. package/build/sdk/studio/sdk/model/getTargetConstraintsResponseAllOf.d.ts +26 -0
  201. package/build/sdk/studio/sdk/model/getTargetConstraintsResponseAllOf.js +32 -0
  202. package/build/sdk/studio/sdk/model/getTargetConstraintsResponseAllOf.js.map +1 -0
  203. package/build/sdk/studio/sdk/model/job.d.ts +2 -0
  204. package/build/sdk/studio/sdk/model/job.js +5 -0
  205. package/build/sdk/studio/sdk/model/job.js.map +1 -1
  206. package/build/sdk/studio/sdk/model/{developmentBoard.d.ts → jobCreatedByUser.d.ts} +4 -3
  207. package/build/sdk/studio/sdk/model/{developmentBoard.js → jobCreatedByUser.js} +18 -13
  208. package/build/sdk/studio/sdk/model/jobCreatedByUser.js.map +1 -0
  209. package/build/sdk/studio/sdk/model/jobDetails.d.ts +2 -0
  210. package/build/sdk/studio/sdk/model/jobDetails.js +5 -0
  211. package/build/sdk/studio/sdk/model/jobDetails.js.map +1 -1
  212. package/build/sdk/studio/sdk/model/jobParentTypeEnum.d.ts +1 -1
  213. package/build/sdk/studio/sdk/model/jobParentTypeEnum.js +1 -1
  214. package/build/sdk/studio/sdk/model/jobParentTypeEnum.js.map +1 -1
  215. package/build/sdk/studio/sdk/model/jobStatus.d.ts +13 -0
  216. package/build/sdk/studio/sdk/model/jobStatus.js +16 -0
  217. package/build/sdk/studio/sdk/model/jobStatus.js.map +1 -0
  218. package/build/sdk/studio/sdk/model/kerasModelMetadata.d.ts +5 -1
  219. package/build/sdk/studio/sdk/model/kerasModelMetadata.js +6 -1
  220. package/build/sdk/studio/sdk/model/kerasModelMetadata.js.map +1 -1
  221. package/build/sdk/studio/sdk/model/kerasModelMetadataAllOf.d.ts +5 -1
  222. package/build/sdk/studio/sdk/model/kerasModelMetadataAllOf.js +6 -1
  223. package/build/sdk/studio/sdk/model/kerasModelMetadataAllOf.js.map +1 -1
  224. package/build/sdk/studio/sdk/model/kerasResponse.d.ts +6 -0
  225. package/build/sdk/studio/sdk/model/kerasResponse.js +10 -0
  226. package/build/sdk/studio/sdk/model/kerasResponse.js.map +1 -1
  227. package/build/sdk/studio/sdk/model/kerasResponseAllOf.d.ts +6 -0
  228. package/build/sdk/studio/sdk/model/kerasResponseAllOf.js +10 -0
  229. package/build/sdk/studio/sdk/model/kerasResponseAllOf.js.map +1 -1
  230. package/build/sdk/studio/sdk/model/learnBlock.d.ts +4 -0
  231. package/build/sdk/studio/sdk/model/learnBlock.js +5 -0
  232. package/build/sdk/studio/sdk/model/learnBlock.js.map +1 -1
  233. package/build/sdk/studio/sdk/model/listApiKeysResponseAllOfApiKeys.d.ts +1 -1
  234. package/build/sdk/studio/sdk/model/listApiKeysResponseAllOfApiKeys.js +1 -1
  235. package/build/sdk/studio/sdk/model/listApiKeysResponseAllOfApiKeys.js.map +1 -1
  236. package/build/sdk/studio/sdk/model/listOrganizationSecretsResponseAllOfSecrets.d.ts +2 -0
  237. package/build/sdk/studio/sdk/model/listOrganizationSecretsResponseAllOfSecrets.js +5 -0
  238. package/build/sdk/studio/sdk/model/listOrganizationSecretsResponseAllOfSecrets.js.map +1 -1
  239. package/build/sdk/studio/sdk/model/{getJWTTokenResponse.d.ts → listOrganizationUsageReportsResponse.d.ts} +5 -7
  240. package/build/sdk/studio/sdk/model/listOrganizationUsageReportsResponse.js +47 -0
  241. package/build/sdk/studio/sdk/model/listOrganizationUsageReportsResponse.js.map +1 -0
  242. package/build/sdk/studio/sdk/model/{saveAutoSegmenterClustersResponse.d.ts → listTunerRunsResponse.d.ts} +3 -2
  243. package/build/sdk/studio/sdk/model/{createNoteResponse.js → listTunerRunsResponse.js} +12 -12
  244. package/build/sdk/studio/sdk/model/listTunerRunsResponse.js.map +1 -0
  245. package/build/sdk/studio/sdk/model/{createNoteResponseAllOf.d.ts → listTunerRunsResponseAllOf.d.ts} +3 -5
  246. package/build/sdk/studio/sdk/model/listTunerRunsResponseAllOf.js +32 -0
  247. package/build/sdk/studio/sdk/model/listTunerRunsResponseAllOf.js.map +1 -0
  248. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponseAllOfFlags.d.ts → memorySpec.d.ts} +7 -7
  249. package/build/sdk/studio/sdk/model/memorySpec.js +40 -0
  250. package/build/sdk/studio/sdk/model/memorySpec.js.map +1 -0
  251. package/build/sdk/studio/sdk/model/modelPrediction.d.ts +1 -0
  252. package/build/sdk/studio/sdk/model/modelPrediction.js +5 -0
  253. package/build/sdk/studio/sdk/model/modelPrediction.js.map +1 -1
  254. package/build/sdk/studio/sdk/model/models.d.ts +49 -4
  255. package/build/sdk/studio/sdk/model/models.js +154 -13
  256. package/build/sdk/studio/sdk/model/models.js.map +1 -1
  257. package/build/sdk/studio/sdk/model/{anomalyModelMetadataClusters.d.ts → neighborsData.d.ts} +9 -5
  258. package/build/sdk/studio/sdk/model/neighborsData.js +40 -0
  259. package/build/sdk/studio/sdk/model/neighborsData.js.map +1 -0
  260. package/build/sdk/studio/sdk/model/neighborsScore.d.ts +50 -0
  261. package/build/sdk/studio/sdk/model/neighborsScore.js +60 -0
  262. package/build/sdk/studio/sdk/model/neighborsScore.js.map +1 -0
  263. package/build/sdk/studio/sdk/model/{classifyJobResponseAllOfResult.d.ts → neighborsScoreNeighborWindows.d.ts} +14 -5
  264. package/build/sdk/studio/sdk/model/neighborsScoreNeighborWindows.js +47 -0
  265. package/build/sdk/studio/sdk/model/neighborsScoreNeighborWindows.js.map +1 -0
  266. package/build/sdk/studio/sdk/model/objectDetectionLastLayer.d.ts +1 -1
  267. package/build/sdk/studio/sdk/model/objectDetectionLastLayer.js +1 -1
  268. package/build/sdk/studio/sdk/model/objectDetectionLastLayer.js.map +1 -1
  269. package/build/sdk/studio/sdk/model/optimizeConfig.d.ts +9 -6
  270. package/build/sdk/studio/sdk/model/optimizeConfig.js +7 -2
  271. package/build/sdk/studio/sdk/model/optimizeConfig.js.map +1 -1
  272. package/build/sdk/studio/sdk/model/optimizeConfigResponse.d.ts +9 -6
  273. package/build/sdk/studio/sdk/model/optimizeConfigResponse.js +7 -2
  274. package/build/sdk/studio/sdk/model/optimizeConfigResponse.js.map +1 -1
  275. package/build/sdk/studio/sdk/model/optimizeConfigTargetDevice.d.ts +1 -1
  276. package/build/sdk/studio/sdk/model/optimizeStateResponse.d.ts +14 -2
  277. package/build/sdk/studio/sdk/model/optimizeStateResponse.js +17 -2
  278. package/build/sdk/studio/sdk/model/optimizeStateResponse.js.map +1 -1
  279. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.d.ts +14 -2
  280. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.js +17 -2
  281. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.js.map +1 -1
  282. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfStatus.d.ts +9 -9
  283. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfStatus.js +1 -1
  284. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfStatus.js.map +1 -1
  285. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfWorkers.d.ts +2 -2
  286. package/build/sdk/studio/sdk/model/optimizeTransferLearningModelsResponse.d.ts +1 -1
  287. package/build/sdk/studio/sdk/model/optimizeTransferLearningModelsResponseAllOf.d.ts +1 -1
  288. package/build/sdk/studio/sdk/model/organization.d.ts +4 -0
  289. package/build/sdk/studio/sdk/model/organization.js +5 -0
  290. package/build/sdk/studio/sdk/model/organization.js.map +1 -1
  291. package/build/sdk/studio/sdk/model/organizationComputeTimeUsage.d.ts +36 -0
  292. package/build/sdk/studio/sdk/model/organizationComputeTimeUsage.js +42 -0
  293. package/build/sdk/studio/sdk/model/organizationComputeTimeUsage.js.map +1 -0
  294. package/build/sdk/studio/sdk/model/organizationCreateProject.d.ts +2 -2
  295. package/build/sdk/studio/sdk/model/organizationCreateProject.js +1 -1
  296. package/build/sdk/studio/sdk/model/organizationCreateProject.js.map +1 -1
  297. package/build/sdk/studio/sdk/model/organizationCreateProjectRequest.d.ts +2 -0
  298. package/build/sdk/studio/sdk/model/organizationCreateProjectRequest.js +5 -0
  299. package/build/sdk/studio/sdk/model/organizationCreateProjectRequest.js.map +1 -1
  300. package/build/sdk/studio/sdk/model/organizationCreateProjectWithFiles.d.ts +2 -2
  301. package/build/sdk/studio/sdk/model/organizationCreateProjectWithFiles.js +1 -1
  302. package/build/sdk/studio/sdk/model/organizationCreateProjectWithFiles.js.map +1 -1
  303. package/build/sdk/studio/sdk/model/organizationDeployBlock.d.ts +4 -0
  304. package/build/sdk/studio/sdk/model/organizationDeployBlock.js +15 -0
  305. package/build/sdk/studio/sdk/model/organizationDeployBlock.js.map +1 -1
  306. package/build/sdk/studio/sdk/model/organizationDspBlock.d.ts +4 -0
  307. package/build/sdk/studio/sdk/model/organizationDspBlock.js +15 -0
  308. package/build/sdk/studio/sdk/model/organizationDspBlock.js.map +1 -1
  309. package/build/sdk/studio/sdk/model/organizationGetCreateProjectsResponseAllOfJobs.d.ts +2 -2
  310. package/build/sdk/studio/sdk/model/organizationGetCreateProjectsResponseAllOfJobs.js +1 -1
  311. package/build/sdk/studio/sdk/model/organizationGetCreateProjectsResponseAllOfJobs.js.map +1 -1
  312. package/build/sdk/studio/sdk/model/organizationMetricsResponseAllOfMetrics.d.ts +2 -2
  313. package/build/sdk/studio/sdk/model/organizationTransferLearningBlock.d.ts +12 -0
  314. package/build/sdk/studio/sdk/model/organizationTransferLearningBlock.js +25 -0
  315. package/build/sdk/studio/sdk/model/organizationTransferLearningBlock.js.map +1 -1
  316. package/build/sdk/studio/sdk/model/organizationTransformationBlock.d.ts +8 -0
  317. package/build/sdk/studio/sdk/model/organizationTransformationBlock.js +20 -0
  318. package/build/sdk/studio/sdk/model/organizationTransformationBlock.js.map +1 -1
  319. package/build/sdk/studio/sdk/model/organizationUsageReport.d.ts +34 -0
  320. package/build/sdk/studio/sdk/model/organizationUsageReport.js +72 -0
  321. package/build/sdk/studio/sdk/model/organizationUsageReport.js.map +1 -0
  322. package/build/sdk/studio/sdk/model/project.d.ts +13 -0
  323. package/build/sdk/studio/sdk/model/project.js +20 -0
  324. package/build/sdk/studio/sdk/model/project.js.map +1 -1
  325. package/build/sdk/studio/sdk/model/projectInfoResponse.d.ts +6 -0
  326. package/build/sdk/studio/sdk/model/projectInfoResponse.js +10 -0
  327. package/build/sdk/studio/sdk/model/projectInfoResponse.js.map +1 -1
  328. package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.d.ts +6 -0
  329. package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.js +10 -0
  330. package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.js.map +1 -1
  331. package/build/sdk/studio/sdk/model/projectVisibility.d.ts +16 -0
  332. package/build/sdk/studio/sdk/model/projectVisibility.js +16 -0
  333. package/build/sdk/studio/sdk/model/projectVisibility.js.map +1 -0
  334. package/build/sdk/studio/sdk/model/resourceRange.d.ts +29 -0
  335. package/build/sdk/studio/sdk/model/resourceRange.js +40 -0
  336. package/build/sdk/studio/sdk/model/resourceRange.js.map +1 -0
  337. package/build/sdk/studio/sdk/model/sample.d.ts +7 -0
  338. package/build/sdk/studio/sdk/model/sample.js +15 -0
  339. package/build/sdk/studio/sdk/model/sample.js.map +1 -1
  340. package/build/sdk/studio/sdk/model/setKerasParameterRequest.d.ts +6 -0
  341. package/build/sdk/studio/sdk/model/setKerasParameterRequest.js +10 -0
  342. package/build/sdk/studio/sdk/model/setKerasParameterRequest.js.map +1 -1
  343. package/build/sdk/studio/sdk/model/setSampleStructuredLabelsRequest.d.ts +26 -0
  344. package/build/sdk/studio/sdk/model/setSampleStructuredLabelsRequest.js +32 -0
  345. package/build/sdk/studio/sdk/model/setSampleStructuredLabelsRequest.js.map +1 -0
  346. package/build/sdk/studio/sdk/model/structuredClassifyResult.d.ts +6 -6
  347. package/build/sdk/studio/sdk/model/{adminCreateUserTrialRequest.d.ts → structuredLabel.d.ts} +10 -7
  348. package/build/sdk/studio/sdk/model/structuredLabel.js +45 -0
  349. package/build/sdk/studio/sdk/model/structuredLabel.js.map +1 -0
  350. package/build/sdk/studio/sdk/model/targetConstraints.d.ts +40 -0
  351. package/build/sdk/studio/sdk/model/targetConstraints.js +43 -0
  352. package/build/sdk/studio/sdk/model/targetConstraints.js.map +1 -0
  353. package/build/sdk/studio/sdk/model/{getJWTTokenRequest.d.ts → targetConstraintsDevice.d.ts} +14 -12
  354. package/build/sdk/studio/sdk/model/targetConstraintsDevice.js +52 -0
  355. package/build/sdk/studio/sdk/model/targetConstraintsDevice.js.map +1 -0
  356. package/build/sdk/studio/sdk/model/targetMemory.d.ts +30 -0
  357. package/build/sdk/studio/sdk/model/{profileTfLiteResponseAllOfMemoryTflite.js → targetMemory.js} +14 -11
  358. package/build/sdk/studio/sdk/model/targetMemory.js.map +1 -0
  359. package/build/sdk/studio/sdk/model/targetProcessor.d.ts +48 -0
  360. package/build/sdk/studio/sdk/model/targetProcessor.js +62 -0
  361. package/build/sdk/studio/sdk/model/targetProcessor.js.map +1 -0
  362. package/build/sdk/studio/sdk/model/{saveAutoSegmenterClustersRequestClusters.d.ts → tunerRun.d.ts} +7 -2
  363. package/build/sdk/studio/sdk/model/tunerRun.js +57 -0
  364. package/build/sdk/studio/sdk/model/tunerRun.js.map +1 -0
  365. package/build/sdk/studio/sdk/model/tunerTrial.d.ts +6 -3
  366. package/build/sdk/studio/sdk/model/tunerTrial.js +4 -3
  367. package/build/sdk/studio/sdk/model/tunerTrial.js.map +1 -1
  368. package/build/sdk/studio/sdk/model/tunerTrialBlocks.d.ts +8 -4
  369. package/build/sdk/studio/sdk/model/tunerTrialBlocks.js +5 -3
  370. package/build/sdk/studio/sdk/model/tunerTrialBlocks.js.map +1 -1
  371. package/build/sdk/studio/sdk/model/{activateUserRequest.d.ts → tunerTrialImpulse.d.ts} +4 -5
  372. package/build/sdk/studio/sdk/model/tunerTrialImpulse.js +42 -0
  373. package/build/sdk/studio/sdk/model/tunerTrialImpulse.js.map +1 -0
  374. package/build/sdk/studio/sdk/model/updateOrganizationCreateEmptyProjectRequest.d.ts +2 -0
  375. package/build/sdk/studio/sdk/model/updateOrganizationCreateEmptyProjectRequest.js +5 -0
  376. package/build/sdk/studio/sdk/model/updateOrganizationCreateEmptyProjectRequest.js.map +1 -1
  377. package/build/sdk/studio/sdk/model/updateOrganizationTransferLearningBlockRequest.d.ts +4 -0
  378. package/build/sdk/studio/sdk/model/updateOrganizationTransferLearningBlockRequest.js +5 -0
  379. package/build/sdk/studio/sdk/model/updateOrganizationTransferLearningBlockRequest.js.map +1 -1
  380. package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.d.ts +4 -0
  381. package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.js +5 -0
  382. package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.js.map +1 -1
  383. package/build/sdk/studio/sdk/model/updateProjectRequest.d.ts +14 -0
  384. package/build/sdk/studio/sdk/model/updateProjectRequest.js +20 -0
  385. package/build/sdk/studio/sdk/model/updateProjectRequest.js.map +1 -1
  386. package/build/sdk/studio/sdk/model/{adminGetUserMetricsResponseAllOf.d.ts → updateTunerRunRequest.d.ts} +2 -2
  387. package/build/sdk/studio/sdk/model/{activateUserRequest.js → updateTunerRunRequest.js} +11 -11
  388. package/build/sdk/studio/sdk/model/updateTunerRunRequest.js.map +1 -0
  389. package/build/sdk/studio/sdk/model/userOrganization.d.ts +2 -0
  390. package/build/sdk/studio/sdk/model/userOrganization.js +5 -0
  391. package/build/sdk/studio/sdk/model/userOrganization.js.map +1 -1
  392. package/build/shared/bounding-box-file-types.d.ts +50 -9
  393. package/build/shared/bounding-box-file-types.js +105 -4
  394. package/build/shared/bounding-box-file-types.js.map +1 -1
  395. package/build/shared/viewmodels/init.d.ts +2 -2
  396. package/build/shared/viewmodels/init.js +1 -0
  397. package/build/shared/viewmodels/init.js.map +1 -1
  398. package/cli/linux/runner.ts +236 -2
  399. package/cli/linux/webserver/middleware/asyncMiddleware.ts +7 -0
  400. package/cli/linux/webserver/public/assets/mobileclient.css +20 -0
  401. package/cli/linux/webserver/public/inference-server.js +185 -0
  402. package/cli/linux/webserver/views/escape-html-template-tag/escape.ts +64 -0
  403. package/cli/linux/webserver/views/escape-html-template-tag/index.ts +2 -0
  404. package/cli/linux/webserver/views/inference-server-view.ts +179 -0
  405. package/package.json +8 -4
  406. package/build/sdk/studio/sdk/api/allowsReadOnlyApi.d.ts +0 -726
  407. package/build/sdk/studio/sdk/api/allowsReadOnlyApi.js +0 -3986
  408. package/build/sdk/studio/sdk/api/allowsReadOnlyApi.js.map +0 -1
  409. package/build/sdk/studio/sdk/api/contentDispositionInlineApi.d.ts +0 -89
  410. package/build/sdk/studio/sdk/api/contentDispositionInlineApi.js +0 -335
  411. package/build/sdk/studio/sdk/api/contentDispositionInlineApi.js.map +0 -1
  412. package/build/sdk/studio/sdk/api/organizationAllowDeveloperProfileApi.d.ts +0 -693
  413. package/build/sdk/studio/sdk/api/organizationAllowDeveloperProfileApi.js +0 -3799
  414. package/build/sdk/studio/sdk/api/organizationAllowDeveloperProfileApi.js.map +0 -1
  415. package/build/sdk/studio/sdk/api/organizationAllowGuestAccessApi.d.ts +0 -180
  416. package/build/sdk/studio/sdk/api/organizationAllowGuestAccessApi.js +0 -847
  417. package/build/sdk/studio/sdk/api/organizationAllowGuestAccessApi.js.map +0 -1
  418. package/build/sdk/studio/sdk/api/organizationRequiresAdminApi.d.ts +0 -640
  419. package/build/sdk/studio/sdk/api/organizationRequiresAdminApi.js +0 -3714
  420. package/build/sdk/studio/sdk/api/organizationRequiresAdminApi.js.map +0 -1
  421. package/build/sdk/studio/sdk/api/organizationRequiresWhitelabelAdminApi.d.ts +0 -471
  422. package/build/sdk/studio/sdk/api/organizationRequiresWhitelabelAdminApi.js +0 -2604
  423. package/build/sdk/studio/sdk/api/organizationRequiresWhitelabelAdminApi.js.map +0 -1
  424. package/build/sdk/studio/sdk/api/projectRequiresAdminApi.d.ts +0 -65
  425. package/build/sdk/studio/sdk/api/projectRequiresAdminApi.js +0 -231
  426. package/build/sdk/studio/sdk/api/projectRequiresAdminApi.js.map +0 -1
  427. package/build/sdk/studio/sdk/api/requiresSudoApi.d.ts +0 -87
  428. package/build/sdk/studio/sdk/api/requiresSudoApi.js +0 -371
  429. package/build/sdk/studio/sdk/api/requiresSudoApi.js.map +0 -1
  430. package/build/sdk/studio/sdk/api/requiresThirdPartyAuthApiKeyApi.d.ts +0 -56
  431. package/build/sdk/studio/sdk/api/requiresThirdPartyAuthApiKeyApi.js +0 -158
  432. package/build/sdk/studio/sdk/api/requiresThirdPartyAuthApiKeyApi.js.map +0 -1
  433. package/build/sdk/studio/sdk/api/supportsRangeApi.d.ts +0 -74
  434. package/build/sdk/studio/sdk/api/supportsRangeApi.js +0 -248
  435. package/build/sdk/studio/sdk/api/supportsRangeApi.js.map +0 -1
  436. package/build/sdk/studio/sdk/model/activateUserRequest.js.map +0 -1
  437. package/build/sdk/studio/sdk/model/addNoteRequest.js +0 -37
  438. package/build/sdk/studio/sdk/model/addNoteRequest.js.map +0 -1
  439. package/build/sdk/studio/sdk/model/adminCreateUserTrialRequest.js +0 -42
  440. package/build/sdk/studio/sdk/model/adminCreateUserTrialRequest.js.map +0 -1
  441. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponse.js.map +0 -1
  442. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOf.js +0 -32
  443. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOf.js.map +0 -1
  444. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOfFlags.js +0 -37
  445. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOfFlags.js.map +0 -1
  446. package/build/sdk/studio/sdk/model/adminGetUserMetricsResponseAllOf.js +0 -32
  447. package/build/sdk/studio/sdk/model/adminGetUserMetricsResponseAllOf.js.map +0 -1
  448. package/build/sdk/studio/sdk/model/anomalyModelMetadataClusters.js +0 -37
  449. package/build/sdk/studio/sdk/model/anomalyModelMetadataClusters.js.map +0 -1
  450. package/build/sdk/studio/sdk/model/anomalyModelMetadataResponse.d.ts +0 -57
  451. package/build/sdk/studio/sdk/model/anomalyModelMetadataResponse.js +0 -67
  452. package/build/sdk/studio/sdk/model/anomalyModelMetadataResponse.js.map +0 -1
  453. package/build/sdk/studio/sdk/model/classifyJobResponseAllOfResult.js +0 -42
  454. package/build/sdk/studio/sdk/model/classifyJobResponseAllOfResult.js.map +0 -1
  455. package/build/sdk/studio/sdk/model/createNoteResponse.js.map +0 -1
  456. package/build/sdk/studio/sdk/model/createNoteResponseAllOf.js +0 -32
  457. package/build/sdk/studio/sdk/model/createNoteResponseAllOf.js.map +0 -1
  458. package/build/sdk/studio/sdk/model/deployPretrainedModelInputNone.d.ts +0 -27
  459. package/build/sdk/studio/sdk/model/deployPretrainedModelInputNone.js +0 -33
  460. package/build/sdk/studio/sdk/model/deployPretrainedModelInputNone.js.map +0 -1
  461. package/build/sdk/studio/sdk/model/developmentBoard.js.map +0 -1
  462. package/build/sdk/studio/sdk/model/getAutoSegmenterResponse.js +0 -62
  463. package/build/sdk/studio/sdk/model/getAutoSegmenterResponse.js.map +0 -1
  464. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOf.d.ts +0 -30
  465. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOf.js +0 -52
  466. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOf.js.map +0 -1
  467. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfClusters.d.ts +0 -27
  468. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfClusters.js +0 -37
  469. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfClusters.js.map +0 -1
  470. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfItems.js +0 -32
  471. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfItems.js.map +0 -1
  472. package/build/sdk/studio/sdk/model/getJWTTokenRequest.js +0 -53
  473. package/build/sdk/studio/sdk/model/getJWTTokenRequest.js.map +0 -1
  474. package/build/sdk/studio/sdk/model/getJWTTokenResponse.js.map +0 -1
  475. package/build/sdk/studio/sdk/model/getJWTTokenResponseAllOf.js +0 -37
  476. package/build/sdk/studio/sdk/model/getJWTTokenResponseAllOf.js.map +0 -1
  477. package/build/sdk/studio/sdk/model/getOrganizationProjectsDataCountResponseAllOf.d.ts +0 -25
  478. package/build/sdk/studio/sdk/model/getOrganizationProjectsDataCountResponseAllOf.js +0 -32
  479. package/build/sdk/studio/sdk/model/getOrganizationProjectsDataCountResponseAllOf.js.map +0 -1
  480. package/build/sdk/studio/sdk/model/getUserResponseAllOfOrganizations.js +0 -57
  481. package/build/sdk/studio/sdk/model/getUserResponseAllOfOrganizations.js.map +0 -1
  482. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponse.js.map +0 -1
  483. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponseAllOf.d.ts +0 -26
  484. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponseAllOf.js +0 -32
  485. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponseAllOf.js.map +0 -1
  486. package/build/sdk/studio/sdk/model/organizationCreateProjectCreatedByUser.js.map +0 -1
  487. package/build/sdk/studio/sdk/model/organizationCreateProjectFiles.d.ts +0 -32
  488. package/build/sdk/studio/sdk/model/organizationCreateProjectFiles.js +0 -58
  489. package/build/sdk/studio/sdk/model/organizationCreateProjectFiles.js.map +0 -1
  490. package/build/sdk/studio/sdk/model/organizationInfoResponseAllOfEntitlementLimits.d.ts +0 -28
  491. package/build/sdk/studio/sdk/model/organizationInfoResponseAllOfEntitlementLimits.js +0 -47
  492. package/build/sdk/studio/sdk/model/organizationInfoResponseAllOfEntitlementLimits.js.map +0 -1
  493. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOf.d.ts +0 -27
  494. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOf.js +0 -37
  495. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOf.js.map +0 -1
  496. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemory.d.ts +0 -27
  497. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemory.js +0 -37
  498. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemory.js.map +0 -1
  499. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemoryTflite.d.ts +0 -26
  500. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemoryTflite.js.map +0 -1
  501. package/build/sdk/studio/sdk/model/projectInfoResponseAllOfLatencyDevices.d.ts +0 -32
  502. package/build/sdk/studio/sdk/model/projectInfoResponseAllOfLatencyDevices.js +0 -67
  503. package/build/sdk/studio/sdk/model/projectInfoResponseAllOfLatencyDevices.js.map +0 -1
  504. package/build/sdk/studio/sdk/model/runAutoSegmenterRequest.d.ts +0 -27
  505. package/build/sdk/studio/sdk/model/runAutoSegmenterRequest.js +0 -42
  506. package/build/sdk/studio/sdk/model/runAutoSegmenterRequest.js.map +0 -1
  507. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequest.d.ts +0 -26
  508. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequest.js +0 -32
  509. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequest.js.map +0 -1
  510. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequestClusters.js +0 -37
  511. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequestClusters.js.map +0 -1
  512. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponse.js.map +0 -1
  513. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponseAllOf.d.ts +0 -25
  514. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponseAllOf.js +0 -32
  515. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponseAllOf.js.map +0 -1
  516. package/build/sdk/studio/sdk/model/updateNoteRequest.d.ts +0 -32
  517. package/build/sdk/studio/sdk/model/updateNoteRequest.js +0 -37
  518. package/build/sdk/studio/sdk/model/updateNoteRequest.js.map +0 -1
  519. package/build/sdk/studio/sdk/model/updateNoteResponse.d.ts +0 -25
  520. package/build/sdk/studio/sdk/model/updateNoteResponse.js +0 -27
  521. package/build/sdk/studio/sdk/model/updateNoteResponse.js.map +0 -1
  522. package/build/sdk/studio/sdk/model/whitelabelAdminCreateProjectRequest.js.map +0 -1
@@ -1,3799 +0,0 @@
1
- "use strict";
2
- /**
3
- * Edge Impulse API
4
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
- *
6
- * The version of the OpenAPI document: 1.0.0
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.OrganizationAllowDeveloperProfileApi = exports.OrganizationAllowDeveloperProfileApiApiKeys = void 0;
15
- // tslint:disable-next-line: variable-name, no-var-requires
16
- const PATH = require('path');
17
- // tslint:disable-next-line: no-unsafe-any
18
- module.paths.push(PATH.join(process.cwd(), 'node_modules'));
19
- const localVarRequest = require("request");
20
- const models_1 = require("../model/models");
21
- const models_2 = require("../model/models");
22
- let defaultBasePath = 'https://studio.edgeimpulse.com/v1';
23
- // ===============================================
24
- // This file is autogenerated - Please do not edit
25
- // ===============================================
26
- var OrganizationAllowDeveloperProfileApiApiKeys;
27
- (function (OrganizationAllowDeveloperProfileApiApiKeys) {
28
- OrganizationAllowDeveloperProfileApiApiKeys[OrganizationAllowDeveloperProfileApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
29
- OrganizationAllowDeveloperProfileApiApiKeys[OrganizationAllowDeveloperProfileApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
30
- OrganizationAllowDeveloperProfileApiApiKeys[OrganizationAllowDeveloperProfileApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
31
- })(OrganizationAllowDeveloperProfileApiApiKeys = exports.OrganizationAllowDeveloperProfileApiApiKeys || (exports.OrganizationAllowDeveloperProfileApiApiKeys = {}));
32
- class OrganizationAllowDeveloperProfileApi {
33
- constructor(basePathOrUsername, opts, password, basePath) {
34
- this._basePath = defaultBasePath;
35
- this.defaultHeaders = {};
36
- this._useQuerystring = false;
37
- this._opts = {};
38
- this.authentications = {
39
- 'default': new models_1.VoidAuth(),
40
- 'ApiKeyAuthentication': new models_2.ApiKeyAuth('header', 'x-api-key'),
41
- 'JWTAuthentication': new models_2.ApiKeyAuth('cookie', 'jwt'),
42
- 'JWTHttpHeaderAuthentication': new models_2.ApiKeyAuth('header', 'x-jwt-token'),
43
- };
44
- if (password) {
45
- if (basePath) {
46
- this.basePath = basePath;
47
- }
48
- }
49
- else {
50
- if (basePathOrUsername) {
51
- this.basePath = basePathOrUsername;
52
- }
53
- }
54
- this.opts = opts !== null && opts !== void 0 ? opts : {};
55
- }
56
- set useQuerystring(value) {
57
- this._useQuerystring = value;
58
- }
59
- set basePath(basePath) {
60
- this._basePath = basePath;
61
- }
62
- get basePath() {
63
- return this._basePath;
64
- }
65
- set opts(opts) {
66
- this._opts = opts;
67
- }
68
- get opts() {
69
- return this._opts;
70
- }
71
- setDefaultAuthentication(auth) {
72
- this.authentications.default = auth;
73
- }
74
- setApiKey(key, value) {
75
- this.authentications[OrganizationAllowDeveloperProfileApiApiKeys[key]].apiKey = value;
76
- }
77
- /**
78
- * Add an API key.
79
- * @summary Add API key
80
- * @param organizationId Organization ID
81
- * @param addOrganizationApiKeyRequest
82
- */
83
- async addOrganizationApiKey(organizationId, addOrganizationApiKeyRequest, options = { headers: {} }) {
84
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/apikeys'
85
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
86
- let localVarQueryParameters = {};
87
- let localVarHeaderParams = Object.assign({
88
- 'User-Agent': 'edgeimpulse-api nodejs'
89
- }, this.defaultHeaders);
90
- const produces = ['application/json'];
91
- // give precedence to 'application/json'
92
- if (produces.indexOf('application/json') >= 0) {
93
- localVarHeaderParams.Accept = 'application/json';
94
- }
95
- else {
96
- localVarHeaderParams.Accept = produces.join(',');
97
- }
98
- let localVarFormParams = {};
99
- // verify required parameter 'organizationId' is not null or undefined
100
- if (organizationId === null || organizationId === undefined) {
101
- throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationApiKey.');
102
- }
103
- // verify required parameter 'addOrganizationApiKeyRequest' is not null or undefined
104
- if (addOrganizationApiKeyRequest === null || addOrganizationApiKeyRequest === undefined) {
105
- throw new Error('Required parameter addOrganizationApiKeyRequest was null or undefined when calling addOrganizationApiKey.');
106
- }
107
- Object.assign(localVarHeaderParams, options.headers);
108
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
109
- let localVarUseFormData = false;
110
- let localVarRequestOptions = {
111
- method: 'POST',
112
- qs: localVarQueryParameters,
113
- headers: localVarHeaderParams,
114
- uri: localVarPath,
115
- useQuerystring: this._useQuerystring,
116
- agentOptions: { keepAlive: false },
117
- json: true,
118
- body: models_1.ObjectSerializer.serialize(addOrganizationApiKeyRequest, "AddOrganizationApiKeyRequest")
119
- };
120
- let authenticationPromise = Promise.resolve();
121
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
122
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
123
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
124
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
125
- return authenticationPromise.then(() => {
126
- if (Object.keys(localVarFormParams).length) {
127
- if (localVarUseFormData) {
128
- localVarRequestOptions.formData = localVarFormParams;
129
- }
130
- else {
131
- localVarRequestOptions.form = localVarFormParams;
132
- }
133
- }
134
- return new Promise((resolve, reject) => {
135
- localVarRequest(localVarRequestOptions, (error, response, body) => {
136
- if (error) {
137
- reject(error);
138
- }
139
- else {
140
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
141
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
142
- if (typeof body.success === 'boolean' && !body.success) {
143
- reject(new Error(body.error || errString));
144
- }
145
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
146
- resolve(body);
147
- }
148
- else {
149
- reject(errString);
150
- }
151
- }
152
- });
153
- });
154
- });
155
- }
156
- /**
157
- * Adds a deploy block.
158
- * @summary Add deploy block
159
- * @param organizationId Organization ID
160
- * @param name
161
- * @param dockerContainer
162
- * @param description
163
- * @param cliArguments
164
- * @param requestsCpu
165
- * @param requestsMemory
166
- * @param limitsCpu
167
- * @param limitsMemory
168
- * @param photo
169
- * @param integrateUrl
170
- * @param privileged
171
- * @param mountLearnBlock
172
- * @param supportsEonCompiler
173
- * @param showOptimizations
174
- * @param category
175
- */
176
- async addOrganizationDeployBlock(organizationId, params, options = { headers: {} }) {
177
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy'
178
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
179
- let localVarQueryParameters = {};
180
- let localVarHeaderParams = Object.assign({
181
- 'User-Agent': 'edgeimpulse-api nodejs'
182
- }, this.defaultHeaders);
183
- const produces = ['application/json'];
184
- // give precedence to 'application/json'
185
- if (produces.indexOf('application/json') >= 0) {
186
- localVarHeaderParams.Accept = 'application/json';
187
- }
188
- else {
189
- localVarHeaderParams.Accept = produces.join(',');
190
- }
191
- let localVarFormParams = {};
192
- // verify required parameter 'organizationId' is not null or undefined
193
- if (organizationId === null || organizationId === undefined) {
194
- throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationDeployBlock.');
195
- }
196
- // verify required parameter 'name' is not null or undefined
197
- if (params.name === null || params.name === undefined) {
198
- throw new Error('Required parameter params.name was null or undefined when calling addOrganizationDeployBlock.');
199
- }
200
- // verify required parameter 'dockerContainer' is not null or undefined
201
- if (params.dockerContainer === null || params.dockerContainer === undefined) {
202
- throw new Error('Required parameter params.dockerContainer was null or undefined when calling addOrganizationDeployBlock.');
203
- }
204
- // verify required parameter 'description' is not null or undefined
205
- if (params.description === null || params.description === undefined) {
206
- throw new Error('Required parameter params.description was null or undefined when calling addOrganizationDeployBlock.');
207
- }
208
- // verify required parameter 'cliArguments' is not null or undefined
209
- if (params.cliArguments === null || params.cliArguments === undefined) {
210
- throw new Error('Required parameter params.cliArguments was null or undefined when calling addOrganizationDeployBlock.');
211
- }
212
- Object.assign(localVarHeaderParams, options.headers);
213
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
214
- let localVarUseFormData = false;
215
- if (params.name !== undefined) {
216
- localVarFormParams['name'] = models_1.ObjectSerializer.serialize(params.name, "string");
217
- }
218
- if (params.dockerContainer !== undefined) {
219
- localVarFormParams['dockerContainer'] = models_1.ObjectSerializer.serialize(params.dockerContainer, "string");
220
- }
221
- if (params.description !== undefined) {
222
- localVarFormParams['description'] = models_1.ObjectSerializer.serialize(params.description, "string");
223
- }
224
- if (params.cliArguments !== undefined) {
225
- localVarFormParams['cliArguments'] = models_1.ObjectSerializer.serialize(params.cliArguments, "string");
226
- }
227
- if (params.requestsCpu !== undefined) {
228
- localVarFormParams['requestsCpu'] = models_1.ObjectSerializer.serialize(params.requestsCpu, "number");
229
- }
230
- if (params.requestsMemory !== undefined) {
231
- localVarFormParams['requestsMemory'] = models_1.ObjectSerializer.serialize(params.requestsMemory, "number");
232
- }
233
- if (params.limitsCpu !== undefined) {
234
- localVarFormParams['limitsCpu'] = models_1.ObjectSerializer.serialize(params.limitsCpu, "number");
235
- }
236
- if (params.limitsMemory !== undefined) {
237
- localVarFormParams['limitsMemory'] = models_1.ObjectSerializer.serialize(params.limitsMemory, "number");
238
- }
239
- if (params.photo !== undefined) {
240
- localVarFormParams['photo'] = params.photo;
241
- }
242
- localVarUseFormData = true;
243
- if (params.integrateUrl !== undefined) {
244
- localVarFormParams['integrateUrl'] = models_1.ObjectSerializer.serialize(params.integrateUrl, "string");
245
- }
246
- if (params.privileged !== undefined) {
247
- localVarFormParams['privileged'] = models_1.ObjectSerializer.serialize(params.privileged, "boolean");
248
- }
249
- if (params.mountLearnBlock !== undefined) {
250
- localVarFormParams['mountLearnBlock'] = models_1.ObjectSerializer.serialize(params.mountLearnBlock, "boolean");
251
- }
252
- if (params.supportsEonCompiler !== undefined) {
253
- localVarFormParams['supportsEonCompiler'] = models_1.ObjectSerializer.serialize(params.supportsEonCompiler, "boolean");
254
- }
255
- if (params.showOptimizations !== undefined) {
256
- localVarFormParams['showOptimizations'] = models_1.ObjectSerializer.serialize(params.showOptimizations, "boolean");
257
- }
258
- if (params.category !== undefined) {
259
- localVarFormParams['category'] = models_1.ObjectSerializer.serialize(params.category, "string");
260
- }
261
- let localVarRequestOptions = {
262
- method: 'POST',
263
- qs: localVarQueryParameters,
264
- headers: localVarHeaderParams,
265
- uri: localVarPath,
266
- useQuerystring: this._useQuerystring,
267
- agentOptions: { keepAlive: false },
268
- json: true,
269
- };
270
- let authenticationPromise = Promise.resolve();
271
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
272
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
273
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
274
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
275
- return authenticationPromise.then(() => {
276
- if (Object.keys(localVarFormParams).length) {
277
- if (localVarUseFormData) {
278
- localVarRequestOptions.formData = localVarFormParams;
279
- }
280
- else {
281
- localVarRequestOptions.form = localVarFormParams;
282
- }
283
- }
284
- return new Promise((resolve, reject) => {
285
- localVarRequest(localVarRequestOptions, (error, response, body) => {
286
- if (error) {
287
- reject(error);
288
- }
289
- else {
290
- body = models_1.ObjectSerializer.deserialize(body, "AddOrganizationDeployBlockResponse");
291
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
292
- if (typeof body.success === 'boolean' && !body.success) {
293
- reject(new Error(body.error || errString));
294
- }
295
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
296
- resolve(body);
297
- }
298
- else {
299
- reject(errString);
300
- }
301
- }
302
- });
303
- });
304
- });
305
- }
306
- /**
307
- * Adds a dsp block.
308
- * @summary Add dsp block
309
- * @param organizationId Organization ID
310
- * @param addOrganizationDspBlockRequest
311
- */
312
- async addOrganizationDspBlock(organizationId, addOrganizationDspBlockRequest, options = { headers: {} }) {
313
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp'
314
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
315
- let localVarQueryParameters = {};
316
- let localVarHeaderParams = Object.assign({
317
- 'User-Agent': 'edgeimpulse-api nodejs'
318
- }, this.defaultHeaders);
319
- const produces = ['application/json'];
320
- // give precedence to 'application/json'
321
- if (produces.indexOf('application/json') >= 0) {
322
- localVarHeaderParams.Accept = 'application/json';
323
- }
324
- else {
325
- localVarHeaderParams.Accept = produces.join(',');
326
- }
327
- let localVarFormParams = {};
328
- // verify required parameter 'organizationId' is not null or undefined
329
- if (organizationId === null || organizationId === undefined) {
330
- throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationDspBlock.');
331
- }
332
- // verify required parameter 'addOrganizationDspBlockRequest' is not null or undefined
333
- if (addOrganizationDspBlockRequest === null || addOrganizationDspBlockRequest === undefined) {
334
- throw new Error('Required parameter addOrganizationDspBlockRequest was null or undefined when calling addOrganizationDspBlock.');
335
- }
336
- Object.assign(localVarHeaderParams, options.headers);
337
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
338
- let localVarUseFormData = false;
339
- let localVarRequestOptions = {
340
- method: 'POST',
341
- qs: localVarQueryParameters,
342
- headers: localVarHeaderParams,
343
- uri: localVarPath,
344
- useQuerystring: this._useQuerystring,
345
- agentOptions: { keepAlive: false },
346
- json: true,
347
- body: models_1.ObjectSerializer.serialize(addOrganizationDspBlockRequest, "AddOrganizationDspBlockRequest")
348
- };
349
- let authenticationPromise = Promise.resolve();
350
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
351
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
352
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
353
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
354
- return authenticationPromise.then(() => {
355
- if (Object.keys(localVarFormParams).length) {
356
- if (localVarUseFormData) {
357
- localVarRequestOptions.formData = localVarFormParams;
358
- }
359
- else {
360
- localVarRequestOptions.form = localVarFormParams;
361
- }
362
- }
363
- return new Promise((resolve, reject) => {
364
- localVarRequest(localVarRequestOptions, (error, response, body) => {
365
- if (error) {
366
- reject(error);
367
- }
368
- else {
369
- body = models_1.ObjectSerializer.deserialize(body, "AddOrganizationDspBlockResponse");
370
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
371
- if (typeof body.success === 'boolean' && !body.success) {
372
- reject(new Error(body.error || errString));
373
- }
374
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
375
- resolve(body);
376
- }
377
- else {
378
- reject(errString);
379
- }
380
- }
381
- });
382
- });
383
- });
384
- }
385
- /**
386
- * Adds a secret.
387
- * @summary Add secret
388
- * @param organizationId Organization ID
389
- * @param addOrganizationSecretRequest
390
- */
391
- async addOrganizationSecret(organizationId, addOrganizationSecretRequest, options = { headers: {} }) {
392
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/secrets'
393
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
394
- let localVarQueryParameters = {};
395
- let localVarHeaderParams = Object.assign({
396
- 'User-Agent': 'edgeimpulse-api nodejs'
397
- }, this.defaultHeaders);
398
- const produces = ['application/json'];
399
- // give precedence to 'application/json'
400
- if (produces.indexOf('application/json') >= 0) {
401
- localVarHeaderParams.Accept = 'application/json';
402
- }
403
- else {
404
- localVarHeaderParams.Accept = produces.join(',');
405
- }
406
- let localVarFormParams = {};
407
- // verify required parameter 'organizationId' is not null or undefined
408
- if (organizationId === null || organizationId === undefined) {
409
- throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationSecret.');
410
- }
411
- // verify required parameter 'addOrganizationSecretRequest' is not null or undefined
412
- if (addOrganizationSecretRequest === null || addOrganizationSecretRequest === undefined) {
413
- throw new Error('Required parameter addOrganizationSecretRequest was null or undefined when calling addOrganizationSecret.');
414
- }
415
- Object.assign(localVarHeaderParams, options.headers);
416
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
417
- let localVarUseFormData = false;
418
- let localVarRequestOptions = {
419
- method: 'POST',
420
- qs: localVarQueryParameters,
421
- headers: localVarHeaderParams,
422
- uri: localVarPath,
423
- useQuerystring: this._useQuerystring,
424
- agentOptions: { keepAlive: false },
425
- json: true,
426
- body: models_1.ObjectSerializer.serialize(addOrganizationSecretRequest, "AddOrganizationSecretRequest")
427
- };
428
- let authenticationPromise = Promise.resolve();
429
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
430
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
431
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
432
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
433
- return authenticationPromise.then(() => {
434
- if (Object.keys(localVarFormParams).length) {
435
- if (localVarUseFormData) {
436
- localVarRequestOptions.formData = localVarFormParams;
437
- }
438
- else {
439
- localVarRequestOptions.form = localVarFormParams;
440
- }
441
- }
442
- return new Promise((resolve, reject) => {
443
- localVarRequest(localVarRequestOptions, (error, response, body) => {
444
- if (error) {
445
- reject(error);
446
- }
447
- else {
448
- body = models_1.ObjectSerializer.deserialize(body, "AddOrganizationSecretResponse");
449
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
450
- if (typeof body.success === 'boolean' && !body.success) {
451
- reject(new Error(body.error || errString));
452
- }
453
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
454
- resolve(body);
455
- }
456
- else {
457
- reject(errString);
458
- }
459
- }
460
- });
461
- });
462
- });
463
- }
464
- /**
465
- * Adds a transfer learning block.
466
- * @summary Add transfer learning block
467
- * @param organizationId Organization ID
468
- * @param addOrganizationTransferLearningBlockRequest
469
- */
470
- async addOrganizationTransferLearningBlock(organizationId, addOrganizationTransferLearningBlockRequest, options = { headers: {} }) {
471
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transfer-learning'
472
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
473
- let localVarQueryParameters = {};
474
- let localVarHeaderParams = Object.assign({
475
- 'User-Agent': 'edgeimpulse-api nodejs'
476
- }, this.defaultHeaders);
477
- const produces = ['application/json'];
478
- // give precedence to 'application/json'
479
- if (produces.indexOf('application/json') >= 0) {
480
- localVarHeaderParams.Accept = 'application/json';
481
- }
482
- else {
483
- localVarHeaderParams.Accept = produces.join(',');
484
- }
485
- let localVarFormParams = {};
486
- // verify required parameter 'organizationId' is not null or undefined
487
- if (organizationId === null || organizationId === undefined) {
488
- throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationTransferLearningBlock.');
489
- }
490
- // verify required parameter 'addOrganizationTransferLearningBlockRequest' is not null or undefined
491
- if (addOrganizationTransferLearningBlockRequest === null || addOrganizationTransferLearningBlockRequest === undefined) {
492
- throw new Error('Required parameter addOrganizationTransferLearningBlockRequest was null or undefined when calling addOrganizationTransferLearningBlock.');
493
- }
494
- Object.assign(localVarHeaderParams, options.headers);
495
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
496
- let localVarUseFormData = false;
497
- let localVarRequestOptions = {
498
- method: 'POST',
499
- qs: localVarQueryParameters,
500
- headers: localVarHeaderParams,
501
- uri: localVarPath,
502
- useQuerystring: this._useQuerystring,
503
- agentOptions: { keepAlive: false },
504
- json: true,
505
- body: models_1.ObjectSerializer.serialize(addOrganizationTransferLearningBlockRequest, "AddOrganizationTransferLearningBlockRequest")
506
- };
507
- let authenticationPromise = Promise.resolve();
508
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
509
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
510
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
511
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
512
- return authenticationPromise.then(() => {
513
- if (Object.keys(localVarFormParams).length) {
514
- if (localVarUseFormData) {
515
- localVarRequestOptions.formData = localVarFormParams;
516
- }
517
- else {
518
- localVarRequestOptions.form = localVarFormParams;
519
- }
520
- }
521
- return new Promise((resolve, reject) => {
522
- localVarRequest(localVarRequestOptions, (error, response, body) => {
523
- if (error) {
524
- reject(error);
525
- }
526
- else {
527
- body = models_1.ObjectSerializer.deserialize(body, "AddOrganizationTransferLearningBlockResponse");
528
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
529
- if (typeof body.success === 'boolean' && !body.success) {
530
- reject(new Error(body.error || errString));
531
- }
532
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
533
- resolve(body);
534
- }
535
- else {
536
- reject(errString);
537
- }
538
- }
539
- });
540
- });
541
- });
542
- }
543
- /**
544
- * Adds a transformation block.
545
- * @summary Add transformation block
546
- * @param organizationId Organization ID
547
- * @param addOrganizationTransformationBlockRequest
548
- */
549
- async addOrganizationTransformationBlock(organizationId, addOrganizationTransformationBlockRequest, options = { headers: {} }) {
550
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation'
551
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
552
- let localVarQueryParameters = {};
553
- let localVarHeaderParams = Object.assign({
554
- 'User-Agent': 'edgeimpulse-api nodejs'
555
- }, this.defaultHeaders);
556
- const produces = ['application/json'];
557
- // give precedence to 'application/json'
558
- if (produces.indexOf('application/json') >= 0) {
559
- localVarHeaderParams.Accept = 'application/json';
560
- }
561
- else {
562
- localVarHeaderParams.Accept = produces.join(',');
563
- }
564
- let localVarFormParams = {};
565
- // verify required parameter 'organizationId' is not null or undefined
566
- if (organizationId === null || organizationId === undefined) {
567
- throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationTransformationBlock.');
568
- }
569
- // verify required parameter 'addOrganizationTransformationBlockRequest' is not null or undefined
570
- if (addOrganizationTransformationBlockRequest === null || addOrganizationTransformationBlockRequest === undefined) {
571
- throw new Error('Required parameter addOrganizationTransformationBlockRequest was null or undefined when calling addOrganizationTransformationBlock.');
572
- }
573
- Object.assign(localVarHeaderParams, options.headers);
574
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
575
- let localVarUseFormData = false;
576
- let localVarRequestOptions = {
577
- method: 'POST',
578
- qs: localVarQueryParameters,
579
- headers: localVarHeaderParams,
580
- uri: localVarPath,
581
- useQuerystring: this._useQuerystring,
582
- agentOptions: { keepAlive: false },
583
- json: true,
584
- body: models_1.ObjectSerializer.serialize(addOrganizationTransformationBlockRequest, "AddOrganizationTransformationBlockRequest")
585
- };
586
- let authenticationPromise = Promise.resolve();
587
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
588
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
589
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
590
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
591
- return authenticationPromise.then(() => {
592
- if (Object.keys(localVarFormParams).length) {
593
- if (localVarUseFormData) {
594
- localVarRequestOptions.formData = localVarFormParams;
595
- }
596
- else {
597
- localVarRequestOptions.form = localVarFormParams;
598
- }
599
- }
600
- return new Promise((resolve, reject) => {
601
- localVarRequest(localVarRequestOptions, (error, response, body) => {
602
- if (error) {
603
- reject(error);
604
- }
605
- else {
606
- body = models_1.ObjectSerializer.deserialize(body, "AddOrganizationTransformationBlockResponse");
607
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
608
- if (typeof body.success === 'boolean' && !body.success) {
609
- reject(new Error(body.error || errString));
610
- }
611
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
612
- resolve(body);
613
- }
614
- else {
615
- reject(errString);
616
- }
617
- }
618
- });
619
- });
620
- });
621
- }
622
- /**
623
- * Cancel a running job.
624
- * @summary Cancel job
625
- * @param organizationId Organization ID
626
- * @param jobId Job ID
627
- * @param forceCancel If set to \&#39;true\&#39;, we won\&#39;t wait for the job cluster to cancel the job, and will mark the job as finished.
628
- */
629
- async cancelOrganizationJob(organizationId, jobId, queryParams, options = { headers: {} }) {
630
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs/{jobId}/cancel'
631
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
632
- .replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
633
- let localVarQueryParameters = {};
634
- let localVarHeaderParams = Object.assign({
635
- 'User-Agent': 'edgeimpulse-api nodejs'
636
- }, this.defaultHeaders);
637
- const produces = ['application/json'];
638
- // give precedence to 'application/json'
639
- if (produces.indexOf('application/json') >= 0) {
640
- localVarHeaderParams.Accept = 'application/json';
641
- }
642
- else {
643
- localVarHeaderParams.Accept = produces.join(',');
644
- }
645
- let localVarFormParams = {};
646
- // verify required parameter 'organizationId' is not null or undefined
647
- if (organizationId === null || organizationId === undefined) {
648
- throw new Error('Required parameter organizationId was null or undefined when calling cancelOrganizationJob.');
649
- }
650
- // verify required parameter 'jobId' is not null or undefined
651
- if (jobId === null || jobId === undefined) {
652
- throw new Error('Required parameter jobId was null or undefined when calling cancelOrganizationJob.');
653
- }
654
- if (queryParams.forceCancel !== undefined) {
655
- localVarQueryParameters['forceCancel'] = models_1.ObjectSerializer.serialize(queryParams.forceCancel, "string");
656
- }
657
- Object.assign(localVarHeaderParams, options.headers);
658
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
659
- let localVarUseFormData = false;
660
- let localVarRequestOptions = {
661
- method: 'POST',
662
- qs: localVarQueryParameters,
663
- headers: localVarHeaderParams,
664
- uri: localVarPath,
665
- useQuerystring: this._useQuerystring,
666
- agentOptions: { keepAlive: false },
667
- json: true,
668
- };
669
- let authenticationPromise = Promise.resolve();
670
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
671
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
672
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
673
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
674
- return authenticationPromise.then(() => {
675
- if (Object.keys(localVarFormParams).length) {
676
- if (localVarUseFormData) {
677
- localVarRequestOptions.formData = localVarFormParams;
678
- }
679
- else {
680
- localVarRequestOptions.form = localVarFormParams;
681
- }
682
- }
683
- return new Promise((resolve, reject) => {
684
- localVarRequest(localVarRequestOptions, (error, response, body) => {
685
- if (error) {
686
- reject(error);
687
- }
688
- else {
689
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
690
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
691
- if (typeof body.success === 'boolean' && !body.success) {
692
- reject(new Error(body.error || errString));
693
- }
694
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
695
- resolve(body);
696
- }
697
- else {
698
- reject(errString);
699
- }
700
- }
701
- });
702
- });
703
- });
704
- }
705
- /**
706
- * Create a new organization. This is an internal API.
707
- * @summary Create new organization
708
- * @param createOrganizationRequest
709
- */
710
- async createOrganization(createOrganizationRequest, options = { headers: {} }) {
711
- const localVarPath = this.basePath + '/api/organizations/create';
712
- let localVarQueryParameters = {};
713
- let localVarHeaderParams = Object.assign({
714
- 'User-Agent': 'edgeimpulse-api nodejs'
715
- }, this.defaultHeaders);
716
- const produces = ['application/json'];
717
- // give precedence to 'application/json'
718
- if (produces.indexOf('application/json') >= 0) {
719
- localVarHeaderParams.Accept = 'application/json';
720
- }
721
- else {
722
- localVarHeaderParams.Accept = produces.join(',');
723
- }
724
- let localVarFormParams = {};
725
- // verify required parameter 'createOrganizationRequest' is not null or undefined
726
- if (createOrganizationRequest === null || createOrganizationRequest === undefined) {
727
- throw new Error('Required parameter createOrganizationRequest was null or undefined when calling createOrganization.');
728
- }
729
- Object.assign(localVarHeaderParams, options.headers);
730
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
731
- let localVarUseFormData = false;
732
- let localVarRequestOptions = {
733
- method: 'POST',
734
- qs: localVarQueryParameters,
735
- headers: localVarHeaderParams,
736
- uri: localVarPath,
737
- useQuerystring: this._useQuerystring,
738
- agentOptions: { keepAlive: false },
739
- json: true,
740
- body: models_1.ObjectSerializer.serialize(createOrganizationRequest, "CreateOrganizationRequest")
741
- };
742
- let authenticationPromise = Promise.resolve();
743
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
744
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
745
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
746
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
747
- return authenticationPromise.then(() => {
748
- if (Object.keys(localVarFormParams).length) {
749
- if (localVarUseFormData) {
750
- localVarRequestOptions.formData = localVarFormParams;
751
- }
752
- else {
753
- localVarRequestOptions.form = localVarFormParams;
754
- }
755
- }
756
- return new Promise((resolve, reject) => {
757
- localVarRequest(localVarRequestOptions, (error, response, body) => {
758
- if (error) {
759
- reject(error);
760
- }
761
- else {
762
- body = models_1.ObjectSerializer.deserialize(body, "CreateOrganizationResponse");
763
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
764
- if (typeof body.success === 'boolean' && !body.success) {
765
- reject(new Error(body.error || errString));
766
- }
767
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
768
- resolve(body);
769
- }
770
- else {
771
- reject(errString);
772
- }
773
- }
774
- });
775
- });
776
- });
777
- }
778
- /**
779
- * Create an organizational pipelines
780
- * @summary Create pipeline
781
- * @param organizationId Organization ID
782
- * @param organizationUpdatePipelineBody
783
- */
784
- async createOrganizationPipeline(organizationId, organizationUpdatePipelineBody, options = { headers: {} }) {
785
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines'
786
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
787
- let localVarQueryParameters = {};
788
- let localVarHeaderParams = Object.assign({
789
- 'User-Agent': 'edgeimpulse-api nodejs'
790
- }, this.defaultHeaders);
791
- const produces = ['application/json'];
792
- // give precedence to 'application/json'
793
- if (produces.indexOf('application/json') >= 0) {
794
- localVarHeaderParams.Accept = 'application/json';
795
- }
796
- else {
797
- localVarHeaderParams.Accept = produces.join(',');
798
- }
799
- let localVarFormParams = {};
800
- // verify required parameter 'organizationId' is not null or undefined
801
- if (organizationId === null || organizationId === undefined) {
802
- throw new Error('Required parameter organizationId was null or undefined when calling createOrganizationPipeline.');
803
- }
804
- // verify required parameter 'organizationUpdatePipelineBody' is not null or undefined
805
- if (organizationUpdatePipelineBody === null || organizationUpdatePipelineBody === undefined) {
806
- throw new Error('Required parameter organizationUpdatePipelineBody was null or undefined when calling createOrganizationPipeline.');
807
- }
808
- Object.assign(localVarHeaderParams, options.headers);
809
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
810
- let localVarUseFormData = false;
811
- let localVarRequestOptions = {
812
- method: 'POST',
813
- qs: localVarQueryParameters,
814
- headers: localVarHeaderParams,
815
- uri: localVarPath,
816
- useQuerystring: this._useQuerystring,
817
- agentOptions: { keepAlive: false },
818
- json: true,
819
- body: models_1.ObjectSerializer.serialize(organizationUpdatePipelineBody, "OrganizationUpdatePipelineBody")
820
- };
821
- let authenticationPromise = Promise.resolve();
822
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
823
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
824
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
825
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
826
- return authenticationPromise.then(() => {
827
- if (Object.keys(localVarFormParams).length) {
828
- if (localVarUseFormData) {
829
- localVarRequestOptions.formData = localVarFormParams;
830
- }
831
- else {
832
- localVarRequestOptions.form = localVarFormParams;
833
- }
834
- }
835
- return new Promise((resolve, reject) => {
836
- localVarRequest(localVarRequestOptions, (error, response, body) => {
837
- if (error) {
838
- reject(error);
839
- }
840
- else {
841
- body = models_1.ObjectSerializer.deserialize(body, "CreatePipelineResponse");
842
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
843
- if (typeof body.success === 'boolean' && !body.success) {
844
- reject(new Error(body.error || errString));
845
- }
846
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
847
- resolve(body);
848
- }
849
- else {
850
- reject(errString);
851
- }
852
- }
853
- });
854
- });
855
- });
856
- }
857
- /**
858
- * Deletes a deploy block.
859
- * @summary Delete deploy block
860
- * @param organizationId Organization ID
861
- * @param deployId Deploy block ID.
862
- */
863
- async deleteOrganizationDeployBlock(organizationId, deployId, options = { headers: {} }) {
864
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy/{deployId}'
865
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
866
- .replace('{' + 'deployId' + '}', encodeURIComponent(String(deployId)));
867
- let localVarQueryParameters = {};
868
- let localVarHeaderParams = Object.assign({
869
- 'User-Agent': 'edgeimpulse-api nodejs'
870
- }, this.defaultHeaders);
871
- const produces = ['application/json'];
872
- // give precedence to 'application/json'
873
- if (produces.indexOf('application/json') >= 0) {
874
- localVarHeaderParams.Accept = 'application/json';
875
- }
876
- else {
877
- localVarHeaderParams.Accept = produces.join(',');
878
- }
879
- let localVarFormParams = {};
880
- // verify required parameter 'organizationId' is not null or undefined
881
- if (organizationId === null || organizationId === undefined) {
882
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationDeployBlock.');
883
- }
884
- // verify required parameter 'deployId' is not null or undefined
885
- if (deployId === null || deployId === undefined) {
886
- throw new Error('Required parameter deployId was null or undefined when calling deleteOrganizationDeployBlock.');
887
- }
888
- Object.assign(localVarHeaderParams, options.headers);
889
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
890
- let localVarUseFormData = false;
891
- let localVarRequestOptions = {
892
- method: 'DELETE',
893
- qs: localVarQueryParameters,
894
- headers: localVarHeaderParams,
895
- uri: localVarPath,
896
- useQuerystring: this._useQuerystring,
897
- agentOptions: { keepAlive: false },
898
- json: true,
899
- };
900
- let authenticationPromise = Promise.resolve();
901
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
902
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
903
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
904
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
905
- return authenticationPromise.then(() => {
906
- if (Object.keys(localVarFormParams).length) {
907
- if (localVarUseFormData) {
908
- localVarRequestOptions.formData = localVarFormParams;
909
- }
910
- else {
911
- localVarRequestOptions.form = localVarFormParams;
912
- }
913
- }
914
- return new Promise((resolve, reject) => {
915
- localVarRequest(localVarRequestOptions, (error, response, body) => {
916
- if (error) {
917
- reject(error);
918
- }
919
- else {
920
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
921
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
922
- if (typeof body.success === 'boolean' && !body.success) {
923
- reject(new Error(body.error || errString));
924
- }
925
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
926
- resolve(body);
927
- }
928
- else {
929
- reject(errString);
930
- }
931
- }
932
- });
933
- });
934
- });
935
- }
936
- /**
937
- * Deletes a dsp block.
938
- * @summary Delete dsp block
939
- * @param organizationId Organization ID
940
- * @param dspId DSP Block ID, use the impulse functions to retrieve the ID
941
- */
942
- async deleteOrganizationDspBlock(organizationId, dspId, options = { headers: {} }) {
943
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp/{dspId}'
944
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
945
- .replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
946
- let localVarQueryParameters = {};
947
- let localVarHeaderParams = Object.assign({
948
- 'User-Agent': 'edgeimpulse-api nodejs'
949
- }, this.defaultHeaders);
950
- const produces = ['application/json'];
951
- // give precedence to 'application/json'
952
- if (produces.indexOf('application/json') >= 0) {
953
- localVarHeaderParams.Accept = 'application/json';
954
- }
955
- else {
956
- localVarHeaderParams.Accept = produces.join(',');
957
- }
958
- let localVarFormParams = {};
959
- // verify required parameter 'organizationId' is not null or undefined
960
- if (organizationId === null || organizationId === undefined) {
961
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationDspBlock.');
962
- }
963
- // verify required parameter 'dspId' is not null or undefined
964
- if (dspId === null || dspId === undefined) {
965
- throw new Error('Required parameter dspId was null or undefined when calling deleteOrganizationDspBlock.');
966
- }
967
- Object.assign(localVarHeaderParams, options.headers);
968
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
969
- let localVarUseFormData = false;
970
- let localVarRequestOptions = {
971
- method: 'DELETE',
972
- qs: localVarQueryParameters,
973
- headers: localVarHeaderParams,
974
- uri: localVarPath,
975
- useQuerystring: this._useQuerystring,
976
- agentOptions: { keepAlive: false },
977
- json: true,
978
- };
979
- let authenticationPromise = Promise.resolve();
980
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
981
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
982
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
983
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
984
- return authenticationPromise.then(() => {
985
- if (Object.keys(localVarFormParams).length) {
986
- if (localVarUseFormData) {
987
- localVarRequestOptions.formData = localVarFormParams;
988
- }
989
- else {
990
- localVarRequestOptions.form = localVarFormParams;
991
- }
992
- }
993
- return new Promise((resolve, reject) => {
994
- localVarRequest(localVarRequestOptions, (error, response, body) => {
995
- if (error) {
996
- reject(error);
997
- }
998
- else {
999
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1000
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1001
- if (typeof body.success === 'boolean' && !body.success) {
1002
- reject(new Error(body.error || errString));
1003
- }
1004
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1005
- resolve(body);
1006
- }
1007
- else {
1008
- reject(errString);
1009
- }
1010
- }
1011
- });
1012
- });
1013
- });
1014
- }
1015
- /**
1016
- * Delete an organizational pipelines
1017
- * @summary Delete pipeline
1018
- * @param organizationId Organization ID
1019
- * @param pipelineId Pipeline ID
1020
- */
1021
- async deleteOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
1022
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
1023
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1024
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
1025
- let localVarQueryParameters = {};
1026
- let localVarHeaderParams = Object.assign({
1027
- 'User-Agent': 'edgeimpulse-api nodejs'
1028
- }, this.defaultHeaders);
1029
- const produces = ['application/json'];
1030
- // give precedence to 'application/json'
1031
- if (produces.indexOf('application/json') >= 0) {
1032
- localVarHeaderParams.Accept = 'application/json';
1033
- }
1034
- else {
1035
- localVarHeaderParams.Accept = produces.join(',');
1036
- }
1037
- let localVarFormParams = {};
1038
- // verify required parameter 'organizationId' is not null or undefined
1039
- if (organizationId === null || organizationId === undefined) {
1040
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationPipeline.');
1041
- }
1042
- // verify required parameter 'pipelineId' is not null or undefined
1043
- if (pipelineId === null || pipelineId === undefined) {
1044
- throw new Error('Required parameter pipelineId was null or undefined when calling deleteOrganizationPipeline.');
1045
- }
1046
- Object.assign(localVarHeaderParams, options.headers);
1047
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1048
- let localVarUseFormData = false;
1049
- let localVarRequestOptions = {
1050
- method: 'DELETE',
1051
- qs: localVarQueryParameters,
1052
- headers: localVarHeaderParams,
1053
- uri: localVarPath,
1054
- useQuerystring: this._useQuerystring,
1055
- agentOptions: { keepAlive: false },
1056
- json: true,
1057
- };
1058
- let authenticationPromise = Promise.resolve();
1059
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1060
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1061
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1062
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1063
- return authenticationPromise.then(() => {
1064
- if (Object.keys(localVarFormParams).length) {
1065
- if (localVarUseFormData) {
1066
- localVarRequestOptions.formData = localVarFormParams;
1067
- }
1068
- else {
1069
- localVarRequestOptions.form = localVarFormParams;
1070
- }
1071
- }
1072
- return new Promise((resolve, reject) => {
1073
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1074
- if (error) {
1075
- reject(error);
1076
- }
1077
- else {
1078
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1079
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1080
- if (typeof body.success === 'boolean' && !body.success) {
1081
- reject(new Error(body.error || errString));
1082
- }
1083
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1084
- resolve(body);
1085
- }
1086
- else {
1087
- reject(errString);
1088
- }
1089
- }
1090
- });
1091
- });
1092
- });
1093
- }
1094
- /**
1095
- * Deletes a transfer learning block.
1096
- * @summary Delete transfer learning block
1097
- * @param organizationId Organization ID
1098
- * @param secretId Secret ID
1099
- */
1100
- async deleteOrganizationSecret(organizationId, secretId, options = { headers: {} }) {
1101
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/secrets/{secretId}'
1102
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1103
- .replace('{' + 'secretId' + '}', encodeURIComponent(String(secretId)));
1104
- let localVarQueryParameters = {};
1105
- let localVarHeaderParams = Object.assign({
1106
- 'User-Agent': 'edgeimpulse-api nodejs'
1107
- }, this.defaultHeaders);
1108
- const produces = ['application/json'];
1109
- // give precedence to 'application/json'
1110
- if (produces.indexOf('application/json') >= 0) {
1111
- localVarHeaderParams.Accept = 'application/json';
1112
- }
1113
- else {
1114
- localVarHeaderParams.Accept = produces.join(',');
1115
- }
1116
- let localVarFormParams = {};
1117
- // verify required parameter 'organizationId' is not null or undefined
1118
- if (organizationId === null || organizationId === undefined) {
1119
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationSecret.');
1120
- }
1121
- // verify required parameter 'secretId' is not null or undefined
1122
- if (secretId === null || secretId === undefined) {
1123
- throw new Error('Required parameter secretId was null or undefined when calling deleteOrganizationSecret.');
1124
- }
1125
- Object.assign(localVarHeaderParams, options.headers);
1126
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1127
- let localVarUseFormData = false;
1128
- let localVarRequestOptions = {
1129
- method: 'DELETE',
1130
- qs: localVarQueryParameters,
1131
- headers: localVarHeaderParams,
1132
- uri: localVarPath,
1133
- useQuerystring: this._useQuerystring,
1134
- agentOptions: { keepAlive: false },
1135
- json: true,
1136
- };
1137
- let authenticationPromise = Promise.resolve();
1138
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1139
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1140
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1141
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1142
- return authenticationPromise.then(() => {
1143
- if (Object.keys(localVarFormParams).length) {
1144
- if (localVarUseFormData) {
1145
- localVarRequestOptions.formData = localVarFormParams;
1146
- }
1147
- else {
1148
- localVarRequestOptions.form = localVarFormParams;
1149
- }
1150
- }
1151
- return new Promise((resolve, reject) => {
1152
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1153
- if (error) {
1154
- reject(error);
1155
- }
1156
- else {
1157
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1158
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1159
- if (typeof body.success === 'boolean' && !body.success) {
1160
- reject(new Error(body.error || errString));
1161
- }
1162
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1163
- resolve(body);
1164
- }
1165
- else {
1166
- reject(errString);
1167
- }
1168
- }
1169
- });
1170
- });
1171
- });
1172
- }
1173
- /**
1174
- * Deletes a transfer learning block.
1175
- * @summary Delete transfer learning block
1176
- * @param organizationId Organization ID
1177
- * @param transferLearningId Transfer learning ID
1178
- */
1179
- async deleteOrganizationTransferLearningBlock(organizationId, transferLearningId, options = { headers: {} }) {
1180
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transfer-learning/{transferLearningId}'
1181
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1182
- .replace('{' + 'transferLearningId' + '}', encodeURIComponent(String(transferLearningId)));
1183
- let localVarQueryParameters = {};
1184
- let localVarHeaderParams = Object.assign({
1185
- 'User-Agent': 'edgeimpulse-api nodejs'
1186
- }, this.defaultHeaders);
1187
- const produces = ['application/json'];
1188
- // give precedence to 'application/json'
1189
- if (produces.indexOf('application/json') >= 0) {
1190
- localVarHeaderParams.Accept = 'application/json';
1191
- }
1192
- else {
1193
- localVarHeaderParams.Accept = produces.join(',');
1194
- }
1195
- let localVarFormParams = {};
1196
- // verify required parameter 'organizationId' is not null or undefined
1197
- if (organizationId === null || organizationId === undefined) {
1198
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationTransferLearningBlock.');
1199
- }
1200
- // verify required parameter 'transferLearningId' is not null or undefined
1201
- if (transferLearningId === null || transferLearningId === undefined) {
1202
- throw new Error('Required parameter transferLearningId was null or undefined when calling deleteOrganizationTransferLearningBlock.');
1203
- }
1204
- Object.assign(localVarHeaderParams, options.headers);
1205
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1206
- let localVarUseFormData = false;
1207
- let localVarRequestOptions = {
1208
- method: 'DELETE',
1209
- qs: localVarQueryParameters,
1210
- headers: localVarHeaderParams,
1211
- uri: localVarPath,
1212
- useQuerystring: this._useQuerystring,
1213
- agentOptions: { keepAlive: false },
1214
- json: true,
1215
- };
1216
- let authenticationPromise = Promise.resolve();
1217
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1218
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1219
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1220
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1221
- return authenticationPromise.then(() => {
1222
- if (Object.keys(localVarFormParams).length) {
1223
- if (localVarUseFormData) {
1224
- localVarRequestOptions.formData = localVarFormParams;
1225
- }
1226
- else {
1227
- localVarRequestOptions.form = localVarFormParams;
1228
- }
1229
- }
1230
- return new Promise((resolve, reject) => {
1231
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1232
- if (error) {
1233
- reject(error);
1234
- }
1235
- else {
1236
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1237
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1238
- if (typeof body.success === 'boolean' && !body.success) {
1239
- reject(new Error(body.error || errString));
1240
- }
1241
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1242
- resolve(body);
1243
- }
1244
- else {
1245
- reject(errString);
1246
- }
1247
- }
1248
- });
1249
- });
1250
- });
1251
- }
1252
- /**
1253
- * Deletes a transformation block.
1254
- * @summary Delete transformation block
1255
- * @param organizationId Organization ID
1256
- * @param transformationId Transformation block ID.
1257
- */
1258
- async deleteOrganizationTransformationBlock(organizationId, transformationId, options = { headers: {} }) {
1259
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation/{transformationId}'
1260
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1261
- .replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
1262
- let localVarQueryParameters = {};
1263
- let localVarHeaderParams = Object.assign({
1264
- 'User-Agent': 'edgeimpulse-api nodejs'
1265
- }, this.defaultHeaders);
1266
- const produces = ['application/json'];
1267
- // give precedence to 'application/json'
1268
- if (produces.indexOf('application/json') >= 0) {
1269
- localVarHeaderParams.Accept = 'application/json';
1270
- }
1271
- else {
1272
- localVarHeaderParams.Accept = produces.join(',');
1273
- }
1274
- let localVarFormParams = {};
1275
- // verify required parameter 'organizationId' is not null or undefined
1276
- if (organizationId === null || organizationId === undefined) {
1277
- throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationTransformationBlock.');
1278
- }
1279
- // verify required parameter 'transformationId' is not null or undefined
1280
- if (transformationId === null || transformationId === undefined) {
1281
- throw new Error('Required parameter transformationId was null or undefined when calling deleteOrganizationTransformationBlock.');
1282
- }
1283
- Object.assign(localVarHeaderParams, options.headers);
1284
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1285
- let localVarUseFormData = false;
1286
- let localVarRequestOptions = {
1287
- method: 'DELETE',
1288
- qs: localVarQueryParameters,
1289
- headers: localVarHeaderParams,
1290
- uri: localVarPath,
1291
- useQuerystring: this._useQuerystring,
1292
- agentOptions: { keepAlive: false },
1293
- json: true,
1294
- };
1295
- let authenticationPromise = Promise.resolve();
1296
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1297
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1298
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1299
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1300
- return authenticationPromise.then(() => {
1301
- if (Object.keys(localVarFormParams).length) {
1302
- if (localVarUseFormData) {
1303
- localVarRequestOptions.formData = localVarFormParams;
1304
- }
1305
- else {
1306
- localVarRequestOptions.form = localVarFormParams;
1307
- }
1308
- }
1309
- return new Promise((resolve, reject) => {
1310
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1311
- if (error) {
1312
- reject(error);
1313
- }
1314
- else {
1315
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1316
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1317
- if (typeof body.success === 'boolean' && !body.success) {
1318
- reject(new Error(body.error || errString));
1319
- }
1320
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1321
- resolve(body);
1322
- }
1323
- else {
1324
- reject(errString);
1325
- }
1326
- }
1327
- });
1328
- });
1329
- });
1330
- }
1331
- /**
1332
- * Download the logs for a job (as a text file).
1333
- * @summary Download logs
1334
- * @param organizationId Organization ID
1335
- * @param jobId Job ID
1336
- * @param limit Maximum number of results
1337
- * @param logLevel Log level (error, warn, info, debug)
1338
- */
1339
- async downloadOrganizationJobsLogs(organizationId, jobId, queryParams, options = { headers: {} }) {
1340
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs/{jobId}/stdout/download'
1341
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1342
- .replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
1343
- let localVarQueryParameters = {};
1344
- let localVarHeaderParams = Object.assign({
1345
- 'User-Agent': 'edgeimpulse-api nodejs'
1346
- }, this.defaultHeaders);
1347
- const produces = ['text/plain'];
1348
- // give precedence to 'application/json'
1349
- if (produces.indexOf('application/json') >= 0) {
1350
- localVarHeaderParams.Accept = 'application/json';
1351
- }
1352
- else {
1353
- localVarHeaderParams.Accept = produces.join(',');
1354
- }
1355
- let localVarFormParams = {};
1356
- // verify required parameter 'organizationId' is not null or undefined
1357
- if (organizationId === null || organizationId === undefined) {
1358
- throw new Error('Required parameter organizationId was null or undefined when calling downloadOrganizationJobsLogs.');
1359
- }
1360
- // verify required parameter 'jobId' is not null or undefined
1361
- if (jobId === null || jobId === undefined) {
1362
- throw new Error('Required parameter jobId was null or undefined when calling downloadOrganizationJobsLogs.');
1363
- }
1364
- if (queryParams.limit !== undefined) {
1365
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
1366
- }
1367
- if (queryParams.logLevel !== undefined) {
1368
- localVarQueryParameters['logLevel'] = models_1.ObjectSerializer.serialize(queryParams.logLevel, "'error' | 'warn' | 'info' | 'debug'");
1369
- }
1370
- Object.assign(localVarHeaderParams, options.headers);
1371
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1372
- let localVarUseFormData = false;
1373
- let localVarRequestOptions = {
1374
- method: 'GET',
1375
- qs: localVarQueryParameters,
1376
- headers: localVarHeaderParams,
1377
- uri: localVarPath,
1378
- useQuerystring: this._useQuerystring,
1379
- agentOptions: { keepAlive: false },
1380
- json: true,
1381
- };
1382
- let authenticationPromise = Promise.resolve();
1383
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1384
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1385
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1386
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1387
- return authenticationPromise.then(() => {
1388
- if (Object.keys(localVarFormParams).length) {
1389
- if (localVarUseFormData) {
1390
- localVarRequestOptions.formData = localVarFormParams;
1391
- }
1392
- else {
1393
- localVarRequestOptions.form = localVarFormParams;
1394
- }
1395
- }
1396
- return new Promise((resolve, reject) => {
1397
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1398
- if (error) {
1399
- reject(error);
1400
- }
1401
- else {
1402
- body = models_1.ObjectSerializer.deserialize(body, "string");
1403
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1404
- if (typeof body.success === 'boolean' && !body.success) {
1405
- reject(new Error(body.error || errString));
1406
- }
1407
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1408
- resolve(body);
1409
- }
1410
- else {
1411
- reject(errString);
1412
- }
1413
- }
1414
- });
1415
- });
1416
- });
1417
- }
1418
- /**
1419
- * List all information about this organization.
1420
- * @summary Organization information
1421
- * @param organizationId Organization ID
1422
- */
1423
- async getOrganizationInfo(organizationId, options = { headers: {} }) {
1424
- const localVarPath = this.basePath + '/api/organizations/{organizationId}'
1425
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1426
- let localVarQueryParameters = {};
1427
- let localVarHeaderParams = Object.assign({
1428
- 'User-Agent': 'edgeimpulse-api nodejs'
1429
- }, this.defaultHeaders);
1430
- const produces = ['application/json'];
1431
- // give precedence to 'application/json'
1432
- if (produces.indexOf('application/json') >= 0) {
1433
- localVarHeaderParams.Accept = 'application/json';
1434
- }
1435
- else {
1436
- localVarHeaderParams.Accept = produces.join(',');
1437
- }
1438
- let localVarFormParams = {};
1439
- // verify required parameter 'organizationId' is not null or undefined
1440
- if (organizationId === null || organizationId === undefined) {
1441
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationInfo.');
1442
- }
1443
- Object.assign(localVarHeaderParams, options.headers);
1444
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1445
- let localVarUseFormData = false;
1446
- let localVarRequestOptions = {
1447
- method: 'GET',
1448
- qs: localVarQueryParameters,
1449
- headers: localVarHeaderParams,
1450
- uri: localVarPath,
1451
- useQuerystring: this._useQuerystring,
1452
- agentOptions: { keepAlive: false },
1453
- json: true,
1454
- };
1455
- let authenticationPromise = Promise.resolve();
1456
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1457
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1458
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1459
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1460
- return authenticationPromise.then(() => {
1461
- if (Object.keys(localVarFormParams).length) {
1462
- if (localVarUseFormData) {
1463
- localVarRequestOptions.formData = localVarFormParams;
1464
- }
1465
- else {
1466
- localVarRequestOptions.form = localVarFormParams;
1467
- }
1468
- }
1469
- return new Promise((resolve, reject) => {
1470
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1471
- if (error) {
1472
- reject(error);
1473
- }
1474
- else {
1475
- body = models_1.ObjectSerializer.deserialize(body, "OrganizationInfoResponse");
1476
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1477
- if (typeof body.success === 'boolean' && !body.success) {
1478
- reject(new Error(body.error || errString));
1479
- }
1480
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1481
- resolve(body);
1482
- }
1483
- else {
1484
- reject(errString);
1485
- }
1486
- }
1487
- });
1488
- });
1489
- });
1490
- }
1491
- /**
1492
- * Get the status for a job.
1493
- * @summary Get job status
1494
- * @param organizationId Organization ID
1495
- * @param jobId Job ID
1496
- */
1497
- async getOrganizationJobStatus(organizationId, jobId, options = { headers: {} }) {
1498
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs/{jobId}/status'
1499
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1500
- .replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
1501
- let localVarQueryParameters = {};
1502
- let localVarHeaderParams = Object.assign({
1503
- 'User-Agent': 'edgeimpulse-api nodejs'
1504
- }, this.defaultHeaders);
1505
- const produces = ['application/json'];
1506
- // give precedence to 'application/json'
1507
- if (produces.indexOf('application/json') >= 0) {
1508
- localVarHeaderParams.Accept = 'application/json';
1509
- }
1510
- else {
1511
- localVarHeaderParams.Accept = produces.join(',');
1512
- }
1513
- let localVarFormParams = {};
1514
- // verify required parameter 'organizationId' is not null or undefined
1515
- if (organizationId === null || organizationId === undefined) {
1516
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationJobStatus.');
1517
- }
1518
- // verify required parameter 'jobId' is not null or undefined
1519
- if (jobId === null || jobId === undefined) {
1520
- throw new Error('Required parameter jobId was null or undefined when calling getOrganizationJobStatus.');
1521
- }
1522
- Object.assign(localVarHeaderParams, options.headers);
1523
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1524
- let localVarUseFormData = false;
1525
- let localVarRequestOptions = {
1526
- method: 'GET',
1527
- qs: localVarQueryParameters,
1528
- headers: localVarHeaderParams,
1529
- uri: localVarPath,
1530
- useQuerystring: this._useQuerystring,
1531
- agentOptions: { keepAlive: false },
1532
- json: true,
1533
- };
1534
- let authenticationPromise = Promise.resolve();
1535
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1536
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1537
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1538
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1539
- return authenticationPromise.then(() => {
1540
- if (Object.keys(localVarFormParams).length) {
1541
- if (localVarUseFormData) {
1542
- localVarRequestOptions.formData = localVarFormParams;
1543
- }
1544
- else {
1545
- localVarRequestOptions.form = localVarFormParams;
1546
- }
1547
- }
1548
- return new Promise((resolve, reject) => {
1549
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1550
- if (error) {
1551
- reject(error);
1552
- }
1553
- else {
1554
- body = models_1.ObjectSerializer.deserialize(body, "GetJobResponse");
1555
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1556
- if (typeof body.success === 'boolean' && !body.success) {
1557
- reject(new Error(body.error || errString));
1558
- }
1559
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1560
- resolve(body);
1561
- }
1562
- else {
1563
- reject(errString);
1564
- }
1565
- }
1566
- });
1567
- });
1568
- });
1569
- }
1570
- /**
1571
- * Get the logs for a job.
1572
- * @summary Get logs
1573
- * @param organizationId Organization ID
1574
- * @param jobId Job ID
1575
- * @param limit Maximum number of results
1576
- * @param logLevel Log level (error, warn, info, debug)
1577
- */
1578
- async getOrganizationJobsLogs(organizationId, jobId, queryParams, options = { headers: {} }) {
1579
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs/{jobId}/stdout'
1580
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1581
- .replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
1582
- let localVarQueryParameters = {};
1583
- let localVarHeaderParams = Object.assign({
1584
- 'User-Agent': 'edgeimpulse-api nodejs'
1585
- }, this.defaultHeaders);
1586
- const produces = ['application/json'];
1587
- // give precedence to 'application/json'
1588
- if (produces.indexOf('application/json') >= 0) {
1589
- localVarHeaderParams.Accept = 'application/json';
1590
- }
1591
- else {
1592
- localVarHeaderParams.Accept = produces.join(',');
1593
- }
1594
- let localVarFormParams = {};
1595
- // verify required parameter 'organizationId' is not null or undefined
1596
- if (organizationId === null || organizationId === undefined) {
1597
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationJobsLogs.');
1598
- }
1599
- // verify required parameter 'jobId' is not null or undefined
1600
- if (jobId === null || jobId === undefined) {
1601
- throw new Error('Required parameter jobId was null or undefined when calling getOrganizationJobsLogs.');
1602
- }
1603
- if (queryParams.limit !== undefined) {
1604
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
1605
- }
1606
- if (queryParams.logLevel !== undefined) {
1607
- localVarQueryParameters['logLevel'] = models_1.ObjectSerializer.serialize(queryParams.logLevel, "'error' | 'warn' | 'info' | 'debug'");
1608
- }
1609
- Object.assign(localVarHeaderParams, options.headers);
1610
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1611
- let localVarUseFormData = false;
1612
- let localVarRequestOptions = {
1613
- method: 'GET',
1614
- qs: localVarQueryParameters,
1615
- headers: localVarHeaderParams,
1616
- uri: localVarPath,
1617
- useQuerystring: this._useQuerystring,
1618
- agentOptions: { keepAlive: false },
1619
- json: true,
1620
- };
1621
- let authenticationPromise = Promise.resolve();
1622
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1623
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1624
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1625
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1626
- return authenticationPromise.then(() => {
1627
- if (Object.keys(localVarFormParams).length) {
1628
- if (localVarUseFormData) {
1629
- localVarRequestOptions.formData = localVarFormParams;
1630
- }
1631
- else {
1632
- localVarRequestOptions.form = localVarFormParams;
1633
- }
1634
- }
1635
- return new Promise((resolve, reject) => {
1636
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1637
- if (error) {
1638
- reject(error);
1639
- }
1640
- else {
1641
- body = models_1.ObjectSerializer.deserialize(body, "LogStdoutResponse");
1642
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1643
- if (typeof body.success === 'boolean' && !body.success) {
1644
- reject(new Error(body.error || errString));
1645
- }
1646
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1647
- resolve(body);
1648
- }
1649
- else {
1650
- reject(errString);
1651
- }
1652
- }
1653
- });
1654
- });
1655
- });
1656
- }
1657
- /**
1658
- * Retrieve an organizational pipelines
1659
- * @summary Get pipeline
1660
- * @param organizationId Organization ID
1661
- * @param pipelineId Pipeline ID
1662
- */
1663
- async getOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
1664
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
1665
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1666
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
1667
- let localVarQueryParameters = {};
1668
- let localVarHeaderParams = Object.assign({
1669
- 'User-Agent': 'edgeimpulse-api nodejs'
1670
- }, this.defaultHeaders);
1671
- const produces = ['application/json'];
1672
- // give precedence to 'application/json'
1673
- if (produces.indexOf('application/json') >= 0) {
1674
- localVarHeaderParams.Accept = 'application/json';
1675
- }
1676
- else {
1677
- localVarHeaderParams.Accept = produces.join(',');
1678
- }
1679
- let localVarFormParams = {};
1680
- // verify required parameter 'organizationId' is not null or undefined
1681
- if (organizationId === null || organizationId === undefined) {
1682
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationPipeline.');
1683
- }
1684
- // verify required parameter 'pipelineId' is not null or undefined
1685
- if (pipelineId === null || pipelineId === undefined) {
1686
- throw new Error('Required parameter pipelineId was null or undefined when calling getOrganizationPipeline.');
1687
- }
1688
- Object.assign(localVarHeaderParams, options.headers);
1689
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1690
- let localVarUseFormData = false;
1691
- let localVarRequestOptions = {
1692
- method: 'GET',
1693
- qs: localVarQueryParameters,
1694
- headers: localVarHeaderParams,
1695
- uri: localVarPath,
1696
- useQuerystring: this._useQuerystring,
1697
- agentOptions: { keepAlive: false },
1698
- json: true,
1699
- };
1700
- let authenticationPromise = Promise.resolve();
1701
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1702
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1703
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1704
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1705
- return authenticationPromise.then(() => {
1706
- if (Object.keys(localVarFormParams).length) {
1707
- if (localVarUseFormData) {
1708
- localVarRequestOptions.formData = localVarFormParams;
1709
- }
1710
- else {
1711
- localVarRequestOptions.form = localVarFormParams;
1712
- }
1713
- }
1714
- return new Promise((resolve, reject) => {
1715
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1716
- if (error) {
1717
- reject(error);
1718
- }
1719
- else {
1720
- body = models_1.ObjectSerializer.deserialize(body, "GetOrganizationPipelinesResponse");
1721
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1722
- if (typeof body.success === 'boolean' && !body.success) {
1723
- reject(new Error(body.error || errString));
1724
- }
1725
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1726
- resolve(body);
1727
- }
1728
- else {
1729
- reject(errString);
1730
- }
1731
- }
1732
- });
1733
- });
1734
- });
1735
- }
1736
- /**
1737
- * Get a token to authenticate with the web socket interface.
1738
- * @summary Get socket token for an organization
1739
- * @param organizationId Organization ID
1740
- */
1741
- async getOrganizationSocketToken(organizationId, options = { headers: {} }) {
1742
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/socket-token'
1743
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1744
- let localVarQueryParameters = {};
1745
- let localVarHeaderParams = Object.assign({
1746
- 'User-Agent': 'edgeimpulse-api nodejs'
1747
- }, this.defaultHeaders);
1748
- const produces = ['application/json'];
1749
- // give precedence to 'application/json'
1750
- if (produces.indexOf('application/json') >= 0) {
1751
- localVarHeaderParams.Accept = 'application/json';
1752
- }
1753
- else {
1754
- localVarHeaderParams.Accept = produces.join(',');
1755
- }
1756
- let localVarFormParams = {};
1757
- // verify required parameter 'organizationId' is not null or undefined
1758
- if (organizationId === null || organizationId === undefined) {
1759
- throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationSocketToken.');
1760
- }
1761
- Object.assign(localVarHeaderParams, options.headers);
1762
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1763
- let localVarUseFormData = false;
1764
- let localVarRequestOptions = {
1765
- method: 'GET',
1766
- qs: localVarQueryParameters,
1767
- headers: localVarHeaderParams,
1768
- uri: localVarPath,
1769
- useQuerystring: this._useQuerystring,
1770
- agentOptions: { keepAlive: false },
1771
- json: true,
1772
- };
1773
- let authenticationPromise = Promise.resolve();
1774
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1775
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1776
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1777
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1778
- return authenticationPromise.then(() => {
1779
- if (Object.keys(localVarFormParams).length) {
1780
- if (localVarUseFormData) {
1781
- localVarRequestOptions.formData = localVarFormParams;
1782
- }
1783
- else {
1784
- localVarRequestOptions.form = localVarFormParams;
1785
- }
1786
- }
1787
- return new Promise((resolve, reject) => {
1788
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1789
- if (error) {
1790
- reject(error);
1791
- }
1792
- else {
1793
- body = models_1.ObjectSerializer.deserialize(body, "SocketTokenResponse");
1794
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1795
- if (typeof body.success === 'boolean' && !body.success) {
1796
- reject(new Error(body.error || errString));
1797
- }
1798
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1799
- resolve(body);
1800
- }
1801
- else {
1802
- reject(errString);
1803
- }
1804
- }
1805
- });
1806
- });
1807
- });
1808
- }
1809
- /**
1810
- * Get all active jobs for this organization
1811
- * @summary List active jobs
1812
- * @param organizationId Organization ID
1813
- * @param rootOnly Whether to exclude jobs with a parent ID (so jobs started as part of another job)
1814
- */
1815
- async listActiveOrganizationJobs(organizationId, queryParams, options = { headers: {} }) {
1816
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs'
1817
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1818
- let localVarQueryParameters = {};
1819
- let localVarHeaderParams = Object.assign({
1820
- 'User-Agent': 'edgeimpulse-api nodejs'
1821
- }, this.defaultHeaders);
1822
- const produces = ['application/json'];
1823
- // give precedence to 'application/json'
1824
- if (produces.indexOf('application/json') >= 0) {
1825
- localVarHeaderParams.Accept = 'application/json';
1826
- }
1827
- else {
1828
- localVarHeaderParams.Accept = produces.join(',');
1829
- }
1830
- let localVarFormParams = {};
1831
- // verify required parameter 'organizationId' is not null or undefined
1832
- if (organizationId === null || organizationId === undefined) {
1833
- throw new Error('Required parameter organizationId was null or undefined when calling listActiveOrganizationJobs.');
1834
- }
1835
- if (queryParams.rootOnly !== undefined) {
1836
- localVarQueryParameters['rootOnly'] = models_1.ObjectSerializer.serialize(queryParams.rootOnly, "boolean");
1837
- }
1838
- Object.assign(localVarHeaderParams, options.headers);
1839
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1840
- let localVarUseFormData = false;
1841
- let localVarRequestOptions = {
1842
- method: 'GET',
1843
- qs: localVarQueryParameters,
1844
- headers: localVarHeaderParams,
1845
- uri: localVarPath,
1846
- useQuerystring: this._useQuerystring,
1847
- agentOptions: { keepAlive: false },
1848
- json: true,
1849
- };
1850
- let authenticationPromise = Promise.resolve();
1851
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1852
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1853
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1854
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1855
- return authenticationPromise.then(() => {
1856
- if (Object.keys(localVarFormParams).length) {
1857
- if (localVarUseFormData) {
1858
- localVarRequestOptions.formData = localVarFormParams;
1859
- }
1860
- else {
1861
- localVarRequestOptions.form = localVarFormParams;
1862
- }
1863
- }
1864
- return new Promise((resolve, reject) => {
1865
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1866
- if (error) {
1867
- reject(error);
1868
- }
1869
- else {
1870
- body = models_1.ObjectSerializer.deserialize(body, "ListJobsResponse");
1871
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1872
- if (typeof body.success === 'boolean' && !body.success) {
1873
- reject(new Error(body.error || errString));
1874
- }
1875
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1876
- resolve(body);
1877
- }
1878
- else {
1879
- reject(errString);
1880
- }
1881
- }
1882
- });
1883
- });
1884
- });
1885
- }
1886
- /**
1887
- * Get all jobs for this organization
1888
- * @summary List all jobs
1889
- * @param organizationId Organization ID
1890
- * @param startDate Start date
1891
- * @param endDate End date
1892
- * @param limit Maximum number of results
1893
- * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
1894
- * @param excludePipelineTransformJobs Whether to exclude pipeline / transformation jobs
1895
- * @param rootOnly Whether to exclude jobs with a parent ID (so jobs started as part of another job)
1896
- */
1897
- async listAllOrganizationJobs(organizationId, queryParams, options = { headers: {} }) {
1898
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs/all'
1899
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1900
- let localVarQueryParameters = {};
1901
- let localVarHeaderParams = Object.assign({
1902
- 'User-Agent': 'edgeimpulse-api nodejs'
1903
- }, this.defaultHeaders);
1904
- const produces = ['application/json'];
1905
- // give precedence to 'application/json'
1906
- if (produces.indexOf('application/json') >= 0) {
1907
- localVarHeaderParams.Accept = 'application/json';
1908
- }
1909
- else {
1910
- localVarHeaderParams.Accept = produces.join(',');
1911
- }
1912
- let localVarFormParams = {};
1913
- // verify required parameter 'organizationId' is not null or undefined
1914
- if (organizationId === null || organizationId === undefined) {
1915
- throw new Error('Required parameter organizationId was null or undefined when calling listAllOrganizationJobs.');
1916
- }
1917
- if (queryParams.startDate !== undefined) {
1918
- localVarQueryParameters['startDate'] = models_1.ObjectSerializer.serialize(queryParams.startDate, "Date");
1919
- }
1920
- if (queryParams.endDate !== undefined) {
1921
- localVarQueryParameters['endDate'] = models_1.ObjectSerializer.serialize(queryParams.endDate, "Date");
1922
- }
1923
- if (queryParams.limit !== undefined) {
1924
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
1925
- }
1926
- if (queryParams.offset !== undefined) {
1927
- localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
1928
- }
1929
- if (queryParams.excludePipelineTransformJobs !== undefined) {
1930
- localVarQueryParameters['excludePipelineTransformJobs'] = models_1.ObjectSerializer.serialize(queryParams.excludePipelineTransformJobs, "boolean");
1931
- }
1932
- if (queryParams.rootOnly !== undefined) {
1933
- localVarQueryParameters['rootOnly'] = models_1.ObjectSerializer.serialize(queryParams.rootOnly, "boolean");
1934
- }
1935
- Object.assign(localVarHeaderParams, options.headers);
1936
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1937
- let localVarUseFormData = false;
1938
- let localVarRequestOptions = {
1939
- method: 'GET',
1940
- qs: localVarQueryParameters,
1941
- headers: localVarHeaderParams,
1942
- uri: localVarPath,
1943
- useQuerystring: this._useQuerystring,
1944
- agentOptions: { keepAlive: false },
1945
- json: true,
1946
- };
1947
- let authenticationPromise = Promise.resolve();
1948
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1949
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1950
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1951
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1952
- return authenticationPromise.then(() => {
1953
- if (Object.keys(localVarFormParams).length) {
1954
- if (localVarUseFormData) {
1955
- localVarRequestOptions.formData = localVarFormParams;
1956
- }
1957
- else {
1958
- localVarRequestOptions.form = localVarFormParams;
1959
- }
1960
- }
1961
- return new Promise((resolve, reject) => {
1962
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1963
- if (error) {
1964
- reject(error);
1965
- }
1966
- else {
1967
- body = models_1.ObjectSerializer.deserialize(body, "ListJobsResponse");
1968
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1969
- if (typeof body.success === 'boolean' && !body.success) {
1970
- reject(new Error(body.error || errString));
1971
- }
1972
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1973
- resolve(body);
1974
- }
1975
- else {
1976
- reject(errString);
1977
- }
1978
- }
1979
- });
1980
- });
1981
- });
1982
- }
1983
- /**
1984
- * Retrieve all archived organizational pipelines
1985
- * @summary List archived pipelines
1986
- * @param organizationId Organization ID
1987
- * @param projectId If set, filters on pipelines which are attached to this project.
1988
- */
1989
- async listArchivedOrganizationPipelines(organizationId, queryParams, options = { headers: {} }) {
1990
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/archived'
1991
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1992
- let localVarQueryParameters = {};
1993
- let localVarHeaderParams = Object.assign({
1994
- 'User-Agent': 'edgeimpulse-api nodejs'
1995
- }, this.defaultHeaders);
1996
- const produces = ['application/json'];
1997
- // give precedence to 'application/json'
1998
- if (produces.indexOf('application/json') >= 0) {
1999
- localVarHeaderParams.Accept = 'application/json';
2000
- }
2001
- else {
2002
- localVarHeaderParams.Accept = produces.join(',');
2003
- }
2004
- let localVarFormParams = {};
2005
- // verify required parameter 'organizationId' is not null or undefined
2006
- if (organizationId === null || organizationId === undefined) {
2007
- throw new Error('Required parameter organizationId was null or undefined when calling listArchivedOrganizationPipelines.');
2008
- }
2009
- if (queryParams.projectId !== undefined) {
2010
- localVarQueryParameters['projectId'] = models_1.ObjectSerializer.serialize(queryParams.projectId, "number");
2011
- }
2012
- Object.assign(localVarHeaderParams, options.headers);
2013
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2014
- let localVarUseFormData = false;
2015
- let localVarRequestOptions = {
2016
- method: 'GET',
2017
- qs: localVarQueryParameters,
2018
- headers: localVarHeaderParams,
2019
- uri: localVarPath,
2020
- useQuerystring: this._useQuerystring,
2021
- agentOptions: { keepAlive: false },
2022
- json: true,
2023
- };
2024
- let authenticationPromise = Promise.resolve();
2025
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2026
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2027
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2028
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2029
- return authenticationPromise.then(() => {
2030
- if (Object.keys(localVarFormParams).length) {
2031
- if (localVarUseFormData) {
2032
- localVarRequestOptions.formData = localVarFormParams;
2033
- }
2034
- else {
2035
- localVarRequestOptions.form = localVarFormParams;
2036
- }
2037
- }
2038
- return new Promise((resolve, reject) => {
2039
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2040
- if (error) {
2041
- reject(error);
2042
- }
2043
- else {
2044
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationPipelinesResponse");
2045
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2046
- if (typeof body.success === 'boolean' && !body.success) {
2047
- reject(new Error(body.error || errString));
2048
- }
2049
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2050
- resolve(body);
2051
- }
2052
- else {
2053
- reject(errString);
2054
- }
2055
- }
2056
- });
2057
- });
2058
- });
2059
- }
2060
- /**
2061
- * Get all finished jobs for this organization
2062
- * @summary List finished jobs
2063
- * @param organizationId Organization ID
2064
- * @param startDate Start date
2065
- * @param endDate End date
2066
- * @param limit Maximum number of results
2067
- * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
2068
- * @param rootOnly Whether to exclude jobs with a parent ID (so jobs started as part of another job)
2069
- */
2070
- async listFinishedOrganizationJobs(organizationId, queryParams, options = { headers: {} }) {
2071
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/jobs/history'
2072
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2073
- let localVarQueryParameters = {};
2074
- let localVarHeaderParams = Object.assign({
2075
- 'User-Agent': 'edgeimpulse-api nodejs'
2076
- }, this.defaultHeaders);
2077
- const produces = ['application/json'];
2078
- // give precedence to 'application/json'
2079
- if (produces.indexOf('application/json') >= 0) {
2080
- localVarHeaderParams.Accept = 'application/json';
2081
- }
2082
- else {
2083
- localVarHeaderParams.Accept = produces.join(',');
2084
- }
2085
- let localVarFormParams = {};
2086
- // verify required parameter 'organizationId' is not null or undefined
2087
- if (organizationId === null || organizationId === undefined) {
2088
- throw new Error('Required parameter organizationId was null or undefined when calling listFinishedOrganizationJobs.');
2089
- }
2090
- if (queryParams.startDate !== undefined) {
2091
- localVarQueryParameters['startDate'] = models_1.ObjectSerializer.serialize(queryParams.startDate, "Date");
2092
- }
2093
- if (queryParams.endDate !== undefined) {
2094
- localVarQueryParameters['endDate'] = models_1.ObjectSerializer.serialize(queryParams.endDate, "Date");
2095
- }
2096
- if (queryParams.limit !== undefined) {
2097
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
2098
- }
2099
- if (queryParams.offset !== undefined) {
2100
- localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
2101
- }
2102
- if (queryParams.rootOnly !== undefined) {
2103
- localVarQueryParameters['rootOnly'] = models_1.ObjectSerializer.serialize(queryParams.rootOnly, "boolean");
2104
- }
2105
- Object.assign(localVarHeaderParams, options.headers);
2106
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2107
- let localVarUseFormData = false;
2108
- let localVarRequestOptions = {
2109
- method: 'GET',
2110
- qs: localVarQueryParameters,
2111
- headers: localVarHeaderParams,
2112
- uri: localVarPath,
2113
- useQuerystring: this._useQuerystring,
2114
- agentOptions: { keepAlive: false },
2115
- json: true,
2116
- };
2117
- let authenticationPromise = Promise.resolve();
2118
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2119
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2120
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2121
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2122
- return authenticationPromise.then(() => {
2123
- if (Object.keys(localVarFormParams).length) {
2124
- if (localVarUseFormData) {
2125
- localVarRequestOptions.formData = localVarFormParams;
2126
- }
2127
- else {
2128
- localVarRequestOptions.form = localVarFormParams;
2129
- }
2130
- }
2131
- return new Promise((resolve, reject) => {
2132
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2133
- if (error) {
2134
- reject(error);
2135
- }
2136
- else {
2137
- body = models_1.ObjectSerializer.deserialize(body, "ListJobsResponse");
2138
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2139
- if (typeof body.success === 'boolean' && !body.success) {
2140
- reject(new Error(body.error || errString));
2141
- }
2142
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2143
- resolve(body);
2144
- }
2145
- else {
2146
- reject(errString);
2147
- }
2148
- }
2149
- });
2150
- });
2151
- });
2152
- }
2153
- /**
2154
- * Retrieve all API keys. This does **not** return the full API key, but only a portion (for security purposes).
2155
- * @summary Get API keys
2156
- * @param organizationId Organization ID
2157
- */
2158
- async listOrganizationApiKeys(organizationId, options = { headers: {} }) {
2159
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/apikeys'
2160
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2161
- let localVarQueryParameters = {};
2162
- let localVarHeaderParams = Object.assign({
2163
- 'User-Agent': 'edgeimpulse-api nodejs'
2164
- }, this.defaultHeaders);
2165
- const produces = ['application/json'];
2166
- // give precedence to 'application/json'
2167
- if (produces.indexOf('application/json') >= 0) {
2168
- localVarHeaderParams.Accept = 'application/json';
2169
- }
2170
- else {
2171
- localVarHeaderParams.Accept = produces.join(',');
2172
- }
2173
- let localVarFormParams = {};
2174
- // verify required parameter 'organizationId' is not null or undefined
2175
- if (organizationId === null || organizationId === undefined) {
2176
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationApiKeys.');
2177
- }
2178
- Object.assign(localVarHeaderParams, options.headers);
2179
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2180
- let localVarUseFormData = false;
2181
- let localVarRequestOptions = {
2182
- method: 'GET',
2183
- qs: localVarQueryParameters,
2184
- headers: localVarHeaderParams,
2185
- uri: localVarPath,
2186
- useQuerystring: this._useQuerystring,
2187
- agentOptions: { keepAlive: false },
2188
- json: true,
2189
- };
2190
- let authenticationPromise = Promise.resolve();
2191
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2192
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2193
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2194
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2195
- return authenticationPromise.then(() => {
2196
- if (Object.keys(localVarFormParams).length) {
2197
- if (localVarUseFormData) {
2198
- localVarRequestOptions.formData = localVarFormParams;
2199
- }
2200
- else {
2201
- localVarRequestOptions.form = localVarFormParams;
2202
- }
2203
- }
2204
- return new Promise((resolve, reject) => {
2205
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2206
- if (error) {
2207
- reject(error);
2208
- }
2209
- else {
2210
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationApiKeysResponse");
2211
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2212
- if (typeof body.success === 'boolean' && !body.success) {
2213
- reject(new Error(body.error || errString));
2214
- }
2215
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2216
- resolve(body);
2217
- }
2218
- else {
2219
- reject(errString);
2220
- }
2221
- }
2222
- });
2223
- });
2224
- });
2225
- }
2226
- /**
2227
- * Retrieve all deploy blocks.
2228
- * @summary Get deploy blocks
2229
- * @param organizationId Organization ID
2230
- */
2231
- async listOrganizationDeployBlocks(organizationId, options = { headers: {} }) {
2232
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy'
2233
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2234
- let localVarQueryParameters = {};
2235
- let localVarHeaderParams = Object.assign({
2236
- 'User-Agent': 'edgeimpulse-api nodejs'
2237
- }, this.defaultHeaders);
2238
- const produces = ['application/json'];
2239
- // give precedence to 'application/json'
2240
- if (produces.indexOf('application/json') >= 0) {
2241
- localVarHeaderParams.Accept = 'application/json';
2242
- }
2243
- else {
2244
- localVarHeaderParams.Accept = produces.join(',');
2245
- }
2246
- let localVarFormParams = {};
2247
- // verify required parameter 'organizationId' is not null or undefined
2248
- if (organizationId === null || organizationId === undefined) {
2249
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationDeployBlocks.');
2250
- }
2251
- Object.assign(localVarHeaderParams, options.headers);
2252
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2253
- let localVarUseFormData = false;
2254
- let localVarRequestOptions = {
2255
- method: 'GET',
2256
- qs: localVarQueryParameters,
2257
- headers: localVarHeaderParams,
2258
- uri: localVarPath,
2259
- useQuerystring: this._useQuerystring,
2260
- agentOptions: { keepAlive: false },
2261
- json: true,
2262
- };
2263
- let authenticationPromise = Promise.resolve();
2264
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2265
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2266
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2267
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2268
- return authenticationPromise.then(() => {
2269
- if (Object.keys(localVarFormParams).length) {
2270
- if (localVarUseFormData) {
2271
- localVarRequestOptions.formData = localVarFormParams;
2272
- }
2273
- else {
2274
- localVarRequestOptions.form = localVarFormParams;
2275
- }
2276
- }
2277
- return new Promise((resolve, reject) => {
2278
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2279
- if (error) {
2280
- reject(error);
2281
- }
2282
- else {
2283
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationDeployBlocksResponse");
2284
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2285
- if (typeof body.success === 'boolean' && !body.success) {
2286
- reject(new Error(body.error || errString));
2287
- }
2288
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2289
- resolve(body);
2290
- }
2291
- else {
2292
- reject(errString);
2293
- }
2294
- }
2295
- });
2296
- });
2297
- });
2298
- }
2299
- /**
2300
- * Retrieve all dsp blocks.
2301
- * @summary Get dsp blocks
2302
- * @param organizationId Organization ID
2303
- */
2304
- async listOrganizationDspBlocks(organizationId, options = { headers: {} }) {
2305
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp'
2306
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2307
- let localVarQueryParameters = {};
2308
- let localVarHeaderParams = Object.assign({
2309
- 'User-Agent': 'edgeimpulse-api nodejs'
2310
- }, this.defaultHeaders);
2311
- const produces = ['application/json'];
2312
- // give precedence to 'application/json'
2313
- if (produces.indexOf('application/json') >= 0) {
2314
- localVarHeaderParams.Accept = 'application/json';
2315
- }
2316
- else {
2317
- localVarHeaderParams.Accept = produces.join(',');
2318
- }
2319
- let localVarFormParams = {};
2320
- // verify required parameter 'organizationId' is not null or undefined
2321
- if (organizationId === null || organizationId === undefined) {
2322
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationDspBlocks.');
2323
- }
2324
- Object.assign(localVarHeaderParams, options.headers);
2325
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2326
- let localVarUseFormData = false;
2327
- let localVarRequestOptions = {
2328
- method: 'GET',
2329
- qs: localVarQueryParameters,
2330
- headers: localVarHeaderParams,
2331
- uri: localVarPath,
2332
- useQuerystring: this._useQuerystring,
2333
- agentOptions: { keepAlive: false },
2334
- json: true,
2335
- };
2336
- let authenticationPromise = Promise.resolve();
2337
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2338
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2339
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2340
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2341
- return authenticationPromise.then(() => {
2342
- if (Object.keys(localVarFormParams).length) {
2343
- if (localVarUseFormData) {
2344
- localVarRequestOptions.formData = localVarFormParams;
2345
- }
2346
- else {
2347
- localVarRequestOptions.form = localVarFormParams;
2348
- }
2349
- }
2350
- return new Promise((resolve, reject) => {
2351
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2352
- if (error) {
2353
- reject(error);
2354
- }
2355
- else {
2356
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationDspBlocksResponse");
2357
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2358
- if (typeof body.success === 'boolean' && !body.success) {
2359
- reject(new Error(body.error || errString));
2360
- }
2361
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2362
- resolve(body);
2363
- }
2364
- else {
2365
- reject(errString);
2366
- }
2367
- }
2368
- });
2369
- });
2370
- });
2371
- }
2372
- /**
2373
- * Retrieve all organizational pipelines
2374
- * @summary List pipelines
2375
- * @param organizationId Organization ID
2376
- * @param projectId If set, filters on pipelines which are attached to this project.
2377
- */
2378
- async listOrganizationPipelines(organizationId, queryParams, options = { headers: {} }) {
2379
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines'
2380
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2381
- let localVarQueryParameters = {};
2382
- let localVarHeaderParams = Object.assign({
2383
- 'User-Agent': 'edgeimpulse-api nodejs'
2384
- }, this.defaultHeaders);
2385
- const produces = ['application/json'];
2386
- // give precedence to 'application/json'
2387
- if (produces.indexOf('application/json') >= 0) {
2388
- localVarHeaderParams.Accept = 'application/json';
2389
- }
2390
- else {
2391
- localVarHeaderParams.Accept = produces.join(',');
2392
- }
2393
- let localVarFormParams = {};
2394
- // verify required parameter 'organizationId' is not null or undefined
2395
- if (organizationId === null || organizationId === undefined) {
2396
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationPipelines.');
2397
- }
2398
- if (queryParams.projectId !== undefined) {
2399
- localVarQueryParameters['projectId'] = models_1.ObjectSerializer.serialize(queryParams.projectId, "number");
2400
- }
2401
- Object.assign(localVarHeaderParams, options.headers);
2402
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2403
- let localVarUseFormData = false;
2404
- let localVarRequestOptions = {
2405
- method: 'GET',
2406
- qs: localVarQueryParameters,
2407
- headers: localVarHeaderParams,
2408
- uri: localVarPath,
2409
- useQuerystring: this._useQuerystring,
2410
- agentOptions: { keepAlive: false },
2411
- json: true,
2412
- };
2413
- let authenticationPromise = Promise.resolve();
2414
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2415
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2416
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2417
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2418
- return authenticationPromise.then(() => {
2419
- if (Object.keys(localVarFormParams).length) {
2420
- if (localVarUseFormData) {
2421
- localVarRequestOptions.formData = localVarFormParams;
2422
- }
2423
- else {
2424
- localVarRequestOptions.form = localVarFormParams;
2425
- }
2426
- }
2427
- return new Promise((resolve, reject) => {
2428
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2429
- if (error) {
2430
- reject(error);
2431
- }
2432
- else {
2433
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationPipelinesResponse");
2434
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2435
- if (typeof body.success === 'boolean' && !body.success) {
2436
- reject(new Error(body.error || errString));
2437
- }
2438
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2439
- resolve(body);
2440
- }
2441
- else {
2442
- reject(errString);
2443
- }
2444
- }
2445
- });
2446
- });
2447
- });
2448
- }
2449
- /**
2450
- * Retrieve all projects for the organization.
2451
- * @summary Get projects
2452
- * @param organizationId Organization ID
2453
- */
2454
- async listOrganizationProjects(organizationId, options = { headers: {} }) {
2455
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/projects'
2456
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2457
- let localVarQueryParameters = {};
2458
- let localVarHeaderParams = Object.assign({
2459
- 'User-Agent': 'edgeimpulse-api nodejs'
2460
- }, this.defaultHeaders);
2461
- const produces = ['application/json'];
2462
- // give precedence to 'application/json'
2463
- if (produces.indexOf('application/json') >= 0) {
2464
- localVarHeaderParams.Accept = 'application/json';
2465
- }
2466
- else {
2467
- localVarHeaderParams.Accept = produces.join(',');
2468
- }
2469
- let localVarFormParams = {};
2470
- // verify required parameter 'organizationId' is not null or undefined
2471
- if (organizationId === null || organizationId === undefined) {
2472
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationProjects.');
2473
- }
2474
- Object.assign(localVarHeaderParams, options.headers);
2475
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2476
- let localVarUseFormData = false;
2477
- let localVarRequestOptions = {
2478
- method: 'GET',
2479
- qs: localVarQueryParameters,
2480
- headers: localVarHeaderParams,
2481
- uri: localVarPath,
2482
- useQuerystring: this._useQuerystring,
2483
- agentOptions: { keepAlive: false },
2484
- json: true,
2485
- };
2486
- let authenticationPromise = Promise.resolve();
2487
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2488
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2489
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2490
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2491
- return authenticationPromise.then(() => {
2492
- if (Object.keys(localVarFormParams).length) {
2493
- if (localVarUseFormData) {
2494
- localVarRequestOptions.formData = localVarFormParams;
2495
- }
2496
- else {
2497
- localVarRequestOptions.form = localVarFormParams;
2498
- }
2499
- }
2500
- return new Promise((resolve, reject) => {
2501
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2502
- if (error) {
2503
- reject(error);
2504
- }
2505
- else {
2506
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationProjectsResponse");
2507
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2508
- if (typeof body.success === 'boolean' && !body.success) {
2509
- reject(new Error(body.error || errString));
2510
- }
2511
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2512
- resolve(body);
2513
- }
2514
- else {
2515
- reject(errString);
2516
- }
2517
- }
2518
- });
2519
- });
2520
- });
2521
- }
2522
- /**
2523
- * Retrieve all secrets.
2524
- * @summary Get secrets
2525
- * @param organizationId Organization ID
2526
- */
2527
- async listOrganizationSecrets(organizationId, options = { headers: {} }) {
2528
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/secrets'
2529
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2530
- let localVarQueryParameters = {};
2531
- let localVarHeaderParams = Object.assign({
2532
- 'User-Agent': 'edgeimpulse-api nodejs'
2533
- }, this.defaultHeaders);
2534
- const produces = ['application/json'];
2535
- // give precedence to 'application/json'
2536
- if (produces.indexOf('application/json') >= 0) {
2537
- localVarHeaderParams.Accept = 'application/json';
2538
- }
2539
- else {
2540
- localVarHeaderParams.Accept = produces.join(',');
2541
- }
2542
- let localVarFormParams = {};
2543
- // verify required parameter 'organizationId' is not null or undefined
2544
- if (organizationId === null || organizationId === undefined) {
2545
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationSecrets.');
2546
- }
2547
- Object.assign(localVarHeaderParams, options.headers);
2548
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2549
- let localVarUseFormData = false;
2550
- let localVarRequestOptions = {
2551
- method: 'GET',
2552
- qs: localVarQueryParameters,
2553
- headers: localVarHeaderParams,
2554
- uri: localVarPath,
2555
- useQuerystring: this._useQuerystring,
2556
- agentOptions: { keepAlive: false },
2557
- json: true,
2558
- };
2559
- let authenticationPromise = Promise.resolve();
2560
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2561
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2562
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2563
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2564
- return authenticationPromise.then(() => {
2565
- if (Object.keys(localVarFormParams).length) {
2566
- if (localVarUseFormData) {
2567
- localVarRequestOptions.formData = localVarFormParams;
2568
- }
2569
- else {
2570
- localVarRequestOptions.form = localVarFormParams;
2571
- }
2572
- }
2573
- return new Promise((resolve, reject) => {
2574
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2575
- if (error) {
2576
- reject(error);
2577
- }
2578
- else {
2579
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationSecretsResponse");
2580
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2581
- if (typeof body.success === 'boolean' && !body.success) {
2582
- reject(new Error(body.error || errString));
2583
- }
2584
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2585
- resolve(body);
2586
- }
2587
- else {
2588
- reject(errString);
2589
- }
2590
- }
2591
- });
2592
- });
2593
- });
2594
- }
2595
- /**
2596
- * Retrieve all transfer learning blocks.
2597
- * @summary Get transfer learning blocks
2598
- * @param organizationId Organization ID
2599
- */
2600
- async listOrganizationTransferLearningBlocks(organizationId, options = { headers: {} }) {
2601
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transfer-learning'
2602
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2603
- let localVarQueryParameters = {};
2604
- let localVarHeaderParams = Object.assign({
2605
- 'User-Agent': 'edgeimpulse-api nodejs'
2606
- }, this.defaultHeaders);
2607
- const produces = ['application/json'];
2608
- // give precedence to 'application/json'
2609
- if (produces.indexOf('application/json') >= 0) {
2610
- localVarHeaderParams.Accept = 'application/json';
2611
- }
2612
- else {
2613
- localVarHeaderParams.Accept = produces.join(',');
2614
- }
2615
- let localVarFormParams = {};
2616
- // verify required parameter 'organizationId' is not null or undefined
2617
- if (organizationId === null || organizationId === undefined) {
2618
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationTransferLearningBlocks.');
2619
- }
2620
- Object.assign(localVarHeaderParams, options.headers);
2621
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2622
- let localVarUseFormData = false;
2623
- let localVarRequestOptions = {
2624
- method: 'GET',
2625
- qs: localVarQueryParameters,
2626
- headers: localVarHeaderParams,
2627
- uri: localVarPath,
2628
- useQuerystring: this._useQuerystring,
2629
- agentOptions: { keepAlive: false },
2630
- json: true,
2631
- };
2632
- let authenticationPromise = Promise.resolve();
2633
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2634
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2635
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2636
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2637
- return authenticationPromise.then(() => {
2638
- if (Object.keys(localVarFormParams).length) {
2639
- if (localVarUseFormData) {
2640
- localVarRequestOptions.formData = localVarFormParams;
2641
- }
2642
- else {
2643
- localVarRequestOptions.form = localVarFormParams;
2644
- }
2645
- }
2646
- return new Promise((resolve, reject) => {
2647
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2648
- if (error) {
2649
- reject(error);
2650
- }
2651
- else {
2652
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationTransferLearningBlocksResponse");
2653
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2654
- if (typeof body.success === 'boolean' && !body.success) {
2655
- reject(new Error(body.error || errString));
2656
- }
2657
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2658
- resolve(body);
2659
- }
2660
- else {
2661
- reject(errString);
2662
- }
2663
- }
2664
- });
2665
- });
2666
- });
2667
- }
2668
- /**
2669
- * Retrieve all transformation blocks.
2670
- * @summary Get transformation blocks
2671
- * @param organizationId Organization ID
2672
- */
2673
- async listOrganizationTransformationBlocks(organizationId, options = { headers: {} }) {
2674
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation'
2675
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2676
- let localVarQueryParameters = {};
2677
- let localVarHeaderParams = Object.assign({
2678
- 'User-Agent': 'edgeimpulse-api nodejs'
2679
- }, this.defaultHeaders);
2680
- const produces = ['application/json'];
2681
- // give precedence to 'application/json'
2682
- if (produces.indexOf('application/json') >= 0) {
2683
- localVarHeaderParams.Accept = 'application/json';
2684
- }
2685
- else {
2686
- localVarHeaderParams.Accept = produces.join(',');
2687
- }
2688
- let localVarFormParams = {};
2689
- // verify required parameter 'organizationId' is not null or undefined
2690
- if (organizationId === null || organizationId === undefined) {
2691
- throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationTransformationBlocks.');
2692
- }
2693
- Object.assign(localVarHeaderParams, options.headers);
2694
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2695
- let localVarUseFormData = false;
2696
- let localVarRequestOptions = {
2697
- method: 'GET',
2698
- qs: localVarQueryParameters,
2699
- headers: localVarHeaderParams,
2700
- uri: localVarPath,
2701
- useQuerystring: this._useQuerystring,
2702
- agentOptions: { keepAlive: false },
2703
- json: true,
2704
- };
2705
- let authenticationPromise = Promise.resolve();
2706
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2707
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2708
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2709
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2710
- return authenticationPromise.then(() => {
2711
- if (Object.keys(localVarFormParams).length) {
2712
- if (localVarUseFormData) {
2713
- localVarRequestOptions.formData = localVarFormParams;
2714
- }
2715
- else {
2716
- localVarRequestOptions.form = localVarFormParams;
2717
- }
2718
- }
2719
- return new Promise((resolve, reject) => {
2720
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2721
- if (error) {
2722
- reject(error);
2723
- }
2724
- else {
2725
- body = models_1.ObjectSerializer.deserialize(body, "ListOrganizationTransformationBlocksResponse");
2726
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2727
- if (typeof body.success === 'boolean' && !body.success) {
2728
- reject(new Error(body.error || errString));
2729
- }
2730
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2731
- resolve(body);
2732
- }
2733
- else {
2734
- reject(errString);
2735
- }
2736
- }
2737
- });
2738
- });
2739
- });
2740
- }
2741
- /**
2742
- * Retry launch a dsp block.
2743
- * @summary Retry connection to dsp block
2744
- * @param organizationId Organization ID
2745
- * @param dspId DSP Block ID, use the impulse functions to retrieve the ID
2746
- */
2747
- async retryOrganizationDspBlock(organizationId, dspId, options = { headers: {} }) {
2748
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp/{dspId}/retry'
2749
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2750
- .replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
2751
- let localVarQueryParameters = {};
2752
- let localVarHeaderParams = Object.assign({
2753
- 'User-Agent': 'edgeimpulse-api nodejs'
2754
- }, this.defaultHeaders);
2755
- const produces = ['application/json'];
2756
- // give precedence to 'application/json'
2757
- if (produces.indexOf('application/json') >= 0) {
2758
- localVarHeaderParams.Accept = 'application/json';
2759
- }
2760
- else {
2761
- localVarHeaderParams.Accept = produces.join(',');
2762
- }
2763
- let localVarFormParams = {};
2764
- // verify required parameter 'organizationId' is not null or undefined
2765
- if (organizationId === null || organizationId === undefined) {
2766
- throw new Error('Required parameter organizationId was null or undefined when calling retryOrganizationDspBlock.');
2767
- }
2768
- // verify required parameter 'dspId' is not null or undefined
2769
- if (dspId === null || dspId === undefined) {
2770
- throw new Error('Required parameter dspId was null or undefined when calling retryOrganizationDspBlock.');
2771
- }
2772
- Object.assign(localVarHeaderParams, options.headers);
2773
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2774
- let localVarUseFormData = false;
2775
- let localVarRequestOptions = {
2776
- method: 'POST',
2777
- qs: localVarQueryParameters,
2778
- headers: localVarHeaderParams,
2779
- uri: localVarPath,
2780
- useQuerystring: this._useQuerystring,
2781
- agentOptions: { keepAlive: false },
2782
- json: true,
2783
- };
2784
- let authenticationPromise = Promise.resolve();
2785
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2786
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2787
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2788
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2789
- return authenticationPromise.then(() => {
2790
- if (Object.keys(localVarFormParams).length) {
2791
- if (localVarUseFormData) {
2792
- localVarRequestOptions.formData = localVarFormParams;
2793
- }
2794
- else {
2795
- localVarRequestOptions.form = localVarFormParams;
2796
- }
2797
- }
2798
- return new Promise((resolve, reject) => {
2799
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2800
- if (error) {
2801
- reject(error);
2802
- }
2803
- else {
2804
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2805
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2806
- if (typeof body.success === 'boolean' && !body.success) {
2807
- reject(new Error(body.error || errString));
2808
- }
2809
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2810
- resolve(body);
2811
- }
2812
- else {
2813
- reject(errString);
2814
- }
2815
- }
2816
- });
2817
- });
2818
- });
2819
- }
2820
- /**
2821
- * Retry the upload job from a transformation job. Only jobs that have failed can be retried.
2822
- * @summary Retry transformation upload job
2823
- * @param organizationId Organization ID
2824
- * @param createProjectId Create project job ID.
2825
- */
2826
- async retryOrganizationUpload(organizationId, createProjectId, options = { headers: {} }) {
2827
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/create-project/{createProjectId}/upload/retry'
2828
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2829
- .replace('{' + 'createProjectId' + '}', encodeURIComponent(String(createProjectId)));
2830
- let localVarQueryParameters = {};
2831
- let localVarHeaderParams = Object.assign({
2832
- 'User-Agent': 'edgeimpulse-api nodejs'
2833
- }, this.defaultHeaders);
2834
- const produces = ['application/json'];
2835
- // give precedence to 'application/json'
2836
- if (produces.indexOf('application/json') >= 0) {
2837
- localVarHeaderParams.Accept = 'application/json';
2838
- }
2839
- else {
2840
- localVarHeaderParams.Accept = produces.join(',');
2841
- }
2842
- let localVarFormParams = {};
2843
- // verify required parameter 'organizationId' is not null or undefined
2844
- if (organizationId === null || organizationId === undefined) {
2845
- throw new Error('Required parameter organizationId was null or undefined when calling retryOrganizationUpload.');
2846
- }
2847
- // verify required parameter 'createProjectId' is not null or undefined
2848
- if (createProjectId === null || createProjectId === undefined) {
2849
- throw new Error('Required parameter createProjectId was null or undefined when calling retryOrganizationUpload.');
2850
- }
2851
- Object.assign(localVarHeaderParams, options.headers);
2852
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2853
- let localVarUseFormData = false;
2854
- let localVarRequestOptions = {
2855
- method: 'POST',
2856
- qs: localVarQueryParameters,
2857
- headers: localVarHeaderParams,
2858
- uri: localVarPath,
2859
- useQuerystring: this._useQuerystring,
2860
- agentOptions: { keepAlive: false },
2861
- json: true,
2862
- };
2863
- let authenticationPromise = Promise.resolve();
2864
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2865
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2866
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2867
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2868
- return authenticationPromise.then(() => {
2869
- if (Object.keys(localVarFormParams).length) {
2870
- if (localVarUseFormData) {
2871
- localVarRequestOptions.formData = localVarFormParams;
2872
- }
2873
- else {
2874
- localVarRequestOptions.form = localVarFormParams;
2875
- }
2876
- }
2877
- return new Promise((resolve, reject) => {
2878
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2879
- if (error) {
2880
- reject(error);
2881
- }
2882
- else {
2883
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2884
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2885
- if (typeof body.success === 'boolean' && !body.success) {
2886
- reject(new Error(body.error || errString));
2887
- }
2888
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2889
- resolve(body);
2890
- }
2891
- else {
2892
- reject(errString);
2893
- }
2894
- }
2895
- });
2896
- });
2897
- });
2898
- }
2899
- /**
2900
- * Revoke an API key.
2901
- * @summary Revoke API key
2902
- * @param organizationId Organization ID
2903
- * @param apiKeyId API key ID
2904
- */
2905
- async revokeOrganizationApiKey(organizationId, apiKeyId, options = { headers: {} }) {
2906
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/apikeys/{apiKeyId}'
2907
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2908
- .replace('{' + 'apiKeyId' + '}', encodeURIComponent(String(apiKeyId)));
2909
- let localVarQueryParameters = {};
2910
- let localVarHeaderParams = Object.assign({
2911
- 'User-Agent': 'edgeimpulse-api nodejs'
2912
- }, this.defaultHeaders);
2913
- const produces = ['application/json'];
2914
- // give precedence to 'application/json'
2915
- if (produces.indexOf('application/json') >= 0) {
2916
- localVarHeaderParams.Accept = 'application/json';
2917
- }
2918
- else {
2919
- localVarHeaderParams.Accept = produces.join(',');
2920
- }
2921
- let localVarFormParams = {};
2922
- // verify required parameter 'organizationId' is not null or undefined
2923
- if (organizationId === null || organizationId === undefined) {
2924
- throw new Error('Required parameter organizationId was null or undefined when calling revokeOrganizationApiKey.');
2925
- }
2926
- // verify required parameter 'apiKeyId' is not null or undefined
2927
- if (apiKeyId === null || apiKeyId === undefined) {
2928
- throw new Error('Required parameter apiKeyId was null or undefined when calling revokeOrganizationApiKey.');
2929
- }
2930
- Object.assign(localVarHeaderParams, options.headers);
2931
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2932
- let localVarUseFormData = false;
2933
- let localVarRequestOptions = {
2934
- method: 'DELETE',
2935
- qs: localVarQueryParameters,
2936
- headers: localVarHeaderParams,
2937
- uri: localVarPath,
2938
- useQuerystring: this._useQuerystring,
2939
- agentOptions: { keepAlive: false },
2940
- json: true,
2941
- };
2942
- let authenticationPromise = Promise.resolve();
2943
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2944
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2945
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2946
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2947
- return authenticationPromise.then(() => {
2948
- if (Object.keys(localVarFormParams).length) {
2949
- if (localVarUseFormData) {
2950
- localVarRequestOptions.formData = localVarFormParams;
2951
- }
2952
- else {
2953
- localVarRequestOptions.form = localVarFormParams;
2954
- }
2955
- }
2956
- return new Promise((resolve, reject) => {
2957
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2958
- if (error) {
2959
- reject(error);
2960
- }
2961
- else {
2962
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2963
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2964
- if (typeof body.success === 'boolean' && !body.success) {
2965
- reject(new Error(body.error || errString));
2966
- }
2967
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2968
- resolve(body);
2969
- }
2970
- else {
2971
- reject(errString);
2972
- }
2973
- }
2974
- });
2975
- });
2976
- });
2977
- }
2978
- /**
2979
- * Run an organizational pipeline
2980
- * @summary Run pipeline
2981
- * @param organizationId Organization ID
2982
- * @param pipelineId Pipeline ID
2983
- * @param ignoreLastSuccessfulRun If set then &#x60;EI_LAST_SUCCESSFUL_RUN&#x60; is not set. You can use this to re-run a pipeline from scratch.
2984
- */
2985
- async runOrganizationPipeline(organizationId, pipelineId, queryParams, options = { headers: {} }) {
2986
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}/run'
2987
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2988
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
2989
- let localVarQueryParameters = {};
2990
- let localVarHeaderParams = Object.assign({
2991
- 'User-Agent': 'edgeimpulse-api nodejs'
2992
- }, this.defaultHeaders);
2993
- const produces = ['application/json'];
2994
- // give precedence to 'application/json'
2995
- if (produces.indexOf('application/json') >= 0) {
2996
- localVarHeaderParams.Accept = 'application/json';
2997
- }
2998
- else {
2999
- localVarHeaderParams.Accept = produces.join(',');
3000
- }
3001
- let localVarFormParams = {};
3002
- // verify required parameter 'organizationId' is not null or undefined
3003
- if (organizationId === null || organizationId === undefined) {
3004
- throw new Error('Required parameter organizationId was null or undefined when calling runOrganizationPipeline.');
3005
- }
3006
- // verify required parameter 'pipelineId' is not null or undefined
3007
- if (pipelineId === null || pipelineId === undefined) {
3008
- throw new Error('Required parameter pipelineId was null or undefined when calling runOrganizationPipeline.');
3009
- }
3010
- if (queryParams.ignoreLastSuccessfulRun !== undefined) {
3011
- localVarQueryParameters['ignoreLastSuccessfulRun'] = models_1.ObjectSerializer.serialize(queryParams.ignoreLastSuccessfulRun, "boolean");
3012
- }
3013
- Object.assign(localVarHeaderParams, options.headers);
3014
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3015
- let localVarUseFormData = false;
3016
- let localVarRequestOptions = {
3017
- method: 'POST',
3018
- qs: localVarQueryParameters,
3019
- headers: localVarHeaderParams,
3020
- uri: localVarPath,
3021
- useQuerystring: this._useQuerystring,
3022
- agentOptions: { keepAlive: false },
3023
- json: true,
3024
- };
3025
- let authenticationPromise = Promise.resolve();
3026
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3027
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3028
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3029
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3030
- return authenticationPromise.then(() => {
3031
- if (Object.keys(localVarFormParams).length) {
3032
- if (localVarUseFormData) {
3033
- localVarRequestOptions.formData = localVarFormParams;
3034
- }
3035
- else {
3036
- localVarRequestOptions.form = localVarFormParams;
3037
- }
3038
- }
3039
- return new Promise((resolve, reject) => {
3040
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3041
- if (error) {
3042
- reject(error);
3043
- }
3044
- else {
3045
- body = models_1.ObjectSerializer.deserialize(body, "RunOrganizationPipelineResponse");
3046
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3047
- if (typeof body.success === 'boolean' && !body.success) {
3048
- reject(new Error(body.error || errString));
3049
- }
3050
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3051
- resolve(body);
3052
- }
3053
- else {
3054
- reject(errString);
3055
- }
3056
- }
3057
- });
3058
- });
3059
- });
3060
- }
3061
- /**
3062
- * Stops the pipeline, and marks it as failed.
3063
- * @summary Stop a running pipeline
3064
- * @param organizationId Organization ID
3065
- * @param pipelineId Pipeline ID
3066
- */
3067
- async stopOrganizationPipeline(organizationId, pipelineId, options = { headers: {} }) {
3068
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}/stop'
3069
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
3070
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
3071
- let localVarQueryParameters = {};
3072
- let localVarHeaderParams = Object.assign({
3073
- 'User-Agent': 'edgeimpulse-api nodejs'
3074
- }, this.defaultHeaders);
3075
- const produces = ['application/json'];
3076
- // give precedence to 'application/json'
3077
- if (produces.indexOf('application/json') >= 0) {
3078
- localVarHeaderParams.Accept = 'application/json';
3079
- }
3080
- else {
3081
- localVarHeaderParams.Accept = produces.join(',');
3082
- }
3083
- let localVarFormParams = {};
3084
- // verify required parameter 'organizationId' is not null or undefined
3085
- if (organizationId === null || organizationId === undefined) {
3086
- throw new Error('Required parameter organizationId was null or undefined when calling stopOrganizationPipeline.');
3087
- }
3088
- // verify required parameter 'pipelineId' is not null or undefined
3089
- if (pipelineId === null || pipelineId === undefined) {
3090
- throw new Error('Required parameter pipelineId was null or undefined when calling stopOrganizationPipeline.');
3091
- }
3092
- Object.assign(localVarHeaderParams, options.headers);
3093
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3094
- let localVarUseFormData = false;
3095
- let localVarRequestOptions = {
3096
- method: 'POST',
3097
- qs: localVarQueryParameters,
3098
- headers: localVarHeaderParams,
3099
- uri: localVarPath,
3100
- useQuerystring: this._useQuerystring,
3101
- agentOptions: { keepAlive: false },
3102
- json: true,
3103
- };
3104
- let authenticationPromise = Promise.resolve();
3105
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3106
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3107
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3108
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3109
- return authenticationPromise.then(() => {
3110
- if (Object.keys(localVarFormParams).length) {
3111
- if (localVarUseFormData) {
3112
- localVarRequestOptions.formData = localVarFormParams;
3113
- }
3114
- else {
3115
- localVarRequestOptions.form = localVarFormParams;
3116
- }
3117
- }
3118
- return new Promise((resolve, reject) => {
3119
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3120
- if (error) {
3121
- reject(error);
3122
- }
3123
- else {
3124
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
3125
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3126
- if (typeof body.success === 'boolean' && !body.success) {
3127
- reject(new Error(body.error || errString));
3128
- }
3129
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3130
- resolve(body);
3131
- }
3132
- else {
3133
- reject(errString);
3134
- }
3135
- }
3136
- });
3137
- });
3138
- });
3139
- }
3140
- /**
3141
- * Updates a deploy block. Only values in the body will be updated.
3142
- * @summary Update deploy block
3143
- * @param organizationId Organization ID
3144
- * @param deployId Deploy block ID.
3145
- * @param name
3146
- * @param dockerContainer
3147
- * @param description
3148
- * @param cliArguments
3149
- * @param requestsCpu
3150
- * @param requestsMemory
3151
- * @param limitsCpu
3152
- * @param limitsMemory
3153
- * @param photo
3154
- * @param integrateUrl
3155
- * @param privileged
3156
- * @param mountLearnBlock
3157
- * @param supportsEonCompiler
3158
- * @param showOptimizations
3159
- * @param category
3160
- */
3161
- async updateOrganizationDeployBlock(organizationId, deployId, params, options = { headers: {} }) {
3162
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy/{deployId}'
3163
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
3164
- .replace('{' + 'deployId' + '}', encodeURIComponent(String(deployId)));
3165
- let localVarQueryParameters = {};
3166
- let localVarHeaderParams = Object.assign({
3167
- 'User-Agent': 'edgeimpulse-api nodejs'
3168
- }, this.defaultHeaders);
3169
- const produces = ['application/json'];
3170
- // give precedence to 'application/json'
3171
- if (produces.indexOf('application/json') >= 0) {
3172
- localVarHeaderParams.Accept = 'application/json';
3173
- }
3174
- else {
3175
- localVarHeaderParams.Accept = produces.join(',');
3176
- }
3177
- let localVarFormParams = {};
3178
- // verify required parameter 'organizationId' is not null or undefined
3179
- if (organizationId === null || organizationId === undefined) {
3180
- throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationDeployBlock.');
3181
- }
3182
- // verify required parameter 'deployId' is not null or undefined
3183
- if (deployId === null || deployId === undefined) {
3184
- throw new Error('Required parameter deployId was null or undefined when calling updateOrganizationDeployBlock.');
3185
- }
3186
- Object.assign(localVarHeaderParams, options.headers);
3187
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3188
- let localVarUseFormData = false;
3189
- if (params.name !== undefined) {
3190
- localVarFormParams['name'] = models_1.ObjectSerializer.serialize(params.name, "string");
3191
- }
3192
- if (params.dockerContainer !== undefined) {
3193
- localVarFormParams['dockerContainer'] = models_1.ObjectSerializer.serialize(params.dockerContainer, "string");
3194
- }
3195
- if (params.description !== undefined) {
3196
- localVarFormParams['description'] = models_1.ObjectSerializer.serialize(params.description, "string");
3197
- }
3198
- if (params.cliArguments !== undefined) {
3199
- localVarFormParams['cliArguments'] = models_1.ObjectSerializer.serialize(params.cliArguments, "string");
3200
- }
3201
- if (params.requestsCpu !== undefined) {
3202
- localVarFormParams['requestsCpu'] = models_1.ObjectSerializer.serialize(params.requestsCpu, "number");
3203
- }
3204
- if (params.requestsMemory !== undefined) {
3205
- localVarFormParams['requestsMemory'] = models_1.ObjectSerializer.serialize(params.requestsMemory, "number");
3206
- }
3207
- if (params.limitsCpu !== undefined) {
3208
- localVarFormParams['limitsCpu'] = models_1.ObjectSerializer.serialize(params.limitsCpu, "number");
3209
- }
3210
- if (params.limitsMemory !== undefined) {
3211
- localVarFormParams['limitsMemory'] = models_1.ObjectSerializer.serialize(params.limitsMemory, "number");
3212
- }
3213
- if (params.photo !== undefined) {
3214
- localVarFormParams['photo'] = params.photo;
3215
- }
3216
- localVarUseFormData = true;
3217
- if (params.integrateUrl !== undefined) {
3218
- localVarFormParams['integrateUrl'] = models_1.ObjectSerializer.serialize(params.integrateUrl, "string");
3219
- }
3220
- if (params.privileged !== undefined) {
3221
- localVarFormParams['privileged'] = models_1.ObjectSerializer.serialize(params.privileged, "boolean");
3222
- }
3223
- if (params.mountLearnBlock !== undefined) {
3224
- localVarFormParams['mountLearnBlock'] = models_1.ObjectSerializer.serialize(params.mountLearnBlock, "boolean");
3225
- }
3226
- if (params.supportsEonCompiler !== undefined) {
3227
- localVarFormParams['supportsEonCompiler'] = models_1.ObjectSerializer.serialize(params.supportsEonCompiler, "boolean");
3228
- }
3229
- if (params.showOptimizations !== undefined) {
3230
- localVarFormParams['showOptimizations'] = models_1.ObjectSerializer.serialize(params.showOptimizations, "boolean");
3231
- }
3232
- if (params.category !== undefined) {
3233
- localVarFormParams['category'] = models_1.ObjectSerializer.serialize(params.category, "string");
3234
- }
3235
- let localVarRequestOptions = {
3236
- method: 'POST',
3237
- qs: localVarQueryParameters,
3238
- headers: localVarHeaderParams,
3239
- uri: localVarPath,
3240
- useQuerystring: this._useQuerystring,
3241
- agentOptions: { keepAlive: false },
3242
- json: true,
3243
- };
3244
- let authenticationPromise = Promise.resolve();
3245
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3246
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3247
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3248
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3249
- return authenticationPromise.then(() => {
3250
- if (Object.keys(localVarFormParams).length) {
3251
- if (localVarUseFormData) {
3252
- localVarRequestOptions.formData = localVarFormParams;
3253
- }
3254
- else {
3255
- localVarRequestOptions.form = localVarFormParams;
3256
- }
3257
- }
3258
- return new Promise((resolve, reject) => {
3259
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3260
- if (error) {
3261
- reject(error);
3262
- }
3263
- else {
3264
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
3265
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3266
- if (typeof body.success === 'boolean' && !body.success) {
3267
- reject(new Error(body.error || errString));
3268
- }
3269
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3270
- resolve(body);
3271
- }
3272
- else {
3273
- reject(errString);
3274
- }
3275
- }
3276
- });
3277
- });
3278
- });
3279
- }
3280
- /**
3281
- * Updates a dsp block. Only values in the body will be updated.
3282
- * @summary Update dsp block
3283
- * @param organizationId Organization ID
3284
- * @param dspId DSP Block ID, use the impulse functions to retrieve the ID
3285
- * @param updateOrganizationDspBlockRequest
3286
- */
3287
- async updateOrganizationDspBlock(organizationId, dspId, updateOrganizationDspBlockRequest, options = { headers: {} }) {
3288
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp/{dspId}'
3289
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
3290
- .replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
3291
- let localVarQueryParameters = {};
3292
- let localVarHeaderParams = Object.assign({
3293
- 'User-Agent': 'edgeimpulse-api nodejs'
3294
- }, this.defaultHeaders);
3295
- const produces = ['application/json'];
3296
- // give precedence to 'application/json'
3297
- if (produces.indexOf('application/json') >= 0) {
3298
- localVarHeaderParams.Accept = 'application/json';
3299
- }
3300
- else {
3301
- localVarHeaderParams.Accept = produces.join(',');
3302
- }
3303
- let localVarFormParams = {};
3304
- // verify required parameter 'organizationId' is not null or undefined
3305
- if (organizationId === null || organizationId === undefined) {
3306
- throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationDspBlock.');
3307
- }
3308
- // verify required parameter 'dspId' is not null or undefined
3309
- if (dspId === null || dspId === undefined) {
3310
- throw new Error('Required parameter dspId was null or undefined when calling updateOrganizationDspBlock.');
3311
- }
3312
- // verify required parameter 'updateOrganizationDspBlockRequest' is not null or undefined
3313
- if (updateOrganizationDspBlockRequest === null || updateOrganizationDspBlockRequest === undefined) {
3314
- throw new Error('Required parameter updateOrganizationDspBlockRequest was null or undefined when calling updateOrganizationDspBlock.');
3315
- }
3316
- Object.assign(localVarHeaderParams, options.headers);
3317
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3318
- let localVarUseFormData = false;
3319
- let localVarRequestOptions = {
3320
- method: 'POST',
3321
- qs: localVarQueryParameters,
3322
- headers: localVarHeaderParams,
3323
- uri: localVarPath,
3324
- useQuerystring: this._useQuerystring,
3325
- agentOptions: { keepAlive: false },
3326
- json: true,
3327
- body: models_1.ObjectSerializer.serialize(updateOrganizationDspBlockRequest, "UpdateOrganizationDspBlockRequest")
3328
- };
3329
- let authenticationPromise = Promise.resolve();
3330
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3331
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3332
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3333
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3334
- return authenticationPromise.then(() => {
3335
- if (Object.keys(localVarFormParams).length) {
3336
- if (localVarUseFormData) {
3337
- localVarRequestOptions.formData = localVarFormParams;
3338
- }
3339
- else {
3340
- localVarRequestOptions.form = localVarFormParams;
3341
- }
3342
- }
3343
- return new Promise((resolve, reject) => {
3344
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3345
- if (error) {
3346
- reject(error);
3347
- }
3348
- else {
3349
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
3350
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3351
- if (typeof body.success === 'boolean' && !body.success) {
3352
- reject(new Error(body.error || errString));
3353
- }
3354
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3355
- resolve(body);
3356
- }
3357
- else {
3358
- reject(errString);
3359
- }
3360
- }
3361
- });
3362
- });
3363
- });
3364
- }
3365
- /**
3366
- * Update an organizational pipelines
3367
- * @summary Update pipeline
3368
- * @param organizationId Organization ID
3369
- * @param pipelineId Pipeline ID
3370
- * @param organizationUpdatePipelineBody
3371
- */
3372
- async updateOrganizationPipeline(organizationId, pipelineId, organizationUpdatePipelineBody, options = { headers: {} }) {
3373
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/pipelines/{pipelineId}'
3374
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
3375
- .replace('{' + 'pipelineId' + '}', encodeURIComponent(String(pipelineId)));
3376
- let localVarQueryParameters = {};
3377
- let localVarHeaderParams = Object.assign({
3378
- 'User-Agent': 'edgeimpulse-api nodejs'
3379
- }, this.defaultHeaders);
3380
- const produces = ['application/json'];
3381
- // give precedence to 'application/json'
3382
- if (produces.indexOf('application/json') >= 0) {
3383
- localVarHeaderParams.Accept = 'application/json';
3384
- }
3385
- else {
3386
- localVarHeaderParams.Accept = produces.join(',');
3387
- }
3388
- let localVarFormParams = {};
3389
- // verify required parameter 'organizationId' is not null or undefined
3390
- if (organizationId === null || organizationId === undefined) {
3391
- throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationPipeline.');
3392
- }
3393
- // verify required parameter 'pipelineId' is not null or undefined
3394
- if (pipelineId === null || pipelineId === undefined) {
3395
- throw new Error('Required parameter pipelineId was null or undefined when calling updateOrganizationPipeline.');
3396
- }
3397
- // verify required parameter 'organizationUpdatePipelineBody' is not null or undefined
3398
- if (organizationUpdatePipelineBody === null || organizationUpdatePipelineBody === undefined) {
3399
- throw new Error('Required parameter organizationUpdatePipelineBody was null or undefined when calling updateOrganizationPipeline.');
3400
- }
3401
- Object.assign(localVarHeaderParams, options.headers);
3402
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3403
- let localVarUseFormData = false;
3404
- let localVarRequestOptions = {
3405
- method: 'POST',
3406
- qs: localVarQueryParameters,
3407
- headers: localVarHeaderParams,
3408
- uri: localVarPath,
3409
- useQuerystring: this._useQuerystring,
3410
- agentOptions: { keepAlive: false },
3411
- json: true,
3412
- body: models_1.ObjectSerializer.serialize(organizationUpdatePipelineBody, "OrganizationUpdatePipelineBody")
3413
- };
3414
- let authenticationPromise = Promise.resolve();
3415
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3416
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3417
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3418
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3419
- return authenticationPromise.then(() => {
3420
- if (Object.keys(localVarFormParams).length) {
3421
- if (localVarUseFormData) {
3422
- localVarRequestOptions.formData = localVarFormParams;
3423
- }
3424
- else {
3425
- localVarRequestOptions.form = localVarFormParams;
3426
- }
3427
- }
3428
- return new Promise((resolve, reject) => {
3429
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3430
- if (error) {
3431
- reject(error);
3432
- }
3433
- else {
3434
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
3435
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3436
- if (typeof body.success === 'boolean' && !body.success) {
3437
- reject(new Error(body.error || errString));
3438
- }
3439
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3440
- resolve(body);
3441
- }
3442
- else {
3443
- reject(errString);
3444
- }
3445
- }
3446
- });
3447
- });
3448
- });
3449
- }
3450
- /**
3451
- * Updates a transfer learning block. Only values in the body will be updated.
3452
- * @summary Update transfer learning block
3453
- * @param organizationId Organization ID
3454
- * @param transferLearningId Transfer learning ID
3455
- * @param updateOrganizationTransferLearningBlockRequest
3456
- */
3457
- async updateOrganizationTransferLearningBlock(organizationId, transferLearningId, updateOrganizationTransferLearningBlockRequest, options = { headers: {} }) {
3458
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transfer-learning/{transferLearningId}'
3459
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
3460
- .replace('{' + 'transferLearningId' + '}', encodeURIComponent(String(transferLearningId)));
3461
- let localVarQueryParameters = {};
3462
- let localVarHeaderParams = Object.assign({
3463
- 'User-Agent': 'edgeimpulse-api nodejs'
3464
- }, this.defaultHeaders);
3465
- const produces = ['application/json'];
3466
- // give precedence to 'application/json'
3467
- if (produces.indexOf('application/json') >= 0) {
3468
- localVarHeaderParams.Accept = 'application/json';
3469
- }
3470
- else {
3471
- localVarHeaderParams.Accept = produces.join(',');
3472
- }
3473
- let localVarFormParams = {};
3474
- // verify required parameter 'organizationId' is not null or undefined
3475
- if (organizationId === null || organizationId === undefined) {
3476
- throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationTransferLearningBlock.');
3477
- }
3478
- // verify required parameter 'transferLearningId' is not null or undefined
3479
- if (transferLearningId === null || transferLearningId === undefined) {
3480
- throw new Error('Required parameter transferLearningId was null or undefined when calling updateOrganizationTransferLearningBlock.');
3481
- }
3482
- // verify required parameter 'updateOrganizationTransferLearningBlockRequest' is not null or undefined
3483
- if (updateOrganizationTransferLearningBlockRequest === null || updateOrganizationTransferLearningBlockRequest === undefined) {
3484
- throw new Error('Required parameter updateOrganizationTransferLearningBlockRequest was null or undefined when calling updateOrganizationTransferLearningBlock.');
3485
- }
3486
- Object.assign(localVarHeaderParams, options.headers);
3487
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3488
- let localVarUseFormData = false;
3489
- let localVarRequestOptions = {
3490
- method: 'POST',
3491
- qs: localVarQueryParameters,
3492
- headers: localVarHeaderParams,
3493
- uri: localVarPath,
3494
- useQuerystring: this._useQuerystring,
3495
- agentOptions: { keepAlive: false },
3496
- json: true,
3497
- body: models_1.ObjectSerializer.serialize(updateOrganizationTransferLearningBlockRequest, "UpdateOrganizationTransferLearningBlockRequest")
3498
- };
3499
- let authenticationPromise = Promise.resolve();
3500
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3501
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3502
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3503
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3504
- return authenticationPromise.then(() => {
3505
- if (Object.keys(localVarFormParams).length) {
3506
- if (localVarUseFormData) {
3507
- localVarRequestOptions.formData = localVarFormParams;
3508
- }
3509
- else {
3510
- localVarRequestOptions.form = localVarFormParams;
3511
- }
3512
- }
3513
- return new Promise((resolve, reject) => {
3514
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3515
- if (error) {
3516
- reject(error);
3517
- }
3518
- else {
3519
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
3520
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3521
- if (typeof body.success === 'boolean' && !body.success) {
3522
- reject(new Error(body.error || errString));
3523
- }
3524
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3525
- resolve(body);
3526
- }
3527
- else {
3528
- reject(errString);
3529
- }
3530
- }
3531
- });
3532
- });
3533
- });
3534
- }
3535
- /**
3536
- * Updates a transformation block. Only values in the body will be updated.
3537
- * @summary Update transformation block
3538
- * @param organizationId Organization ID
3539
- * @param transformationId Transformation block ID.
3540
- * @param updateOrganizationTransformationBlockRequest
3541
- */
3542
- async updateOrganizationTransformationBlock(organizationId, transformationId, updateOrganizationTransformationBlockRequest, options = { headers: {} }) {
3543
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation/{transformationId}'
3544
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
3545
- .replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
3546
- let localVarQueryParameters = {};
3547
- let localVarHeaderParams = Object.assign({
3548
- 'User-Agent': 'edgeimpulse-api nodejs'
3549
- }, this.defaultHeaders);
3550
- const produces = ['application/json'];
3551
- // give precedence to 'application/json'
3552
- if (produces.indexOf('application/json') >= 0) {
3553
- localVarHeaderParams.Accept = 'application/json';
3554
- }
3555
- else {
3556
- localVarHeaderParams.Accept = produces.join(',');
3557
- }
3558
- let localVarFormParams = {};
3559
- // verify required parameter 'organizationId' is not null or undefined
3560
- if (organizationId === null || organizationId === undefined) {
3561
- throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationTransformationBlock.');
3562
- }
3563
- // verify required parameter 'transformationId' is not null or undefined
3564
- if (transformationId === null || transformationId === undefined) {
3565
- throw new Error('Required parameter transformationId was null or undefined when calling updateOrganizationTransformationBlock.');
3566
- }
3567
- // verify required parameter 'updateOrganizationTransformationBlockRequest' is not null or undefined
3568
- if (updateOrganizationTransformationBlockRequest === null || updateOrganizationTransformationBlockRequest === undefined) {
3569
- throw new Error('Required parameter updateOrganizationTransformationBlockRequest was null or undefined when calling updateOrganizationTransformationBlock.');
3570
- }
3571
- Object.assign(localVarHeaderParams, options.headers);
3572
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3573
- let localVarUseFormData = false;
3574
- let localVarRequestOptions = {
3575
- method: 'POST',
3576
- qs: localVarQueryParameters,
3577
- headers: localVarHeaderParams,
3578
- uri: localVarPath,
3579
- useQuerystring: this._useQuerystring,
3580
- agentOptions: { keepAlive: false },
3581
- json: true,
3582
- body: models_1.ObjectSerializer.serialize(updateOrganizationTransformationBlockRequest, "UpdateOrganizationTransformationBlockRequest")
3583
- };
3584
- let authenticationPromise = Promise.resolve();
3585
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3586
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3587
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3588
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3589
- return authenticationPromise.then(() => {
3590
- if (Object.keys(localVarFormParams).length) {
3591
- if (localVarUseFormData) {
3592
- localVarRequestOptions.formData = localVarFormParams;
3593
- }
3594
- else {
3595
- localVarRequestOptions.form = localVarFormParams;
3596
- }
3597
- }
3598
- return new Promise((resolve, reject) => {
3599
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3600
- if (error) {
3601
- reject(error);
3602
- }
3603
- else {
3604
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
3605
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3606
- if (typeof body.success === 'boolean' && !body.success) {
3607
- reject(new Error(body.error || errString));
3608
- }
3609
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3610
- resolve(body);
3611
- }
3612
- else {
3613
- reject(errString);
3614
- }
3615
- }
3616
- });
3617
- });
3618
- });
3619
- }
3620
- /**
3621
- * Upload a zip file containing a custom transformation or deployment block.
3622
- * @summary Upload a custom block
3623
- * @param organizationId Organization ID
3624
- * @param tar
3625
- * @param type
3626
- * @param blockId
3627
- */
3628
- async uploadCustomBlock(organizationId, params, options = { headers: {} }) {
3629
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/custom-block'
3630
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
3631
- let localVarQueryParameters = {};
3632
- let localVarHeaderParams = Object.assign({
3633
- 'User-Agent': 'edgeimpulse-api nodejs'
3634
- }, this.defaultHeaders);
3635
- const produces = ['application/json'];
3636
- // give precedence to 'application/json'
3637
- if (produces.indexOf('application/json') >= 0) {
3638
- localVarHeaderParams.Accept = 'application/json';
3639
- }
3640
- else {
3641
- localVarHeaderParams.Accept = produces.join(',');
3642
- }
3643
- let localVarFormParams = {};
3644
- // verify required parameter 'organizationId' is not null or undefined
3645
- if (organizationId === null || organizationId === undefined) {
3646
- throw new Error('Required parameter organizationId was null or undefined when calling uploadCustomBlock.');
3647
- }
3648
- // verify required parameter 'tar' is not null or undefined
3649
- if (params.tar === null || params.tar === undefined) {
3650
- throw new Error('Required parameter params.tar was null or undefined when calling uploadCustomBlock.');
3651
- }
3652
- // verify required parameter 'type' is not null or undefined
3653
- if (params.type === null || params.type === undefined) {
3654
- throw new Error('Required parameter params.type was null or undefined when calling uploadCustomBlock.');
3655
- }
3656
- // verify required parameter 'blockId' is not null or undefined
3657
- if (params.blockId === null || params.blockId === undefined) {
3658
- throw new Error('Required parameter params.blockId was null or undefined when calling uploadCustomBlock.');
3659
- }
3660
- Object.assign(localVarHeaderParams, options.headers);
3661
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3662
- let localVarUseFormData = false;
3663
- if (params.tar !== undefined) {
3664
- localVarFormParams['tar'] = params.tar;
3665
- }
3666
- localVarUseFormData = true;
3667
- if (params.type !== undefined) {
3668
- localVarFormParams['type'] = models_1.ObjectSerializer.serialize(params.type, "string");
3669
- }
3670
- if (params.blockId !== undefined) {
3671
- localVarFormParams['blockId'] = models_1.ObjectSerializer.serialize(params.blockId, "number");
3672
- }
3673
- let localVarRequestOptions = {
3674
- method: 'POST',
3675
- qs: localVarQueryParameters,
3676
- headers: localVarHeaderParams,
3677
- uri: localVarPath,
3678
- useQuerystring: this._useQuerystring,
3679
- agentOptions: { keepAlive: false },
3680
- json: true,
3681
- };
3682
- let authenticationPromise = Promise.resolve();
3683
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3684
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3685
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3686
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3687
- return authenticationPromise.then(() => {
3688
- if (Object.keys(localVarFormParams).length) {
3689
- if (localVarUseFormData) {
3690
- localVarRequestOptions.formData = localVarFormParams;
3691
- }
3692
- else {
3693
- localVarRequestOptions.form = localVarFormParams;
3694
- }
3695
- }
3696
- return new Promise((resolve, reject) => {
3697
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3698
- if (error) {
3699
- reject(error);
3700
- }
3701
- else {
3702
- body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
3703
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3704
- if (typeof body.success === 'boolean' && !body.success) {
3705
- reject(new Error(body.error || errString));
3706
- }
3707
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3708
- resolve(body);
3709
- }
3710
- else {
3711
- reject(errString);
3712
- }
3713
- }
3714
- });
3715
- });
3716
- });
3717
- }
3718
- /**
3719
- * Verify whether we can reach a bucket before adding it.
3720
- * @summary Verify bucket connectivity
3721
- * @param organizationId Organization ID
3722
- * @param verifyOrganizationBucketRequest
3723
- */
3724
- async verifyOrganizationBucket(organizationId, verifyOrganizationBucketRequest, options = { headers: {} }) {
3725
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/buckets/verify'
3726
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
3727
- let localVarQueryParameters = {};
3728
- let localVarHeaderParams = Object.assign({
3729
- 'User-Agent': 'edgeimpulse-api nodejs'
3730
- }, this.defaultHeaders);
3731
- const produces = ['application/json'];
3732
- // give precedence to 'application/json'
3733
- if (produces.indexOf('application/json') >= 0) {
3734
- localVarHeaderParams.Accept = 'application/json';
3735
- }
3736
- else {
3737
- localVarHeaderParams.Accept = produces.join(',');
3738
- }
3739
- let localVarFormParams = {};
3740
- // verify required parameter 'organizationId' is not null or undefined
3741
- if (organizationId === null || organizationId === undefined) {
3742
- throw new Error('Required parameter organizationId was null or undefined when calling verifyOrganizationBucket.');
3743
- }
3744
- // verify required parameter 'verifyOrganizationBucketRequest' is not null or undefined
3745
- if (verifyOrganizationBucketRequest === null || verifyOrganizationBucketRequest === undefined) {
3746
- throw new Error('Required parameter verifyOrganizationBucketRequest was null or undefined when calling verifyOrganizationBucket.');
3747
- }
3748
- Object.assign(localVarHeaderParams, options.headers);
3749
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
3750
- let localVarUseFormData = false;
3751
- let localVarRequestOptions = {
3752
- method: 'POST',
3753
- qs: localVarQueryParameters,
3754
- headers: localVarHeaderParams,
3755
- uri: localVarPath,
3756
- useQuerystring: this._useQuerystring,
3757
- agentOptions: { keepAlive: false },
3758
- json: true,
3759
- body: models_1.ObjectSerializer.serialize(verifyOrganizationBucketRequest, "VerifyOrganizationBucketRequest")
3760
- };
3761
- let authenticationPromise = Promise.resolve();
3762
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
3763
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
3764
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
3765
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
3766
- return authenticationPromise.then(() => {
3767
- if (Object.keys(localVarFormParams).length) {
3768
- if (localVarUseFormData) {
3769
- localVarRequestOptions.formData = localVarFormParams;
3770
- }
3771
- else {
3772
- localVarRequestOptions.form = localVarFormParams;
3773
- }
3774
- }
3775
- return new Promise((resolve, reject) => {
3776
- localVarRequest(localVarRequestOptions, (error, response, body) => {
3777
- if (error) {
3778
- reject(error);
3779
- }
3780
- else {
3781
- body = models_1.ObjectSerializer.deserialize(body, "VerifyOrganizationBucketResponse");
3782
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
3783
- if (typeof body.success === 'boolean' && !body.success) {
3784
- reject(new Error(body.error || errString));
3785
- }
3786
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
3787
- resolve(body);
3788
- }
3789
- else {
3790
- reject(errString);
3791
- }
3792
- }
3793
- });
3794
- });
3795
- });
3796
- }
3797
- }
3798
- exports.OrganizationAllowDeveloperProfileApi = OrganizationAllowDeveloperProfileApi;
3799
- //# sourceMappingURL=organizationAllowDeveloperProfileApi.js.map