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
@@ -164,7 +164,15 @@ class ProjectsApi {
164
164
  url = authDefault.url;
165
165
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
166
166
  const response = await fetch(url, requestOptions);
167
- return this.handleResponse(response, 'EntityCreatedResponse');
167
+ const resp = this.handleResponse(response, 'EntityCreatedResponse');
168
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
169
+ const headerCb = options.responseHeadersCallback;
170
+ // on next tick, so we have time to handle the response
171
+ setTimeout(() => {
172
+ headerCb(Object.fromEntries(response.headers.entries()));
173
+ }, 0);
174
+ }
175
+ return resp;
168
176
  }
169
177
  /**
170
178
  * Adds an extension to a project. This API is only available through JWT token authentication.
@@ -232,7 +240,15 @@ class ProjectsApi {
232
240
  url = authDefault.url;
233
241
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
234
242
  const response = await fetch(url, requestOptions);
235
- return this.handleResponse(response, 'GenericApiResponse');
243
+ const resp = this.handleResponse(response, 'GenericApiResponse');
244
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
245
+ const headerCb = options.responseHeadersCallback;
246
+ // on next tick, so we have time to handle the response
247
+ setTimeout(() => {
248
+ headerCb(Object.fromEntries(response.headers.entries()));
249
+ }, 0);
250
+ }
251
+ return resp;
236
252
  }
237
253
  /**
238
254
  * Add an API key. If you set `developmentKey` to `true` this flag will be removed from the current development API key. For OAuth-based third-party integrations, prefer `/api/{projectId}/apikeys/ingestiononly`.
@@ -300,7 +316,15 @@ class ProjectsApi {
300
316
  url = authDefault.url;
301
317
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
302
318
  const response = await fetch(url, requestOptions);
303
- return this.handleResponse(response, 'AddApiKeyResponse');
319
+ const resp = this.handleResponse(response, 'AddApiKeyResponse');
320
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
321
+ const headerCb = options.responseHeadersCallback;
322
+ // on next tick, so we have time to handle the response
323
+ setTimeout(() => {
324
+ headerCb(Object.fromEntries(response.headers.entries()));
325
+ }, 0);
326
+ }
327
+ return resp;
304
328
  }
305
329
  /**
306
330
  * Add an HMAC key. If you set `developmentKey` to `true` this flag will be removed from the current development HMAC key.
@@ -368,7 +392,15 @@ class ProjectsApi {
368
392
  url = authDefault.url;
369
393
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
370
394
  const response = await fetch(url, requestOptions);
371
- return this.handleResponse(response, 'EntityCreatedResponse');
395
+ const resp = this.handleResponse(response, 'EntityCreatedResponse');
396
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
397
+ const headerCb = options.responseHeadersCallback;
398
+ // on next tick, so we have time to handle the response
399
+ setTimeout(() => {
400
+ headerCb(Object.fromEntries(response.headers.entries()));
401
+ }, 0);
402
+ }
403
+ return resp;
372
404
  }
373
405
  /**
374
406
  * Add an ingestion-only API key.
@@ -436,7 +468,15 @@ class ProjectsApi {
436
468
  url = authDefault.url;
437
469
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
438
470
  const response = await fetch(url, requestOptions);
439
- return this.handleResponse(response, 'AddApiKeyResponse');
471
+ const resp = this.handleResponse(response, 'AddApiKeyResponse');
472
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
473
+ const headerCb = options.responseHeadersCallback;
474
+ // on next tick, so we have time to handle the response
475
+ setTimeout(() => {
476
+ headerCb(Object.fromEntries(response.headers.entries()));
477
+ }, 0);
478
+ }
479
+ return resp;
440
480
  }
441
481
  /**
442
482
  * Remove all proposed changes for an AI Actions job.
@@ -504,7 +544,15 @@ class ProjectsApi {
504
544
  url = authDefault.url;
505
545
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
506
546
  const response = await fetch(url, requestOptions);
507
- return this.handleResponse(response, 'GenericApiResponse');
547
+ const resp = this.handleResponse(response, 'GenericApiResponse');
548
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
549
+ const headerCb = options.responseHeadersCallback;
550
+ // on next tick, so we have time to handle the response
551
+ setTimeout(() => {
552
+ headerCb(Object.fromEntries(response.headers.entries()));
553
+ }, 0);
554
+ }
555
+ return resp;
508
556
  }
509
557
  /**
510
558
  * Takes in a Parquet file and spits out the first few thousand lines of a corresponding CSV file. This is a helper function in the CSV wizard UI.
@@ -581,7 +629,15 @@ class ProjectsApi {
581
629
  url = authDefault.url;
582
630
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
583
631
  const response = await fetch(url, requestOptions);
584
- return this.handleResponse(response, 'ConvertParquetToCsvResponse');
632
+ const resp = this.handleResponse(response, 'ConvertParquetToCsvResponse');
633
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
634
+ const headerCb = options.responseHeadersCallback;
635
+ // on next tick, so we have time to handle the response
636
+ setTimeout(() => {
637
+ headerCb(Object.fromEntries(response.headers.entries()));
638
+ }, 0);
639
+ }
640
+ return resp;
585
641
  }
586
642
  /**
587
643
  * Create a new AI Action.
@@ -643,7 +699,15 @@ class ProjectsApi {
643
699
  url = authDefault.url;
644
700
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
645
701
  const response = await fetch(url, requestOptions);
646
- return this.handleResponse(response, 'EntityCreatedResponse');
702
+ const resp = this.handleResponse(response, 'EntityCreatedResponse');
703
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
704
+ const headerCb = options.responseHeadersCallback;
705
+ // on next tick, so we have time to handle the response
706
+ setTimeout(() => {
707
+ headerCb(Object.fromEntries(response.headers.entries()));
708
+ }, 0);
709
+ }
710
+ return resp;
647
711
  }
648
712
  /**
649
713
  * Create a new project. By default this endpoint creates and returns a project API key. When authenticated via OAuth, API key creation and API key return in the response are disabled.
@@ -705,7 +769,15 @@ class ProjectsApi {
705
769
  url = authDefault.url;
706
770
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
707
771
  const response = await fetch(url, requestOptions);
708
- return this.handleResponse(response, 'CreateProjectResponse');
772
+ const resp = this.handleResponse(response, 'CreateProjectResponse');
773
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
774
+ const headerCb = options.responseHeadersCallback;
775
+ // on next tick, so we have time to handle the response
776
+ setTimeout(() => {
777
+ headerCb(Object.fromEntries(response.headers.entries()));
778
+ }, 0);
779
+ }
780
+ return resp;
709
781
  }
710
782
  /**
711
783
  * Deletes an AI Actions.
@@ -773,7 +845,15 @@ class ProjectsApi {
773
845
  url = authDefault.url;
774
846
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
775
847
  const response = await fetch(url, requestOptions);
776
- return this.handleResponse(response, 'GenericApiResponse');
848
+ const resp = this.handleResponse(response, 'GenericApiResponse');
849
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
850
+ const headerCb = options.responseHeadersCallback;
851
+ // on next tick, so we have time to handle the response
852
+ setTimeout(() => {
853
+ headerCb(Object.fromEntries(response.headers.entries()));
854
+ }, 0);
855
+ }
856
+ return resp;
777
857
  }
778
858
  /**
779
859
  * Clear the current CSV wizard config; subsequent CSVs will be uploaded as-is, without additional parsing.
@@ -835,7 +915,93 @@ class ProjectsApi {
835
915
  url = authDefault.url;
836
916
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
837
917
  const response = await fetch(url, requestOptions);
838
- return this.handleResponse(response, 'GenericApiResponse');
918
+ const resp = this.handleResponse(response, 'GenericApiResponse');
919
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
920
+ const headerCb = options.responseHeadersCallback;
921
+ // on next tick, so we have time to handle the response
922
+ setTimeout(() => {
923
+ headerCb(Object.fromEntries(response.headers.entries()));
924
+ }, 0);
925
+ }
926
+ return resp;
927
+ }
928
+ /**
929
+ * Removes extension shared state. This API is only accessible with an API key that is attached to an extensionId.
930
+ * @summary Delete shared state
931
+ * @param projectId Project ID
932
+ * @param key Shared state key (required).
933
+ */
934
+ async deleteExtensionSharedState(projectId, queryParams, options = { headers: {} }) {
935
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/shared-state'
936
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
937
+ let queryParameters = {};
938
+ let localVarHeaderParams = {
939
+ 'User-Agent': 'edgeimpulse-api nodejs',
940
+ 'Content-Type': 'application/json',
941
+ ...this.defaultHeaders,
942
+ };
943
+ const produces = ['application/json'];
944
+ // give precedence to 'application/json'
945
+ if (produces.indexOf('application/json') >= 0) {
946
+ localVarHeaderParams.Accept = 'application/json';
947
+ }
948
+ else {
949
+ localVarHeaderParams.Accept = produces.join(',');
950
+ }
951
+ let localVarFormParams;
952
+ // verify required parameter 'projectId' is not null or undefined
953
+ if (projectId === null || projectId === undefined) {
954
+ throw new Error('Required parameter projectId was null or undefined when calling deleteExtensionSharedState.');
955
+ }
956
+ // verify required parameter 'key' is not null or undefined
957
+ if (queryParams.key === null || queryParams.key === undefined) {
958
+ throw new Error('Required parameter queryParams.key was null or undefined when calling deleteExtensionSharedState.');
959
+ }
960
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== null) {
961
+ queryParameters['key'] = queryParams.key;
962
+ }
963
+ localVarHeaderParams = {
964
+ ...localVarHeaderParams,
965
+ ...options.headers,
966
+ ...this.opts.extraHeaders,
967
+ };
968
+ const queryString = Object.entries(queryParameters)
969
+ .filter(([, value]) => value !== undefined)
970
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
971
+ .join('&');
972
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
973
+ let localVarRequestOptions = {
974
+ method: 'DELETE',
975
+ headers: { ...localVarHeaderParams },
976
+ };
977
+ let requestOptions = localVarRequestOptions;
978
+ let url = localVarUrl;
979
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
980
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
981
+ url = auth_ApiKeyAuthentication.url;
982
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
983
+ requestOptions = auth_JWTAuthentication.requestOptions;
984
+ url = auth_JWTAuthentication.url;
985
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
986
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
987
+ url = auth_JWTHttpHeaderAuthentication.url;
988
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
989
+ requestOptions = auth_OAuth2.requestOptions;
990
+ url = auth_OAuth2.url;
991
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
992
+ requestOptions = authDefault.requestOptions;
993
+ url = authDefault.url;
994
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
995
+ const response = await fetch(url, requestOptions);
996
+ const resp = this.handleResponse(response, 'GenericApiResponse');
997
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
998
+ const headerCb = options.responseHeadersCallback;
999
+ // on next tick, so we have time to handle the response
1000
+ setTimeout(() => {
1001
+ headerCb(Object.fromEntries(response.headers.entries()));
1002
+ }, 0);
1003
+ }
1004
+ return resp;
839
1005
  }
