@rasadov/lumoar-sdk 1.0.17 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -3791,15 +3791,12 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
3791
3791
  const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
3792
3792
  const localVarHeaderParameter = {} as any;
3793
3793
  const localVarQueryParameter = {} as any;
3794
- const localVarFormParams = new URLSearchParams();
3795
-
3796
3794
 
3797
- if (evidenceId !== undefined) {
3798
- localVarFormParams.set('evidence_id', evidenceId as any);
3795
+ if (evidenceId !== undefined) {
3796
+ localVarQueryParameter['evidence_id'] = evidenceId;
3799
3797
  }
3800
-
3801
-
3802
- localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
3798
+
3799
+
3803
3800
 
3804
3801
  if (authorization != null) {
3805
3802
  localVarHeaderParameter['Authorization'] = String(authorization);
@@ -3807,7 +3804,6 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
3807
3804
  setSearchParams(localVarUrlObj, localVarQueryParameter);
3808
3805
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3809
3806
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3810
- localVarRequestOptions.data = localVarFormParams.toString();
3811
3807
 
3812
3808
  return {
3813
3809
  url: toPathString(localVarUrlObj),
@@ -3896,13 +3892,13 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
3896
3892
  *
3897
3893
  * @summary Update Evidence
3898
3894
  * @param {string} evidenceId
3899
- * @param {string} text
3895
+ * @param {string | null} text
3900
3896
  * @param {string} [authorization]
3901
3897
  * @param {string} [sessionId]
3902
3898
  * @param {*} [options] Override http request option.
3903
3899
  * @throws {RequiredError}
3904
3900
  */
3905
- updateEvidenceV1EvidenceUpdatePut: async (evidenceId: string, text: string, authorization?: string, sessionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3901
+ updateEvidenceV1EvidenceUpdatePut: async (evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3906
3902
  // verify required parameter 'evidenceId' is not null or undefined
3907
3903
  assertParamExists('updateEvidenceV1EvidenceUpdatePut', 'evidenceId', evidenceId)
3908
3904
  // verify required parameter 'text' is not null or undefined
@@ -3920,11 +3916,11 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
3920
3916
  const localVarQueryParameter = {} as any;
3921
3917
  const localVarFormParams = new URLSearchParams();
3922
3918
 
3923
-
3924
- if (evidenceId !== undefined) {
3925
- localVarFormParams.set('evidence_id', evidenceId as any);
3919
+ if (evidenceId !== undefined) {
3920
+ localVarQueryParameter['evidence_id'] = evidenceId;
3926
3921
  }
3927
-
3922
+
3923
+
3928
3924
  if (text !== undefined) {
3929
3925
  localVarFormParams.set('text', text as any);
3930
3926
  }
@@ -3950,23 +3946,23 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
3950
3946
  * @summary Upload Evidence
3951
3947
  * @param {string} companyId
3952
3948
  * @param {string} controlId
3953
- * @param {File | null} file
3954
- * @param {string | null} text
3949
+ * @param {Array<File>} files
3955
3950
  * @param {string} [authorization]
3956
3951
  * @param {string} [sessionId]
3952
+ * @param {string | null} [text]
3957
3953
  * @param {*} [options] Override http request option.
3958
3954
  * @throws {RequiredError}
3959
3955
  */
3960
- uploadEvidenceV1EvidenceUploadPost: async (companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3956
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost: async (companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3961
3957
  // verify required parameter 'companyId' is not null or undefined
3962
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'companyId', companyId)
3958
+ assertParamExists('uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost', 'companyId', companyId)
3963
3959
  // verify required parameter 'controlId' is not null or undefined
3964
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'controlId', controlId)
3965
- // verify required parameter 'file' is not null or undefined
3966
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'file', file)
3967
- // verify required parameter 'text' is not null or undefined
3968
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'text', text)
3969
- const localVarPath = `/v1/evidence/upload`;
3960
+ assertParamExists('uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost', 'controlId', controlId)
3961
+ // verify required parameter 'files' is not null or undefined
3962
+ assertParamExists('uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost', 'files', files)
3963
+ const localVarPath = `/v1/evidence/upload/{company_id}/{control_id}`
3964
+ .replace(`{${"company_id"}}`, encodeURIComponent(String(companyId)))
3965
+ .replace(`{${"control_id"}}`, encodeURIComponent(String(controlId)));
3970
3966
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
3971
3967
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3972
3968
  let baseOptions;
@@ -3977,27 +3973,21 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
3977
3973
  const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
3978
3974
  const localVarHeaderParameter = {} as any;
3979
3975
  const localVarQueryParameter = {} as any;
3980
- const localVarFormParams = new URLSearchParams();
3981
-
3976
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
3982
3977
 
3983
- if (companyId !== undefined) {
3984
- localVarFormParams.set('company_id', companyId as any);
3985
- }
3986
-
3987
- if (controlId !== undefined) {
3988
- localVarFormParams.set('control_id', controlId as any);
3989
- }
3990
-
3991
- if (file !== undefined) {
3992
- localVarFormParams.set('file', file as any);
3978
+ if (files) {
3979
+ files.forEach((element) => {
3980
+ localVarFormParams.append('files', element as any);
3981
+ })
3993
3982
  }
3983
+
3994
3984
 
3995
3985
  if (text !== undefined) {
3996
- localVarFormParams.set('text', text as any);
3986
+ localVarFormParams.append('text', text as any);
3997
3987
  }
3998
3988
 
3999
3989
 
4000
- localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
3990
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
4001
3991
 
4002
3992
  if (authorization != null) {
4003
3993
  localVarHeaderParameter['Authorization'] = String(authorization);
@@ -4005,7 +3995,7 @@ export const EvidenceApiAxiosParamCreator = function (configuration?: Configurat
4005
3995
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4006
3996
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4007
3997
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4008
- localVarRequestOptions.data = localVarFormParams.toString();
3998
+ localVarRequestOptions.data = localVarFormParams;
4009
3999
 
4010
4000
  return {
4011
4001
  url: toPathString(localVarUrlObj),
@@ -4071,13 +4061,13 @@ export const EvidenceApiFp = function(configuration?: Configuration) {
4071
4061
  *
4072
4062
  * @summary Update Evidence
4073
4063
  * @param {string} evidenceId
4074
- * @param {string} text
4064
+ * @param {string | null} text
4075
4065
  * @param {string} [authorization]
4076
4066
  * @param {string} [sessionId]
4077
4067
  * @param {*} [options] Override http request option.
4078
4068
  * @throws {RequiredError}
4079
4069
  */
4080
- async updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>> {
4070
+ async updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>> {
4081
4071
  const localVarAxiosArgs = await localVarAxiosParamCreator.updateEvidenceV1EvidenceUpdatePut(evidenceId, text, authorization, sessionId, options);
4082
4072
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4083
4073
  const localVarOperationServerBasePath = operationServerMap['EvidenceApi.updateEvidenceV1EvidenceUpdatePut']?.[localVarOperationServerIndex]?.url;
@@ -4088,17 +4078,17 @@ export const EvidenceApiFp = function(configuration?: Configuration) {
4088
4078
  * @summary Upload Evidence
4089
4079
  * @param {string} companyId
4090
4080
  * @param {string} controlId
4091
- * @param {File | null} file
4092
- * @param {string | null} text
4081
+ * @param {Array<File>} files
4093
4082
  * @param {string} [authorization]
4094
4083
  * @param {string} [sessionId]
4084
+ * @param {string | null} [text]
4095
4085
  * @param {*} [options] Override http request option.
4096
4086
  * @throws {RequiredError}
4097
4087
  */
4098
- async uploadEvidenceV1EvidenceUploadPost(companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>> {
4099
- const localVarAxiosArgs = await localVarAxiosParamCreator.uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options);
4088
+ async uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>> {
4089
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options);
4100
4090
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4101
- const localVarOperationServerBasePath = operationServerMap['EvidenceApi.uploadEvidenceV1EvidenceUploadPost']?.[localVarOperationServerIndex]?.url;
4091
+ const localVarOperationServerBasePath = operationServerMap['EvidenceApi.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost']?.[localVarOperationServerIndex]?.url;
4102
4092
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4103
4093
  },
4104
4094
  }
@@ -4151,13 +4141,13 @@ export const EvidenceApiFactory = function (configuration?: Configuration, baseP
4151
4141
  *
4152
4142
  * @summary Update Evidence
4153
4143
  * @param {string} evidenceId
4154
- * @param {string} text
4144
+ * @param {string | null} text
4155
4145
  * @param {string} [authorization]
4156
4146
  * @param {string} [sessionId]
4157
4147
  * @param {*} [options] Override http request option.
4158
4148
  * @throws {RequiredError}
4159
4149
  */
4160
- updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase> {
4150
+ updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase> {
4161
4151
  return localVarFp.updateEvidenceV1EvidenceUpdatePut(evidenceId, text, authorization, sessionId, options).then((request) => request(axios, basePath));
4162
4152
  },
4163
4153
  /**
@@ -4165,15 +4155,15 @@ export const EvidenceApiFactory = function (configuration?: Configuration, baseP
4165
4155
  * @summary Upload Evidence
4166
4156
  * @param {string} companyId
4167
4157
  * @param {string} controlId
4168
- * @param {File | null} file
4169
- * @param {string | null} text
4158
+ * @param {Array<File>} files
4170
4159
  * @param {string} [authorization]
4171
4160
  * @param {string} [sessionId]
4161
+ * @param {string | null} [text]
4172
4162
  * @param {*} [options] Override http request option.
4173
4163
  * @throws {RequiredError}
4174
4164
  */
4175
- uploadEvidenceV1EvidenceUploadPost(companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase> {
4176
- return localVarFp.uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options).then((request) => request(axios, basePath));
4165
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase> {
4166
+ return localVarFp.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options).then((request) => request(axios, basePath));
4177
4167
  },
4178
4168
  };
4179
4169
  };
@@ -4231,14 +4221,14 @@ export class EvidenceApi extends BaseAPI {
4231
4221
  *
4232
4222
  * @summary Update Evidence
4233
4223
  * @param {string} evidenceId
4234
- * @param {string} text
4224
+ * @param {string | null} text
4235
4225
  * @param {string} [authorization]
4236
4226
  * @param {string} [sessionId]
4237
4227
  * @param {*} [options] Override http request option.
4238
4228
  * @throws {RequiredError}
4239
4229
  * @memberof EvidenceApi
4240
4230
  */
4241
- public updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig) {
4231
+ public updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig) {
4242
4232
  return EvidenceApiFp(this.configuration).updateEvidenceV1EvidenceUpdatePut(evidenceId, text, authorization, sessionId, options).then((request) => request(this.axios, this.basePath));
4243
4233
  }
4244
4234
 
@@ -4247,16 +4237,16 @@ export class EvidenceApi extends BaseAPI {
4247
4237
  * @summary Upload Evidence
4248
4238
  * @param {string} companyId
4249
4239
  * @param {string} controlId
4250
- * @param {File | null} file
4251
- * @param {string | null} text
4240
+ * @param {Array<File>} files
4252
4241
  * @param {string} [authorization]
4253
4242
  * @param {string} [sessionId]
4243
+ * @param {string | null} [text]
4254
4244
  * @param {*} [options] Override http request option.
4255
4245
  * @throws {RequiredError}
4256
4246
  * @memberof EvidenceApi
4257
4247
  */
4258
- public uploadEvidenceV1EvidenceUploadPost(companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig) {
4259
- return EvidenceApiFp(this.configuration).uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options).then((request) => request(this.axios, this.basePath));
4248
+ public uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig) {
4249
+ return EvidenceApiFp(this.configuration).uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options).then((request) => request(this.axios, this.basePath));
4260
4250
  }
4261
4251
  }
4262
4252
 
package/dist/api.d.ts CHANGED
@@ -2964,26 +2964,26 @@ export declare const EvidenceApiAxiosParamCreator: (configuration?: Configuratio
2964
2964
  *
2965
2965
  * @summary Update Evidence
2966
2966
  * @param {string} evidenceId
2967
- * @param {string} text
2967
+ * @param {string | null} text
2968
2968
  * @param {string} [authorization]
2969
2969
  * @param {string} [sessionId]
2970
2970
  * @param {*} [options] Override http request option.
2971
2971
  * @throws {RequiredError}
2972
2972
  */
2973
- updateEvidenceV1EvidenceUpdatePut: (evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2973
+ updateEvidenceV1EvidenceUpdatePut: (evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2974
2974
  /**
2975
2975
  *
2976
2976
  * @summary Upload Evidence
2977
2977
  * @param {string} companyId
2978
2978
  * @param {string} controlId
2979
- * @param {File | null} file
2980
- * @param {string | null} text
2979
+ * @param {Array<File>} files
2981
2980
  * @param {string} [authorization]
2982
2981
  * @param {string} [sessionId]
2982
+ * @param {string | null} [text]
2983
2983
  * @param {*} [options] Override http request option.
2984
2984
  * @throws {RequiredError}
2985
2985
  */
2986
- uploadEvidenceV1EvidenceUploadPost: (companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2986
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost: (companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2987
2987
  };
2988
2988
  /**
2989
2989
  * EvidenceApi - functional programming interface
@@ -3024,26 +3024,26 @@ export declare const EvidenceApiFp: (configuration?: Configuration) => {
3024
3024
  *
3025
3025
  * @summary Update Evidence
3026
3026
  * @param {string} evidenceId
3027
- * @param {string} text
3027
+ * @param {string | null} text
3028
3028
  * @param {string} [authorization]
3029
3029
  * @param {string} [sessionId]
3030
3030
  * @param {*} [options] Override http request option.
3031
3031
  * @throws {RequiredError}
3032
3032
  */
3033
- updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>>;
3033
+ updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>>;
3034
3034
  /**
3035
3035
  *
3036
3036
  * @summary Upload Evidence
3037
3037
  * @param {string} companyId
3038
3038
  * @param {string} controlId
3039
- * @param {File | null} file
3040
- * @param {string | null} text
3039
+ * @param {Array<File>} files
3041
3040
  * @param {string} [authorization]
3042
3041
  * @param {string} [sessionId]
3042
+ * @param {string | null} [text]
3043
3043
  * @param {*} [options] Override http request option.
3044
3044
  * @throws {RequiredError}
3045
3045
  */
3046
- uploadEvidenceV1EvidenceUploadPost(companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>>;
3046
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EvidenceBase>>;
3047
3047
  };
3048
3048
  /**
3049
3049
  * EvidenceApi - factory interface
@@ -3084,26 +3084,26 @@ export declare const EvidenceApiFactory: (configuration?: Configuration, basePat
3084
3084
  *
3085
3085
  * @summary Update Evidence
3086
3086
  * @param {string} evidenceId
3087
- * @param {string} text
3087
+ * @param {string | null} text
3088
3088
  * @param {string} [authorization]
3089
3089
  * @param {string} [sessionId]
3090
3090
  * @param {*} [options] Override http request option.
3091
3091
  * @throws {RequiredError}
3092
3092
  */
3093
- updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase>;
3093
+ updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase>;
3094
3094
  /**
3095
3095
  *
3096
3096
  * @summary Upload Evidence
3097
3097
  * @param {string} companyId
3098
3098
  * @param {string} controlId
3099
- * @param {File | null} file
3100
- * @param {string | null} text
3099
+ * @param {Array<File>} files
3101
3100
  * @param {string} [authorization]
3102
3101
  * @param {string} [sessionId]
3102
+ * @param {string | null} [text]
3103
3103
  * @param {*} [options] Override http request option.
3104
3104
  * @throws {RequiredError}
3105
3105
  */
3106
- uploadEvidenceV1EvidenceUploadPost(companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase>;
3106
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<EvidenceBase>;
3107
3107
  };
3108
3108
  /**
3109
3109
  * EvidenceApi - object-oriented interface
@@ -3149,28 +3149,28 @@ export declare class EvidenceApi extends BaseAPI {
3149
3149
  *
3150
3150
  * @summary Update Evidence
3151
3151
  * @param {string} evidenceId
3152
- * @param {string} text
3152
+ * @param {string | null} text
3153
3153
  * @param {string} [authorization]
3154
3154
  * @param {string} [sessionId]
3155
3155
  * @param {*} [options] Override http request option.
3156
3156
  * @throws {RequiredError}
3157
3157
  * @memberof EvidenceApi
3158
3158
  */
3159
- updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EvidenceBase, any, {}>>;
3159
+ updateEvidenceV1EvidenceUpdatePut(evidenceId: string, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EvidenceBase, any, {}>>;
3160
3160
  /**
3161
3161
  *
3162
3162
  * @summary Upload Evidence
3163
3163
  * @param {string} companyId
3164
3164
  * @param {string} controlId
3165
- * @param {File | null} file
3166
- * @param {string | null} text
3165
+ * @param {Array<File>} files
3167
3166
  * @param {string} [authorization]
3168
3167
  * @param {string} [sessionId]
3168
+ * @param {string | null} [text]
3169
3169
  * @param {*} [options] Override http request option.
3170
3170
  * @throws {RequiredError}
3171
3171
  * @memberof EvidenceApi
3172
3172
  */
3173
- uploadEvidenceV1EvidenceUploadPost(companyId: string, controlId: string, file: File | null, text: string | null, authorization?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EvidenceBase, any, {}>>;
3173
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId: string, controlId: string, files: Array<File>, authorization?: string, sessionId?: string, text?: string | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EvidenceBase, any, {}>>;
3174
3174
  }
3175
3175
  /**
3176
3176
  * HealthApi - axios parameter creator
package/dist/api.js CHANGED
@@ -1687,18 +1687,15 @@ export const EvidenceApiAxiosParamCreator = function (configuration) {
1687
1687
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1688
1688
  const localVarHeaderParameter = {};
1689
1689
  const localVarQueryParameter = {};
1690
- const localVarFormParams = new URLSearchParams();
1691
1690
  if (evidenceId !== undefined) {
1692
- localVarFormParams.set('evidence_id', evidenceId);
1691
+ localVarQueryParameter['evidence_id'] = evidenceId;
1693
1692
  }
1694
- localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1695
1693
  if (authorization != null) {
1696
1694
  localVarHeaderParameter['Authorization'] = String(authorization);
1697
1695
  }
1698
1696
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1699
1697
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1700
1698
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1701
- localVarRequestOptions.data = localVarFormParams.toString();
1702
1699
  return {
1703
1700
  url: toPathString(localVarUrlObj),
1704
1701
  options: localVarRequestOptions,
@@ -1776,7 +1773,7 @@ export const EvidenceApiAxiosParamCreator = function (configuration) {
1776
1773
  *
1777
1774
  * @summary Update Evidence
1778
1775
  * @param {string} evidenceId
1779
- * @param {string} text
1776
+ * @param {string | null} text
1780
1777
  * @param {string} [authorization]
1781
1778
  * @param {string} [sessionId]
1782
1779
  * @param {*} [options] Override http request option.
@@ -1799,7 +1796,7 @@ export const EvidenceApiAxiosParamCreator = function (configuration) {
1799
1796
  const localVarQueryParameter = {};
1800
1797
  const localVarFormParams = new URLSearchParams();
1801
1798
  if (evidenceId !== undefined) {
1802
- localVarFormParams.set('evidence_id', evidenceId);
1799
+ localVarQueryParameter['evidence_id'] = evidenceId;
1803
1800
  }
1804
1801
  if (text !== undefined) {
1805
1802
  localVarFormParams.set('text', text);
@@ -1822,23 +1819,23 @@ export const EvidenceApiAxiosParamCreator = function (configuration) {
1822
1819
  * @summary Upload Evidence
1823
1820
  * @param {string} companyId
1824
1821
  * @param {string} controlId
1825
- * @param {File | null} file
1826
- * @param {string | null} text
1822
+ * @param {Array<File>} files
1827
1823
  * @param {string} [authorization]
1828
1824
  * @param {string} [sessionId]
1825
+ * @param {string | null} [text]
1829
1826
  * @param {*} [options] Override http request option.
1830
1827
  * @throws {RequiredError}
1831
1828
  */
1832
- uploadEvidenceV1EvidenceUploadPost: (companyId_1, controlId_1, file_1, text_1, authorization_1, sessionId_1, ...args_1) => __awaiter(this, [companyId_1, controlId_1, file_1, text_1, authorization_1, sessionId_1, ...args_1], void 0, function* (companyId, controlId, file, text, authorization, sessionId, options = {}) {
1829
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost: (companyId_1, controlId_1, files_1, authorization_1, sessionId_1, text_1, ...args_1) => __awaiter(this, [companyId_1, controlId_1, files_1, authorization_1, sessionId_1, text_1, ...args_1], void 0, function* (companyId, controlId, files, authorization, sessionId, text, options = {}) {
1833
1830
  // verify required parameter 'companyId' is not null or undefined
1834
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'companyId', companyId);
1831
+ assertParamExists('uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost', 'companyId', companyId);
1835
1832
  // verify required parameter 'controlId' is not null or undefined
1836
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'controlId', controlId);
1837
- // verify required parameter 'file' is not null or undefined
1838
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'file', file);
1839
- // verify required parameter 'text' is not null or undefined
1840
- assertParamExists('uploadEvidenceV1EvidenceUploadPost', 'text', text);
1841
- const localVarPath = `/v1/evidence/upload`;
1833
+ assertParamExists('uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost', 'controlId', controlId);
1834
+ // verify required parameter 'files' is not null or undefined
1835
+ assertParamExists('uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost', 'files', files);
1836
+ const localVarPath = `/v1/evidence/upload/{company_id}/{control_id}`
1837
+ .replace(`{${"company_id"}}`, encodeURIComponent(String(companyId)))
1838
+ .replace(`{${"control_id"}}`, encodeURIComponent(String(controlId)));
1842
1839
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1843
1840
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1844
1841
  let baseOptions;
@@ -1848,27 +1845,23 @@ export const EvidenceApiAxiosParamCreator = function (configuration) {
1848
1845
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1849
1846
  const localVarHeaderParameter = {};
1850
1847
  const localVarQueryParameter = {};
1851
- const localVarFormParams = new URLSearchParams();
1852
- if (companyId !== undefined) {
1853
- localVarFormParams.set('company_id', companyId);
1854
- }
1855
- if (controlId !== undefined) {
1856
- localVarFormParams.set('control_id', controlId);
1857
- }
1858
- if (file !== undefined) {
1859
- localVarFormParams.set('file', file);
1848
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1849
+ if (files) {
1850
+ files.forEach((element) => {
1851
+ localVarFormParams.append('files', element);
1852
+ });
1860
1853
  }
1861
1854
  if (text !== undefined) {
1862
- localVarFormParams.set('text', text);
1855
+ localVarFormParams.append('text', text);
1863
1856
  }
1864
- localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1857
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1865
1858
  if (authorization != null) {
1866
1859
  localVarHeaderParameter['Authorization'] = String(authorization);
1867
1860
  }
1868
1861
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1869
1862
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1870
1863
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1871
- localVarRequestOptions.data = localVarFormParams.toString();
1864
+ localVarRequestOptions.data = localVarFormParams;
1872
1865
  return {
1873
1866
  url: toPathString(localVarUrlObj),
1874
1867
  options: localVarRequestOptions,
@@ -1941,7 +1934,7 @@ export const EvidenceApiFp = function (configuration) {
1941
1934
  *
1942
1935
  * @summary Update Evidence
1943
1936
  * @param {string} evidenceId
1944
- * @param {string} text
1937
+ * @param {string | null} text
1945
1938
  * @param {string} [authorization]
1946
1939
  * @param {string} [sessionId]
1947
1940
  * @param {*} [options] Override http request option.
@@ -1961,19 +1954,19 @@ export const EvidenceApiFp = function (configuration) {
1961
1954
  * @summary Upload Evidence
1962
1955
  * @param {string} companyId
1963
1956
  * @param {string} controlId
1964
- * @param {File | null} file
1965
- * @param {string | null} text
1957
+ * @param {Array<File>} files
1966
1958
  * @param {string} [authorization]
1967
1959
  * @param {string} [sessionId]
1960
+ * @param {string | null} [text]
1968
1961
  * @param {*} [options] Override http request option.
1969
1962
  * @throws {RequiredError}
1970
1963
  */
1971
- uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options) {
1964
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options) {
1972
1965
  return __awaiter(this, void 0, void 0, function* () {
1973
1966
  var _a, _b, _c;
1974
- const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options);
1967
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options);
1975
1968
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1976
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['EvidenceApi.uploadEvidenceV1EvidenceUploadPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1969
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['EvidenceApi.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1977
1970
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1978
1971
  });
1979
1972
  },
@@ -2026,7 +2019,7 @@ export const EvidenceApiFactory = function (configuration, basePath, axios) {
2026
2019
  *
2027
2020
  * @summary Update Evidence
2028
2021
  * @param {string} evidenceId
2029
- * @param {string} text
2022
+ * @param {string | null} text
2030
2023
  * @param {string} [authorization]
2031
2024
  * @param {string} [sessionId]
2032
2025
  * @param {*} [options] Override http request option.
@@ -2040,15 +2033,15 @@ export const EvidenceApiFactory = function (configuration, basePath, axios) {
2040
2033
  * @summary Upload Evidence
2041
2034
  * @param {string} companyId
2042
2035
  * @param {string} controlId
2043
- * @param {File | null} file
2044
- * @param {string | null} text
2036
+ * @param {Array<File>} files
2045
2037
  * @param {string} [authorization]
2046
2038
  * @param {string} [sessionId]
2039
+ * @param {string | null} [text]
2047
2040
  * @param {*} [options] Override http request option.
2048
2041
  * @throws {RequiredError}
2049
2042
  */
2050
- uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options) {
2051
- return localVarFp.uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options).then((request) => request(axios, basePath));
2043
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options) {
2044
+ return localVarFp.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options).then((request) => request(axios, basePath));
2052
2045
  },
2053
2046
  };
2054
2047
  };
@@ -2102,7 +2095,7 @@ export class EvidenceApi extends BaseAPI {
2102
2095
  *
2103
2096
  * @summary Update Evidence
2104
2097
  * @param {string} evidenceId
2105
- * @param {string} text
2098
+ * @param {string | null} text
2106
2099
  * @param {string} [authorization]
2107
2100
  * @param {string} [sessionId]
2108
2101
  * @param {*} [options] Override http request option.
@@ -2117,16 +2110,16 @@ export class EvidenceApi extends BaseAPI {
2117
2110
  * @summary Upload Evidence
2118
2111
  * @param {string} companyId
2119
2112
  * @param {string} controlId
2120
- * @param {File | null} file
2121
- * @param {string | null} text
2113
+ * @param {Array<File>} files
2122
2114
  * @param {string} [authorization]
2123
2115
  * @param {string} [sessionId]
2116
+ * @param {string | null} [text]
2124
2117
  * @param {*} [options] Override http request option.
2125
2118
  * @throws {RequiredError}
2126
2119
  * @memberof EvidenceApi
2127
2120
  */
2128
- uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options) {
2129
- return EvidenceApiFp(this.configuration).uploadEvidenceV1EvidenceUploadPost(companyId, controlId, file, text, authorization, sessionId, options).then((request) => request(this.axios, this.basePath));
2121
+ uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options) {
2122
+ return EvidenceApiFp(this.configuration).uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(companyId, controlId, files, authorization, sessionId, text, options).then((request) => request(this.axios, this.basePath));
2130
2123
  }
2131
2124
  }
2132
2125
  /**
package/dist/index.d.ts CHANGED
@@ -11,4 +11,4 @@
11
11
  */
12
12
  export * from "./api";
13
13
  export * from "./configuration";
14
- export * from "./sdk";
14
+ export * from './sdk';
package/dist/index.js CHANGED
@@ -13,4 +13,4 @@
13
13
  */
14
14
  export * from "./api";
15
15
  export * from "./configuration";
16
- export * from "./sdk";
16
+ export * from './sdk';
@@ -8,7 +8,7 @@ All URIs are relative to *http://localhost*
8
8
  |[**getEvidenceFilesV1EvidenceFileEvidenceIdGet**](#getevidencefilesv1evidencefileevidenceidget) | **GET** /v1/evidence/file/{evidence_id} | Get Evidence Files|
9
9
  |[**listCompanyEvidenceV1EvidenceCompanyCompanyIdGet**](#listcompanyevidencev1evidencecompanycompanyidget) | **GET** /v1/evidence/company/{company_id} | List Company Evidence|
10
10
  |[**updateEvidenceV1EvidenceUpdatePut**](#updateevidencev1evidenceupdateput) | **PUT** /v1/evidence/update | Update Evidence|
11
- |[**uploadEvidenceV1EvidenceUploadPost**](#uploadevidencev1evidenceuploadpost) | **POST** /v1/evidence/upload | Upload Evidence|
11
+ |[**uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost**](#uploadevidencev1evidenceuploadcompanyidcontrolidpost) | **POST** /v1/evidence/upload/{company_id}/{control_id} | Upload Evidence|
12
12
 
13
13
  # **deleteEvidenceV1EvidenceDeleteDelete**
14
14
  > deleteEvidenceV1EvidenceDeleteDelete()
@@ -55,7 +55,7 @@ No authorization required
55
55
 
56
56
  ### HTTP request headers
57
57
 
58
- - **Content-Type**: application/x-www-form-urlencoded
58
+ - **Content-Type**: Not defined
59
59
  - **Accept**: application/json
60
60
 
61
61
 
@@ -241,8 +241,8 @@ No authorization required
241
241
 
242
242
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
243
243
 
244
- # **uploadEvidenceV1EvidenceUploadPost**
245
- > EvidenceBase uploadEvidenceV1EvidenceUploadPost()
244
+ # **uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost**
245
+ > EvidenceBase uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost()
246
246
 
247
247
 
248
248
  ### Example
@@ -258,18 +258,18 @@ const apiInstance = new EvidenceApi(configuration);
258
258
 
259
259
  let companyId: string; // (default to undefined)
260
260
  let controlId: string; // (default to undefined)
261
- let file: File; // (default to undefined)
262
- let text: string; // (default to undefined)
261
+ let files: Array<File>; // (default to undefined)
263
262
  let authorization: string; // (optional) (default to undefined)
264
263
  let sessionId: string; // (optional) (default to undefined)
264
+ let text: string; // (optional) (default to undefined)
265
265
 
266
- const { status, data } = await apiInstance.uploadEvidenceV1EvidenceUploadPost(
266
+ const { status, data } = await apiInstance.uploadEvidenceV1EvidenceUploadCompanyIdControlIdPost(
267
267
  companyId,
268
268
  controlId,
269
- file,
270
- text,
269
+ files,
271
270
  authorization,
272
- sessionId
271
+ sessionId,
272
+ text
273
273
  );
274
274
  ```
275
275
 
@@ -279,10 +279,10 @@ const { status, data } = await apiInstance.uploadEvidenceV1EvidenceUploadPost(
279
279
  |------------- | ------------- | ------------- | -------------|
280
280
  | **companyId** | [**string**] | | defaults to undefined|
281
281
  | **controlId** | [**string**] | | defaults to undefined|
282
- | **file** | [**File**] | | defaults to undefined|
283
- | **text** | [**string**] | | defaults to undefined|
282
+ | **files** | **Array&lt;File&gt;** | | defaults to undefined|
284
283
  | **authorization** | [**string**] | | (optional) defaults to undefined|
285
284
  | **sessionId** | [**string**] | | (optional) defaults to undefined|
285
+ | **text** | [**string**] | | (optional) defaults to undefined|
286
286
 
287
287
 
288
288
  ### Return type
@@ -295,7 +295,7 @@ No authorization required
295
295
 
296
296
  ### HTTP request headers
297
297
 
298
- - **Content-Type**: application/x-www-form-urlencoded
298
+ - **Content-Type**: multipart/form-data
299
299
  - **Accept**: application/json
300
300
 
301
301
 
package/index.ts CHANGED
@@ -15,4 +15,5 @@
15
15
 
16
16
  export * from "./api";
17
17
  export * from "./configuration";
18
- export * from "./sdk"
18
+
19
+ export * from './sdk';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "openapi-generator-cli": "^1.0.0"
5
5
  },
6
6
  "name": "@rasadov/lumoar-sdk",
7
- "version": "1.0.17",
7
+ "version": "1.1.1",
8
8
  "description": "Lumoar API SDK",
9
9
  "main": "dist/index.js",
10
10
  "directories": {
package/update.sh ADDED
@@ -0,0 +1,18 @@
1
+ #!/bin/sh
2
+
3
+ # Run openapi cli command
4
+ openapi-generator-cli generate -i http://localhost:8000/openapi.json -g typescript-axios -o .
5
+
6
+ # Add export * from "./sdk" to index.ts
7
+ echo "export * from './sdk';" >> index.ts
8
+
9
+ # Update package version
10
+ npm version minor
11
+
12
+ # Commit changes
13
+ git add .
14
+ git commit -m "Update SDK to version $version"
15
+
16
+ # Push changes
17
+ git push
18
+ npm publish