fixed api client generation
Some checks failed
Build Docker Container / Build Standard Container (push) Has been cancelled
Continuous Integration / build (22, 3.12) (push) Has been cancelled
Code scanning - action / CodeQL-Build (push) Has been cancelled
Build Docker Container / Notify Stable (push) Has been cancelled
Build Docker Container / Notify Beta (push) Has been cancelled

This commit is contained in:
vabene1111 2026-06-26 22:11:31 +02:00
parent 5663f07b5e
commit 71e6448341
33 changed files with 6757 additions and 4 deletions

28
.idea/runConfigurations/migrate.xml generated Normal file
View file

@ -0,0 +1,28 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="migrate" type="PythonConfigurationType" factoryName="Python">
<module name="recipes" />
<option name="ENV_FILES" value="$PROJECT_DIR$/.env" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="SDK_NAME" value="Python 3.11 (recipes)" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="DEBUG_JUST_MY_CODE" value="false" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="RUN_TOOL" value="" />
<option name="SCRIPT_NAME" value="$ProjectFileDir$/manage.py" />
<option name="PARAMETERS" value="migrate" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View file

@ -8,7 +8,7 @@ from recipes.settings import BASE_DIR
os.chdir(os.path.join(BASE_DIR, "vue3/src/openapi"))
DELETE_PATHS = ["apis", "models", "runtime.ts", "index.ts", ".openapi-generator"]
DELETE_PATHS = ["apis", "models", "index.ts", ".openapi-generator"]
for path in DELETE_PATHS:
path=Path(path)
if path.is_dir():
@ -17,6 +17,6 @@ for path in DELETE_PATHS:
path.unlink()
# generate base API client for all models
subprocess.run('openapi-generator-cli generate -g typescript-fetch -i http://127.0.0.1:8000/openapi/ -t templates --openapitools openapitools.json --global-property apiDocs=false,modelDocs=false', shell=True, check=True)
subprocess.run('openapi-generator-cli generate -g typescript-fetch -i http://127.0.0.1:8000/openapi/ -t templates --global-property apiDocs=false,modelDocs=false', shell=True, check=True)
sys.exit(0)

View file

@ -22,4 +22,4 @@
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
runtime.ts

View file

@ -5,6 +5,7 @@ index.ts
models/AccessToken.ts
models/AiLog.ts
models/AiProvider.ts
models/AlignmentEnum.ts
models/AuthToken.ts
models/AutoMealPlan.ts
models/Automation.ts
@ -19,6 +20,15 @@ models/CookLog.ts
models/CustomFilter.ts
models/DefaultPageEnum.ts
models/DeleteEnum.ts
models/EnterpriseBillingInvoice.ts
models/EnterpriseBillingPlan.ts
models/EnterpriseBillingProduct.ts
models/EnterpriseBillingReferralLink.ts
models/EnterpriseKeyword.ts
models/EnterpriseSocialEmbed.ts
models/EnterpriseSocialEmbedTypeEnum.ts
models/EnterpriseSocialRecipeSearch.ts
models/EnterpriseSpace.ts
models/ExportLog.ts
models/ExportRequest.ts
models/FdcQuery.ts
@ -46,6 +56,7 @@ models/InventoryEntry.ts
models/InventoryLocation.ts
models/InventoryLog.ts
models/InviteLink.ts
models/InvoiceSystemEnum.ts
models/Keyword.ts
models/KeywordLabel.ts
models/KeywordModeEnum.ts
@ -71,6 +82,13 @@ models/PaginatedBookmarkletImportListList.ts
models/PaginatedConnectorConfigList.ts
models/PaginatedCookLogList.ts
models/PaginatedCustomFilterList.ts
models/PaginatedEnterpriseBillingInvoiceList.ts
models/PaginatedEnterpriseBillingPlanList.ts
models/PaginatedEnterpriseBillingProductList.ts
models/PaginatedEnterpriseBillingReferralLinkList.ts
models/PaginatedEnterpriseSocialEmbedList.ts
models/PaginatedEnterpriseSocialRecipeSearchList.ts
models/PaginatedEnterpriseSpaceList.ts
models/PaginatedExportLogList.ts
models/PaginatedFoodList.ts
models/PaginatedGenericModelReferenceList.ts
@ -120,6 +138,12 @@ models/PatchedBookmarkletImport.ts
models/PatchedConnectorConfig.ts
models/PatchedCookLog.ts
models/PatchedCustomFilter.ts
models/PatchedEnterpriseBillingInvoice.ts
models/PatchedEnterpriseBillingPlan.ts
models/PatchedEnterpriseBillingProduct.ts
models/PatchedEnterpriseBillingReferralLink.ts
models/PatchedEnterpriseSocialEmbed.ts
models/PatchedEnterpriseSpace.ts
models/PatchedExportLog.ts
models/PatchedFood.ts
models/PatchedHousehold.ts
@ -200,6 +224,9 @@ models/SpaceNavTextColorEnum.ts
models/SpaceThemeEnum.ts
models/Step.ts
models/Storage.ts
models/StripeCheckoutSessionRequest.ts
models/StripeCheckoutSessionResponse.ts
models/StripePortal.ts
models/Supermarket.ts
models/SupermarketCategory.ts
models/SupermarketCategoryRelation.ts
@ -217,4 +244,3 @@ models/UserSpace.ts
models/UserSpaceBatchUpdate.ts
models/ViewLog.ts
models/index.ts
runtime.ts

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,56 @@
/* 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.
*/
/**
* * `start` - start
* * `center` - center
* * `end` - end
* @export
*/
export const AlignmentEnum = {
Start: 'start',
Center: 'center',
End: 'end'
} as const;
export type AlignmentEnum = typeof AlignmentEnum[keyof typeof AlignmentEnum];
export function instanceOfAlignmentEnum(value: any): boolean {
for (const key in AlignmentEnum) {
if (Object.prototype.hasOwnProperty.call(AlignmentEnum, key)) {
if (AlignmentEnum[key as keyof typeof AlignmentEnum] === value) {
return true;
}
}
}
return false;
}
export function AlignmentEnumFromJSON(json: any): AlignmentEnum {
return AlignmentEnumFromJSONTyped(json, false);
}
export function AlignmentEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): AlignmentEnum {
return json as AlignmentEnum;
}
export function AlignmentEnumToJSON(value?: AlignmentEnum | null): any {
return value as any;
}
export function AlignmentEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): AlignmentEnum {
return value as AlignmentEnum;
}

View file

@ -0,0 +1,170 @@
/* 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 { InvoiceSystemEnum } from './InvoiceSystemEnum';
import {
InvoiceSystemEnumFromJSON,
InvoiceSystemEnumFromJSONTyped,
InvoiceSystemEnumToJSON,
InvoiceSystemEnumToJSONTyped,
} from './InvoiceSystemEnum';
/**
*
* @export
* @interface EnterpriseBillingInvoice
*/
export interface EnterpriseBillingInvoice {
/**
*
* @type {number}
* @memberof EnterpriseBillingInvoice
*/
id?: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingInvoice
*/
user: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingInvoice
*/
space: number;
/**
*
* @type {InvoiceSystemEnum}
* @memberof EnterpriseBillingInvoice
*/
invoiceSystem?: InvoiceSystemEnum;
/**
*
* @type {string}
* @memberof EnterpriseBillingInvoice
*/
invoiceId: string;
/**
*
* @type {string}
* @memberof EnterpriseBillingInvoice
*/
invoiceNumber: string;
/**
*
* @type {string}
* @memberof EnterpriseBillingInvoice
*/
languageCode?: string;
/**
*
* @type {Date}
* @memberof EnterpriseBillingInvoice
*/
invoiceDate: Date;
/**
*
* @type {number}
* @memberof EnterpriseBillingInvoice
*/
priceNet: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingInvoice
*/
priceGross: number;
/**
*
* @type {boolean}
* @memberof EnterpriseBillingInvoice
*/
printed?: boolean;
/**
*
* @type {Date}
* @memberof EnterpriseBillingInvoice
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the EnterpriseBillingInvoice interface.
*/
export function instanceOfEnterpriseBillingInvoice(value: object): value is EnterpriseBillingInvoice {
if (!('user' in value) || value['user'] === undefined) return false;
if (!('space' in value) || value['space'] === undefined) return false;
if (!('invoiceId' in value) || value['invoiceId'] === undefined) return false;
if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined) return false;
if (!('invoiceDate' in value) || value['invoiceDate'] === undefined) return false;
if (!('priceNet' in value) || value['priceNet'] === undefined) return false;
if (!('priceGross' in value) || value['priceGross'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
return true;
}
export function EnterpriseBillingInvoiceFromJSON(json: any): EnterpriseBillingInvoice {
return EnterpriseBillingInvoiceFromJSONTyped(json, false);
}
export function EnterpriseBillingInvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseBillingInvoice {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'user': json['user'],
'space': json['space'],
'invoiceSystem': json['invoice_system'] == null ? undefined : InvoiceSystemEnumFromJSON(json['invoice_system']),
'invoiceId': json['invoice_id'],
'invoiceNumber': json['invoice_number'],
'languageCode': json['language_code'] == null ? undefined : json['language_code'],
'invoiceDate': (new Date(json['invoice_date'])),
'priceNet': json['price_net'],
'priceGross': json['price_gross'],
'printed': json['printed'] == null ? undefined : json['printed'],
'createdAt': (new Date(json['created_at'])),
};
}
export function EnterpriseBillingInvoiceToJSON(json: any): EnterpriseBillingInvoice {
return EnterpriseBillingInvoiceToJSONTyped(json, false);
}
export function EnterpriseBillingInvoiceToJSONTyped(value?: Omit<EnterpriseBillingInvoice, 'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'user': value['user'],
'space': value['space'],
'invoice_system': InvoiceSystemEnumToJSON(value['invoiceSystem']),
'invoice_id': value['invoiceId'],
'invoice_number': value['invoiceNumber'],
'language_code': value['languageCode'],
'invoice_date': value['invoiceDate'].toISOString().substring(0,10),
'price_net': value['priceNet'],
'price_gross': value['priceGross'],
'printed': value['printed'],
};
}