840
1006
  /**
841
1007
  * Remove the current project, and all data associated with it. This is irrevocable!
@@ -897,7 +1063,15 @@ class ProjectsApi {
897
1063
  url = authDefault.url;
898
1064
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
899
1065
  const response = await fetch(url, requestOptions);
900
- return this.handleResponse(response, 'GenericApiResponse');
1066
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1067
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1068
+ const headerCb = options.responseHeadersCallback;
1069
+ // on next tick, so we have time to handle the response
1070
+ setTimeout(() => {
1071
+ headerCb(Object.fromEntries(response.headers.entries()));
1072
+ }, 0);
1073
+ }
1074
+ return resp;
901
1075
  }
902
1076
  /**
903
1077
  * Delete a version. This does not delete the version from cold storage.
@@ -965,7 +1139,15 @@ class ProjectsApi {
965
1139
  url = authDefault.url;
966
1140
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
967
1141
  const response = await fetch(url, requestOptions);
968
- return this.handleResponse(response, 'GenericApiResponse');
1142
+ const resp = this.handleResponse(response, 'GenericApiResponse');
1143
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1144
+ const headerCb = options.responseHeadersCallback;
1145
+ // on next tick, so we have time to handle the response
1146
+ setTimeout(() => {
1147
+ headerCb(Object.fromEntries(response.headers.entries()));
1148
+ }, 0);
1149
+ }
1150
+ return resp;
969
1151
  }
970
1152
  /**
971
1153
  * Returns a JSON file with the current CSV wizard config. If there is no config this will throw a 5xx error.
@@ -1027,7 +1209,15 @@ class ProjectsApi {
1027
1209
  url = authDefault.url;
1028
1210
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1029
1211
  const response = await fetch(url, requestOptions);
1030
- return this.handleResponse(response, 'Buffer');
1212
+ const resp = this.handleResponse(response, 'Buffer');
1213
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1214
+ const headerCb = options.responseHeadersCallback;
1215
+ // on next tick, so we have time to handle the response
1216
+ setTimeout(() => {
1217
+ headerCb(Object.fromEntries(response.headers.entries()));
1218
+ }, 0);
1219
+ }
1220
+ return resp;
1031
1221
  }
1032
1222
  /**
1033
1223
  * Returns the file that was uploaded when the CSV wizard was configured. If there is no config this will throw a 5xx error.
@@ -1089,7 +1279,15 @@ class ProjectsApi {
1089
1279
  url = authDefault.url;
1090
1280
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1091
1281
  const response = await fetch(url, requestOptions);
1092
- 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;
1093
1291
  }
1094
1292
  /**
1095
1293
  * Get an AI Actions config
@@ -1157,7 +1355,15 @@ class ProjectsApi {
1157
1355
  url = authDefault.url;
1158
1356
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1159
1357
  const response = await fetch(url, requestOptions);
1160
- return this.handleResponse(response, 'GetAIActionResponse');
1358
+ const resp = this.handleResponse(response, 'GetAIActionResponse');
1359
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1360
+ const headerCb = options.responseHeadersCallback;
1361
+ // on next tick, so we have time to handle the response
1362
+ setTimeout(() => {
1363
+ headerCb(Object.fromEntries(response.headers.entries()));
1364
+ }, 0);
1365
+ }
1366
+ return resp;
1161
1367
  }
1162
1368
  /**
1163
1369
  * Returns whether the file that was uploaded when the CSV wizard was configured is available.
@@ -1219,7 +1425,15 @@ class ProjectsApi {
1219
1425
  url = authDefault.url;
1220
1426
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1221
1427
  const response = await fetch(url, requestOptions);
1222
- return this.handleResponse(response, 'GetCsvWizardUploadedFileInfo');
1428
+ const resp = this.handleResponse(response, 'GetCsvWizardUploadedFileInfo');
1429
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1430
+ const headerCb = options.responseHeadersCallback;
1431
+ // on next tick, so we have time to handle the response
1432
+ setTimeout(() => {
1433
+ headerCb(Object.fromEntries(response.headers.entries()));
1434
+ }, 0);
1435
+ }
1436
+ return resp;
1223
1437
  }
1224
1438
  /**
1225
1439
  * Only available when authenticating with a project API key. Returns the current role and project ID that you\'re authenticated with.
@@ -1275,10 +1489,242 @@ class ProjectsApi {
1275
1489
  url = authDefault.url;
1276
1490
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1277
1491
  const response = await fetch(url, requestOptions);
1278
- return this.handleResponse(response, 'GetCurrentApiKeyInfoResponse');
1492
+ const resp = this.handleResponse(response, 'GetCurrentApiKeyInfoResponse');
1493
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1494
+ const headerCb = options.responseHeadersCallback;
1495
+ // on next tick, so we have time to handle the response
1496
+ setTimeout(() => {
1497
+ headerCb(Object.fromEntries(response.headers.entries()));
1498
+ }, 0);
1499
+ }
1500
+ return resp;
1279
1501
  }
1280
1502
  /**
1281
- * Retrieve the HMAC development key for a project. This key are specifically marked to be used during development. This key can be `undefined` if no development keys are set.
1503
+ * Retrieves extension shared state. This API is only accessible with an API key that is attached to an extensionId. This also returns an x-version header with the current version of the state. If no state is available, an empty body is returned with x-version: 0.
1504
+ * @summary Get shared state
1505
+ * @param projectId Project ID
1506
+ * @param key Shared state key (required).
1507
+ */
1508
+ async getExtensionSharedState(projectId, queryParams, options = { headers: {} }) {
1509
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/shared-state'
1510
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
1511
+ let queryParameters = {};
1512
+ let localVarHeaderParams = {
1513
+ 'User-Agent': 'edgeimpulse-api nodejs',
1514
+ 'Content-Type': 'application/json',
1515
+ ...this.defaultHeaders,
1516
+ };
1517
+ const produces = ['application/octet-stream'];
1518
+ // give precedence to 'application/json'
1519
+ if (produces.indexOf('application/json') >= 0) {
1520
+ localVarHeaderParams.Accept = 'application/json';
1521
+ }
1522
+ else {
1523
+ localVarHeaderParams.Accept = produces.join(',');
1524
+ }
1525
+ let localVarFormParams;
1526
+ // verify required parameter 'projectId' is not null or undefined
1527
+ if (projectId === null || projectId === undefined) {
1528
+ throw new Error('Required parameter projectId was null or undefined when calling getExtensionSharedState.');
1529
+ }
1530
+ // verify required parameter 'key' is not null or undefined
1531
+ if (queryParams.key === null || queryParams.key === undefined) {
1532
+ throw new Error('Required parameter queryParams.key was null or undefined when calling getExtensionSharedState.');
1533
+ }
1534
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== null) {
1535
+ queryParameters['key'] = queryParams.key;
1536
+ }
1537
+ localVarHeaderParams = {
1538
+ ...localVarHeaderParams,
1539
+ ...options.headers,
1540
+ ...this.opts.extraHeaders,
1541
+ };
1542
+ const queryString = Object.entries(queryParameters)
1543
+ .filter(([, value]) => value !== undefined)
1544
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
1545
+ .join('&');
1546
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
1547
+ let localVarRequestOptions = {
1548
+ method: 'GET',
1549
+ headers: { ...localVarHeaderParams },
1550
+ };
1551
+ let requestOptions = localVarRequestOptions;
1552
+ let url = localVarUrl;
1553
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
1554
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
1555
+ url = auth_ApiKeyAuthentication.url;
1556
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
1557
+ requestOptions = auth_JWTAuthentication.requestOptions;
1558
+ url = auth_JWTAuthentication.url;
1559
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
1560
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
1561
+ url = auth_JWTHttpHeaderAuthentication.url;
1562
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
1563
+ requestOptions = auth_OAuth2.requestOptions;
1564
+ url = auth_OAuth2.url;
1565
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
1566
+ requestOptions = authDefault.requestOptions;
1567
+ url = authDefault.url;
1568
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1569
+ const response = await fetch(url, requestOptions);
1570
+ const resp = this.handleResponse(response, 'Buffer');
1571
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1572
+ const headerCb = options.responseHeadersCallback;
1573
+ // on next tick, so we have time to handle the response
1574
+ setTimeout(() => {
1575
+ headerCb(Object.fromEntries(response.headers.entries()));
1576
+ }, 0);
1577
+ }
1578
+ return resp;
1579
+ }
1580
+ /**
1581
+ * Retrieve list of shared state keys and their latest version. This API is only accessible with an API key that is attached to an extensionId.
1582
+ * @summary List shared state keys
1583
+ * @param projectId Project ID
1584
+ */
1585
+ async getExtensionSharedStateList(projectId, options = { headers: {} }) {
1586
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/shared-state/list'
1587
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
1588
+ let queryParameters = {};
1589
+ let localVarHeaderParams = {
1590
+ 'User-Agent': 'edgeimpulse-api nodejs',
1591
+ 'Content-Type': 'application/json',
1592
+ ...this.defaultHeaders,
1593
+ };
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 'projectId' is not null or undefined
1604
+ if (projectId === null || projectId === undefined) {
1605
+ throw new Error('Required parameter projectId was null or undefined when calling getExtensionSharedStateList.');
1606
+ }
1607
+ localVarHeaderParams = {
1608
+ ...localVarHeaderParams,
1609
+ ...options.headers,
1610
+ ...this.opts.extraHeaders,
1611
+ };
1612
+ const queryString = Object.entries(queryParameters)
1613
+ .filter(([, value]) => value !== undefined)
1614
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
1615
+ .join('&');
1616
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
1617
+ let localVarRequestOptions = {
1618
+ method: 'GET',
1619
+ headers: { ...localVarHeaderParams },
1620
+ };
1621
+ let requestOptions = localVarRequestOptions;
1622
+ let url = localVarUrl;
1623
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
1624
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
1625
+ url = auth_ApiKeyAuthentication.url;
1626
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
1627
+ requestOptions = auth_JWTAuthentication.requestOptions;
1628
+ url = auth_JWTAuthentication.url;
1629
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
1630
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
1631
+ url = auth_JWTHttpHeaderAuthentication.url;
1632
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
1633
+ requestOptions = auth_OAuth2.requestOptions;
1634
+ url = auth_OAuth2.url;
1635
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
1636
+ requestOptions = authDefault.requestOptions;
1637
+ url = authDefault.url;
1638
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1639
+ const response = await fetch(url, requestOptions);
1640
+ const resp = this.handleResponse(response, 'GetExtensionSharedStateListResponse');
1641
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1642
+ const headerCb = options.responseHeadersCallback;
1643
+ // on next tick, so we have time to handle the response
1644
+ setTimeout(() => {
1645
+ headerCb(Object.fromEntries(response.headers.entries()));
1646
+ }, 0);
1647
+ }
1648
+ return resp;
1649
+ }
1650
+ /**
1651
+ * Retrieve list of shared state keys and their latest version.
1652
+ * @summary List shared state keys for extension
1653
+ * @param projectId Project ID
1654
+ * @param extensionId Extension ID
1655
+ */
1656
+ async getExtensionSharedStateListForExtension(projectId, extensionId, options = { headers: {} }) {
1657
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/{extensionId}/shared-state/list'
1658
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
1659
+ .replace('{' + 'extensionId' + '}', encodeURIComponent(String(extensionId)));
1660
+ let queryParameters = {};
1661
+ let localVarHeaderParams = {
1662
+ 'User-Agent': 'edgeimpulse-api nodejs',
1663
+ 'Content-Type': 'application/json',
1664
+ ...this.defaultHeaders,
1665
+ };
1666
+ const produces = ['application/json'];
1667
+ // give precedence to 'application/json'
1668
+ if (produces.indexOf('application/json') >= 0) {
1669
+ localVarHeaderParams.Accept = 'application/json';
1670
+ }
1671
+ else {
1672
+ localVarHeaderParams.Accept = produces.join(',');
1673
+ }
1674
+ let localVarFormParams;
1675
+ // verify required parameter 'projectId' is not null or undefined
1676
+ if (projectId === null || projectId === undefined) {
1677
+ throw new Error('Required parameter projectId was null or undefined when calling getExtensionSharedStateListForExtension.');
1678
+ }
1679
+ // verify required parameter 'extensionId' is not null or undefined
1680
+ if (extensionId === null || extensionId === undefined) {
1681
+ throw new Error('Required parameter extensionId was null or undefined when calling getExtensionSharedStateListForExtension.');
1682
+ }
1683
+ localVarHeaderParams = {
1684
+ ...localVarHeaderParams,
1685
+ ...options.headers,
1686
+ ...this.opts.extraHeaders,
1687
+ };
1688
+ const queryString = Object.entries(queryParameters)
1689
+ .filter(([, value]) => value !== undefined)
1690
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
1691
+ .join('&');
1692
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
1693
+ let localVarRequestOptions = {
1694
+ method: 'GET',
1695
+ headers: { ...localVarHeaderParams },
1696
+ };
1697
+ let requestOptions = localVarRequestOptions;
1698
+ let url = localVarUrl;
1699
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
1700
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
1701
+ url = auth_ApiKeyAuthentication.url;
1702
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
1703
+ requestOptions = auth_JWTAuthentication.requestOptions;
1704
+ url = auth_JWTAuthentication.url;
1705
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
1706
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
1707
+ url = auth_JWTHttpHeaderAuthentication.url;
1708
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
1709
+ requestOptions = auth_OAuth2.requestOptions;
1710
+ url = auth_OAuth2.url;
1711
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
1712
+ requestOptions = authDefault.requestOptions;
1713
+ url = authDefault.url;
1714
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1715
+ const response = await fetch(url, requestOptions);
1716
+ const resp = this.handleResponse(response, 'GetExtensionSharedStateListResponse');
1717
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1718
+ const headerCb = options.responseHeadersCallback;
1719
+ // on next tick, so we have time to handle the response
1720
+ setTimeout(() => {
1721
+ headerCb(Object.fromEntries(response.headers.entries()));
1722
+ }, 0);
1723
+ }
1724
+ return resp;
1725
+ }
1726
+ /**
1727
+ * Retrieve the HMAC development key for a project. This key is specifically marked to be used during development. This key can be `undefined` if no development keys are set.
1282
1728
  * @summary Get HMAC development key
1283
1729
  * @param projectId Project ID
1284
1730
  */
