edge-impulse-linux 1.4.8 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/README.md +10 -0
  2. package/build/cli/init-cli-app.js +4 -1
  3. package/build/cli/init-cli-app.js.map +1 -1
  4. package/build/cli/linux/camera-debug.js +0 -0
  5. package/build/cli/linux/linux.js +0 -0
  6. package/build/cli/linux/runner.js +194 -2
  7. package/build/cli/linux/runner.js.map +1 -1
  8. package/build/cli/linux/webserver/middleware/asyncMiddleware.d.ts +2 -0
  9. package/build/cli/linux/webserver/middleware/asyncMiddleware.js +10 -0
  10. package/build/cli/linux/webserver/middleware/asyncMiddleware.js.map +1 -0
  11. package/build/cli/linux/webserver/public/inference-server.d.ts +0 -0
  12. package/build/cli/linux/webserver/public/inference-server.js +168 -0
  13. package/build/cli/linux/webserver/public/inference-server.js.map +1 -0
  14. package/build/cli/linux/webserver/views/escape-html-template-tag/escape.d.ts +12 -0
  15. package/build/cli/linux/webserver/views/escape-html-template-tag/escape.js +59 -0
  16. package/build/cli/linux/webserver/views/escape-html-template-tag/escape.js.map +1 -0
  17. package/build/cli/linux/webserver/views/escape-html-template-tag/index.d.ts +7 -0
  18. package/build/cli/linux/webserver/views/escape-html-template-tag/index.js +24 -0
  19. package/build/cli/linux/webserver/views/escape-html-template-tag/index.js.map +1 -0
  20. package/build/cli/linux/webserver/views/inference-server-view.d.ts +19 -0
  21. package/build/cli/linux/webserver/views/inference-server-view.js +164 -0
  22. package/build/cli/linux/webserver/views/inference-server-view.js.map +1 -0
  23. package/build/cli/make-image.d.ts +2 -7
  24. package/build/cli/make-image.js +15 -0
  25. package/build/cli/make-image.js.map +1 -1
  26. package/build/library/classifier/image-classifier.d.ts +10 -2
  27. package/build/library/classifier/image-classifier.js +21 -6
  28. package/build/library/classifier/image-classifier.js.map +1 -1
  29. package/build/sdk/studio/sdk/api/adminApi.d.ts +129 -5
  30. package/build/sdk/studio/sdk/api/adminApi.js +956 -236
  31. package/build/sdk/studio/sdk/api/adminApi.js.map +1 -1
  32. package/build/sdk/studio/sdk/api/apis.d.ts +1 -21
  33. package/build/sdk/studio/sdk/api/apis.js +1 -21
  34. package/build/sdk/studio/sdk/api/apis.js.map +1 -1
  35. package/build/sdk/studio/sdk/api/jobsApi.d.ts +2 -3
  36. package/build/sdk/studio/sdk/api/jobsApi.js +2 -8
  37. package/build/sdk/studio/sdk/api/jobsApi.js.map +1 -1
  38. package/build/sdk/studio/sdk/api/optimizationApi.d.ts +36 -7
  39. package/build/sdk/studio/sdk/api/optimizationApi.js +237 -8
  40. package/build/sdk/studio/sdk/api/optimizationApi.js.map +1 -1
  41. package/build/sdk/studio/sdk/api/organizationDataApi.d.ts +2 -2
  42. package/build/sdk/studio/sdk/api/organizationDataApi.js +2 -2
  43. package/build/sdk/studio/sdk/api/organizationsApi.d.ts +177 -6
  44. package/build/sdk/studio/sdk/api/organizationsApi.js +1197 -170
  45. package/build/sdk/studio/sdk/api/organizationsApi.js.map +1 -1
  46. package/build/sdk/studio/sdk/api/projectsApi.d.ts +26 -3
  47. package/build/sdk/studio/sdk/api/projectsApi.js +158 -6
  48. package/build/sdk/studio/sdk/api/projectsApi.js.map +1 -1
  49. package/build/sdk/studio/sdk/api/rawDataApi.d.ts +37 -3
  50. package/build/sdk/studio/sdk/api/rawDataApi.js +234 -3
  51. package/build/sdk/studio/sdk/api/rawDataApi.js.map +1 -1
  52. package/build/sdk/studio/sdk/api/uploadPortalApi.d.ts +1 -1
  53. package/build/sdk/studio/sdk/api/uploadPortalApi.js +1 -1
  54. package/build/sdk/studio/sdk/model/addApiKeyRequest.d.ts +0 -7
  55. package/build/sdk/studio/sdk/model/addApiKeyRequest.js +1 -12
  56. package/build/sdk/studio/sdk/model/addApiKeyRequest.js.map +1 -1
  57. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequest.js.map +1 -1
  58. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequestAllOf.d.ts +27 -0
  59. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequestAllOf.js +33 -0
  60. package/build/sdk/studio/sdk/model/addOrganizationApiKeyRequestAllOf.js.map +1 -0
  61. package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockRequest.d.ts +4 -0
  62. package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockRequest.js +5 -0
  63. package/build/sdk/studio/sdk/model/addOrganizationTransferLearningBlockRequest.js.map +1 -1
  64. package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.d.ts +4 -0
  65. package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.js +5 -0
  66. package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.js.map +1 -1
  67. package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.d.ts +39 -0
  68. package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.js +48 -0
  69. package/build/sdk/studio/sdk/model/addProjectApiKeyRequest.js.map +1 -0
  70. package/build/sdk/studio/sdk/model/addProjectApiKeyRequestAllOf.d.ts +31 -0
  71. package/build/sdk/studio/sdk/model/addProjectApiKeyRequestAllOf.js +38 -0
  72. package/build/sdk/studio/sdk/model/addProjectApiKeyRequestAllOf.js.map +1 -0
  73. package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.d.ts +39 -0
  74. package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.js +48 -0
  75. package/build/sdk/studio/sdk/model/adminAddOrganizationApiKeyRequest.js.map +1 -0
  76. package/build/sdk/studio/sdk/model/{getUserResponseAllOfOrganizations.d.ts → adminAddProjectApiKeyRequest.d.ts} +8 -8
  77. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequest.js +42 -0
  78. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequest.js.map +1 -0
  79. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequestAllOf.d.ts +28 -0
  80. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequestAllOf.js +32 -0
  81. package/build/sdk/studio/sdk/model/adminAddProjectApiKeyRequestAllOf.js.map +1 -0
  82. package/build/sdk/studio/sdk/model/adminApiOrganization.d.ts +4 -0
  83. package/build/sdk/studio/sdk/model/adminApiOrganization.js +5 -0
  84. package/build/sdk/studio/sdk/model/adminApiOrganization.js.map +1 -1
  85. package/build/sdk/studio/sdk/model/{whitelabelAdminCreateProjectRequest.d.ts → adminCreateProjectRequest.d.ts} +5 -3
  86. package/build/sdk/studio/sdk/model/{whitelabelAdminCreateProjectRequest.js → adminCreateProjectRequest.js} +14 -9
  87. package/build/sdk/studio/sdk/model/adminCreateProjectRequest.js.map +1 -0
  88. package/build/sdk/studio/sdk/model/{getAutoSegmenterResponse.d.ts → adminGetOrganizationComputeTimeUsageResponse.d.ts} +13 -7
  89. package/build/sdk/studio/sdk/model/adminGetOrganizationComputeTimeUsageResponse.js +52 -0
  90. package/build/sdk/studio/sdk/model/adminGetOrganizationComputeTimeUsageResponse.js.map +1 -0
  91. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponse.d.ts +34 -0
  92. package/build/sdk/studio/sdk/model/{saveAutoSegmenterClustersResponse.js → adminGetOrganizationUsageReportResponse.js} +12 -12
  93. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponse.js.map +1 -0
  94. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponseAllOf.d.ts +26 -0
  95. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponseAllOf.js +32 -0
  96. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportResponseAllOf.js.map +1 -0
  97. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponse.d.ts → adminGetOrganizationUsageReportsResponse.d.ts} +4 -3
  98. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponse.js +47 -0
  99. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponse.js.map +1 -0
  100. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponseAllOf.d.ts → adminGetOrganizationUsageReportsResponseAllOf.d.ts} +4 -3
  101. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponseAllOf.js +37 -0
  102. package/build/sdk/studio/sdk/model/adminGetOrganizationUsageReportsResponseAllOf.js.map +1 -0
  103. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponse.d.ts +8 -20
  104. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponse.js +11 -41
  105. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponse.js.map +1 -1
  106. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponseAllOf.d.ts +0 -8
  107. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponseAllOf.js +0 -10
  108. package/build/sdk/studio/sdk/model/adminOrganizationInfoResponseAllOf.js.map +1 -1
  109. package/build/sdk/studio/sdk/model/adminUpdateUserRequest.d.ts +4 -0
  110. package/build/sdk/studio/sdk/model/adminUpdateUserRequest.js +5 -0
  111. package/build/sdk/studio/sdk/model/adminUpdateUserRequest.js.map +1 -1
  112. package/build/sdk/studio/sdk/model/anomalyResult.d.ts +5 -0
  113. package/build/sdk/studio/sdk/model/anomalyResult.js +5 -0
  114. package/build/sdk/studio/sdk/model/anomalyResult.js.map +1 -1
  115. package/build/sdk/studio/sdk/model/applicationBudget.d.ts +32 -0
  116. package/build/sdk/studio/sdk/model/applicationBudget.js +45 -0
  117. package/build/sdk/studio/sdk/model/applicationBudget.js.map +1 -0
  118. package/build/sdk/studio/sdk/model/classifySampleResponseClassification.d.ts +5 -0
  119. package/build/sdk/studio/sdk/model/classifySampleResponseClassification.js +5 -0
  120. package/build/sdk/studio/sdk/model/classifySampleResponseClassification.js.map +1 -1
  121. package/build/sdk/studio/sdk/model/cosineSimilarityData.d.ts +36 -0
  122. package/build/sdk/studio/sdk/model/cosineSimilarityData.js +40 -0
  123. package/build/sdk/studio/sdk/model/cosineSimilarityData.js.map +1 -0
  124. package/build/sdk/studio/sdk/model/cosineSimilarityIssue.d.ts +42 -0
  125. package/build/sdk/studio/sdk/model/cosineSimilarityIssue.js +50 -0
  126. package/build/sdk/studio/sdk/model/cosineSimilarityIssue.js.map +1 -0
  127. package/build/sdk/studio/sdk/model/cosineSimilarityIssueIssues.d.ts +39 -0
  128. package/build/sdk/studio/sdk/model/cosineSimilarityIssueIssues.js +47 -0
  129. package/build/sdk/studio/sdk/model/cosineSimilarityIssueIssues.js.map +1 -0
  130. package/build/sdk/studio/sdk/model/{getJWTTokenResponseAllOf.d.ts → cosineSimilarityIssueWindows.d.ts} +9 -5
  131. package/build/sdk/studio/sdk/model/cosineSimilarityIssueWindows.js +42 -0
  132. package/build/sdk/studio/sdk/model/cosineSimilarityIssueWindows.js.map +1 -0
  133. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequest.d.ts +4 -0
  134. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequest.js +5 -0
  135. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequest.js.map +1 -1
  136. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequestAllOf.d.ts +4 -0
  137. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequestAllOf.js +5 -0
  138. package/build/sdk/studio/sdk/model/createEnterpriseTrialUserRequestAllOf.js.map +1 -1
  139. package/build/sdk/studio/sdk/model/{getAutoSegmenterResponseAllOfItems.d.ts → createOrganizationUsageReportBody.d.ts} +3 -2
  140. package/build/sdk/studio/sdk/model/createOrganizationUsageReportBody.js +37 -0
  141. package/build/sdk/studio/sdk/model/createOrganizationUsageReportBody.js.map +1 -0
  142. package/build/sdk/studio/sdk/model/createProjectRequest.d.ts +2 -0
  143. package/build/sdk/studio/sdk/model/createProjectRequest.js +5 -0
  144. package/build/sdk/studio/sdk/model/createProjectRequest.js.map +1 -1
  145. package/build/sdk/studio/sdk/model/createUserRequest.d.ts +4 -0
  146. package/build/sdk/studio/sdk/model/createUserRequest.js +5 -0
  147. package/build/sdk/studio/sdk/model/createUserRequest.js.map +1 -1
  148. package/build/sdk/studio/sdk/model/{organizationCreateProjectCreatedByUser.d.ts → createdUpdatedByUser.d.ts} +1 -1
  149. package/build/sdk/studio/sdk/model/{organizationCreateProjectCreatedByUser.js → createdUpdatedByUser.js} +9 -9
  150. package/build/sdk/studio/sdk/model/createdUpdatedByUser.js.map +1 -0
  151. package/build/sdk/studio/sdk/model/{addNoteRequest.d.ts → crossValidationData.d.ts} +6 -9
  152. package/build/sdk/studio/sdk/model/crossValidationData.js +35 -0
  153. package/build/sdk/studio/sdk/model/crossValidationData.js.map +1 -0
  154. package/build/sdk/studio/sdk/model/crossValidationDataScores.d.ts +50 -0
  155. package/build/sdk/studio/sdk/model/crossValidationDataScores.js +62 -0
  156. package/build/sdk/studio/sdk/model/crossValidationDataScores.js.map +1 -0
  157. package/build/sdk/studio/sdk/model/dSPGroupItem.d.ts +6 -0
  158. package/build/sdk/studio/sdk/model/dSPGroupItem.js +7 -1
  159. package/build/sdk/studio/sdk/model/dSPGroupItem.js.map +1 -1
  160. package/build/sdk/studio/sdk/model/dSPInfoFeatures.d.ts +4 -0
  161. package/build/sdk/studio/sdk/model/dSPInfoFeatures.js +5 -0
  162. package/build/sdk/studio/sdk/model/dSPInfoFeatures.js.map +1 -1
  163. package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.d.ts +1 -1
  164. package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.js +1 -1
  165. package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.js.map +1 -1
  166. package/build/sdk/studio/sdk/model/dspRunResponseWithSample.d.ts +4 -0
  167. package/build/sdk/studio/sdk/model/dspRunResponseWithSample.js +5 -0
  168. package/build/sdk/studio/sdk/model/dspRunResponseWithSample.js.map +1 -1
  169. package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.d.ts +4 -0
  170. package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.js +5 -0
  171. package/build/sdk/studio/sdk/model/dspRunResponseWithSampleAllOf.js.map +1 -1
  172. package/build/sdk/studio/sdk/model/entitlementLimits.d.ts +16 -0
  173. package/build/sdk/studio/sdk/model/entitlementLimits.js +5 -0
  174. package/build/sdk/studio/sdk/model/entitlementLimits.js.map +1 -1
  175. package/build/sdk/studio/sdk/model/feature.d.ts +1 -1
  176. package/build/sdk/studio/sdk/model/feature.js +1 -1
  177. package/build/sdk/studio/sdk/model/feature.js.map +1 -1
  178. package/build/sdk/studio/sdk/model/getDiversityDataResponseAllOfClusterInfos.d.ts +1 -1
  179. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponse.d.ts +34 -0
  180. package/build/sdk/studio/sdk/model/{getJWTTokenResponse.js → getLabelNoiseDataResponse.js} +12 -17
  181. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponse.js.map +1 -0
  182. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOf.d.ts +26 -0
  183. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOf.js +32 -0
  184. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOf.js.map +1 -0
  185. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOfData.d.ts +30 -0
  186. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOfData.js +42 -0
  187. package/build/sdk/studio/sdk/model/getLabelNoiseDataResponseAllOfData.js.map +1 -0
  188. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponse.d.ts +2 -0
  189. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponse.js +5 -0
  190. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponse.js.map +1 -1
  191. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponseAllOf.d.ts +2 -0
  192. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponseAllOf.js +5 -0
  193. package/build/sdk/studio/sdk/model/getLastDeploymentBuildResponseAllOf.js.map +1 -1
  194. package/build/sdk/studio/sdk/model/{createNoteResponse.d.ts → getOrganizationUsageReportResponse.d.ts} +3 -5
  195. package/build/sdk/studio/sdk/model/{listOrganizationProjectsResponse.js → getOrganizationUsageReportResponse.js} +12 -12
  196. package/build/sdk/studio/sdk/model/getOrganizationUsageReportResponse.js.map +1 -0
  197. package/build/sdk/studio/sdk/model/{listOrganizationProjectsResponse.d.ts → getTargetConstraintsResponse.d.ts} +3 -3
  198. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponse.js → getTargetConstraintsResponse.js} +12 -12
  199. package/build/sdk/studio/sdk/model/getTargetConstraintsResponse.js.map +1 -0
  200. package/build/sdk/studio/sdk/model/getTargetConstraintsResponseAllOf.d.ts +26 -0
  201. package/build/sdk/studio/sdk/model/getTargetConstraintsResponseAllOf.js +32 -0
  202. package/build/sdk/studio/sdk/model/getTargetConstraintsResponseAllOf.js.map +1 -0
  203. package/build/sdk/studio/sdk/model/job.d.ts +2 -0
  204. package/build/sdk/studio/sdk/model/job.js +5 -0
  205. package/build/sdk/studio/sdk/model/job.js.map +1 -1
  206. package/build/sdk/studio/sdk/model/{developmentBoard.d.ts → jobCreatedByUser.d.ts} +4 -3
  207. package/build/sdk/studio/sdk/model/{developmentBoard.js → jobCreatedByUser.js} +18 -13
  208. package/build/sdk/studio/sdk/model/jobCreatedByUser.js.map +1 -0
  209. package/build/sdk/studio/sdk/model/jobDetails.d.ts +2 -0
  210. package/build/sdk/studio/sdk/model/jobDetails.js +5 -0
  211. package/build/sdk/studio/sdk/model/jobDetails.js.map +1 -1
  212. package/build/sdk/studio/sdk/model/jobParentTypeEnum.d.ts +1 -1
  213. package/build/sdk/studio/sdk/model/jobParentTypeEnum.js +1 -1
  214. package/build/sdk/studio/sdk/model/jobParentTypeEnum.js.map +1 -1
  215. package/build/sdk/studio/sdk/model/jobStatus.d.ts +13 -0
  216. package/build/sdk/studio/sdk/model/jobStatus.js +16 -0
  217. package/build/sdk/studio/sdk/model/jobStatus.js.map +1 -0
  218. package/build/sdk/studio/sdk/model/kerasModelMetadata.d.ts +5 -1
  219. package/build/sdk/studio/sdk/model/kerasModelMetadata.js +6 -1
  220. package/build/sdk/studio/sdk/model/kerasModelMetadata.js.map +1 -1
  221. package/build/sdk/studio/sdk/model/kerasModelMetadataAllOf.d.ts +5 -1
  222. package/build/sdk/studio/sdk/model/kerasModelMetadataAllOf.js +6 -1
  223. package/build/sdk/studio/sdk/model/kerasModelMetadataAllOf.js.map +1 -1
  224. package/build/sdk/studio/sdk/model/kerasResponse.d.ts +6 -0
  225. package/build/sdk/studio/sdk/model/kerasResponse.js +10 -0
  226. package/build/sdk/studio/sdk/model/kerasResponse.js.map +1 -1
  227. package/build/sdk/studio/sdk/model/kerasResponseAllOf.d.ts +6 -0
  228. package/build/sdk/studio/sdk/model/kerasResponseAllOf.js +10 -0
  229. package/build/sdk/studio/sdk/model/kerasResponseAllOf.js.map +1 -1
  230. package/build/sdk/studio/sdk/model/learnBlock.d.ts +4 -0
  231. package/build/sdk/studio/sdk/model/learnBlock.js +5 -0
  232. package/build/sdk/studio/sdk/model/learnBlock.js.map +1 -1
  233. package/build/sdk/studio/sdk/model/listApiKeysResponseAllOfApiKeys.d.ts +1 -1
  234. package/build/sdk/studio/sdk/model/listApiKeysResponseAllOfApiKeys.js +1 -1
  235. package/build/sdk/studio/sdk/model/listApiKeysResponseAllOfApiKeys.js.map +1 -1
  236. package/build/sdk/studio/sdk/model/listOrganizationSecretsResponseAllOfSecrets.d.ts +2 -0
  237. package/build/sdk/studio/sdk/model/listOrganizationSecretsResponseAllOfSecrets.js +5 -0
  238. package/build/sdk/studio/sdk/model/listOrganizationSecretsResponseAllOfSecrets.js.map +1 -1
  239. package/build/sdk/studio/sdk/model/{getJWTTokenResponse.d.ts → listOrganizationUsageReportsResponse.d.ts} +5 -7
  240. package/build/sdk/studio/sdk/model/listOrganizationUsageReportsResponse.js +47 -0
  241. package/build/sdk/studio/sdk/model/listOrganizationUsageReportsResponse.js.map +1 -0
  242. package/build/sdk/studio/sdk/model/{saveAutoSegmenterClustersResponse.d.ts → listTunerRunsResponse.d.ts} +3 -2
  243. package/build/sdk/studio/sdk/model/{createNoteResponse.js → listTunerRunsResponse.js} +12 -12
  244. package/build/sdk/studio/sdk/model/listTunerRunsResponse.js.map +1 -0
  245. package/build/sdk/studio/sdk/model/{createNoteResponseAllOf.d.ts → listTunerRunsResponseAllOf.d.ts} +3 -5
  246. package/build/sdk/studio/sdk/model/listTunerRunsResponseAllOf.js +32 -0
  247. package/build/sdk/studio/sdk/model/listTunerRunsResponseAllOf.js.map +1 -0
  248. package/build/sdk/studio/sdk/model/{adminGetFeatureFlagsResponseAllOfFlags.d.ts → memorySpec.d.ts} +7 -7
  249. package/build/sdk/studio/sdk/model/memorySpec.js +40 -0
  250. package/build/sdk/studio/sdk/model/memorySpec.js.map +1 -0
  251. package/build/sdk/studio/sdk/model/modelPrediction.d.ts +1 -0
  252. package/build/sdk/studio/sdk/model/modelPrediction.js +5 -0
  253. package/build/sdk/studio/sdk/model/modelPrediction.js.map +1 -1
  254. package/build/sdk/studio/sdk/model/models.d.ts +49 -4
  255. package/build/sdk/studio/sdk/model/models.js +154 -13
  256. package/build/sdk/studio/sdk/model/models.js.map +1 -1
  257. package/build/sdk/studio/sdk/model/{anomalyModelMetadataClusters.d.ts → neighborsData.d.ts} +9 -5
  258. package/build/sdk/studio/sdk/model/neighborsData.js +40 -0
  259. package/build/sdk/studio/sdk/model/neighborsData.js.map +1 -0
  260. package/build/sdk/studio/sdk/model/neighborsScore.d.ts +50 -0
  261. package/build/sdk/studio/sdk/model/neighborsScore.js +60 -0
  262. package/build/sdk/studio/sdk/model/neighborsScore.js.map +1 -0
  263. package/build/sdk/studio/sdk/model/{classifyJobResponseAllOfResult.d.ts → neighborsScoreNeighborWindows.d.ts} +14 -5
  264. package/build/sdk/studio/sdk/model/neighborsScoreNeighborWindows.js +47 -0
  265. package/build/sdk/studio/sdk/model/neighborsScoreNeighborWindows.js.map +1 -0
  266. package/build/sdk/studio/sdk/model/objectDetectionLastLayer.d.ts +1 -1
  267. package/build/sdk/studio/sdk/model/objectDetectionLastLayer.js +1 -1
  268. package/build/sdk/studio/sdk/model/objectDetectionLastLayer.js.map +1 -1
  269. package/build/sdk/studio/sdk/model/optimizeConfig.d.ts +9 -6
  270. package/build/sdk/studio/sdk/model/optimizeConfig.js +7 -2
  271. package/build/sdk/studio/sdk/model/optimizeConfig.js.map +1 -1
  272. package/build/sdk/studio/sdk/model/optimizeConfigResponse.d.ts +9 -6
  273. package/build/sdk/studio/sdk/model/optimizeConfigResponse.js +7 -2
  274. package/build/sdk/studio/sdk/model/optimizeConfigResponse.js.map +1 -1
  275. package/build/sdk/studio/sdk/model/optimizeConfigTargetDevice.d.ts +1 -1
  276. package/build/sdk/studio/sdk/model/optimizeStateResponse.d.ts +14 -2
  277. package/build/sdk/studio/sdk/model/optimizeStateResponse.js +17 -2
  278. package/build/sdk/studio/sdk/model/optimizeStateResponse.js.map +1 -1
  279. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.d.ts +14 -2
  280. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.js +17 -2
  281. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOf.js.map +1 -1
  282. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfStatus.d.ts +9 -9
  283. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfStatus.js +1 -1
  284. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfStatus.js.map +1 -1
  285. package/build/sdk/studio/sdk/model/optimizeStateResponseAllOfWorkers.d.ts +2 -2
  286. package/build/sdk/studio/sdk/model/optimizeTransferLearningModelsResponse.d.ts +1 -1
  287. package/build/sdk/studio/sdk/model/optimizeTransferLearningModelsResponseAllOf.d.ts +1 -1
  288. package/build/sdk/studio/sdk/model/organization.d.ts +4 -0
  289. package/build/sdk/studio/sdk/model/organization.js +5 -0
  290. package/build/sdk/studio/sdk/model/organization.js.map +1 -1
  291. package/build/sdk/studio/sdk/model/organizationComputeTimeUsage.d.ts +36 -0
  292. package/build/sdk/studio/sdk/model/organizationComputeTimeUsage.js +42 -0
  293. package/build/sdk/studio/sdk/model/organizationComputeTimeUsage.js.map +1 -0
  294. package/build/sdk/studio/sdk/model/organizationCreateProject.d.ts +2 -2
  295. package/build/sdk/studio/sdk/model/organizationCreateProject.js +1 -1
  296. package/build/sdk/studio/sdk/model/organizationCreateProject.js.map +1 -1
  297. package/build/sdk/studio/sdk/model/organizationCreateProjectRequest.d.ts +2 -0
  298. package/build/sdk/studio/sdk/model/organizationCreateProjectRequest.js +5 -0
  299. package/build/sdk/studio/sdk/model/organizationCreateProjectRequest.js.map +1 -1
  300. package/build/sdk/studio/sdk/model/organizationCreateProjectWithFiles.d.ts +2 -2
  301. package/build/sdk/studio/sdk/model/organizationCreateProjectWithFiles.js +1 -1
  302. package/build/sdk/studio/sdk/model/organizationCreateProjectWithFiles.js.map +1 -1
  303. package/build/sdk/studio/sdk/model/organizationDeployBlock.d.ts +4 -0
  304. package/build/sdk/studio/sdk/model/organizationDeployBlock.js +15 -0
  305. package/build/sdk/studio/sdk/model/organizationDeployBlock.js.map +1 -1
  306. package/build/sdk/studio/sdk/model/organizationDspBlock.d.ts +4 -0
  307. package/build/sdk/studio/sdk/model/organizationDspBlock.js +15 -0
  308. package/build/sdk/studio/sdk/model/organizationDspBlock.js.map +1 -1
  309. package/build/sdk/studio/sdk/model/organizationGetCreateProjectsResponseAllOfJobs.d.ts +2 -2
  310. package/build/sdk/studio/sdk/model/organizationGetCreateProjectsResponseAllOfJobs.js +1 -1
  311. package/build/sdk/studio/sdk/model/organizationGetCreateProjectsResponseAllOfJobs.js.map +1 -1
  312. package/build/sdk/studio/sdk/model/organizationMetricsResponseAllOfMetrics.d.ts +2 -2
  313. package/build/sdk/studio/sdk/model/organizationTransferLearningBlock.d.ts +12 -0
  314. package/build/sdk/studio/sdk/model/organizationTransferLearningBlock.js +25 -0
  315. package/build/sdk/studio/sdk/model/organizationTransferLearningBlock.js.map +1 -1
  316. package/build/sdk/studio/sdk/model/organizationTransformationBlock.d.ts +8 -0
  317. package/build/sdk/studio/sdk/model/organizationTransformationBlock.js +20 -0
  318. package/build/sdk/studio/sdk/model/organizationTransformationBlock.js.map +1 -1
  319. package/build/sdk/studio/sdk/model/organizationUsageReport.d.ts +34 -0
  320. package/build/sdk/studio/sdk/model/organizationUsageReport.js +72 -0
  321. package/build/sdk/studio/sdk/model/organizationUsageReport.js.map +1 -0
  322. package/build/sdk/studio/sdk/model/project.d.ts +13 -0
  323. package/build/sdk/studio/sdk/model/project.js +20 -0
  324. package/build/sdk/studio/sdk/model/project.js.map +1 -1
  325. package/build/sdk/studio/sdk/model/projectInfoResponse.d.ts +6 -0
  326. package/build/sdk/studio/sdk/model/projectInfoResponse.js +10 -0
  327. package/build/sdk/studio/sdk/model/projectInfoResponse.js.map +1 -1
  328. package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.d.ts +6 -0
  329. package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.js +10 -0
  330. package/build/sdk/studio/sdk/model/projectInfoResponseAllOf.js.map +1 -1
  331. package/build/sdk/studio/sdk/model/projectVisibility.d.ts +16 -0
  332. package/build/sdk/studio/sdk/model/projectVisibility.js +16 -0
  333. package/build/sdk/studio/sdk/model/projectVisibility.js.map +1 -0
  334. package/build/sdk/studio/sdk/model/resourceRange.d.ts +29 -0
  335. package/build/sdk/studio/sdk/model/resourceRange.js +40 -0
  336. package/build/sdk/studio/sdk/model/resourceRange.js.map +1 -0
  337. package/build/sdk/studio/sdk/model/sample.d.ts +7 -0
  338. package/build/sdk/studio/sdk/model/sample.js +15 -0
  339. package/build/sdk/studio/sdk/model/sample.js.map +1 -1
  340. package/build/sdk/studio/sdk/model/setKerasParameterRequest.d.ts +6 -0
  341. package/build/sdk/studio/sdk/model/setKerasParameterRequest.js +10 -0
  342. package/build/sdk/studio/sdk/model/setKerasParameterRequest.js.map +1 -1
  343. package/build/sdk/studio/sdk/model/setSampleStructuredLabelsRequest.d.ts +26 -0
  344. package/build/sdk/studio/sdk/model/setSampleStructuredLabelsRequest.js +32 -0
  345. package/build/sdk/studio/sdk/model/setSampleStructuredLabelsRequest.js.map +1 -0
  346. package/build/sdk/studio/sdk/model/structuredClassifyResult.d.ts +6 -6
  347. package/build/sdk/studio/sdk/model/{adminCreateUserTrialRequest.d.ts → structuredLabel.d.ts} +10 -7
  348. package/build/sdk/studio/sdk/model/structuredLabel.js +45 -0
  349. package/build/sdk/studio/sdk/model/structuredLabel.js.map +1 -0
  350. package/build/sdk/studio/sdk/model/targetConstraints.d.ts +40 -0
  351. package/build/sdk/studio/sdk/model/targetConstraints.js +43 -0
  352. package/build/sdk/studio/sdk/model/targetConstraints.js.map +1 -0
  353. package/build/sdk/studio/sdk/model/{getJWTTokenRequest.d.ts → targetConstraintsDevice.d.ts} +14 -12
  354. package/build/sdk/studio/sdk/model/targetConstraintsDevice.js +52 -0
  355. package/build/sdk/studio/sdk/model/targetConstraintsDevice.js.map +1 -0
  356. package/build/sdk/studio/sdk/model/targetMemory.d.ts +30 -0
  357. package/build/sdk/studio/sdk/model/{profileTfLiteResponseAllOfMemoryTflite.js → targetMemory.js} +14 -11
  358. package/build/sdk/studio/sdk/model/targetMemory.js.map +1 -0
  359. package/build/sdk/studio/sdk/model/targetProcessor.d.ts +48 -0
  360. package/build/sdk/studio/sdk/model/targetProcessor.js +62 -0
  361. package/build/sdk/studio/sdk/model/targetProcessor.js.map +1 -0
  362. package/build/sdk/studio/sdk/model/{saveAutoSegmenterClustersRequestClusters.d.ts → tunerRun.d.ts} +7 -2
  363. package/build/sdk/studio/sdk/model/tunerRun.js +57 -0
  364. package/build/sdk/studio/sdk/model/tunerRun.js.map +1 -0
  365. package/build/sdk/studio/sdk/model/tunerTrial.d.ts +6 -3
  366. package/build/sdk/studio/sdk/model/tunerTrial.js +4 -3
  367. package/build/sdk/studio/sdk/model/tunerTrial.js.map +1 -1
  368. package/build/sdk/studio/sdk/model/tunerTrialBlocks.d.ts +8 -4
  369. package/build/sdk/studio/sdk/model/tunerTrialBlocks.js +5 -3
  370. package/build/sdk/studio/sdk/model/tunerTrialBlocks.js.map +1 -1
  371. package/build/sdk/studio/sdk/model/{activateUserRequest.d.ts → tunerTrialImpulse.d.ts} +4 -5
  372. package/build/sdk/studio/sdk/model/tunerTrialImpulse.js +42 -0
  373. package/build/sdk/studio/sdk/model/tunerTrialImpulse.js.map +1 -0
  374. package/build/sdk/studio/sdk/model/updateOrganizationCreateEmptyProjectRequest.d.ts +2 -0
  375. package/build/sdk/studio/sdk/model/updateOrganizationCreateEmptyProjectRequest.js +5 -0
  376. package/build/sdk/studio/sdk/model/updateOrganizationCreateEmptyProjectRequest.js.map +1 -1
  377. package/build/sdk/studio/sdk/model/updateOrganizationTransferLearningBlockRequest.d.ts +4 -0
  378. package/build/sdk/studio/sdk/model/updateOrganizationTransferLearningBlockRequest.js +5 -0
  379. package/build/sdk/studio/sdk/model/updateOrganizationTransferLearningBlockRequest.js.map +1 -1
  380. package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.d.ts +4 -0
  381. package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.js +5 -0
  382. package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.js.map +1 -1
  383. package/build/sdk/studio/sdk/model/updateProjectRequest.d.ts +14 -0
  384. package/build/sdk/studio/sdk/model/updateProjectRequest.js +20 -0
  385. package/build/sdk/studio/sdk/model/updateProjectRequest.js.map +1 -1
  386. package/build/sdk/studio/sdk/model/{adminGetUserMetricsResponseAllOf.d.ts → updateTunerRunRequest.d.ts} +2 -2
  387. package/build/sdk/studio/sdk/model/{activateUserRequest.js → updateTunerRunRequest.js} +11 -11
  388. package/build/sdk/studio/sdk/model/updateTunerRunRequest.js.map +1 -0
  389. package/build/sdk/studio/sdk/model/userOrganization.d.ts +2 -0
  390. package/build/sdk/studio/sdk/model/userOrganization.js +5 -0
  391. package/build/sdk/studio/sdk/model/userOrganization.js.map +1 -1
  392. package/build/shared/bounding-box-file-types.d.ts +50 -9
  393. package/build/shared/bounding-box-file-types.js +105 -4
  394. package/build/shared/bounding-box-file-types.js.map +1 -1
  395. package/build/shared/viewmodels/init.d.ts +2 -2
  396. package/build/shared/viewmodels/init.js +1 -0
  397. package/build/shared/viewmodels/init.js.map +1 -1
  398. package/cli/linux/runner.ts +236 -2
  399. package/cli/linux/webserver/middleware/asyncMiddleware.ts +7 -0
  400. package/cli/linux/webserver/public/assets/mobileclient.css +20 -0
  401. package/cli/linux/webserver/public/inference-server.js +185 -0
  402. package/cli/linux/webserver/views/escape-html-template-tag/escape.ts +64 -0
  403. package/cli/linux/webserver/views/escape-html-template-tag/index.ts +2 -0
  404. package/cli/linux/webserver/views/inference-server-view.ts +179 -0
  405. package/package.json +8 -4
  406. package/build/sdk/studio/sdk/api/allowsReadOnlyApi.d.ts +0 -726
  407. package/build/sdk/studio/sdk/api/allowsReadOnlyApi.js +0 -3986
  408. package/build/sdk/studio/sdk/api/allowsReadOnlyApi.js.map +0 -1
  409. package/build/sdk/studio/sdk/api/contentDispositionInlineApi.d.ts +0 -89
  410. package/build/sdk/studio/sdk/api/contentDispositionInlineApi.js +0 -335
  411. package/build/sdk/studio/sdk/api/contentDispositionInlineApi.js.map +0 -1
  412. package/build/sdk/studio/sdk/api/organizationAllowDeveloperProfileApi.d.ts +0 -693
  413. package/build/sdk/studio/sdk/api/organizationAllowDeveloperProfileApi.js +0 -3799
  414. package/build/sdk/studio/sdk/api/organizationAllowDeveloperProfileApi.js.map +0 -1
  415. package/build/sdk/studio/sdk/api/organizationAllowGuestAccessApi.d.ts +0 -180
  416. package/build/sdk/studio/sdk/api/organizationAllowGuestAccessApi.js +0 -847
  417. package/build/sdk/studio/sdk/api/organizationAllowGuestAccessApi.js.map +0 -1
  418. package/build/sdk/studio/sdk/api/organizationRequiresAdminApi.d.ts +0 -640
  419. package/build/sdk/studio/sdk/api/organizationRequiresAdminApi.js +0 -3714
  420. package/build/sdk/studio/sdk/api/organizationRequiresAdminApi.js.map +0 -1
  421. package/build/sdk/studio/sdk/api/organizationRequiresWhitelabelAdminApi.d.ts +0 -471
  422. package/build/sdk/studio/sdk/api/organizationRequiresWhitelabelAdminApi.js +0 -2604
  423. package/build/sdk/studio/sdk/api/organizationRequiresWhitelabelAdminApi.js.map +0 -1
  424. package/build/sdk/studio/sdk/api/projectRequiresAdminApi.d.ts +0 -65
  425. package/build/sdk/studio/sdk/api/projectRequiresAdminApi.js +0 -231
  426. package/build/sdk/studio/sdk/api/projectRequiresAdminApi.js.map +0 -1
  427. package/build/sdk/studio/sdk/api/requiresSudoApi.d.ts +0 -87
  428. package/build/sdk/studio/sdk/api/requiresSudoApi.js +0 -371
  429. package/build/sdk/studio/sdk/api/requiresSudoApi.js.map +0 -1
  430. package/build/sdk/studio/sdk/api/requiresThirdPartyAuthApiKeyApi.d.ts +0 -56
  431. package/build/sdk/studio/sdk/api/requiresThirdPartyAuthApiKeyApi.js +0 -158
  432. package/build/sdk/studio/sdk/api/requiresThirdPartyAuthApiKeyApi.js.map +0 -1
  433. package/build/sdk/studio/sdk/api/supportsRangeApi.d.ts +0 -74
  434. package/build/sdk/studio/sdk/api/supportsRangeApi.js +0 -248
  435. package/build/sdk/studio/sdk/api/supportsRangeApi.js.map +0 -1
  436. package/build/sdk/studio/sdk/model/activateUserRequest.js.map +0 -1
  437. package/build/sdk/studio/sdk/model/addNoteRequest.js +0 -37
  438. package/build/sdk/studio/sdk/model/addNoteRequest.js.map +0 -1
  439. package/build/sdk/studio/sdk/model/adminCreateUserTrialRequest.js +0 -42
  440. package/build/sdk/studio/sdk/model/adminCreateUserTrialRequest.js.map +0 -1
  441. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponse.js.map +0 -1
  442. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOf.js +0 -32
  443. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOf.js.map +0 -1
  444. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOfFlags.js +0 -37
  445. package/build/sdk/studio/sdk/model/adminGetFeatureFlagsResponseAllOfFlags.js.map +0 -1
  446. package/build/sdk/studio/sdk/model/adminGetUserMetricsResponseAllOf.js +0 -32
  447. package/build/sdk/studio/sdk/model/adminGetUserMetricsResponseAllOf.js.map +0 -1
  448. package/build/sdk/studio/sdk/model/anomalyModelMetadataClusters.js +0 -37
  449. package/build/sdk/studio/sdk/model/anomalyModelMetadataClusters.js.map +0 -1
  450. package/build/sdk/studio/sdk/model/anomalyModelMetadataResponse.d.ts +0 -57
  451. package/build/sdk/studio/sdk/model/anomalyModelMetadataResponse.js +0 -67
  452. package/build/sdk/studio/sdk/model/anomalyModelMetadataResponse.js.map +0 -1
  453. package/build/sdk/studio/sdk/model/classifyJobResponseAllOfResult.js +0 -42
  454. package/build/sdk/studio/sdk/model/classifyJobResponseAllOfResult.js.map +0 -1
  455. package/build/sdk/studio/sdk/model/createNoteResponse.js.map +0 -1
  456. package/build/sdk/studio/sdk/model/createNoteResponseAllOf.js +0 -32
  457. package/build/sdk/studio/sdk/model/createNoteResponseAllOf.js.map +0 -1
  458. package/build/sdk/studio/sdk/model/deployPretrainedModelInputNone.d.ts +0 -27
  459. package/build/sdk/studio/sdk/model/deployPretrainedModelInputNone.js +0 -33
  460. package/build/sdk/studio/sdk/model/deployPretrainedModelInputNone.js.map +0 -1
  461. package/build/sdk/studio/sdk/model/developmentBoard.js.map +0 -1
  462. package/build/sdk/studio/sdk/model/getAutoSegmenterResponse.js +0 -62
  463. package/build/sdk/studio/sdk/model/getAutoSegmenterResponse.js.map +0 -1
  464. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOf.d.ts +0 -30
  465. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOf.js +0 -52
  466. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOf.js.map +0 -1
  467. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfClusters.d.ts +0 -27
  468. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfClusters.js +0 -37
  469. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfClusters.js.map +0 -1
  470. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfItems.js +0 -32
  471. package/build/sdk/studio/sdk/model/getAutoSegmenterResponseAllOfItems.js.map +0 -1
  472. package/build/sdk/studio/sdk/model/getJWTTokenRequest.js +0 -53
  473. package/build/sdk/studio/sdk/model/getJWTTokenRequest.js.map +0 -1
  474. package/build/sdk/studio/sdk/model/getJWTTokenResponse.js.map +0 -1
  475. package/build/sdk/studio/sdk/model/getJWTTokenResponseAllOf.js +0 -37
  476. package/build/sdk/studio/sdk/model/getJWTTokenResponseAllOf.js.map +0 -1
  477. package/build/sdk/studio/sdk/model/getOrganizationProjectsDataCountResponseAllOf.d.ts +0 -25
  478. package/build/sdk/studio/sdk/model/getOrganizationProjectsDataCountResponseAllOf.js +0 -32
  479. package/build/sdk/studio/sdk/model/getOrganizationProjectsDataCountResponseAllOf.js.map +0 -1
  480. package/build/sdk/studio/sdk/model/getUserResponseAllOfOrganizations.js +0 -57
  481. package/build/sdk/studio/sdk/model/getUserResponseAllOfOrganizations.js.map +0 -1
  482. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponse.js.map +0 -1
  483. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponseAllOf.d.ts +0 -26
  484. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponseAllOf.js +0 -32
  485. package/build/sdk/studio/sdk/model/listOrganizationProjectsResponseAllOf.js.map +0 -1
  486. package/build/sdk/studio/sdk/model/organizationCreateProjectCreatedByUser.js.map +0 -1
  487. package/build/sdk/studio/sdk/model/organizationCreateProjectFiles.d.ts +0 -32
  488. package/build/sdk/studio/sdk/model/organizationCreateProjectFiles.js +0 -58
  489. package/build/sdk/studio/sdk/model/organizationCreateProjectFiles.js.map +0 -1
  490. package/build/sdk/studio/sdk/model/organizationInfoResponseAllOfEntitlementLimits.d.ts +0 -28
  491. package/build/sdk/studio/sdk/model/organizationInfoResponseAllOfEntitlementLimits.js +0 -47
  492. package/build/sdk/studio/sdk/model/organizationInfoResponseAllOfEntitlementLimits.js.map +0 -1
  493. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOf.d.ts +0 -27
  494. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOf.js +0 -37
  495. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOf.js.map +0 -1
  496. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemory.d.ts +0 -27
  497. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemory.js +0 -37
  498. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemory.js.map +0 -1
  499. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemoryTflite.d.ts +0 -26
  500. package/build/sdk/studio/sdk/model/profileTfLiteResponseAllOfMemoryTflite.js.map +0 -1
  501. package/build/sdk/studio/sdk/model/projectInfoResponseAllOfLatencyDevices.d.ts +0 -32
  502. package/build/sdk/studio/sdk/model/projectInfoResponseAllOfLatencyDevices.js +0 -67
  503. package/build/sdk/studio/sdk/model/projectInfoResponseAllOfLatencyDevices.js.map +0 -1
  504. package/build/sdk/studio/sdk/model/runAutoSegmenterRequest.d.ts +0 -27
  505. package/build/sdk/studio/sdk/model/runAutoSegmenterRequest.js +0 -42
  506. package/build/sdk/studio/sdk/model/runAutoSegmenterRequest.js.map +0 -1
  507. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequest.d.ts +0 -26
  508. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequest.js +0 -32
  509. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequest.js.map +0 -1
  510. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequestClusters.js +0 -37
  511. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersRequestClusters.js.map +0 -1
  512. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponse.js.map +0 -1
  513. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponseAllOf.d.ts +0 -25
  514. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponseAllOf.js +0 -32
  515. package/build/sdk/studio/sdk/model/saveAutoSegmenterClustersResponseAllOf.js.map +0 -1
  516. package/build/sdk/studio/sdk/model/updateNoteRequest.d.ts +0 -32
  517. package/build/sdk/studio/sdk/model/updateNoteRequest.js +0 -37
  518. package/build/sdk/studio/sdk/model/updateNoteRequest.js.map +0 -1
  519. package/build/sdk/studio/sdk/model/updateNoteResponse.d.ts +0 -25
  520. package/build/sdk/studio/sdk/model/updateNoteResponse.js +0 -27
  521. package/build/sdk/studio/sdk/model/updateNoteResponse.js.map +0 -1
  522. package/build/sdk/studio/sdk/model/whitelabelAdminCreateProjectRequest.js.map +0 -1