View file

@ -0,0 +1,206 @@
/* 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 EnterpriseBillingPlan
*/
export interface EnterpriseBillingPlan {
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseBillingPlan
*/
name: string;
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
maxUsers: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
maxRecipes?: number;
/**
* Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.
* @type {number}
* @memberof EnterpriseBillingPlan
*/
maxFileStorageMb?: number;
/**
*
* @type {boolean}
* @memberof EnterpriseBillingPlan
*/
aiEnabled?: boolean;
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
aiCreditsMonthly?: number;
/**
* number of credits to set the balance to for new subscriptions.
* @type {number}
* @memberof EnterpriseBillingPlan
*/
aiInitialCreditBalance?: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
price: number;
/**
* Discounted price to show, update price_id from Stripe to use, null to disable discount.
* @type {number}
* @memberof EnterpriseBillingPlan
*/
priceDiscount?: number | null;
/**
* Text to show as reason for the discount
* @type {string}
* @memberof EnterpriseBillingPlan
*/
discountReason?: string | null;
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
months?: number;
/**
*
* @type {string}
* @memberof EnterpriseBillingPlan
*/
priceId: string;
/**
*
* @type {string}
* @memberof EnterpriseBillingPlan
*/
productId: string;
/**
*
* @type {boolean}
* @memberof EnterpriseBillingPlan
*/
managed?: boolean;
/**
*
* @type {boolean}
* @memberof EnterpriseBillingPlan
*/
featured?: boolean;
/**
*
* @type {boolean}
* @memberof EnterpriseBillingPlan
*/
disabled?: boolean;
/**
*
* @type {number}
* @memberof EnterpriseBillingPlan
*/
order?: number;
}
/**
* Check if a given object implements the EnterpriseBillingPlan interface.
*/
export function instanceOfEnterpriseBillingPlan(value: object): value is EnterpriseBillingPlan {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('maxUsers' in value) || value['maxUsers'] === undefined) return false;
if (!('price' in value) || value['price'] === undefined) return false;
if (!('priceId' in value) || value['priceId'] === undefined) return false;
if (!('productId' in value) || value['productId'] === undefined) return false;
return true;
}
export function EnterpriseBillingPlanFromJSON(json: any): EnterpriseBillingPlan {
return EnterpriseBillingPlanFromJSONTyped(json, false);
}
export function EnterpriseBillingPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseBillingPlan {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'maxUsers': json['max_users'],
'maxRecipes': json['max_recipes'] == null ? undefined : json['max_recipes'],
'maxFileStorageMb': json['max_file_storage_mb'] == null ? undefined : json['max_file_storage_mb'],
'aiEnabled': json['ai_enabled'] == null ? undefined : json['ai_enabled'],
'aiCreditsMonthly': json['ai_credits_monthly'] == null ? undefined : json['ai_credits_monthly'],
'aiInitialCreditBalance': json['ai_initial_credit_balance'] == null ? undefined : json['ai_initial_credit_balance'],
'price': json['price'],
'priceDiscount': json['price_discount'] == null ? undefined : json['price_discount'],
'discountReason': json['discount_reason'] == null ? undefined : json['discount_reason'],
'months': json['months'] == null ? undefined : json['months'],
'priceId': json['price_id'],
'productId': json['product_id'],
'managed': json['managed'] == null ? undefined : json['managed'],
'featured': json['featured'] == null ? undefined : json['featured'],
'disabled': json['disabled'] == null ? undefined : json['disabled'],
'order': json['order'] == null ? undefined : json['order'],
};
}
export function EnterpriseBillingPlanToJSON(json: any): EnterpriseBillingPlan {
return EnterpriseBillingPlanToJSONTyped(json, false);
}
export function EnterpriseBillingPlanToJSONTyped(value?: EnterpriseBillingPlan | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'max_users': value['maxUsers'],
'max_recipes': value['maxRecipes'],
'max_file_storage_mb': value['maxFileStorageMb'],
'ai_enabled': value['aiEnabled'],
'ai_credits_monthly': value['aiCreditsMonthly'],
'ai_initial_credit_balance': value['aiInitialCreditBalance'],
'price': value['price'],
'price_discount': value['priceDiscount'],
'discount_reason': value['discountReason'],
'months': value['months'],
'price_id': value['priceId'],
'product_id': value['productId'],
'managed': value['managed'],
'featured': value['featured'],
'disabled': value['disabled'],
'order': value['order'],
};
}

View file

@ -0,0 +1,141 @@
/* 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 EnterpriseBillingProduct
*/
export interface EnterpriseBillingProduct {
/**
*
* @type {number}
* @memberof EnterpriseBillingProduct
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseBillingProduct
*/
name: string;
/**
*
* @type {number}
* @memberof EnterpriseBillingProduct
*/
price: number;
/**
* Discounted price to show, update price_id from Stripe to use, null to disable discount.
* @type {number}
* @memberof EnterpriseBillingProduct
*/
priceDiscount?: number | null;
/**
* Text to show as reason for the discount
* @type {string}
* @memberof EnterpriseBillingProduct
*/
discountReason?: string | null;
/**
*
* @type {string}
* @memberof EnterpriseBillingProduct
*/
priceId: string;
/**
*
* @type {string}
* @memberof EnterpriseBillingProduct
*/
productId: string;
/**
*
* @type {number}
* @memberof EnterpriseBillingProduct
*/
order?: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingProduct
*/
aiCredits?: number | null;
/**
*
* @type {boolean}
* @memberof EnterpriseBillingProduct
*/
disabled?: boolean;
}
/**
* Check if a given object implements the EnterpriseBillingProduct interface.
*/
export function instanceOfEnterpriseBillingProduct(value: object): value is EnterpriseBillingProduct {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('price' in value) || value['price'] === undefined) return false;
if (!('priceId' in value) || value['priceId'] === undefined) return false;
if (!('productId' in value) || value['productId'] === undefined) return false;
return true;
}
export function EnterpriseBillingProductFromJSON(json: any): EnterpriseBillingProduct {
return EnterpriseBillingProductFromJSONTyped(json, false);
}
export function EnterpriseBillingProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseBillingProduct {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'price': json['price'],
'priceDiscount': json['price_discount'] == null ? undefined : json['price_discount'],
'discountReason': json['discount_reason'] == null ? undefined : json['discount_reason'],
'priceId': json['price_id'],
'productId': json['product_id'],
'order': json['order'] == null ? undefined : json['order'],
'aiCredits': json['ai_credits'] == null ? undefined : json['ai_credits'],
'disabled': json['disabled'] == null ? undefined : json['disabled'],
};
}
export function EnterpriseBillingProductToJSON(json: any): EnterpriseBillingProduct {
return EnterpriseBillingProductToJSONTyped(json, false);
}
export function EnterpriseBillingProductToJSONTyped(value?: EnterpriseBillingProduct | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'price': value['price'],
'price_discount': value['priceDiscount'],
'discount_reason': value['discountReason'],
'price_id': value['priceId'],
'product_id': value['productId'],
'order': value['order'],
'ai_credits': value['aiCredits'],
'disabled': value['disabled'],
};
}