@@ -1337,7 +1783,15 @@ class ProjectsApi {
1337
1783
  url = authDefault.url;
1338
1784
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1339
1785
  const response = await fetch(url, requestOptions);
1340
- return this.handleResponse(response, 'GetHmacDevkeyResponse');
1786
+ const resp = this.handleResponse(response, 'GetHmacDevkeyResponse');
1787
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1788
+ const headerCb = options.responseHeadersCallback;
1789
+ // on next tick, so we have time to handle the response
1790
+ setTimeout(() => {
1791
+ headerCb(Object.fromEntries(response.headers.entries()));
1792
+ }, 0);
1793
+ }
1794
+ return resp;
1341
1795
  }
1342
1796
  /**
1343
1797
  * Get a list of model variants applicable to all trained learn blocks in this project.
@@ -1403,7 +1857,15 @@ class ProjectsApi {
1403
1857
  url = authDefault.url;
1404
1858
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1405
1859
  const response = await fetch(url, requestOptions);
1406
- return this.handleResponse(response, 'GetModelVariantsResponse');
1860
+ const resp = this.handleResponse(response, 'GetModelVariantsResponse');
1861
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1862
+ const headerCb = options.responseHeadersCallback;
1863
+ // on next tick, so we have time to handle the response
1864
+ setTimeout(() => {
1865
+ headerCb(Object.fromEntries(response.headers.entries()));
1866
+ }, 0);
1867
+ }
1868
+ return resp;
1407
1869
  }
1408
1870
  /**
1409
1871
  * Get the AI Actions config for a new action
@@ -1465,7 +1927,15 @@ class ProjectsApi {
1465
1927
  url = authDefault.url;
1466
1928
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1467
1929
  const response = await fetch(url, requestOptions);
1468
- return this.handleResponse(response, 'GetAIActionResponse');
1930
+ const resp = this.handleResponse(response, 'GetAIActionResponse');
1931
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
1932
+ const headerCb = options.responseHeadersCallback;
1933
+ // on next tick, so we have time to handle the response
1934
+ setTimeout(() => {
1935
+ headerCb(Object.fromEntries(response.headers.entries()));
1936
+ }, 0);
1937
+ }
1938
+ return resp;
1469
1939
  }
1470
1940
  /**
1471
1941
  * Lists all extensions that are active for this project.
@@ -1527,7 +1997,15 @@ class ProjectsApi {
1527
1997
  url = authDefault.url;
1528
1998
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1529
1999
  const response = await fetch(url, requestOptions);
1530
- return this.handleResponse(response, 'GetProjectActiveExtensionsResponse');
2000
+ const resp = this.handleResponse(response, 'GetProjectActiveExtensionsResponse');
2001
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2002
+ const headerCb = options.responseHeadersCallback;
2003
+ // on next tick, so we have time to handle the response
2004
+ setTimeout(() => {
2005
+ headerCb(Object.fromEntries(response.headers.entries()));
2006
+ }, 0);
2007
+ }
2008
+ return resp;
1531
2009
  }
1532
2010
  /**
1533
2011
  * Get a list of axes that are present in the training data.
@@ -1597,7 +2075,15 @@ class ProjectsApi {
1597
2075
  url = authDefault.url;
1598
2076
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1599
2077
  const response = await fetch(url, requestOptions);
1600
- return this.handleResponse(response, 'ProjectDataAxesSummaryResponse');
2078
+ const resp = this.handleResponse(response, 'ProjectDataAxesSummaryResponse');
2079
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2080
+ const headerCb = options.responseHeadersCallback;
2081
+ // on next tick, so we have time to handle the response
2082
+ setTimeout(() => {
2083
+ headerCb(Object.fromEntries(response.headers.entries()));
2084
+ }, 0);
2085
+ }
2086
+ return resp;
1601
2087
  }
1602
2088
  /**
1603
2089
  * List all information about this project.
@@ -1663,7 +2149,15 @@ class ProjectsApi {
1663
2149
  url = authDefault.url;
1664
2150
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1665
2151
  const response = await fetch(url, requestOptions);
1666
- return this.handleResponse(response, 'ProjectInfoResponse');
2152
+ const resp = this.handleResponse(response, 'ProjectInfoResponse');
2153
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2154
+ const headerCb = options.responseHeadersCallback;
2155
+ // on next tick, so we have time to handle the response
2156
+ setTimeout(() => {
2157
+ headerCb(Object.fromEntries(response.headers.entries()));
2158
+ }, 0);
2159
+ }
2160
+ return resp;
1667
2161
  }
1668
2162
  /**
1669
2163
  * List a summary about this project - available for public projects.
@@ -1725,7 +2219,15 @@ class ProjectsApi {
1725
2219
  url = authDefault.url;
1726
2220
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1727
2221
  const response = await fetch(url, requestOptions);
1728
- return this.handleResponse(response, 'ProjectInfoSummaryResponse');
2222
+ const resp = this.handleResponse(response, 'ProjectInfoSummaryResponse');
2223
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2224
+ const headerCb = options.responseHeadersCallback;
2225
+ // on next tick, so we have time to handle the response
2226
+ setTimeout(() => {
2227
+ headerCb(Object.fromEntries(response.headers.entries()));
2228
+ }, 0);
2229
+ }
2230
+ return resp;
1729
2231
  }
1730
2232
  /**
1731
2233
  * Get the last modification date for a project (will be upped when data is modified, or when an impulse is trained)
@@ -1787,7 +2289,15 @@ class ProjectsApi {
1787
2289
  url = authDefault.url;
1788
2290
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1789
2291
  const response = await fetch(url, requestOptions);
1790
- return this.handleResponse(response, 'LastModificationDateResponse');
2292
+ const resp = this.handleResponse(response, 'LastModificationDateResponse');
2293
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2294
+ const headerCb = options.responseHeadersCallback;
2295
+ // on next tick, so we have time to handle the response
2296
+ setTimeout(() => {
2297
+ headerCb(Object.fromEntries(response.headers.entries()));
2298
+ }, 0);
2299
+ }
2300
+ return resp;
1791
2301
  }
1792
2302
  /**
1793
2303
  * Get the interval of the training data; if multiple intervals are present, the interval of the longest data item is returned. This only takes data in your _training_ set into account.
@@ -1849,7 +2359,15 @@ class ProjectsApi {
1849
2359
  url = authDefault.url;
1850
2360
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1851
2361
  const response = await fetch(url, requestOptions);
1852
- return this.handleResponse(response, 'ProjectDataIntervalResponse');
2362
+ const resp = this.handleResponse(response, 'ProjectDataIntervalResponse');
2363
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2364
+ const headerCb = options.responseHeadersCallback;
2365
+ // on next tick, so we have time to handle the response
2366
+ setTimeout(() => {
2367
+ headerCb(Object.fromEntries(response.headers.entries()));
2368
+ }, 0);
2369
+ }
2370
+ return resp;
1853
2371
  }
1854
2372
  /**
1855
2373
  * Get summary of all data present in the training set. This returns the number of data items, the total length of all data, and the labels. This is similar to `dataSummary` in `ProjectInfoResponse` but allows you to exclude disabled items or items that are still processing.
@@ -1919,7 +2437,15 @@ class ProjectsApi {
1919
2437
  url = authDefault.url;
1920
2438
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1921
2439
  const response = await fetch(url, requestOptions);
1922
- return this.handleResponse(response, 'ProjectTrainingDataSummaryResponse');
2440
+ const resp = this.handleResponse(response, 'ProjectTrainingDataSummaryResponse');
2441
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2442
+ const headerCb = options.responseHeadersCallback;
2443
+ // on next tick, so we have time to handle the response
2444
+ setTimeout(() => {
2445
+ headerCb(Object.fromEntries(response.headers.entries()));
2446
+ }, 0);
2447
+ }
2448
+ return resp;
1923
2449
  }
1924
2450
  /**
1925
2451
  * Get a token to authenticate with the web socket interface.
@@ -1981,7 +2507,15 @@ class ProjectsApi {
1981
2507
  url = authDefault.url;
1982
2508
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1983
2509
  const response = await fetch(url, requestOptions);
1984
- return this.handleResponse(response, 'SocketTokenResponse');
2510
+ const resp = this.handleResponse(response, 'SocketTokenResponse');
2511
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2512
+ const headerCb = options.responseHeadersCallback;
2513
+ // on next tick, so we have time to handle the response
2514
+ setTimeout(() => {
2515
+ headerCb(Object.fromEntries(response.headers.entries()));
2516
+ }, 0);
2517
+ }
2518
+ return resp;
1985
2519
  }
1986
2520
  /**
1987
2521
  * Get the last used synthetic data config
@@ -2043,7 +2577,15 @@ class ProjectsApi {
2043
2577
  url = authDefault.url;
2044
2578
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2045
2579
  const response = await fetch(url, requestOptions);
2046
- return this.handleResponse(response, 'GetSyntheticDataConfigResponse');
2580
+ const resp = this.handleResponse(response, 'GetSyntheticDataConfigResponse');
2581
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2582
+ const headerCb = options.responseHeadersCallback;
2583
+ // on next tick, so we have time to handle the response
2584
+ setTimeout(() => {
2585
+ headerCb(Object.fromEntries(response.headers.entries()));
2586
+ }, 0);
2587
+ }
2588
+ return resp;
2047
2589
  }
2048
2590
  /**
2049
2591
  * Retrieve target constraints for a project. The constraints object captures hardware attributes of your target device, along with an application budget to allow guidance on performance and resource usage
@@ -2105,7 +2647,15 @@ class ProjectsApi {
2105
2647
  url = authDefault.url;
2106
2648
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2107
2649
  const response = await fetch(url, requestOptions);
2108
- return this.handleResponse(response, 'GetTargetConstraintsResponse');
2650
+ const resp = this.handleResponse(response, 'GetTargetConstraintsResponse');
2651
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2652
+ const headerCb = options.responseHeadersCallback;
2653
+ // on next tick, so we have time to handle the response
2654
+ setTimeout(() => {
2655
+ headerCb(Object.fromEntries(response.headers.entries()));
2656
+ }, 0);
2657
+ }
2658
+ return resp;
2109
2659
  }
2110
2660
  /**
2111
2661
  * This clears out *all data in your project*, and is irrevocable. This function is only available through a JWT token, and is not available to all users.
@@ -2167,7 +2717,15 @@ class ProjectsApi {
2167
2717
  url = authDefault.url;
2168
2718
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2169
2719
  const response = await fetch(url, requestOptions);
2170
- return this.handleResponse(response, 'GenericApiResponse');
2720
+ const resp = this.handleResponse(response, 'GenericApiResponse');
2721
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2722
+ const headerCb = options.responseHeadersCallback;
2723
+ // on next tick, so we have time to handle the response
2724
+ setTimeout(() => {
2725
+ headerCb(Object.fromEntries(response.headers.entries()));
2726
+ }, 0);
2727
+ }
2728
+ return resp;
2171
2729
  }
2172
2730
  /**
2173
2731
  * Get all AI actions.
@@ -2229,7 +2787,15 @@ class ProjectsApi {
2229
2787
  url = authDefault.url;
2230
2788
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2231
2789
  const response = await fetch(url, requestOptions);
2232
- return this.handleResponse(response, 'ListAIActionsResponse');
2790
+ const resp = this.handleResponse(response, 'ListAIActionsResponse');
2791
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2792
+ const headerCb = options.responseHeadersCallback;
2793
+ // on next tick, so we have time to handle the response
2794
+ setTimeout(() => {
2795
+ headerCb(Object.fromEntries(response.headers.entries()));
2796
+ }, 0);
2797
+ }
2798
+ return resp;
2233
2799
  }
2234
2800
  /**
2235
2801
  * List all development boards for a project
@@ -2291,7 +2857,15 @@ class ProjectsApi {
2291
2857
  url = authDefault.url;
2292
2858
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2293
2859
  const response = await fetch(url, requestOptions);
2294
- return this.handleResponse(response, 'DevelopmentBoardsResponse');
2860
+ const resp = this.handleResponse(response, 'DevelopmentBoardsResponse');
2861
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2862
+ const headerCb = options.responseHeadersCallback;
2863
+ // on next tick, so we have time to handle the response
2864
+ setTimeout(() => {
2865
+ headerCb(Object.fromEntries(response.headers.entries()));
2866
+ }, 0);
2867
+ }
2868
+ return resp;
2295
2869
  }
2296
2870
  /**
2297
2871
  * Retrieve the development API and HMAC keys for a project. These keys are specifically marked to be used during development. These keys can be `undefined` if no development keys are set. Only available through JWT token authentication, if you authenticate with an API key then all keys will return undefined (this is changed behavior since 28 January 2026).
@@ -2353,7 +2927,15 @@ class ProjectsApi {
2353
2927
  url = authDefault.url;
2354
2928
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2355
2929
  const response = await fetch(url, requestOptions);
2356
- return this.handleResponse(response, 'DevelopmentKeysResponse');
2930
+ const resp = this.handleResponse(response, 'DevelopmentKeysResponse');
2931
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
2932
+ const headerCb = options.responseHeadersCallback;
2933
+ // on next tick, so we have time to handle the response
2934
+ setTimeout(() => {
2935
+ headerCb(Object.fromEntries(response.headers.entries()));
2936
+ }, 0);
2937
+ }
2938
+ return resp;
2357
2939
  }
2358
2940
  /**
2359
2941
  * Retrieve the downloads for a project.
@@ -2419,7 +3001,15 @@ class ProjectsApi {
2419
3001
  url = authDefault.url;
2420
3002
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2421
3003
  const response = await fetch(url, requestOptions);
2422
- return this.handleResponse(response, 'ProjectDownloadsResponse');
3004
+ const resp = this.handleResponse(response, 'ProjectDownloadsResponse');
3005
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3006
+ const headerCb = options.responseHeadersCallback;
3007
+ // on next tick, so we have time to handle the response
3008
+ setTimeout(() => {
3009
+ headerCb(Object.fromEntries(response.headers.entries()));
3010
+ }, 0);
3011
+ }
3012
+ return resp;
2423
3013
  }
2424
3014
  /**
2425
3015
  * Get a list of all emails sent by Edge Impulse regarding this project.
@@ -2481,7 +3071,15 @@ class ProjectsApi {
2481
3071
  url = authDefault.url;
2482
3072
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2483
3073
  const response = await fetch(url, requestOptions);
2484
- return this.handleResponse(response, 'ListEmailResponse');
3074
+ const resp = this.handleResponse(response, 'ListEmailResponse');
3075
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3076
+ const headerCb = options.responseHeadersCallback;
3077
+ // on next tick, so we have time to handle the response
3078
+ setTimeout(() => {
3079
+ headerCb(Object.fromEntries(response.headers.entries()));
3080
+ }, 0);
3081
+ }
3082
+ return resp;
2485
3083
  }
2486
3084
  /**
2487
3085
  * Retrieve all API keys. This does **not** return the full API key, but only a portion (for security purposes). The development key will be returned in full, as it\'ll be set in devices and is thus not private.
@@ -2543,7 +3141,15 @@ class ProjectsApi {
2543
3141
  url = authDefault.url;
2544
3142
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2545
3143
  const response = await fetch(url, requestOptions);
2546
- return this.handleResponse(response, 'ListApiKeysResponse');
3144
+ const resp = this.handleResponse(response, 'ListApiKeysResponse');
3145
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3146
+ const headerCb = options.responseHeadersCallback;
3147
+ // on next tick, so we have time to handle the response
3148
+ setTimeout(() => {
3149
+ headerCb(Object.fromEntries(response.headers.entries()));
3150
+ }, 0);
3151
+ }
3152
+ return resp;
2547
3153
  }
2548
3154
  /**
2549
3155
  * Lists all available extensions that can be added to this project.
@@ -2605,7 +3211,15 @@ class ProjectsApi {
2605
3211
  url = authDefault.url;
2606
3212
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2607
3213
  const response = await fetch(url, requestOptions);
2608
- return this.handleResponse(response, 'ListProjectAvailableExtensionsResponse');
3214
+ const resp = this.handleResponse(response, 'ListProjectAvailableExtensionsResponse');
3215
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3216
+ const headerCb = options.responseHeadersCallback;
3217
+ // on next tick, so we have time to handle the response
3218
+ setTimeout(() => {
3219
+ headerCb(Object.fromEntries(response.headers.entries()));
3220
+ }, 0);
3221
+ }
3222
+ return resp;
2609
3223
  }
2610
3224
  /**
2611
3225
  * Retrieve all HMAC keys.
@@ -2667,7 +3281,15 @@ class ProjectsApi {
2667
3281
  url = authDefault.url;
2668
3282
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2669
3283
  const response = await fetch(url, requestOptions);
2670
- return this.handleResponse(response, 'ListHmacKeysResponse');
3284
+ const resp = this.handleResponse(response, 'ListHmacKeysResponse');
3285
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3286
+ const headerCb = options.responseHeadersCallback;
3287
+ // on next tick, so we have time to handle the response
3288
+ setTimeout(() => {
3289
+ headerCb(Object.fromEntries(response.headers.entries()));
3290
+ }, 0);
3291
+ }
3292
+ return resp;
2671
3293
  }
2672
3294
  /**
2673
3295
  * Retrieve list of active projects. If authenticating using JWT token this lists all the projects the user has access to, if authenticating using an API key, this only lists that project.
@@ -2723,7 +3345,15 @@ class ProjectsApi {
2723
3345
  url = authDefault.url;
2724
3346
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2725
3347
  const response = await fetch(url, requestOptions);
2726
- return this.handleResponse(response, 'ListProjectsResponse');
3348
+ const resp = this.handleResponse(response, 'ListProjectsResponse');
3349
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3350
+ const headerCb = options.responseHeadersCallback;
3351
+ // on next tick, so we have time to handle the response
3352
+ setTimeout(() => {
3353
+ headerCb(Object.fromEntries(response.headers.entries()));
3354
+ }, 0);
3355
+ }
3356
+ return resp;
2727
3357
  }
2728
3358
  /**
2729
3359
  * Retrieve the list of available public project types. You don\'t need any authentication for this method.
@@ -2767,7 +3397,15 @@ class ProjectsApi {
2767
3397
  url = authDefault.url;
2768
3398
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2769
3399
  const response = await fetch(url, requestOptions);
2770
- return this.handleResponse(response, 'ListPublicProjectTypesResponse');
3400
+ const resp = this.handleResponse(response, 'ListPublicProjectTypesResponse');
3401
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3402
+ const headerCb = options.responseHeadersCallback;
3403
+ // on next tick, so we have time to handle the response
3404
+ setTimeout(() => {
3405
+ headerCb(Object.fromEntries(response.headers.entries()));
3406
+ }, 0);
3407
+ }
3408
+ return resp;
2771
3409
  }
2772
3410
  /**
2773
3411
  * Retrieve the list of all public projects. You don\'t need any authentication for this method.
@@ -2831,7 +3469,15 @@ class ProjectsApi {
2831
3469
  url = authDefault.url;
2832
3470
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2833
3471
  const response = await fetch(url, requestOptions);
2834
- return this.handleResponse(response, 'ListPublicProjectsResponse');
3472
+ const resp = this.handleResponse(response, 'ListPublicProjectsResponse');
3473
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3474
+ const headerCb = options.responseHeadersCallback;
3475
+ // on next tick, so we have time to handle the response
3476
+ setTimeout(() => {
3477
+ headerCb(Object.fromEntries(response.headers.entries()));
3478
+ }, 0);
3479
+ }
3480
+ return resp;
2835
3481
  }
2836
3482
  /**
2837
3483
  * Get all public versions for this project. You don\'t need any authentication for this function.
@@ -2881,7 +3527,15 @@ class ProjectsApi {
2881
3527
  url = authDefault.url;
2882
3528
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2883
3529
  const response = await fetch(url, requestOptions);
2884
- return this.handleResponse(response, 'ListPublicVersionsResponse');
3530
+ const resp = this.handleResponse(response, 'ListPublicVersionsResponse');
3531
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3532
+ const headerCb = options.responseHeadersCallback;
3533
+ // on next tick, so we have time to handle the response
3534
+ setTimeout(() => {
3535
+ headerCb(Object.fromEntries(response.headers.entries()));
3536
+ }, 0);
3537
+ }
3538
+ return resp;
2885
3539
  }
2886
3540
  /**
2887
3541
  * Get all versions for this project.
@@ -2943,7 +3597,15 @@ class ProjectsApi {
2943
3597
  url = authDefault.url;
2944
3598
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2945
3599
  const response = await fetch(url, requestOptions);
2946
- return this.handleResponse(response, 'ListVersionsResponse');
3600
+ const resp = this.handleResponse(response, 'ListVersionsResponse');
3601
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3602
+ const headerCb = options.responseHeadersCallback;
3603
+ // on next tick, so we have time to handle the response
3604
+ setTimeout(() => {
3605
+ headerCb(Object.fromEntries(response.headers.entries()));
3606
+ }, 0);
3607
+ }
3608
+ return resp;
2947
3609
  }
2948
3610
  /**
2949
3611
  * Make a public version private.
@@ -3011,7 +3673,15 @@ class ProjectsApi {
3011
3673
  url = authDefault.url;
3012
3674
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3013
3675
  const response = await fetch(url, requestOptions);
3014
- return this.handleResponse(response, 'GenericApiResponse');
3676
+ const resp = this.handleResponse(response, 'GenericApiResponse');
3677
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3678
+ const headerCb = options.responseHeadersCallback;
3679
+ // on next tick, so we have time to handle the response
3680
+ setTimeout(() => {
3681
+ headerCb(Object.fromEntries(response.headers.entries()));
3682
+ }, 0);
3683
+ }
3684
+ return resp;
3015
3685
  }
3016
3686
  /**
3017
3687
  * Get a number of random samples to show in the AI Actions screen. If `saveConfig` is passed in, then a valid actionId is required in the URL. If you don\'t need to save the config (e.g. when creating a new action), you can use -1.
@@ -3085,7 +3755,15 @@ class ProjectsApi {
3085
3755
  url = authDefault.url;
3086
3756
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3087
3757
  const response = await fetch(url, requestOptions);
3088
- return this.handleResponse(response, 'ListSamplesResponse');
3758
+ const resp = this.handleResponse(response, 'ListSamplesResponse');
3759
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3760
+ const headerCb = options.responseHeadersCallback;
3761
+ // on next tick, so we have time to handle the response
3762
+ setTimeout(() => {
3763
+ headerCb(Object.fromEntries(response.headers.entries()));
3764
+ }, 0);
3765
+ }
3766
+ return resp;
3089
3767
  }
3090
3768
  /**
3091
3769
  * Dismiss a notification
@@ -3153,7 +3831,15 @@ class ProjectsApi {
3153
3831
  url = authDefault.url;
3154
3832
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3155
3833
  const response = await fetch(url, requestOptions);
3156
- return this.handleResponse(response, 'GenericApiResponse');
3834
+ const resp = this.handleResponse(response, 'GenericApiResponse');
3835
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3836
+ const headerCb = options.responseHeadersCallback;
3837
+ // on next tick, so we have time to handle the response
3838
+ setTimeout(() => {
3839
+ headerCb(Object.fromEntries(response.headers.entries()));
3840
+ }, 0);
3841
+ }
3842
+ return resp;
3157
3843
  }
3158
3844
  /**
3159
3845
  * Remove a collaborator to a project. Note that you cannot invoke this function if only a single collaborator is present.
@@ -3221,7 +3907,15 @@ class ProjectsApi {
3221
3907
  url = authDefault.url;
3222
3908
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3223
3909
  const response = await fetch(url, requestOptions);
3224
- return this.handleResponse(response, 'GenericApiResponse');
3910
+ const resp = this.handleResponse(response, 'GenericApiResponse');
3911
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3912
+ const headerCb = options.responseHeadersCallback;
3913
+ // on next tick, so we have time to handle the response
3914
+ setTimeout(() => {
3915
+ headerCb(Object.fromEntries(response.headers.entries()));
3916
+ }, 0);
3917
+ }
3918
+ return resp;
3225
3919
  }
3226
3920
  /**
3227
3921
  * Removes an existing extension from a project.
@@ -3289,7 +3983,15 @@ class ProjectsApi {
3289
3983
  url = authDefault.url;
3290
3984
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3291
3985
  const response = await fetch(url, requestOptions);
3292
- return this.handleResponse(response, 'RemoveProjectActiveExtensionResponse');
3986
+ const resp = this.handleResponse(response, 'RemoveProjectActiveExtensionResponse');
3987
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
3988
+ const headerCb = options.responseHeadersCallback;
3989
+ // on next tick, so we have time to handle the response
3990
+ setTimeout(() => {
3991
+ headerCb(Object.fromEntries(response.headers.entries()));
3992
+ }, 0);
3993
+ }
3994
+ return resp;
3293
3995
  }
3294
3996
  /**
3295
3997
  * Revoke an API key. Note that if you revoke the development API key some services (such as automatic provisioning of devices through the serial daemon) will no longer work.
@@ -3357,7 +4059,15 @@ class ProjectsApi {
3357
4059
  url = authDefault.url;
3358
4060
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3359
4061
  const response = await fetch(url, requestOptions);
3360
- return this.handleResponse(response, 'GenericApiResponse');
4062
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4063
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4064
+ const headerCb = options.responseHeadersCallback;
4065
+ // on next tick, so we have time to handle the response
4066
+ setTimeout(() => {
4067
+ headerCb(Object.fromEntries(response.headers.entries()));
4068
+ }, 0);
4069
+ }
4070
+ return resp;
3361
4071
  }
3362
4072
  /**
3363
4073
  * Revoke an HMAC key. Note that if you revoke the development key some services (such as automatic provisioning of devices through the serial daemon) will no longer work.
@@ -3425,7 +4135,15 @@ class ProjectsApi {
3425
4135
  url = authDefault.url;
3426
4136
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3427
4137
  const response = await fetch(url, requestOptions);
3428
- return this.handleResponse(response, 'GenericApiResponse');
4138
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4139
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4140
+ const headerCb = options.responseHeadersCallback;
4141
+ // on next tick, so we have time to handle the response
4142
+ setTimeout(() => {
4143
+ headerCb(Object.fromEntries(response.headers.entries()));
4144
+ }, 0);
4145
+ }
4146
+ return resp;
3429
4147
  }
3430
4148
  /**
3431
4149
  * Revoke an ingestion-only API key. If the ID belongs to a key with a different role, this endpoint returns an error payload (`success: false`).
@@ -3493,7 +4211,15 @@ class ProjectsApi {
3493
4211
  url = authDefault.url;
3494
4212
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3495
4213
  const response = await fetch(url, requestOptions);
3496
- return this.handleResponse(response, 'GenericApiResponse');
4214
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4215
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4216
+ const headerCb = options.responseHeadersCallback;
4217
+ // on next tick, so we have time to handle the response
4218
+ setTimeout(() => {
4219
+ headerCb(Object.fromEntries(response.headers.entries()));
4220
+ }, 0);
4221
+ }
4222
+ return resp;
3497
4223
  }
3498
4224
  /**
3499
4225
  * Change the order of AI actions. Post the new order of all AI Actions by ID. You need to specify _all_ AI Actions here. If not, an error will be thrown.
@@ -3561,7 +4287,118 @@ class ProjectsApi {
3561
4287
  url = authDefault.url;
3562
4288
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3563
4289
  const response = await fetch(url, requestOptions);
3564
- return this.handleResponse(response, 'GenericApiResponse');
4290
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4291
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4292
+ const headerCb = options.responseHeadersCallback;
4293
+ // on next tick, so we have time to handle the response
4294
+ setTimeout(() => {
4295
+ headerCb(Object.fromEntries(response.headers.entries()));
4296
+ }, 0);
4297
+ }
4298
+ return resp;
4299
+ }
4300
+ /**
4301
+ * Stores extension shared state. This API is only accessible with an API key that is attached to an extensionId. State has a limit of 100MB per key.
4302
+ * @summary Set shared state
4303
+ * @param projectId Project ID
4304
+ * @param key Shared state key (required).
4305
+ * @param currentVersion
4306
+ * @param state
4307
+ */
4308
+ async setExtensionSharedState(projectId, params, queryParams, options = { headers: {} }) {
4309
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/shared-state'
4310
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
4311
+ let queryParameters = {};
4312
+ let localVarHeaderParams = {
4313
+ 'User-Agent': 'edgeimpulse-api nodejs',
4314
+ 'Content-Type': 'application/json',
4315
+ ...this.defaultHeaders,
4316
+ };
4317
+ const produces = ['application/json'];
4318
+ // give precedence to 'application/json'
4319
+ if (produces.indexOf('application/json') >= 0) {
4320
+ localVarHeaderParams.Accept = 'application/json';
4321
+ }
4322
+ else {
4323
+ localVarHeaderParams.Accept = produces.join(',');
4324
+ }
4325
+ let localVarFormParams;
4326
+ // verify required parameter 'projectId' is not null or undefined
4327
+ if (projectId === null || projectId === undefined) {
4328
+ throw new Error('Required parameter projectId was null or undefined when calling setExtensionSharedState.');
4329
+ }
4330
+ // verify required parameter 'key' is not null or undefined
4331
+ if (queryParams.key === null || queryParams.key === undefined) {
4332
+ throw new Error('Required parameter queryParams.key was null or undefined when calling setExtensionSharedState.');
4333
+ }
4334
+ // verify required parameter 'currentVersion' is not null or undefined
4335
+ if (params.currentVersion === null || params.currentVersion === undefined) {
4336
+ throw new Error('Required parameter params.currentVersion was null or undefined when calling setExtensionSharedState.');
4337
+ }
4338
+ // verify required parameter 'state' is not null or undefined
4339
+ if (params.state === null || params.state === undefined) {
4340
+ throw new Error('Required parameter params.state was null or undefined when calling setExtensionSharedState.');
4341
+ }
4342
+ if (typeof (queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== 'undefined' && (queryParams === null || queryParams === void 0 ? void 0 : queryParams.key) !== null) {
4343
+ queryParameters['key'] = queryParams.key;
4344
+ }
4345
+ localVarHeaderParams = {
4346
+ ...localVarHeaderParams,
4347
+ ...options.headers,
4348
+ ...this.opts.extraHeaders,
4349
+ };
4350
+ if (params.currentVersion !== undefined) {
4351
+ if (params.currentVersion !== null && params.currentVersion !== undefined) {
4352
+ localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'currentVersion', (0, models_1.serializeFormDataValue)(params.currentVersion, 'number'));
4353
+ }
4354
+ }
4355
+ if (params.state !== undefined) {
4356
+ localVarFormParams = (0, models_1.ensureFormData)(localVarFormParams);
4357
+ const stateFiles = Array.isArray(params.state) ? params.state : [params.state];
4358
+ const Blob = globalThis.Blob || require('buffer').Blob;
4359
+ for (const f of stateFiles) {
4360
+ localVarFormParams.append('state', new Blob([new Uint8Array(f.value)], {
4361
+ type: f.options.contentType
4362
+ }), f.options.filename);
4363
+ }
4364
+ }
4365
+ const queryString = Object.entries(queryParameters)
4366
+ .filter(([, value]) => value !== undefined)
4367
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
4368
+ .join('&');
4369
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
4370
+ let localVarRequestOptions = {
4371
+ method: 'POST',
4372
+ headers: { ...localVarHeaderParams },
4373
+ };
4374
+ let requestOptions = localVarRequestOptions;
4375
+ let url = localVarUrl;
4376
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
4377
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
4378
+ url = auth_ApiKeyAuthentication.url;
4379
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
4380
+ requestOptions = auth_JWTAuthentication.requestOptions;
4381
+ url = auth_JWTAuthentication.url;
4382
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
4383
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
4384
+ url = auth_JWTHttpHeaderAuthentication.url;
4385
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
4386
+ requestOptions = auth_OAuth2.requestOptions;
4387
+ url = auth_OAuth2.url;
4388
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
4389
+ requestOptions = authDefault.requestOptions;
4390
+ url = authDefault.url;
4391
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
4392
+ const response = await fetch(url, requestOptions);
4393
+ const resp = this.handleResponse(response, 'SetExtensionSharedStateResponse');
4394
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4395
+ const headerCb = options.responseHeadersCallback;
4396
+ // on next tick, so we have time to handle the response
4397
+ setTimeout(() => {
4398
+ headerCb(Object.fromEntries(response.headers.entries()));
4399
+ }, 0);
4400
+ }
4401
+ return resp;
3565
4402
  }
