edge-impulse-api 1.60.5 → 1.60.7

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 (103) hide show
  1. package/build/library/sdk/api/classifyApi.d.ts +20 -0
  2. package/build/library/sdk/api/classifyApi.js +86 -0
  3. package/build/library/sdk/api/classifyApi.js.map +1 -1
  4. package/build/library/sdk/api/jobsApi.d.ts +26 -0
  5. package/build/library/sdk/api/jobsApi.js +168 -0
  6. package/build/library/sdk/api/jobsApi.js.map +1 -1
  7. package/build/library/sdk/api/organizationBlocksApi.d.ts +12 -0
  8. package/build/library/sdk/api/organizationBlocksApi.js +79 -0
  9. package/build/library/sdk/api/organizationBlocksApi.js.map +1 -1
  10. package/build/library/sdk/api/organizationJobsApi.d.ts +2 -0
  11. package/build/library/sdk/api/organizationJobsApi.js +4 -0
  12. package/build/library/sdk/api/organizationJobsApi.js.map +1 -1
  13. package/build/library/sdk/api/projectsApi.d.ts +105 -0
  14. package/build/library/sdk/api/projectsApi.js +732 -27
  15. package/build/library/sdk/api/projectsApi.js.map +1 -1
  16. package/build/library/sdk/api/rawDataApi.d.ts +25 -0
  17. package/build/library/sdk/api/rawDataApi.js +164 -0
  18. package/build/library/sdk/api/rawDataApi.js.map +1 -1
  19. package/build/library/sdk/model/aIAction.d.ts +51 -0
  20. package/build/library/sdk/model/aIAction.js +69 -0
  21. package/build/library/sdk/model/aIAction.js.map +1 -0
  22. package/build/library/sdk/model/aIActionLastPreviewState.d.ts +31 -0
  23. package/build/library/sdk/model/aIActionLastPreviewState.js +37 -0
  24. package/build/library/sdk/model/aIActionLastPreviewState.js.map +1 -0
  25. package/build/library/sdk/model/aIActionLastPreviewStateProposedChanges.d.ts +27 -0
  26. package/build/library/sdk/model/aIActionLastPreviewStateProposedChanges.js +34 -0
  27. package/build/library/sdk/model/aIActionLastPreviewStateProposedChanges.js.map +1 -0
  28. package/build/library/sdk/model/aIActionsConfig.d.ts +44 -0
  29. package/build/library/sdk/model/aIActionsConfig.js +49 -0
  30. package/build/library/sdk/model/aIActionsConfig.js.map +1 -0
  31. package/build/library/sdk/model/aIActionsDataCategory.d.ts +13 -0
  32. package/build/library/sdk/model/aIActionsDataCategory.js +16 -0
  33. package/build/library/sdk/model/aIActionsDataCategory.js.map +1 -0
  34. package/build/library/sdk/model/addOrganizationTransformationBlockRequest.d.ts +6 -0
  35. package/build/library/sdk/model/addOrganizationTransformationBlockRequest.js +10 -0
  36. package/build/library/sdk/model/addOrganizationTransformationBlockRequest.js.map +1 -1
  37. package/build/library/sdk/model/createAIActionResponse.d.ts +33 -0
  38. package/build/library/sdk/model/createAIActionResponse.js +39 -0
  39. package/build/library/sdk/model/createAIActionResponse.js.map +1 -0
  40. package/build/library/sdk/model/createPreviewAIActionsJobRequest.d.ts +35 -0
  41. package/build/library/sdk/model/createPreviewAIActionsJobRequest.js +39 -0
  42. package/build/library/sdk/model/createPreviewAIActionsJobRequest.js.map +1 -0
  43. package/build/library/sdk/model/dSPGroupItem.d.ts +1 -0
  44. package/build/library/sdk/model/dSPGroupItem.js +5 -0
  45. package/build/library/sdk/model/dSPGroupItem.js.map +1 -1
  46. package/build/library/sdk/model/environmentVariable.d.ts +32 -0
  47. package/build/library/sdk/model/environmentVariable.js +34 -0
  48. package/build/library/sdk/model/environmentVariable.js.map +1 -0
  49. package/build/library/sdk/model/getAIActionResponse.d.ts +34 -0
  50. package/build/library/sdk/model/getAIActionResponse.js +39 -0
  51. package/build/library/sdk/model/getAIActionResponse.js.map +1 -0
  52. package/build/library/sdk/model/getAIActionResponseAllOf.d.ts +26 -0
  53. package/build/library/sdk/model/getAIActionResponseAllOf.js +29 -0
  54. package/build/library/sdk/model/getAIActionResponseAllOf.js.map +1 -0
  55. package/build/library/sdk/model/getAIActionsProposedChangesResponse.d.ts +34 -0
  56. package/build/library/sdk/model/getAIActionsProposedChangesResponse.js +39 -0
  57. package/build/library/sdk/model/getAIActionsProposedChangesResponse.js.map +1 -0
  58. package/build/library/sdk/model/getAIActionsProposedChangesResponseAllOf.d.ts +26 -0
  59. package/build/library/sdk/model/getAIActionsProposedChangesResponseAllOf.js +29 -0
  60. package/build/library/sdk/model/getAIActionsProposedChangesResponseAllOf.js.map +1 -0
  61. package/build/library/sdk/model/getPublicOrganizationTransformationBlockResponse.d.ts +34 -0
  62. package/build/library/sdk/model/getPublicOrganizationTransformationBlockResponse.js +39 -0
  63. package/build/library/sdk/model/getPublicOrganizationTransformationBlockResponse.js.map +1 -0
  64. package/build/library/sdk/model/getPublicOrganizationTransformationBlockResponseAllOf.d.ts +26 -0
  65. package/build/library/sdk/model/getPublicOrganizationTransformationBlockResponseAllOf.js +29 -0
  66. package/build/library/sdk/model/getPublicOrganizationTransformationBlockResponseAllOf.js.map +1 -0
  67. package/build/library/sdk/model/listAIActionsResponse.d.ts +34 -0
  68. package/build/library/sdk/model/listAIActionsResponse.js +39 -0
  69. package/build/library/sdk/model/listAIActionsResponse.js.map +1 -0
  70. package/build/library/sdk/model/listAIActionsResponseAllOf.d.ts +26 -0
  71. package/build/library/sdk/model/listAIActionsResponseAllOf.js +29 -0
  72. package/build/library/sdk/model/listAIActionsResponseAllOf.js.map +1 -0
  73. package/build/library/sdk/model/models.d.ts +21 -0
  74. package/build/library/sdk/model/models.js +62 -0
  75. package/build/library/sdk/model/models.js.map +1 -1
  76. package/build/library/sdk/model/organizationTransformationBlock.d.ts +9 -0
  77. package/build/library/sdk/model/organizationTransformationBlock.js +10 -0
  78. package/build/library/sdk/model/organizationTransformationBlock.js.map +1 -1
  79. package/build/library/sdk/model/previewAIActionsSamplesRequest.d.ts +42 -0
  80. package/build/library/sdk/model/previewAIActionsSamplesRequest.js +49 -0
  81. package/build/library/sdk/model/previewAIActionsSamplesRequest.js.map +1 -0
  82. package/build/library/sdk/model/publicOrganizationTransformationBlock.d.ts +4 -0
  83. package/build/library/sdk/model/publicOrganizationTransformationBlock.js +5 -0
  84. package/build/library/sdk/model/publicOrganizationTransformationBlock.js.map +1 -1
  85. package/build/library/sdk/model/sampleProposedChanges.d.ts +48 -0
  86. package/build/library/sdk/model/sampleProposedChanges.js +49 -0
  87. package/build/library/sdk/model/sampleProposedChanges.js.map +1 -0
  88. package/build/library/sdk/model/setAIActionsOrderRequest.d.ts +25 -0
  89. package/build/library/sdk/model/setAIActionsOrderRequest.js +29 -0
  90. package/build/library/sdk/model/setAIActionsOrderRequest.js.map +1 -0
  91. package/build/library/sdk/model/setSampleProposedChangesRequest.d.ts +30 -0
  92. package/build/library/sdk/model/setSampleProposedChangesRequest.js +34 -0
  93. package/build/library/sdk/model/setSampleProposedChangesRequest.js.map +1 -0
  94. package/build/library/sdk/model/updateAIActionRequest.d.ts +57 -0
  95. package/build/library/sdk/model/updateAIActionRequest.js +64 -0
  96. package/build/library/sdk/model/updateAIActionRequest.js.map +1 -0
  97. package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.d.ts +6 -0
  98. package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.js +10 -0
  99. package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.js.map +1 -1
  100. package/build/library/sdk/model/updateProjectRequest.d.ts +4 -0
  101. package/build/library/sdk/model/updateProjectRequest.js +5 -0
  102. package/build/library/sdk/model/updateProjectRequest.js.map +1 -1
  103. package/package.json +1 -1
