edge-impulse-api 1.93.26 → 1.93.28

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 (145) hide show
  1. package/build/browser/edge-impulse-api.d.ts +2448 -7
  2. package/build/browser/edge-impulse-api.js +7286 -785
  3. package/build/browser/edge-impulse-api.js.map +1 -1
  4. package/build/library/sdk/api/adminApi.d.ts +297 -0
  5. package/build/library/sdk/api/adminApi.js +891 -99
  6. package/build/library/sdk/api/adminApi.js.map +1 -1
  7. package/build/library/sdk/api/authApi.d.ts +3 -0
  8. package/build/library/sdk/api/authApi.js +9 -1
  9. package/build/library/sdk/api/authApi.js.map +1 -1
  10. package/build/library/sdk/api/cDNApi.d.ts +3 -0
  11. package/build/library/sdk/api/cDNApi.js +9 -1
  12. package/build/library/sdk/api/cDNApi.js.map +1 -1
  13. package/build/library/sdk/api/canaryApi.d.ts +3 -0
  14. package/build/library/sdk/api/canaryApi.js +9 -1
  15. package/build/library/sdk/api/canaryApi.js.map +1 -1
  16. package/build/library/sdk/api/classifyApi.d.ts +30 -0
  17. package/build/library/sdk/api/classifyApi.js +90 -10
  18. package/build/library/sdk/api/classifyApi.js.map +1 -1
  19. package/build/library/sdk/api/dSPApi.d.ts +57 -0
  20. package/build/library/sdk/api/dSPApi.js +171 -19
  21. package/build/library/sdk/api/dSPApi.js.map +1 -1
  22. package/build/library/sdk/api/datasetVersionsApi.d.ts +18 -0
  23. package/build/library/sdk/api/datasetVersionsApi.js +54 -6
  24. package/build/library/sdk/api/datasetVersionsApi.js.map +1 -1
  25. package/build/library/sdk/api/deploymentApi.d.ts +51 -0
  26. package/build/library/sdk/api/deploymentApi.js +153 -17
  27. package/build/library/sdk/api/deploymentApi.js.map +1 -1
  28. package/build/library/sdk/api/devicesApi.d.ts +48 -0
  29. package/build/library/sdk/api/devicesApi.js +144 -16
  30. package/build/library/sdk/api/devicesApi.js.map +1 -1
  31. package/build/library/sdk/api/emailVerificationApi.d.ts +12 -0
  32. package/build/library/sdk/api/emailVerificationApi.js +36 -4
  33. package/build/library/sdk/api/emailVerificationApi.js.map +1 -1
  34. package/build/library/sdk/api/exportApi.d.ts +6 -0
  35. package/build/library/sdk/api/exportApi.js +18 -2
  36. package/build/library/sdk/api/exportApi.js.map +1 -1
  37. package/build/library/sdk/api/featureFlagsApi.d.ts +3 -0
  38. package/build/library/sdk/api/featureFlagsApi.js +9 -1
  39. package/build/library/sdk/api/featureFlagsApi.js.map +1 -1
  40. package/build/library/sdk/api/healthApi.d.ts +6 -0
  41. package/build/library/sdk/api/healthApi.js +18 -2
  42. package/build/library/sdk/api/healthApi.js.map +1 -1
  43. package/build/library/sdk/api/impulseApi.d.ts +54 -0
  44. package/build/library/sdk/api/impulseApi.js +162 -18
  45. package/build/library/sdk/api/impulseApi.js.map +1 -1
  46. package/build/library/sdk/api/integrationsApi.d.ts +6 -0
  47. package/build/library/sdk/api/integrationsApi.js +18 -2
  48. package/build/library/sdk/api/integrationsApi.js.map +1 -1
  49. package/build/library/sdk/api/jobsApi.d.ts +135 -0
  50. package/build/library/sdk/api/jobsApi.js +409 -45
  51. package/build/library/sdk/api/jobsApi.js.map +1 -1
  52. package/build/library/sdk/api/learnApi.d.ts +87 -0
  53. package/build/library/sdk/api/learnApi.js +261 -29
  54. package/build/library/sdk/api/learnApi.js.map +1 -1
  55. package/build/library/sdk/api/loginApi.d.ts +6 -0
  56. package/build/library/sdk/api/loginApi.js +18 -2
  57. package/build/library/sdk/api/loginApi.js.map +1 -1
  58. package/build/library/sdk/api/metricsApi.d.ts +9 -0
  59. package/build/library/sdk/api/metricsApi.js +27 -3
  60. package/build/library/sdk/api/metricsApi.js.map +1 -1
  61. package/build/library/sdk/api/monitoringApi.d.ts +39 -0
  62. package/build/library/sdk/api/monitoringApi.js +117 -13
  63. package/build/library/sdk/api/monitoringApi.js.map +1 -1
  64. package/build/library/sdk/api/optimizationApi.d.ts +51 -0
  65. package/build/library/sdk/api/optimizationApi.js +153 -17
  66. package/build/library/sdk/api/optimizationApi.js.map +1 -1
  67. package/build/library/sdk/api/organizationBlocksApi.d.ts +119 -0
  68. package/build/library/sdk/api/organizationBlocksApi.js +391 -35
  69. package/build/library/sdk/api/organizationBlocksApi.js.map +1 -1
  70. package/build/library/sdk/api/organizationCreateProjectApi.d.ts +45 -0
  71. package/build/library/sdk/api/organizationCreateProjectApi.js +135 -15
  72. package/build/library/sdk/api/organizationCreateProjectApi.js.map +1 -1
  73. package/build/library/sdk/api/organizationDataApi.d.ts +120 -0
  74. package/build/library/sdk/api/organizationDataApi.js +360 -40
  75. package/build/library/sdk/api/organizationDataApi.js.map +1 -1
  76. package/build/library/sdk/api/organizationDataCampaignsApi.d.ts +36 -0
  77. package/build/library/sdk/api/organizationDataCampaignsApi.js +108 -12
  78. package/build/library/sdk/api/organizationDataCampaignsApi.js.map +1 -1
  79. package/build/library/sdk/api/organizationJobsApi.d.ts +24 -0
  80. package/build/library/sdk/api/organizationJobsApi.js +72 -8
  81. package/build/library/sdk/api/organizationJobsApi.js.map +1 -1
  82. package/build/library/sdk/api/organizationPipelinesApi.d.ts +24 -0
  83. package/build/library/sdk/api/organizationPipelinesApi.js +72 -8
  84. package/build/library/sdk/api/organizationPipelinesApi.js.map +1 -1
  85. package/build/library/sdk/api/organizationPortalsApi.d.ts +21 -0
  86. package/build/library/sdk/api/organizationPortalsApi.js +63 -7
  87. package/build/library/sdk/api/organizationPortalsApi.js.map +1 -1
  88. package/build/library/sdk/api/organizationsApi.d.ts +242 -2
  89. package/build/library/sdk/api/organizationsApi.js +722 -82
  90. package/build/library/sdk/api/organizationsApi.js.map +1 -1
  91. package/build/library/sdk/api/performanceCalibrationApi.d.ts +33 -0
  92. package/build/library/sdk/api/performanceCalibrationApi.js +99 -11
  93. package/build/library/sdk/api/performanceCalibrationApi.js.map +1 -1
  94. package/build/library/sdk/api/postProcessingApi.d.ts +15 -0
  95. package/build/library/sdk/api/postProcessingApi.js +45 -5
  96. package/build/library/sdk/api/postProcessingApi.js.map +1 -1
  97. package/build/library/sdk/api/projectsApi.d.ts +282 -1
  98. package/build/library/sdk/api/projectsApi.js +991 -66
  99. package/build/library/sdk/api/projectsApi.js.map +1 -1
  100. package/build/library/sdk/api/rawDataApi.d.ts +207 -0
  101. package/build/library/sdk/api/rawDataApi.js +621 -69
  102. package/build/library/sdk/api/rawDataApi.js.map +1 -1
  103. package/build/library/sdk/api/testApi.d.ts +12 -0
  104. package/build/library/sdk/api/testApi.js +36 -4
  105. package/build/library/sdk/api/testApi.js.map +1 -1
  106. package/build/library/sdk/api/themesApi.d.ts +18 -0
  107. package/build/library/sdk/api/themesApi.js +54 -6
  108. package/build/library/sdk/api/themesApi.js.map +1 -1
  109. package/build/library/sdk/api/thirdPartyAuthApi.d.ts +21 -0
  110. package/build/library/sdk/api/thirdPartyAuthApi.js +63 -7
  111. package/build/library/sdk/api/thirdPartyAuthApi.js.map +1 -1
  112. package/build/library/sdk/api/uploadPortalApi.d.ts +21 -0
  113. package/build/library/sdk/api/uploadPortalApi.js +63 -7
  114. package/build/library/sdk/api/uploadPortalApi.js.map +1 -1
  115. package/build/library/sdk/api/userApi.d.ts +147 -0
  116. package/build/library/sdk/api/userApi.js +441 -49
  117. package/build/library/sdk/api/userApi.js.map +1 -1
  118. package/build/library/sdk/api/vlmApi.d.ts +15 -0
  119. package/build/library/sdk/api/vlmApi.js +45 -5
  120. package/build/library/sdk/api/vlmApi.js.map +1 -1
  121. package/build/library/sdk/api/whitelabelsApi.d.ts +24 -0
  122. package/build/library/sdk/api/whitelabelsApi.js +72 -8
  123. package/build/library/sdk/api/whitelabelsApi.js.map +1 -1
  124. package/build/library/sdk/model/addOrganizationTransferLearningBlockRequest.d.ts +4 -0
  125. package/build/library/sdk/model/getExtensionSharedStateListResponse.d.ts +14 -0
  126. package/build/library/sdk/model/getExtensionSharedStateListResponse.js +4 -0
  127. package/build/library/sdk/model/getExtensionSharedStateListResponse.js.map +1 -0
  128. package/build/library/sdk/model/models.d.ts +3 -0
  129. package/build/library/sdk/model/models.js +3 -0
  130. package/build/library/sdk/model/models.js.map +1 -1
  131. package/build/library/sdk/model/oAuthScope.d.ts +1 -1
  132. package/build/library/sdk/model/oAuthScope.js +1 -1
  133. package/build/library/sdk/model/oAuthScope.js.map +1 -1
  134. package/build/library/sdk/model/organizationTransferLearningBlock.d.ts +4 -0
  135. package/build/library/sdk/model/projectDataSummary.d.ts +3 -0
  136. package/build/library/sdk/model/projectInfoResponse.d.ts +42 -3
  137. package/build/library/sdk/model/projectInfoResponse.js.map +1 -1
  138. package/build/library/sdk/model/setExtensionSharedStateRequest.d.ts +13 -0
  139. package/build/library/sdk/model/setExtensionSharedStateRequest.js +4 -0
  140. package/build/library/sdk/model/setExtensionSharedStateRequest.js.map +1 -0
  141. package/build/library/sdk/model/setExtensionSharedStateResponse.d.ts +11 -0
  142. package/build/library/sdk/model/setExtensionSharedStateResponse.js +4 -0
  143. package/build/library/sdk/model/setExtensionSharedStateResponse.js.map +1 -0
  144. package/build/library/sdk/model/transferLearningModel.d.ts +4 -0
  145. package/package.json +1 -1
