diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 7e07afbd..1035838e 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -451,8 +451,9 @@ class SupermarketViewSet(viewsets.ModelViewSet, StandardFilterMixin): return super().get_queryset() -class SupermarketCategoryViewSet(viewsets.ModelViewSet, StandardFilterMixin): +class SupermarketCategoryViewSet(viewsets.ModelViewSet, FuzzyFilterMixin): queryset = SupermarketCategory.objects + model = SupermarketCategory serializer_class = SupermarketCategorySerializer permission_classes = [CustomIsUser] diff --git a/vue/src/components/GenericMultiselect.vue b/vue/src/components/GenericMultiselect.vue index f391a739..5c09566b 100644 --- a/vue/src/components/GenericMultiselect.vue +++ b/vue/src/components/GenericMultiselect.vue @@ -149,12 +149,14 @@ export default { methods: { // this.genericAPI inherited from ApiMixin search: function (query) { + let options = { page: 1, pageSize: this.limit, query: query, limit: this.limit, } + console.log(query, options) this.genericAPI(this.model, this.Actions.LIST, options).then((result) => { this.objects = this.sticky_options.concat(result.data?.results ?? result.data) if (this.nothingSelected && this.objects.length > 0) { @@ -184,10 +186,10 @@ export default { }, addNew(e) { //TODO add ability to choose field name other than "name" - console.log('CREATEING NEW with -> ' , e) + console.log('CREATEING NEW with -> ', e) this.genericAPI(this.model, this.Actions.CREATE, {name: e}).then(result => { let createdObj = result.data?.results ?? result.data - StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_CREATE) + StandardToasts.makeStandardToast(this, StandardToasts.SUCCESS_CREATE) if (this.multiple) { this.selected_objects.push(createdObj) } else { @@ -196,7 +198,7 @@ export default { this.objects.push(createdObj) this.selectionChanged() }).catch((r, err) => { - StandardToasts.makeStandardToast(this,StandardToasts.FAIL_CREATE) + StandardToasts.makeStandardToast(this, StandardToasts.FAIL_CREATE) }) }, }, diff --git a/vue/src/utils/openapi/api.ts b/vue/src/utils/openapi/api.ts index 43ec95f1..b0570fd8 100644 --- a/vue/src/utils/openapi/api.ts +++ b/vue/src/utils/openapi/api.ts @@ -1341,10 +1341,10 @@ export interface InviteLink { email?: string; /** * - * @type {number} + * @type {InviteLinkGroup} * @memberof InviteLink */ - group: number; + group: InviteLinkGroup; /** * * @type {string} @@ -1370,6 +1370,25 @@ export interface InviteLink { */ created_at?: string; } +/** + * + * @export + * @interface InviteLinkGroup + */ +export interface InviteLinkGroup { + /** + * + * @type {number} + * @memberof InviteLinkGroup + */ + id?: number; + /** + * + * @type {string} + * @memberof InviteLinkGroup + */ + name: string; +} /** * * @export @@ -3033,10 +3052,10 @@ export interface Space { demo?: boolean; /** * - * @type {Array} + * @type {Array} * @memberof Space */ - food_inherit?: Array; + food_inherit: Array; /** * * @type {boolean} @@ -3547,10 +3566,10 @@ export interface UserPreference { mealplan_autoadd_shopping?: boolean; /** * - * @type {Array} + * @type {string} * @memberof UserPreference */ - food_inherit_default?: Array | null; + food_inherit_default?: string; /** * * @type {string} @@ -3689,10 +3708,16 @@ export interface UserSpace { space?: string; /** * - * @type {Array} + * @type {Array} * @memberof UserSpace */ - groups: Array; + groups: Array; + /** + * + * @type {boolean} + * @memberof UserSpace + */ + active?: boolean; /** * * @type {string} @@ -3706,25 +3731,6 @@ export interface UserSpace { */ updated_at?: string; } -/** - * - * @export - * @interface UserSpaceGroups - */ -export interface UserSpaceGroups { - /** - * - * @type {number} - * @memberof UserSpaceGroups - */ - id?: number; - /** - * - * @type {string} - * @memberof UserSpaceGroups - */ - name: string; -} /** * * @export @@ -4643,39 +4649,6 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) options: localVarRequestOptions, }; }, - /** - * - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createUserPreference: async (userPreference?: UserPreference, options: any = {}): Promise => { - const localVarPath = `/api/user-preference/`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - 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(userPreference, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * * @param {ViewLog} [viewLog] @@ -5591,39 +5564,6 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - destroyUserPreference: async (user: string, options: any = {}): Promise => { - // verify required parameter 'user' is not null or undefined - assertParamExists('destroyUserPreference', 'user', user) - const localVarPath = `/api/user-preference/{user}/` - .replace(`{${"user"}}`, encodeURIComponent(String(user))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -6724,10 +6664,11 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) }, /** * + * @param {string} [query] Query string matched against supermarket-category name. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSupermarketCategorys: async (options: any = {}): Promise => { + listSupermarketCategorys: async (query?: string, options: any = {}): Promise => { const localVarPath = `/api/supermarket-category/`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -6740,6 +6681,10 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (query !== undefined) { + localVarQueryParameter['query'] = query; + } + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); @@ -7038,6 +6983,35 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * function to reset inheritance from api, see food method for docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listresetFoodInheritances: async (options: any = {}): Promise => { + const localVarPath = `/api/reset-food-inheritance/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -9530,6 +9504,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * api endpoint to switch space function + * @param {string} spaceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveswitchActiveSpace: async (spaceId: string, options: any = {}): Promise => { + // verify required parameter 'spaceId' is not null or undefined + assertParamExists('retrieveswitchActiveSpace', 'spaceId', spaceId) + const localVarPath = `/api/switch-active-space/{space_id}/` + .replace(`{${"space_id"}}`, encodeURIComponent(String(spaceId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -10597,80 +10604,6 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration) options: localVarRequestOptions, }; }, - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUserPreference: async (user: string, userPreference?: UserPreference, options: any = {}): Promise => { - // verify required parameter 'user' is not null or undefined - assertParamExists('updateUserPreference', 'user', user) - const localVarPath = `/api/user-preference/{user}/` - .replace(`{${"user"}}`, encodeURIComponent(String(user))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - 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(userPreference, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @param {string} id A unique integer value identifying this user space. - * @param {UserSpace} [userSpace] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUserSpace: async (id: string, userSpace?: UserSpace, options: any = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('updateUserSpace', 'id', id) - const localVarPath = `/api/user-space/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - 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(userSpace, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * * @param {string} id A unique integer value identifying this view log. @@ -10981,16 +10914,6 @@ export const ApiApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.createUserFile(name, file, fileSizeKb, id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createUserPreference(userPreference?: UserPreference, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createUserPreference(userPreference, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * * @param {ViewLog} [viewLog] @@ -11271,16 +11194,6 @@ export const ApiApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.destroyUserFile(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async destroyUserPreference(user: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.destroyUserPreference(user, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * * @param {string} id A unique integer value identifying this user space. @@ -11587,11 +11500,12 @@ export const ApiApiFp = function(configuration?: Configuration) { }, /** * + * @param {string} [query] Query string matched against supermarket-category name. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listSupermarketCategorys(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSupermarketCategorys(options); + async listSupermarketCategorys(query?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listSupermarketCategorys(query, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -11682,6 +11596,15 @@ export const ApiApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.listViewLogs(page, pageSize, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * function to reset inheritance from api, see food method for docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listresetFoodInheritances(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listresetFoodInheritances(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @param {string} id A unique integer value identifying this food. @@ -12425,6 +12348,16 @@ export const ApiApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveViewLog(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * api endpoint to switch space function + * @param {string} spaceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveswitchActiveSpace(spaceId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveswitchActiveSpace(spaceId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @param {string} id A unique integer value identifying this food. @@ -12736,28 +12669,6 @@ export const ApiApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserFile(id, name, file, fileSizeKb, id2, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateUserPreference(user: string, userPreference?: UserPreference, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserPreference(user, userPreference, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * - * @param {string} id A unique integer value identifying this user space. - * @param {UserSpace} [userSpace] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async updateUserSpace(id: string, userSpace?: UserSpace, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateUserSpace(id, userSpace, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * * @param {string} id A unique integer value identifying this view log. @@ -13016,15 +12927,6 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?: createUserFile(name: string, file?: any, fileSizeKb?: number, id?: number, options?: any): AxiosPromise { return localVarFp.createUserFile(name, file, fileSizeKb, id, options).then((request) => request(axios, basePath)); }, - /** - * - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createUserPreference(userPreference?: UserPreference, options?: any): AxiosPromise { - return localVarFp.createUserPreference(userPreference, options).then((request) => request(axios, basePath)); - }, /** * * @param {ViewLog} [viewLog] @@ -13277,15 +13179,6 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?: destroyUserFile(id: string, options?: any): AxiosPromise { return localVarFp.destroyUserFile(id, options).then((request) => request(axios, basePath)); }, - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - destroyUserPreference(user: string, options?: any): AxiosPromise { - return localVarFp.destroyUserPreference(user, options).then((request) => request(axios, basePath)); - }, /** * * @param {string} id A unique integer value identifying this user space. @@ -13565,11 +13458,12 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?: }, /** * + * @param {string} [query] Query string matched against supermarket-category name. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSupermarketCategorys(options?: any): AxiosPromise> { - return localVarFp.listSupermarketCategorys(options).then((request) => request(axios, basePath)); + listSupermarketCategorys(query?: string, options?: any): AxiosPromise> { + return localVarFp.listSupermarketCategorys(query, options).then((request) => request(axios, basePath)); }, /** * @@ -13650,6 +13544,14 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?: listViewLogs(page?: number, pageSize?: number, options?: any): AxiosPromise { return localVarFp.listViewLogs(page, pageSize, options).then((request) => request(axios, basePath)); }, + /** + * function to reset inheritance from api, see food method for docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listresetFoodInheritances(options?: any): AxiosPromise> { + return localVarFp.listresetFoodInheritances(options).then((request) => request(axios, basePath)); + }, /** * * @param {string} id A unique integer value identifying this food. @@ -14323,6 +14225,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?: retrieveViewLog(id: string, options?: any): AxiosPromise { return localVarFp.retrieveViewLog(id, options).then((request) => request(axios, basePath)); }, + /** + * api endpoint to switch space function + * @param {string} spaceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveswitchActiveSpace(spaceId: string, options?: any): AxiosPromise { + return localVarFp.retrieveswitchActiveSpace(spaceId, options).then((request) => request(axios, basePath)); + }, /** * * @param {string} id A unique integer value identifying this food. @@ -14606,26 +14517,6 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?: updateUserFile(id: string, name: string, file?: any, fileSizeKb?: number, id2?: number, options?: any): AxiosPromise { return localVarFp.updateUserFile(id, name, file, fileSizeKb, id2, options).then((request) => request(axios, basePath)); }, - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUserPreference(user: string, userPreference?: UserPreference, options?: any): AxiosPromise { - return localVarFp.updateUserPreference(user, userPreference, options).then((request) => request(axios, basePath)); - }, - /** - * - * @param {string} id A unique integer value identifying this user space. - * @param {UserSpace} [userSpace] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateUserSpace(id: string, userSpace?: UserSpace, options?: any): AxiosPromise { - return localVarFp.updateUserSpace(id, userSpace, options).then((request) => request(axios, basePath)); - }, /** * * @param {string} id A unique integer value identifying this view log. @@ -14935,17 +14826,6 @@ export class ApiApi extends BaseAPI { return ApiApiFp(this.configuration).createUserFile(name, file, fileSizeKb, id, options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ApiApi - */ - public createUserPreference(userPreference?: UserPreference, options?: any) { - return ApiApiFp(this.configuration).createUserPreference(userPreference, options).then((request) => request(this.axios, this.basePath)); - } - /** * * @param {ViewLog} [viewLog] @@ -15254,17 +15134,6 @@ export class ApiApi extends BaseAPI { return ApiApiFp(this.configuration).destroyUserFile(id, options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ApiApi - */ - public destroyUserPreference(user: string, options?: any) { - return ApiApiFp(this.configuration).destroyUserPreference(user, options).then((request) => request(this.axios, this.basePath)); - } - /** * * @param {string} id A unique integer value identifying this user space. @@ -15598,12 +15467,13 @@ export class ApiApi extends BaseAPI { /** * + * @param {string} [query] Query string matched against supermarket-category name. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ApiApi */ - public listSupermarketCategorys(options?: any) { - return ApiApiFp(this.configuration).listSupermarketCategorys(options).then((request) => request(this.axios, this.basePath)); + public listSupermarketCategorys(query?: string, options?: any) { + return ApiApiFp(this.configuration).listSupermarketCategorys(query, options).then((request) => request(this.axios, this.basePath)); } /** @@ -15703,6 +15573,16 @@ export class ApiApi extends BaseAPI { return ApiApiFp(this.configuration).listViewLogs(page, pageSize, options).then((request) => request(this.axios, this.basePath)); } + /** + * function to reset inheritance from api, see food method for docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiApi + */ + public listresetFoodInheritances(options?: any) { + return ApiApiFp(this.configuration).listresetFoodInheritances(options).then((request) => request(this.axios, this.basePath)); + } + /** * * @param {string} id A unique integer value identifying this food. @@ -16516,6 +16396,17 @@ export class ApiApi extends BaseAPI { return ApiApiFp(this.configuration).retrieveViewLog(id, options).then((request) => request(this.axios, this.basePath)); } + /** + * api endpoint to switch space function + * @param {string} spaceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ApiApi + */ + public retrieveswitchActiveSpace(spaceId: string, options?: any) { + return ApiApiFp(this.configuration).retrieveswitchActiveSpace(spaceId, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @param {string} id A unique integer value identifying this food. @@ -16855,30 +16746,6 @@ export class ApiApi extends BaseAPI { return ApiApiFp(this.configuration).updateUserFile(id, name, file, fileSizeKb, id2, options).then((request) => request(this.axios, this.basePath)); } - /** - * - * @param {string} user A unique value identifying this user preference. - * @param {UserPreference} [userPreference] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ApiApi - */ - public updateUserPreference(user: string, userPreference?: UserPreference, options?: any) { - return ApiApiFp(this.configuration).updateUserPreference(user, userPreference, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @param {string} id A unique integer value identifying this user space. - * @param {UserSpace} [userSpace] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ApiApi - */ - public updateUserSpace(id: string, userSpace?: UserSpace, options?: any) { - return ApiApiFp(this.configuration).updateUserSpace(id, userSpace, options).then((request) => request(this.axios, this.basePath)); - } - /** * * @param {string} id A unique integer value identifying this view log.