View file

@ -0,0 +1,98 @@
/* 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 EnterpriseBillingReferralLink
*/
export interface EnterpriseBillingReferralLink {
/**
*
* @type {number}
* @memberof EnterpriseBillingReferralLink
*/
id?: number;
/**
*
* @type {number}
* @memberof EnterpriseBillingReferralLink
*/
createdBy?: number | null;
/**
*
* @type {number}
* @memberof EnterpriseBillingReferralLink
*/
space: number;
/**
*
* @type {string}
* @memberof EnterpriseBillingReferralLink
*/
token?: string;
/**
*
* @type {Date}
* @memberof EnterpriseBillingReferralLink
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the EnterpriseBillingReferralLink interface.
*/
export function instanceOfEnterpriseBillingReferralLink(value: object): value is EnterpriseBillingReferralLink {
if (!('space' in value) || value['space'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
return true;
}
export function EnterpriseBillingReferralLinkFromJSON(json: any): EnterpriseBillingReferralLink {
return EnterpriseBillingReferralLinkFromJSONTyped(json, false);
}
export function EnterpriseBillingReferralLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseBillingReferralLink {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'createdBy': json['created_by'] == null ? undefined : json['created_by'],
'space': json['space'],
'token': json['token'] == null ? undefined : json['token'],
'createdAt': (new Date(json['created_at'])),
};
}
export function EnterpriseBillingReferralLinkToJSON(json: any): EnterpriseBillingReferralLink {
return EnterpriseBillingReferralLinkToJSONTyped(json, false);
}
export function EnterpriseBillingReferralLinkToJSONTyped(value?: Omit<EnterpriseBillingReferralLink, 'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'created_by': value['createdBy'],
'space': value['space'],
'token': value['token'],
};
}

View file

@ -0,0 +1,90 @@
/* 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 EnterpriseKeyword
*/
export interface EnterpriseKeyword {
/**
*
* @type {number}
* @memberof EnterpriseKeyword
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseKeyword
*/
name: string;
/**
*
* @type {string}
* @memberof EnterpriseKeyword
*/
readonly label: string;
/**
*
* @type {string}
* @memberof EnterpriseKeyword
*/
description?: string;
}
/**
* Check if a given object implements the EnterpriseKeyword interface.
*/
export function instanceOfEnterpriseKeyword(value: object): value is EnterpriseKeyword {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('label' in value) || value['label'] === undefined) return false;
return true;
}
export function EnterpriseKeywordFromJSON(json: any): EnterpriseKeyword {
return EnterpriseKeywordFromJSONTyped(json, false);
}
export function EnterpriseKeywordFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseKeyword {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'label': json['label'],
'description': json['description'] == null ? undefined : json['description'],
};
}
export function EnterpriseKeywordToJSON(json: any): EnterpriseKeyword {
return EnterpriseKeywordToJSONTyped(json, false);
}
export function EnterpriseKeywordToJSONTyped(value?: Omit<EnterpriseKeyword, 'label'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'description': value['description'],
};
}

View file

@ -0,0 +1,148 @@
/* 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 { AlignmentEnum } from './AlignmentEnum';
import {
AlignmentEnumFromJSON,
AlignmentEnumFromJSONTyped,
AlignmentEnumToJSON,
AlignmentEnumToJSONTyped,
} from './AlignmentEnum';
import type { EnterpriseSocialEmbedTypeEnum } from './EnterpriseSocialEmbedTypeEnum';
import {
EnterpriseSocialEmbedTypeEnumFromJSON,
EnterpriseSocialEmbedTypeEnumFromJSONTyped,
EnterpriseSocialEmbedTypeEnumToJSON,
EnterpriseSocialEmbedTypeEnumToJSONTyped,
} from './EnterpriseSocialEmbedTypeEnum';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
* Adds nested create feature
* @export
* @interface EnterpriseSocialEmbed
*/
export interface EnterpriseSocialEmbed {
/**
*
* @type {number}
* @memberof EnterpriseSocialEmbed
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
name: string;
/**
*
* @type {EnterpriseSocialEmbedTypeEnum}
* @memberof EnterpriseSocialEmbed
*/
type: EnterpriseSocialEmbedTypeEnum;
/**
*
* @type {Array<Keyword>}
* @memberof EnterpriseSocialEmbed
*/
keywords: Array<Keyword>;
/**
*
* @type {AlignmentEnum}
* @memberof EnterpriseSocialEmbed
*/
alignment?: AlignmentEnum;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
backgroundColor?: string | null;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
accentColor?: string | null;
/**
*
* @type {string}
* @memberof EnterpriseSocialEmbed
*/
uuid?: string;
}
/**
* Check if a given object implements the EnterpriseSocialEmbed interface.
*/
export function instanceOfEnterpriseSocialEmbed(value: object): value is EnterpriseSocialEmbed {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('keywords' in value) || value['keywords'] === undefined) return false;
return true;
}
export function EnterpriseSocialEmbedFromJSON(json: any): EnterpriseSocialEmbed {
return EnterpriseSocialEmbedFromJSONTyped(json, false);
}
export function EnterpriseSocialEmbedFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSocialEmbed {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'type': EnterpriseSocialEmbedTypeEnumFromJSON(json['type']),
'keywords': ((json['keywords'] as Array<any>).map(KeywordFromJSON)),
'alignment': json['alignment'] == null ? undefined : AlignmentEnumFromJSON(json['alignment']),
'backgroundColor': json['background_color'] == null ? undefined : json['background_color'],
'accentColor': json['accent_color'] == null ? undefined : json['accent_color'],
'uuid': json['uuid'] == null ? undefined : json['uuid'],
};
}
export function EnterpriseSocialEmbedToJSON(json: any): EnterpriseSocialEmbed {
return EnterpriseSocialEmbedToJSONTyped(json, false);
}
export function EnterpriseSocialEmbedToJSONTyped(value?: EnterpriseSocialEmbed | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'type': EnterpriseSocialEmbedTypeEnumToJSON(value['type']),
'keywords': ((value['keywords'] as Array<any>).map(KeywordToJSON)),
'alignment': AlignmentEnumToJSON(value['alignment']),
'background_color': value['backgroundColor'],
'accent_color': value['accentColor'],
'uuid': value['uuid'],
};
}

View file

@ -0,0 +1,60 @@
/* 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.
*/
/**
* * `RECIPE` - Recipe
* * `RECIPE_KEYWORD` - Recipe Keyword
* * `MEAL_PLAN` - Meal Plan
* * `SHOPPING` - Shopping
* * `BOOK` - Book
* @export
*/
export const EnterpriseSocialEmbedTypeEnum = {
Recipe: 'RECIPE',
RecipeKeyword: 'RECIPE_KEYWORD',
MealPlan: 'MEAL_PLAN',
Shopping: 'SHOPPING',
Book: 'BOOK'
} as const;
export type EnterpriseSocialEmbedTypeEnum = typeof EnterpriseSocialEmbedTypeEnum[keyof typeof EnterpriseSocialEmbedTypeEnum];
export function instanceOfEnterpriseSocialEmbedTypeEnum(value: any): boolean {
for (const key in EnterpriseSocialEmbedTypeEnum) {
if (Object.prototype.hasOwnProperty.call(EnterpriseSocialEmbedTypeEnum, key)) {
if (EnterpriseSocialEmbedTypeEnum[key as keyof typeof EnterpriseSocialEmbedTypeEnum] === value) {
return true;
}
}
}
return false;
}
export function EnterpriseSocialEmbedTypeEnumFromJSON(json: any): EnterpriseSocialEmbedTypeEnum {
return EnterpriseSocialEmbedTypeEnumFromJSONTyped(json, false);
}
export function EnterpriseSocialEmbedTypeEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSocialEmbedTypeEnum {
return json as EnterpriseSocialEmbedTypeEnum;
}
export function EnterpriseSocialEmbedTypeEnumToJSON(value?: EnterpriseSocialEmbedTypeEnum | null): any {
return value as any;
}
export function EnterpriseSocialEmbedTypeEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): EnterpriseSocialEmbedTypeEnum {
return value as EnterpriseSocialEmbedTypeEnum;
}

View file