@@ -21,6 +21,7 @@ import { EditSampleLabelRequest } from '../model/editSampleLabelRequest';
21
21
  import { FindSegmentSampleRequest } from '../model/findSegmentSampleRequest';
22
22
  import { FindSegmentSampleResponse } from '../model/findSegmentSampleResponse';
23
23
  import { GenericApiResponse } from '../model/genericApiResponse';
24
+ import { GetAIActionsProposedChangesResponse } from '../model/getAIActionsProposedChangesResponse';
24
25
  import { GetAllImportedFromResponse } from '../model/getAllImportedFromResponse';
25
26
  import { GetAutoLabelerResponse } from '../model/getAutoLabelerResponse';
26
27
  import { GetAutoLabelerSegmentInfoResponse } from '../model/getAutoLabelerSegmentInfoResponse';
@@ -45,6 +46,7 @@ import { SaveAutoLabelerClustersRequest } from '../model/saveAutoLabelerClusters
45
46
  import { SaveAutoLabelerClustersResponse } from '../model/saveAutoLabelerClustersResponse';
46
47
  import { SegmentSampleRequest } from '../model/segmentSampleRequest';
47
48
  import { SetSampleMetadataRequest } from '../model/setSampleMetadataRequest';
49
+ import { SetSampleProposedChangesRequest } from '../model/setSampleProposedChangesRequest';
48
50
  import { SetSampleStructuredLabelsRequest } from '../model/setSampleStructuredLabelsRequest';
