mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
added basic support for files
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-md-12">
|
||||
<h3>{{ $t('Files') }} <a class="btn btn-success float-right"><i class="fas fa-plus-circle"></i> {{ $t('New') }}</a>
|
||||
<h3>{{ $t('Files') }} <span class="float-right"><file-editor @change="loadInitial()" ></file-editor></span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<div class="row" style="margin-top: 2vh">
|
||||
<div class="col col-md-12">
|
||||
<b-progress :max="max_file_size_mb">
|
||||
<b-progress-bar :value="current_file_size_mb">
|
||||
<span><strong>{{ current_file_size_mb.toFixed(2) }} / {{ max_file_size_mb }} MB</strong></span>
|
||||
<b-progress-bar :value="current_file_size_mb" >
|
||||
<span><strong class="text-dark ">{{ current_file_size_mb.toFixed(2) }} / {{ max_file_size_mb }} MB</strong></span>
|
||||
</b-progress-bar>
|
||||
</b-progress>
|
||||
</div>
|
||||
@@ -29,11 +29,16 @@
|
||||
<tr>
|
||||
<th>{{ $t('Name') }}</th>
|
||||
<th>{{ $t('Size') }} (MB)</th>
|
||||
<th>{{ $t('Edit') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="f in files" v-bind:key="f.id">
|
||||
<td>{{ f.name }}</td>
|
||||
<td>{{ f.file_size_kb / 1000 }}</td>
|
||||
<td><a :href="f.file" target="_blank" rel="noreferrer nofollow">{{$t('Download')}}</a></td>
|
||||
<td>
|
||||
<file-editor @change="loadInitial()" :file_id="f.id"></file-editor>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -58,6 +63,7 @@ Vue.use(BootstrapVue)
|
||||
// import draggable from 'vuedraggable'
|
||||
|
||||
import axios from 'axios'
|
||||
import FileEditor from "@/components/FileEditor";
|
||||
// import Multiselect from "vue-multiselect";
|
||||
|
||||
axios.defaults.xsrfHeaderName = 'X-CSRFToken'
|
||||
@@ -70,8 +76,7 @@ export default {
|
||||
ToastMixin,
|
||||
],
|
||||
components: {
|
||||
// Multiselect,
|
||||
// draggable
|
||||
FileEditor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -91,19 +96,6 @@ export default {
|
||||
apiClient.listUserFiles().then(results => {
|
||||
this.files = results.data
|
||||
})
|
||||
|
||||
},
|
||||
supermarketModalOk: function () {
|
||||
let apiClient = new ApiApiFactory()
|
||||
if (this.selected_supermarket.new) {
|
||||
apiClient.createSupermarket({name: this.selected_supermarket.name}).then(results => {
|
||||
this.selected_supermarket = undefined
|
||||
this.loadInitial()
|
||||
})
|
||||
} else {
|
||||
apiClient.partialUpdateSupermarket(this.selected_supermarket.id, {name: this.selected_supermarket.name})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
93
vue/src/components/FileEditor.vue
Normal file
93
vue/src/components/FileEditor.vue
Normal file
@@ -0,0 +1,93 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<b-button v-b-modal="'modal-file-editor'+file_id" v-bind:class="{'btn-success': (file_id === undefined)}">
|
||||
<template v-if="this.file_id">{{ $t('Edit') }}</template>
|
||||
<template v-else>{{ $t('New') }}</template>
|
||||
</b-button>
|
||||
|
||||
<b-modal :id="'modal-file-editor'+file_id" v-bind:title="$t('File')" @ok="modalOk()">
|
||||
<template v-if="file!==undefined">
|
||||
{{ $t('Name') }}
|
||||
<b-input v-model="file.name"></b-input>
|
||||
|
||||
{{ $t('File') }}
|
||||
<b-form-file v-model="file.file"></b-form-file>
|
||||
</template>
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {ApiApiFactory} from "@/utils/openapi/api";
|
||||
import {makeToast} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "FileEditor",
|
||||
data() {
|
||||
return {
|
||||
file: undefined
|
||||
}
|
||||
},
|
||||
props: {
|
||||
file_id: Number,
|
||||
},
|
||||
mounted() {
|
||||
if (this.file_id !== undefined) {
|
||||
this.loadFile(this.file_id.toString())
|
||||
} else {
|
||||
this.file = {
|
||||
name: '',
|
||||
file: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadFile: function (id) {
|
||||
let apiClient = new ApiApiFactory()
|
||||
|
||||
apiClient.retrieveUserFile(id).then(result => {
|
||||
this.file = result.data
|
||||
})
|
||||
},
|
||||
modalOk: function () {
|
||||
if (this.file_id === undefined) {
|
||||
console.log('CREATING')
|
||||
this.createFile()
|
||||
} else {
|
||||
console.log('UPDATING')
|
||||
this.updateFile()
|
||||
}
|
||||
},
|
||||
updateFile: function () {
|
||||
let apiClient = new ApiApiFactory()
|
||||
|
||||
let passedFile = undefined
|
||||
if (!(typeof this.file.file === 'string' || this.file.file instanceof String)) { // only update file if it was changed
|
||||
passedFile = this.file.file
|
||||
}
|
||||
console.log(passedFile)
|
||||
|
||||
apiClient.updateUserFile(this.file.id, this.file.name, passedFile).then(request => {
|
||||
makeToast(this.$t('Success'), this.$t('success_updating_resource'), 'success')
|
||||
this.$emit('change',)
|
||||
}).catch(err => {
|
||||
makeToast(this.$t('Error'), this.$t('err_updating_resource'), 'danger')
|
||||
console.log(err.request, err.response)
|
||||
})
|
||||
},
|
||||
createFile: function () {
|
||||
let apiClient = new ApiApiFactory()
|
||||
|
||||
apiClient.createUserFile(this.file.name, this.file.file).then(request => {
|
||||
makeToast(this.$t('Success'), this.$t('success_creating_resource'), 'success')
|
||||
|
||||
this.$emit('change',)
|
||||
}).catch(err => {
|
||||
makeToast(this.$t('Error'), this.$t('err_creating_resource'), 'danger')
|
||||
console.log(err.request, err.response)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -34,19 +34,21 @@
|
||||
<table class="table table-sm">
|
||||
<!-- eslint-disable vue/no-v-for-template-key-on-child -->
|
||||
<template v-for="i in step.ingredients">
|
||||
<Ingredient v-bind:ingredient="i" :ingredient_factor="ingredient_factor" :key="i.id" @checked-state-changed="$emit('checked-state-changed', i)"></Ingredient>
|
||||
<Ingredient v-bind:ingredient="i" :ingredient_factor="ingredient_factor" :key="i.id"
|
||||
@checked-state-changed="$emit('checked-state-changed', i)"></Ingredient>
|
||||
</template>
|
||||
<!-- eslint-enable vue/no-v-for-template-key-on-child -->
|
||||
</table>
|
||||
</div>
|
||||
<div class="col" :class="{ 'col-md-8': recipe.steps.length > 1, 'col-md-12': recipe.steps.length <= 1,}">
|
||||
<compile-component :code="step.ingredients_markdown" :ingredient_factor="ingredient_factor"></compile-component>
|
||||
<compile-component :code="step.ingredients_markdown"
|
||||
:ingredient_factor="ingredient_factor"></compile-component>
|
||||
</div>
|
||||
</div>
|
||||
</b-collapse>
|
||||
</template>
|
||||
|
||||
<template v-if="step.type === 'TIME'">
|
||||
<template v-if="step.type === 'TIME' || step.type === 'FILE'">
|
||||
<div class="row">
|
||||
<div class="col-md-8 offset-md-2" style="text-align: center">
|
||||
<h4 class="text-primary">
|
||||
@@ -55,7 +57,8 @@
|
||||
</h4>
|
||||
<span style="margin-left: 4px" class="text-muted" v-if="step.time !== 0"><i class="fa fa-stopwatch"></i>
|
||||
{{ step.time }} {{ $t('min') }}</span>
|
||||
<b-link class="d-print-none" :id="`id_reactive_popover_${step.id}`" @click="openPopover" href="#" v-if="start_time !== ''">
|
||||
<b-link class="d-print-none" :id="`id_reactive_popover_${step.id}`" @click="openPopover" href="#"
|
||||
v-if="start_time !== ''">
|
||||
{{ moment(start_time).add(step.time_offset, 'minutes').format('HH:mm') }}
|
||||
</b-link>
|
||||
</div>
|
||||
@@ -71,12 +74,28 @@
|
||||
<b-collapse id="collapse-1" v-model="details_visible">
|
||||
<div class="row" v-if="step.instruction !== ''">
|
||||
<div class="col col-md-12" style="text-align: center">
|
||||
<compile-component :code="step.ingredients_markdown" :ingredient_factor="ingredient_factor"></compile-component>
|
||||
<compile-component :code="step.ingredients_markdown"
|
||||
:ingredient_factor="ingredient_factor"></compile-component>
|
||||
</div>
|
||||
</div>
|
||||
</b-collapse>
|
||||
</template>
|
||||
|
||||
<div class="row" style="text-align: center">
|
||||
<div class="col col-md-12">
|
||||
<template v-if="step.file !== null">
|
||||
<div
|
||||
v-if="step.file.file.includes('.png') || recipe.file_path.includes('.jpg') || recipe.file_path.includes('.jpeg') || recipe.file_path.includes('.gif')">
|
||||
<img :src="step.file.file" style="max-width: 50vw; max-height: 50vh">
|
||||
</div>
|
||||
<div v-else>
|
||||
<a :href="step.file.file" target="_blank" rel="noreferrer nofollow">{{ $t('Download') }} {{ $t('File') }}</a>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="start_time !== ''">
|
||||
<b-popover
|
||||
:target="`id_reactive_popover_${step.id}`"
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
{
|
||||
"err_fetching_resource": "There was an error fetching a resource!",
|
||||
"err_creating_resource": "There was an error creating a resource!",
|
||||
"err_updating_resource": "There was an error updating a resource!",
|
||||
"success_fetching_resource": "Successfully fetched a resource!",
|
||||
"success_creating_resource": "Successfully created a resource!",
|
||||
"success_updating_resource": "Successfully updated a resource!",
|
||||
|
||||
"import_running": "Import running, please wait!",
|
||||
"all_fields_optional": "All fields are optional and can be left empty.",
|
||||
"convert_internal": "Convert to internal recipe",
|
||||
@@ -38,6 +45,7 @@
|
||||
"Close": "Close",
|
||||
"Add": "Add",
|
||||
"New": "New",
|
||||
"Success": "Success",
|
||||
"Ingredients": "Ingredients",
|
||||
"Supermarket": "Supermarket",
|
||||
"Categories": "Categories",
|
||||
@@ -50,6 +58,7 @@
|
||||
"External": "External",
|
||||
"Size": "Size",
|
||||
"Files": "Files",
|
||||
"File": "File",
|
||||
"Edit": "Edit",
|
||||
"Open": "Open",
|
||||
"Save": "Save",
|
||||
@@ -60,5 +69,6 @@
|
||||
"Settings": "Settings",
|
||||
"or": "or",
|
||||
"and": "and",
|
||||
"Information": "Information"
|
||||
"Information": "Information",
|
||||
"Download": "Download"
|
||||
}
|
||||
@@ -1778,18 +1778,18 @@ export interface Unit {
|
||||
* @interface UserFile
|
||||
*/
|
||||
export interface UserFile {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UserFile
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UserFile
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof UserFile
|
||||
*/
|
||||
file?: any;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
@@ -1798,10 +1798,10 @@ export interface UserFile {
|
||||
file_size_kb?: number;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @type {number}
|
||||
* @memberof UserFile
|
||||
*/
|
||||
file: any;
|
||||
id?: number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -2634,11 +2634,16 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUserFile: async (userFile?: UserFile, options: any = {}): Promise<RequestArgs> => {
|
||||
createUserFile: async (name: string, file?: any, fileSizeKb?: number, id?: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('createUserFile', 'name', name)
|
||||
const localVarPath = `/api/user-file/`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@@ -2650,15 +2655,32 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
||||
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarFormParams.append('name', name as any);
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
localVarFormParams.append('file', file as any);
|
||||
}
|
||||
|
||||
if (fileSizeKb !== undefined) {
|
||||
localVarFormParams.append('file_size_kb', fileSizeKb as any);
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarFormParams.append('id', id as any);
|
||||
}
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(userFile, localVarRequestOptions, configuration)
|
||||
localVarRequestOptions.data = localVarFormParams;
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
@@ -5055,13 +5077,18 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
partialUpdateUserFile: async (id: string, userFile?: UserFile, options: any = {}): Promise<RequestArgs> => {
|
||||
partialUpdateUserFile: async (id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('partialUpdateUserFile', 'id', id)
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('partialUpdateUserFile', 'name', name)
|
||||
const localVarPath = `/api/user-file/{id}/`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
@@ -5074,15 +5101,32 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
||||
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarFormParams.append('name', name as any);
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
localVarFormParams.append('file', file as any);
|
||||
}
|
||||
|
||||
if (fileSizeKb !== undefined) {
|
||||
localVarFormParams.append('file_size_kb', fileSizeKb as any);
|
||||
}
|
||||
|
||||
if (id2 !== undefined) {
|
||||
localVarFormParams.append('id', id2 as any);
|
||||
}
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(userFile, localVarRequestOptions, configuration)
|
||||
localVarRequestOptions.data = localVarFormParams;
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
@@ -6731,13 +6775,18 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUserFile: async (id: string, userFile?: UserFile, options: any = {}): Promise<RequestArgs> => {
|
||||
updateUserFile: async (id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options: any = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('updateUserFile', 'id', id)
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('updateUserFile', 'name', name)
|
||||
const localVarPath = `/api/user-file/{id}/`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
@@ -6750,15 +6799,32 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
||||
|
||||
|
||||
if (name !== undefined) {
|
||||
localVarFormParams.append('name', name as any);
|
||||
}
|
||||
|
||||
if (file !== undefined) {
|
||||
localVarFormParams.append('file', file as any);
|
||||
}
|
||||
|
||||
if (fileSizeKb !== undefined) {
|
||||
localVarFormParams.append('file_size_kb', fileSizeKb as any);
|
||||
}
|
||||
|
||||
if (id2 !== undefined) {
|
||||
localVarFormParams.append('id', id2 as any);
|
||||
}
|
||||
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(userFile, localVarRequestOptions, configuration)
|
||||
localVarRequestOptions.data = localVarFormParams;
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
@@ -7051,12 +7117,15 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createUserFile(userFile?: UserFile, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserFile>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUserFile(userFile, options);
|
||||
async createUserFile(name: string, file?: any, fileSizeKb?: number, id?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserFile>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createUserFile(name, file, fileSizeKb, id, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -7779,12 +7848,15 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async partialUpdateUserFile(id: string, userFile?: UserFile, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserFile>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateUserFile(id, userFile, options);
|
||||
async partialUpdateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserFile>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateUserFile(id, name, file, fileSizeKb, id2, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -8282,12 +8354,15 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateUserFile(id: string, userFile?: UserFile, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserFile>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserFile(id, userFile, options);
|
||||
async updateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserFile>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserFile(id, name, file, fileSizeKb, id2, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@@ -8504,12 +8579,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createUserFile(userFile?: UserFile, options?: any): AxiosPromise<UserFile> {
|
||||
return localVarFp.createUserFile(userFile, options).then((request) => request(axios, basePath));
|
||||
createUserFile(name: string, file?: any, fileSizeKb?: number, id?: number, options?: any): AxiosPromise<UserFile> {
|
||||
return localVarFp.createUserFile(name, file, fileSizeKb, id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -9160,12 +9238,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
partialUpdateUserFile(id: string, userFile?: UserFile, options?: any): AxiosPromise<UserFile> {
|
||||
return localVarFp.partialUpdateUserFile(id, userFile, options).then((request) => request(axios, basePath));
|
||||
partialUpdateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any): AxiosPromise<UserFile> {
|
||||
return localVarFp.partialUpdateUserFile(id, name, file, fileSizeKb, id2, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -9615,12 +9696,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateUserFile(id: string, userFile?: UserFile, options?: any): AxiosPromise<UserFile> {
|
||||
return localVarFp.updateUserFile(id, userFile, options).then((request) => request(axios, basePath));
|
||||
updateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any): AxiosPromise<UserFile> {
|
||||
return localVarFp.updateUserFile(id, name, file, fileSizeKb, id2, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@@ -9874,13 +9958,16 @@ export class ApiApi extends BaseAPI {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiApi
|
||||
*/
|
||||
public createUserFile(userFile?: UserFile, options?: any) {
|
||||
return ApiApiFp(this.configuration).createUserFile(userFile, options).then((request) => request(this.axios, this.basePath));
|
||||
public createUserFile(name: string, file?: any, fileSizeKb?: number, id?: number, options?: any) {
|
||||
return ApiApiFp(this.configuration).createUserFile(name, file, fileSizeKb, id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10674,13 +10761,16 @@ export class ApiApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiApi
|
||||
*/
|
||||
public partialUpdateUserFile(id: string, userFile?: UserFile, options?: any) {
|
||||
return ApiApiFp(this.configuration).partialUpdateUserFile(id, userFile, options).then((request) => request(this.axios, this.basePath));
|
||||
public partialUpdateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any) {
|
||||
return ApiApiFp(this.configuration).partialUpdateUserFile(id, name, file, fileSizeKb, id2, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -11225,13 +11315,16 @@ export class ApiApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @param {string} id A unique integer value identifying this user file.
|
||||
* @param {UserFile} [userFile]
|
||||
* @param {string} name
|
||||
* @param {any} [file]
|
||||
* @param {number} [fileSizeKb]
|
||||
* @param {number} [id2]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiApi
|
||||
*/
|
||||
public updateUserFile(id: string, userFile?: UserFile, options?: any) {
|
||||
return ApiApiFp(this.configuration).updateUserFile(id, userFile, options).then((request) => request(this.axios, this.basePath));
|
||||
public updateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any) {
|
||||
return ApiApiFp(this.configuration).updateUserFile(id, name, file, fileSizeKb, id2, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user