@ -0,0 +1,97 @@
/* 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 { EnterpriseKeyword } from './EnterpriseKeyword';
import {
EnterpriseKeywordFromJSON,
EnterpriseKeywordFromJSONTyped,
EnterpriseKeywordToJSON,
EnterpriseKeywordToJSONTyped,
} from './EnterpriseKeyword';
/**
*
* @export
* @interface EnterpriseSocialRecipeSearch
*/
export interface EnterpriseSocialRecipeSearch {
/**
*
* @type {number}
* @memberof EnterpriseSocialRecipeSearch
*/
id?: number;
/**
*
* @type {string}
* @memberof EnterpriseSocialRecipeSearch
*/
readonly name: string;
/**
*
* @type {string}
* @memberof EnterpriseSocialRecipeSearch
*/
readonly image: string | null;
/**
*
* @type {Array<EnterpriseKeyword>}
* @memberof EnterpriseSocialRecipeSearch
*/
readonly keywords: Array<EnterpriseKeyword>;
}
/**
* Check if a given object implements the EnterpriseSocialRecipeSearch interface.
*/
export function instanceOfEnterpriseSocialRecipeSearch(value: object): value is EnterpriseSocialRecipeSearch {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('image' in value) || value['image'] === undefined) return false;
if (!('keywords' in value) || value['keywords'] === undefined) return false;
return true;
}
export function EnterpriseSocialRecipeSearchFromJSON(json: any): EnterpriseSocialRecipeSearch {
return EnterpriseSocialRecipeSearchFromJSONTyped(json, false);
}
export function EnterpriseSocialRecipeSearchFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSocialRecipeSearch {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'image': json['image'],
'keywords': ((json['keywords'] as Array<any>).map(EnterpriseKeywordFromJSON)),
};
}
export function EnterpriseSocialRecipeSearchToJSON(json: any): EnterpriseSocialRecipeSearch {
return EnterpriseSocialRecipeSearchToJSONTyped(json, false);
}
export function EnterpriseSocialRecipeSearchToJSONTyped(value?: Omit<EnterpriseSocialRecipeSearch, 'name'|'image'|'keywords'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
};
}

View file

@ -0,0 +1,124 @@
/* 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 { EnterpriseBillingPlan } from './EnterpriseBillingPlan';
import {
EnterpriseBillingPlanFromJSON,
EnterpriseBillingPlanFromJSONTyped,
EnterpriseBillingPlanToJSON,
EnterpriseBillingPlanToJSONTyped,
} from './EnterpriseBillingPlan';
/**
*
* @export
* @interface EnterpriseSpace
*/
export interface EnterpriseSpace {
/**
*
* @type {number}
* @memberof EnterpriseSpace
*/
space: number;
/**
*
* @type {string}
* @memberof EnterpriseSpace
*/
billingLicensedModules: string;
/**
*
* @type {string}
* @memberof EnterpriseSpace
*/
billingCustomerId?: string | null;
/**
*
* @type {EnterpriseBillingPlan}
* @memberof EnterpriseSpace
*/
billingPlan: EnterpriseBillingPlan;
/**
*
* @type {string}
* @memberof EnterpriseSpace
*/
billingSubscriptionId?: string | null;
/**
*
* @type {string}
* @memberof EnterpriseSpace
*/
billingSubscriptionStatus?: string | null;
/**
*
* @type {number}
* @memberof EnterpriseSpace
*/
billingMonthlyPrice?: number;
}
/**
* Check if a given object implements the EnterpriseSpace interface.
*/
export function instanceOfEnterpriseSpace(value: object): value is EnterpriseSpace {
if (!('space' in value) || value['space'] === undefined) return false;
if (!('billingLicensedModules' in value) || value['billingLicensedModules'] === undefined) return false;
if (!('billingPlan' in value) || value['billingPlan'] === undefined) return false;
return true;
}
export function EnterpriseSpaceFromJSON(json: any): EnterpriseSpace {
return EnterpriseSpaceFromJSONTyped(json, false);
}
export function EnterpriseSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnterpriseSpace {
if (json == null) {
return json;
}
return {
'space': json['space'],
'billingLicensedModules': json['billing_licensed_modules'],
'billingCustomerId': json['billing_customer_id'] == null ? undefined : json['billing_customer_id'],
'billingPlan': EnterpriseBillingPlanFromJSON(json['billing_plan']),
'billingSubscriptionId': json['billing_subscription_id'] == null ? undefined : json['billing_subscription_id'],
'billingSubscriptionStatus': json['billing_subscription_status'] == null ? undefined : json['billing_subscription_status'],
'billingMonthlyPrice': json['billing_monthly_price'] == null ? undefined : json['billing_monthly_price'],
};
}
export function EnterpriseSpaceToJSON(json: any): EnterpriseSpace {
return EnterpriseSpaceToJSONTyped(json, false);
}
export function EnterpriseSpaceToJSONTyped(value?: EnterpriseSpace | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'space': value['space'],
'billing_licensed_modules': value['billingLicensedModules'],
'billing_customer_id': value['billingCustomerId'],
'billing_plan': EnterpriseBillingPlanToJSON(value['billingPlan']),
'billing_subscription_id': value['billingSubscriptionId'],
'billing_subscription_status': value['billingSubscriptionStatus'],
'billing_monthly_price': value['billingMonthlyPrice'],
};
}

View file