49
51
  import { SplitSampleInFramesRequest } from '../model/splitSampleInFramesRequest';
50
52
  import { StartJobResponse } from '../model/startJobResponse';
@@ -589,6 +591,17 @@ export declare class RawDataApi {
589
591
  [name: string]: string;
590
592
  };
591
593
  }): Promise<FindSegmentSampleResponse>;
594
+ /**
595
+ * Get proposed changes from an AI Actions job.
596
+ * @summary Get AI Actions proposed changes
597
+ * @param projectId Project ID
598
+ * @param jobId Job ID
599
+ */
600
+ getAIActionsProposedChanges(projectId: number, jobId: number, options?: {
601
+ headers: {
602
+ [name: string]: string;
603
+ };
604
+ }): Promise<GetAIActionsProposedChangesResponse>;
592
605
  /**
593
606
  * Lists all data with an \'imported from\' metadata key. Used to check in a data source which items are already in a project.
594
607
  * @summary List data with \"imported from\" metadata key
@@ -989,6 +1002,18 @@ export declare class RawDataApi {
989
1002
  [name: string]: string;
990
1003
  };
991
1004
  }): Promise<GenericApiResponse>;
1005
+ /**
1006
+ * Queue up changes to an object as part of the AI Actions flow. This overwrites any previous proposed changes.
1007
+ * @summary Propose changes
1008
+ * @param projectId Project ID
1009
+ * @param sampleId Sample ID
1010
+ * @param setSampleProposedChangesRequest
1011
+ */
1012
+ setSampleProposedChanges(projectId: number, sampleId: number, setSampleProposedChangesRequest: SetSampleProposedChangesRequest, options?: {
1013
+ headers: {
1014
+ [name: string]: string;
1015
+ };
1016
+ }): Promise<GenericApiResponse>;
992
1017
  /**
993
1018
  * Set structured labels for a sample. If a sample has structured labels the `label` column is ignored, and the sample is allowed to have multiple labels. An array of { startIndex, endIndex, label } needs to be passed in with labels for the complete sample (see `valuesCount` to get the upper bound). endIndex is _inclusive_. If you pass in an incorrect array (e.g. missing values) you\'ll get an error back.
994
1019
  * @summary Update structured labels
@@ -2090,6 +2090,85 @@ class RawDataApi {
2090
2090
  });
2091
2091
  });
2092
2092
  }
2093
+ /**
2094
+ * Get proposed changes from an AI Actions job.
2095
+ * @summary Get AI Actions proposed changes
2096
+ * @param projectId Project ID
2097
+ * @param jobId Job ID
2098
+ */
2099
+ async getAIActionsProposedChanges(projectId, jobId, options = { headers: {} }) {
2100
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/ai-actions-preview/{jobId}/proposed-changes'
2101
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
2102
+ .replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
2103
+ let localVarQueryParameters = {};
2104
+ let localVarHeaderParams = Object.assign({
2105
+ 'User-Agent': 'edgeimpulse-api nodejs'
2106
+ }, this.defaultHeaders);
2107
+ const produces = ['application/json'];
2108
+ // give precedence to 'application/json'
2109
+ if (produces.indexOf('application/json') >= 0) {
2110
+ localVarHeaderParams.Accept = 'application/json';
2111
+ }
2112
+ else {
2113
+ localVarHeaderParams.Accept = produces.join(',');
2114
+ }
2115
+ let localVarFormParams = {};
2116
+ // verify required parameter 'projectId' is not null or undefined
2117
+ if (projectId === null || projectId === undefined) {
2118
+ throw new Error('Required parameter projectId was null or undefined when calling getAIActionsProposedChanges.');
2119
+ }
2120
+ // verify required parameter 'jobId' is not null or undefined
2121
+ if (jobId === null || jobId === undefined) {
2122
+ throw new Error('Required parameter jobId was null or undefined when calling getAIActionsProposedChanges.');
2123
+ }
2124
+ Object.assign(localVarHeaderParams, options.headers);
2125
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2126
+ let localVarUseFormData = false;
2127
+ let localVarRequestOptions = {
2128
+ method: 'GET',
2129
+ qs: localVarQueryParameters,
2130
+ headers: localVarHeaderParams,
2131
+ uri: localVarPath,
2132
+ useQuerystring: this._useQuerystring,
2133
+ agentOptions: { keepAlive: false },
2134
+ json: true,
2135
+ };
2136
+ let authenticationPromise = Promise.resolve();
2137
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2138
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2139
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2140
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2141
+ return authenticationPromise.then(() => {
2142
+ if (Object.keys(localVarFormParams).length) {
2143
+ if (localVarUseFormData) {
2144
+ localVarRequestOptions.formData = localVarFormParams;
2145
+ }
2146
+ else {
2147
+ localVarRequestOptions.form = localVarFormParams;
2148
+ }
2149
+ }
2150
+ return new Promise((resolve, reject) => {
2151
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
2152
+ if (error) {
2153
+ reject(error);
2154
+ }
2155
+ else {
2156
+ body = models_1.ObjectSerializer.deserialize(body, "GetAIActionsProposedChangesResponse");
2157
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2158
+ if (typeof body.success === 'boolean' && !body.success) {
2159
+ reject(new Error(body.error || errString));
2160
+ }
2161
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2162
+ resolve(body);
2163
+ }
2164
+ else {
2165
+ reject(errString);
2166
+ }
2167
+ }
2168
+ });
2169
+ });
2170
+ });
2171
+ }
2093
2172
  /**
2094
2173
  * Lists all data with an \'imported from\' metadata key. Used to check in a data source which items are already in a project.
2095
2174
  * @summary List data with \"imported from\" metadata key
@@ -4878,6 +4957,91 @@ class RawDataApi {
4878
4957
  });
4879
4958
  });
4880
4959
  }
4960
+ /**
4961
+ * Queue up changes to an object as part of the AI Actions flow. This overwrites any previous proposed changes.
4962
+ * @summary Propose changes
4963
+ * @param projectId Project ID
4964
+ * @param sampleId Sample ID
4965
+ * @param setSampleProposedChangesRequest
4966
+ */
4967
+ async setSampleProposedChanges(projectId, sampleId, setSampleProposedChangesRequest, options = { headers: {} }) {
4968
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/{sampleId}/propose-changes'
4969
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
4970
+ .replace('{' + 'sampleId' + '}', encodeURIComponent(String(sampleId)));
4971
+ let localVarQueryParameters = {};
4972
+ let localVarHeaderParams = Object.assign({
4973
+ 'User-Agent': 'edgeimpulse-api nodejs'
4974
+ }, this.defaultHeaders);
4975
+ const produces = ['application/json'];
4976
+ // give precedence to 'application/json'
4977
+ if (produces.indexOf('application/json') >= 0) {
4978
+ localVarHeaderParams.Accept = 'application/json';
4979
+ }
4980
+ else {
4981
+ localVarHeaderParams.Accept = produces.join(',');
4982
+ }
4983
+ let localVarFormParams = {};
4984
+ // verify required parameter 'projectId' is not null or undefined
4985
+ if (projectId === null || projectId === undefined) {
4986
+ throw new Error('Required parameter projectId was null or undefined when calling setSampleProposedChanges.');
4987
+ }
4988
+ // verify required parameter 'sampleId' is not null or undefined
4989
+ if (sampleId === null || sampleId === undefined) {
4990
+ throw new Error('Required parameter sampleId was null or undefined when calling setSampleProposedChanges.');
4991
+ }
4992
+ // verify required parameter 'setSampleProposedChangesRequest' is not null or undefined
4993
+ if (setSampleProposedChangesRequest === null || setSampleProposedChangesRequest === undefined) {
4994
+ throw new Error('Required parameter setSampleProposedChangesRequest was null or undefined when calling setSampleProposedChanges.');
4995
+ }
4996
+ Object.assign(localVarHeaderParams, options.headers);
4997
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
4998
+ let localVarUseFormData = false;
4999
+ let localVarRequestOptions = {
5000
+ method: 'POST',
5001
+ qs: localVarQueryParameters,
5002
+ headers: localVarHeaderParams,
5003
+ uri: localVarPath,
5004
+ useQuerystring: this._useQuerystring,
5005
+ agentOptions: { keepAlive: false },
5006
+ json: true,
5007
+ body: models_1.ObjectSerializer.serialize(setSampleProposedChangesRequest, "SetSampleProposedChangesRequest")
5008
+ };
5009
+ let authenticationPromise = Promise.resolve();
5010
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
5011
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
5012
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
5013
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
5014
+ return authenticationPromise.then(() => {
5015
+ if (Object.keys(localVarFormParams).length) {
5016
+ if (localVarUseFormData) {
5017
+ localVarRequestOptions.formData = localVarFormParams;
5018
+ }
5019
+ else {
5020
+ localVarRequestOptions.form = localVarFormParams;
5021
+ }
5022
+ }
5023
+ return new Promise((resolve, reject) => {
5024
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
5025
+ if (error) {
5026
+ reject(error);
5027
+ }
5028
+ else {
5029
+ body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
5030
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
5031
+ if (typeof body.success === 'boolean' && !body.success) {
5032
+ reject(new Error(body.error || errString));
5033
+ }
5034
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
5035
+ resolve(body);
5036
+ }
5037
+ else {
5038
+ reject(errString);
5039
+ }
5040
+ }
5041
+ });
5042
+ });
5043
+ });
5044
+ }
4881
5045
  /**
4882
5046
  * Set structured labels for a sample. If a sample has structured labels the `label` column is ignored, and the sample is allowed to have multiple labels. An array of { startIndex, endIndex, label } needs to be passed in with labels for the complete sample (see `valuesCount` to get the upper bound). endIndex is _inclusive_. If you pass in an incorrect array (e.g. missing values) you\'ll get an error back.
4883
5047
  * @summary Update structured labels