This commit is contained in:
Chris Scoggins
2022-02-01 10:13:58 -06:00
parent 203ff1a6ec
commit c45bf3a994
10 changed files with 159 additions and 173 deletions

View File

@@ -59,7 +59,7 @@ export class Models {
// MODELS - inherits and takes precedence over MODEL_TYPES and ACTIONS
static FOOD = {
name: "Food", // *OPTIONAL* : parameters will be built model -> model_type -> default
name: i18n.t("Food"), // *OPTIONAL* : parameters will be built model -> model_type -> default
apiName: "Food", // *REQUIRED* : the name that is used in api.ts for this model
model_type: this.TREE, // *OPTIONAL* : model specific params for api, if not present will attempt modeltype_create then default_create
paginated: true,
@@ -148,7 +148,7 @@ export class Models {
}
static KEYWORD = {
name: "Keyword", // *OPTIONAL: parameters will be built model -> model_type -> default
name: i18n.t("Keyword"), // *OPTIONAL: parameters will be built model -> model_type -> default
apiName: "Keyword",
model_type: this.TREE,
paginated: true,
@@ -191,7 +191,7 @@ export class Models {
}
static UNIT = {
name: "Unit",
name: i18n.t("Unit"),
apiName: "Unit",
paginated: true,
create: {
@@ -217,7 +217,7 @@ export class Models {
}
static SHOPPING_LIST = {
name: "Shopping_list",
name: i18n.t("Shopping_list"),
apiName: "ShoppingListEntry",
list: {
params: ["id", "checked", "supermarket", "options"],
@@ -246,7 +246,7 @@ export class Models {
}
static RECIPE_BOOK = {
name: "Recipe_Book",
name: i18n.t("Recipe_Book"),
apiName: "RecipeBook",
create: {
params: [["name", "description", "icon", "filter"]],
@@ -283,7 +283,7 @@ export class Models {
}
static SHOPPING_CATEGORY = {
name: "Shopping_Category",
name: i18n.t("Shopping_Category"),
apiName: "SupermarketCategory",
create: {
params: [["name", "description"]],
@@ -307,7 +307,7 @@ export class Models {
}
static SHOPPING_CATEGORY_RELATION = {
name: "Shopping_Category_Relation",
name: i18n.t("Shopping_Category_Relation"),
apiName: "SupermarketCategoryRelation",
create: {
params: [["category", "supermarket", "order"]],
@@ -331,7 +331,7 @@ export class Models {
}
static SUPERMARKET = {
name: "Supermarket",
name: i18n.t("Supermarket"),
apiName: "Supermarket",
ordered_tags: [{ field: "category_to_supermarket", label: "category::name", color: "info" }],
create: {
@@ -374,7 +374,7 @@ export class Models {
}
static AUTOMATION = {
name: "Automation",
name: i18n.t("Automation"),
apiName: "Automation",
paginated: true,
list: {
@@ -437,11 +437,11 @@ export class Models {
}
static RECIPE = {
name: "Recipe",
name: i18n.t("Recipe"),
apiName: "Recipe",
list: {
params: [
"query",
"string",
"keywords",
"keywords_or",
"keywords_and",
@@ -503,7 +503,7 @@ export class Models {
},
}
static USER_NAME = {
name: "User",
name: i18n.t("User"),
apiName: "User",
list: {
params: ["filter_list"],
@@ -511,7 +511,7 @@ export class Models {
}
static MEAL_TYPE = {
name: "Meal_Type",
name: i18n.t("Meal_Type"),
apiName: "MealType",
list: {
params: ["filter_list"],
@@ -519,7 +519,7 @@ export class Models {
}
static MEAL_PLAN = {
name: "Meal_Plan",
name: i18n.t("Meal_Plan"),
apiName: "MealPlan",
list: {
params: ["options"],
@@ -527,7 +527,7 @@ export class Models {
}
static USERFILE = {
name: "File",
name: i18n.t("File"),
apiName: "UserFile",
paginated: false,
list: {
@@ -556,13 +556,13 @@ export class Models {
},
}
static USER = {
name: "User",
name: i18n.t("User"),
apiName: "User",
paginated: false,
}
static STEP = {
name: "Step",
name: i18n.t("Step"),
apiName: "Step",
list: {
params: ["recipe", "query", "page", "pageSize", "options"],

View File

@@ -5459,7 +5459,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
},
/**
*
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {string} [string] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
@@ -5488,7 +5488,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecipes: async (query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options: any = {}): Promise<RequestArgs> => {
listRecipes: async (string?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/api/recipe/`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -5501,8 +5501,8 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
if (query !== undefined) {
localVarQueryParameter['query'] = query;
if (string !== undefined) {
localVarQueryParameter['string'] = string;
}
if (keywords !== undefined) {
@@ -10045,7 +10045,7 @@ export const ApiApiFp = function(configuration?: Configuration) {
},
/**
*
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {string} [string] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
@@ -10074,8 +10074,8 @@ export const ApiApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2004>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, timescooked, lastcooked, makenow, page, pageSize, options);
async listRecipes(string?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2004>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listRecipes(string, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, timescooked, lastcooked, makenow, page, pageSize, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
@@ -11800,7 +11800,7 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
},
/**
*
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {string} [string] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
@@ -11829,8 +11829,8 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse2004> {
return localVarFp.listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, timescooked, lastcooked, makenow, page, pageSize, options).then((request) => request(axios, basePath));
listRecipes(string?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse2004> {
return localVarFp.listRecipes(string, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, timescooked, lastcooked, makenow, page, pageSize, options).then((request) => request(axios, basePath));
},
/**
*
@@ -13582,7 +13582,7 @@ export class ApiApi extends BaseAPI {
/**
*
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {string} [string] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
@@ -13612,8 +13612,8 @@ export class ApiApi extends BaseAPI {
* @throws {RequiredError}
* @memberof ApiApi
*/
public listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options?: any) {
return ApiApiFp(this.configuration).listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, timescooked, lastcooked, makenow, page, pageSize, options).then((request) => request(this.axios, this.basePath));
public listRecipes(string?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, timescooked?: number, lastcooked?: string, makenow?: number, page?: number, pageSize?: number, options?: any) {
return ApiApiFp(this.configuration).listRecipes(string, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, timescooked, lastcooked, makenow, page, pageSize, options).then((request) => request(this.axios, this.basePath));
}
/**