@ -0,0 +1,54 @@
/* 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.
*/
/**
* * `ERPNEXT` - ErpNext
* * `SEVDESK` - SevDesk
* @export
*/
export const InvoiceSystemEnum = {
Erpnext: 'ERPNEXT',
Sevdesk: 'SEVDESK'
} as const;
export type InvoiceSystemEnum = typeof InvoiceSystemEnum[keyof typeof InvoiceSystemEnum];
export function instanceOfInvoiceSystemEnum(value: any): boolean {
for (const key in InvoiceSystemEnum) {
if (Object.prototype.hasOwnProperty.call(InvoiceSystemEnum, key)) {
if (InvoiceSystemEnum[key as keyof typeof InvoiceSystemEnum] === value) {
return true;
}
}
}
return false;
}
export function InvoiceSystemEnumFromJSON(json: any): InvoiceSystemEnum {
return InvoiceSystemEnumFromJSONTyped(json, false);
}
export function InvoiceSystemEnumFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceSystemEnum {
return json as InvoiceSystemEnum;
}
export function InvoiceSystemEnumToJSON(value?: InvoiceSystemEnum | null): any {
return value as any;
}
export function InvoiceSystemEnumToJSONTyped(value: any, ignoreDiscriminator: boolean): InvoiceSystemEnum {
return value as InvoiceSystemEnum;
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseBillingInvoice } from './EnterpriseBillingInvoice';
import {
EnterpriseBillingInvoiceFromJSON,
EnterpriseBillingInvoiceFromJSONTyped,
EnterpriseBillingInvoiceToJSON,
EnterpriseBillingInvoiceToJSONTyped,
} from './EnterpriseBillingInvoice';
/**
*
* @export
* @interface PaginatedEnterpriseBillingInvoiceList
*/
export interface PaginatedEnterpriseBillingInvoiceList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseBillingInvoiceList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingInvoiceList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingInvoiceList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseBillingInvoice>}
* @memberof PaginatedEnterpriseBillingInvoiceList
*/
results: Array<EnterpriseBillingInvoice>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseBillingInvoiceList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseBillingInvoiceList interface.
*/
export function instanceOfPaginatedEnterpriseBillingInvoiceList(value: object): value is PaginatedEnterpriseBillingInvoiceList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseBillingInvoiceListFromJSON(json: any): PaginatedEnterpriseBillingInvoiceList {
return PaginatedEnterpriseBillingInvoiceListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingInvoiceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseBillingInvoiceList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseBillingInvoiceFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseBillingInvoiceListToJSON(json: any): PaginatedEnterpriseBillingInvoiceList {
return PaginatedEnterpriseBillingInvoiceListToJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingInvoiceListToJSONTyped(value?: PaginatedEnterpriseBillingInvoiceList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseBillingInvoiceToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseBillingPlan } from './EnterpriseBillingPlan';
import {
EnterpriseBillingPlanFromJSON,
EnterpriseBillingPlanFromJSONTyped,
EnterpriseBillingPlanToJSON,
EnterpriseBillingPlanToJSONTyped,
} from './EnterpriseBillingPlan';
/**
*
* @export
* @interface PaginatedEnterpriseBillingPlanList
*/
export interface PaginatedEnterpriseBillingPlanList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseBillingPlanList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingPlanList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingPlanList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseBillingPlan>}
* @memberof PaginatedEnterpriseBillingPlanList
*/
results: Array<EnterpriseBillingPlan>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseBillingPlanList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseBillingPlanList interface.
*/
export function instanceOfPaginatedEnterpriseBillingPlanList(value: object): value is PaginatedEnterpriseBillingPlanList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseBillingPlanListFromJSON(json: any): PaginatedEnterpriseBillingPlanList {
return PaginatedEnterpriseBillingPlanListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingPlanListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseBillingPlanList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseBillingPlanFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseBillingPlanListToJSON(json: any): PaginatedEnterpriseBillingPlanList {
return PaginatedEnterpriseBillingPlanListToJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingPlanListToJSONTyped(value?: PaginatedEnterpriseBillingPlanList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseBillingPlanToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseBillingProduct } from './EnterpriseBillingProduct';
import {
EnterpriseBillingProductFromJSON,
EnterpriseBillingProductFromJSONTyped,
EnterpriseBillingProductToJSON,
EnterpriseBillingProductToJSONTyped,
} from './EnterpriseBillingProduct';
/**
*
* @export
* @interface PaginatedEnterpriseBillingProductList
*/
export interface PaginatedEnterpriseBillingProductList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseBillingProductList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingProductList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingProductList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseBillingProduct>}
* @memberof PaginatedEnterpriseBillingProductList
*/
results: Array<EnterpriseBillingProduct>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseBillingProductList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseBillingProductList interface.
*/
export function instanceOfPaginatedEnterpriseBillingProductList(value: object): value is PaginatedEnterpriseBillingProductList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseBillingProductListFromJSON(json: any): PaginatedEnterpriseBillingProductList {
return PaginatedEnterpriseBillingProductListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingProductListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseBillingProductList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseBillingProductFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseBillingProductListToJSON(json: any): PaginatedEnterpriseBillingProductList {
return PaginatedEnterpriseBillingProductListToJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingProductListToJSONTyped(value?: PaginatedEnterpriseBillingProductList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseBillingProductToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseBillingReferralLink } from './EnterpriseBillingReferralLink';
import {
EnterpriseBillingReferralLinkFromJSON,
EnterpriseBillingReferralLinkFromJSONTyped,
EnterpriseBillingReferralLinkToJSON,
EnterpriseBillingReferralLinkToJSONTyped,
} from './EnterpriseBillingReferralLink';
/**
*
* @export
* @interface PaginatedEnterpriseBillingReferralLinkList
*/
export interface PaginatedEnterpriseBillingReferralLinkList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseBillingReferralLinkList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingReferralLinkList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseBillingReferralLinkList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseBillingReferralLink>}
* @memberof PaginatedEnterpriseBillingReferralLinkList
*/
results: Array<EnterpriseBillingReferralLink>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseBillingReferralLinkList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseBillingReferralLinkList interface.
*/
export function instanceOfPaginatedEnterpriseBillingReferralLinkList(value: object): value is PaginatedEnterpriseBillingReferralLinkList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseBillingReferralLinkListFromJSON(json: any): PaginatedEnterpriseBillingReferralLinkList {
return PaginatedEnterpriseBillingReferralLinkListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingReferralLinkListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseBillingReferralLinkList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseBillingReferralLinkFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseBillingReferralLinkListToJSON(json: any): PaginatedEnterpriseBillingReferralLinkList {
return PaginatedEnterpriseBillingReferralLinkListToJSONTyped(json, false);
}
export function PaginatedEnterpriseBillingReferralLinkListToJSONTyped(value?: PaginatedEnterpriseBillingReferralLinkList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseBillingReferralLinkToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseSocialEmbed } from './EnterpriseSocialEmbed';
import {
EnterpriseSocialEmbedFromJSON,
EnterpriseSocialEmbedFromJSONTyped,
EnterpriseSocialEmbedToJSON,
EnterpriseSocialEmbedToJSONTyped,
} from './EnterpriseSocialEmbed';
/**
*
* @export
* @interface PaginatedEnterpriseSocialEmbedList
*/
export interface PaginatedEnterpriseSocialEmbedList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseSocialEmbed>}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
results: Array<EnterpriseSocialEmbed>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseSocialEmbedList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseSocialEmbedList interface.
*/
export function instanceOfPaginatedEnterpriseSocialEmbedList(value: object): value is PaginatedEnterpriseSocialEmbedList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseSocialEmbedListFromJSON(json: any): PaginatedEnterpriseSocialEmbedList {
return PaginatedEnterpriseSocialEmbedListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseSocialEmbedListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseSocialEmbedList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseSocialEmbedFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseSocialEmbedListToJSON(json: any): PaginatedEnterpriseSocialEmbedList {
return PaginatedEnterpriseSocialEmbedListToJSONTyped(json, false);
}
export function PaginatedEnterpriseSocialEmbedListToJSONTyped(value?: PaginatedEnterpriseSocialEmbedList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseSocialEmbedToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseSocialRecipeSearch } from './EnterpriseSocialRecipeSearch';
import {
EnterpriseSocialRecipeSearchFromJSON,
EnterpriseSocialRecipeSearchFromJSONTyped,
EnterpriseSocialRecipeSearchToJSON,
EnterpriseSocialRecipeSearchToJSONTyped,
} from './EnterpriseSocialRecipeSearch';
/**
*
* @export
* @interface PaginatedEnterpriseSocialRecipeSearchList
*/
export interface PaginatedEnterpriseSocialRecipeSearchList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseSocialRecipeSearch>}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
results: Array<EnterpriseSocialRecipeSearch>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseSocialRecipeSearchList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseSocialRecipeSearchList interface.
*/
export function instanceOfPaginatedEnterpriseSocialRecipeSearchList(value: object): value is PaginatedEnterpriseSocialRecipeSearchList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseSocialRecipeSearchListFromJSON(json: any): PaginatedEnterpriseSocialRecipeSearchList {
return PaginatedEnterpriseSocialRecipeSearchListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseSocialRecipeSearchListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseSocialRecipeSearchList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseSocialRecipeSearchFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseSocialRecipeSearchListToJSON(json: any): PaginatedEnterpriseSocialRecipeSearchList {
return PaginatedEnterpriseSocialRecipeSearchListToJSONTyped(json, false);
}
export function PaginatedEnterpriseSocialRecipeSearchListToJSONTyped(value?: PaginatedEnterpriseSocialRecipeSearchList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseSocialRecipeSearchToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,107 @@
/* 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 { EnterpriseSpace } from './EnterpriseSpace';
import {
EnterpriseSpaceFromJSON,
EnterpriseSpaceFromJSONTyped,
EnterpriseSpaceToJSON,
EnterpriseSpaceToJSONTyped,
} from './EnterpriseSpace';
/**
*
* @export
* @interface PaginatedEnterpriseSpaceList
*/
export interface PaginatedEnterpriseSpaceList {
/**
*
* @type {number}
* @memberof PaginatedEnterpriseSpaceList
*/
count: number;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSpaceList
*/
next?: string | null;
/**
*
* @type {string}
* @memberof PaginatedEnterpriseSpaceList
*/
previous?: string | null;
/**
*
* @type {Array<EnterpriseSpace>}
* @memberof PaginatedEnterpriseSpaceList
*/
results: Array<EnterpriseSpace>;
/**
*
* @type {Date}
* @memberof PaginatedEnterpriseSpaceList
*/
timestamp?: Date;
}
/**
* Check if a given object implements the PaginatedEnterpriseSpaceList interface.
*/
export function instanceOfPaginatedEnterpriseSpaceList(value: object): value is PaginatedEnterpriseSpaceList {
if (!('count' in value) || value['count'] === undefined) return false;
if (!('results' in value) || value['results'] === undefined) return false;
return true;
}
export function PaginatedEnterpriseSpaceListFromJSON(json: any): PaginatedEnterpriseSpaceList {
return PaginatedEnterpriseSpaceListFromJSONTyped(json, false);
}
export function PaginatedEnterpriseSpaceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedEnterpriseSpaceList {
if (json == null) {
return json;
}
return {
'count': json['count'],
'next': json['next'] == null ? undefined : json['next'],
'previous': json['previous'] == null ? undefined : json['previous'],
'results': ((json['results'] as Array<any>).map(EnterpriseSpaceFromJSON)),
'timestamp': json['timestamp'] == null ? undefined : (new Date(json['timestamp'])),
};
}
export function PaginatedEnterpriseSpaceListToJSON(json: any): PaginatedEnterpriseSpaceList {
return PaginatedEnterpriseSpaceListToJSONTyped(json, false);
}
export function PaginatedEnterpriseSpaceListToJSONTyped(value?: PaginatedEnterpriseSpaceList | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'count': value['count'],
'next': value['next'],
'previous': value['previous'],
'results': ((value['results'] as Array<any>).map(EnterpriseSpaceToJSON)),
'timestamp': value['timestamp'] == null ? value['timestamp'] : value['timestamp'].toISOString(),
};
}

View file

@ -0,0 +1,162 @@
/* 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 { InvoiceSystemEnum } from './InvoiceSystemEnum';
import {
InvoiceSystemEnumFromJSON,
InvoiceSystemEnumFromJSONTyped,
InvoiceSystemEnumToJSON,
InvoiceSystemEnumToJSONTyped,
} from './InvoiceSystemEnum';
/**
*
* @export
* @interface PatchedEnterpriseBillingInvoice
*/
export interface PatchedEnterpriseBillingInvoice {
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingInvoice
*/
id?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingInvoice
*/
user?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingInvoice
*/
space?: number;
/**
*
* @type {InvoiceSystemEnum}
* @memberof PatchedEnterpriseBillingInvoice
*/
invoiceSystem?: InvoiceSystemEnum;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingInvoice
*/
invoiceId?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingInvoice
*/
invoiceNumber?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingInvoice
*/
languageCode?: string;
/**
*
* @type {Date}
* @memberof PatchedEnterpriseBillingInvoice
*/
invoiceDate?: Date;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingInvoice
*/
priceNet?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingInvoice
*/
priceGross?: number;
/**
*
* @type {boolean}
* @memberof PatchedEnterpriseBillingInvoice
*/
printed?: boolean;
/**
*
* @type {Date}
* @memberof PatchedEnterpriseBillingInvoice
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedEnterpriseBillingInvoice interface.
*/
export function instanceOfPatchedEnterpriseBillingInvoice(value: object): value is PatchedEnterpriseBillingInvoice {
return true;
}
export function PatchedEnterpriseBillingInvoiceFromJSON(json: any): PatchedEnterpriseBillingInvoice {
return PatchedEnterpriseBillingInvoiceFromJSONTyped(json, false);
}
export function PatchedEnterpriseBillingInvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseBillingInvoice {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'user': json['user'] == null ? undefined : json['user'],
'space': json['space'] == null ? undefined : json['space'],
'invoiceSystem': json['invoice_system'] == null ? undefined : InvoiceSystemEnumFromJSON(json['invoice_system']),
'invoiceId': json['invoice_id'] == null ? undefined : json['invoice_id'],
'invoiceNumber': json['invoice_number'] == null ? undefined : json['invoice_number'],
'languageCode': json['language_code'] == null ? undefined : json['language_code'],
'invoiceDate': json['invoice_date'] == null ? undefined : (new Date(json['invoice_date'])),
'priceNet': json['price_net'] == null ? undefined : json['price_net'],
'priceGross': json['price_gross'] == null ? undefined : json['price_gross'],
'printed': json['printed'] == null ? undefined : json['printed'],
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedEnterpriseBillingInvoiceToJSON(json: any): PatchedEnterpriseBillingInvoice {
return PatchedEnterpriseBillingInvoiceToJSONTyped(json, false);
}
export function PatchedEnterpriseBillingInvoiceToJSONTyped(value?: Omit<PatchedEnterpriseBillingInvoice, 'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'user': value['user'],
'space': value['space'],
'invoice_system': InvoiceSystemEnumToJSON(value['invoiceSystem']),
'invoice_id': value['invoiceId'],
'invoice_number': value['invoiceNumber'],
'language_code': value['languageCode'],
'invoice_date': value['invoiceDate'] == null ? value['invoiceDate'] : value['invoiceDate'].toISOString().substring(0,10),
'price_net': value['priceNet'],
'price_gross': value['priceGross'],
'printed': value['printed'],
};
}

View file

@ -0,0 +1,201 @@
/* 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 PatchedEnterpriseBillingPlan
*/
export interface PatchedEnterpriseBillingPlan {
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
id?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingPlan
*/
name?: string;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
maxUsers?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
maxRecipes?: number;
/**
* Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
maxFileStorageMb?: number;
/**
*
* @type {boolean}
* @memberof PatchedEnterpriseBillingPlan
*/
aiEnabled?: boolean;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
aiCreditsMonthly?: number;
/**
* number of credits to set the balance to for new subscriptions.
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
aiInitialCreditBalance?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
price?: number;
/**
* Discounted price to show, update price_id from Stripe to use, null to disable discount.
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
priceDiscount?: number | null;
/**
* Text to show as reason for the discount
* @type {string}
* @memberof PatchedEnterpriseBillingPlan
*/
discountReason?: string | null;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
months?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingPlan
*/
priceId?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingPlan
*/
productId?: string;
/**
*
* @type {boolean}
* @memberof PatchedEnterpriseBillingPlan
*/
managed?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedEnterpriseBillingPlan
*/
featured?: boolean;
/**
*
* @type {boolean}
* @memberof PatchedEnterpriseBillingPlan
*/
disabled?: boolean;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingPlan
*/
order?: number;
}
/**
* Check if a given object implements the PatchedEnterpriseBillingPlan interface.
*/
export function instanceOfPatchedEnterpriseBillingPlan(value: object): value is PatchedEnterpriseBillingPlan {
return true;
}
export function PatchedEnterpriseBillingPlanFromJSON(json: any): PatchedEnterpriseBillingPlan {
return PatchedEnterpriseBillingPlanFromJSONTyped(json, false);
}
export function PatchedEnterpriseBillingPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseBillingPlan {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'maxUsers': json['max_users'] == null ? undefined : json['max_users'],
'maxRecipes': json['max_recipes'] == null ? undefined : json['max_recipes'],
'maxFileStorageMb': json['max_file_storage_mb'] == null ? undefined : json['max_file_storage_mb'],
'aiEnabled': json['ai_enabled'] == null ? undefined : json['ai_enabled'],
'aiCreditsMonthly': json['ai_credits_monthly'] == null ? undefined : json['ai_credits_monthly'],
'aiInitialCreditBalance': json['ai_initial_credit_balance'] == null ? undefined : json['ai_initial_credit_balance'],
'price': json['price'] == null ? undefined : json['price'],
'priceDiscount': json['price_discount'] == null ? undefined : json['price_discount'],
'discountReason': json['discount_reason'] == null ? undefined : json['discount_reason'],
'months': json['months'] == null ? undefined : json['months'],
'priceId': json['price_id'] == null ? undefined : json['price_id'],
'productId': json['product_id'] == null ? undefined : json['product_id'],
'managed': json['managed'] == null ? undefined : json['managed'],
'featured': json['featured'] == null ? undefined : json['featured'],
'disabled': json['disabled'] == null ? undefined : json['disabled'],
'order': json['order'] == null ? undefined : json['order'],
};
}
export function PatchedEnterpriseBillingPlanToJSON(json: any): PatchedEnterpriseBillingPlan {
return PatchedEnterpriseBillingPlanToJSONTyped(json, false);
}
export function PatchedEnterpriseBillingPlanToJSONTyped(value?: PatchedEnterpriseBillingPlan | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'max_users': value['maxUsers'],
'max_recipes': value['maxRecipes'],
'max_file_storage_mb': value['maxFileStorageMb'],
'ai_enabled': value['aiEnabled'],
'ai_credits_monthly': value['aiCreditsMonthly'],
'ai_initial_credit_balance': value['aiInitialCreditBalance'],
'price': value['price'],
'price_discount': value['priceDiscount'],
'discount_reason': value['discountReason'],
'months': value['months'],
'price_id': value['priceId'],
'product_id': value['productId'],
'managed': value['managed'],
'featured': value['featured'],
'disabled': value['disabled'],
'order': value['order'],
};
}

View file

@ -0,0 +1,137 @@
/* 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 PatchedEnterpriseBillingProduct
*/
export interface PatchedEnterpriseBillingProduct {
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingProduct
*/
id?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingProduct
*/
name?: string;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingProduct
*/
price?: number;
/**
* Discounted price to show, update price_id from Stripe to use, null to disable discount.
* @type {number}
* @memberof PatchedEnterpriseBillingProduct
*/
priceDiscount?: number | null;
/**
* Text to show as reason for the discount
* @type {string}
* @memberof PatchedEnterpriseBillingProduct
*/
discountReason?: string | null;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingProduct
*/
priceId?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingProduct
*/
productId?: string;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingProduct
*/
order?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingProduct
*/
aiCredits?: number | null;
/**
*
* @type {boolean}
* @memberof PatchedEnterpriseBillingProduct
*/
disabled?: boolean;
}
/**
* Check if a given object implements the PatchedEnterpriseBillingProduct interface.
*/
export function instanceOfPatchedEnterpriseBillingProduct(value: object): value is PatchedEnterpriseBillingProduct {
return true;
}
export function PatchedEnterpriseBillingProductFromJSON(json: any): PatchedEnterpriseBillingProduct {
return PatchedEnterpriseBillingProductFromJSONTyped(json, false);
}
export function PatchedEnterpriseBillingProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseBillingProduct {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'price': json['price'] == null ? undefined : json['price'],
'priceDiscount': json['price_discount'] == null ? undefined : json['price_discount'],
'discountReason': json['discount_reason'] == null ? undefined : json['discount_reason'],
'priceId': json['price_id'] == null ? undefined : json['price_id'],
'productId': json['product_id'] == null ? undefined : json['product_id'],
'order': json['order'] == null ? undefined : json['order'],
'aiCredits': json['ai_credits'] == null ? undefined : json['ai_credits'],
'disabled': json['disabled'] == null ? undefined : json['disabled'],
};
}
export function PatchedEnterpriseBillingProductToJSON(json: any): PatchedEnterpriseBillingProduct {
return PatchedEnterpriseBillingProductToJSONTyped(json, false);
}
export function PatchedEnterpriseBillingProductToJSONTyped(value?: PatchedEnterpriseBillingProduct | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'price': value['price'],
'price_discount': value['priceDiscount'],
'discount_reason': value['discountReason'],
'price_id': value['priceId'],
'product_id': value['productId'],
'order': value['order'],
'ai_credits': value['aiCredits'],
'disabled': value['disabled'],
};
}

View file

@ -0,0 +1,96 @@
/* 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 PatchedEnterpriseBillingReferralLink
*/
export interface PatchedEnterpriseBillingReferralLink {
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingReferralLink
*/
id?: number;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingReferralLink
*/
createdBy?: number | null;
/**
*
* @type {number}
* @memberof PatchedEnterpriseBillingReferralLink
*/
space?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseBillingReferralLink
*/
token?: string;
/**
*
* @type {Date}
* @memberof PatchedEnterpriseBillingReferralLink
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the PatchedEnterpriseBillingReferralLink interface.
*/
export function instanceOfPatchedEnterpriseBillingReferralLink(value: object): value is PatchedEnterpriseBillingReferralLink {
return true;
}
export function PatchedEnterpriseBillingReferralLinkFromJSON(json: any): PatchedEnterpriseBillingReferralLink {
return PatchedEnterpriseBillingReferralLinkFromJSONTyped(json, false);
}
export function PatchedEnterpriseBillingReferralLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseBillingReferralLink {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'createdBy': json['created_by'] == null ? undefined : json['created_by'],
'space': json['space'] == null ? undefined : json['space'],
'token': json['token'] == null ? undefined : json['token'],
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
};
}
export function PatchedEnterpriseBillingReferralLinkToJSON(json: any): PatchedEnterpriseBillingReferralLink {
return PatchedEnterpriseBillingReferralLinkToJSONTyped(json, false);
}
export function PatchedEnterpriseBillingReferralLinkToJSONTyped(value?: Omit<PatchedEnterpriseBillingReferralLink, 'created_at'> | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'created_by': value['createdBy'],
'space': value['space'],
'token': value['token'],
};
}