@@ -179,7 +179,15 @@ class LearnApi {
179
179
  url = authDefault.url;
180
180
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
181
181
  const response = await fetch(url, requestOptions);
182
- return this.handleResponse(response, 'GenericApiResponse');
182
+ const resp = this.handleResponse(response, 'GenericApiResponse');
183
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
184
+ const headerCb = options.responseHeadersCallback;
185
+ // on next tick, so we have time to handle the response
186
+ setTimeout(() => {
187
+ headerCb(Object.fromEntries(response.headers.entries()));
188
+ }, 0);
189
+ }
190
+ return resp;
183
191
  }
184
192
  /**
185
193
  * Get a sample of trained features, this extracts a number of samples and their features.
@@ -263,7 +271,15 @@ class LearnApi {
263
271
  url = authDefault.url;
264
272
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
265
273
  const response = await fetch(url, requestOptions);
266
- return this.handleResponse(response, 'AnomalyTrainedFeaturesResponse');
274
+ const resp = this.handleResponse(response, 'AnomalyTrainedFeaturesResponse');
275
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
276
+ const headerCb = options.responseHeadersCallback;
277
+ // on next tick, so we have time to handle the response
278
+ setTimeout(() => {
279
+ headerCb(Object.fromEntries(response.headers.entries()));
280
+ }, 0);
281
+ }
282
+ return resp;
267
283
  }
268
284
  /**
269
285
  * Get trained features for a single sample. This runs both the DSP prerequisites and the anomaly classifier.
@@ -337,7 +353,15 @@ class LearnApi {
337
353
  url = authDefault.url;
338
354
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
339
355
  const response = await fetch(url, requestOptions);
340
- return this.handleResponse(response, 'AnomalyTrainedFeaturesResponse');
356
+ const resp = this.handleResponse(response, 'AnomalyTrainedFeaturesResponse');
357
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
358
+ const headerCb = options.responseHeadersCallback;
359
+ // on next tick, so we have time to handle the response
360
+ setTimeout(() => {
361
+ headerCb(Object.fromEntries(response.headers.entries()));
362
+ }, 0);
363
+ }
364
+ return resp;
341
365
  }
342
366
  /**
343
367
  * Download the data of an exported Keras block - needs to be exported via \'exportKerasBlockData\' first
@@ -405,7 +429,15 @@ class LearnApi {
405
429
  url = authDefault.url;
406
430
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
407
431
  const response = await fetch(url, requestOptions);
408
- return this.handleResponse(response, 'Buffer');
432
+ const resp = this.handleResponse(response, 'Buffer');
433
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
434
+ const headerCb = options.responseHeadersCallback;
435
+ // on next tick, so we have time to handle the response
436
+ setTimeout(() => {
437
+ headerCb(Object.fromEntries(response.headers.entries()));
438
+ }, 0);
439
+ }
440
+ return resp;
409
441
  }
410
442
  /**
411
443
  * Download an exported Keras block - needs to be exported via \'exportKerasBlock\' first
@@ -473,7 +505,15 @@ class LearnApi {
473
505
  url = authDefault.url;
474
506
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
475
507
  const response = await fetch(url, requestOptions);
476
- return this.handleResponse(response, 'Buffer');
508
+ const resp = this.handleResponse(response, 'Buffer');
509
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
510
+ const headerCb = options.responseHeadersCallback;
511
+ // on next tick, so we have time to handle the response
512
+ setTimeout(() => {
513
+ headerCb(Object.fromEntries(response.headers.entries()));
514
+ }, 0);
515
+ }
516
+ return resp;
477
517
  }
478
518
  /**
479
519
  * Download a trained model for a learning block. Depending on the block this can be a TensorFlow model, or the cluster centroids.
@@ -547,7 +587,15 @@ class LearnApi {
547
587
  url = authDefault.url;
548
588
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
549
589
  const response = await fetch(url, requestOptions);
550
- return this.handleResponse(response, 'Buffer');
590
+ const resp = this.handleResponse(response, 'Buffer');
591
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
592
+ const headerCb = options.responseHeadersCallback;
593
+ // on next tick, so we have time to handle the response
594
+ setTimeout(() => {
595
+ headerCb(Object.fromEntries(response.headers.entries()));
596
+ }, 0);
597
+ }
598
+ return resp;
551
599
  }
552
600
  /**
553
601
  * Download a pretrained model file
@@ -619,7 +667,15 @@ class LearnApi {
619
667
  url = authDefault.url;
620
668
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
621
669
  const response = await fetch(url, requestOptions);
622
- return this.handleResponse(response, 'Buffer');
670
+ const resp = this.handleResponse(response, 'Buffer');
671
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
672
+ const headerCb = options.responseHeadersCallback;
673
+ // on next tick, so we have time to handle the response
674
+ setTimeout(() => {
675
+ headerCb(Object.fromEntries(response.headers.entries()));
676
+ }, 0);
677
+ }
678
+ return resp;
623
679
  }
624
680
  /**
625
681
  * Get information about an anomaly block, such as its dependencies. Use the impulse blocks to find the learnId.
@@ -687,7 +743,15 @@ class LearnApi {
687
743
  url = authDefault.url;
688
744
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
689
745
  const response = await fetch(url, requestOptions);
690
- return this.handleResponse(response, 'AnomalyConfigResponse');
746
+ const resp = this.handleResponse(response, 'AnomalyConfigResponse');
747
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
748
+ const headerCb = options.responseHeadersCallback;
749
+ // on next tick, so we have time to handle the response
750
+ setTimeout(() => {
751
+ headerCb(Object.fromEntries(response.headers.entries()));
752
+ }, 0);
753
+ }
754
+ return resp;
691
755
  }
692
756
  /**
693
757
  * Get metadata about a trained anomaly block. Use the impulse blocks to find the learnId.
@@ -755,7 +819,15 @@ class LearnApi {
755
819
  url = authDefault.url;
756
820
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
757
821
  const response = await fetch(url, requestOptions);
758
- return this.handleResponse(response, 'AnomalyModelMetadataResponse');
822
+ const resp = this.handleResponse(response, 'AnomalyModelMetadataResponse');
823
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
824
+ const headerCb = options.responseHeadersCallback;
825
+ // on next tick, so we have time to handle the response
826
+ setTimeout(() => {
827
+ headerCb(Object.fromEntries(response.headers.entries()));
828
+ }, 0);
829
+ }
830
+ return resp;
759
831
  }
760
832
  /**
761
833
  * Get raw model metadata of the Gaussian mixture model (GMM) for a trained anomaly block. Use the impulse blocks to find the learnId.
@@ -823,7 +895,15 @@ class LearnApi {
823
895
  url = authDefault.url;
824
896
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
825
897
  const response = await fetch(url, requestOptions);
826
- return this.handleResponse(response, 'AnomalyGmmMetadataResponse');
898
+ const resp = this.handleResponse(response, 'AnomalyGmmMetadataResponse');
899
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
900
+ const headerCb = options.responseHeadersCallback;
901
+ // on next tick, so we have time to handle the response
902
+ setTimeout(() => {
903
+ headerCb(Object.fromEntries(response.headers.entries()));
904
+ }, 0);
905
+ }
906
+ return resp;
827
907
  }
828
908
  /**
829
909
  * Get information about a Keras block, such as its dependencies. Use the impulse blocks to find the learnId.
@@ -891,7 +971,15 @@ class LearnApi {
891
971
  url = authDefault.url;
892
972
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
893
973
  const response = await fetch(url, requestOptions);
894
- return this.handleResponse(response, 'KerasResponse');
974
+ const resp = this.handleResponse(response, 'KerasResponse');
975
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
976
+ const headerCb = options.responseHeadersCallback;
977
+ // on next tick, so we have time to handle the response
978
+ setTimeout(() => {
979
+ headerCb(Object.fromEntries(response.headers.entries()));
980
+ }, 0);
981
+ }
982
+ return resp;
895
983
  }
896
984
  /**
897
985
  * t-SNE2 output of the raw dataset using embeddings from this Keras block
@@ -959,7 +1047,15 @@ class LearnApi {
959
1047
  url = authDefault.url;
960
1048
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
961
1049
  const response = await fetch(url, requestOptions);
962
- return this.handleResponse(response, 'GetDataExplorerFeaturesResponse');
1050
+ const resp = this.handleResponse(response, 'GetDataExplorerFeaturesResponse');
1051
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1052
+ const headerCb = options.responseHeadersCallback;
1053
+ // on next tick, so we have time to handle the response
1054
+ setTimeout(() => {
1055
+ headerCb(Object.fromEntries(response.headers.entries()));
1056
+ }, 0);
1057
+ }
1058
+ return resp;
963
1059
  }
964
1060
  /**
965
1061
  * Get metadata about a trained Keras block. Use the impulse blocks to find the learnId.
@@ -1031,7 +1127,15 @@ class LearnApi {
1031
1127
  url = authDefault.url;
1032
1128
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1033
1129
  const response = await fetch(url, requestOptions);
1034
- return this.handleResponse(response, 'KerasModelMetadataResponse');
1130
+ const resp = this.handleResponse(response, 'KerasModelMetadataResponse');
1131
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1132
+ const headerCb = options.responseHeadersCallback;
1133
+ // on next tick, so we have time to handle the response
1134
+ setTimeout(() => {
1135
+ headerCb(Object.fromEntries(response.headers.entries()));
1136
+ }, 0);
1137
+ }
1138
+ return resp;
1035
1139
  }
1036
1140
  /**
1037
1141
  * Download the processed data for this learning block. This is data already processed by the signal processing blocks.
@@ -1099,7 +1203,15 @@ class LearnApi {
1099
1203
  url = authDefault.url;
1100
1204
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1101
1205
  const response = await fetch(url, requestOptions);
1102
- return this.handleResponse(response, 'Buffer');
1206
+ const resp = this.handleResponse(response, 'Buffer');
1207
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1208
+ const headerCb = options.responseHeadersCallback;
1209
+ // on next tick, so we have time to handle the response
1210
+ setTimeout(() => {
1211
+ headerCb(Object.fromEntries(response.headers.entries()));
1212
+ }, 0);
1213
+ }
1214
+ return resp;
1103
1215
  }
1104
1216
  /**
1105
1217
  * Download the labels for this learning block. This is data already processed by the signal processing blocks. Not all blocks support this function. If so, a GenericApiResponse is returned with an error message.
@@ -1167,7 +1279,15 @@ class LearnApi {
1167
1279
  url = authDefault.url;
1168
1280
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1169
1281
  const response = await fetch(url, requestOptions);
1170
- return this.handleResponse(response, 'Buffer');
1282
+ const resp = this.handleResponse(response, 'Buffer');
1283
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1284
+ const headerCb = options.responseHeadersCallback;
1285
+ // on next tick, so we have time to handle the response
1286
+ setTimeout(() => {
1287
+ headerCb(Object.fromEntries(response.headers.entries()));
1288
+ }, 0);
1289
+ }
1290
+ return resp;
1171
1291
  }
1172
1292
  /**
1173
1293
  * Receive info back about the earlier uploaded pretrained model (via `uploadPretrainedModel`) input/output tensors. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
@@ -1233,7 +1353,15 @@ class LearnApi {
1233
1353
  url = authDefault.url;
1234
1354
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1235
1355
  const response = await fetch(url, requestOptions);
1236
- return this.handleResponse(response, 'GetPretrainedModelResponse');
1356
+ const resp = this.handleResponse(response, 'GetPretrainedModelResponse');
1357
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1358
+ const headerCb = options.responseHeadersCallback;
1359
+ // on next tick, so we have time to handle the response
1360
+ setTimeout(() => {
1361
+ headerCb(Object.fromEntries(response.headers.entries()));
1362
+ }, 0);
1363
+ }
1364
+ return resp;
1237
1365
  }
1238
1366
  /**
1239
1367
  * Get config for a VLM learn block, including prompt and other model parameters
@@ -1301,7 +1429,15 @@ class LearnApi {
1301
1429
  url = authDefault.url;
1302
1430
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1303
1431
  const response = await fetch(url, requestOptions);
1304
- return this.handleResponse(response, 'VlmConfigResponse');
1432
+ const resp = this.handleResponse(response, 'VlmConfigResponse');
1433
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1434
+ const headerCb = options.responseHeadersCallback;
1435
+ // on next tick, so we have time to handle the response
1436
+ setTimeout(() => {
1437
+ headerCb(Object.fromEntries(response.headers.entries()));
1438
+ }, 0);
1439
+ }
1440
+ return resp;
1305
1441
  }
1306
1442
  /**
1307
1443
  * Returns the latency, RAM and ROM used for the pretrained model - upload first via `uploadPretrainedModel`. This is using the project\'s selected latency device. Updates are streamed over the websocket API (or can be retrieved through the /stdout endpoint). Use getProfileTfliteJobResult to get the results when the job is completed.
@@ -1367,7 +1503,15 @@ class LearnApi {
1367
1503
  url = authDefault.url;
1368
1504
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1369
1505
  const response = await fetch(url, requestOptions);
1370
- return this.handleResponse(response, 'StartJobResponse');
1506
+ const resp = this.handleResponse(response, 'StartJobResponse');
1507
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1508
+ const headerCb = options.responseHeadersCallback;
1509
+ // on next tick, so we have time to handle the response
1510
+ setTimeout(() => {
1511
+ headerCb(Object.fromEntries(response.headers.entries()));
1512
+ }, 0);
1513
+ }
1514
+ return resp;
1371
1515
  }
1372
1516
  /**
1373
1517
  * Save input / model configuration for a pretrained model. This overrides the current impulse. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
@@ -1439,7 +1583,15 @@ class LearnApi {
1439
1583
  url = authDefault.url;
1440
1584
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1441
1585
  const response = await fetch(url, requestOptions);
1442
- return this.handleResponse(response, 'GenericApiResponse');
1586
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1587
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1588
+ const headerCb = options.responseHeadersCallback;
1589
+ // on next tick, so we have time to handle the response
1590
+ setTimeout(() => {
1591
+ headerCb(Object.fromEntries(response.headers.entries()));
1592
+ }, 0);
1593
+ }
1594
+ return resp;
1443
1595
  }
1444
1596
  /**
1445
1597
  * Configure the anomaly block, such as its minimum confidence score. Use the impulse blocks to find the learnId.
@@ -1513,7 +1665,15 @@ class LearnApi {
1513
1665
  url = authDefault.url;
1514
1666
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1515
1667
  const response = await fetch(url, requestOptions);
1516
- return this.handleResponse(response, 'GenericApiResponse');
1668
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1669
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1670
+ const headerCb = options.responseHeadersCallback;
1671
+ // on next tick, so we have time to handle the response
1672
+ setTimeout(() => {
1673
+ headerCb(Object.fromEntries(response.headers.entries()));
1674
+ }, 0);
1675
+ }
1676
+ return resp;
1517
1677
  }
1518
1678
  /**
1519
1679
  * Configure the Keras block, such as its minimum confidence score. Use the impulse blocks to find the learnId.
@@ -1587,7 +1747,15 @@ class LearnApi {
1587
1747
  url = authDefault.url;
1588
1748
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1589
1749
  const response = await fetch(url, requestOptions);
1590
- return this.handleResponse(response, 'GenericApiResponse');
1750
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1751
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1752
+ const headerCb = options.responseHeadersCallback;
1753
+ // on next tick, so we have time to handle the response
1754
+ setTimeout(() => {
1755
+ headerCb(Object.fromEntries(response.headers.entries()));
1756
+ }, 0);
1757
+ }
1758
+ return resp;
1591
1759
  }
1592
1760
  /**
1593
1761
  * Update config for a VLM learn block, including prompt and other model parameters.
@@ -1661,7 +1829,15 @@ class LearnApi {
1661
1829
  url = authDefault.url;
1662
1830
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1663
1831
  const response = await fetch(url, requestOptions);
1664
- return this.handleResponse(response, 'VlmSetConfigResponse');
1832
+ const resp = this.handleResponse(response, 'VlmSetConfigResponse');
1833
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1834
+ const headerCb = options.responseHeadersCallback;
1835
+ // on next tick, so we have time to handle the response
1836
+ setTimeout(() => {
1837
+ headerCb(Object.fromEntries(response.headers.entries()));
1838
+ }, 0);
1839
+ }
1840
+ return resp;
1665
1841
  }
1666
1842
  /**
1667
1843
  * Starts an asynchronous profiling job, if there\'s no profiling information for the currently selected latency device. Afterwards, re-fetch model metadata to get the profiling job IDs.
@@ -1729,7 +1905,15 @@ class LearnApi {
1729
1905
  url = authDefault.url;
1730
1906
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1731
1907
  const response = await fetch(url, requestOptions);
1732
- return this.handleResponse(response, 'GenericApiResponse');
1908
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1909
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1910
+ const headerCb = options.responseHeadersCallback;
1911
+ // on next tick, so we have time to handle the response
1912
+ setTimeout(() => {
1913
+ headerCb(Object.fromEntries(response.headers.entries()));
1914
+ }, 0);
1915
+ }
1916
+ return resp;
1733
1917
  }
1734
1918
  /**
1735
1919
  * Starts an asynchronous profiling job, if there\'s no profiling information for the currently selected latency device. Afterwards, re-fetch model metadata to get the profiling job IDs.
@@ -1797,7 +1981,15 @@ class LearnApi {
1797
1981
  url = authDefault.url;
1798
1982
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1799
1983
  const response = await fetch(url, requestOptions);
1800
- return this.handleResponse(response, 'GenericApiResponse');
1984
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1985
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1986
+ const headerCb = options.responseHeadersCallback;
1987
+ // on next tick, so we have time to handle the response
1988
+ setTimeout(() => {
1989
+ headerCb(Object.fromEntries(response.headers.entries()));
1990
+ }, 0);
1991
+ }
1992
+ return resp;
1801
1993
  }
1802
1994
  /**
1803
1995
  * Test out a pretrained model (using raw features) - upload first via `uploadPretrainedModel`. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
@@ -1869,7 +2061,15 @@ class LearnApi {
1869
2061
  url = authDefault.url;
1870
2062
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1871
2063
  const response = await fetch(url, requestOptions);
1872
- return this.handleResponse(response, 'TestPretrainedModelResponse');
2064
+ const resp = this.handleResponse(response, 'TestPretrainedModelResponse');
2065
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2066
+ const headerCb = options.responseHeadersCallback;
2067
+ // on next tick, so we have time to handle the response
2068
+ setTimeout(() => {
2069
+ headerCb(Object.fromEntries(response.headers.entries()));
2070
+ }, 0);
2071
+ }
2072
+ return resp;
1873
2073
  }
1874
2074
  /**
1875
2075
  * Test out a pretrained model (using image data) - upload first via `uploadPretrainedModel`. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`. This will transform raw image data (e.g. RGB to grayscale, resize) before classifying. To classify raw features, see `testPretrainedModel`.
@@ -1941,7 +2141,15 @@ class LearnApi {
1941
2141
  url = authDefault.url;
1942
2142
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1943
2143
  const response = await fetch(url, requestOptions);
1944
- return this.handleResponse(response, 'TestPretrainedModelResponse');
2144
+ const resp = this.handleResponse(response, 'TestPretrainedModelResponse');
2145
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2146
+ const headerCb = options.responseHeadersCallback;
2147
+ // on next tick, so we have time to handle the response
2148
+ setTimeout(() => {
2149
+ headerCb(Object.fromEntries(response.headers.entries()));
2150
+ }, 0);
2151
+ }
2152
+ return resp;
1945
2153
  }
1946
2154
  /**
1947
2155
  * Replace Keras block files with the contents of a zip. This is an internal API.
@@ -2024,7 +2232,15 @@ class LearnApi {
2024
2232
  url = authDefault.url;
2025
2233
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2026
2234
  const response = await fetch(url, requestOptions);
2027
- return this.handleResponse(response, 'GenericApiResponse');
2235
+ const resp = this.handleResponse(response, 'GenericApiResponse');
2236
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2237
+ const headerCb = options.responseHeadersCallback;
2238
+ // on next tick, so we have time to handle the response
2239
+ setTimeout(() => {
2240
+ headerCb(Object.fromEntries(response.headers.entries()));
2241
+ }, 0);
2242
+ }
2243
+ return resp;
2028
2244
  }
2029
2245
  /**
2030
2246
  * Upload a pretrained model and receive info back about the input/output tensors. If you want to deploy a pretrained model from the API, see `startDeployPretrainedModelJob`.
@@ -2153,7 +2369,15 @@ class LearnApi {
2153
2369
  url = authDefault.url;
2154
2370
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2155
2371
  const response = await fetch(url, requestOptions);
2156
- return this.handleResponse(response, 'StartJobResponse');
2372
+ const resp = this.handleResponse(response, 'StartJobResponse');
2373
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2374
+ const headerCb = options.responseHeadersCallback;
2375
+ // on next tick, so we have time to handle the response
2376
+ setTimeout(() => {
2377
+ headerCb(Object.fromEntries(response.headers.entries()));
2378
+ }, 0);
2379
+ }
2380
+ return resp;
2157
2381
  }
2158
2382
  /**
2159
2383
  * Internal API, used in tests (only available on *.test.edgeimpulse.com). Upload a pretrained model by providing a URL - rather than uploading the file itself (as we have a request size limit on test).
@@ -2225,7 +2449,15 @@ class LearnApi {
2225
2449
  url = authDefault.url;
2226
2450
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2227
2451
  const response = await fetch(url, requestOptions);
2228
- return this.handleResponse(response, 'StartJobResponse');
2452
+ const resp = this.handleResponse(response, 'StartJobResponse');
2453
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2454
+ const headerCb = options.responseHeadersCallback;
2455
+ // on next tick, so we have time to handle the response
2456
+ setTimeout(() => {
2457
+ headerCb(Object.fromEntries(response.headers.entries()));
2458
+ }, 0);
2459
+ }
2460
+ return resp;
2229
2461
  }
2230
2462
  }
2231
2463
  exports.LearnApi = LearnApi;