@@ -1,2604 +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.OrganizationRequiresWhitelabelAdminApi = exports.OrganizationRequiresWhitelabelAdminApiApiKeys = 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 OrganizationRequiresWhitelabelAdminApiApiKeys;
27
- (function (OrganizationRequiresWhitelabelAdminApiApiKeys) {
28
- OrganizationRequiresWhitelabelAdminApiApiKeys[OrganizationRequiresWhitelabelAdminApiApiKeys["ApiKeyAuthentication"] = 0] = "ApiKeyAuthentication";
29
- OrganizationRequiresWhitelabelAdminApiApiKeys[OrganizationRequiresWhitelabelAdminApiApiKeys["JWTAuthentication"] = 1] = "JWTAuthentication";
30
- OrganizationRequiresWhitelabelAdminApiApiKeys[OrganizationRequiresWhitelabelAdminApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
31
- })(OrganizationRequiresWhitelabelAdminApiApiKeys = exports.OrganizationRequiresWhitelabelAdminApiApiKeys || (exports.OrganizationRequiresWhitelabelAdminApiApiKeys = {}));
32
- class OrganizationRequiresWhitelabelAdminApi {
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[OrganizationRequiresWhitelabelAdminApiApiKeys[key]].apiKey = value;
76
- }
77
- /**
78
- * White label admin only API to add a development board.
79
- * @summary Add a development board to a whitelabel
80
- * @param organizationId Organization ID
81
- * @param developmentBoardRequest
82
- */
83
- async whitelabelAdminAddDevelopmentBoard(organizationId, developmentBoardRequest, options = { headers: {} }) {
84
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/development-boards'
85
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
86
- let localVarQueryParameters = {};
87
- let localVarHeaderParams = Object.assign({
88
- 'User-Agent': 'edgeimpulse-api nodejs'
89
- }, this.defaultHeaders);
90
- const produces = ['application/json'];
91
- // give precedence to 'application/json'
92
- if (produces.indexOf('application/json') >= 0) {
93
- localVarHeaderParams.Accept = 'application/json';
94
- }
95
- else {
96
- localVarHeaderParams.Accept = produces.join(',');
97
- }
98
- let localVarFormParams = {};
99
- // verify required parameter 'organizationId' is not null or undefined
100
- if (organizationId === null || organizationId === undefined) {
101
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddDevelopmentBoard.');
102
- }
103
- Object.assign(localVarHeaderParams, options.headers);
104
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
105
- let localVarUseFormData = false;
106
- let localVarRequestOptions = {
107
- method: 'POST',
108
- qs: localVarQueryParameters,
109
- headers: localVarHeaderParams,
110
- uri: localVarPath,
111
- useQuerystring: this._useQuerystring,
112
- agentOptions: { keepAlive: false },
113
- json: true,
114
- body: models_1.ObjectSerializer.serialize(developmentBoardRequest, "DevelopmentBoardRequest")
115
- };
116
- let authenticationPromise = Promise.resolve();
117
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
118
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
119
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
120
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
121
- return authenticationPromise.then(() => {
122
- if (Object.keys(localVarFormParams).length) {
123
- if (localVarUseFormData) {
124
- localVarRequestOptions.formData = localVarFormParams;
125
- }
126
- else {
127
- localVarRequestOptions.form = localVarFormParams;
128
- }
129
- }
130
- return new Promise((resolve, reject) => {
131
- localVarRequest(localVarRequestOptions, (error, response, body) => {
132
- if (error) {
133
- reject(error);
134
- }
135
- else {
136
- body = models_1.ObjectSerializer.deserialize(body, "DevelopmentBoardCreatedResponse");
137
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
138
- if (typeof body.success === 'boolean' && !body.success) {
139
- reject(new Error(body.error || errString));
140
- }
141
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
142
- resolve(body);
143
- }
144
- else {
145
- reject(errString);
146
- }
147
- }
148
- });
149
- });
150
- });
151
- }
152
- /**
153
- * White label admin only API to add a user to an organization. If no user is provided, the current user is used.
154
- * @summary Add user to an organization
155
- * @param organizationId Organization ID
156
- * @param innerOrganizationId Organization ID within the context of a white label
157
- * @param adminAddOrganizationUserRequest
158
- */
159
- async whitelabelAdminAddUserToOrganization(organizationId, innerOrganizationId, adminAddOrganizationUserRequest, options = { headers: {} }) {
160
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members'
161
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
162
- .replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
163
- let localVarQueryParameters = {};
164
- let localVarHeaderParams = Object.assign({
165
- 'User-Agent': 'edgeimpulse-api nodejs'
166
- }, this.defaultHeaders);
167
- const produces = ['application/json'];
168
- // give precedence to 'application/json'
169
- if (produces.indexOf('application/json') >= 0) {
170
- localVarHeaderParams.Accept = 'application/json';
171
- }
172
- else {
173
- localVarHeaderParams.Accept = produces.join(',');
174
- }
175
- let localVarFormParams = {};
176
- // verify required parameter 'organizationId' is not null or undefined
177
- if (organizationId === null || organizationId === undefined) {
178
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddUserToOrganization.');
179
- }
180
- // verify required parameter 'innerOrganizationId' is not null or undefined
181
- if (innerOrganizationId === null || innerOrganizationId === undefined) {
182
- throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminAddUserToOrganization.');
183
- }
184
- Object.assign(localVarHeaderParams, options.headers);
185
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
186
- let localVarUseFormData = false;
187
- let localVarRequestOptions = {
188
- method: 'POST',
189
- qs: localVarQueryParameters,
190
- headers: localVarHeaderParams,
191
- uri: localVarPath,
192
- useQuerystring: this._useQuerystring,
193
- agentOptions: { keepAlive: false },
194
- json: true,
195
- body: models_1.ObjectSerializer.serialize(adminAddOrganizationUserRequest, "AdminAddOrganizationUserRequest")
196
- };
197
- let authenticationPromise = Promise.resolve();
198
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
199
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
200
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
201
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
202
- return authenticationPromise.then(() => {
203
- if (Object.keys(localVarFormParams).length) {
204
- if (localVarUseFormData) {
205
- localVarRequestOptions.formData = localVarFormParams;
206
- }
207
- else {
208
- localVarRequestOptions.form = localVarFormParams;
209
- }
210
- }
211
- return new Promise((resolve, reject) => {
212
- localVarRequest(localVarRequestOptions, (error, response, body) => {
213
- if (error) {
214
- reject(error);
215
- }
216
- else {
217
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
218
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
219
- if (typeof body.success === 'boolean' && !body.success) {
220
- reject(new Error(body.error || errString));
221
- }
222
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
223
- resolve(body);
224
- }
225
- else {
226
- reject(errString);
227
- }
228
- }
229
- });
230
- });
231
- });
232
- }
233
- /**
234
- * White label admin only API to add a user to a project. If no user is provided, the current user is used.
235
- * @summary Add user to a project
236
- * @param organizationId Organization ID
237
- * @param projectId Project ID
238
- * @param adminAddProjectUserRequest
239
- */
240
- async whitelabelAdminAddUserToProject(organizationId, projectId, adminAddProjectUserRequest, options = { headers: {} }) {
241
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}/members'
242
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
243
- .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
244
- let localVarQueryParameters = {};
245
- let localVarHeaderParams = Object.assign({
246
- 'User-Agent': 'edgeimpulse-api nodejs'
247
- }, this.defaultHeaders);
248
- const produces = ['application/json'];
249
- // give precedence to 'application/json'
250
- if (produces.indexOf('application/json') >= 0) {
251
- localVarHeaderParams.Accept = 'application/json';
252
- }
253
- else {
254
- localVarHeaderParams.Accept = produces.join(',');
255
- }
256
- let localVarFormParams = {};
257
- // verify required parameter 'organizationId' is not null or undefined
258
- if (organizationId === null || organizationId === undefined) {
259
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddUserToProject.');
260
- }
261
- // verify required parameter 'projectId' is not null or undefined
262
- if (projectId === null || projectId === undefined) {
263
- throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminAddUserToProject.');
264
- }
265
- Object.assign(localVarHeaderParams, options.headers);
266
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
267
- let localVarUseFormData = false;
268
- let localVarRequestOptions = {
269
- method: 'POST',
270
- qs: localVarQueryParameters,
271
- headers: localVarHeaderParams,
272
- uri: localVarPath,
273
- useQuerystring: this._useQuerystring,
274
- agentOptions: { keepAlive: false },
275
- json: true,
276
- body: models_1.ObjectSerializer.serialize(adminAddProjectUserRequest, "AdminAddProjectUserRequest")
277
- };
278
- let authenticationPromise = Promise.resolve();
279
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
280
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
281
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
282
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
283
- return authenticationPromise.then(() => {
284
- if (Object.keys(localVarFormParams).length) {
285
- if (localVarUseFormData) {
286
- localVarRequestOptions.formData = localVarFormParams;
287
- }
288
- else {
289
- localVarRequestOptions.form = localVarFormParams;
290
- }
291
- }
292
- return new Promise((resolve, reject) => {
293
- localVarRequest(localVarRequestOptions, (error, response, body) => {
294
- if (error) {
295
- reject(error);
296
- }
297
- else {
298
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
299
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
300
- if (typeof body.success === 'boolean' && !body.success) {
301
- reject(new Error(body.error || errString));
302
- }
303
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
304
- resolve(body);
305
- }
306
- else {
307
- reject(errString);
308
- }
309
- }
310
- });
311
- });
312
- });
313
- }
314
- /**
315
- * Create a new organization. This is an internal API only available to white label admins
316
- * @summary Create new organization within white label context
317
- * @param organizationId Organization ID
318
- * @param whitelabelAdminCreateOrganizationRequest
319
- */
320
- async whitelabelAdminCreateOrganization(organizationId, whitelabelAdminCreateOrganizationRequest, options = { headers: {} }) {
321
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations'
322
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
323
- let localVarQueryParameters = {};
324
- let localVarHeaderParams = Object.assign({
325
- 'User-Agent': 'edgeimpulse-api nodejs'
326
- }, this.defaultHeaders);
327
- const produces = ['application/json'];
328
- // give precedence to 'application/json'
329
- if (produces.indexOf('application/json') >= 0) {
330
- localVarHeaderParams.Accept = 'application/json';
331
- }
332
- else {
333
- localVarHeaderParams.Accept = produces.join(',');
334
- }
335
- let localVarFormParams = {};
336
- // verify required parameter 'organizationId' is not null or undefined
337
- if (organizationId === null || organizationId === undefined) {
338
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminCreateOrganization.');
339
- }
340
- // verify required parameter 'whitelabelAdminCreateOrganizationRequest' is not null or undefined
341
- if (whitelabelAdminCreateOrganizationRequest === null || whitelabelAdminCreateOrganizationRequest === undefined) {
342
- throw new Error('Required parameter whitelabelAdminCreateOrganizationRequest was null or undefined when calling whitelabelAdminCreateOrganization.');
343
- }
344
- Object.assign(localVarHeaderParams, options.headers);
345
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
346
- let localVarUseFormData = false;
347
- let localVarRequestOptions = {
348
- method: 'POST',
349
- qs: localVarQueryParameters,
350
- headers: localVarHeaderParams,
351
- uri: localVarPath,
352
- useQuerystring: this._useQuerystring,
353
- agentOptions: { keepAlive: false },
354
- json: true,
355
- body: models_1.ObjectSerializer.serialize(whitelabelAdminCreateOrganizationRequest, "WhitelabelAdminCreateOrganizationRequest")
356
- };
357
- let authenticationPromise = Promise.resolve();
358
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
359
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
360
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
361
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
362
- return authenticationPromise.then(() => {
363
- if (Object.keys(localVarFormParams).length) {
364
- if (localVarUseFormData) {
365
- localVarRequestOptions.formData = localVarFormParams;
366
- }
367
- else {
368
- localVarRequestOptions.form = localVarFormParams;
369
- }
370
- }
371
- return new Promise((resolve, reject) => {
372
- localVarRequest(localVarRequestOptions, (error, response, body) => {
373
- if (error) {
374
- reject(error);
375
- }
376
- else {
377
- body = models_1.ObjectSerializer.deserialize(body, "CreateOrganizationResponse");
378
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
379
- if (typeof body.success === 'boolean' && !body.success) {
380
- reject(new Error(body.error || errString));
381
- }
382
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
383
- resolve(body);
384
- }
385
- else {
386
- reject(errString);
387
- }
388
- }
389
- });
390
- });
391
- });
392
- }
393
- /**
394
- * Create a new free tier project. This is an internal API only available to white label admins.
395
- * @summary Create a new project within white label context.
396
- * @param organizationId Organization ID
397
- * @param whitelabelAdminCreateProjectRequest
398
- */
399
- async whitelabelAdminCreateProject(organizationId, whitelabelAdminCreateProjectRequest, options = { headers: {} }) {
400
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects'
401
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
402
- let localVarQueryParameters = {};
403
- let localVarHeaderParams = Object.assign({
404
- 'User-Agent': 'edgeimpulse-api nodejs'
405
- }, this.defaultHeaders);
406
- const produces = ['application/json'];
407
- // give precedence to 'application/json'
408
- if (produces.indexOf('application/json') >= 0) {
409
- localVarHeaderParams.Accept = 'application/json';
410
- }
411
- else {
412
- localVarHeaderParams.Accept = produces.join(',');
413
- }
414
- let localVarFormParams = {};
415
- // verify required parameter 'organizationId' is not null or undefined
416
- if (organizationId === null || organizationId === undefined) {
417
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminCreateProject.');
418
- }
419
- // verify required parameter 'whitelabelAdminCreateProjectRequest' is not null or undefined
420
- if (whitelabelAdminCreateProjectRequest === null || whitelabelAdminCreateProjectRequest === undefined) {
421
- throw new Error('Required parameter whitelabelAdminCreateProjectRequest was null or undefined when calling whitelabelAdminCreateProject.');
422
- }
423
- Object.assign(localVarHeaderParams, options.headers);
424
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
425
- let localVarUseFormData = false;
426
- let localVarRequestOptions = {
427
- method: 'POST',
428
- qs: localVarQueryParameters,
429
- headers: localVarHeaderParams,
430
- uri: localVarPath,
431
- useQuerystring: this._useQuerystring,
432
- agentOptions: { keepAlive: false },
433
- json: true,
434
- body: models_1.ObjectSerializer.serialize(whitelabelAdminCreateProjectRequest, "WhitelabelAdminCreateProjectRequest")
435
- };
436
- let authenticationPromise = Promise.resolve();
437
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
438
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
439
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
440
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
441
- return authenticationPromise.then(() => {
442
- if (Object.keys(localVarFormParams).length) {
443
- if (localVarUseFormData) {
444
- localVarRequestOptions.formData = localVarFormParams;
445
- }
446
- else {
447
- localVarRequestOptions.form = localVarFormParams;
448
- }
449
- }
450
- return new Promise((resolve, reject) => {
451
- localVarRequest(localVarRequestOptions, (error, response, body) => {
452
- if (error) {
453
- reject(error);
454
- }
455
- else {
456
- body = models_1.ObjectSerializer.deserialize(body, "CreateProjectResponse");
457
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
458
- if (typeof body.success === 'boolean' && !body.success) {
459
- reject(new Error(body.error || errString));
460
- }
461
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
462
- resolve(body);
463
- }
464
- else {
465
- reject(errString);
466
- }
467
- }
468
- });
469
- });
470
- });
471
- }
472
- /**
473
- * White label admin only API to get the white label information.
474
- * @summary Get white label information
475
- * @param organizationId Organization ID
476
- */
477
- async whitelabelAdminGetInfo(organizationId, options = { headers: {} }) {
478
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel'
479
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
480
- let localVarQueryParameters = {};
481
- let localVarHeaderParams = Object.assign({
482
- 'User-Agent': 'edgeimpulse-api nodejs'
483
- }, this.defaultHeaders);
484
- const produces = ['application/json'];
485
- // give precedence to 'application/json'
486
- if (produces.indexOf('application/json') >= 0) {
487
- localVarHeaderParams.Accept = 'application/json';
488
- }
489
- else {
490
- localVarHeaderParams.Accept = produces.join(',');
491
- }
492
- let localVarFormParams = {};
493
- // verify required parameter 'organizationId' is not null or undefined
494
- if (organizationId === null || organizationId === undefined) {
495
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetInfo.');
496
- }
497
- Object.assign(localVarHeaderParams, options.headers);
498
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
499
- let localVarUseFormData = false;
500
- let localVarRequestOptions = {
501
- method: 'GET',
502
- qs: localVarQueryParameters,
503
- headers: localVarHeaderParams,
504
- uri: localVarPath,
505
- useQuerystring: this._useQuerystring,
506
- agentOptions: { keepAlive: false },
507
- json: true,
508
- };
509
- let authenticationPromise = Promise.resolve();
510
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
511
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
512
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
513
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
514
- return authenticationPromise.then(() => {
515
- if (Object.keys(localVarFormParams).length) {
516
- if (localVarUseFormData) {
517
- localVarRequestOptions.formData = localVarFormParams;
518
- }
519
- else {
520
- localVarRequestOptions.form = localVarFormParams;
521
- }
522
- }
523
- return new Promise((resolve, reject) => {
524
- localVarRequest(localVarRequestOptions, (error, response, body) => {
525
- if (error) {
526
- reject(error);
527
- }
528
- else {
529
- body = models_1.ObjectSerializer.deserialize(body, "GetWhitelabelResponse");
530
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
531
- if (typeof body.success === 'boolean' && !body.success) {
532
- reject(new Error(body.error || errString));
533
- }
534
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
535
- resolve(body);
536
- }
537
- else {
538
- reject(errString);
539
- }
540
- }
541
- });
542
- });
543
- });
544
- }
545
- /**
546
- * White label admin only API to get global metrics.
547
- * @summary Get global white label metrics
548
- * @param organizationId Organization ID
549
- */
550
- async whitelabelAdminGetMetrics(organizationId, options = { headers: {} }) {
551
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/metrics'
552
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
553
- let localVarQueryParameters = {};
554
- let localVarHeaderParams = Object.assign({
555
- 'User-Agent': 'edgeimpulse-api nodejs'
556
- }, this.defaultHeaders);
557
- const produces = ['application/json'];
558
- // give precedence to 'application/json'
559
- if (produces.indexOf('application/json') >= 0) {
560
- localVarHeaderParams.Accept = 'application/json';
561
- }
562
- else {
563
- localVarHeaderParams.Accept = produces.join(',');
564
- }
565
- let localVarFormParams = {};
566
- // verify required parameter 'organizationId' is not null or undefined
567
- if (organizationId === null || organizationId === undefined) {
568
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetMetrics.');
569
- }
570
- Object.assign(localVarHeaderParams, options.headers);
571
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
572
- let localVarUseFormData = false;
573
- let localVarRequestOptions = {
574
- method: 'GET',
575
- qs: localVarQueryParameters,
576
- headers: localVarHeaderParams,
577
- uri: localVarPath,
578
- useQuerystring: this._useQuerystring,
579
- agentOptions: { keepAlive: false },
580
- json: true,
581
- };
582
- let authenticationPromise = Promise.resolve();
583
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
584
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
585
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
586
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
587
- return authenticationPromise.then(() => {
588
- if (Object.keys(localVarFormParams).length) {
589
- if (localVarUseFormData) {
590
- localVarRequestOptions.formData = localVarFormParams;
591
- }
592
- else {
593
- localVarRequestOptions.form = localVarFormParams;
594
- }
595
- }
596
- return new Promise((resolve, reject) => {
597
- localVarRequest(localVarRequestOptions, (error, response, body) => {
598
- if (error) {
599
- reject(error);
600
- }
601
- else {
602
- body = models_1.ObjectSerializer.deserialize(body, "AdminGetMetricsResponse");
603
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
604
- if (typeof body.success === 'boolean' && !body.success) {
605
- reject(new Error(body.error || errString));
606
- }
607
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
608
- resolve(body);
609
- }
610
- else {
611
- reject(errString);
612
- }
613
- }
614
- });
615
- });
616
- });
617
- }
618
- /**
619
- * White label admin only API to list all information about an organization.
620
- * @summary Get organization information
621
- * @param organizationId Organization ID
622
- * @param innerOrganizationId Organization ID within the context of a white label
623
- */
624
- async whitelabelAdminGetOrganizationInfo(organizationId, innerOrganizationId, options = { headers: {} }) {
625
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}'
626
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
627
- .replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
628
- let localVarQueryParameters = {};
629
- let localVarHeaderParams = Object.assign({
630
- 'User-Agent': 'edgeimpulse-api nodejs'
631
- }, this.defaultHeaders);
632
- const produces = ['application/json'];
633
- // give precedence to 'application/json'
634
- if (produces.indexOf('application/json') >= 0) {
635
- localVarHeaderParams.Accept = 'application/json';
636
- }
637
- else {
638
- localVarHeaderParams.Accept = produces.join(',');
639
- }
640
- let localVarFormParams = {};
641
- // verify required parameter 'organizationId' is not null or undefined
642
- if (organizationId === null || organizationId === undefined) {
643
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetOrganizationInfo.');
644
- }
645
- // verify required parameter 'innerOrganizationId' is not null or undefined
646
- if (innerOrganizationId === null || innerOrganizationId === undefined) {
647
- throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminGetOrganizationInfo.');
648
- }
649
- Object.assign(localVarHeaderParams, options.headers);
650
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
651
- let localVarUseFormData = false;
652
- let localVarRequestOptions = {
653
- method: 'GET',
654
- qs: localVarQueryParameters,
655
- headers: localVarHeaderParams,
656
- uri: localVarPath,
657
- useQuerystring: this._useQuerystring,
658
- agentOptions: { keepAlive: false },
659
- json: true,
660
- };
661
- let authenticationPromise = Promise.resolve();
662
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
663
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
664
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
665
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
666
- return authenticationPromise.then(() => {
667
- if (Object.keys(localVarFormParams).length) {
668
- if (localVarUseFormData) {
669
- localVarRequestOptions.formData = localVarFormParams;
670
- }
671
- else {
672
- localVarRequestOptions.form = localVarFormParams;
673
- }
674
- }
675
- return new Promise((resolve, reject) => {
676
- localVarRequest(localVarRequestOptions, (error, response, body) => {
677
- if (error) {
678
- reject(error);
679
- }
680
- else {
681
- body = models_1.ObjectSerializer.deserialize(body, "AdminOrganizationInfoResponse");
682
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
683
- if (typeof body.success === 'boolean' && !body.success) {
684
- reject(new Error(body.error || errString));
685
- }
686
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
687
- resolve(body);
688
- }
689
- else {
690
- reject(errString);
691
- }
692
- }
693
- });
694
- });
695
- });
696
- }
697
- /**
698
- * White label admin only API to get the list of all organizations.
699
- * @summary Get all organizations within a white label
700
- * @param organizationId Organization ID
701
- * @param active Whether to search for entities (users, orgs) active in the last X days
702
- * @param sort Fields and order to sort query by
703
- * @param limit Maximum number of results
704
- * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
705
- * @param search Search query
706
- */
707
- async whitelabelAdminGetOrganizations(organizationId, queryParams, options = { headers: {} }) {
708
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations'
709
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
710
- let localVarQueryParameters = {};
711
- let localVarHeaderParams = Object.assign({
712
- 'User-Agent': 'edgeimpulse-api nodejs'
713
- }, this.defaultHeaders);
714
- const produces = ['application/json'];
715
- // give precedence to 'application/json'
716
- if (produces.indexOf('application/json') >= 0) {
717
- localVarHeaderParams.Accept = 'application/json';
718
- }
719
- else {
720
- localVarHeaderParams.Accept = produces.join(',');
721
- }
722
- let localVarFormParams = {};
723
- // verify required parameter 'organizationId' is not null or undefined
724
- if (organizationId === null || organizationId === undefined) {
725
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetOrganizations.');
726
- }
727
- if (queryParams.active !== undefined) {
728
- localVarQueryParameters['active'] = models_1.ObjectSerializer.serialize(queryParams.active, "number");
729
- }
730
- if (queryParams.sort !== undefined) {
731
- localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(queryParams.sort, "string");
732
- }
733
- if (queryParams.limit !== undefined) {
734
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
735
- }
736
- if (queryParams.offset !== undefined) {
737
- localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
738
- }
739
- if (queryParams.search !== undefined) {
740
- localVarQueryParameters['search'] = models_1.ObjectSerializer.serialize(queryParams.search, "string");
741
- }
742
- Object.assign(localVarHeaderParams, options.headers);
743
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
744
- let localVarUseFormData = false;
745
- let localVarRequestOptions = {
746
- method: 'GET',
747
- qs: localVarQueryParameters,
748
- headers: localVarHeaderParams,
749
- uri: localVarPath,
750
- useQuerystring: this._useQuerystring,
751
- agentOptions: { keepAlive: false },
752
- json: true,
753
- };
754
- let authenticationPromise = Promise.resolve();
755
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
756
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
757
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
758
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
759
- return authenticationPromise.then(() => {
760
- if (Object.keys(localVarFormParams).length) {
761
- if (localVarUseFormData) {
762
- localVarRequestOptions.formData = localVarFormParams;
763
- }
764
- else {
765
- localVarRequestOptions.form = localVarFormParams;
766
- }
767
- }
768
- return new Promise((resolve, reject) => {
769
- localVarRequest(localVarRequestOptions, (error, response, body) => {
770
- if (error) {
771
- reject(error);
772
- }
773
- else {
774
- body = models_1.ObjectSerializer.deserialize(body, "AdminGetOrganizationsResponse");
775
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
776
- if (typeof body.success === 'boolean' && !body.success) {
777
- reject(new Error(body.error || errString));
778
- }
779
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
780
- resolve(body);
781
- }
782
- else {
783
- reject(errString);
784
- }
785
- }
786
- });
787
- });
788
- });
789
- }
790
- /**
791
- * White label admin only API to get project information.
792
- * @summary Get a white label project
793
- * @param organizationId Organization ID
794
- * @param projectId Project ID
795
- */
796
- async whitelabelAdminGetProject(organizationId, projectId, options = { headers: {} }) {
797
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}'
798
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
799
- .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
800
- let localVarQueryParameters = {};
801
- let localVarHeaderParams = Object.assign({
802
- 'User-Agent': 'edgeimpulse-api nodejs'
803
- }, this.defaultHeaders);
804
- const produces = ['application/json'];
805
- // give precedence to 'application/json'
806
- if (produces.indexOf('application/json') >= 0) {
807
- localVarHeaderParams.Accept = 'application/json';
808
- }
809
- else {
810
- localVarHeaderParams.Accept = produces.join(',');
811
- }
812
- let localVarFormParams = {};
813
- // verify required parameter 'organizationId' is not null or undefined
814
- if (organizationId === null || organizationId === undefined) {
815
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetProject.');
816
- }
817
- // verify required parameter 'projectId' is not null or undefined
818
- if (projectId === null || projectId === undefined) {
819
- throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminGetProject.');
820
- }
821
- Object.assign(localVarHeaderParams, options.headers);
822
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
823
- let localVarUseFormData = false;
824
- let localVarRequestOptions = {
825
- method: 'GET',
826
- qs: localVarQueryParameters,
827
- headers: localVarHeaderParams,
828
- uri: localVarPath,
829
- useQuerystring: this._useQuerystring,
830
- agentOptions: { keepAlive: false },
831
- json: true,
832
- };
833
- let authenticationPromise = Promise.resolve();
834
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
835
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
836
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
837
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
838
- return authenticationPromise.then(() => {
839
- if (Object.keys(localVarFormParams).length) {
840
- if (localVarUseFormData) {
841
- localVarRequestOptions.formData = localVarFormParams;
842
- }
843
- else {
844
- localVarRequestOptions.form = localVarFormParams;
845
- }
846
- }
847
- return new Promise((resolve, reject) => {
848
- localVarRequest(localVarRequestOptions, (error, response, body) => {
849
- if (error) {
850
- reject(error);
851
- }
852
- else {
853
- body = models_1.ObjectSerializer.deserialize(body, "ProjectInfoResponse");
854
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
855
- if (typeof body.success === 'boolean' && !body.success) {
856
- reject(new Error(body.error || errString));
857
- }
858
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
859
- resolve(body);
860
- }
861
- else {
862
- reject(errString);
863
- }
864
- }
865
- });
866
- });
867
- });
868
- }
869
- /**
870
- * White label admin only API to get the list of all projects.
871
- * @summary Get all white label projects
872
- * @param organizationId Organization ID
873
- * @param active Whether to search for entities (users, orgs) active in the last X days
874
- * @param sort Fields and order to sort query by
875
- * @param limit Maximum number of results
876
- * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
877
- * @param search Search query
878
- */
879
- async whitelabelAdminGetProjects(organizationId, queryParams, options = { headers: {} }) {
880
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects'
881
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
882
- let localVarQueryParameters = {};
883
- let localVarHeaderParams = Object.assign({
884
- 'User-Agent': 'edgeimpulse-api nodejs'
885
- }, this.defaultHeaders);
886
- const produces = ['application/json'];
887
- // give precedence to 'application/json'
888
- if (produces.indexOf('application/json') >= 0) {
889
- localVarHeaderParams.Accept = 'application/json';
890
- }
891
- else {
892
- localVarHeaderParams.Accept = produces.join(',');
893
- }
894
- let localVarFormParams = {};
895
- // verify required parameter 'organizationId' is not null or undefined
896
- if (organizationId === null || organizationId === undefined) {
897
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetProjects.');
898
- }
899
- if (queryParams.active !== undefined) {
900
- localVarQueryParameters['active'] = models_1.ObjectSerializer.serialize(queryParams.active, "number");
901
- }
902
- if (queryParams.sort !== undefined) {
903
- localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(queryParams.sort, "string");
904
- }
905
- if (queryParams.limit !== undefined) {
906
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
907
- }
908
- if (queryParams.offset !== undefined) {
909
- localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
910
- }
911
- if (queryParams.search !== undefined) {
912
- localVarQueryParameters['search'] = models_1.ObjectSerializer.serialize(queryParams.search, "string");
913
- }
914
- Object.assign(localVarHeaderParams, options.headers);
915
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
916
- let localVarUseFormData = false;
917
- let localVarRequestOptions = {
918
- method: 'GET',
919
- qs: localVarQueryParameters,
920
- headers: localVarHeaderParams,
921
- uri: localVarPath,
922
- useQuerystring: this._useQuerystring,
923
- agentOptions: { keepAlive: false },
924
- json: true,
925
- };
926
- let authenticationPromise = Promise.resolve();
927
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
928
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
929
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
930
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
931
- return authenticationPromise.then(() => {
932
- if (Object.keys(localVarFormParams).length) {
933
- if (localVarUseFormData) {
934
- localVarRequestOptions.formData = localVarFormParams;
935
- }
936
- else {
937
- localVarRequestOptions.form = localVarFormParams;
938
- }
939
- }
940
- return new Promise((resolve, reject) => {
941
- localVarRequest(localVarRequestOptions, (error, response, body) => {
942
- if (error) {
943
- reject(error);
944
- }
945
- else {
946
- body = models_1.ObjectSerializer.deserialize(body, "AdminListProjectsResponse");
947
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
948
- if (typeof body.success === 'boolean' && !body.success) {
949
- reject(new Error(body.error || errString));
950
- }
951
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
952
- resolve(body);
953
- }
954
- else {
955
- reject(errString);
956
- }
957
- }
958
- });
959
- });
960
- });
961
- }
962
- /**
963
- * White label admin only API to get information about a user.
964
- * @summary Get a white label user
965
- * @param organizationId Organization ID
966
- * @param userId User ID
967
- */
968
- async whitelabelAdminGetUser(organizationId, userId, options = { headers: {} }) {
969
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/users/{userId}'
970
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
971
- .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
972
- let localVarQueryParameters = {};
973
- let localVarHeaderParams = Object.assign({
974
- 'User-Agent': 'edgeimpulse-api nodejs'
975
- }, this.defaultHeaders);
976
- const produces = ['application/json'];
977
- // give precedence to 'application/json'
978
- if (produces.indexOf('application/json') >= 0) {
979
- localVarHeaderParams.Accept = 'application/json';
980
- }
981
- else {
982
- localVarHeaderParams.Accept = produces.join(',');
983
- }
984
- let localVarFormParams = {};
985
- // verify required parameter 'organizationId' is not null or undefined
986
- if (organizationId === null || organizationId === undefined) {
987
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetUser.');
988
- }
989
- // verify required parameter 'userId' is not null or undefined
990
- if (userId === null || userId === undefined) {
991
- throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminGetUser.');
992
- }
993
- Object.assign(localVarHeaderParams, options.headers);
994
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
995
- let localVarUseFormData = false;
996
- let localVarRequestOptions = {
997
- method: 'GET',
998
- qs: localVarQueryParameters,
999
- headers: localVarHeaderParams,
1000
- uri: localVarPath,
1001
- useQuerystring: this._useQuerystring,
1002
- agentOptions: { keepAlive: false },
1003
- json: true,
1004
- };
1005
- let authenticationPromise = Promise.resolve();
1006
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1007
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1008
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1009
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1010
- return authenticationPromise.then(() => {
1011
- if (Object.keys(localVarFormParams).length) {
1012
- if (localVarUseFormData) {
1013
- localVarRequestOptions.formData = localVarFormParams;
1014
- }
1015
- else {
1016
- localVarRequestOptions.form = localVarFormParams;
1017
- }
1018
- }
1019
- return new Promise((resolve, reject) => {
1020
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1021
- if (error) {
1022
- reject(error);
1023
- }
1024
- else {
1025
- body = models_1.ObjectSerializer.deserialize(body, "AdminGetUserResponse");
1026
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1027
- if (typeof body.success === 'boolean' && !body.success) {
1028
- reject(new Error(body.error || errString));
1029
- }
1030
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1031
- resolve(body);
1032
- }
1033
- else {
1034
- reject(errString);
1035
- }
1036
- }
1037
- });
1038
- });
1039
- });
1040
- }
1041
- /**
1042
- * White label admin only API to get marketing metrics about a user.
1043
- * @summary Get white label user metrics
1044
- * @param organizationId Organization ID
1045
- * @param userId User ID
1046
- */
1047
- async whitelabelAdminGetUserMetrics(organizationId, userId, options = { headers: {} }) {
1048
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/users/{userId}/metrics'
1049
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1050
- .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
1051
- let localVarQueryParameters = {};
1052
- let localVarHeaderParams = Object.assign({
1053
- 'User-Agent': 'edgeimpulse-api nodejs'
1054
- }, this.defaultHeaders);
1055
- const produces = ['application/json'];
1056
- // give precedence to 'application/json'
1057
- if (produces.indexOf('application/json') >= 0) {
1058
- localVarHeaderParams.Accept = 'application/json';
1059
- }
1060
- else {
1061
- localVarHeaderParams.Accept = produces.join(',');
1062
- }
1063
- let localVarFormParams = {};
1064
- // verify required parameter 'organizationId' is not null or undefined
1065
- if (organizationId === null || organizationId === undefined) {
1066
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetUserMetrics.');
1067
- }
1068
- // verify required parameter 'userId' is not null or undefined
1069
- if (userId === null || userId === undefined) {
1070
- throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminGetUserMetrics.');
1071
- }
1072
- Object.assign(localVarHeaderParams, options.headers);
1073
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1074
- let localVarUseFormData = false;
1075
- let localVarRequestOptions = {
1076
- method: 'GET',
1077
- qs: localVarQueryParameters,
1078
- headers: localVarHeaderParams,
1079
- uri: localVarPath,
1080
- useQuerystring: this._useQuerystring,
1081
- agentOptions: { keepAlive: false },
1082
- json: true,
1083
- };
1084
- let authenticationPromise = Promise.resolve();
1085
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1086
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1087
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1088
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1089
- return authenticationPromise.then(() => {
1090
- if (Object.keys(localVarFormParams).length) {
1091
- if (localVarUseFormData) {
1092
- localVarRequestOptions.formData = localVarFormParams;
1093
- }
1094
- else {
1095
- localVarRequestOptions.form = localVarFormParams;
1096
- }
1097
- }
1098
- return new Promise((resolve, reject) => {
1099
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1100
- if (error) {
1101
- reject(error);
1102
- }
1103
- else {
1104
- body = models_1.ObjectSerializer.deserialize(body, "AdminGetUserMetricsResponse");
1105
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1106
- if (typeof body.success === 'boolean' && !body.success) {
1107
- reject(new Error(body.error || errString));
1108
- }
1109
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1110
- resolve(body);
1111
- }
1112
- else {
1113
- reject(errString);
1114
- }
1115
- }
1116
- });
1117
- });
1118
- });
1119
- }
1120
- /**
1121
- * White label admin only API to get the list of all registered users.
1122
- * @summary Get all white label users
1123
- * @param organizationId Organization ID
1124
- * @param active Whether to search for entities (users, orgs) active in the last X days
1125
- * @param tier Whether to search for free, pro or enterprise entities (users, projects)
1126
- * @param fields Comma separated list of fields to fetch in a query
1127
- * @param sort Fields and order to sort query by
1128
- * @param limit Maximum number of results
1129
- * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
1130
- * @param search Search query
1131
- */
1132
- async whitelabelAdminGetUsers(organizationId, queryParams, options = { headers: {} }) {
1133
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/users'
1134
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1135
- let localVarQueryParameters = {};
1136
- let localVarHeaderParams = Object.assign({
1137
- 'User-Agent': 'edgeimpulse-api nodejs'
1138
- }, this.defaultHeaders);
1139
- const produces = ['application/json'];
1140
- // give precedence to 'application/json'
1141
- if (produces.indexOf('application/json') >= 0) {
1142
- localVarHeaderParams.Accept = 'application/json';
1143
- }
1144
- else {
1145
- localVarHeaderParams.Accept = produces.join(',');
1146
- }
1147
- let localVarFormParams = {};
1148
- // verify required parameter 'organizationId' is not null or undefined
1149
- if (organizationId === null || organizationId === undefined) {
1150
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetUsers.');
1151
- }
1152
- if (queryParams.active !== undefined) {
1153
- localVarQueryParameters['active'] = models_1.ObjectSerializer.serialize(queryParams.active, "number");
1154
- }
1155
- if (queryParams.tier !== undefined) {
1156
- localVarQueryParameters['tier'] = models_1.ObjectSerializer.serialize(queryParams.tier, "'free' | 'pro' | 'enterprise'");
1157
- }
1158
- if (queryParams.fields !== undefined) {
1159
- localVarQueryParameters['fields'] = models_1.ObjectSerializer.serialize(queryParams.fields, "string");
1160
- }
1161
- if (queryParams.sort !== undefined) {
1162
- localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(queryParams.sort, "string");
1163
- }
1164
- if (queryParams.limit !== undefined) {
1165
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
1166
- }
1167
- if (queryParams.offset !== undefined) {
1168
- localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
1169
- }
1170
- if (queryParams.search !== undefined) {
1171
- localVarQueryParameters['search'] = models_1.ObjectSerializer.serialize(queryParams.search, "string");
1172
- }
1173
- Object.assign(localVarHeaderParams, options.headers);
1174
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1175
- let localVarUseFormData = false;
1176
- let localVarRequestOptions = {
1177
- method: 'GET',
1178
- qs: localVarQueryParameters,
1179
- headers: localVarHeaderParams,
1180
- uri: localVarPath,
1181
- useQuerystring: this._useQuerystring,
1182
- agentOptions: { keepAlive: false },
1183
- json: true,
1184
- };
1185
- let authenticationPromise = Promise.resolve();
1186
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1187
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1188
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1189
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1190
- return authenticationPromise.then(() => {
1191
- if (Object.keys(localVarFormParams).length) {
1192
- if (localVarUseFormData) {
1193
- localVarRequestOptions.formData = localVarFormParams;
1194
- }
1195
- else {
1196
- localVarRequestOptions.form = localVarFormParams;
1197
- }
1198
- }
1199
- return new Promise((resolve, reject) => {
1200
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1201
- if (error) {
1202
- reject(error);
1203
- }
1204
- else {
1205
- body = models_1.ObjectSerializer.deserialize(body, "AdminGetUsersResponse");
1206
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1207
- if (typeof body.success === 'boolean' && !body.success) {
1208
- reject(new Error(body.error || errString));
1209
- }
1210
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1211
- resolve(body);
1212
- }
1213
- else {
1214
- reject(errString);
1215
- }
1216
- }
1217
- });
1218
- });
1219
- });
1220
- }
1221
- /**
1222
- * White label admin only API to remove a development board.
1223
- * @summary Remove a development board from a whitelabel
1224
- * @param organizationId Organization ID
1225
- * @param developmentBoardId Development board ID.
1226
- */
1227
- async whitelabelAdminRemoveDevelopmentBoard(organizationId, developmentBoardId, options = { headers: {} }) {
1228
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/development-boards/{developmentBoardId}'
1229
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1230
- .replace('{' + 'developmentBoardId' + '}', encodeURIComponent(String(developmentBoardId)));
1231
- let localVarQueryParameters = {};
1232
- let localVarHeaderParams = Object.assign({
1233
- 'User-Agent': 'edgeimpulse-api nodejs'
1234
- }, this.defaultHeaders);
1235
- const produces = ['application/json'];
1236
- // give precedence to 'application/json'
1237
- if (produces.indexOf('application/json') >= 0) {
1238
- localVarHeaderParams.Accept = 'application/json';
1239
- }
1240
- else {
1241
- localVarHeaderParams.Accept = produces.join(',');
1242
- }
1243
- let localVarFormParams = {};
1244
- // verify required parameter 'organizationId' is not null or undefined
1245
- if (organizationId === null || organizationId === undefined) {
1246
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminRemoveDevelopmentBoard.');
1247
- }
1248
- // verify required parameter 'developmentBoardId' is not null or undefined
1249
- if (developmentBoardId === null || developmentBoardId === undefined) {
1250
- throw new Error('Required parameter developmentBoardId was null or undefined when calling whitelabelAdminRemoveDevelopmentBoard.');
1251
- }
1252
- Object.assign(localVarHeaderParams, options.headers);
1253
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1254
- let localVarUseFormData = false;
1255
- let localVarRequestOptions = {
1256
- method: 'DELETE',
1257
- qs: localVarQueryParameters,
1258
- headers: localVarHeaderParams,
1259
- uri: localVarPath,
1260
- useQuerystring: this._useQuerystring,
1261
- agentOptions: { keepAlive: false },
1262
- json: true,
1263
- };
1264
- let authenticationPromise = Promise.resolve();
1265
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1266
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1267
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1268
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1269
- return authenticationPromise.then(() => {
1270
- if (Object.keys(localVarFormParams).length) {
1271
- if (localVarUseFormData) {
1272
- localVarRequestOptions.formData = localVarFormParams;
1273
- }
1274
- else {
1275
- localVarRequestOptions.form = localVarFormParams;
1276
- }
1277
- }
1278
- return new Promise((resolve, reject) => {
1279
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1280
- if (error) {
1281
- reject(error);
1282
- }
1283
- else {
1284
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1285
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1286
- if (typeof body.success === 'boolean' && !body.success) {
1287
- reject(new Error(body.error || errString));
1288
- }
1289
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1290
- resolve(body);
1291
- }
1292
- else {
1293
- reject(errString);
1294
- }
1295
- }
1296
- });
1297
- });
1298
- });
1299
- }
1300
- /**
1301
- * White label admin only API to remove a user from an organization.
1302
- * @summary Remove user from an organization
1303
- * @param organizationId Organization ID
1304
- * @param innerOrganizationId Organization ID within the context of a white label
1305
- * @param userId User ID
1306
- */
1307
- async whitelabelAdminRemoveUserFromOrganization(organizationId, innerOrganizationId, userId, options = { headers: {} }) {
1308
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members/{userId}'
1309
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1310
- .replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)))
1311
- .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
1312
- let localVarQueryParameters = {};
1313
- let localVarHeaderParams = Object.assign({
1314
- 'User-Agent': 'edgeimpulse-api nodejs'
1315
- }, this.defaultHeaders);
1316
- const produces = ['application/json'];
1317
- // give precedence to 'application/json'
1318
- if (produces.indexOf('application/json') >= 0) {
1319
- localVarHeaderParams.Accept = 'application/json';
1320
- }
1321
- else {
1322
- localVarHeaderParams.Accept = produces.join(',');
1323
- }
1324
- let localVarFormParams = {};
1325
- // verify required parameter 'organizationId' is not null or undefined
1326
- if (organizationId === null || organizationId === undefined) {
1327
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminRemoveUserFromOrganization.');
1328
- }
1329
- // verify required parameter 'innerOrganizationId' is not null or undefined
1330
- if (innerOrganizationId === null || innerOrganizationId === undefined) {
1331
- throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminRemoveUserFromOrganization.');
1332
- }
1333
- // verify required parameter 'userId' is not null or undefined
1334
- if (userId === null || userId === undefined) {
1335
- throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminRemoveUserFromOrganization.');
1336
- }
1337
- Object.assign(localVarHeaderParams, options.headers);
1338
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1339
- let localVarUseFormData = false;
1340
- let localVarRequestOptions = {
1341
- method: 'DELETE',
1342
- qs: localVarQueryParameters,
1343
- headers: localVarHeaderParams,
1344
- uri: localVarPath,
1345
- useQuerystring: this._useQuerystring,
1346
- agentOptions: { keepAlive: false },
1347
- json: true,
1348
- };
1349
- let authenticationPromise = Promise.resolve();
1350
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1351
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1352
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1353
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1354
- return authenticationPromise.then(() => {
1355
- if (Object.keys(localVarFormParams).length) {
1356
- if (localVarUseFormData) {
1357
- localVarRequestOptions.formData = localVarFormParams;
1358
- }
1359
- else {
1360
- localVarRequestOptions.form = localVarFormParams;
1361
- }
1362
- }
1363
- return new Promise((resolve, reject) => {
1364
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1365
- if (error) {
1366
- reject(error);
1367
- }
1368
- else {
1369
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1370
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1371
- if (typeof body.success === 'boolean' && !body.success) {
1372
- reject(new Error(body.error || errString));
1373
- }
1374
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1375
- resolve(body);
1376
- }
1377
- else {
1378
- reject(errString);
1379
- }
1380
- }
1381
- });
1382
- });
1383
- });
1384
- }
1385
- /**
1386
- * White label admin only API to remove a user from a project.
1387
- * @summary Remove user from a project
1388
- * @param organizationId Organization ID
1389
- * @param projectId Project ID
1390
- * @param userId User ID
1391
- */
1392
- async whitelabelAdminRemoveUserFromProject(organizationId, projectId, userId, options = { headers: {} }) {
1393
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}/members/{userId}'
1394
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1395
- .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
1396
- .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
1397
- let localVarQueryParameters = {};
1398
- let localVarHeaderParams = Object.assign({
1399
- 'User-Agent': 'edgeimpulse-api nodejs'
1400
- }, this.defaultHeaders);
1401
- const produces = ['application/json'];
1402
- // give precedence to 'application/json'
1403
- if (produces.indexOf('application/json') >= 0) {
1404
- localVarHeaderParams.Accept = 'application/json';
1405
- }
1406
- else {
1407
- localVarHeaderParams.Accept = produces.join(',');
1408
- }
1409
- let localVarFormParams = {};
1410
- // verify required parameter 'organizationId' is not null or undefined
1411
- if (organizationId === null || organizationId === undefined) {
1412
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminRemoveUserFromProject.');
1413
- }
1414
- // verify required parameter 'projectId' is not null or undefined
1415
- if (projectId === null || projectId === undefined) {
1416
- throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminRemoveUserFromProject.');
1417
- }
1418
- // verify required parameter 'userId' is not null or undefined
1419
- if (userId === null || userId === undefined) {
1420
- throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminRemoveUserFromProject.');
1421
- }
1422
- Object.assign(localVarHeaderParams, options.headers);
1423
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1424
- let localVarUseFormData = false;
1425
- let localVarRequestOptions = {
1426
- method: 'DELETE',
1427
- qs: localVarQueryParameters,
1428
- headers: localVarHeaderParams,
1429
- uri: localVarPath,
1430
- useQuerystring: this._useQuerystring,
1431
- agentOptions: { keepAlive: false },
1432
- json: true,
1433
- };
1434
- let authenticationPromise = Promise.resolve();
1435
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1436
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1437
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1438
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1439
- return authenticationPromise.then(() => {
1440
- if (Object.keys(localVarFormParams).length) {
1441
- if (localVarUseFormData) {
1442
- localVarRequestOptions.formData = localVarFormParams;
1443
- }
1444
- else {
1445
- localVarRequestOptions.form = localVarFormParams;
1446
- }
1447
- }
1448
- return new Promise((resolve, reject) => {
1449
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1450
- if (error) {
1451
- reject(error);
1452
- }
1453
- else {
1454
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1455
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1456
- if (typeof body.success === 'boolean' && !body.success) {
1457
- reject(new Error(body.error || errString));
1458
- }
1459
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1460
- resolve(body);
1461
- }
1462
- else {
1463
- reject(errString);
1464
- }
1465
- }
1466
- });
1467
- });
1468
- });
1469
- }
1470
- /**
1471
- * White label admin only API to update the default deployment target for this white label.
1472
- * @summary Update default deployment target
1473
- * @param organizationId Organization ID
1474
- * @param updateWhitelabelDefaultDeploymentTargetRequest
1475
- */
1476
- async whitelabelAdminUpdateDefaultDeploymentTarget(organizationId, updateWhitelabelDefaultDeploymentTargetRequest, options = { headers: {} }) {
1477
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/deploymentTargets/default'
1478
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1479
- let localVarQueryParameters = {};
1480
- let localVarHeaderParams = Object.assign({
1481
- 'User-Agent': 'edgeimpulse-api nodejs'
1482
- }, this.defaultHeaders);
1483
- const produces = ['application/json'];
1484
- // give precedence to 'application/json'
1485
- if (produces.indexOf('application/json') >= 0) {
1486
- localVarHeaderParams.Accept = 'application/json';
1487
- }
1488
- else {
1489
- localVarHeaderParams.Accept = produces.join(',');
1490
- }
1491
- let localVarFormParams = {};
1492
- // verify required parameter 'organizationId' is not null or undefined
1493
- if (organizationId === null || organizationId === undefined) {
1494
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateDefaultDeploymentTarget.');
1495
- }
1496
- // verify required parameter 'updateWhitelabelDefaultDeploymentTargetRequest' is not null or undefined
1497
- if (updateWhitelabelDefaultDeploymentTargetRequest === null || updateWhitelabelDefaultDeploymentTargetRequest === undefined) {
1498
- throw new Error('Required parameter updateWhitelabelDefaultDeploymentTargetRequest was null or undefined when calling whitelabelAdminUpdateDefaultDeploymentTarget.');
1499
- }
1500
- Object.assign(localVarHeaderParams, options.headers);
1501
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1502
- let localVarUseFormData = false;
1503
- let localVarRequestOptions = {
1504
- method: 'POST',
1505
- qs: localVarQueryParameters,
1506
- headers: localVarHeaderParams,
1507
- uri: localVarPath,
1508
- useQuerystring: this._useQuerystring,
1509
- agentOptions: { keepAlive: false },
1510
- json: true,
1511
- body: models_1.ObjectSerializer.serialize(updateWhitelabelDefaultDeploymentTargetRequest, "UpdateWhitelabelDefaultDeploymentTargetRequest")
1512
- };
1513
- let authenticationPromise = Promise.resolve();
1514
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1515
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1516
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1517
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1518
- return authenticationPromise.then(() => {
1519
- if (Object.keys(localVarFormParams).length) {
1520
- if (localVarUseFormData) {
1521
- localVarRequestOptions.formData = localVarFormParams;
1522
- }
1523
- else {
1524
- localVarRequestOptions.form = localVarFormParams;
1525
- }
1526
- }
1527
- return new Promise((resolve, reject) => {
1528
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1529
- if (error) {
1530
- reject(error);
1531
- }
1532
- else {
1533
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1534
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1535
- if (typeof body.success === 'boolean' && !body.success) {
1536
- reject(new Error(body.error || errString));
1537
- }
1538
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1539
- resolve(body);
1540
- }
1541
- else {
1542
- reject(errString);
1543
- }
1544
- }
1545
- });
1546
- });
1547
- });
1548
- }
1549
- /**
1550
- * White label admin only API to customize the order of deployment options in the deployment view for this white label.
1551
- * @summary Update the order of deployment options in the deployment view
1552
- * @param organizationId Organization ID
1553
- * @param updateWhitelabelDeploymentOptionsOrderRequest
1554
- */
1555
- async whitelabelAdminUpdateDeploymentOptionsOrder(organizationId, updateWhitelabelDeploymentOptionsOrderRequest, options = { headers: {} }) {
1556
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/deploymentOptionsOrder'
1557
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1558
- let localVarQueryParameters = {};
1559
- let localVarHeaderParams = Object.assign({
1560
- 'User-Agent': 'edgeimpulse-api nodejs'
1561
- }, this.defaultHeaders);
1562
- const produces = ['application/json'];
1563
- // give precedence to 'application/json'
1564
- if (produces.indexOf('application/json') >= 0) {
1565
- localVarHeaderParams.Accept = 'application/json';
1566
- }
1567
- else {
1568
- localVarHeaderParams.Accept = produces.join(',');
1569
- }
1570
- let localVarFormParams = {};
1571
- // verify required parameter 'organizationId' is not null or undefined
1572
- if (organizationId === null || organizationId === undefined) {
1573
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateDeploymentOptionsOrder.');
1574
- }
1575
- // verify required parameter 'updateWhitelabelDeploymentOptionsOrderRequest' is not null or undefined
1576
- if (updateWhitelabelDeploymentOptionsOrderRequest === null || updateWhitelabelDeploymentOptionsOrderRequest === undefined) {
1577
- throw new Error('Required parameter updateWhitelabelDeploymentOptionsOrderRequest was null or undefined when calling whitelabelAdminUpdateDeploymentOptionsOrder.');
1578
- }
1579
- Object.assign(localVarHeaderParams, options.headers);
1580
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1581
- let localVarUseFormData = false;
1582
- let localVarRequestOptions = {
1583
- method: 'POST',
1584
- qs: localVarQueryParameters,
1585
- headers: localVarHeaderParams,
1586
- uri: localVarPath,
1587
- useQuerystring: this._useQuerystring,
1588
- agentOptions: { keepAlive: false },
1589
- json: true,
1590
- body: models_1.ObjectSerializer.serialize(updateWhitelabelDeploymentOptionsOrderRequest, "UpdateWhitelabelDeploymentOptionsOrderRequest")
1591
- };
1592
- let authenticationPromise = Promise.resolve();
1593
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1594
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1595
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1596
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1597
- return authenticationPromise.then(() => {
1598
- if (Object.keys(localVarFormParams).length) {
1599
- if (localVarUseFormData) {
1600
- localVarRequestOptions.formData = localVarFormParams;
1601
- }
1602
- else {
1603
- localVarRequestOptions.form = localVarFormParams;
1604
- }
1605
- }
1606
- return new Promise((resolve, reject) => {
1607
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1608
- if (error) {
1609
- reject(error);
1610
- }
1611
- else {
1612
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1613
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1614
- if (typeof body.success === 'boolean' && !body.success) {
1615
- reject(new Error(body.error || errString));
1616
- }
1617
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1618
- resolve(body);
1619
- }
1620
- else {
1621
- reject(errString);
1622
- }
1623
- }
1624
- });
1625
- });
1626
- });
1627
- }
1628
- /**
1629
- * White label admin only API to update some or all of the deployment targets enabled for this white label.
1630
- * @summary Update deployment targets
1631
- * @param organizationId Organization ID
1632
- * @param updateWhitelabelDeploymentTargetsRequest
1633
- */
1634
- async whitelabelAdminUpdateDeploymentTargets(organizationId, updateWhitelabelDeploymentTargetsRequest, options = { headers: {} }) {
1635
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/deploymentTargets'
1636
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1637
- let localVarQueryParameters = {};
1638
- let localVarHeaderParams = Object.assign({
1639
- 'User-Agent': 'edgeimpulse-api nodejs'
1640
- }, this.defaultHeaders);
1641
- const produces = ['application/json'];
1642
- // give precedence to 'application/json'
1643
- if (produces.indexOf('application/json') >= 0) {
1644
- localVarHeaderParams.Accept = 'application/json';
1645
- }
1646
- else {
1647
- localVarHeaderParams.Accept = produces.join(',');
1648
- }
1649
- let localVarFormParams = {};
1650
- // verify required parameter 'organizationId' is not null or undefined
1651
- if (organizationId === null || organizationId === undefined) {
1652
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateDeploymentTargets.');
1653
- }
1654
- // verify required parameter 'updateWhitelabelDeploymentTargetsRequest' is not null or undefined
1655
- if (updateWhitelabelDeploymentTargetsRequest === null || updateWhitelabelDeploymentTargetsRequest === undefined) {
1656
- throw new Error('Required parameter updateWhitelabelDeploymentTargetsRequest was null or undefined when calling whitelabelAdminUpdateDeploymentTargets.');
1657
- }
1658
- Object.assign(localVarHeaderParams, options.headers);
1659
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1660
- let localVarUseFormData = false;
1661
- let localVarRequestOptions = {
1662
- method: 'POST',
1663
- qs: localVarQueryParameters,
1664
- headers: localVarHeaderParams,
1665
- uri: localVarPath,
1666
- useQuerystring: this._useQuerystring,
1667
- agentOptions: { keepAlive: false },
1668
- json: true,
1669
- body: models_1.ObjectSerializer.serialize(updateWhitelabelDeploymentTargetsRequest, "UpdateWhitelabelDeploymentTargetsRequest")
1670
- };
1671
- let authenticationPromise = Promise.resolve();
1672
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1673
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1674
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1675
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1676
- return authenticationPromise.then(() => {
1677
- if (Object.keys(localVarFormParams).length) {
1678
- if (localVarUseFormData) {
1679
- localVarRequestOptions.formData = localVarFormParams;
1680
- }
1681
- else {
1682
- localVarRequestOptions.form = localVarFormParams;
1683
- }
1684
- }
1685
- return new Promise((resolve, reject) => {
1686
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1687
- if (error) {
1688
- reject(error);
1689
- }
1690
- else {
1691
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1692
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1693
- if (typeof body.success === 'boolean' && !body.success) {
1694
- reject(new Error(body.error || errString));
1695
- }
1696
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1697
- resolve(body);
1698
- }
1699
- else {
1700
- reject(errString);
1701
- }
1702
- }
1703
- });
1704
- });
1705
- });
1706
- }
1707
- /**
1708
- * White label admin only API to update a development board.
1709
- * @summary Update a development board in a whitelabel
1710
- * @param organizationId Organization ID
1711
- * @param developmentBoardId Development board ID.
1712
- * @param developmentBoardRequestUpdate
1713
- */
1714
- async whitelabelAdminUpdateDevelopmentBoard(organizationId, developmentBoardId, developmentBoardRequestUpdate, options = { headers: {} }) {
1715
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/development-boards/{developmentBoardId}'
1716
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1717
- .replace('{' + 'developmentBoardId' + '}', encodeURIComponent(String(developmentBoardId)));
1718
- let localVarQueryParameters = {};
1719
- let localVarHeaderParams = Object.assign({
1720
- 'User-Agent': 'edgeimpulse-api nodejs'
1721
- }, this.defaultHeaders);
1722
- const produces = ['application/json'];
1723
- // give precedence to 'application/json'
1724
- if (produces.indexOf('application/json') >= 0) {
1725
- localVarHeaderParams.Accept = 'application/json';
1726
- }
1727
- else {
1728
- localVarHeaderParams.Accept = produces.join(',');
1729
- }
1730
- let localVarFormParams = {};
1731
- // verify required parameter 'organizationId' is not null or undefined
1732
- if (organizationId === null || organizationId === undefined) {
1733
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateDevelopmentBoard.');
1734
- }
1735
- // verify required parameter 'developmentBoardId' is not null or undefined
1736
- if (developmentBoardId === null || developmentBoardId === undefined) {
1737
- throw new Error('Required parameter developmentBoardId was null or undefined when calling whitelabelAdminUpdateDevelopmentBoard.');
1738
- }
1739
- Object.assign(localVarHeaderParams, options.headers);
1740
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1741
- let localVarUseFormData = false;
1742
- let localVarRequestOptions = {
1743
- method: 'PUT',
1744
- qs: localVarQueryParameters,
1745
- headers: localVarHeaderParams,
1746
- uri: localVarPath,
1747
- useQuerystring: this._useQuerystring,
1748
- agentOptions: { keepAlive: false },
1749
- json: true,
1750
- body: models_1.ObjectSerializer.serialize(developmentBoardRequestUpdate, "DevelopmentBoardRequestUpdate")
1751
- };
1752
- let authenticationPromise = Promise.resolve();
1753
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1754
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1755
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1756
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1757
- return authenticationPromise.then(() => {
1758
- if (Object.keys(localVarFormParams).length) {
1759
- if (localVarUseFormData) {
1760
- localVarRequestOptions.formData = localVarFormParams;
1761
- }
1762
- else {
1763
- localVarRequestOptions.form = localVarFormParams;
1764
- }
1765
- }
1766
- return new Promise((resolve, reject) => {
1767
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1768
- if (error) {
1769
- reject(error);
1770
- }
1771
- else {
1772
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1773
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1774
- if (typeof body.success === 'boolean' && !body.success) {
1775
- reject(new Error(body.error || errString));
1776
- }
1777
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1778
- resolve(body);
1779
- }
1780
- else {
1781
- reject(errString);
1782
- }
1783
- }
1784
- });
1785
- });
1786
- });
1787
- }
1788
- /**
1789
- * White label admin only API to update the image of a development board.
1790
- * @summary Update the image of a whitelabel development board
1791
- * @param organizationId Organization ID
1792
- * @param developmentBoardId Development board ID.
1793
- * @param image
1794
- */
1795
- async whitelabelAdminUpdateDevelopmentBoardImage(organizationId, developmentBoardId, params, options = { headers: {} }) {
1796
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/development-boards/{developmentBoardId}/image'
1797
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
1798
- .replace('{' + 'developmentBoardId' + '}', encodeURIComponent(String(developmentBoardId)));
1799
- let localVarQueryParameters = {};
1800
- let localVarHeaderParams = Object.assign({
1801
- 'User-Agent': 'edgeimpulse-api nodejs'
1802
- }, this.defaultHeaders);
1803
- const produces = ['application/json'];
1804
- // give precedence to 'application/json'
1805
- if (produces.indexOf('application/json') >= 0) {
1806
- localVarHeaderParams.Accept = 'application/json';
1807
- }
1808
- else {
1809
- localVarHeaderParams.Accept = produces.join(',');
1810
- }
1811
- let localVarFormParams = {};
1812
- // verify required parameter 'organizationId' is not null or undefined
1813
- if (organizationId === null || organizationId === undefined) {
1814
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateDevelopmentBoardImage.');
1815
- }
1816
- // verify required parameter 'developmentBoardId' is not null or undefined
1817
- if (developmentBoardId === null || developmentBoardId === undefined) {
1818
- throw new Error('Required parameter developmentBoardId was null or undefined when calling whitelabelAdminUpdateDevelopmentBoardImage.');
1819
- }
1820
- Object.assign(localVarHeaderParams, options.headers);
1821
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1822
- let localVarUseFormData = false;
1823
- if (params.image !== undefined) {
1824
- localVarFormParams['image'] = params.image;
1825
- }
1826
- localVarUseFormData = true;
1827
- let localVarRequestOptions = {
1828
- method: 'POST',
1829
- qs: localVarQueryParameters,
1830
- headers: localVarHeaderParams,
1831
- uri: localVarPath,
1832
- useQuerystring: this._useQuerystring,
1833
- agentOptions: { keepAlive: false },
1834
- json: true,
1835
- };
1836
- let authenticationPromise = Promise.resolve();
1837
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1838
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1839
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1840
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1841
- return authenticationPromise.then(() => {
1842
- if (Object.keys(localVarFormParams).length) {
1843
- if (localVarUseFormData) {
1844
- localVarRequestOptions.formData = localVarFormParams;
1845
- }
1846
- else {
1847
- localVarRequestOptions.form = localVarFormParams;
1848
- }
1849
- }
1850
- return new Promise((resolve, reject) => {
1851
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1852
- if (error) {
1853
- reject(error);
1854
- }
1855
- else {
1856
- body = models_1.ObjectSerializer.deserialize(body, "UploadAssetResponse");
1857
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1858
- if (typeof body.success === 'boolean' && !body.success) {
1859
- reject(new Error(body.error || errString));
1860
- }
1861
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1862
- resolve(body);
1863
- }
1864
- else {
1865
- reject(errString);
1866
- }
1867
- }
1868
- });
1869
- });
1870
- });
1871
- }
1872
- /**
1873
- * White label admin only API to update the white label information.
1874
- * @summary Update white label information
1875
- * @param organizationId Organization ID
1876
- * @param updateWhitelabelRequest
1877
- */
1878
- async whitelabelAdminUpdateInfo(organizationId, updateWhitelabelRequest, options = { headers: {} }) {
1879
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel'
1880
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1881
- let localVarQueryParameters = {};
1882
- let localVarHeaderParams = Object.assign({
1883
- 'User-Agent': 'edgeimpulse-api nodejs'
1884
- }, this.defaultHeaders);
1885
- const produces = ['application/json'];
1886
- // give precedence to 'application/json'
1887
- if (produces.indexOf('application/json') >= 0) {
1888
- localVarHeaderParams.Accept = 'application/json';
1889
- }
1890
- else {
1891
- localVarHeaderParams.Accept = produces.join(',');
1892
- }
1893
- let localVarFormParams = {};
1894
- // verify required parameter 'organizationId' is not null or undefined
1895
- if (organizationId === null || organizationId === undefined) {
1896
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateInfo.');
1897
- }
1898
- // verify required parameter 'updateWhitelabelRequest' is not null or undefined
1899
- if (updateWhitelabelRequest === null || updateWhitelabelRequest === undefined) {
1900
- throw new Error('Required parameter updateWhitelabelRequest was null or undefined when calling whitelabelAdminUpdateInfo.');
1901
- }
1902
- Object.assign(localVarHeaderParams, options.headers);
1903
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1904
- let localVarUseFormData = false;
1905
- let localVarRequestOptions = {
1906
- method: 'PUT',
1907
- qs: localVarQueryParameters,
1908
- headers: localVarHeaderParams,
1909
- uri: localVarPath,
1910
- useQuerystring: this._useQuerystring,
1911
- agentOptions: { keepAlive: false },
1912
- json: true,
1913
- body: models_1.ObjectSerializer.serialize(updateWhitelabelRequest, "UpdateWhitelabelRequest")
1914
- };
1915
- let authenticationPromise = Promise.resolve();
1916
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1917
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1918
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1919
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1920
- return authenticationPromise.then(() => {
1921
- if (Object.keys(localVarFormParams).length) {
1922
- if (localVarUseFormData) {
1923
- localVarRequestOptions.formData = localVarFormParams;
1924
- }
1925
- else {
1926
- localVarRequestOptions.form = localVarFormParams;
1927
- }
1928
- }
1929
- return new Promise((resolve, reject) => {
1930
- localVarRequest(localVarRequestOptions, (error, response, body) => {
1931
- if (error) {
1932
- reject(error);
1933
- }
1934
- else {
1935
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1936
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1937
- if (typeof body.success === 'boolean' && !body.success) {
1938
- reject(new Error(body.error || errString));
1939
- }
1940
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1941
- resolve(body);
1942
- }
1943
- else {
1944
- reject(errString);
1945
- }
1946
- }
1947
- });
1948
- });
1949
- });
1950
- }
1951
- /**
1952
- * White label admin only API to update some or all of the learning blocks enabled for this white label.
1953
- * @summary Update learning blocks
1954
- * @param organizationId Organization ID
1955
- * @param updateWhitelabelLearningBlocksRequest
1956
- */
1957
- async whitelabelAdminUpdateLearningBlocks(organizationId, updateWhitelabelLearningBlocksRequest, options = { headers: {} }) {
1958
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/learningBlocks'
1959
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
1960
- let localVarQueryParameters = {};
1961
- let localVarHeaderParams = Object.assign({
1962
- 'User-Agent': 'edgeimpulse-api nodejs'
1963
- }, this.defaultHeaders);
1964
- const produces = ['application/json'];
1965
- // give precedence to 'application/json'
1966
- if (produces.indexOf('application/json') >= 0) {
1967
- localVarHeaderParams.Accept = 'application/json';
1968
- }
1969
- else {
1970
- localVarHeaderParams.Accept = produces.join(',');
1971
- }
1972
- let localVarFormParams = {};
1973
- // verify required parameter 'organizationId' is not null or undefined
1974
- if (organizationId === null || organizationId === undefined) {
1975
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateLearningBlocks.');
1976
- }
1977
- // verify required parameter 'updateWhitelabelLearningBlocksRequest' is not null or undefined
1978
- if (updateWhitelabelLearningBlocksRequest === null || updateWhitelabelLearningBlocksRequest === undefined) {
1979
- throw new Error('Required parameter updateWhitelabelLearningBlocksRequest was null or undefined when calling whitelabelAdminUpdateLearningBlocks.');
1980
- }
1981
- Object.assign(localVarHeaderParams, options.headers);
1982
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1983
- let localVarUseFormData = false;
1984
- let localVarRequestOptions = {
1985
- method: 'POST',
1986
- qs: localVarQueryParameters,
1987
- headers: localVarHeaderParams,
1988
- uri: localVarPath,
1989
- useQuerystring: this._useQuerystring,
1990
- agentOptions: { keepAlive: false },
1991
- json: true,
1992
- body: models_1.ObjectSerializer.serialize(updateWhitelabelLearningBlocksRequest, "UpdateWhitelabelLearningBlocksRequest")
1993
- };
1994
- let authenticationPromise = Promise.resolve();
1995
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1996
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1997
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1998
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1999
- return authenticationPromise.then(() => {
2000
- if (Object.keys(localVarFormParams).length) {
2001
- if (localVarUseFormData) {
2002
- localVarRequestOptions.formData = localVarFormParams;
2003
- }
2004
- else {
2005
- localVarRequestOptions.form = localVarFormParams;
2006
- }
2007
- }
2008
- return new Promise((resolve, reject) => {
2009
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2010
- if (error) {
2011
- reject(error);
2012
- }
2013
- else {
2014
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2015
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2016
- if (typeof body.success === 'boolean' && !body.success) {
2017
- reject(new Error(body.error || errString));
2018
- }
2019
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2020
- resolve(body);
2021
- }
2022
- else {
2023
- reject(errString);
2024
- }
2025
- }
2026
- });
2027
- });
2028
- });
2029
- }
2030
- /**
2031
- * White label admin only API to update organization properties such as name and logo.
2032
- * @summary Update organization
2033
- * @param organizationId Organization ID
2034
- * @param innerOrganizationId Organization ID within the context of a white label
2035
- * @param adminUpdateOrganizationRequest
2036
- */
2037
- async whitelabelAdminUpdateOrganization(organizationId, innerOrganizationId, adminUpdateOrganizationRequest, options = { headers: {} }) {
2038
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}'
2039
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2040
- .replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
2041
- let localVarQueryParameters = {};
2042
- let localVarHeaderParams = Object.assign({
2043
- 'User-Agent': 'edgeimpulse-api nodejs'
2044
- }, this.defaultHeaders);
2045
- const produces = ['application/json'];
2046
- // give precedence to 'application/json'
2047
- if (produces.indexOf('application/json') >= 0) {
2048
- localVarHeaderParams.Accept = 'application/json';
2049
- }
2050
- else {
2051
- localVarHeaderParams.Accept = produces.join(',');
2052
- }
2053
- let localVarFormParams = {};
2054
- // verify required parameter 'organizationId' is not null or undefined
2055
- if (organizationId === null || organizationId === undefined) {
2056
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateOrganization.');
2057
- }
2058
- // verify required parameter 'innerOrganizationId' is not null or undefined
2059
- if (innerOrganizationId === null || innerOrganizationId === undefined) {
2060
- throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminUpdateOrganization.');
2061
- }
2062
- // verify required parameter 'adminUpdateOrganizationRequest' is not null or undefined
2063
- if (adminUpdateOrganizationRequest === null || adminUpdateOrganizationRequest === undefined) {
2064
- throw new Error('Required parameter adminUpdateOrganizationRequest was null or undefined when calling whitelabelAdminUpdateOrganization.');
2065
- }
2066
- Object.assign(localVarHeaderParams, options.headers);
2067
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2068
- let localVarUseFormData = false;
2069
- let localVarRequestOptions = {
2070
- method: 'POST',
2071
- qs: localVarQueryParameters,
2072
- headers: localVarHeaderParams,
2073
- uri: localVarPath,
2074
- useQuerystring: this._useQuerystring,
2075
- agentOptions: { keepAlive: false },
2076
- json: true,
2077
- body: models_1.ObjectSerializer.serialize(adminUpdateOrganizationRequest, "AdminUpdateOrganizationRequest")
2078
- };
2079
- let authenticationPromise = Promise.resolve();
2080
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2081
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2082
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2083
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2084
- return authenticationPromise.then(() => {
2085
- if (Object.keys(localVarFormParams).length) {
2086
- if (localVarUseFormData) {
2087
- localVarRequestOptions.formData = localVarFormParams;
2088
- }
2089
- else {
2090
- localVarRequestOptions.form = localVarFormParams;
2091
- }
2092
- }
2093
- return new Promise((resolve, reject) => {
2094
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2095
- if (error) {
2096
- reject(error);
2097
- }
2098
- else {
2099
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2100
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2101
- if (typeof body.success === 'boolean' && !body.success) {
2102
- reject(new Error(body.error || errString));
2103
- }
2104
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2105
- resolve(body);
2106
- }
2107
- else {
2108
- reject(errString);
2109
- }
2110
- }
2111
- });
2112
- });
2113
- });
2114
- }
2115
- /**
2116
- * White label admin only API to update project properties.
2117
- * @summary Update white label project
2118
- * @param organizationId Organization ID
2119
- * @param projectId Project ID
2120
- * @param updateProjectRequest
2121
- */
2122
- async whitelabelAdminUpdateProject(organizationId, projectId, updateProjectRequest, options = { headers: {} }) {
2123
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}'
2124
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2125
- .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
2126
- let localVarQueryParameters = {};
2127
- let localVarHeaderParams = Object.assign({
2128
- 'User-Agent': 'edgeimpulse-api nodejs'
2129
- }, this.defaultHeaders);
2130
- const produces = ['application/json'];
2131
- // give precedence to 'application/json'
2132
- if (produces.indexOf('application/json') >= 0) {
2133
- localVarHeaderParams.Accept = 'application/json';
2134
- }
2135
- else {
2136
- localVarHeaderParams.Accept = produces.join(',');
2137
- }
2138
- let localVarFormParams = {};
2139
- // verify required parameter 'organizationId' is not null or undefined
2140
- if (organizationId === null || organizationId === undefined) {
2141
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateProject.');
2142
- }
2143
- // verify required parameter 'projectId' is not null or undefined
2144
- if (projectId === null || projectId === undefined) {
2145
- throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminUpdateProject.');
2146
- }
2147
- // verify required parameter 'updateProjectRequest' is not null or undefined
2148
- if (updateProjectRequest === null || updateProjectRequest === undefined) {
2149
- throw new Error('Required parameter updateProjectRequest was null or undefined when calling whitelabelAdminUpdateProject.');
2150
- }
2151
- Object.assign(localVarHeaderParams, options.headers);
2152
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2153
- let localVarUseFormData = false;
2154
- let localVarRequestOptions = {
2155
- method: 'POST',
2156
- qs: localVarQueryParameters,
2157
- headers: localVarHeaderParams,
2158
- uri: localVarPath,
2159
- useQuerystring: this._useQuerystring,
2160
- agentOptions: { keepAlive: false },
2161
- json: true,
2162
- body: models_1.ObjectSerializer.serialize(updateProjectRequest, "UpdateProjectRequest")
2163
- };
2164
- let authenticationPromise = Promise.resolve();
2165
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2166
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2167
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2168
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2169
- return authenticationPromise.then(() => {
2170
- if (Object.keys(localVarFormParams).length) {
2171
- if (localVarUseFormData) {
2172
- localVarRequestOptions.formData = localVarFormParams;
2173
- }
2174
- else {
2175
- localVarRequestOptions.form = localVarFormParams;
2176
- }
2177
- }
2178
- return new Promise((resolve, reject) => {
2179
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2180
- if (error) {
2181
- reject(error);
2182
- }
2183
- else {
2184
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2185
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2186
- if (typeof body.success === 'boolean' && !body.success) {
2187
- reject(new Error(body.error || errString));
2188
- }
2189
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2190
- resolve(body);
2191
- }
2192
- else {
2193
- reject(errString);
2194
- }
2195
- }
2196
- });
2197
- });
2198
- });
2199
- }
2200
- /**
2201
- * White label admin only API to update some or all theme colors.
2202
- * @summary Update theme colors
2203
- * @param organizationId Organization ID
2204
- * @param updateThemeColorsRequest
2205
- */
2206
- async whitelabelAdminUpdateThemeColors(organizationId, updateThemeColorsRequest, options = { headers: {} }) {
2207
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/theme/colors'
2208
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2209
- let localVarQueryParameters = {};
2210
- let localVarHeaderParams = Object.assign({
2211
- 'User-Agent': 'edgeimpulse-api nodejs'
2212
- }, this.defaultHeaders);
2213
- const produces = ['application/json'];
2214
- // give precedence to 'application/json'
2215
- if (produces.indexOf('application/json') >= 0) {
2216
- localVarHeaderParams.Accept = 'application/json';
2217
- }
2218
- else {
2219
- localVarHeaderParams.Accept = produces.join(',');
2220
- }
2221
- let localVarFormParams = {};
2222
- // verify required parameter 'organizationId' is not null or undefined
2223
- if (organizationId === null || organizationId === undefined) {
2224
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateThemeColors.');
2225
- }
2226
- // verify required parameter 'updateThemeColorsRequest' is not null or undefined
2227
- if (updateThemeColorsRequest === null || updateThemeColorsRequest === undefined) {
2228
- throw new Error('Required parameter updateThemeColorsRequest was null or undefined when calling whitelabelAdminUpdateThemeColors.');
2229
- }
2230
- Object.assign(localVarHeaderParams, options.headers);
2231
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2232
- let localVarUseFormData = false;
2233
- let localVarRequestOptions = {
2234
- method: 'POST',
2235
- qs: localVarQueryParameters,
2236
- headers: localVarHeaderParams,
2237
- uri: localVarPath,
2238
- useQuerystring: this._useQuerystring,
2239
- agentOptions: { keepAlive: false },
2240
- json: true,
2241
- body: models_1.ObjectSerializer.serialize(updateThemeColorsRequest, "UpdateThemeColorsRequest")
2242
- };
2243
- let authenticationPromise = Promise.resolve();
2244
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2245
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2246
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2247
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2248
- return authenticationPromise.then(() => {
2249
- if (Object.keys(localVarFormParams).length) {
2250
- if (localVarUseFormData) {
2251
- localVarRequestOptions.formData = localVarFormParams;
2252
- }
2253
- else {
2254
- localVarRequestOptions.form = localVarFormParams;
2255
- }
2256
- }
2257
- return new Promise((resolve, reject) => {
2258
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2259
- if (error) {
2260
- reject(error);
2261
- }
2262
- else {
2263
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2264
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2265
- if (typeof body.success === 'boolean' && !body.success) {
2266
- reject(new Error(body.error || errString));
2267
- }
2268
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2269
- resolve(body);
2270
- }
2271
- else {
2272
- reject(errString);
2273
- }
2274
- }
2275
- });
2276
- });
2277
- });
2278
- }
2279
- /**
2280
- * White label admin only API to update the white label theme device logo.
2281
- * @summary Update theme device logo
2282
- * @param organizationId Organization ID
2283
- * @param image
2284
- */
2285
- async whitelabelAdminUpdateThemeDeviceLogo(organizationId, params, options = { headers: {} }) {
2286
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/theme/deviceLogo'
2287
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2288
- let localVarQueryParameters = {};
2289
- let localVarHeaderParams = Object.assign({
2290
- 'User-Agent': 'edgeimpulse-api nodejs'
2291
- }, this.defaultHeaders);
2292
- const produces = ['application/json'];
2293
- // give precedence to 'application/json'
2294
- if (produces.indexOf('application/json') >= 0) {
2295
- localVarHeaderParams.Accept = 'application/json';
2296
- }
2297
- else {
2298
- localVarHeaderParams.Accept = produces.join(',');
2299
- }
2300
- let localVarFormParams = {};
2301
- // verify required parameter 'organizationId' is not null or undefined
2302
- if (organizationId === null || organizationId === undefined) {
2303
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateThemeDeviceLogo.');
2304
- }
2305
- Object.assign(localVarHeaderParams, options.headers);
2306
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2307
- let localVarUseFormData = false;
2308
- if (params.image !== undefined) {
2309
- localVarFormParams['image'] = params.image;
2310
- }
2311
- localVarUseFormData = true;
2312
- let localVarRequestOptions = {
2313
- method: 'POST',
2314
- qs: localVarQueryParameters,
2315
- headers: localVarHeaderParams,
2316
- uri: localVarPath,
2317
- useQuerystring: this._useQuerystring,
2318
- agentOptions: { keepAlive: false },
2319
- json: true,
2320
- };
2321
- let authenticationPromise = Promise.resolve();
2322
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2323
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2324
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2325
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2326
- return authenticationPromise.then(() => {
2327
- if (Object.keys(localVarFormParams).length) {
2328
- if (localVarUseFormData) {
2329
- localVarRequestOptions.formData = localVarFormParams;
2330
- }
2331
- else {
2332
- localVarRequestOptions.form = localVarFormParams;
2333
- }
2334
- }
2335
- return new Promise((resolve, reject) => {
2336
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2337
- if (error) {
2338
- reject(error);
2339
- }
2340
- else {
2341
- body = models_1.ObjectSerializer.deserialize(body, "UploadAssetResponse");
2342
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2343
- if (typeof body.success === 'boolean' && !body.success) {
2344
- reject(new Error(body.error || errString));
2345
- }
2346
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2347
- resolve(body);
2348
- }
2349
- else {
2350
- reject(errString);
2351
- }
2352
- }
2353
- });
2354
- });
2355
- });
2356
- }
2357
- /**
2358
- * White label admin only API to update the theme favicon.
2359
- * @summary Update theme favicon
2360
- * @param organizationId Organization ID
2361
- * @param image
2362
- */
2363
- async whitelabelAdminUpdateThemeFavicon(organizationId, params, options = { headers: {} }) {
2364
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/theme/favicon'
2365
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2366
- let localVarQueryParameters = {};
2367
- let localVarHeaderParams = Object.assign({
2368
- 'User-Agent': 'edgeimpulse-api nodejs'
2369
- }, this.defaultHeaders);
2370
- const produces = ['application/json'];
2371
- // give precedence to 'application/json'
2372
- if (produces.indexOf('application/json') >= 0) {
2373
- localVarHeaderParams.Accept = 'application/json';
2374
- }
2375
- else {
2376
- localVarHeaderParams.Accept = produces.join(',');
2377
- }
2378
- let localVarFormParams = {};
2379
- // verify required parameter 'organizationId' is not null or undefined
2380
- if (organizationId === null || organizationId === undefined) {
2381
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateThemeFavicon.');
2382
- }
2383
- // verify required parameter 'image' is not null or undefined
2384
- if (params.image === null || params.image === undefined) {
2385
- throw new Error('Required parameter params.image was null or undefined when calling whitelabelAdminUpdateThemeFavicon.');
2386
- }
2387
- Object.assign(localVarHeaderParams, options.headers);
2388
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2389
- let localVarUseFormData = false;
2390
- if (params.image !== undefined) {
2391
- localVarFormParams['image'] = params.image;
2392
- }
2393
- localVarUseFormData = true;
2394
- let localVarRequestOptions = {
2395
- method: 'POST',
2396
- qs: localVarQueryParameters,
2397
- headers: localVarHeaderParams,
2398
- uri: localVarPath,
2399
- useQuerystring: this._useQuerystring,
2400
- agentOptions: { keepAlive: false },
2401
- json: true,
2402
- };
2403
- let authenticationPromise = Promise.resolve();
2404
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2405
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2406
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2407
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2408
- return authenticationPromise.then(() => {
2409
- if (Object.keys(localVarFormParams).length) {
2410
- if (localVarUseFormData) {
2411
- localVarRequestOptions.formData = localVarFormParams;
2412
- }
2413
- else {
2414
- localVarRequestOptions.form = localVarFormParams;
2415
- }
2416
- }
2417
- return new Promise((resolve, reject) => {
2418
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2419
- if (error) {
2420
- reject(error);
2421
- }
2422
- else {
2423
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2424
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2425
- if (typeof body.success === 'boolean' && !body.success) {
2426
- reject(new Error(body.error || errString));
2427
- }
2428
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2429
- resolve(body);
2430
- }
2431
- else {
2432
- reject(errString);
2433
- }
2434
- }
2435
- });
2436
- });
2437
- });
2438
- }
2439
- /**
2440
- * White label admin only API to update the white label theme logo.
2441
- * @summary Update theme logo
2442
- * @param organizationId Organization ID
2443
- * @param image
2444
- */
2445
- async whitelabelAdminUpdateThemeLogo(organizationId, params, options = { headers: {} }) {
2446
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/theme/logo'
2447
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2448
- let localVarQueryParameters = {};
2449
- let localVarHeaderParams = Object.assign({
2450
- 'User-Agent': 'edgeimpulse-api nodejs'
2451
- }, this.defaultHeaders);
2452
- const produces = ['application/json'];
2453
- // give precedence to 'application/json'
2454
- if (produces.indexOf('application/json') >= 0) {
2455
- localVarHeaderParams.Accept = 'application/json';
2456
- }
2457
- else {
2458
- localVarHeaderParams.Accept = produces.join(',');
2459
- }
2460
- let localVarFormParams = {};
2461
- // verify required parameter 'organizationId' is not null or undefined
2462
- if (organizationId === null || organizationId === undefined) {
2463
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateThemeLogo.');
2464
- }
2465
- Object.assign(localVarHeaderParams, options.headers);
2466
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2467
- let localVarUseFormData = false;
2468
- if (params.image !== undefined) {
2469
- localVarFormParams['image'] = params.image;
2470
- }
2471
- localVarUseFormData = true;
2472
- let localVarRequestOptions = {
2473
- method: 'POST',
2474
- qs: localVarQueryParameters,
2475
- headers: localVarHeaderParams,
2476
- uri: localVarPath,
2477
- useQuerystring: this._useQuerystring,
2478
- agentOptions: { keepAlive: false },
2479
- json: true,
2480
- };
2481
- let authenticationPromise = Promise.resolve();
2482
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2483
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2484
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2485
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2486
- return authenticationPromise.then(() => {
2487
- if (Object.keys(localVarFormParams).length) {
2488
- if (localVarUseFormData) {
2489
- localVarRequestOptions.formData = localVarFormParams;
2490
- }
2491
- else {
2492
- localVarRequestOptions.form = localVarFormParams;
2493
- }
2494
- }
2495
- return new Promise((resolve, reject) => {
2496
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2497
- if (error) {
2498
- reject(error);
2499
- }
2500
- else {
2501
- body = models_1.ObjectSerializer.deserialize(body, "UploadAssetResponse");
2502
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2503
- if (typeof body.success === 'boolean' && !body.success) {
2504
- reject(new Error(body.error || errString));
2505
- }
2506
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2507
- resolve(body);
2508
- }
2509
- else {
2510
- reject(errString);
2511
- }
2512
- }
2513
- });
2514
- });
2515
- });
2516
- }
2517
- /**
2518
- * White label admin only API to update user properties.
2519
- * @summary Update white label user
2520
- * @param organizationId Organization ID
2521
- * @param userId User ID
2522
- * @param adminUpdateUserRequest
2523
- */
2524
- async whitelabelAdminUpdateUser(organizationId, userId, adminUpdateUserRequest, options = { headers: {} }) {
2525
- const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/users/{userId}'
2526
- .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2527
- .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
2528
- let localVarQueryParameters = {};
2529
- let localVarHeaderParams = Object.assign({
2530
- 'User-Agent': 'edgeimpulse-api nodejs'
2531
- }, this.defaultHeaders);
2532
- const produces = ['application/json'];
2533
- // give precedence to 'application/json'
2534
- if (produces.indexOf('application/json') >= 0) {
2535
- localVarHeaderParams.Accept = 'application/json';
2536
- }
2537
- else {
2538
- localVarHeaderParams.Accept = produces.join(',');
2539
- }
2540
- let localVarFormParams = {};
2541
- // verify required parameter 'organizationId' is not null or undefined
2542
- if (organizationId === null || organizationId === undefined) {
2543
- throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateUser.');
2544
- }
2545
- // verify required parameter 'userId' is not null or undefined
2546
- if (userId === null || userId === undefined) {
2547
- throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminUpdateUser.');
2548
- }
2549
- // verify required parameter 'adminUpdateUserRequest' is not null or undefined
2550
- if (adminUpdateUserRequest === null || adminUpdateUserRequest === undefined) {
2551
- throw new Error('Required parameter adminUpdateUserRequest was null or undefined when calling whitelabelAdminUpdateUser.');
2552
- }
2553
- Object.assign(localVarHeaderParams, options.headers);
2554
- Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2555
- let localVarUseFormData = false;
2556
- let localVarRequestOptions = {
2557
- method: 'POST',
2558
- qs: localVarQueryParameters,
2559
- headers: localVarHeaderParams,
2560
- uri: localVarPath,
2561
- useQuerystring: this._useQuerystring,
2562
- agentOptions: { keepAlive: false },
2563
- json: true,
2564
- body: models_1.ObjectSerializer.serialize(adminUpdateUserRequest, "AdminUpdateUserRequest")
2565
- };
2566
- let authenticationPromise = Promise.resolve();
2567
- authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2568
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2569
- authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2570
- authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2571
- return authenticationPromise.then(() => {
2572
- if (Object.keys(localVarFormParams).length) {
2573
- if (localVarUseFormData) {
2574
- localVarRequestOptions.formData = localVarFormParams;
2575
- }
2576
- else {
2577
- localVarRequestOptions.form = localVarFormParams;
2578
- }
2579
- }
2580
- return new Promise((resolve, reject) => {
2581
- localVarRequest(localVarRequestOptions, (error, response, body) => {
2582
- if (error) {
2583
- reject(error);
2584
- }
2585
- else {
2586
- body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
2587
- const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2588
- if (typeof body.success === 'boolean' && !body.success) {
2589
- reject(new Error(body.error || errString));
2590
- }
2591
- else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2592
- resolve(body);
2593
- }
2594
- else {
2595
- reject(errString);
2596
- }
2597
- }
2598
- });
2599
- });
2600
- });
2601
- }
2602
- }
2603
- exports.OrganizationRequiresWhitelabelAdminApi = OrganizationRequiresWhitelabelAdminApi;
2604
- //# sourceMappingURL=organizationRequiresWhitelabelAdminApi.js.map