View file

@ -0,0 +1,145 @@
/* 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 { AlignmentEnum } from './AlignmentEnum';
import {
AlignmentEnumFromJSON,
AlignmentEnumFromJSONTyped,
AlignmentEnumToJSON,
AlignmentEnumToJSONTyped,
} from './AlignmentEnum';
import type { EnterpriseSocialEmbedTypeEnum } from './EnterpriseSocialEmbedTypeEnum';
import {
EnterpriseSocialEmbedTypeEnumFromJSON,
EnterpriseSocialEmbedTypeEnumFromJSONTyped,
EnterpriseSocialEmbedTypeEnumToJSON,
EnterpriseSocialEmbedTypeEnumToJSONTyped,
} from './EnterpriseSocialEmbedTypeEnum';
import type { Keyword } from './Keyword';
import {
KeywordFromJSON,
KeywordFromJSONTyped,
KeywordToJSON,
KeywordToJSONTyped,
} from './Keyword';
/**
* Adds nested create feature
* @export
* @interface PatchedEnterpriseSocialEmbed
*/
export interface PatchedEnterpriseSocialEmbed {
/**
*
* @type {number}
* @memberof PatchedEnterpriseSocialEmbed
*/
id?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
name?: string;
/**
*
* @type {EnterpriseSocialEmbedTypeEnum}
* @memberof PatchedEnterpriseSocialEmbed
*/
type?: EnterpriseSocialEmbedTypeEnum;
/**
*
* @type {Array<Keyword>}
* @memberof PatchedEnterpriseSocialEmbed
*/
keywords?: Array<Keyword>;
/**
*
* @type {AlignmentEnum}
* @memberof PatchedEnterpriseSocialEmbed
*/
alignment?: AlignmentEnum;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
backgroundColor?: string | null;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
accentColor?: string | null;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSocialEmbed
*/
uuid?: string;
}
/**
* Check if a given object implements the PatchedEnterpriseSocialEmbed interface.
*/
export function instanceOfPatchedEnterpriseSocialEmbed(value: object): value is PatchedEnterpriseSocialEmbed {
return true;
}
export function PatchedEnterpriseSocialEmbedFromJSON(json: any): PatchedEnterpriseSocialEmbed {
return PatchedEnterpriseSocialEmbedFromJSONTyped(json, false);
}
export function PatchedEnterpriseSocialEmbedFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseSocialEmbed {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'] == null ? undefined : json['name'],
'type': json['type'] == null ? undefined : EnterpriseSocialEmbedTypeEnumFromJSON(json['type']),
'keywords': json['keywords'] == null ? undefined : ((json['keywords'] as Array<any>).map(KeywordFromJSON)),
'alignment': json['alignment'] == null ? undefined : AlignmentEnumFromJSON(json['alignment']),
'backgroundColor': json['background_color'] == null ? undefined : json['background_color'],
'accentColor': json['accent_color'] == null ? undefined : json['accent_color'],
'uuid': json['uuid'] == null ? undefined : json['uuid'],
};
}
export function PatchedEnterpriseSocialEmbedToJSON(json: any): PatchedEnterpriseSocialEmbed {
return PatchedEnterpriseSocialEmbedToJSONTyped(json, false);
}
export function PatchedEnterpriseSocialEmbedToJSONTyped(value?: PatchedEnterpriseSocialEmbed | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'type': EnterpriseSocialEmbedTypeEnumToJSON(value['type']),
'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array<any>).map(KeywordToJSON)),
'alignment': AlignmentEnumToJSON(value['alignment']),
'background_color': value['backgroundColor'],
'accent_color': value['accentColor'],
'uuid': value['uuid'],
};
}

