edge-impulse-linux 1.4.7 → 1.5.0

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