revert CreateAssetDto assetType enum
This commit is contained in:
Generated
+2
-2
@@ -1076,7 +1076,7 @@ import 'package:openapi/api.dart';
|
|||||||
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
|
||||||
|
|
||||||
final api_instance = AssetApi();
|
final api_instance = AssetApi();
|
||||||
final assetType = assetType_example; // String |
|
final assetType = ; // AssetTypeEnum |
|
||||||
final assetData = BINARY_DATA_HERE; // MultipartFile |
|
final assetData = BINARY_DATA_HERE; // MultipartFile |
|
||||||
final deviceAssetId = deviceAssetId_example; // String |
|
final deviceAssetId = deviceAssetId_example; // String |
|
||||||
final deviceId = deviceId_example; // String |
|
final deviceId = deviceId_example; // String |
|
||||||
@@ -1100,7 +1100,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**assetType** | **String**| |
|
**assetType** | [**AssetTypeEnum**](AssetTypeEnum.md)| |
|
||||||
**assetData** | **MultipartFile**| |
|
**assetData** | **MultipartFile**| |
|
||||||
**deviceAssetId** | **String**| |
|
**deviceAssetId** | **String**| |
|
||||||
**deviceId** | **String**| |
|
**deviceId** | **String**| |
|
||||||
|
|||||||
Generated
+4
-4
@@ -1164,7 +1164,7 @@ class AssetApi {
|
|||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetType (required):
|
/// * [AssetTypeEnum] assetType (required):
|
||||||
///
|
///
|
||||||
/// * [MultipartFile] assetData (required):
|
/// * [MultipartFile] assetData (required):
|
||||||
///
|
///
|
||||||
@@ -1185,7 +1185,7 @@ class AssetApi {
|
|||||||
/// * [bool] isVisible:
|
/// * [bool] isVisible:
|
||||||
///
|
///
|
||||||
/// * [String] duration:
|
/// * [String] duration:
|
||||||
Future<Response> uploadFileWithHttpInfo(String assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
Future<Response> uploadFileWithHttpInfo(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/asset/upload';
|
final path = r'/asset/upload';
|
||||||
|
|
||||||
@@ -1265,7 +1265,7 @@ class AssetApi {
|
|||||||
///
|
///
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] assetType (required):
|
/// * [AssetTypeEnum] assetType (required):
|
||||||
///
|
///
|
||||||
/// * [MultipartFile] assetData (required):
|
/// * [MultipartFile] assetData (required):
|
||||||
///
|
///
|
||||||
@@ -1286,7 +1286,7 @@ class AssetApi {
|
|||||||
/// * [bool] isVisible:
|
/// * [bool] isVisible:
|
||||||
///
|
///
|
||||||
/// * [String] duration:
|
/// * [String] duration:
|
||||||
Future<AssetFileUploadResponseDto?> uploadFile(String assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
Future<AssetFileUploadResponseDto?> uploadFile(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile? livePhotoData, bool? isVisible, String? duration, }) async {
|
||||||
final response = await uploadFileWithHttpInfo(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData: livePhotoData, isVisible: isVisible, duration: duration, );
|
final response = await uploadFileWithHttpInfo(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData: livePhotoData, isVisible: isVisible, duration: duration, );
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
|
|||||||
Generated
+1
-1
@@ -166,7 +166,7 @@ void main() {
|
|||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//Future<AssetFileUploadResponseDto> uploadFile(String assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile livePhotoData, bool isVisible, String duration }) async
|
//Future<AssetFileUploadResponseDto> uploadFile(AssetTypeEnum assetType, MultipartFile assetData, String deviceAssetId, String deviceId, String createdAt, String modifiedAt, bool isFavorite, String fileExtension, { MultipartFile livePhotoData, bool isVisible, String duration }) async
|
||||||
test('test uploadFile', () async {
|
test('test uploadFile', () async {
|
||||||
// TODO
|
// TODO
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class CreateAssetDto {
|
|||||||
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsEnum(AssetType)
|
@IsEnum(AssetType)
|
||||||
@ApiProperty({ enum: Object.values(AssetType) })
|
@ApiProperty({ enumName: 'AssetTypeEnum', enum: AssetType })
|
||||||
assetType!: AssetType;
|
assetType!: AssetType;
|
||||||
|
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@@ -34,6 +34,8 @@ export class CreateAssetDto {
|
|||||||
@IsOptional()
|
@IsOptional()
|
||||||
duration?: string;
|
duration?: string;
|
||||||
|
|
||||||
|
// The properties below are added to correctly generate the API docs
|
||||||
|
// and client SDKs. Validation should be handled in the controller.
|
||||||
@ApiProperty({ type: 'string', format: 'binary' })
|
@ApiProperty({ type: 'string', format: 'binary' })
|
||||||
assetData!: any;
|
assetData!: any;
|
||||||
|
|
||||||
|
|||||||
@@ -3762,13 +3762,7 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"assetType": {
|
"assetType": {
|
||||||
"enum": [
|
"$ref": "#/components/schemas/AssetTypeEnum"
|
||||||
"IMAGE",
|
|
||||||
"VIDEO",
|
|
||||||
"AUDIO",
|
|
||||||
"OTHER"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
},
|
},
|
||||||
"assetData": {
|
"assetData": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
Generated
+9
-9
@@ -4402,7 +4402,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetType
|
* @param {AssetTypeEnum} assetType
|
||||||
* @param {any} assetData
|
* @param {any} assetData
|
||||||
* @param {string} deviceAssetId
|
* @param {string} deviceAssetId
|
||||||
* @param {string} deviceId
|
* @param {string} deviceId
|
||||||
@@ -4416,7 +4416,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile: async (assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
uploadFile: async (assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'assetType' is not null or undefined
|
// verify required parameter 'assetType' is not null or undefined
|
||||||
assertParamExists('uploadFile', 'assetType', assetType)
|
assertParamExists('uploadFile', 'assetType', assetType)
|
||||||
// verify required parameter 'assetData' is not null or undefined
|
// verify required parameter 'assetData' is not null or undefined
|
||||||
@@ -4452,7 +4452,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration
|
|||||||
|
|
||||||
|
|
||||||
if (assetType !== undefined) {
|
if (assetType !== undefined) {
|
||||||
localVarFormParams.append('assetType', assetType as any);
|
localVarFormParams.append('assetType', new Blob([JSON.stringify(assetType)], { type: "application/json", }));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assetData !== undefined) {
|
if (assetData !== undefined) {
|
||||||
@@ -4732,7 +4732,7 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetType
|
* @param {AssetTypeEnum} assetType
|
||||||
* @param {any} assetData
|
* @param {any} assetData
|
||||||
* @param {string} deviceAssetId
|
* @param {string} deviceAssetId
|
||||||
* @param {string} deviceId
|
* @param {string} deviceId
|
||||||
@@ -4746,7 +4746,7 @@ export const AssetApiFp = function(configuration?: Configuration) {
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async uploadFile(assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
|
async uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssetFileUploadResponseDto>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options);
|
||||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||||
},
|
},
|
||||||
@@ -4953,7 +4953,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetType
|
* @param {AssetTypeEnum} assetType
|
||||||
* @param {any} assetData
|
* @param {any} assetData
|
||||||
* @param {string} deviceAssetId
|
* @param {string} deviceAssetId
|
||||||
* @param {string} deviceId
|
* @param {string} deviceId
|
||||||
@@ -4967,7 +4967,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath
|
|||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
uploadFile(assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
|
uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: any): AxiosPromise<AssetFileUploadResponseDto> {
|
||||||
return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath));
|
return localVarFp.uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -5215,7 +5215,7 @@ export class AssetApi extends BaseAPI {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} assetType
|
* @param {AssetTypeEnum} assetType
|
||||||
* @param {any} assetData
|
* @param {any} assetData
|
||||||
* @param {string} deviceAssetId
|
* @param {string} deviceAssetId
|
||||||
* @param {string} deviceId
|
* @param {string} deviceId
|
||||||
@@ -5230,7 +5230,7 @@ export class AssetApi extends BaseAPI {
|
|||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AssetApi
|
* @memberof AssetApi
|
||||||
*/
|
*/
|
||||||
public uploadFile(assetType: string, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) {
|
public uploadFile(assetType: AssetTypeEnum, assetData: any, deviceAssetId: string, deviceId: string, createdAt: string, modifiedAt: string, isFavorite: boolean, fileExtension: string, livePhotoData?: any, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig) {
|
||||||
return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath));
|
return AssetApiFp(this.configuration).uploadFile(assetType, assetData, deviceAssetId, deviceId, createdAt, modifiedAt, isFavorite, fileExtension, livePhotoData, isVisible, duration, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user