From 706e3687ff3f1b248d9768e5d920aaf5439c479b Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Mon, 10 Jul 2023 15:12:53 -0400 Subject: [PATCH] chore: open api --- cli/src/api/open-api/api.ts | 48 ++-------------- mobile/openapi/doc/AssetApi.md | Bin 56107 -> 55860 bytes mobile/openapi/doc/ImportAssetDto.md | Bin 917 -> 857 bytes mobile/openapi/lib/api/asset_api.dart | Bin 51103 -> 50527 bytes .../openapi/lib/model/import_asset_dto.dart | Bin 7612 -> 7345 bytes mobile/openapi/test/asset_api_test.dart | Bin 5342 -> 5295 bytes .../openapi/test/import_asset_dto_test.dart | Bin 1758 -> 1648 bytes web/src/api/open-api/api.ts | 52 ++---------------- 8 files changed, 11 insertions(+), 89 deletions(-) diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index ec57c3591b..51571d8466 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -1340,12 +1340,6 @@ export interface GetAssetCountByTimeBucketDto { * @interface ImportAssetDto */ export interface ImportAssetDto { - /** - * - * @type {AssetTypeEnum} - * @memberof ImportAssetDto - */ - 'assetType': AssetTypeEnum; /** * * @type {boolean} @@ -1413,8 +1407,6 @@ export interface ImportAssetDto { */ 'duration'?: string; } - - /** * * @export @@ -5642,9 +5634,7 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration }, /** * - * @param {AssetTypeEnum} assetType * @param {File} assetData - * @param {string} fileExtension * @param {string} deviceAssetId * @param {string} deviceId * @param {string} fileCreatedAt @@ -5660,13 +5650,9 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile: async (assetType: AssetTypeEnum, assetData: File, fileExtension: string, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'assetType' is not null or undefined - assertParamExists('uploadFile', 'assetType', assetType) + uploadFile: async (assetData: File, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetData' is not null or undefined assertParamExists('uploadFile', 'assetData', assetData) - // verify required parameter 'fileExtension' is not null or undefined - assertParamExists('uploadFile', 'fileExtension', fileExtension) // verify required parameter 'deviceAssetId' is not null or undefined assertParamExists('uploadFile', 'deviceAssetId', deviceAssetId) // verify required parameter 'deviceId' is not null or undefined @@ -5704,10 +5690,6 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration } - if (assetType !== undefined) { - localVarFormParams.append('assetType', new Blob([JSON.stringify(assetType)], { type: "application/json", })); - } - if (assetData !== undefined) { localVarFormParams.append('assetData', assetData as any); } @@ -5724,10 +5706,6 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarFormParams.append('isReadOnly', isReadOnly as any); } - if (fileExtension !== undefined) { - localVarFormParams.append('fileExtension', fileExtension as any); - } - if (deviceAssetId !== undefined) { localVarFormParams.append('deviceAssetId', deviceAssetId as any); } @@ -6041,9 +6019,7 @@ export const AssetApiFp = function(configuration?: Configuration) { }, /** * - * @param {AssetTypeEnum} assetType * @param {File} assetData - * @param {string} fileExtension * @param {string} deviceAssetId * @param {string} deviceId * @param {string} fileCreatedAt @@ -6059,8 +6035,8 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(assetType: AssetTypeEnum, assetData: File, fileExtension: string, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, fileExtension, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, key, livePhotoData, sidecarData, isReadOnly, isArchived, isVisible, duration, options); + async uploadFile(assetData: File, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, key, livePhotoData, sidecarData, isReadOnly, isArchived, isVisible, duration, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -6291,7 +6267,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ uploadFile(requestParameters: AssetApiUploadFileRequest, options?: AxiosRequestConfig): AxiosPromise { - return localVarFp.uploadFile(requestParameters.assetType, requestParameters.assetData, requestParameters.fileExtension, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.fileCreatedAt, requestParameters.fileModifiedAt, requestParameters.isFavorite, requestParameters.key, requestParameters.livePhotoData, requestParameters.sidecarData, requestParameters.isReadOnly, requestParameters.isArchived, requestParameters.isVisible, requestParameters.duration, options).then((request) => request(axios, basePath)); + return localVarFp.uploadFile(requestParameters.assetData, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.fileCreatedAt, requestParameters.fileModifiedAt, requestParameters.isFavorite, requestParameters.key, requestParameters.livePhotoData, requestParameters.sidecarData, requestParameters.isReadOnly, requestParameters.isArchived, requestParameters.isVisible, requestParameters.duration, options).then((request) => request(axios, basePath)); }, }; }; @@ -6715,13 +6691,6 @@ export interface AssetApiUpdateAssetRequest { * @interface AssetApiUploadFileRequest */ export interface AssetApiUploadFileRequest { - /** - * - * @type {AssetTypeEnum} - * @memberof AssetApiUploadFile - */ - readonly assetType: AssetTypeEnum - /** * * @type {File} @@ -6729,13 +6698,6 @@ export interface AssetApiUploadFileRequest { */ readonly assetData: File - /** - * - * @type {string} - * @memberof AssetApiUploadFile - */ - readonly fileExtension: string - /** * * @type {string} @@ -7095,7 +7057,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public uploadFile(requestParameters: AssetApiUploadFileRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).uploadFile(requestParameters.assetType, requestParameters.assetData, requestParameters.fileExtension, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.fileCreatedAt, requestParameters.fileModifiedAt, requestParameters.isFavorite, requestParameters.key, requestParameters.livePhotoData, requestParameters.sidecarData, requestParameters.isReadOnly, requestParameters.isArchived, requestParameters.isVisible, requestParameters.duration, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).uploadFile(requestParameters.assetData, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.fileCreatedAt, requestParameters.fileModifiedAt, requestParameters.isFavorite, requestParameters.key, requestParameters.livePhotoData, requestParameters.sidecarData, requestParameters.isReadOnly, requestParameters.isArchived, requestParameters.isVisible, requestParameters.duration, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/mobile/openapi/doc/AssetApi.md b/mobile/openapi/doc/AssetApi.md index c71b4151d3adf98aef58c2fbed5757cba6e74eaf..998836d09f6650227b8491db5b1e2e8732a4bd82 100644 GIT binary patch delta 50 zcmZ3zjd{x!<_!U7SzHoJ5;y0a-NiCF;F9s?y_d?Fz(SMr&Q6~E^y=fuEZ3Dc`&_@z F3;<%v7{UMm delta 252 zcmdn8g?aTh<_!U7cNRGxPH%@3}I0^YgRn zEE*tn3bqQ?3i|pAjv&<_0oT0JT!k71uC&aknrlj|=V%c7V8)P=&I9C%QC@&t3X z&5oDKnF!dwdC!$HMq`jwT3SGhqP4V8?AFqX)j$!@%T3X&Q2?r(ta(j`7uDJcha@(K IUc1i>00F~bs{jB1 diff --git a/mobile/openapi/doc/ImportAssetDto.md b/mobile/openapi/doc/ImportAssetDto.md index da612b0abccf785753179fa9a0657540e8afbc85..408e3519cf28b7555c279812794a64d47b2b3d93 100644 GIT binary patch delta 11 ScmbQrev@s&&CQ~W4NL$WX9O?+ delta 68 zcmcb~HkEzCP0PgM;?$Cm%7RoaErl9|Xe}*An1E|uX|9%5tOkmJUT%seP#q9$yw=PF E0ATbOk^lez diff --git a/mobile/openapi/lib/api/asset_api.dart b/mobile/openapi/lib/api/asset_api.dart index a73ec3b1ec224aede71ed2ee04971bd69a7d4a17..1c609a7277d05ec9717ebdc548150f4ac9609a30 100644 GIT binary patch delta 88 zcmbQ=&wRg&dBcN^lcyczpKNkKck`qJHyJ12w&$9hvPFFInnMbkPi^_hwAp5d0n_4- hyI7HwF)~4=85t)l@QF|Uby$YQC9x!Nv&oTcW&oNFDM0`L delta 373 zcmccL#XP^CdBcN^lNFR%g+nR}QeE>(b7K_}i;GiBK-|d_5@aSn*l5F>mYI|4T2Ydk zSDcxj2NvBhk#DoorZ0?=jxfa_y$G#33X|s?P(anVS$7K)Gc(ZO$rHG~Hv8=qWF^}_ml-FQ9MB-qPh5lF84Qc_iZx8DPvzip32$M@4 Eap74Lz5oCK delta 255 zcmdmJxyO1#9iv21YGG++QEG}pNk(R|USe@^YDq|CL8{K?N=9QwaYq>6HLo;R0WQ0F zInzBhF*sMj))q;wjFW>&6fUQikyxDJoS%}asi3{Ng8MQfLYu7$T$PT(W^djsMj5z( zdaQyinv*s! => { - // verify required parameter 'assetType' is not null or undefined - assertParamExists('uploadFile', 'assetType', assetType) + uploadFile: async (assetData: File, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'assetData' is not null or undefined assertParamExists('uploadFile', 'assetData', assetData) - // verify required parameter 'fileExtension' is not null or undefined - assertParamExists('uploadFile', 'fileExtension', fileExtension) // verify required parameter 'deviceAssetId' is not null or undefined assertParamExists('uploadFile', 'deviceAssetId', deviceAssetId) // verify required parameter 'deviceId' is not null or undefined @@ -5713,10 +5699,6 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration } - if (assetType !== undefined) { - localVarFormParams.append('assetType', new Blob([JSON.stringify(assetType)], { type: "application/json", })); - } - if (assetData !== undefined) { localVarFormParams.append('assetData', assetData as any); } @@ -5733,10 +5715,6 @@ export const AssetApiAxiosParamCreator = function (configuration?: Configuration localVarFormParams.append('isReadOnly', isReadOnly as any); } - if (fileExtension !== undefined) { - localVarFormParams.append('fileExtension', fileExtension as any); - } - if (deviceAssetId !== undefined) { localVarFormParams.append('deviceAssetId', deviceAssetId as any); } @@ -6050,9 +6028,7 @@ export const AssetApiFp = function(configuration?: Configuration) { }, /** * - * @param {AssetTypeEnum} assetType * @param {File} assetData - * @param {string} fileExtension * @param {string} deviceAssetId * @param {string} deviceId * @param {string} fileCreatedAt @@ -6068,8 +6044,8 @@ export const AssetApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async uploadFile(assetType: AssetTypeEnum, assetData: File, fileExtension: string, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetType, assetData, fileExtension, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, key, livePhotoData, sidecarData, isReadOnly, isArchived, isVisible, duration, options); + async uploadFile(assetData: File, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, key, livePhotoData, sidecarData, isReadOnly, isArchived, isVisible, duration, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -6316,9 +6292,7 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath }, /** * - * @param {AssetTypeEnum} assetType * @param {File} assetData - * @param {string} fileExtension * @param {string} deviceAssetId * @param {string} deviceId * @param {string} fileCreatedAt @@ -6334,8 +6308,8 @@ export const AssetApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - uploadFile(assetType: AssetTypeEnum, assetData: File, fileExtension: string, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options?: any): AxiosPromise { - return localVarFp.uploadFile(assetType, assetData, fileExtension, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, key, livePhotoData, sidecarData, isReadOnly, isArchived, isVisible, duration, options).then((request) => request(axios, basePath)); + uploadFile(assetData: File, deviceAssetId: string, deviceId: string, fileCreatedAt: string, fileModifiedAt: string, isFavorite: boolean, key?: string, livePhotoData?: File, sidecarData?: File, isReadOnly?: boolean, isArchived?: boolean, isVisible?: boolean, duration?: string, options?: any): AxiosPromise { + return localVarFp.uploadFile(assetData, deviceAssetId, deviceId, fileCreatedAt, fileModifiedAt, isFavorite, key, livePhotoData, sidecarData, isReadOnly, isArchived, isVisible, duration, options).then((request) => request(axios, basePath)); }, }; }; @@ -6759,13 +6733,6 @@ export interface AssetApiUpdateAssetRequest { * @interface AssetApiUploadFileRequest */ export interface AssetApiUploadFileRequest { - /** - * - * @type {AssetTypeEnum} - * @memberof AssetApiUploadFile - */ - readonly assetType: AssetTypeEnum - /** * * @type {File} @@ -6773,13 +6740,6 @@ export interface AssetApiUploadFileRequest { */ readonly assetData: File - /** - * - * @type {string} - * @memberof AssetApiUploadFile - */ - readonly fileExtension: string - /** * * @type {string} @@ -7139,7 +7099,7 @@ export class AssetApi extends BaseAPI { * @memberof AssetApi */ public uploadFile(requestParameters: AssetApiUploadFileRequest, options?: AxiosRequestConfig) { - return AssetApiFp(this.configuration).uploadFile(requestParameters.assetType, requestParameters.assetData, requestParameters.fileExtension, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.fileCreatedAt, requestParameters.fileModifiedAt, requestParameters.isFavorite, requestParameters.key, requestParameters.livePhotoData, requestParameters.sidecarData, requestParameters.isReadOnly, requestParameters.isArchived, requestParameters.isVisible, requestParameters.duration, options).then((request) => request(this.axios, this.basePath)); + return AssetApiFp(this.configuration).uploadFile(requestParameters.assetData, requestParameters.deviceAssetId, requestParameters.deviceId, requestParameters.fileCreatedAt, requestParameters.fileModifiedAt, requestParameters.isFavorite, requestParameters.key, requestParameters.livePhotoData, requestParameters.sidecarData, requestParameters.isReadOnly, requestParameters.isArchived, requestParameters.isVisible, requestParameters.duration, options).then((request) => request(this.axios, this.basePath)); } }