View file

@ -0,0 +1,121 @@
/* 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 { EnterpriseBillingPlan } from './EnterpriseBillingPlan';
import {
EnterpriseBillingPlanFromJSON,
EnterpriseBillingPlanFromJSONTyped,
EnterpriseBillingPlanToJSON,
EnterpriseBillingPlanToJSONTyped,
} from './EnterpriseBillingPlan';
/**
*
* @export
* @interface PatchedEnterpriseSpace
*/
export interface PatchedEnterpriseSpace {
/**
*
* @type {number}
* @memberof PatchedEnterpriseSpace
*/
space?: number;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSpace
*/
billingLicensedModules?: string;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSpace
*/
billingCustomerId?: string | null;
/**
*
* @type {EnterpriseBillingPlan}
* @memberof PatchedEnterpriseSpace
*/
billingPlan?: EnterpriseBillingPlan;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSpace
*/
billingSubscriptionId?: string | null;
/**
*
* @type {string}
* @memberof PatchedEnterpriseSpace
*/
billingSubscriptionStatus?: string | null;
/**
*
* @type {number}
* @memberof PatchedEnterpriseSpace
*/
billingMonthlyPrice?: number;
}
/**
* Check if a given object implements the PatchedEnterpriseSpace interface.
*/
export function instanceOfPatchedEnterpriseSpace(value: object): value is PatchedEnterpriseSpace {
return true;
}
export function PatchedEnterpriseSpaceFromJSON(json: any): PatchedEnterpriseSpace {
return PatchedEnterpriseSpaceFromJSONTyped(json, false);
}
export function PatchedEnterpriseSpaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedEnterpriseSpace {
if (json == null) {
return json;
}
return {
'space': json['space'] == null ? undefined : json['space'],
'billingLicensedModules': json['billing_licensed_modules'] == null ? undefined : json['billing_licensed_modules'],
'billingCustomerId': json['billing_customer_id'] == null ? undefined : json['billing_customer_id'],
'billingPlan': json['billing_plan'] == null ? undefined : EnterpriseBillingPlanFromJSON(json['billing_plan']),
'billingSubscriptionId': json['billing_subscription_id'] == null ? undefined : json['billing_subscription_id'],
'billingSubscriptionStatus': json['billing_subscription_status'] == null ? undefined : json['billing_subscription_status'],
'billingMonthlyPrice': json['billing_monthly_price'] == null ? undefined : json['billing_monthly_price'],
};
}
export function PatchedEnterpriseSpaceToJSON(json: any): PatchedEnterpriseSpace {
return PatchedEnterpriseSpaceToJSONTyped(json, false);
}
export function PatchedEnterpriseSpaceToJSONTyped(value?: PatchedEnterpriseSpace | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'space': value['space'],
'billing_licensed_modules': value['billingLicensedModules'],
'billing_customer_id': value['billingCustomerId'],
'billing_plan': EnterpriseBillingPlanToJSON(value['billingPlan']),
'billing_subscription_id': value['billingSubscriptionId'],
'billing_subscription_status': value['billingSubscriptionStatus'],
'billing_monthly_price': value['billingMonthlyPrice'],
};
}