3566
4403
  /**
3567
4404
  * Change the job compute time limit for the project. This function is only available through a JWT token, and is not available to all users.
@@ -3629,7 +4466,15 @@ class ProjectsApi {
3629
4466
  url = authDefault.url;
3630
4467
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3631
4468
  const response = await fetch(url, requestOptions);
3632
- return this.handleResponse(response, 'GenericApiResponse');
4469
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4470
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4471
+ const headerCb = options.responseHeadersCallback;
4472
+ // on next tick, so we have time to handle the response
4473
+ setTimeout(() => {
4474
+ headerCb(Object.fromEntries(response.headers.entries()));
4475
+ }, 0);
4476
+ }
4477
+ return resp;
3633
4478
  }
3634
4479
  /**
3635
4480
  * Change the DSP file size limit for the project. This function is only available through a JWT token, and is not available to all users.
@@ -3697,7 +4542,15 @@ class ProjectsApi {
3697
4542
  url = authDefault.url;
3698
4543
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3699
4544
  const response = await fetch(url, requestOptions);
3700
- return this.handleResponse(response, 'GenericApiResponse');
4545
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4546
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4547
+ const headerCb = options.responseHeadersCallback;
4548
+ // on next tick, so we have time to handle the response
4549
+ setTimeout(() => {
4550
+ headerCb(Object.fromEntries(response.headers.entries()));
4551
+ }, 0);
4552
+ }
4553
+ return resp;
3701
4554
  }
3702
4555
  /**
3703
4556
  * Set target constraints for a project. Use the constraints object to capture hardware attributes of your target device, along with an application budget to allow guidance on performance and resource usage
@@ -3765,7 +4618,15 @@ class ProjectsApi {
3765
4618
  url = authDefault.url;
3766
4619
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3767
4620
  const response = await fetch(url, requestOptions);
3768
- return this.handleResponse(response, 'GenericApiResponse');
4621
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4622
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4623
+ const headerCb = options.responseHeadersCallback;
4624
+ // on next tick, so we have time to handle the response
4625
+ setTimeout(() => {
4626
+ headerCb(Object.fromEntries(response.headers.entries()));
4627
+ }, 0);
4628
+ }
4629
+ return resp;
3769
4630
  }
3770
4631
  /**
3771
4632
  * Transfer ownership of a project to another user.
@@ -3833,7 +4694,15 @@ class ProjectsApi {
3833
4694
  url = authDefault.url;
3834
4695
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3835
4696
  const response = await fetch(url, requestOptions);
3836
- return this.handleResponse(response, 'GenericApiResponse');
4697
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4698
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4699
+ const headerCb = options.responseHeadersCallback;
4700
+ // on next tick, so we have time to handle the response
4701
+ setTimeout(() => {
4702
+ headerCb(Object.fromEntries(response.headers.entries()));
4703
+ }, 0);
4704
+ }
4705
+ return resp;
3837
4706
  }
3838
4707
  /**
3839
4708
  * Transfer ownership of a project to another organization.
@@ -3901,7 +4770,15 @@ class ProjectsApi {
3901
4770
  url = authDefault.url;
3902
4771
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3903
4772
  const response = await fetch(url, requestOptions);
3904
- return this.handleResponse(response, 'GenericApiResponse');
4773
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4774
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4775
+ const headerCb = options.responseHeadersCallback;
4776
+ // on next tick, so we have time to handle the response
4777
+ setTimeout(() => {
4778
+ headerCb(Object.fromEntries(response.headers.entries()));
4779
+ }, 0);
4780
+ }
4781
+ return resp;
3905
4782
  }
3906
4783
  /**
3907
4784
  * Store an AI Actions config. Use `createAIActionsJob` to run the job. Post the full AI Action here w/ all parameters.
@@ -3975,7 +4852,15 @@ class ProjectsApi {
3975
4852
  url = authDefault.url;
3976
4853
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3977
4854
  const response = await fetch(url, requestOptions);
3978
- return this.handleResponse(response, 'GenericApiResponse');
4855
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4856
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4857
+ const headerCb = options.responseHeadersCallback;
4858
+ // on next tick, so we have time to handle the response
4859
+ setTimeout(() => {
4860
+ headerCb(Object.fromEntries(response.headers.entries()));
4861
+ }, 0);
4862
+ }
4863
+ return resp;
3979
4864
  }
3980
4865
  /**
3981
4866
  * Update project properties such as name and logo.
@@ -4043,7 +4928,15 @@ class ProjectsApi {
4043
4928
  url = authDefault.url;
4044
4929
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
4045
4930
  const response = await fetch(url, requestOptions);
4046
- return this.handleResponse(response, 'GenericApiResponse');
4931
+ const resp = this.handleResponse(response, 'GenericApiResponse');
4932
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
4933
+ const headerCb = options.responseHeadersCallback;
4934
+ // on next tick, so we have time to handle the response
4935
+ setTimeout(() => {
4936
+ headerCb(Object.fromEntries(response.headers.entries()));
4937
+ }, 0);
4938
+ }
4939
+ return resp;
4047
4940
  }
4048
4941
  /**
4049
4942
  * Update the list of project tags.
@@ -4111,7 +5004,15 @@ class ProjectsApi {
4111
5004
  url = authDefault.url;
4112
5005
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
4113
5006
  const response = await fetch(url, requestOptions);
4114
- return this.handleResponse(response, 'GenericApiResponse');
5007
+ const resp = this.handleResponse(response, 'GenericApiResponse');
5008
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
5009
+ const headerCb = options.responseHeadersCallback;
5010
+ // on next tick, so we have time to handle the response
5011
+ setTimeout(() => {
5012
+ headerCb(Object.fromEntries(response.headers.entries()));
5013
+ }, 0);
5014
+ }
5015
+ return resp;
4115
5016
  }
4116
5017
  /**
4117
5018
  * Updates a version, this only updates fields that were set in the body.
@@ -4185,7 +5086,15 @@ class ProjectsApi {
4185
5086
  url = authDefault.url;
4186
5087
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
4187
5088
  const response = await fetch(url, requestOptions);
4188
- return this.handleResponse(response, 'GenericApiResponse');
5089
+ const resp = this.handleResponse(response, 'GenericApiResponse');
5090
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
5091
+ const headerCb = options.responseHeadersCallback;
5092
+ // on next tick, so we have time to handle the response
5093
+ setTimeout(() => {
5094
+ headerCb(Object.fromEntries(response.headers.entries()));
5095
+ }, 0);
5096
+ }
5097
+ return resp;
4189
5098
  }
4190
5099
  /**
4191
5100
  * Asynchronously called in the CSV Wizard to store the file that the CSV wizard was based on.
@@ -4262,7 +5171,15 @@ class ProjectsApi {
4262
5171
  url = authDefault.url;
4263
5172
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
4264
5173
  const response = await fetch(url, requestOptions);
4265
- return this.handleResponse(response, 'GenericApiResponse');
5174
+ const resp = this.handleResponse(response, 'GenericApiResponse');
5175
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
5176
+ const headerCb = options.responseHeadersCallback;
5177
+ // on next tick, so we have time to handle the response
5178
+ setTimeout(() => {
5179
+ headerCb(Object.fromEntries(response.headers.entries()));
5180
+ }, 0);
5181
+ }
5182
+ return resp;
4266
5183
  }
4267
5184
  /**
4268
5185
  * Uploads an image to the user CDN and returns the path.
@@ -4339,7 +5256,15 @@ class ProjectsApi {
4339
5256
  url = authDefault.url;
4340
5257
  (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
4341
5258
  const response = await fetch(url, requestOptions);
4342
- return this.handleResponse(response, 'UploadReadmeImageResponse');
5259
+ const resp = this.handleResponse(response, 'UploadReadmeImageResponse');
5260
+ if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
5261
+ const headerCb = options.responseHeadersCallback;
5262
+ // on next tick, so we have time to handle the response
5263
+ setTimeout(() => {
5264
+ headerCb(Object.fromEntries(response.headers.entries()));
5265
+ }, 0);
5266
+ }
5267
+ return resp;
4343
5268
  }
4344
5269
  }
4345
5270
  exports.ProjectsApi = ProjectsApi;