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