View file

@ -0,0 +1,73 @@
/* 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 StripeCheckoutSessionRequest
*/
export interface StripeCheckoutSessionRequest {
/**
*
* @type {number}
* @memberof StripeCheckoutSessionRequest
*/
productId?: number;
/**
*
* @type {number}
* @memberof StripeCheckoutSessionRequest
*/
planId?: number;
}
/**
* Check if a given object implements the StripeCheckoutSessionRequest interface.
*/
export function instanceOfStripeCheckoutSessionRequest(value: object): value is StripeCheckoutSessionRequest {
return true;
}
export function StripeCheckoutSessionRequestFromJSON(json: any): StripeCheckoutSessionRequest {
return StripeCheckoutSessionRequestFromJSONTyped(json, false);
}
export function StripeCheckoutSessionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StripeCheckoutSessionRequest {
if (json == null) {
return json;
}
return {
'productId': json['product_id'] == null ? undefined : json['product_id'],
'planId': json['plan_id'] == null ? undefined : json['plan_id'],
};
}
export function StripeCheckoutSessionRequestToJSON(json: any): StripeCheckoutSessionRequest {
return StripeCheckoutSessionRequestToJSONTyped(json, false);
}
export function StripeCheckoutSessionRequestToJSONTyped(value?: StripeCheckoutSessionRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'product_id': value['productId'],
'plan_id': value['planId'],
};
}

View file

@ -0,0 +1,84 @@
/* 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 StripeCheckoutSessionResponse
*/
export interface StripeCheckoutSessionResponse {
/**
*
* @type {string}
* @memberof StripeCheckoutSessionResponse
*/
sessionId: string;
/**
*
* @type {string}
* @memberof StripeCheckoutSessionResponse
*/
stripePublicKey: string;
/**
*
* @type {string}
* @memberof StripeCheckoutSessionResponse
*/
url: string;
}
/**
* Check if a given object implements the StripeCheckoutSessionResponse interface.
*/
export function instanceOfStripeCheckoutSessionResponse(value: object): value is StripeCheckoutSessionResponse {
if (!('sessionId' in value) || value['sessionId'] === undefined) return false;
if (!('stripePublicKey' in value) || value['stripePublicKey'] === undefined) return false;
if (!('url' in value) || value['url'] === undefined) return false;
return true;
}
export function StripeCheckoutSessionResponseFromJSON(json: any): StripeCheckoutSessionResponse {
return StripeCheckoutSessionResponseFromJSONTyped(json, false);
}
export function StripeCheckoutSessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StripeCheckoutSessionResponse {
if (json == null) {
return json;
}
return {
'sessionId': json['session_id'],
'stripePublicKey': json['stripe_public_key'],
'url': json['url'],
};
}
export function StripeCheckoutSessionResponseToJSON(json: any): StripeCheckoutSessionResponse {
return StripeCheckoutSessionResponseToJSONTyped(json, false);
}
export function StripeCheckoutSessionResponseToJSONTyped(value?: StripeCheckoutSessionResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'session_id': value['sessionId'],
'stripe_public_key': value['stripePublicKey'],
'url': value['url'],
};
}

View file

@ -0,0 +1,75 @@
/* 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 StripePortal
*/
export interface StripePortal {
/**
*
* @type {string}
* @memberof StripePortal
*/
portalUrl: string;
/**
*
* @type {string}
* @memberof StripePortal
*/
stripePublicKey: string;
}
/**
* Check if a given object implements the StripePortal interface.
*/
export function instanceOfStripePortal(value: object): value is StripePortal {
if (!('portalUrl' in value) || value['portalUrl'] === undefined) return false;
if (!('stripePublicKey' in value) || value['stripePublicKey'] === undefined) return false;
return true;
}
export function StripePortalFromJSON(json: any): StripePortal {
return StripePortalFromJSONTyped(json, false);
}
export function StripePortalFromJSONTyped(json: any, ignoreDiscriminator: boolean): StripePortal {
if (json == null) {
return json;
}
return {
'portalUrl': json['portal_url'],
'stripePublicKey': json['stripe_public_key'],
};
}
export function StripePortalToJSON(json: any): StripePortal {
return StripePortalToJSONTyped(json, false);
}
export function StripePortalToJSONTyped(value?: StripePortal | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'portal_url': value['portalUrl'],
'stripe_public_key': value['stripePublicKey'],
};
}

View file

@ -3,6 +3,7 @@
export * from './AccessToken';
export * from './AiLog';
export * from './AiProvider';
export * from './AlignmentEnum';
export * from './AuthToken';
export * from './AutoMealPlan';
export * from './Automation';
@ -17,6 +18,15 @@ export * from './CookLog';
export * from './CustomFilter';
export * from './DefaultPageEnum';
export * from './DeleteEnum';
export * from './EnterpriseBillingInvoice';
export * from './EnterpriseBillingPlan';
export * from './EnterpriseBillingProduct';
export * from './EnterpriseBillingReferralLink';
export * from './EnterpriseKeyword';
export * from './EnterpriseSocialEmbed';
export * from './EnterpriseSocialEmbedTypeEnum';
export * from './EnterpriseSocialRecipeSearch';
export * from './EnterpriseSpace';
export * from './ExportLog';
export * from './ExportRequest';
export * from './FdcQuery';
@ -44,6 +54,7 @@ export * from './InventoryEntry';
export * from './InventoryLocation';
export * from './InventoryLog';
export * from './InviteLink';
export * from './InvoiceSystemEnum';
export * from './Keyword';
export * from './KeywordLabel';
export * from './KeywordModeEnum';
@ -69,6 +80,13 @@ export * from './PaginatedBookmarkletImportListList';
export * from './PaginatedConnectorConfigList';
export * from './PaginatedCookLogList';
export * from './PaginatedCustomFilterList';
export * from './PaginatedEnterpriseBillingInvoiceList';
export * from './PaginatedEnterpriseBillingPlanList';
export * from './PaginatedEnterpriseBillingProductList';
export * from './PaginatedEnterpriseBillingReferralLinkList';
export * from './PaginatedEnterpriseSocialEmbedList';
export * from './PaginatedEnterpriseSocialRecipeSearchList';
export * from './PaginatedEnterpriseSpaceList';
export * from './PaginatedExportLogList';
export * from './PaginatedFoodList';
export * from './PaginatedGenericModelReferenceList';
@ -118,6 +136,12 @@ export * from './PatchedBookmarkletImport';
export * from './PatchedConnectorConfig';
export * from './PatchedCookLog';
export * from './PatchedCustomFilter';
export * from './PatchedEnterpriseBillingInvoice';
export * from './PatchedEnterpriseBillingPlan';
export * from './PatchedEnterpriseBillingProduct';
export * from './PatchedEnterpriseBillingReferralLink';
export * from './PatchedEnterpriseSocialEmbed';
export * from './PatchedEnterpriseSpace';
export * from './PatchedExportLog';
export * from './PatchedFood';
export * from './PatchedHousehold';
@ -198,6 +222,9 @@ export * from './SpaceNavTextColorEnum';
export * from './SpaceThemeEnum';
export * from './Step';
export * from './Storage';
export * from './StripeCheckoutSessionRequest';
export * from './StripeCheckoutSessionResponse';
export * from './StripePortal';
export * from './Supermarket';
export * from './SupermarketCategory';
export * from './SupermarketCategoryRelation';