mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 20:28:46 -05:00
playing with FDC search integration
This commit is contained in:
95
vue3/src/openapi/models/FdcQuery.ts
Normal file
95
vue3/src/openapi/models/FdcQuery.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { FdcQueryFoods } from './FdcQueryFoods';
|
||||
import {
|
||||
FdcQueryFoodsFromJSON,
|
||||
FdcQueryFoodsFromJSONTyped,
|
||||
FdcQueryFoodsToJSON,
|
||||
} from './FdcQueryFoods';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FdcQuery
|
||||
*/
|
||||
export interface FdcQuery {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FdcQuery
|
||||
*/
|
||||
totalHits: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FdcQuery
|
||||
*/
|
||||
currentPage: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FdcQuery
|
||||
*/
|
||||
totalPages: number;
|
||||
/**
|
||||
*
|
||||
* @type {Array<FdcQueryFoods>}
|
||||
* @memberof FdcQuery
|
||||
*/
|
||||
foods: Array<FdcQueryFoods>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FdcQuery interface.
|
||||
*/
|
||||
export function instanceOfFdcQuery(value: object): value is FdcQuery {
|
||||
if (!('totalHits' in value) || value['totalHits'] === undefined) return false;
|
||||
if (!('currentPage' in value) || value['currentPage'] === undefined) return false;
|
||||
if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
|
||||
if (!('foods' in value) || value['foods'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FdcQueryFromJSON(json: any): FdcQuery {
|
||||
return FdcQueryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FdcQueryFromJSONTyped(json: any, ignoreDiscriminator: boolean): FdcQuery {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'totalHits': json['totalHits'],
|
||||
'currentPage': json['currentPage'],
|
||||
'totalPages': json['totalPages'],
|
||||
'foods': ((json['foods'] as Array<any>).map(FdcQueryFoodsFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function FdcQueryToJSON(value?: FdcQuery | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'totalHits': value['totalHits'],
|
||||
'currentPage': value['currentPage'],
|
||||
'totalPages': value['totalPages'],
|
||||
'foods': ((value['foods'] as Array<any>).map(FdcQueryFoodsToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
79
vue3/src/openapi/models/FdcQueryFoods.ts
Normal file
79
vue3/src/openapi/models/FdcQueryFoods.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Tandoor
|
||||
* Tandoor API Docs
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface FdcQueryFoods
|
||||
*/
|
||||
export interface FdcQueryFoods {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FdcQueryFoods
|
||||
*/
|
||||
fdcId: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FdcQueryFoods
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FdcQueryFoods
|
||||
*/
|
||||
dataType: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the FdcQueryFoods interface.
|
||||
*/
|
||||
export function instanceOfFdcQueryFoods(value: object): value is FdcQueryFoods {
|
||||
if (!('fdcId' in value) || value['fdcId'] === undefined) return false;
|
||||
if (!('description' in value) || value['description'] === undefined) return false;
|
||||
if (!('dataType' in value) || value['dataType'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function FdcQueryFoodsFromJSON(json: any): FdcQueryFoods {
|
||||
return FdcQueryFoodsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function FdcQueryFoodsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FdcQueryFoods {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'fdcId': json['fdcId'],
|
||||
'description': json['description'],
|
||||
'dataType': json['dataType'],
|
||||
};
|
||||
}
|
||||
|
||||
export function FdcQueryFoodsToJSON(value?: FdcQueryFoods | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'fdcId': value['fdcId'],
|
||||
'description': value['description'],
|
||||
'dataType': value['dataType'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ export * from './CustomFilter';
|
||||
export * from './DefaultPageEnum';
|
||||
export * from './DeleteEnum';
|
||||
export * from './ExportLog';
|
||||
export * from './FdcQuery';
|
||||
export * from './FdcQueryFoods';
|
||||
export * from './Food';
|
||||
export * from './FoodInheritField';
|
||||
export * from './FoodShoppingUpdate';
|
||||
|
||||
Reference in New Issue
Block a user